<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">But note that in 4.6 with SIMD
      (SSE/AVX) enablebd, dihedrals mostly (when only forces, no
      energies are needed) get calculated by a special SIMD dihedral
      function. You will need modifiy the conditional such that the
      plain C function always gets called.<br>
      <br>
      Cheers,<br>
      <br>
      Berk<br>
      <br>
      On 09/26/2013 08:04 AM, MURAT OZTURK wrote:<br>
    </div>
    <blockquote
cite="mid:CAHz3uEUcF0dcyAGpVqSxw4_bGPtJgjnAuV5xRAHvdU=AT6YA_Q@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">Thank you very much. I need to build a toy system
        to test it, but sounds just about right. I might even hard-code
        the square of threshold to save another flop, following your
        philosophy. A flop is a flop :)
        <div>
          <br>
        </div>
        <div>Again, thank you.&nbsp;</div>
        <div><br>
        </div>
        <div>Murat</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Sep 26, 2013 at 12:10 AM,
          Bogdan Costescu <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:bcostescu@gmail.com" target="_blank">bcostescu@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">
            <div class="im">On Wed, Sep 25, 2013 at 5:29 PM, MURAT
              OZTURK &lt;<a moz-do-not-send="true"
                href="mailto:murozturk@ku.edu.tr">murozturk@ku.edu.tr</a>&gt;
              wrote:<br>
              &gt; Is it OK to intorduce the conditional into pdihs(),
              and bypass even calling<br>
              &gt; dopdihs() if r_kj &nbsp;( as reported by calling
              dih_angle() ) is less then<br>
              &gt; threshold?<br>
              <br>
            </div>
            Yes. It makes sense to abort calculating as soon as you have
            enough<br>
            information to make the decision. You can place your test
            immediately<br>
            after calling dih_angle(), as it gives you r_jk. The code
            could look<br>
            like (based on your own proposal):<br>
            <br>
            /* outside of the loop */<br>
            threshold2 = threshold * threshold;<br>
            <br>
            for (i = 0; (i &lt; nbonds); )<br>
            {<br>
            &nbsp; ...<br>
            &nbsp; phi = dih_angle(...)<br>
            &nbsp; midDist2 = iprod(r_jk, r_jk);<br>
            &nbsp; if (midDist2 &gt; threshold2)<br>
            &nbsp; &nbsp; continue;<br>
            &nbsp; ...<br>
            }<br>
            <br>
            Please note the comparison done on the squares of distances
            instead of<br>
            distances, saving some CPU cycles.<br>
            <br>
            Good luck!<br>
            <span class="HOEnZb"><font color="#888888">Bogdan<br>
              </font></span>
            <div class="HOEnZb">
              <div class="h5">--<br>
                gmx-developers mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.gromacs.org/mailman/listinfo/gmx-developers"
                  target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><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-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>