<div class="gmail_quote">On Thu, Jan 19, 2012 at 3:49 PM, Tsjerk Wassenaar <span dir="ltr"><<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>></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->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're fine anyway. Just don't put<br>
things back in the box afterwards. And don'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 <<a href="mailto:iitdckc@gmail.com">iitdckc@gmail.com</a>> wrote:<br>
><br>
><br>
> On Thu, Jan 19, 2012 at 12:17 PM, Mark Abraham <<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>><br>
> wrote:<br>
>><br>
>> On 19/01/2012 5:39 PM, Chandan Choudhury wrote:<br>
>>><br>
>>><br>
>>> Dear gmx-users,<br>
>>><br>
>>> I have a simulated a system containing a linear polymer in a cubic box<br>
>>> with water molecules. I need to get rid of PBC effect on the system such<br>
>>> that I can execute my own analysis code. I intend to compute the msd of<br>
>>> water molecules along the polymer backbone.<br>
>><br>
>><br>
>> You can't "get rid of PBC", you can only manage it. The question reduces<br>
>> what you want to see if a molecule diffuses across the periodic boundary<br>
>> from near one end of the polymer to the other end.<br>
>><br>
>><br>
>>> So, when I execute my own analysis code, I see the msd's are abrupt (i.e<br>
>>> very high), this is due to the pbc. So, for getting rid of PBC effect, I<br>
>>> performed the suggested trjconv workflow<br>
>>> (<a href="http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions" target="_blank">http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions</a>).<br>
>>><br>
>>> Below are my executed commands :<br>
>>><br>
>>> # Made the system whole<br>
>>><br>
>>> echo 0 | trjconv_4.5.5 -s md0-4.tpr -f 0-4.xtc -pbc whole -o<br>
>>> 0-4_whole.xtc<br>
>>><br>
>>> # 0 is the whole system. md0-4.tpr is the initial tpr file containing<br>
>>> whole (no broken) polymer inside the cubic box.<br>
>>> # Extracted 1st frame from the initial trajectory<br>
>>><br>
>>> echo 0 | trjconv_4.5.5 -s md0-4.tpr -f 0-4.xtc -pbc nojump -o 1st.pdb<br>
>>> -dump 0<br>
>>><br>
>>> # used the whole trajectory to remove jumps with reference to the 1st<br>
>>> frame.<br>
>>> echo 0 | trjconv_4.5.5 -s 1st.pdb -f 0-4_whole.xtc -pbc nojump -o<br>
>>> 0-4_nojump.xtc<br>
>><br>
>><br>
>> So here you said "let molecules diffuse away from the solute".<br>
>><br>
>><br>
>>><br>
>>> #system is being centered<br>
>>> echo "0 0" | trjconv_4.5.5 -s md0-4.tpr -f 0-4_nojump.xtc -o<br>
>>> 0-4_center.xtc -center<br>
>>><br>
>>> #putting every atom in the box<br>
>>> echo 0 | trjconv -s md0-4.tpr -f 0-4_center.xtc -o 0-4_box.xtc -pbc atom<br>
>><br>
>><br>
>> ... and now you said "take all the atoms and put them back in the box",<br>
>> creating jumps whenever one crosses the boundaries.<br>
>><br>
>><br>
>>><br>
>>> Still when I execute my analysis code, I do see the abrupt behaviour in<br>
>>> the msd plot. Can someone guide me how to completely get rid of PBC<br>
>>> artifacts.<br>
>><br>
>><br>
>> Don't simulate with them :-P Is your analysis technique sound for the<br>
>> periodic case?<br>
><br>
><br>
> No, my analysis code doesnot take care of PBC. As to deal with PBC, I need<br>
> to have the box vectors (for atleast NPT simulation) from the trajectory and<br>
> I am unable to extract the box vectors (as of date).<br>
><br>
> Chandan<br>
><br>
>><br>
>><br>
>> Mark<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<br>
>> <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 www<br>
>> interface or send it to <a 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>
><br>
><br>
> --<br>
> Chandan kumar Choudhury<br>
> NCL, Pune<br>
> INDIA<br>
><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<br>
> <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 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>
<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'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'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>