Hi!
I’m trying to find a way to use LAMMPS to calculate the lattice parameter of ordered lattices of a simulation cell which I can load through read_data/read_restart, but don’t know the way it was generated. So for example, for something like :
lattrice fcc 4.05
region whole block 0 10 0 10 0 10 units lattice
create_box 1 whole
create_atoms 1 region whole
I’d want to be able to get 4.05, for the moment the best I can achieve is getting the cell direction, but since the second simulation is unaware of the lattice command used, it can’t interpret the lattice from the simulation’s atoms positions. I only need it to work on triclinic boxes, so I figure that using something like projections to evaluate the maximum number of atoms per direction and the cell dimensions could work, however I’m unable to find a way to do such a calculation from the forums nor the documentation which would also work on HCP lattices for example.
Any help would be appreciated, thank you very much!
Antoine.
It is not really clear what you are asking. This all seems overly complex and is not very well defined in the way you describe it.
If the purpose is to carry over a number from one simulation to the next without having to manually edit a file (and that is what it looks like to me), you should consider using the print command and then a file style variable in subsequent runs to retrieve the number written to a file in the initial input.
Hi, thanks for your answer and sorry for not being clearer in my original question. My goal is not so much to carry over a number from one simulation to the next, but rather to use a simulation to “reverse-engineer” the lattice parameters (a, b, c) of a triclinic simulation cell for post-processing purposes. I understand that the use for this is very niche and that what I’m asking for might be oddly specific, in which case I’ll make do with the values from a previous simulation, however I wanted to check first if it could be done through pre-existing lammps functions, hence my original message since I had not found anything of the sort in either the forums or the documentation!
Thanks again!
Antoine.
whatever you would reverse engineer would be rather approximate as soon as particles are moving.
you can infer the cell geometry from the box information. https://docs.lammps.org/Howto_triclinic.html
Thanks for your answer, I’ll look deeper into it!
Have a good day!