<br><br><div class="gmail_quote">On Mon, May 9, 2011 at 1:39 AM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
    
    
  
  <div text="#000000" bgcolor="#ffffff"><div class="im">
    On 9/05/2011 2:01 PM, Dimitar Pachov wrote:
    <blockquote type="cite">Hi,
      <div><br>
      </div>
      <div>On Sat, May 7, 2011 at 9:45 PM, Justin A. Lemkul <span dir="ltr">&lt;<a href="mailto:jalemkul@vt.edu" target="_blank">jalemkul@vt.edu</a>&gt;</span> wrote:</div>
      <div>
        <div class="gmail_quote"><br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            <div><br>
            </div>
            Please clarify - do you wish to maintain the original
            triclinic representation (as -ur tric does) or do you wish
            to see the octahedral representation (as -pbc mol -ur
            compact gives)?  My answer was based on your request to
            &quot;keep the original unit shape.&quot;
            <div>
              <br>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>My original representation is truncated octahedron.
            Gromacs requires triclinic vectors and does not care about
            unit cell shape at the moment the md code starts. I wanted
            to keep MY original unit shape. </div>
          <div><br>
          </div>
        </div>
      </div>
      <div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
          <div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
              <br>
            </blockquote>
            <br>
          </div>
          For complicated systems (or sometimes even for simple ones),
          it is quite common that multiple iterations of trjconv are
          necessary.  A suggested workflow is indeed documented:<br>
          <br>
          <a href="http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions#Suggested_trjconv_workflow" target="_blank">http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions#Suggested_trjconv_workflow</a><br>

          <br>
          The documentation must remain somewhat generic, as there are a
          number of specialty systems that can be considered.<br>
        </blockquote>
        <div><br>
        </div>
        <div>I thought the guidelines given by the trjconv specific
          manual were sufficient. I don&#39;t understand why people don&#39;t
          put this suggested workflow in the trjconv manual. It is
          confusing otherwise. It never came to me that one needed
          multiple usages of trjconv in order to
          achieve recentering around solute.</div>
      </div>
    </blockquote>
    <br></div>
    Fair point. I&#39;ve updated the trjconv documentation to provide this
    hint and a suggestiong to consult the webpage.<div><div></div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div>I followed these instructions and got what I wanted.
        Basically, this was my quick workflow:</div>
      <div><br>
      </div>
      <div>=================================</div>
      <div>
        <div>
          <div>
            <div>psfinname=&quot;$prot-$shape-$flc&quot;</div>
            <div>topfile=&quot;$prot-$shape-$flc.top&quot;</div>
            <div>grofile=&quot;$shape-$fl-eq.gro&quot;  </div>
            <div>inpfile=&quot;md.mdp&quot;  </div>
            <div><br>
            </div>
            <div>name=&quot;run1&quot;</div>
            <div>newname=&quot;run1-recen&quot;</div>
            <div>indexfile=&quot;index-all.ndx&quot;</div>
            <div>tclfile=&quot;extr-frame-traj.tcl&quot;</div>
            <div><br>
            </div>
            <div>s=&quot;Protein-Nucleo&quot;</div>
            <div>indsolute=`cat $indexfile | awk -v site=$s
              &#39;$1==&quot;[&quot;{i++}$2==site{print i-1}&#39;`</div>
            <div>cp $name.xtc $newname.xtc</div>
            <div><br>
            </div>
            <div>#===&gt; 1</div>
            <div>intraj=&quot;$newname.xtc&quot;</div>
            <div>outtraj=&quot;traj/$newname-whole.xtc&quot;</div>
            <div>trjconv -f $intraj -s $name.tpr -n $indexfile -o
              $outtraj  -pbc whole &gt; log1 2&gt;&amp;1 &lt;&lt;EOF1</div>
            <div>0</div>
            <div>EOF1</div>
            <div>#===&gt; 2</div>
            <div>intraj=&quot;$outtraj&quot;</div>
            <div>outtraj=&quot;traj/$newname-cluster.xtc&quot;</div>
            <div>trjconv -f $intraj -s $name.tpr -n $indexfile -o
              $outtraj  -pbc cluster &gt; log2 2&gt;&amp;1 &lt;&lt;EOF2</div>
            <div>$indsolute</div>
            <div>0</div>
            <div>EOF2</div>
            <div>#===&gt; 3</div>
            <div>intraj=&quot;$outtraj&quot;</div>
            <div>outtraj=&quot;traj/$newname-nojump.xtc&quot;</div>
            <div>trjconv -f $intraj -n $indexfile -o $outtraj  -pbc
              nojump &gt; log3 2&gt;&amp;1 &lt;&lt;EOF3</div>
            <div>0</div>
            <div>EOF3</div>
            <div>#===&gt; 4</div>
            <div>intraj=&quot;$outtraj&quot;</div>
            <div>outtraj=&quot;traj/$newname-center.xtc&quot;</div>
            <div>trjconv -f $intraj -n $indexfile -o $outtraj  -center
              &gt; log4 2&gt;&amp;1 &lt;&lt;EOF4</div>
            <div>$indsolute</div>
            <div>0</div>
            <div>EOF4</div>
            <div>#===&gt; 5</div>
            <div>## Get first frame from centered .xtc</div>
            <div>fr=1</div>
            <div>pdbfilename=&quot;`echo $outtraj | awk &#39;BEGIN{FS=&quot;.&quot;}{print
              $1}&#39;`&quot;</div>
            <div>pdbfile=&quot;$pdbfilename-${fr}ps.pdb&quot;</div>
            <div>`which vmd` -dispdev text -e $tclfile -args $fr
              ${pathpsfin}/${psfinname}.psf $outtraj $pdbfilename &gt;
              /dev/null</div>
            <div><br>
            </div>
            <div>cat $pdbfile | sed &#39;s/TIP3/SOL /&#39; | sed &#39;s/ OH2 SOL/ OW
               SOL/&#39; | sed &#39;s/ H1  SOL/ HW1 SOL/&#39; | sed &#39;s/ H2  SOL/ HW2
              SOL/&#39; | sed &#39;s/ SOD SOD/ NA  NA /g&#39; | sed &#39;s/ CLA CLA/ CL
               CL /g&#39; | sed &#39;s/ HT1 MET/ H1  MET/&#39; | sed &#39;s/ HT2 MET/ H2
               MET/&#39; | sed &#39;s/ HT3 MET/ H3  MET/&#39; &gt;
              $pdbfilename-${fr}ps-renamed.pdb</div>
            <div><br>
            </div>
            <div>grompp -f $inpfile -c $pdbfilename-${fr}ps-renamed.pdb
              -n $indexfile -p $topfile -o $newname-center.tpr &gt; log5
              2&gt;&amp;1</div>
          </div>
        </div>
      </div>
      <div>
        <div>#===&gt; 6</div>
        <div>intraj=&quot;$outtraj&quot;</div>
        <div>outtraj=&quot;traj/$newname-compact.xtc&quot;</div>
        <div>trjconv -s $newname-center.tpr -f $intraj -n $indexfile -o
          $outtraj  -pbc mol -ur compact  &gt; log6 2&gt;&amp;1
          &lt;&lt;EOF6</div>
        <div>0</div>
        <div>EOF6</div>
      </div>
      <div>=================================</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>However, it seems a long process, and if I have a large
        number of trajectories, it might not be feasible. I actually do
        not know if all steps are necessary. Particularly, I did step #5
        just to get a new *tpr file from the centered trajectory ... Is
        there a way to do that in a simpler way within Gromacs?</div>
    </blockquote>
    <br></div></div>
    What steps are necessary depends what your purpose is. trjconv -dump
    should do step #5. What are you generating the centered trajectory
    for? What are you generating another .tpr for?<br>
    <br></div></blockquote><div><br></div><div>Since I am new to Gromacs, there are certain things I do not quite understand. I do step #5 only because I need a *tpr file corresponding to the centered trajectory, which I need for step #6, i.e. to finally make the trajectory compact. As far as I understood, I couldn&#39;t use the very original *tpr file for the last step #6, correct? </div>
<div><br></div><div>And I need the centered trajectory in order to move to my final goal, i.e. the compact the trajectory at step #6. Again, I thought that the &quot;centering&quot; step was necessary after the &quot;nojump&quot; trajectory had been obtained...</div>
<div><br></div><div>Also, can one use the trjconv -dump without a *tpr file? I do not think so. Which *tpr file should I use in order to get the first frame from the centered trajectory, and where (and how) should I get this file from (unless I can use the very original one)?</div>
<div><br></div><div>Thanks,</div><div>Dimitar</div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div text="#000000" bgcolor="#ffffff">
    Mark<br>
  </div>

<br>--<br>
gmx-users mailing list    <a 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&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;border-collapse:collapse"><span style="font-size:x-small"><font color="#999999">=====================================================<br>
</font></span><b><span style="font-size:x-small"><font color="#999999">Dimitar V Pachov</font></span></b><span style="font-size:x-small"><font color="#999999"><br><br>PhD Physics<br>Postdoctoral Fellow </font></span></span><div>
<span style="font-family:arial, sans-serif;border-collapse:collapse"><span style="font-size:x-small"><font color="#999999">HHMI &amp; Biochemistry Department        Phone: (781) 736-2326<br>Brandeis University, MS 057                Email: </font></span><a href="mailto:dpachov@brandeis.edu" target="_blank"><span style="font-size:x-small"><font color="#999999">dpachov@brandeis.edu</font></span></a><span style="font-size:x-small"><font color="#999999"><br>
=====================================================</font></span></span></div><br>