Skip to content

Commit

Permalink
Merge pull request #16 from davidkastner/fixprepData
Browse files Browse the repository at this point in the history
Fixprep data
mane292 authored Jan 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 74b0727 + bfc344b commit d69bc5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyef/analysis.py
Original file line number Diff line number Diff line change
@@ -121,10 +121,10 @@ def prepData(self):
with open(optim_file_path, 'r') as full_traj:
num_atoms = int(full_traj.readline())
num_lines = num_atoms + 2
print('Number of lines: ' + str(num_lines))
#If ends on first optimization of cycle, change cutting pattern
head = [next(full_traj) for _ in range(num_lines - 1)]

full_traj.seek(0)
head = [next(full_traj) for _ in range(num_lines)]
full_traj.seek(0)
with open(os.path.join(folder_path, 'initial_' + os.path.basename(optim_file_path)), 'w') as initxyz:
initxyz.writelines(head)
with open(final_optim_xyz, 'w') as finalxyz:

0 comments on commit d69bc5c

Please sign in to comment.