Python (numpy) read a text file with mixed format
问题 I have thousands of files like this, and I want to extract the values of columns 6,7,8 for the rows corresponding to atoms ['CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ'], ATOM 1 CG TOLU 1 -0.437 -0.756 1.802 1.00 1.99 PRO0 ATOM 2 HG TOLU 1 -0.689 -1.123 2.786 1.00 0.00 PRO0 ATOM 3 CD1 TOLU 1 0.041 -1.623 0.811 1.00 1.99 PRO0 ATOM 4 HD1 TOLU 1 0.331 -2.603 1.162 1.00 0.00 PRO0 ATOM 5 CD2 TOLU 1 -0.692 0.547 1.352 1.00 1.99 PRO0 ATOM 6 HD2 TOLU 1 -1.131 1.264 2.030 1.00 0.00 PRO0 ATOM 7 CE1 TOLU 1 0