<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 19/01/2012 11:27 PM, Chandan Choudhury wrote:
    <blockquote
cite="mid:CAHESojx-Jx=5vMR5SWgZh+Qb4d6381qzJtN-5V2rUUjoNA97pw@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Thu, Jan 19, 2012 at 3:49 PM, Tsjerk
        Wassenaar <span dir="ltr">&lt;<a moz-do-not-send="true"
            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],&nbsp;fr.box[YY][YY] and&nbsp;fr.box[ZZ][ZZ] gives me
          the values but&nbsp;fr.box[XX][YY],&nbsp;fr.box[XX][ZZ] prints 0. Which
          seems to me that the origin of the box is at (0,0,0). </div>
      </div>
    </blockquote>
    <br>
    The origin is always at (0,0,0) by definition, not by the contents
    of fr.box. There's no magic center of a periodic box, either.<br>
    <br>
    fr.box has the box dimensions, which in general require more than
    the 3 pieces of information required for a rectangular solid box.<br>
    <br>
    <blockquote
cite="mid:CAHESojx-Jx=5vMR5SWgZh+Qb4d6381qzJtN-5V2rUUjoNA97pw@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>Then, &nbsp;fr.box[XX][XX] is the maximum
          X-coordinate,&nbsp;fr.box[YY][YY] is the maximum
          Y-coordinate,fr.box[ZZ][ZZ] is the maximum Z-coordinate. Am I
          correct?</div>
      </div>
    </blockquote>
    <br>
    For some box types, yes.<br>
    <br>
    Mark<br>
    <br>
    <blockquote
cite="mid:CAHESojx-Jx=5vMR5SWgZh+Qb4d6381qzJtN-5V2rUUjoNA97pw@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <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 &lt;<a
                moz-do-not-send="true" 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
                moz-do-not-send="true"
                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. &nbsp;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't "get rid of PBC", 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'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 moz-do-not-send="true"
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 &nbsp;-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 "let molecules diffuse away from
              the solute".<br>
              &gt;&gt;<br>
              &gt;&gt;<br>
              &gt;&gt;&gt;<br>
              &gt;&gt;&gt; #system is being centered<br>
              &gt;&gt;&gt; echo "0 0" | 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 "take all the atoms and put
              them back in the box",<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'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 &nbsp; &nbsp;<a
                moz-do-not-send="true"
                href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                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 moz-do-not-send="true"
                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't post (un)subscribe requests to the
              list. Use the www<br>
              &gt;&gt; interface or send it to <a
                moz-do-not-send="true"
                href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
              &gt;&gt; Can't post? Read <a moz-do-not-send="true"
                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 &nbsp; &nbsp;<a moz-do-not-send="true"
                href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
              &gt; <a moz-do-not-send="true"
                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 moz-do-not-send="true"
                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't post (un)subscribe requests to the list.
              Use the<br>
              &gt; www interface or send it to <a
                moz-do-not-send="true"
                href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
              &gt; Can't post? Read <a moz-do-not-send="true"
                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 &nbsp; &nbsp;<a moz-do-not-send="true"
                href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
              <a moz-do-not-send="true"
                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 moz-do-not-send="true"
                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 moz-do-not-send="true"
                href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
              Can't post? Read <a moz-do-not-send="true"
                href="http://www.gromacs.org/Support/Mailing_Lists"
                target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>