Export LAMMPS data file for GROMAC simulation

I simulated oleic acid with the nano units system then I wrote a data file of topology and exported the file to .gro file with VMD. However, the position of atoms got strange (the size of the molecule was too small, not distorted btw). Can anyone tell me how VMD converts the LAMMPS data files to .gro files. As I know .gro file uses the GROMACS units system.

I also dump the .xtc file and I wonder which parameters are included in .xtc file and if it automatically converts units to GROMACS units


your question is about VMD, not LAMMPS. If there are scaling issues when reading/writing the files you should check which units are expected when reading the file in the documentation or ask VMD developers.

Thank you, but my .xtc file is dumped directly from LAMMPS by using dump command. Can you provide me the information about .xtc file?

You can have a look at that page.

This is a problem with the LAMMPS data file format. It does not encode the units that are used when it is written. The most common choices are “metal”, “real” or “lj”. The first two are using Angstrom as length unit and for “lj” all bets are off, anyway. Thus when reading the data file, it is usually assumed that dimensions are in Angstrom, not nanometers. VMD assumes internal data is in Angstroms and will “correctly” convert those to nanometers when writing .gro or similar files.
But since your data file is not in Angstroms, you get the unexpected results. You will have to do some VMD script programming to rescale your coordinates to Angstroms if you want correct output.

Yes. Please check out the source code: lammps/src/EXTRA-DUMP/dump_xtc.cpp at 35121a2ed8a3621fed6cba7b93919caec64bf30b · lammps/lammps · GitHub

Please also note that there are tools dedicated for converting and processing simulation data, like InterMol. We have a list of those Pre/Post Processing Tools for use with LAMMPS