<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br>Write a (relatively) simple script that reads a pdb file<br>and prints for each set of three C O O lines two additional O lines: O O C O O.<br>Gromacs does not care about atom names, and the O positions will be<br>good enough that the initial constraining in mdrun will correct the mass positions<br>to exactly the right ones.<br>Then you do not need to run pdb2gmx again.<br><br>Berk<br><br>&gt; Date: Wed, 15 Jul 2009 16:44:40 +0100<br>&gt; From: Jennifer.Williams@ed.ac.uk<br>&gt; To: gmx-users@gromacs.org; gmx3@hotmail.com<br>&gt; Subject: RE: [gmx-users] Re: Best way to handle linear rigid molecules.<br>&gt; CC: <br>&gt; <br>&gt; <br>&gt; Hello,<br>&gt; <br>&gt; Thanks for the help so far.<br>&gt; <br>&gt; I?ve understood the concept of introducing the dummy atoms for linear  <br>&gt; molecules with advice and  by following an example for acetonitrile  <br>&gt; which I found in the user forum (Feb 2003).<br>&gt; <br>&gt; I now (hope) that I have an itp file of a have a system of two masses  <br>&gt; (D1 and D2) that accurately reproduce the mass and moments of inertia  <br>&gt; of CO2 and three 'dummy'atoms that accurately reproduce the normal  <br>&gt; atomic interactions of CO2.<br>&gt; <br>&gt; I?ve pasted the file below.<br>&gt; <br>&gt; [ atomtypes ]<br>&gt; ;   type      mass    charge    ptype       c6            c12<br>&gt;     D1              22.004975              0.0000       A         0.0000      0.00000000<br>&gt;     D2              22.004975              0.0000       A         0.0000      0.00000000<br>&gt;     C_CO     0.0000000             0.5406       V         0.0000      0.00000000<br>&gt;     O_CO     0.0000000            -0.2703       V         0.29847   1.10765301<br>&gt; <br>&gt; [ moleculetype ]<br>&gt; ; name  nrexcl<br>&gt; CO2         2<br>&gt; <br>&gt; [ atoms ]<br>&gt; ;   nr  type    resnr   residu  atom    cgnr    charge        mass<br>&gt; 1       D1       1       CO2    DUM       1        0.0000  22.004975<br>&gt; 2       D2       1       CO2    DUM       1        0.0000  22.004975<br>&gt; 3       C_CO     1       CO2    C_CO      1        0.5406  0.0000000<br>&gt; 4       O_CO     1       CO2    O_CO      1       -0.2703  0.0000000<br>&gt; 5       O_CO     1       CO2    O_CO      1       -0.2703  0.0000000<br>&gt; <br>&gt; [ constraints ]<br>&gt; ;  ai  aj funct           c0           c1<br>&gt; 1       2        1           0.2006146447<br>&gt; <br>&gt; [ virtualsites2]<br>&gt; ;  ai    aj    ak       funct   c0      c1<br>&gt;      3     1     2       1       0.4263443<br>&gt;      4     1     2       1      -0.07365569<br>&gt;      5     1     2       1       0.926344308<br>&gt; <br>&gt; [ exclusions ]<br>&gt; 4 3 5<br>&gt; 5 3 4<br>&gt; 3 5 4<br>&gt; <br>&gt; However, this now means that I need coordinates of the atoms D1 and D2  <br>&gt; in my pdb file!<br>&gt; <br>&gt; I currently have a pdb file (the output of another simulation program)  <br>&gt; which contains the coordinates of the C,O and O atoms. i.e<br>&gt; <br>&gt; ATOM   1077 C_CO   CO2   1     -21.646   5.405  -4.644  1.00  0.00<br>&gt; ATOM   1078 O_CO   CO2   1     -22.709   5.009  -4.226  1.00  0.00<br>&gt; ATOM   1079 O_CO   CO2   1     -20.583   5.801  -5.062  1.00  0.00<br>&gt; <br>&gt; I have constructed my .itp and .top files entirely by hand as the  <br>&gt; residues are non standard so pdb2gmx doesn?t work for me.<br>&gt; <br>&gt; How do I go about getting a pdb file containing the dummy positions?  <br>&gt; My systems will have around 40 CO2 molecules so whatever I use, it has  <br>&gt; to be automated. Is there some way of modelling CO2 as a linear rigid  <br>&gt; molecule other than using the dummy mass atoms?<br>&gt; <br>&gt; Thanks in advance,<br>&gt; <br>&gt; <br>&gt; Quoting Berk Hess &lt;gmx3@hotmail.com&gt;:<br>&gt; <br>&gt; &gt;<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; This is quite wrong.<br>&gt; &gt;<br>&gt; &gt; Your normal atoms are virtual sites defined from the two masses<br>&gt; &gt; (you did it the other way around).<br>&gt; &gt; If you put the masses at the oxygen postitions (which gives an incorrect<br>&gt; &gt; moment of intertia, so incorrect dynamics, but correct thermodynamics),<br>&gt; &gt; then your coefficients are 0.5 for C and 0 and 1 for the O's.<br>&gt; &gt;<br>&gt; &gt; Berk<br>&gt; &gt;<br>&gt; &gt;&gt; Date: Tue, 14 Jul 2009 14:39:10 +0100<br>&gt; &gt;&gt; From: Jennifer.Williams@ed.ac.uk<br>&gt; &gt;&gt; To: gmx-users@gromacs.org<br>&gt; &gt;&gt; Subject: [gmx-users] Re: Best way to handle linear rigid molecules.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi gmx users<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I am still having problems modelling small linear molecules. Following<br>&gt; &gt;&gt; advice from the forum (see below), I tried to define CO2 using 2 dummy<br>&gt; &gt;&gt; atoms (with averaged masses) which I placed in the same positions as<br>&gt; &gt;&gt; my oxygen atoms. (This involves having to replicate coordinates for O<br>&gt; &gt;&gt; in my pdb file which will be fiddly when I have hundreds of CO2<br>&gt; &gt;&gt; molecules).<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Here is my .itp file for CO2;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; [ atomtypes ]<br>&gt; &gt;&gt; ;   type      mass    charge    ptype       c6            c12<br>&gt; &gt;&gt;     C_CO    0.0000000     0.5406       A         0.0000      0.00000000<br>&gt; &gt;&gt;     O_CO    0.0000000    -0.2703       A         0.29847     1.10765301<br>&gt; &gt;&gt;     DUM    22.004975      0.0000       V         0.0000      0.00000000<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; [ moleculetype ]<br>&gt; &gt;&gt; ; name  nrexcl<br>&gt; &gt;&gt; CO2         2<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; [ atoms ]<br>&gt; &gt;&gt; ;   nr  type    resnr   residu  atom    cgnr    charge        mass<br>&gt; &gt;&gt; 1       C_CO     1       CO2    C_CO      1        0.5406  0.0000000<br>&gt; &gt;&gt; 2       O_CO     1       CO2    O_CO      1       -0.2703  0.0000000<br>&gt; &gt;&gt; 3       O_CO     1       CO2    O_CO      1       -0.2703  0.0000000<br>&gt; &gt;&gt; 4       DUM      1       CO2    DUM       1        0.0000  22.004975<br>&gt; &gt;&gt; 5       DUM      1       CO2    DUM       1        0.0000  22.004975<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; [ constraints ]<br>&gt; &gt;&gt; ;  ai  aj funct           c0           c1<br>&gt; &gt;&gt; 2       3        1           0.24176<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; [ virtualsites2]<br>&gt; &gt;&gt; ;  ai    aj    ak       funct   c0      c1<br>&gt; &gt;&gt;      4     2     3       1       0.0000<br>&gt; &gt;&gt;      5     2     3       1       0.24176<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I am not sure what the final terms in the virtual sites section stand<br>&gt; &gt;&gt; for and I have not found a lot of detail in the manual (section 4.7<br>&gt; &gt;&gt; and 5.5.2). I assumed that the first term defines the virtual atom<br>&gt; &gt;&gt; site, the second and third are the positions of the real atoms which<br>&gt; &gt;&gt; the virtual atom is placed in relation to. What does the function ?1?<br>&gt; &gt;&gt; stand for?  Here I tried to place the virtual atoms in the same<br>&gt; &gt;&gt; positions as my ?real? oxygens- I am not sure if this will be allowed?<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; However, when I run this I get:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ERROR 1 [file MCM_CO2.top, line 8230]:<br>&gt; &gt;&gt;    atom C_CO (Res CO2-1) has mass 0<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ERROR 2 [file MCM_CO2.top, line 8230]:<br>&gt; &gt;&gt;    atom O_CO (Res CO2-1) has mass 0<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ERROR 3 [file MCM_CO2.top, line 8230]:<br>&gt; &gt;&gt;    atom O_CO (Res CO2-1) has mass 0<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ERROR 4 [file MCM_CO2.top, line 8230]:<br>&gt; &gt;&gt;    virtual site DUM (Res CO2-1) has non-zero mass 22.005<br>&gt; &gt;&gt;         Check your topology.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ERROR 5 [file MCM_CO2.top, line 8230]:<br>&gt; &gt;&gt;    virtual site DUM (Res CO2-1) has non-zero mass 22.005<br>&gt; &gt;&gt;         Check your topology.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; So the approach of modelling dummy atoms with a mass and the real<br>&gt; &gt;&gt; atoms as mass-less generates errors. How do I solve this? Importantly<br>&gt; &gt;&gt; I need to get the MSD of the CO2 molecules so I am a bit confused with<br>&gt; &gt;&gt; the approach of using virtual atom sites to model CO2. Which groups<br>&gt; &gt;&gt; would I then select for the MSD? The virtual site with the mass or the<br>&gt; &gt;&gt; real atoms site which is mass-less?  Is this approach realistic?<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I have also tried to model CO2 2 different approaches<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; 1.        Using bond constraints and setting the bond angle to 180 and using<br>&gt; &gt;&gt; a large bending constant to keep the molecule effectively rigid.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Here I got the following error message and the run stopped after 2   <br>&gt; &gt;&gt; timesteps;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Step 1, time 0.001 (ps)  LINCS WARNING<br>&gt; &gt;&gt; relative constraint deviation after LINCS:<br>&gt; &gt;&gt; rms 0.969889, max 10.563440 (between atoms 1072 and 1074)<br>&gt; &gt;&gt; bonds that rotated more than 30 degrees:<br>&gt; &gt;&gt;   atom 1 atom 2  angle  previous, current, constraint length<br>&gt; &gt;&gt;     1072   1073   89.9    0.1210   0.6876      0.1209<br>&gt; &gt;&gt;     1072   1074   92.4    0.1210   1.3978      0.1209<br>&gt; &gt;&gt;     1075   1076   86.8    0.1209   0.1303      0.1209<br>&gt; &gt;&gt;     1075   1077   86.8    0.1209   0.1307      0.1209<br>&gt; &gt;&gt; Wrote pdb files with previous and current coordinates<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; 2.        Using constraints to keep the C-O bond fixed to 0.12 and another<br>&gt; &gt;&gt; constraint between O and O of 0.24. I hoped this would keep the O-C-O<br>&gt; &gt;&gt; linear.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Here, the md.log file contained the following;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; 6 constraints are involved in constraint triangles,<br>&gt; &gt;&gt; will apply an additional matrix expansion of order 4 for couplings<br>&gt; &gt;&gt; between constraints inside triangles<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; The job ran to completion but on viewing the trajectory, the CO2<br>&gt; &gt;&gt; molecules are only approximately linear.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; If anyone has an example file for a triatomic linear molecule like<br>&gt; &gt;&gt; CO2, I?d be very grateful if you could post it so I could use it as a<br>&gt; &gt;&gt; template,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I am using gromacs version 4.0.5<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Thanks<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; This question has been asked several times before on this list.<br>&gt; &gt;&gt; The proper way to handle this in Gromacs is to introduce two dummy<br>&gt; &gt;&gt; mass particles<br>&gt; &gt;&gt; in such a way the total mass and the moment of inertia is identical to CO2.<br>&gt; &gt;&gt; Then you can construct the positions of the three mass-less C and O  <br>&gt; &gt;&gt;  atoms from<br>&gt; &gt;&gt; the positions of the masses using virtual sites (see the manual).<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Berk<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Quoting Jennifer Williams &lt;Jennifer.Williams@ed.ac.uk&gt;:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt; Hello users,<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; I am using gromacs v 4.0.5<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; What is the best way to treat linear triatomic molecules such as CO2.<br>&gt; &gt;&gt; &gt; Is there some kind of rigid algorthym as in DL_POLY?<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; In the asbsence of a ?rigid? algorthym. I initially intended to ?fix?<br>&gt; &gt;&gt; &gt; the C=O bond length using constraints (as below) and somehow ?fix? the<br>&gt; &gt;&gt; &gt; O=C=O bond angle to 180.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; [ atomtypes ]<br>&gt; &gt;&gt; &gt; ;   type      mass    charge    ptype       c6            c12<br>&gt; &gt;&gt; &gt;    C_CO2    12.01115    0.5406      A        0.0000      0.00000000<br>&gt; &gt;&gt; &gt;    O_CO2    15.9994    -0.2703      A        0.29847     1.10765301<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; [ moleculetype ]<br>&gt; &gt;&gt; &gt; ; name  nrexcl<br>&gt; &gt;&gt; &gt; CO2         2<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; [ atoms ]<br>&gt; &gt;&gt; &gt; ;   nr  type    resnr   residu  atom    cgnr    charge        mass<br>&gt; &gt;&gt; &gt; 1       C_CO2     1       CO2    C_CO2      1        0.5406  12.01115<br>&gt; &gt;&gt; &gt; 2       O_CO2     1       CO2    O_CO2      1       -0.2703  15.9994<br>&gt; &gt;&gt; &gt; 3       O_CO2     1       CO2    O_CO2      1       -0.2703  15.9994<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; [ constraints ]<br>&gt; &gt;&gt; &gt; ;  ai  aj funct           c0           c1<br>&gt; &gt;&gt; &gt; 1       2        1           0.12088<br>&gt; &gt;&gt; &gt; 1       3        1           0.12088<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; [ angles ]<br>&gt; &gt;&gt; &gt; ;  ai    aj    ak       funct   c0      c1<br>&gt; &gt;&gt; &gt;     2     1     3       1       180.00<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; First question... How do I go about fixing this angle to 180degrees?<br>&gt; &gt;&gt; &gt; Should I just make c1 extremely large? Is there a more elegant way of<br>&gt; &gt;&gt; &gt; going about this? Someone also mentioned using a virtual site<br>&gt; &gt;&gt; &gt; representation for the C. Any comments on this welcome.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; I read some posts which imply that the angle bending code apparently can't<br>&gt; &gt;&gt; &gt; handle angles of exactly 180 degrees.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; http://www.mail-archive.com/gmx-users@gromacs.org/msg09979.html<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; This was a while ago so perhaps this has been dealt with in the current<br>&gt; &gt;&gt; &gt; version of gromacs?<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Thanks<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; --<br>&gt; &gt;&gt; The University of Edinburgh is a charitable body, registered in<br>&gt; &gt;&gt; Scotland, with registration number SC005336.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; gmx-users mailing list    gmx-users@gromacs.org<br>&gt; &gt;&gt; http://lists.gromacs.org/mailman/listinfo/gmx-users<br>&gt; &gt;&gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; &gt;&gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; &gt;&gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; &gt;&gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>&gt; &gt;<br>&gt; &gt; _________________________________________________________________<br>&gt; &gt; See all the ways you can stay connected to friends and family<br>&gt; &gt; http://www.microsoft.com/windows/windowslive/default.aspx<br>&gt; <br>&gt; <br>&gt; <br>&gt; Dr. Jennifer Williams<br>&gt; Institute for Materials and Processes<br>&gt; School of Engineering<br>&gt; University of Edinburgh<br>&gt; Sanderson Building<br>&gt; The King's Buildings<br>&gt; Mayfield Road<br>&gt; Edinburgh, EH9 3JL, United Kingdom<br>&gt; Phone: ++44 (0)131 650 4 861<br>&gt; <br>&gt; <br>&gt; -- <br>&gt; The University of Edinburgh is a charitable body, registered in<br>&gt; Scotland, with registration number SC005336.<br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; gmx-users mailing list    gmx-users@gromacs.org<br>&gt; http://lists.gromacs.org/mailman/listinfo/gmx-users<br>&gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; Please don't post (un)subscribe requests to the list. Use the <br>&gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br><br /><hr />See all the ways you can stay connected <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>to friends and family</a></body>
</html>