Page MenuHomec4science

Section_tools.html
No OneTemporary

File Metadata

Created
Tue, Jul 9, 12:05

Section_tools.html

<HTML>
<CENTER><A HREF = "Section_perf.html">Previous Section</A> - <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS
Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> - <A HREF = "Section_modify.html">Next
Section</A>
</CENTER>
<HR>
<H3>7. Additional tools
</H3>
<P>LAMMPS is designed to be a computational kernel for performing
molecular dynamics computations. Additional pre- and post-processing
steps are often necessary to setup and analyze a simulation. A few
additional tools are provided with the LAMMPS distribution and are
described in this section.
</P>
<P>Our group has also written and released a separate toolkit called
<A HREF = "http://www.cs.sandia.gov/~sjplimp/pizza.html">Pizza.py</A> which provides tools for doing setup, analysis,
plotting, and visualization for LAMMPS simulations. Pizza.py is
written in <A HREF = "http://www.python.org">Python</A> and is available for download from <A HREF = "http://www.cs.sandia.gov/~sjplimp/pizza.html">the
Pizza.py WWW site</A>.
</P>
<P>Note that many users write their own setup or analysis tools or use
other existing codes and convert their output to a LAMMPS input format
or vice versa. The tools listed here are included in the LAMMPS
distribution as examples of auxiliary tools. Some of them are not
actively supported by Sandia, as they were contributed by LAMMPS
users. If you have problems using them, we can direct you to the
authors.
</P>
<P>The source code for each of these codes is in the tools sub-directory
of the LAMMPS distribution. There is a Makefile (which you may need
to edit for your platform) which will build several of the tools which
reside in that directory. Some of them are larger packages in their
own sub-directories with their own Makefiles.
</P>
<UL><LI><A HREF = "#amber">amber2lmp</A>
<LI><A HREF = "#binary">binary2txt</A>
<LI><A HREF = "#charmm">ch2lmp</A>
<LI><A HREF = "#chain">chain</A>
<LI><A HREF = "#data">data2xmovie</A>
<LI><A HREF = "#eam">eam generate</A>
<LI><A HREF = "#arc">lmp2arc</A>
<LI><A HREF = "#cfg">lmp2cfg</A>
<LI><A HREF = "#traj">lmp2traj</A>
<LI><A HREF = "#vmd">lmp2vmd</A>
<LI><A HREF = "#matlab">matlab</A>
<LI><A HREF = "#micelle">micelle2d</A>
<LI><A HREF = "#msi">msi2lmp</A>
<LI><A HREF = "#pymol">pymol_asphere</A>
<LI><A HREF = "#pythontools">python</A>
<LI><A HREF = "#restart">restart2data</A>
<LI><A HREF = "#thermo_extract">thermo_extract</A>
<LI><A HREF = "#vim">vim</A>
<LI><A HREF = "#xmovie">xmovie</A>
</UL>
<HR>
<H4><A NAME = "amber"></A>amber2lmp tool
</H4>
<P>The amber2lmp sub-directory contains two Python scripts for converting
files back-and-forth between the AMBER MD code and LAMMPS. See the
README file in amber2lmp for more information.
</P>
<P>These tools were written by Keir Novik while he was at Queen Mary
University of London. Keir is no longer there and cannot support
these tools which are out-of-date with respect to the current LAMMPS
version (and maybe with respect to AMBER as well). Since we don't use
these tools at Sandia, you'll need to experiment with them and make
necessary modifications yourself.
</P>
<HR>
<H4><A NAME = "binary"></A>binary2txt tool
</H4>
<P>The file binary2txt.cpp converts one or more binary LAMMPS dump file
into ASCII text files. The syntax for running the tool is
</P>
<PRE>binary2txt file1 file2 ...
</PRE>
<P>which creates file1.txt, file2.txt, etc. This tool must be compiled
on a platform that can read the binary file created by a LAMMPS run,
since binary files are not compatible across all platforms.
</P>
<HR>
<H4><A NAME = "charmm"></A>ch2lmp tool
</H4>
<P>The ch2lmp sub-directory contains tools for converting files
back-and-forth between the CHARMM MD code and LAMMPS.
</P>
<P>They are intended to make it easy to use CHARMM as a builder and as a
post-processor for LAMMPS. Using charmm2lammps.pl, you can convert an
ensemble built in CHARMM into its LAMMPS equivalent. Using
lammps2pdb.pl you can convert LAMMPS atom dumps into pdb files.
</P>
<P>See the README file in the ch2lmp sub-directory for more information.
</P>
<P>These tools were created by Pieter in't Veld (pjintve at sandia.gov)
and Paul Crozier (pscrozi at sandia.gov) at Sandia.
</P>
<HR>
<H4><A NAME = "chain"></A>chain tool
</H4>
<P>The file chain.f creates a LAMMPS data file containing bead-spring
polymer chains and/or monomer solvent atoms. It uses a text file
containing chain definition parameters as an input. The created
chains and solvent atoms can strongly overlap, so LAMMPS needs to run
the system initially with a "soft" pair potential to un-overlap it.
The syntax for running the tool is
</P>
<PRE>chain < def.chain > data.file
</PRE>
<P>See the def.chain or def.chain.ab files in the tools directory for
examples of definition files. This tool was used to create the
system for the <A HREF = "Section_perf.html">chain benchmark</A>.
</P>
<HR>
<H4><A NAME = "data"></A>data2xmovie tool
</H4>
<P>The file data2xmovie.c converts a LAMMPS data file into a snapshot
suitable for visualizing with the <A HREF = "#xmovie">xmovie</A> tool, as if it had
been output with a dump command from LAMMPS itself. The syntax for
running the tool is
</P>
<PRE>data2xmovie <B>options</B> < infile > outfile
</PRE>
<P>See the top of the data2xmovie.c file for a discussion of the options.
</P>
<HR>
<H4><A NAME = "eam"></A>eam generate tool
</H4>
<P>The tools/eam_generate directory contains several one-file C programs
that convert an analytic formula into a tabulated <A HREF = "pair_eam.html">embedded atom
method (EAM)</A> setfl potential file. The potentials they
produce are in the potentials directory.
</P>
<P>The source files and potentials were provided by Gerolf Ziegenhain
(gerolf at ziegenhain.com).
</P>
<HR>
<H4><A NAME = "arc"></A>lmp2arc tool
</H4>
<P>The lmp2arc sub-directory contains a tool for converting LAMMPS output
files to the format for Accelrys' Insight MD code (formerly
MSI/Biosym and its Discover MD code). See the README file for more
information.
</P>
<P>This tool was written by John Carpenter (Cray), Michael Peachey
(Cray), and Steve Lustig (Dupont). John is now at the Mayo Clinic
(jec at mayo.edu), but still fields questions about the tool.
</P>
<P>This tool was updated for the current LAMMPS C++ version by Jeff
Greathouse at Sandia (jagreat at sandia.gov).
</P>
<HR>
<H4><A NAME = "cfg"></A>lmp2cfg tool
</H4>
<P>The lmp2cfg sub-directory contains a tool for converting LAMMPS output
files into a series of *.cfg files which can be read into the
<A HREF = "http://164.107.79.177/Archive/Graphics/A">AtomEye</A> visualizer. See
the README file for more information.
</P>
<P>This tool was written by Ara Kooser at Sandia (askoose at sandia.gov).
</P>
<HR>
<H4><A NAME = "traj"></A>lmp2traj tool
</H4>
<P>The lmp2traj sub-directory contains a tool for converting LAMMPS output
files into 3 analysis files. One file can be used to create contour
maps of the atom positions over the course of the simulation. The
other two files provide density profiles and dipole moments. See the
README file for more information.
</P>
<P>This tool was written by Ara Kooser at Sandia (askoose at sandia.gov).
</P>
<HR>
<H4><A NAME = "vmd"></A>lmp2vmd tool
</H4>
<P>The lmp2vmd sub-directory contains some scripts for converting LAMMPS
files into formats suitable for visualizing with the <A HREF = "http://www.ks.uiuc.edu/Research/vmd/">VMD
package</A>.
</P>
<P>One script extracts bond topology info from a LAMMPS data file. A
second script attached amino acid (residue) information to what is
extracted from a data file. See the README file for more information.
</P>
<P>These scripts were written by Axel Kohlmeyer (akohlmey at
cmm.chem.upenn.edu) at U Penn.
</P>
<HR>
<H4><A NAME = "matlab"></A>matlab tool
</H4>
<P>The matlab sub-directory contains several <A HREF = "http://www.mathworks.com">MATLAB</A> scripts for
post-processing LAMMPS output. The scripts include readers for log
and dump files, a reader for radial distribution output from the <A HREF = "fix_rdf.html">fix
rdf</A> command, a reader for EAM potential files, and a
converter that reads LAMMPS dump files and produces CFG files that can
be visualized with the
<A HREF = "http://164.107.79.177/Archive/Graphics/A">AtomEye</A> visualizer.
</P>
<P>See the README.pdf file for more information.
</P>
<P>These scripts were written by Arun Subramaniyan at Purdue Univ
(asubrama at purdue.edu).
</P>
<HR>
<H4><A NAME = "micelle"></A>micelle2d tool
</H4>
<P>The file micelle2d.f creates a LAMMPS data file containing short lipid
chains in a monomer solution. It uses a text file containing lipid
definition parameters as an input. The created molecules and solvent
atoms can strongly overlap, so LAMMPS needs to run the system
initially with a "soft" pair potential to un-overlap it. The syntax
for running the tool is
</P>
<PRE>micelle2d < def.micelle2d > data.file
</PRE>
<P>See the def.micelle2d file in the tools directory for an example of a
definition file. This tool was used to create the system for the
<A HREF = "Section_example.html">micelle example</A>.
</P>
<HR>
<H4><A NAME = "msi"></A>msi2lmp tool
</H4>
<P>The msi2lmp sub-directory contains a tool for creating LAMMPS input
data files from Accelrys' Insight MD code (formerly MSI/Biosym and
its Discover MD code). See the README file for more information.
</P>
<P>This tool was written by John Carpenter (Cray), Michael Peachey
(Cray), and Steve Lustig (Dupont). John is now at the Mayo Clinic
(jec at mayo.edu), but still fields questions about the tool.
</P>
<P>This tool may be out-of-date with respect to the current LAMMPS and
Insight versions. Since we don't use it at Sandia, you'll need to
experiment with it yourself.
</P>
<HR>
<H4><A NAME = "pymol"></A>pymol_asphere tool
</H4>
<P>The pymol_asphere sub-directory contains a tool for converting a
LAMMPS dump file that contains orientation info for ellipsoidal
particles into an input file for the <A HREF = "http://pymol.sourceforge.net">PyMol visualization
package</A>.
</P>
<P>Specifically, the tool triangulates the ellipsoids so they can be
viewed as true ellipsoidal particles within PyMol. See the README and
examples directory within pymol_asphere for more information.
</P>
<P>This tool was written by Mike Brown at Sandia.
</P>
<HR>
<H4><A NAME = "pythontools"></A>python tool
</H4>
<P>The python sub-directory contains several Python scripts
that perform common LAMMPS post-processing tasks, like
</P>
<UL><LI>extract thermodynamic info from a log file as columns of numbers
<LI>plot two columns of thermodynamic info from a log file using GnuPlot
<LI>sort the snapshots in a dump file by atom ID
<LI>convert dump files into XYZ, CFG, or PDB format for viz by other packages
</UL>
<P>These are simple scripts built on <A HREF = "http://www.cs.sandia.gov/~sjplimp/pizza.html">Pizza.py</A> modules. See the
README for more info on Pizza.py and how to use these scripts.
</P>
<HR>
<H4><A NAME = "restart"></A>restart2data tool
</H4>
<P>The file restart2data.cpp converts a binary LAMMPS restart file into
an ASCII data file. The syntax for running the tool is
</P>
<PRE>restart2data restart-file data-file (input-file)
</PRE>
<P>Input-file is optional and if specified will contain LAMMPS input
commands for the masses and force field parameters, instead of putting
those in the data-file. Only a few force field styles currently
support this option.
</P>
<P>This tool must be compiled on a platform that can read the binary file
created by a LAMMPS run, since binary files are not compatible across
all platforms.
</P>
<P>Note that a text data file has less precision than a binary restart
file. Hence, continuing a run from a converted data file will
typically not conform as closely to a previous run as will restarting
from a binary restart file.
</P>
<P>If a "%" appears in the specified restart-file, the tool expects a set
of multiple files to exist. See the <A HREF = "restart.html">restart</A> and
<A HREF = "write_restart.html">write_restart</A> commands for info on how such sets
of files are written by LAMMPS, and how the files are named.
</P>
<HR>
<H4><A NAME = "thermo_extract"></A>thermo_extract tool
</H4>
<P>The thermo_extract tool reads one of more LAMMPS log files and
extracts a thermodynamic value (e.g. Temp, Press). It spits out the
time,value as 2 columns of numbers so the tool can be used as a quick
way to plot some quantity of interest. See the header of the
thermo_extract.c file for the syntax of how to run it and other
details.
</P>
<P>This tool was written by Vikas Varshney at Wright Patterson AFB
(vikas.varshney at gmail.com).
</P>
<HR>
<H4><A NAME = "vim"></A>vim tool
</H4>
<P>The files in the tools/vim directory are add-ons to the VIM editor
that allow easier editing of LAMMPS input scripts. See the README.txt
file for details.
</P>
<P>These files were provided by Gerolf Ziegenhain (gerolf at
ziegenhain.com)
</P>
<HR>
<H4><A NAME = "xmovie"></A>xmovie tool
</H4>
<P>The xmovie tool is an X-based visualization package that can read
LAMMPS dump files and animate them. It is in its own sub-directory
with the tools directory. You may need to modify its Makefile so that
it can find the appropriate X libraries to link against.
</P>
<P>The syntax for running xmovie is
</P>
<PRE>xmovie <B>options</B> dump.file1 dump.file2 ...
</PRE>
<P>If you just type "xmovie" you will see a list of options. Note that
by default, LAMMPS dump files are in scaled coordinates, so you
typically need to use the -scale option with xmovie. When xmovie runs
it opens a visualization window and a control window. The control
options are straightforward to use.
</P>
<P>Xmovie was mostly written by Mike Uttormark (U Wisconsin) while he
spent a summer at Sandia. It displays 2d projections of a 3d domain.
While simple in design, it is an amazingly fast program that can
render large numbers of atoms very quickly. It's a useful tool for
debugging LAMMPS input and output and making sure your simulation is
doing what you think it should. The animations on the Examples page
of the <A HREF = "http://lammps.sandia.gov">LAMMPS WWW site</A> were created with xmovie.
</P>
<P>I've lost contact with Mike, so I hope he's comfortable with us
distributing his great tool!
</P>
</HTML>

Event Timeline