Understanding the Data File

Dear all,

I intend to simulate a polymer chain in aqueous solution. My system contains C, N, O, H atoms for polymer and water. I have made its data file using msi2lmp tool under pcff force field. I have copied the initial parts of the data file in the following.

Several types of C, O, H are presented in the data file. How can I determine which one is which in the structure? Shouldn’t they have any ID?

For example, I want to use “fix shake” command for water molecules, but I don’t know which bond type is attributed to O-H bonds in water molecules, so that I can use in the shake command. I also cannot recognize which atom type or angle type is related to each atom or angle.

.
.
.

LAMMPS 2005 data file for Polymer-Water

4394 atoms
3119 bonds
2354 angles
1551 dihedrals
660 impropers

10 atom types
13 bond types
28 angle types
40 dihedral types
20 improper types

-10.000000000 35.000000000 xlo xhi
-10.000000000 35.000000000 ylo yhi
-10.000000000 80.000000000 zlo zhi

Masses

1 1.007970
2 12.011150
3 12.011150
4 12.011150
5 14.010000
6 15.999400
7 12.011150
8 1.008000
9 15.999400
10 1.007970

Pair Coeffs

1 0.0200000000 2.9950000000
2 0.0540000000 4.0100000000
3 0.0540000000 4.0100000000
4 0.1200000000 3.8100000000
5 0.1060000000 3.6000000000
6 0.2670000000 3.3000000000
7 0.0540000000 4.0100000000
8 0.0130000000 1.6500000000
9 0.2740000000 3.6080000000
10 0.0130000000 1.0980000000

Bond Coeffs

1 1.1010 345.0000 -691.8900 844.6000
2 1.5300 299.6700 -501.7700 679.8100

.
.
.
.
.

Thank You :slight_smile:

LAMMPS doesn’t need the info you are talking about
so it isn’t in the data file. I would look thru the atom list
and find an obvious water molecule, e.g. one O followed
by 2 H, and infer the bond types, angle type from that.

Maybe others more familiar with msi2lmp output will
have a better suggestion. Any bio force field
will have similar issues. There are lots of C and O atom
types.

Steve

LAMMPS doesn't need the info you are talking about
so it isn't in the data file. I would look thru the atom list
and find an obvious water molecule, e.g. one O followed
by 2 H, and infer the bond types, angle type from that.

Maybe others more familiar with msi2lmp output will
have a better suggestion. Any bio force field

​i'll have to have a look, if it is possible to include additional
information as comments in the same way as topotools in ​VMD does it. it
indeed does help a lot matching the data file with the input and thus would
be a desirable feature.

​axel.​

Dear all,

I intend to simulate a polymer chain in aqueous solution. My system
contains C, N, O, H atoms for polymer and water. I have made its data file
using msi2lmp tool under pcff force field. I have copied the initial parts
of the data file in the following.

Several types of C, O, H are presented in the data file. How can I
determine which one is which in the structure? Shouldn't they have any ID?

​as steve already explained​, LAMMPS doesn't require it. however, the data
file format can have comments and that is where this kind of information
could be inserted.

For example, I want to use "fix shake" command for water molecules, but I
don't know which bond type is attributed to O-H bonds in water molecules,
so that I can use in the shake command. I also cannot recognize which atom
type or angle type is related to each atom or angle.

.
.
.

LAMMPS 2005 data file for Polymer-Water

​this line indicates that you are using an outdated version of msi2lmp that
has some known serious (and by now fixed) bugs.​

i just updated the msi2lmp code in LAMMPS-ICMS to print out such style
hints. i sent the changes to steve, so it will soon be in the official
LAMMPS sources, but in the meantime, you can download the sources from
here:
http://git.lammps.org/git/?p=lammps-icms.git;a=tree;f=tools/msi2lmp;hb=HEAD
or get precompiled executables from http://rpm.lammps.org or
http://rpm.lammps.org/windows.html

the data file for a benzene molecule with this version of msi2lmp will look
like this:

LAMMPS data file. msi2lmp v3.9.5 / 27 May 2014 / CGCMM for benzene-class1

     12 atoms
     12 bonds
     18 angles
     24 dihedrals
      6 impropers

   2 atom types
   2 bond types
   2 angle types
   3 dihedral types
   1 improper types

    -0.014180000 9.985820000 xlo xhi
    -0.000000000 10.000000000 ylo yhi
   -10.000000000 0.000000000 zlo zhi

Masses

   1 1.007970 # h
   2 12.011150 # cp

Pair Coeffs # lj/cut/coul/long

   1 0.0380000011 2.4499714540 # h
   2 0.1479999981 3.6170487995 # cp

Bond Coeffs # harmonic

   1 363.4164 1.0800 # h-cp
   2 480.0000 1.3400 # cp-cp

Angle Coeffs # harmonic

   1 37.0000 120.0000 # h-cp-cp
   2 90.0000 120.0000 # cp-cp-cp

Dihedral Coeffs # harmonic

  1 3.0000 -1 2 # h-cp-cp-cp
  2 3.0000 -1 2 # h-cp-cp-h
  3 3.0000 -1 2 # cp-cp-cp-cp

Improper Coeffs # cvff

    1 0.3700 -1 2 # h-cp-cp-cp

Atoms # full

      1 1 1 0.102000 2.500000000 5.000000000
-5.000000000 0 0 0 # h
      2 1 2 -0.102000 3.594720000 5.000000000
-5.000000000 0 0 0 # cp
      3 1 2 -0.102000 4.290270000 6.204730000
-5.000000000 0 0 0 # cp
      4 1 2 -0.102000 5.681370000 6.204730000
-5.000000000 0 0 0 # cp
      5 1 2 -0.102000 6.376920000 5.000000000
-5.000000000 0 0 0 # cp
      6 1 2 -0.102000 5.681370000 3.795270000
-5.000000000 0 0 0 # cp
      7 1 2 -0.102000 4.290270000 3.795270000
-5.000000000 0 0 0 # cp

[...]

In addition to Axel and Steve's suggestions, have you tried looking at
the DATA file (visually)?

You should be able to tell which atoms belong to a water molecule just
by looking at them, next to their atomIDs. VMD can print out the
atom-ID number (and the molecule-ID number) when you click on an atom.
(See below.) The AtomID is the 1st column in the Atoms section) of
the data file (You have to add 1 to these numbers. See below.)
Knowing that you can lookup the atom-Type number (3rd column in the
Atoms section), and figure out which atom types correspond to oxygen
and hydrogen water atoms.
... Those same atom-IDs, (again add 1) should appear in the various
"Bonds" and "Angles" sections in the data file. By looking (in the
"Bonds" section) for a bond connecting a waterOxygen to a
waterHydrogen, you can tell what type nuber it is (2nd column). Use
that number in your "fix shake" command. Do the same thing for the
angles.

--- instructions for VMD/topotools ---

I am assuming you are using linux or mac and launching VMD from a
terminal window. (I have no idea how to help you if you use windows.
But these instructions probably work in windows too. I don't
recommend windows for this kind of work.)

Anyway, launch VMD by typing "vmd" into the terminal.
Then select the "Extensions"->"Tk Console" menu option, and type this
into the terminal

topo readlammpsdata FILE.DATA full

#### these commands also useful: ####
# pbc wrap -compound res -all
# pbc box
# animate write psf FILE.psf

To learn the atomID number of an atom, press the % key (shift-5 on an
american keyboard), and then click on individual atoms. In the
terminal window from which you launched VMD, each time you click on an
atom, it will print out the atom-ID number minus one, and the
molecule-ID number (...called ResID in VMD. You will have to add 1,
because atom indexing in VMD begins at 0 instead of 1.)

Hope this helps.

Andrew