<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 04/05/2016 12:00 PM,
      <a class="moz-txt-link-abbreviated" href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a> wrote:<br>
    </div>
    <blockquote
cite="mid:mailman.61.1459850403.29714.gromacs.org_gmx-developers@maillist.sys.kth.se"
      type="cite">
      <pre wrap="">Send gromacs.org_gmx-developers mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:gromacs.org_gmx-developers@maillist.sys.kth.se">gromacs.org_gmx-developers@maillist.sys.kth.se</a>

To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a>

or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a>

You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:gromacs.org_gmx-developers-owner@maillist.sys.kth.se">gromacs.org_gmx-developers-owner@maillist.sys.kth.se</a>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gromacs.org_gmx-developers digest..."


Today's Topics:

   1. Re: Which nonlinear constraint equation is being solved in
      GROMACS subroutine cshake()? (Berk Hess)


----------------------------------------------------------------------

Message: 1
Date: Mon, 4 Apr 2016 14:32:04 +0200
From: Berk Hess <a class="moz-txt-link-rfc2396E" href="mailto:hess@kth.se">&lt;hess@kth.se&gt;</a>
To: <a class="moz-txt-link-abbreviated" href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a>
Subject: Re: [gmx-developers] Which nonlinear constraint equation is
        being solved in GROMACS subroutine cshake()?
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:57025EC4.30403@kth.se">&lt;57025EC4.30403@kth.se&gt;</a>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

Hi,

You have identified the correct function.
The exact Lagrange multiplier is described in a comment in the code:
scaled_lagrange_multiplier    Scaled Lagrange multiplier for each 
constraint (-2 * eta from p. 336
  *                                             of the paper, divided by 
the constraint distance)

But SHAKE is almost never used in GROMACS, because LINCS is faster and 
especially because SHAKE is ill suited for parallelization over MPI. The 
only other constraint method I know of that would be suitable is CG 
MSHAKE, for a comparison with SHAKE and LINCS see:
<a class="moz-txt-link-freetext" href="http://link.springer.com/article/10.1140%2Fepjst%2Fe2011-01525-9">http://link.springer.com/article/10.1140%2Fepjst%2Fe2011-01525-9</a>
But there would not be any significant advantage over LINCS.

Cheers,

Berk


</pre>
    </blockquote>
    <font face="Courier New, Courier, monospace">Hello,<br>
      <br>
      Thank you very much for confirming that I have identified the
      exact constraint functions used by cshake().<br>
      <br>
      Would you please consider the second part of my conjecture and
      confirm if I have the correct vector equation as well? Again, even
      the smallest detail, such as the exact scaling of the Lagrange
      multiplier is critical. As I stated in my first email, I believe
      that cshake() is solving the non linear vector equation<br>
      <br>
      g(rprime - inv(M)*Dg(r)*lambda) = 0<br>
      <br>
      where<br>
      <br>
      rprime is the unconstrained atomic coordinates for the next time
      step<br>
      r      is the constrained atomic coordinates at at current time
      step<br>
      M      is the diagonal mass matrix<br>
      lambda is a Lagrange multiplier<br>
      <br>
      cshake return both the new constrained atomic coordinates rnew
      given by<br>
      <br>
      rnew:=</font><font face="Courier New, Courier, monospace"><font
        face="Courier New, Courier, monospace">rprime -
        inv(M)*Dg(r)*lambda<br>
        <br>
        and the vector lambda itself.<br>
        <br>
      </font>I am afraid that the comment in cshake() which you refer to
      has been a source of confusion for me. In particular, there is no
      Greek letter eta used on page 336 of the original SHAKE paper.
      Moreover, I have not been able to find any evidence of any
      division with the constraint distance.<br>
    </font><br>
    <font face="Courier New, Courier, monospace">Kind regards<br>
      <br>
      Carl Christian<br>
    </font><font face="Courier New, Courier, monospace">
    </font>
  </body>
</html>