-
Notifications
You must be signed in to change notification settings - Fork 82
lammpsdata box parameters #741
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
Comments
The lammps data file should contain the bounds of the simulation cell (see: https://lammps.sandia.gov/doc/2001/data_format.html) I just submitted PR related to the simulation cell bounds not being set properly (things were being set to 0 to Length in all cases, not using actual bounds). |
Thanks for the response. My guess is this has gone undetected because the issue only arises for "triclinic" boxes. For orthogonal ones, xlo_bound=xlo etc. I'm attaching a pdf for demonstrating with an example. We also have A = (xhi-xlo,0,0); B = (xy,yhi-ylo,0); C = (xz,yz,zhi-zlo) which are cell vectors as described in https://lammps.sandia.gov/doc/read_data.html. You can see that if you have an xy tilt, xhi_bound can be different from xhi. Please let me know if I'm missing something. |
Most of what we use are orthogonal boxes, so there might be an issue with triclinic boxes we're not catching. This functionality seems to be supported with this function. Is the bug related to the fact that ?low and ?hi need to be written instead? If so, this is a pretty simple change to the writer. |
Closing this as the gro writer has moved to GMSO, and it looks like we have a check for triclinic boxes there. |
In lammpsdata.py the box data are written as:
data.write('{0:.6f} {1:.6f} xlo xhi\n'.format(
xlo_bound, xhi_bound))
data.write('{0:.6f} {1:.6f} ylo yhi\n'.format(
ylo_bound, yhi_bound))
data.write('{0:.6f} {1:.6f} zlo zhi\n'.format(
zlo_bound, zhi_bound))
This seems to be a remnant of lammpstrj.py. However, the data file does NOT use box bounds to define the cell and directly takes xlo,xhi;ylo,yhi;zlo,zhi.
Is this a bug or am I missing something?
The text was updated successfully, but these errors were encountered: