Hello,
I am trying to read a data file with triclinic box. The LAMMPS version that I am using is 23 June 2022 - Update 3 so it probably still has the error “Triclinic box skew is too large”. The box dimensions in the data file are such that it allows the tilt factors defined in the data file (x box length is 24.6 Å, and xy tilt factor is -12.3). However, when LAMMPS reads the data file, the x box length changes to 24.6000004 Å (I calculated this using the xlo and xhi values printed in the log file) probably due to floating point error and hence, the tilt becomes smaller than the allowed value. I wanted to know if there is way to get around it and make LAMMPS read the exact box dimension as in the data file?
Thank you
Please update your LAMMPS version and the error should go away, see Error: Triclinic box skew is too large.
Thank you for the response, Dr. Moore. I already saw this post. According to my understanding, I can use box tilt large command with this older version of LAMMPS or update to a newer version. In both cases, there will still be a warning. Can you please guide me if I should be concerned about that warning? Or this will just impact the performance efficiency and not the actual results?
Thank you for your time.
Thank you again, Dr. Moore. Appreciate your guidance.
Since your tilt is exactly half the box length (modulo floating point rounding), you should consider using a supercell. In your case with replicate 2 1 1 you should get a box where you can reset the tilt factor to zero using change_box without any problems, IIRC.
Having an orthogonal box has not only benefits in terms of performance, it will produce less noise since it doesn’t need to convert between regular and fractional coordinates multiple times during each time step.
2 Likes
Thank you, Dr. Kohlmeyer and sorry for the late response. I tried implementing the method you suggested but got an error “Bond atom missing in image check”. I believe this is because I have graphite in my simulation which is infinite (bonds cross periodic boundary) and image flags are not consistent because of that (even if I don’t not replicate). To avoid problems due to this when replicating, I also tried bond/periodic keyword with replicate command which should have helped in my understanding but it did not. Do you have any suggestions for this?
Thank you for your time and guidance.
Which LAMMPS version are you using?
Try using 27 June 2024.
For testing on a Linux machine, you can just download a pre-compiled executable https://github.com/lammps/lammps/releases/download/patch_27Jun2024/lammps-linux-x86_64-27Jun2024.tar.gz
And just try if that works with replicating your system and adjusting the bonds that wrap around periodic boundaries.
Compatibility with bonds across periodic boundaries was added to LAMMPS in spring 2024.
Thank you, Dr. Kohlmeyer. I will try to update to the LAMMPS version mentioned.
Sorry for another post but I was not able to comprehend this statement. In another simulation, in which I had bonds crossing the periodic boundary and atoms have correct image flags, the replicate command seems to work fine. I used the same LAMMPS version (23 June 22 - Update 3). I wanted to confirm that you meant compatibility of replicate command for a system that has periodic bond loop (which can not have image flag consistency) was added to LAMMPS in spring 2024?
There are different possible reasons for having inconsistent image flags. Some are an indication of a problem and some are not. This is why this is a warning and not an error. But if you have a periodic molecular system with bonds that reach across periodic boundaries, i.e. atoms on the right of the box have bonds to the periodic image of atoms on the left of the box, then it is impossible to avoid this warning.
Previously, when you use the replicate such bonds were not correctly created. Basically the code needs to break such a bond and then create two new bonds, one regular where the two copies of the replication are joined and a single “long” one that now reaches across the entire new box from right to left. You could use replicate, but the bonds were bogus and the documentation had warnings about that.
I cannot give you any guarantee that what you do will work as expected since I don’t know any details about your work, your files, your programming skill, you carefulness and so on.
I can only point you in the right direction, going there is up to you and checking whether my statements are correct or not is also up to you. I may just misremember some details. I am not doing this myself, so I only know “about it”, since I merged the pull request into LAMMPS.
Sorry for the delayed response, Dr. Kohlmeyer and thank you for the explanations. I understand your point.