-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller n2p2 write #3
base: main
Are you sure you want to change the base?
Conversation
if n2p2_units["length"] != "Ang": | ||
for j, lattice in enumerate(lattice_list): | ||
lattice_list[j] = float(lattice) / UNITS[n2p2_units["length"]] | ||
n_structures = int(len(xyz_lines)/ (n_atoms+ 2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor but formatting is slightly inconsistent here.
We could also consider assertions to check values that we've inferred are valid e.g. n_atoms
Note before merging: some changes shared with #2 and will be removed after rebasing |
Could you expand on the different types of input I think some updates are needed, e.g. |
for k, position in enumerate(atom_xyz[1:], 1): | ||
atom_xyz[k] = float(position) / UNITS[n2p2_units["length"]] | ||
if(n_structures<= 1): | ||
force = force_lines[j + 4].split()[-4:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be force = force_lines[j + 4].split()[-3:]
here and in the else
?
Minor changes to make reading xyz files work more generally.
I think this PR contains code from the other pull request. Should probably change some of the code to work as an option of the old code.