[lammps-users] LAMMPS - creating input files from DL_POLY

I have been using DL_POLY to conduct molecular dynamics simulations on hydrocarbon oil systems.

I have been using ArgusLab to build my hydrocarbon chains, Packmol to pack my simulation cell and then use the DREIDING force field built into DL_POLY, to produce my FIELD file which details parameters for the different bond, angles, dihedrals etc. in my system.

I am now moving from DL_POLY to use LAMMPS, as I am interested in looking at non-equilibrium MD, by analysing viscosity of my oil under shear conditions. I have no previous experience on LAMMPS. I was wondering if there was any easy way to take my existing DL_POLY input files (FIELD with force field parameters, CONFIG with XYZ coordinates) and convert them into a LAMMPS data file that I can read in using the "read_data" command.

Alternatively, could anyone recommend any software that would allow me to produce such files from XYZ coordinates, using the DREIDING force field as I am currently having difficulty assigning the individual parameters required.
Or, even a sample LAMMPS data file for a simple alkane would be helpful, to allow me to analyse the correct input format.

Thank You,
Michael Doig

I'm not familiar with the FIELD format for DL_POLY. LAMMPS
has several conversion tools in its tools dir, e.g. for CHARMM to LAMMPS
and MSI to LAMMPS. If you can write (or convert) your files to
those formats, you might have some luck with those tools. The LAMMPS
format in read_data is very simple. You just need to list the
bonds, angles, etc, assign a "type", and lsit the force field coeffs
for each type.
If you can extract this info from your FIELD file, it would be simple
to format it for LAMMPS input, expecially for alkanes, which typically
only define a small number of these terms.

Steve

I am still having some problems. I have written code to convert the from my DL_POLY files to LAMMPS format, but I am having difficulty with the molecular atom_style format.

Would some please be able to email me a sample LAMMPS input and data file for a molecular system. Any simple molecule would be fine, but an alkane would be ideal. I am sturggling to follow information in the manual, and none of the supplied examples have anything with a molecular atom_style.

Additionally,
In DL_POLY multi-molecule system (but only one molecular type), the parameters for the bonds, angles, dihedrals only had to be specified for one molecule, and these parameters were implicit for all other molecules in the system.
    (i.e for a 10 atom molecule - all the parameters were defined for atoms 1 to 10, and were implicitly defined for all other molecules. e.g atom 1 = atom 11, atom 2 = atom 12,.. , up to n atoms/molecules). I am unsure if it is possible to do the same in LAMMPS, or each if parameter for each atom in identical molecules has to be explicitly stated.

Thank You,
Michael Doig

Steve Plimpton wrote:

hi michael,

I am still having some problems. I have written code to convert the from
my DL_POLY files to LAMMPS format, but I am having difficulty with the
molecular atom_style format.

Would some please be able to email me a sample LAMMPS input and data
file for a molecular system. Any simple molecule would be fine, but an
alkane would be ideal. I am sturggling to follow information in the
manual, and none of the supplied examples have anything with a molecular
atom_style.

just pick one example with "full". the difference between those is
the charge. the documentation for read_data is very detailed and
explains the data file format very well. you may have to read it again.

Additionally,
In DL_POLY multi-molecule system (but only one molecular type), the
parameters for the bonds, angles, dihedrals only had to be specified
for one molecule, and these parameters were implicit for all other
molecules in the system.
(i.e for a 10 atom molecule - all the parameters were defined for
atoms 1 to 10, and were implicitly defined for all other molecules. e.g
atom 1 = atom 11, atom 2 = atom 12,.. , up to n atoms/molecules). I am
unsure if it is possible to do the same in LAMMPS, or each if parameter
for each atom in identical molecules has to be explicitly stated.

everything is explicit in LAMMPS.

i have written some scripts for VMD that allow that kind of
manipulations from within VMD (which can read DL_POLY
data, IIRC), that might be helpful in that process.

http://www.ks.uiuc.edu/Research/vmd/plugins/topotools/
http://sites.google.com/site/akohlmey/software/topotools

the most similar feature, is not yet documented as it is still
being adjusted for our needs. check out the topocgcmm.tcl
file. i am using those to read parametes and topology information
for single molecules to apply them to large systems where i
have many molecules and then write out a lammps style
topology file with topo writelammps data (which supports
most standard atoms_styles in LAMMPS).

i can provide an example script that use the topology assignment,
if you want to go this route.

cheers,
   axel.

none of the supplied examples have anything with a molecular
atom_style.

examples/peptide/data.peptide

Steve

Dear Axel,

You replied to my email before regarding creating input files for LAMMPS and directed me towards your topotools scripts.
You said you could provide me with an example input script for this which would be useful.

At the moment when I load my amorphous system into VMD and write the LAMMPS data, its outputs list of atoms and xyz coords, and a list of bonds.
But it produces no information on the angles or dihedrals in the system.

I tried the guessangles / guessdihedrals commands but it doesn't seem to do anything.

Would I just have to start with a single molecule, assign these parameters manually and then replicate the molecule to build up my amorphous system, or is there an alternative way of generating a list of all the bonds, angles, dihedrals and impropers from a starting xyz coordinates.

Kind Regards,
Michael Doig

Axel Kohlmeyer wrote:

Dear Axel,

hi michael,

You replied to my email before regarding creating input files for LAMMPS
and directed me towards your topotools scripts.
You said you could provide me with an example input script for this
which would be useful.

ok. i will send this to you in a separate mail. no need to spam
the list with unfinished code.

At the moment when I load my amorphous system into VMD and write the
LAMMPS data, its outputs list of atoms and xyz coords, and a list of bonds.
But it produces no information on the angles or dihedrals in the system.

I tried the guessangles / guessdihedrals commands but it doesn't seem to
do anything.

well, it _does_ do something, the question is how you determine
that it doesn't work. but without any more specific details or
a way to reproduce what you did, it is difficult to explain what
went wrong. "it doesn't work" or "it has no effect" is pretty much
useless without the context. :wink:

Would I just have to start with a single molecule, assign these
parameters manually and then replicate the molecule to build up my
amorphous system, or is there an alternative way of generating a list of
all the bonds, angles, dihedrals and impropers from a starting xyz
coordinates.

if you are working with classical forcefields you have to keep in mind,
that the topology (atom type, bonding patterns, angles, and so on) and
the coordinates can be processed independently, for as long as the
identity of atoms is preserved. so if you have the bonding for one
molecule, you can replicate it easily. in VMD you'd do something like
the following (this is off the top of my head, so please excuse typos):

package require topotools 1.0
set mol1 [topo readlammpsdata full data.single]
set sel1 [atomselect $mol1 all]
set mol2 [mol new bulk.xyz]
set sel2 [atomselect $mol2 all]

set nmols [expr {[$sel2 num] / [$sel1 num]}]
set atoms [$sel1 num]

set oldbonds [topo getbondlist type -molid $mol1 -sel $sel1]
set newbonds {}
for {set i 0} {$i < $nmols} {incr i} {
   set offs [expr {$i*$atoms}]
   foreach b $oldbonds {
     lassign $b b1 b2 t
     lappend newbonds [list [expr {$b1+$offs}] [expr {$b2+$offs}] $t]
   }
}
topo setbondlist type -molid $mol2 -sel $sel2

you can add similar loops for angles, dihedrals, impropers as needed.
the example script that i'm going to send you will instead grab the
single molecule information from a data base file. the principle is
always the same, though.

HTH,
   axel.