From cf7659aac0614a9285008590e2894393d39a40b0 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Tue, 10 Nov 2020 09:11:05 +0100 Subject: [PATCH] LGTM --- regtest/python/rt-protein/python-script.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/regtest/python/rt-protein/python-script.py b/regtest/python/rt-protein/python-script.py index 88edd6abb2..3626b11a44 100644 --- a/regtest/python/rt-protein/python-script.py +++ b/regtest/python/rt-protein/python-script.py @@ -42,9 +42,10 @@ def read_xyz(filename): xyz = open(filename) n_atoms = int(xyz.readline()) - title, trajectory = xyz.readline(), [] + xyz.readline() # skip line + trajectory = [] while True : - atom_type, coordinates = np.zeros(n_atoms).astype(str), np.zeros([n_atoms,3]) + atom_type, coordinates = np.zeros(n_atoms).astype(str), np.zeros([n_atoms,3]) for i in range(0,n_atoms) : line = xyz.readline() atom,x,y,z = line.split() @@ -54,8 +55,8 @@ def read_xyz(filename): nextline = xyz.readline() if( nextline=="" ) : break c_atoms = int(nextline) - if( c_atoms!=n_atoms ) : break - title = xyz.readline() + if( c_atoms!=n_atoms ) : break + xyz.readline() # skip line xyz.close() return trajectory