Lammps to Votca

620 views
Skip to first unread message

Sacha Mould

unread,
Jun 21, 2011, 5:47:00 AM6/21/11
to votca
Hi all,

i wonder if someone already runned votca from Lammps atomistic dump
files.Lammps is capable to dump .xtc trajectory file, but i'm having
problems to get the .tpr file in order to obtain coarsed-grained .top
and .gro files using csg_map and csg_gmxtopol commands. I'm interested
to run IBI and IMC simulations and i'm using Votca 1.1.2 release.

I appreciate if someone can give me a tip.

Many regards,


Sacha

Victor Ruehle

unread,
Jun 21, 2011, 6:26:30 AM6/21/11
to vo...@googlegroups.com
Dear Sacha,

it would be good to know a bit more about your system to evaluate
which is the simplest way (how complex is your molecule on
coarse-grained level?). You will be able to parse your lammps
trajectories and use them as a topolgoy, but using lammps for the
iterative process would require some modifications of the scripts.

VOTCA supports reading of lammps trajectories, if you name them with
the ending .dump. These can also be used as topologies by specifying
an additional xml file. I tested it using the following in the lammps
script:

dump id all custom 100 system.dump x y z fx fy fz (forces are optional)

This can be used directly as trajectory, but for a topology and
additional file specifying the molecule information is necessary. If
you want to use that as a topology, you'lll have to specify an
additional xml file topol.xml where molecules and names are specified
(in the manual is a similar example using a pdb file).
<topology base="system.dump">
<molecules>
<clear/>
<define name="water" first="1" nbeads="3" nmols="1000"/>
</molecules>
</topology>

then you can use e.g:
csg_map --top topol.xml --trj system.dump --cg bla.xml ...

To summarize: the missing bit is this xml file, you can use .pdb,
.dump, .tpr as base files. Lammps can probably directly write molecule
information. I didn't had it in my example and am not so familiar with
lammps, so it's not implemented yet. Be aware that csg_gmxtopol will
require some manual adjustments of the topology file.

If you want to use IBI or IMC: the scripts to run lammps simulations
are not yet implemented since we didn't use it here. One way is to run
the iterative procedure using gromacs (which should not be hard to
setup and i can guide you to a proper example depending on your
coarsee-grained topology). Otherwise, if you want to use lammps for
coarse-grained iterations (it needs to support tabulated potentials
then), you'll have to modify a few scripts (~ 3 scripts and maybe 30
lines of code).

Let me know which way you would prefer and we can post further details
how to proceed.

Cheers,
Victor


2011/6/21 Sacha Mould <sach...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "votca" group.
> To post to this group, send email to vo...@googlegroups.com.
> To unsubscribe from this group, send email to votca+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/votca?hl=en.
>
>

Sacha Mould

unread,
Jun 22, 2011, 9:27:12 AM6/22/11
to votca
Dear Victor,

first of all appreciate your help. I followed the steps you told me.
My atomistic system consists on 20 polyethylene molecules with 50
repeating units per molecule, and i want to map 5 PE monomers per bead
in order to produce chains with 10 beads. Since lammps dump files
doesn't give the information of atom names necessary to identify each
atom on the .xml mapping file, i decided to use a .pdb file. In this
case, my topol.xml file looks like this:

<topology base="PE_50CRU_20.pdb">
<molecules>
<clear/>
<define name="PE" first="1" nbeads="302" nmols="20"/>
</molecules>
</topology>

Then, using topol.xml, lammps dump file, and .xml mapping file, i
managed to generate my coarse-grained trajectory file, doing:

csg_map --top topol.xml --trj PE.dump --cg cg_polyethylene.xml --out
cg.gro

In order to create my coarse-grained topology file i did:

csg_gmxtopol --top topol.xml --cg_polyethylene.xml --out topol.top

Until now everything seems to work fine, although when i check cg.gro
file using VMD ijust get unconnected dots instead of chains with 10
beads. Is it normal?
The <cg_bonded> section of my mapping file looks like:

<cg_bonded>
<bond>
<name>bond</name>
<beads>
A1 B1
B1 B2
B2 B3
B3 B4
B4 B5
B5 B6
B6 B7
B7 B8
B8 A2
</beads>
</bond>

<angle>
<name>angle</name>
<beads>
A1 B2 B3
B2 B3 B4
B3 B4 B5
B4 B5 B6
B5 B6 B7
B6 B7 B8
B7 B8 A2
</beads>
</angle>
</cg_bonded>

Type-A and type-B beads stand for terminal and non-terminal chain
beads.

The coarse-grained trajectory file generated by csg_map looks like:

what a nice title
200
1PE A1 1 11.118 11.032 6.797
1PE B1 2 10.887 11.697 5.624
1PE B2 3 16.129 10.913 5.547
1PE B3 4 15.321 10.929 5.524
1PE B4 5 24.939 17.177 4.864
1PE B5 6 16.785 8.389 6.152
1PE B6 7 18.330 10.342 5.144
1PE B7 8 18.497 8.256 5.028
1PE B8 9 17.382 12.321 6.009
1PE A2 10 18.825 11.597 4.970
2PE A1 11 24.037 17.481 5.708
2PE B1 12 23.682 19.766 5.909
2PE B2 13 25.950 18.976 5.891
2PE B3 14 26.427 22.298 5.572
2PE B4 15 23.541 17.518 6.789
2PE B5 16 30.227 17.888 6.137
2PE B6 17 32.363 17.257 4.913
2PE B7 18 36.061 19.905 5.503
2PE B8 19 37.420 19.406 5.820
2PE A2 20 34.601 19.822 5.938
........
........
20PE A1 191 31.065 26.259 39.018
20PE B1 192 32.454 27.239 38.932
20PE B2 193 35.126 29.266 38.107
20PE B3 194 28.876 27.833 38.815
20PE B4 195 35.476 28.096 39.252
20PE B5 196 34.333 29.888 39.837
20PE B6 197 21.535 23.948 38.469
20PE B7 198 18.205 35.272 38.868
20PE B8 199 16.173 31.577 39.521
20PE A2 200 8.468 35.507 38.068
0.00000 0.00000 0.00000

And the coarse-grained topology file generated by csg_gmxtopol, looks
like:

[ moleculetype ]
PE 3

[atoms]
; nr type resnr residue atom cgnr charge mass
1 A 1 RES A1 1 0.000000 0.000000
2 B 1 RES B1 2 0.000000 0.000000
3 B 1 RES B2 3 0.000000 0.000000
4 B 1 RES B3 4 0.000000 0.000000
5 B 1 RES B4 5 0.000000 0.000000
6 B 1 RES B5 6 0.000000 0.000000
7 B 1 RES B6 7 0.000000 0.000000
8 B 1 RES B7 8 0.000000 0.000000
9 B 1 RES B8 9 0.000000 0.000000
10 A 1 RES A2 10 0.000000 0.000000


[ bonds ]
1 2 1 ; 1:bond:1
2 3 1 ; 1:bond:2
3 4 1 ; 1:bond:3
4 5 1 ; 1:bond:4
5 6 1 ; 1:bond:5
6 7 1 ; 1:bond:6
7 8 1 ; 1:bond:7
8 9 1 ; 1:bond:8
9 10 1 ; 1:bond:9

[ angles ]
1 3 4 1 ; 1:angle:1
3 4 5 1 ; 1:angle:2
4 5 6 1 ; 1:angle:3
5 6 7 1 ; 1:angle:4
6 7 8 1 ; 1:angle:5
7 8 9 1 ; 1:angle:6
8 9 10 1 ; 1:angle:7

After taking a look on the files generated i cannot see any problem,
but i wonder why i cannot see chains on VMD.
Concerning the package to run the iterative proceedure i'm pretending
to use gromacs.

Thanks so much for your help.

All the best,

Sacha
> 2011/6/21 Sacha Mould <sacha...@gmail.com>:

Mara Jochum

unread,
Jun 22, 2011, 11:24:52 AM6/22/11
to vo...@googlegroups.com
Dear Sacha,

I guess your question boils down to this:


> Until now everything seems to work fine, although when i check cg.gro
> file using VMD ijust get unconnected dots instead of chains with 10
> beads. Is it normal?

This is normal. VMD draws bonds according to a standard cutoff. So if you don't see them in your cg.gro, this just means that the distances between your CG beads is larger than that value.

If you still want to see the bonds, you can either:

(1) Create and load an additional file (PSF) which contains the connectivity

or

(2) Use the "dynamic bonds" representation as described below:
http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/2797.html

Hope this helps,

- Mara


Sacha Mould

unread,
Jun 22, 2011, 1:14:36 PM6/22/11
to votca
Thanks a lot Mara!!!

Many regards,

Sacha Mould

unread,
Jul 4, 2011, 6:02:23 AM7/4/11
to votca

Hi all,

i would like to know which information i need to store on my .top file
in order to run inverse iterative processes using Gromacs. I've used
csg_gmxtopol command to generate a coarse-grained .top file
(csg_gmxtopol --top topol.xml --cg mapping.xml --out cgtopol.top), but
after starting the iterative process (csg_inverse setting.xml),
Gromacs through me an error:

Fatal error:
Syntax error - File topol.top, line 7
Last line read:
'[ atomtypes ]'
Invalid order for directive atomtypes
For more information and tips for troubleshooting, please check the
GROMACS
website at http://www.gromacs.org/Documentation/Errors

I configured .top file of my system with the same sections showed on
the propane tutorial, but is still giving error the same type of
error. The information that i'm giving are [default] [atomtypes]
[moleculetype] [atoms] [bonds] [angles] and [molecules].

I wonder if someone can help me.

Thanks so much in advance.

All the best,

Sacha

Christoph Junghans

unread,
Jul 4, 2011, 6:19:45 AM7/4/11
to vo...@googlegroups.com
Hi Sacha,

see the cg hexane
<http://code.google.com/p/votca/source/browse/hexane/ibi/topol.top?repo=tutorials>
or cg spc/e
<http://code.google.com/p/votca/source/browse/spce/ibi/topol.top?repo=tutorials>
topology as an example.

Before I execute csg_inverse, I normally do a sanity check by run
grompp in the IBI main directory.
It should give no error message. Then I execute mdrun, which should
fail with an error like
"table_CG_CG.xvg not found". The missing table will later be generated by VOTCA,
see the gromacs.table option inside interaction block of your xml setting file.

Remember that the common table "table.xvg" needs to be generated
somehow and added to the filelist by you.

Cheers,

Christoph

2011/7/4 Sacha Mould <sach...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "votca" group.
> To post to this group, send email to vo...@googlegroups.com.
> To unsubscribe from this group, send email to votca+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/votca?hl=en.
>
>

--
Dr. Christoph Junghans
Votca Core Developer

Web: http://www.votca.org

Sacha Mould

unread,
Jul 14, 2011, 5:56:00 AM7/14/11
to votca
I appreciate Christoph Now votca runs smoothly.

All the best!!!

Sacha

On Jul 4, 11:19 am, Christoph Junghans <jungh...@votca.org> wrote:
> Hi Sacha,
>
> see the cg hexane
> <http://code.google.com/p/votca/source/browse/hexane/ibi/topol.top?rep...>
> or cg spc/e
> <http://code.google.com/p/votca/source/browse/spce/ibi/topol.top?repo=...>
> topology as an example.
>
> Before I execute csg_inverse, I normally do a sanity check by run
> grompp in the IBI main directory.
> It should give no error message. Then I execute mdrun, which should
> fail with an error like
> "table_CG_CG.xvg not found". The missing table will later be generated by VOTCA,
> see the gromacs.table option inside interaction block of your xml setting file.
>
> Remember that the common table "table.xvg" needs to be generated
> somehow and added to the filelist by you.
>
> Cheers,
>
> Christoph
>
> 2011/7/4 Sacha Mould <sacha...@gmail.com>:
>
>
>
>
>
> > Hi all,
>
> > i would like to know which information i need to store on my .top file
> > in order to run inverse iterative processes using Gromacs. I've used
> > csg_gmxtopol command to generate a coarse-grained .top file
> > (csg_gmxtopol --top topol.xml --cg mapping.xml --out cgtopol.top), but
> > after starting the iterative process (csg_inverse setting.xml),
> > Gromacs through me an error:
>
> > Fatal error:
> > Syntax error - File topol.top, line 7
> > Last line read:
> > '[ atomtypes ]'
> > Invalid order for directive atomtypes
> > For more information and tips for troubleshooting, please check the
> > GROMACS
> > website athttp://www.gromacs.org/Documentation/Errors
>
> > I configured .top file of my system with the same sections showed on
> > the propane tutorial, but is still giving error the same type of
> > error. The information that i'm giving are [default] [atomtypes]
> > [moleculetype] [atoms] [bonds] [angles] and [molecules].
>
> > I wonder if someone can help me.
>
> > Thanks so much in advance.
>
> > All the best,
>
> > Sacha
>
> > --
> > You received this message because you are subscribed to the Google Groups "votca" group.
> > To post to this group, send email to vo...@googlegroups.com.
> > To unsubscribe from this group, send email to votca+un...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/votca?hl=en.

Vitalie Botan

unread,
Jun 4, 2014, 9:52:04 AM6/4/14
to vo...@googlegroups.com
Dear Victor,

I am trying to coarse grain my atomistic trajectory calculated in Lammps and follow your instructions, but the dump file saved as you suggested will:
a) have no atoms ids/types/molecular id;
b) store coordinates in angstroms (if real units were used in the atomistic simulation) and have normally the box centered around the origin.

Are there any setting or options to take into all these points or I have to take care about them when exporting from Lammps?

Best,
Vitalie  

Christoph Junghans

unread,
Jun 4, 2014, 10:36:02 AM6/4/14
to vo...@googlegroups.com
2014-06-04 7:52 GMT-06:00 Vitalie Botan <vitali...@gmail.com>:
> Dear Victor,
>
> I am trying to coarse grain my atomistic trajectory calculated in Lammps and
> follow your instructions, but the dump file saved as you suggested will:
> a) have no atoms ids/types/molecular id;
> b) store coordinates in angstroms (if real units were used in the atomistic
> simulation) and have normally the box centered around the origin.
>
> Are there any setting or options to take into all these points or I have to
> take care about them when exporting from Lammps?
You are replying to an email, which is close to 3 years old, a lot of
things have changed since then.

Concerning your questions:
a.) You will need to create an xml topology to group atoms into molecules, see:
<https://code.google.com/p/votca/source/browse/spce/ibi_lammps/topol.xml?repo=csg-tutorials>
b.) VOTCA calculates in nm internally, but because as lammps supports
too many units systems, we don't touch the units in the case of
LAMMPS.
Anyhow the units won't change if you convert to the same file type
(e.g. dump to dump), only if you convert dump to pdb you have to be
careful.
b2.) VOTCA just maps the coordinates (using pbc), so a centered
trajectory will be mapped to a centered coarse-grained trajectory
(just like in the case of gromacs files).

Christoph
> To unsubscribe from this group and stop receiving emails from it, send an
> email to votca+un...@googlegroups.com.
>
> To post to this group, send email to vo...@googlegroups.com.
> Visit this group at http://groups.google.com/group/votca.
> For more options, visit https://groups.google.com/d/optout.



--
Christoph Junghans
Web: http://www.compphys.de
Reply all
Reply to author
Forward
0 new messages