Hello,
I am trying to read 2 data files. The first data file that the LAMMPS reads defines a triclinic box and the second data file defines an orthogonal box. I make sure that the orthogonal box defined by second data file is within the triclinic box defined by the first data file by using shift keyword such that the box dimensions and tilt factors of the simulation domain remain the same as the first data file. The simulation seems to run fine as well.
However, I came across a statement in read_data command documentation that “If the first read_data command defined an orthogonal or restricted triclinic or general triclinic simulation box (see the sub-section below on header keywords), then subsequent data files must define the same kind of simulation box. For orthogonal boxes, the new box can be a different size; see the next Note. For a restricted triclinic box, the 3 new tilt factors (“xy xz yz” keyword) must have the same values as in the original data file. For a general triclinic box, the new avec, bvec, cvec, and “abc origin” keywords must have the same values in the original data file. files. Also the shift keyword cannot be used in subsequent read_data commands for a general triclinic box.”
In order to clear my confusion, I wanted to confirm that in this case, it is not necessary for the second data file to define a triclinic box?
Thank you
Did you try it and see what happens?
At any rate, an orthogonal box is just a special case of a triclinic box with all tilt factors set to zero. So by adding a line 0.0 0.0 0.0 xy xz yz
after the box dimensions should do the trick to make it triclinic.
Thank you for the response, Dr. Kohlmeyer. I did try reading the the second data file as simple orthogonal box (without adding the line you mentioned) and the simulation seems to run fine (there is no error or warning, and the box dimensions are the same as first data file). I can also try adding the line 0.0 0.0 0.0 xy xz yz but I can’t understand if there is a point in doing this. Even if I add this line, this comment in the documentation will not be satisfied. For a restricted triclinic box, the 3 new tilt factors (“xy xz yz” keyword) must have the same values as in the original data file.
Well, the fact that I didn’t pay attention that well may be related to the fact that I neither like to use non-orthogonal boxes nor multiple read_data commands. For the first there is rarely a justfied need over using a suitable orthogonal supercell, and the latter is just so messy and difficult to get right when you look at the source code. The read_data command itself is quite complex and convoluted. Whole system manipulations can be very challenging to be done cleanly and correctly in parallel with domain decomposition. I prefer using VMD and Tcl scripting for that purpose. Slow but boringly simple (if you know VMD and Tcl).
That’s interesting. I don’t have an idea about Tcl (I have used VMD for visualizing the trajectory from LAMMPS). Moreover, I have used multiple read_data commands in a simulation few times and never came across a problem as everything is well-explained in the documentation. For the triclinic box, this is my first experience which was going smooth until I came across that note in the read_data documentation which confused me.
Few people have unless they are an old fart like me. It was very popular and the cross-platform toolkit at the time when I was a grad student. But its star went under with the rise of Python (they both started at around the same time, but Python was a slow starter).
If you’re “in the know™” you can do things like this: Homepage of Axel Kohlmeyer - Various Odds & Ends
Thank you so much for sharing this. I will definitely go through it in detail and try to learn.
Just to close the loop for my question: I will keep using my technique (adding an orthogonal box in a triclinic box making sure that orthogonal box is within the triclinic box) and if I come across any behavior that does not seem right, I will post here to add any new information for the forum.
Thank you again for all the help and knowledge.