<div class="gmail_quote">On Thu, Jan 19, 2012 at 3:49 PM, Tsjerk Wassenaar <span dir="ltr">&lt;<a href="mailto:tsjerkw@gmail.com">tsjerkw@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">

Hi Chandan,<br>
<br>
The box is accessible from the t_trxframe struct. Assuming you have<br>
<br>
t_trxframe *fr<br>
<br>
You can access it through<br>
<br>
fr-&gt;box<br></blockquote><div><br></div><div>Thanks Tsjerk. It (fr.box) did help me to get the box coordinates.</div><div><br></div><div>fr.box[XX][XX], fr.box[YY][YY] and fr.box[ZZ][ZZ] gives me the values but fr.box[XX][YY], fr.box[XX][ZZ] prints 0. Which seems to me that the origin of the box is at (0,0,0). Then,  fr.box[XX][XX] is the maximum X-coordinate, fr.box[YY][YY] is the maximum Y-coordinate,fr.box[ZZ][ZZ] is the maximum Z-coordinate. Am I correct?</div>

<div><br></div><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
But if you remove jumps first, you&#39;re fine anyway. Just don&#39;t put<br>
things back in the box afterwards. And don&#39;t center if your aim is<br>
calculating MSDs.<br></blockquote><div><br></div><div>Yeah, you are right.</div><div><br></div><div>Chandan</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hope it helps,<br>
<br>
Tsjerk<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Jan 19, 2012 at 11:14 AM, Chandan Choudhury &lt;<a href="mailto:iitdckc@gmail.com">iitdckc@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Jan 19, 2012 at 12:17 PM, Mark Abraham &lt;<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 19/01/2012 5:39 PM, Chandan Choudhury wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Dear gmx-users,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have a simulated a system containing a linear polymer in a cubic box<br>
&gt;&gt;&gt; with water molecules.  I need to get rid of PBC effect on the system such<br>
&gt;&gt;&gt; that I can execute my own analysis code. I intend to compute the msd of<br>
&gt;&gt;&gt; water molecules along the polymer backbone.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; You can&#39;t &quot;get rid of PBC&quot;, you can only manage it. The question reduces<br>
&gt;&gt; what you want to see if a molecule diffuses across the periodic boundary<br>
&gt;&gt; from near one end of the polymer to the other end.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; So, when I execute my own analysis code, I see the msd&#39;s are abrupt (i.e<br>
&gt;&gt;&gt; very high), this is due to the pbc. So, for getting rid of PBC effect, I<br>
&gt;&gt;&gt; performed the suggested trjconv workflow<br>
&gt;&gt;&gt; (<a href="http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions" target="_blank">http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions</a>).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Below are my executed commands :<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # Made the system whole<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; echo 0 | trjconv_4.5.5 -s md0-4.tpr -f 0-4.xtc -pbc whole -o<br>
&gt;&gt;&gt; 0-4_whole.xtc<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # 0 is the whole system. md0-4.tpr is the initial tpr file containing<br>
&gt;&gt;&gt; whole (no broken) polymer inside the cubic box.<br>
&gt;&gt;&gt; # Extracted 1st frame from the initial trajectory<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; echo 0 | trjconv_4.5.5 -s md0-4.tpr -f 0-4.xtc -pbc nojump  -o 1st.pdb<br>
&gt;&gt;&gt; -dump 0<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # used the whole trajectory to remove jumps with reference to the 1st<br>
&gt;&gt;&gt; frame.<br>
&gt;&gt;&gt; echo 0 | trjconv_4.5.5 -s 1st.pdb -f 0-4_whole.xtc -pbc nojump -o<br>
&gt;&gt;&gt; 0-4_nojump.xtc<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; So here you said &quot;let molecules diffuse away from the solute&quot;.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; #system is being centered<br>
&gt;&gt;&gt; echo &quot;0 0&quot; | trjconv_4.5.5 -s md0-4.tpr -f 0-4_nojump.xtc -o<br>
&gt;&gt;&gt; 0-4_center.xtc -center<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; #putting every atom in the box<br>
&gt;&gt;&gt; echo 0 | trjconv -s md0-4.tpr -f 0-4_center.xtc -o 0-4_box.xtc -pbc atom<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ... and now you said &quot;take all the atoms and put them back in the box&quot;,<br>
&gt;&gt; creating jumps whenever one crosses the boundaries.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Still when I execute my analysis code, I do see the abrupt behaviour in<br>
&gt;&gt;&gt; the msd plot. Can someone guide me how to completely get rid of PBC<br>
&gt;&gt;&gt; artifacts.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Don&#39;t simulate with them :-P Is your analysis technique sound for the<br>
&gt;&gt; periodic case?<br>
&gt;<br>
&gt;<br>
&gt; No, my analysis code doesnot take care of PBC. As to deal with PBC, I need<br>
&gt; to have the box vectors (for atleast NPT simulation) from the trajectory and<br>
&gt; I am unable to extract the box vectors (as of date).<br>
&gt;<br>
&gt; Chandan<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Mark<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt;&gt; Please search the archive at<br>
&gt;&gt; <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;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the www<br>
&gt;&gt; interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt;&gt; 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>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Chandan kumar Choudhury<br>
&gt; NCL, Pune<br>
&gt; INDIA<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; gmx-users mailing list    <a 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<br>
&gt; <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&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt; 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>
<br>
--<br>
</div></div><div class="im HOEnZb">Tsjerk A. Wassenaar, Ph.D.<br>
<br>
post-doctoral researcher<br>
Molecular Dynamics Group<br>
* Groningen Institute for Biomolecular Research and Biotechnology<br>
* Zernike Institute for Advanced Materials<br>
University of Groningen<br>
The Netherlands<br>
</div><div class="HOEnZb"><div class="h5">--<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>
</div></div></blockquote></div><br>