Re: [votca] Problem with writing force from Lammps .dump dile by using csg_map -- force

78 views
Skip to first unread message

Christoph Junghans

unread,
Jun 25, 2019, 11:14:32 AM6/25/19
to vo...@googlegroups.com
On Tue, Jun 25, 2019 at 7:00 AM 徐祥 <xx.xi...@gmail.com> wrote:
>
> Dear Votca user,
>
> I want to use csg_map to print out the coarse grained .dump file and then using force matching with fix mscg in LAMMPS. But something strange happened in the output file with fz part.
> At the same time, I'm not sure whether the force in x and y direction are correct or not.
>
> I'd really appriciate when anyone can give me advices on how to write the force out to coarse grained dump file.
Are the cg positions in the right spots? Have you tried to calculate
the force by hand for one molecule to check the output?

Christoph

> Sincerely
> Xiang
>
> Command that I used: csg_map --top topol.xml --trj equil.dump --cg pa6.xml --force --out cg-pa6.dump
>
> cg-pa6.dump:
> ITEM: TIMESTEP
> 0
> ITEM: NUMBER OF ATOMS
> 14
> ITEM: BOX BOUNDS pp pp pp
> 0 7.580733
> 0 7.580733
> 0 7.580733
> ITEM: ATOMS id type x y z vx vy vz fx fy fz
> 1 0 1.494355 5.404279 2.907944 0.000000 0.000000 0.000000 12.592400 -8.377850 2364558032109094518889807635948683089570290241435415640820108792995599899436389788035156285502740606890601998922988529557877069609479960232025272358933154586821185153955592591638528.000000
> 2 1 2.243347 4.295022 4.439319 0.000000 0.000000 0.000000 13.479409 20.502260 0.000000
> 3 1 2.189802 5.142636 5.923261 0.000000 0.000000 0.000000 3.866210 -23.597252 0.000000
> 4 1 3.512938 6.026377 6.282445 0.000000 0.000000 0.000000 -9.861500 19.987040 0.000000
> 5 1 3.926211 7.069904 5.005361 0.000000 0.000000 0.000000 9.756520 -4.570800 0.000000
> 6 1 3.486172 0.987056 5.492920 0.000000 0.000000 0.000000 -3.419280 -4.679090 0.000000
> 7 2 4.307480 1.466052 6.723431 0.000000 0.000000 0.000000 -2.598060 -8.584390 0.000000
> 8 0 5.289278 4.682029 2.350134 0.000000 0.000000 0.000000 -14.249870 19.920390 0.000000
> 9 1 5.789601 4.273695 4.227886 0.000000 0.000000 0.000000 17.436400 -18.399210 0.000000
> 10 1 6.045801 2.682748 4.436048 0.000000 0.000000 0.000000 -26.629610 23.138802 0.000000
> 11 1 7.252864 2.148874 3.534152 0.000000 0.000000 0.000000 18.012220 -4.469040 0.000000
> 12 1 0.184249 0.859154 4.367202 0.000000 0.000000 0.000000 24.419730 -7.101160 0.000000
> 13 1 0.196048 0.857591 6.080679 0.000000 0.000000 0.000000 -14.616470 15.636000 0.000000
> 14 2 0.946176 2.051363 6.933684 0.000000 0.000000 0.000000 -28.187900 -19.405670 0.000000
>
> --
> You received this message because you are subscribed to the Google Groups "votca" group.
> 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 https://groups.google.com/group/votca.
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/e686097e-e5d2-4ca0-8111-0d844c53553c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Christoph Junghans
Web: http://www.compphys.de

徐祥

unread,
Jun 27, 2019, 10:23:36 AM6/27/19
to votca
Hi Christoph,

I checked my input file for atomistic simulation and I found that I have wrote 'fx fy fy' for dump command and now all calculations run well. Thank you very much for your suggestion. 

I have another question about a big PA6 system with around 500 000 atoms. There is only one type molecule which composes of 350 monomers. When I want use lammps dump file to write out the coarse grained dump file, I need to manually to redefine every atoms in one molecule in the topol.xml file. It seems to be a big project.I am wondering, if there is a simpler method to get topol.xml file. Or can you give me some suggestion about how to get coarse grained trajectory from lammps dump file?


在 2019年6月25日星期二 UTC+2下午5:14:32,Christoph Junghans写道:
> To unsubscribe from this group and stop receiving emails from it, send an email to vo...@googlegroups.com.

Christoph Junghans

unread,
Jun 27, 2019, 11:19:15 AM6/27/19
to vo...@googlegroups.com
On Thu, Jun 27, 2019 at 8:23 AM 徐祥 <xx.xi...@gmail.com> wrote:
>
> Hi Christoph,
>
> I checked my input file for atomistic simulation and I found that I have wrote 'fx fy fy' for dump command and now all calculations run well. Thank you very much for your suggestion.
>
> I have another question about a big PA6 system with around 500 000 atoms. There is only one type molecule which composes of 350 monomers. When I want use lammps dump file to write out the coarse grained dump file, I need to manually to redefine every atoms in one molecule in the topol.xml file. It seems to be a big project.I am wondering, if there is a simpler method to get topol.xml file. Or can you give me some suggestion about how to get coarse grained trajectory from lammps dump file?
>
You can use the stock tool, http://stock.cmm.ki.si/smt/, but I usually
write a small script to write the mapping files for bigger molecules.

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 https://groups.google.com/group/votca.
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/48c207bc-6594-4299-80c5-63efed1f5a70%40googlegroups.com.

徐祥

unread,
Jul 11, 2019, 11:45:30 AM7/11/19
to votca
Hi Christoph,

Now I can get the topol.xml through a script. But for my test system of polyamide with 5 monomer, when I use csg_map --top topol.xml --cg pa6.xml --trj chemistry.dump --out cg-pa6.dump, there was a error: 

coarse-grained bead is bigger than half the box 
 (atoms 8 (id 46), 17 (id 55) , molecule 1)
 
as I checked in OVITO, these two atoms are not in one bead. Is that because of periodic boundary condition? I would really appreciate when you could give me any advices.

Sincerely,
Xiang

在 2019年6月27日星期四 UTC+2下午5:19:15,Christoph Junghans写道:
chemistry.dump
pa6.xml
topol.xml

Christoph Junghans

unread,
Jul 11, 2019, 11:54:08 AM7/11/19
to vo...@googlegroups.com
On Thu, Jul 11, 2019 at 9:45 AM 徐祥 <xx.xi...@gmail.com> wrote:
>
> Hi Christoph,
>
> Now I can get the topol.xml through a script. But for my test system of polyamide with 5 monomer, when I use csg_map --top topol.xml --cg pa6.xml --trj chemistry.dump --out cg-pa6.dump, there was a error:
>
> coarse-grained bead is bigger than half the box
> (atoms 8 (id 46), 17 (id 55) , molecule 1)
>
> as I checked in OVITO, these two atoms are not in one bead. Is that because of periodic boundary condition? I would really appreciate when you could give me any advices.

If the two atoms aren't in one bead, this error shouldn't occur, so my
guess is that your mapping file isn't quite correct yet.

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 https://groups.google.com/group/votca.
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/e8e79fa7-8297-4318-b3fc-209552eabcf2%40googlegroups.com.

徐祥

unread,
Jul 11, 2019, 1:20:12 PM7/11/19
to votca
Hi Christoph,

jes, you are right. I have misunderstood those two index of the two atoms. They are in one bead, as the red atoms shown in the picture. Do you have any idea to solve the error?

Best,
Xiang
Unbenannt.PNG
在 2019年7月11日星期四 UTC+2下午5:54:08,Christoph Junghans写道:

Christoph Junghans

unread,
Jul 11, 2019, 2:19:15 PM7/11/19
to vo...@googlegroups.com


On Thu, Jul 11, 2019 at 9:53 AM Christoph Junghans <jung...@votca.org> wrote:
>
> On Thu, Jul 11, 2019 at 9:45 AM 徐祥 <xx.xi...@gmail.com> wrote:
> >
> > Hi Christoph,
> >
> > Now I can get the topol.xml through a script. But for my test system of polyamide with 5 monomer, when I use csg_map --top topol.xml --cg pa6.xml --trj chemistry.dump --out cg-pa6.dump, there was a error:
> >
> > coarse-grained bead is bigger than half the box
> >  (atoms 8 (id 46), 17 (id 55) , molecule 1)
> >
> > as I checked in OVITO, these two atoms are not in one bead. Is that because of periodic boundary condition? I would really appreciate when you could give me any advices.
>
> If the two atoms aren't in one bead, this error shouldn't occur, so my
> guess is that your mapping file isn't quite correct yet.
Btw, looking at at "csg_dump --top topol.xml",

Atoms with id 46 and id 55 are:
46 Name 1:P:9 Type hc Mass 1.00797 Resnr 0 Resname P Charge 0.053
55 Name 1:P:18 Type hc Mass 1.00797 Resnr 0 Resname P Charge 0.053
and then at
        <cg_bead>
            <name>A6</name>
            <type>A</type>
            <mapping>A</mapping>
            <beads> 1:P:8 1:P:9 1:P:10 1:P:11 1:P:12 1:P:13 1:P:14 1:P:15 1:P:16 1:P:17 1:P:18 1:P:19 </beads>
         </cg_bead>
in pa6.xml, you see that P:9 and P:18 and indeed part of on bead.

The atoms in question had coordinates of [2.33991, 11.0489, 1.08234] [11.8104, 4.10459, 11.535] (from error message)
with a box length on 12.46, the periodic distance is 6.60238 (= sqrt((11.535-1.08234-1.2469595330000001e+01)**2+(11.8104-2.33991-1.2469595330000001e+01)**2+(11.0489-4.10459-1.2469595330000001e+01)**2))
and hence bigger than half a box length (6.23).

Christoph Junghans

unread,
Jul 11, 2019, 2:25:23 PM7/11/19
to vo...@googlegroups.com
On Thu, Jul 11, 2019 at 11:20 徐祥 <xx.xi...@gmail.com> wrote:
Hi Christoph,

jes, you are right. I have misunderstood those two index of the two atoms. They are in one bead, as the red atoms shown in the picture. Do you have any idea to solve the error?
You will need a bigger box.

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 https://groups.google.com/group/votca.

For more options, visit https://groups.google.com/d/optout.

Christoph Junghans

unread,
Jul 11, 2019, 4:08:28 PM7/11/19
to vo...@googlegroups.com
On Thu, Jul 11, 2019 at 12:25 PM Christoph Junghans <jung...@votca.org> wrote:


On Thu, Jul 11, 2019 at 11:20 徐祥 <xx.xi...@gmail.com> wrote:
Hi Christoph,

jes, you are right. I have misunderstood those two index of the two atoms. They are in one bead, as the red atoms shown in the picture. Do you have any idea to solve the error?
You will need a bigger box.
Or just multiplex the current box by a factor 2 in each direction.

Christoph 
Reply all
Reply to author
Forward
0 new messages