LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] A basic question on using lamps dump files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] A basic question on using lamps dump files

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 8 Aug 2017 17:35:24 -0400

On Tue, Aug 8, 2017 at 4:43 PM, Richard Gustafson <gustafson_rm@...1303...> wrote:
I have a very basic question on dump files.  I find references in various visualization packages to “lammpa dump files”.  However, when I search “dump files” in the Lammps documentation, I am directed to the dump command, which really seems to be an operation to create anyone of a number of files of different types and options.  For instance with a dump command, you can create atom, cfg,custom, .dcd. and other file options, some with no options, some with many.  It looks like which the format of a “dump file” varies, starting with a type of file, and offering various output options.  So, when a visualization program states it reads “LAMMPS dump files”,  with no additional explanation, are they referring to a specific format from the dump command, something else, or is it a vague reference?

​in this context "LAMMPS dump files" refers to the "native" format, i.e. dump style "atom​" and dump style "custom".
Specifically, I am trying to use OVITO to look at trajectory files., and also Atomeye.    I have a bunch of .dcd files.  Neither OVITO not Atomeye.  Both can read .cfg files.   Dcd files are binary and machine or system dependent.  Therefore I think it needs to be transformed to something else.   Is there any program than can read a .dcd file and convert it to something else, e.g. a .cfg file?

​yes, LAMMPS could do it, if you install/configure/compile the USER-MOLFILE package.
have a look at the rerun command. you need to set up your simulation as ​you have before, but then you can replace your pair style with pair style zero, to avoid recomputing everything. please be aware that this will likely mess up the time step numbers, since DCD format files are extremely minimal.

as an alternative, you may look into using VMD, which reads DCD format files natively, however, you likely want to reconstruct some additional topology and atom/element information information, since DCD files itself do not store that information, but only coordinates.

​another option would be to look into teaching Ovito to read DCD files. a simple approach for that would be to adapt the code in the USER-MOLFILE package, which passes the heavy lifting of processing many different file formats to VMD molfile plugins.​ another option is to utilize the dcdplugin source code from the VMD molfile plugin directly (which has a ton of helpful comments, and can handle DCD files from several different platforms and fortran compilers and byteswap them on the fly)


  I am assuming you would have to run it (e.g. Python), or compile ti form source code and create a system specific program to perform the conversion for the binary file to be read. If there isn’t one, is the only way to get one is to write one from interpreting the LAMMPS source code for the two files types?
Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...92......
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.