<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">I thank you all so much for aiding me on this matter, Jan, Peter and Justin. Now things are way clerarer!<br><br>Cheers,<br><br>Ricardo.<br><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">De:</span></b> Peter C. Lai &lt;pcl@uab.edu&gt;<br> <b><span style="font-weight: bold;">Para:</span></b> jalemkul@vt.edu; Discussion list for GROMACS users &lt;gmx-users@gromacs.org&gt; <br> <b><span style="font-weight: bold;">Enviadas:</span></b> Sábado, 19 de Maio de 2012 1:01<br> <b><span
 style="font-weight: bold;">Assunto:</span></b> Re: [gmx-users] Different Lipids into one Moleculetype (for position restrain)<br> </font> </div> <br>Thanks for the corrections. I had to mock up parts of it because usually<br>I only POSRE_RECEPTOR and POSRE_LIGAND. I also have a mix of putting the<br>position restraints in .itp file vs. in the topol.top, depending on how often<br>I am changing my topol.top (things like genion and g_membed modify them).<br><br><br>On 2012-05-18 11:00:55PM -0400, Justin A. Lemkul wrote:<br>&gt; <br>&gt; <br>&gt; On 5/18/12 10:28 PM, Peter C. Lai wrote:<br>&gt; &gt; Synopsis: position restraints are coupled to the moleculetype. So you need to<br>&gt; &gt; define position restraints individually for each molecule type contiguous<br>&gt; &gt; with their topologies.<br>&gt; &gt;<br>&gt; &gt; There's a couple of ways to do it, using some simple #include and #define:<br>&gt; &gt;<br>&gt; &gt; You can restrain within each
 molecule's own .itp file at the end, for example:<br>&gt; &gt;<br>&gt; &gt; popc.itp:<br>&gt; &gt; [ moleculetype ]<br>&gt; &gt; ; Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nrexcl<br>&gt; &gt; POPC&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  3<br>&gt; &gt;<br>&gt; &gt; [ atoms ]<br>&gt; &gt; ;&nbsp;  nr&nbsp; &nbsp; &nbsp;  type&nbsp; resnr residue&nbsp; atom&nbsp;  cgnr&nbsp; &nbsp;  charge&nbsp; &nbsp; &nbsp;  mass&nbsp; typeB...<br>&gt; &gt; ; residue&nbsp;  1 POPC rtp POPC q&nbsp; 0.0<br>&gt; &gt;&nbsp; &nbsp; &nbsp;  1&nbsp; &nbsp; &nbsp; &nbsp; NTL&nbsp; &nbsp; &nbsp; 1&nbsp;  POPC&nbsp; &nbsp; &nbsp; N&nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp;  -0.6&nbsp; &nbsp;  14.007 ....<br>&gt; &gt; ...<br>&gt; &gt;&nbsp; &nbsp; &nbsp; 20&nbsp; &nbsp; &nbsp; &nbsp;  PL&nbsp; &nbsp; &nbsp; 1&nbsp;  POPC&nbsp; &nbsp; &nbsp; P&nbsp; &nbsp;  20&nbsp; &nbsp; &nbsp; &nbsp; 1.5&nbsp; &nbsp;  30.974 ....<br>&gt; &gt; ...<br>&gt; &gt;<br>&gt; &gt; [
 dihedrals ]<br>&gt; &gt; ...<br>&gt; &gt; ; end of original file<br>&gt; &gt;<br>&gt; &gt; #ifdef POSRE_LIPID<br>&gt; &gt; [ position_restraints ]<br>&gt; &gt; ; atom&nbsp; type&nbsp; &nbsp; &nbsp; fx&nbsp; &nbsp; &nbsp; fy&nbsp; &nbsp; &nbsp; fz<br>&gt; &gt;&nbsp; &nbsp; &nbsp;  20&nbsp; &nbsp;  1&nbsp; 1000&nbsp; 1000&nbsp; 1000<br>&gt; &gt; ;restrain atom 20 in the molecule_type which is P<br>&gt; &gt; #endif<br>&gt; &gt;<br>&gt; &gt; Add something similar at the bottom of pope.itp.<br>&gt; &gt;<br>&gt; &gt; Then in your system-wide topol.top would look something like:<br>&gt; &gt;<br>&gt; &gt; #include "charmm36.ff/forcefield.itp" ;charmm36 lipids<br>&gt; &gt;<br>&gt; &gt; #include "popc.itp"<br>&gt; &gt; #include "pope.itp"<br>&gt; &gt;<br>&gt; &gt; #include "charmm36.ff/tips3p.itp" ;charmm waters<br>&gt; &gt;<br>&gt; &gt; [ system ]<br>&gt; &gt; POPC+POPE bilayer<br>&gt; &gt;<br>&gt; &gt; [ molecules ]<br>&gt; &gt; POPC 100<br>&gt; &gt; POPE
 100<br>&gt; &gt; SOL&nbsp; 10000<br>&gt; &gt; ; or however many of each you have in your conf.gro file<br>&gt; &gt;<br>&gt; &gt; In your grompp.mdp, you'd have:<br>&gt; &gt;<br>&gt; &gt; #define -DPOSRE_LIPID ; to turn on position restraints in lipid .itps<br>&gt; &gt;<br>&gt; &gt; ------------------------------<br>&gt; &gt;<br>&gt; &gt; Another way to do it is to put the #ifdef POSRE_LIPID [ position_restraints ]<br>&gt; &gt; sections in the system-wide topol.top, but you'd need two of them, one per<br>&gt; &gt; lipid [ moleculetype ]:<br>&gt; &gt;<br>&gt; &gt; #include "charmm36.ff/forcefield.itp" ;charmm36 lipids<br>&gt; &gt;<br>&gt; &gt; #include "popc.itp"<br>&gt; &gt; #ifdef POSRE_LIPID<br>&gt; &gt; [ position_restraints ] ;for POPC<br>&gt; &gt;&nbsp; &nbsp; &nbsp;  20&nbsp; &nbsp;  1&nbsp; 1000&nbsp; 1000&nbsp; 1000<br>&gt; &gt; #endif<br>&gt; &gt;<br>&gt; &gt; #include "pope.itp"<br>&gt; &gt; #ifdef POSRE_LIPID<br>&gt; &gt; [ position_restraints
 ] ;for POPE<br>&gt; &gt; ...<br>&gt; &gt; #endif<br>&gt; &gt; ...<br>&gt; &gt;<br>&gt; &gt; The grompp.mdp file would continue to use #define -DPOSRE_LIPID to enable<br>&gt; &gt; those restraints.<br>&gt; &gt;<br>&gt; &gt; It is up to you how you want to modularize the restraints. You can even<br>&gt; &gt; use multiple #defines to restrain separately (although the resulting system<br>&gt; &gt; wouldn't necessarily be physically correct):<br>&gt; &gt;<br>&gt; &gt; As above topologies but:<br>&gt; &gt;<br>&gt; &gt; #ifdef -DPOSRE_POPC<br>&gt; &gt; ;position restraints for POPC<br>&gt; &gt; #endif<br>&gt; &gt;<br>&gt; <br>&gt; I think what you mean here is:<br>&gt; <br>&gt; #ifdef POSRE_POPC<br>&gt; <br>&gt; &gt; #ifdef -DPOSRE_POPE<br>&gt; &gt; ;position restraints for POPE<br>&gt; &gt; #endif<br>&gt; &gt;<br>&gt; <br>&gt; and #ifdef POSRE_POPE.<br>&gt; <br>&gt; Otherwise, the define statement becomes very cumbersome (and perhaps faulty), with:<br>&gt;
 <br>&gt; define = -D-DPOSRE_POPC -D-DPOSRE_POPE<br>&gt; <br>&gt; &gt; and in grompp.mdp:<br>&gt; &gt;<br>&gt; &gt; #define -DPOSRE_POPC -DPOSRE_POPE<br>&gt; &gt; ;to restrain both<br>&gt; &gt;<br>&gt; <br>&gt; Note that for the .mdp, one does not use #define, but rather:<br>&gt; <br>&gt; define = -POSRE_POPC -DPOSRE_POPE<br>&gt; <br>&gt; -Justin<br>&gt; <br>&gt; -- <br>&gt; ========================================<br>&gt; <br>&gt; Justin A. Lemkul, Ph.D.<br>&gt; Research Scientist<br>&gt; Department of Biochemistry<br>&gt; Virginia Tech<br>&gt; Blacksburg, VA<br>&gt; jalemkul[at]vt.edu | (540) 231-9080<br>&gt; <a href="http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin" target="_blank">http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin</a><br>&gt; <br>&gt; ========================================<br>&gt; -- <br>&gt; gmx-users mailing list&nbsp; &nbsp; <a ymailto="mailto:gmx-users@gromacs.org"
 href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>&gt; Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>&gt; Please don't post (un)subscribe requests to the list. Use the <br>&gt; www interface or send it to <a ymailto="mailto:gmx-users-request@gromacs.org" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>&gt; Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br><br>-- <br>==================================================================<br>Peter C. Lai&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; | University of
 Alabama-Birmingham<br>Programmer/Analyst&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; | KAUL 752A<br>Genetics, Div. of Research&nbsp;&nbsp;&nbsp; | 705 South 20th Street<br><a ymailto="mailto:pcl@uab.edu" href="mailto:pcl@uab.edu">pcl@uab.edu</a>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; | Birmingham AL 35294-4461<br>(205) 690-0808&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; |<br>==================================================================<br><br>-- <br>gmx-users mailing list&nbsp; &nbsp; <a ymailto="mailto:gmx-users@gromacs.org" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br><a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>Please don't post
 (un)subscribe requests to the list. Use the <br>www interface or send it to <a ymailto="mailto:gmx-users-request@gromacs.org" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br><br><br> </div> </div> </blockquote></div>   </div></body></html>