An update on this. I got the following to work:<div><br></div><div>1. use a vmd script closest.tcl (available on the vmd pages) to select closest N waters, and write a pdb file for each frame.</div><div><br></div><div>2. however, the above pdb files have different residue numbers for the water molecules for each frame because it is not the same N waters each frame. So use editconf to convert the pdbs to gros  with the -resnr 1 option</div>
<div><br></div><div>3. concatenate the frames using trjcat ( -cat option) </div><div><br></div><div>4. make the correct time spacing using trjconv. (-timestep)</div><div><br></div><div>The method is kinda tedious, but the final result is a trajectory of the protein with closest N-waters updated every step. Good enough for my analysis. </div>
<div><div><br><div class="gmail_quote">On Tue, May 10, 2011 at 12:38 PM, Thomas Evangelidis <span dir="ltr">&lt;<a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
A work around will be available in the future as a plugin for VMD.<br><br>For your reference read these threads:<br><br><a href="http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/14140.html" target="_blank">http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/14140.html</a><br>

<br>
<a href="http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/13217.html" target="_blank">http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/13217.html</a><br><br><br><div class="gmail_quote"><div><div></div><div class="h5">
On 10 May 2011 03:12, Roland Schulz <span dir="ltr">&lt;<a href="mailto:roland@utk.edu" target="_blank">roland@utk.edu</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5"><br><br><div class="gmail_quote"><div>On Mon, May 9, 2011 at 6:28 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:Mark.Abraham@anu.edu.au" target="_blank">Mark.Abraham@anu.edu.au</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div>On 10/05/2011 12:50 AM, maria goranovic wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Dear experts<br>
<br>
I have a protein simulation in a water box. I now want to write a trajectory containing only the protein, and water molecules within 5 Angstroms of the protein, with the water list being updated each time step. How can one do this? Appreciate the help<br>




</blockquote>
<br></div>
g_select is useful for &quot;dynamic&quot; selections of this type. g_select -select &quot;help&quot; can give examples and such.<br>
<br>
I&#39;d hope it&#39;s been designed so that then using trjconv to extract such selections works, but I can&#39;t think how, having not ever tried.<br></blockquote></div><div>g_select writes out one index group per time frame. But trjconv can&#39;t use a different index group for each frame. Thus it can&#39;t be used to write out a trajectory with those atoms for each frame.  Part of the problem is that the trajectory format doesn&#39;t support different number of atoms for different frames. </div>



<div>What is possible is writing a small script around trjconv to produce one gro/trr file per frame with only those atoms.</div><div><br></div><font color="#888888"><div>Roland</div></font><div><div><br></div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


<br>
Mark<br><font color="#888888">
-- <br></font><div><div></div><div>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">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 www interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">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>
<br>
<br>
</div></div></blockquote></div></div><br><br clear="all"><div><div></div><div><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br><a href="tel:865-241-1537" value="+18652411537" target="_blank">865-241-1537</a>, ORNL PO BOX 2008 MS6309<br>


</div></div><br></div></div>--<div class="im"><br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">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" target="_blank">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></div></blockquote></div><br><br clear="all"><br>-- <br>


        
        
        
        

<p style="margin-bottom:0cm" align="LEFT">======================================================================</p>
<p style="margin-bottom:0cm" align="LEFT">Thomas Evangelidis</p>
<p style="margin-bottom:0cm" align="LEFT">PhD student</p>
<p style="margin-bottom:0cm" align="LEFT">Biomedical Research
Foundation, Academy of Athens</p>
<p style="margin-bottom:0cm" align="LEFT">4 Soranou Ephessiou , 115 27
Athens, Greece<br><br>email: <a href="mailto:tevang@bioacademy.gr" target="_blank">tevang@bioacademy.gr</a></p>
<p style="margin-bottom:0cm" align="LEFT">                 <a href="mailto:tevang3@gmail.com" target="_blank">tevang3@gmail.com</a></p>
<p style="margin-bottom:0cm" align="LEFT"><br>website:
<a href="https://sites.google.com/site/thomasevangelidishomepage/" target="_blank">https://sites.google.com/site/thomasevangelidishomepage/</a></p>
<p style="margin-bottom:0cm" align="LEFT"><br>
</p>
<br>
<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>Maria G.<br>Technical University of Denmark<br>
Copenhagen<br>
</div></div>