Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. def _get_xyz_cords(file_name):
  2. with open(file_name) as xyz_file:
  3. natoms = int(xyz_file.readline()) # First line of xyz lists natoms
  4. next(xyz_file) # Skips title of xyz file
  5. coords = np.zeros([natoms, 3], dtype="float64")
  6. for i, x in enumerate(coords):
  7. > line = xyz_file.readline().split()
  8. E ValueError: Mixing iteration and read methods would lose data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement