<br><br>
<div class="gmail_quote">On Tue, Nov 1, 2011 at 5:44 PM, Justin A. Lemkul <span dir="ltr">&lt;<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br><br>Steven Neumann wrote: 
<div>
<div></div>
<div class="h5"><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br><br>On Tue, Nov 1, 2011 at 4:11 PM, Justin A. Lemkul &lt;<a href="mailto:jalemkul@vt.edu" target="_blank">jalemkul@vt.edu</a> &lt;mailto:<a href="mailto:jalemkul@vt.edu" target="_blank">jalemkul@vt.edu</a>&gt;&gt; wrote:<br>
<br><br><br>   Steven Neumann wrote:<br><br>       Hi Guys,<br>        I am using Charmm27 ff for my protein and ligand system. I used<br>       SwissParam to generate the topology for my ligand. I included<br>       the obtained topology of my ligand as in Justin tutorial:<br>
                ; Include Position restraint file<br><br>       #ifdef POSRES<br><br>       #include &quot;posre.itp&quot;<br><br>       #endif<br><br>       ; Include ligand topology<br><br>       #include &quot;ligand.itp&quot;<br>
<br>       ; Ligand position restraints<br><br>       #ifdef POSRES<br><br>       #include &quot;posre_ligand.itp&quot;<br><br>       #endif<br><br>       ; Include water topology<br><br>       #include &quot;charmm27.ff/tip3p.itp&quot;<br>
<br>        When I wanted to run NVT I obtained:<br>        Fatal error:<br>       Syntax error - File egcg.itp, line 7<br>       Last line read:<br>       &#39;[ atomtypes ] &#39;<br>       Invalid order for directive atomtypes<br>
        However when I included my topology as:<br>                ; Include forcefield parameters<br><br>       #include &quot;charmm27.ff/forcefield.itp&quot;<br><br>       #include &quot;ligand.itp&quot;<br><br>       [ moleculetype ]<br>
<br>       ; Name nrexc<br><br>       ......................<br><br>       ; Include Position restraint file<br><br>       #ifdef POSRES<br><br>       #include &quot;posre.itp&quot;<br><br>       #endif<br><br>       ; Ligand position restraints<br>
<br>       #ifdef POSRES<br><br>       #include &quot;posre_egcg.itp&quot;<br><br>       #endif<br><br>       ; Include water topology<br><br>       #include &quot;charmm27.ff/tip3p.itp&quot;<br><br>       ,,,,<br>        Everything seems to be ok!<br>
       Any clue why is that?<br>        <br><br>   The topology must follow a defined order.  Please consult Chapter 5<br>   of the manual for the required hierarchy.  Of course, the latter<br>   case will also not work, because you&#39;ve introduced ligand position<br>
   restraints after the protein [moleculetype], so if invoked, they<br>   will cause a different fatal error.<br><br>   The Gromacs site also has more on these types of errors, as well as<br>   the list archive, where this error has been posted and solved<br>
   hundreds of times.<br><br>   -Justin<br><br>   Thank you Justin! But actually the last case I provided actually<br>   works...<br><br></blockquote><br></div></div>Then the position restraints are not being applied to the ligand.  They can&#39;t be.  Once the protein [moleculetype] is introduced, all [position_restraints] directives immediately after are applied to it.  Try invoking the restraints separately, i.e. with &quot;define = -DPOSRES -DPOSRES_LIGAND&quot; and you will get a fatal error. 
<div>
<div></div>
<div class="h5"><br><br>-Justin</div></div></blockquote>
<div> </div>
<div> </div>
<div>You are as always right :) Thanks!</div>
<div> </div>
<div>Steven</div></div>