Issue 152 in votca: Incorrect box info after mapping a Gromacs dodecahedron box

1 view
Skip to first unread message

vo...@googlecode.com

unread,
Dec 4, 2013, 4:50:27 AM12/4/13
to votca...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 152 by cahit.dalgicdir: Incorrect box info after mapping a
Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

What steps will reproduce the problem?

1. Use csg_map to map a dodecahedron Gromacs box (gro or xtc)

$ csg_map --top topol.tpr --trj conf.gro --out mapped.gro --cg SOL.xml
OR
$ csg_map --top topol.tpr --trj conf.gro --out mapped.xtc --cg SOL.xml

where the last line of conf.gro is:
4.00000 4.00000 2.82843 0.00000 0.00000 0.00000 0.00000
2.00000 2.00000

the last line of mapped.gro is:
4.00000 4.00000 2.82843 0.00000 2.00000 0.00000 2.00000
0.00000 0.00000

2. The box info for conf.gro and mapped.gro differ

The box info for conf.gro and mapped.gro should be the same.

I think changing the 96-97th lines of src/libcsg/modules/io/growriter.cc :
from
box[0][1],box[0][2],box[1][0],
box[1][2],box[2][0],box[2][1]);
to
box[1][0],box[2][0],box[0][1],
box[2][1],box[0][2],box[1][2]);

and 64th line of src/libcsg/modules/io/gmxtrajectorywriter.cc :
from
frame.box[i][j] = box[i][j];

to
frame.box[j][i] = box[i][j];

fixes this bug. I didn't commit the fix, because I am not sure if this fix
does not break anything.

Attachments:
votca-gmx-dode-map-bug.tar 390 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

vo...@googlecode.com

unread,
Dec 4, 2013, 2:25:16 PM12/4/13
to votca...@googlegroups.com
Updates:
Status: Accepted
Cc: symasha...@gmail.com rue...@votca.org

Comment #1 on issue 152 by christop...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

Ok, have you tested your changes for the other two boundary conditions?
(Triclinic, Open)

And what does the newest version of csg_dump says, which boundary condition
it has found?

vo...@googlecode.com

unread,
Dec 5, 2013, 6:07:43 AM12/5/13
to votca...@googlegroups.com

Comment #2 on issue 152 by cahit.dalgicdir: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

I tried with, rectangular, cubic, dodecahedron, octahedron and open box
types:

The mapped configurations of rectangular and cubic box types give the same
box vectors as those of the atomistic configurations both before fix and
after fix. (expected as the diagonal elements of the matrix do not change)

However, the box vectors of the mapped configurations for dodecahedron and
octahedron box types match to their atomistic counterparts, after fix but
fail to match before fix.

Also, the lines match with the open box (where all the box vectors equal
zero).

The latest csg_dump yields for all the box types above and for both cases
of before fix and after fix (except the open box, where I don't know how to
compile a box with zero vectors with grompp and generate a tpr file):
Boundary Condition: open

That shouldn't be right, I guess.

However, when I use csg_map to map the atomistic configuration, the correct
box types (orthorhombic, triclinic etc) seem to be assigned. (I uncommented
the cout lines in topology.cc (Topology::autoDetectBoxType, line 313).

So anything else, I should check?

vo...@googlecode.com

unread,
Dec 5, 2013, 1:34:27 PM12/5/13
to votca...@googlegroups.com

Comment #3 on issue 152 by christop...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

Sounds good to me, thanks for testing! Do you want to commit it yourself or
do you want to send me a patch?

vo...@googlecode.com

unread,
Dec 6, 2013, 10:25:17 AM12/6/13
to votca...@googlegroups.com

Comment #4 on issue 152 by cahit.dalgicdir: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

OK, I did the commit. Thanks.

vo...@googlecode.com

unread,
Dec 6, 2013, 11:41:15 AM12/6/13
to votca...@googlegroups.com
Updates:
Status: Fixed

Comment #5 on issue 152 by christop...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

Thanks!

Btw, please add the following block to your ~/.hgrc
[ui]
username = Steve Losh <st...@stevelosh.com>

vo...@googlecode.com

unread,
Dec 6, 2013, 2:02:55 PM12/6/13
to votca...@googlegroups.com

Comment #6 on issue 152 by christop...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

With your name and email of course...

vo...@googlecode.com

unread,
Dec 6, 2013, 3:00:19 PM12/6/13
to votca...@googlegroups.com

Comment #7 on issue 152 by cahit.dalgicdir: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

:) Sorry, fixed it now. Actually the block was there, but the name was not
typed correctly.

vo...@googlecode.com

unread,
Dec 8, 2013, 5:53:44 AM12/8/13
to votca...@googlegroups.com
Updates:
Status: Reopened
Cc: -rue...@votca.org

Comment #8 on issue 152 by victor.r...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

this is a quite critical fix, so I reopened this issue for an additional
check.

Could you please verify if csg_stat still produces the exact same rdf as
g_rdf. The following reason: The distance function relies on the fact that
the box matrix is upper triangular (or lower, don't remember which way),
otherwise the distances are wrong. I thought the distances were correct for
a triclinic box, but now the matrix is transposed. So it could be also that
the writer is wrong instead of the reader...

See also issue #125

Victor

vo...@googlecode.com

unread,
Dec 8, 2013, 5:56:54 AM12/8/13
to votca...@googlegroups.com
Updates:
Status: Fixed

Comment #9 on issue 152 by victor.r...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
http://code.google.com/p/votca/issues/detail?id=152

sorry, I was not reading properly, i thought you were changing the reader.

closed again

vo...@googlecode.com

unread,
Jul 13, 2015, 10:34:28 AM7/13/15
to votca...@googlegroups.com

Comment #10 on issue 152 by christop...@gmail.com: Incorrect box info after
mapping a Gromacs dodecahedron box
https://code.google.com/p/votca/issues/detail?id=152

I back-ported this fix to the 1.2 branch!
Reply all
Reply to author
Forward
0 new messages