[lammps-users] convert tools

Hello LAMMPS users,

could you tell me whether there is a tool to convert the LAMMPS trajectory file into nc file (netCDF) or DCD file (CHARMM) or DLPOLY file, which is needed for post processing of LAMMPS files in another MD analyzing tool?


Hello Chol-Jun,

You can dump your trajectories in dcd format. Check the documentation here: http://lammps.sandia.gov/doc/dump.html.


I've written my own Fortran code to do the LAMMPS to DLPOLY conversion at least. It's specialized for the system I was running, so it won't be useful to you as written, but you could use it as a basis to do the conversion you need. If you want I can send you the code, but there's really not that much to it; you just have to read in the LAMMPS trajectory line by line and write the same data out in the DLPOLY HISTORY format, which can be found in the DLPOLY documentation. I found it easier to use an additional input file specifying the box size and such, but there's probably sufficient information in the LAMMPS dump file that you don't really need to do that.

Hope this helps,

Thank you for your replying. It would be very grateful and helpful if you give me your own code, so that I can see the structure of DLPOLY easily (if possible). Ultimately I have to convert the dump file into the netCDF file format, but there is one converter from DLPOLY files FIELD and HISTORY. Therefore, I have to do two steps:1) LAMMPS - DLPOLY 2) DLPOLY - netCDF. It is crazy. If you have any idea to do directly from LAMMPS to netCDF, it welcomes.

With best regards,

Christopher Daub wrote: