<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 16/10/2011 6:12 AM, Broadbent, Richard wrote:
    <blockquote
      cite="mid:CABF99A9.2C0F%25richard.broadbent09@imperial.ac.uk"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <title>Re: [gmx-users] how to calculate the normal of plane for
        Tryptophan or how to get the comparison matrix in g_rms</title>
      <font face="Calibri, Verdana, Helvetica, Arial"><span
          style="font-size: 11pt;"><br>
          Have you thought about using the cross product. If you took
          the cross product of the unit vector in the direction of every
          atom starting from atom 1 then moved on to starting from atom
          2 and so on you would have a set of vectors normal to every
          group of three atoms. If you then normalised them and defined
          one to be pointing upwards you could then ensure using dot
          products that they all pointed the same way, a condition like
          if a.b &lt;0 b=-b would probably work you could then take the
          mean of the vectors. This should give an average normal vector
          to the plane of the molecule. <br>
          <br>
          If you&#8217;re going to be doing this a lot I would suggest
          removing the inherent double counting (r12=-r21).<br>
          <br>
          You could also think about weighting normal vectors in the
          averaging, for instance you could do it based on the sine of
          the angle between the vectors which generated them, or the
          mass of the atoms (H&#8217;s will more out of plane than carbons
          typically)<br>
        </span></font></blockquote>
    <br>
    Calculating the principle axes of inertia is a better approach.
    There's a GROMACS tool that does it.<br>
    <br>
    Mark<br>
    <br>
    <blockquote
      cite="mid:CABF99A9.2C0F%25richard.broadbent09@imperial.ac.uk"
      type="cite"><font face="Calibri, Verdana, Helvetica, Arial"><span
          style="font-size:11pt">
          <br>
          Hope that&#8217;s helpful<br>
          <br>
          Richard<br>
          <br>
          On 15/10/2011 15:45, "xiaodong huang" &lt;<a
            moz-do-not-send="true" href="xiaodonghuang2060@gmail.com">xiaodonghuang2060@gmail.com</a>&gt;
          wrote:<br>
          <br>
        </span></font>
      <blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span
            style="font-size:11pt">I send this message yesterday, but I
            myself donot see this message, so, I send it again, very
            sorry for the spam.<br>
            Dear gmxer's<br>
            I am simulating a protein, want to calculate the normal of
            plane for Tryptophan residue amino acid in that protein.<br>
            We need to take into account that, in simulation, atoms of
            TRP vibrate all the time, and they are not always on the
            same plane:<br>
            If they were on the same plane in my simulation, to
            calculate the normal would be rather straighforward.<br>
            As those atoms are not on the same plane, I think my
            calculation should be something like least square fitting. I
            look at g_rms command,<br>
            and plan to calculate the normal in following steps:<br>
            1. create a Tryptophan with ideal configuration, where all 8
            C atom and N atom (except CB atom) should be in the same
            plane,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;I put these 9 atoms in xy plane, and the normal of this
            TRP molecule is just z axis<br>
            2.I then calculate the rms between the TRP residue in my
            simulation and that ideal TRP molecule<br>
            3.If I know the rotate matrix (e.g. how to rotate the TRP in
            my simulation in the least-squares fitting of rms
            calculation), then I<br>
            &nbsp;&nbsp;&nbsp;just rotate z axis (0,0,1) back ( in other words,
            multiple z axis (0,0,1) with the inverse of that rotate
            matrix) to get the plane normal<br>
            &nbsp;&nbsp;&nbsp;for TRP in my simulation.<br>
            So, I am wondering how to know the the rotate matrix when
            g_rms do the least-squares fitting? Is that in the
            comparison matrix<br>
            dumped by the -bin option? If so, how to read the rotate
            matrix from that binary file produced by -bin option?<br>
            Or, if there is other way that I can calculate plane normal
            for TRP?<br>
            Thank you so much for your kind help.<br>
            yours<br>
            xiaodong<br>
            school of chem, ANU<br>
            <br>
            <hr align="CENTER" size="3" width="95%">
            <br>
          </span></font></blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>