<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hello. Thanks!
<div class=""><br class="">
</div>
<div class="">I actually want to do calculations between lambda steps inside of GROMACS code, before the end of the simulation.</div>
<div class=""><br class="">
</div>
<div class="">-ChrisM</div>
<div class=""><br class="">
<div class="">Mirabzadeh, Christopher&nbsp;<br class="">
Graduate&nbsp;Research Assistant/Physics&nbsp;Instructor<br class="">
Department of Physics<br class="">
University of Idaho<br class="">
Moscow, Id<br class="">
(509)339-5647<br class="">
<br class="">
<br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 20, 2017, at 4:14 PM, Michael R Shirts &lt;<a href="mailto:Michael.Shirts@Colorado.EDU" class="">Michael.Shirts@Colorado.EDU</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">Hi, Chris-<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">So, the dhdl.xvg output prints the potential energy difference between neighboring simulations (for BAR, MBAR, etc.), and the dh/dl values (for TI).&nbsp; So that file should have all the information
 you need for any method – you can see the<span class="Apple-converted-space">&nbsp;</span><a href="https://github.com/MobleyLab/alchemical-analysis/" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">https://github.com/MobleyLab/alchemical-analysis/</a><span class="Apple-converted-space">&nbsp;</span>scripts
 for how this information is used.<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">The ROUTE to getting the values right is rather complicated for a number of reasons.&nbsp; So before answering in more detail-<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman'; text-indent: -0.25in;" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><span class="">1.<span style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span></span></span><span style="font-size: 11pt; font-family: Calibri;" class="">If
 you want to just USE this information, it’s all output by GROMACS already.<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman'; text-indent: -0.25in;" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><span class="">2.<span style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span></span></span><span style="font-size: 11pt; font-family: Calibri;" class="">If
 you want to MODIFY what GROMACS is outputting, can you be more specific what you want to do?<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></span></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">~~~~~~~~~~~~~~~~<o:p class=""></o:p></span></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">Michael Shirts<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">Associate Professor<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><a href="mailto:michael.shirts@colorado.edu" style="color: rgb(149, 79, 114); text-decoration: underline;" class=""><span style="color: blue;" class="">michael.shirts@colorado.edu</span></a><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><a href="http://www.colorado.edu/lab/shirtsgroup/" style="color: rgb(149, 79, 114); text-decoration: underline;" class=""><span style="color: blue; text-decoration: none;" class="">http://www.colorado.edu/lab/shirtsgroup/</span></a><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">Phone: (303) 735-7860<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">Office: JSCBB C123<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">Department of Chemical and Biological Engineering<o:p class=""></o:p></span></div>
</div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class="">University of Colorado Boulder</span><span style="font-size: 11pt; font-family: Calibri;" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="font-size: 11pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in;" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<b class=""><span style="font-family: Calibri;" class="">From:<span class="Apple-converted-space">&nbsp;</span></span></b><span style="font-family: Calibri;" class="">&lt;<a href="mailto:gromacs.org_gmx-developers-bounces@maillist.sys.kth.se" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">gromacs.org_gmx-developers-bounces@maillist.sys.kth.se</a>&gt;
 on behalf of &quot;Mirabzadeh, Christopher (<a href="mailto:mira2978@vandals.uidaho.edu" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mira2978@vandals.uidaho.edu</a>)&quot; &lt;<a href="mailto:mira2978@vandals.uidaho.edu" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mira2978@vandals.uidaho.edu</a>&gt;<br class="">
<b class="">Reply-To:<span class="Apple-converted-space">&nbsp;</span></b>&quot;<a href="mailto:gmx-developers@gromacs.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">gmx-developers@gromacs.org</a>&quot; &lt;<a href="mailto:gmx-developers@gromacs.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">gmx-developers@gromacs.org</a>&gt;<br class="">
<b class="">Date:<span class="Apple-converted-space">&nbsp;</span></b>Thursday, April 20, 2017 at 5:01 PM<br class="">
<b class="">To:<span class="Apple-converted-space">&nbsp;</span></b>&quot;<a href="mailto:gmx-developers@gromacs.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">gmx-developers@gromacs.org</a>&quot; &lt;<a href="mailto:gmx-developers@gromacs.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">gmx-developers@gromacs.org</a>&gt;<br class="">
<b class="">Subject:<span class="Apple-converted-space">&nbsp;</span></b>[gmx-developers] energy difference for lambda in free energy calculations<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
Hello all,<span class="Apple-converted-space">&nbsp;</span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
What I’m trying to do is get the energy difference between neighboring expanded ensemble simulations, i.e U(lambda_trial, x) - U(lambda_current, x). As such, I am trying to better understand the de term used in expanded ensemble calculations (de = weighted_lamee[lamtrial]
 - weighted_lamee[fep_state]).&nbsp;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
It is defined in forcerec.h as:<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
typedef struct {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; real &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;term[F_NRE]; &nbsp; &nbsp; &nbsp; &nbsp; /* The energies for all different interaction types */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; gmx_grppairener_t grpp;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; double &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dvdl_lin[efptNR]; &nbsp; &nbsp;/* Contributions to dvdl with linear lam-dependence */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; double &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dvdl_nonlin[efptNR]; /* Idem, but non-linear dependence &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n_lambda;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fep_state; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*current fep state -- just for printing */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<span style="color: rgb(255, 38, 0);" class="">&nbsp; &nbsp; double &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *enerpart_lambda; &nbsp; &nbsp; /* Partial energy for lambda and flambda[] */</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; real &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;foreign_term[F_NRE]; /* alternate array for storing foreign lambda energies */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; gmx_grppairener_t foreign_grpp; &nbsp; &nbsp; &nbsp; &nbsp;/* alternate array for storing foreign lambda energies */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
} gmx_enerdata_t;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
/* The idea is that dvdl terms with linear lambda dependence will be added<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp;* automatically to enerpart_lambda. Terms with non-linear lambda dependence<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp;* should explicitly determine the energies at foreign lambda points<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp;* when n_lambda &gt; 0.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp;*/<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
I see that this term is used in the xvg output inside of mdebin.c and&nbsp;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; /* BAR &#43; thermodynamic integration values */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; if ((md-&gt;fp_dhdl || md-&gt;dhc) &amp;&amp; bDoDHDL)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; for (i = 0; i &lt; enerd-&gt;n_lambda-1; i&#43;&#43;)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* zero for simulated tempering */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; md-&gt;dE[i] = enerd-&gt;enerpart_lambda[i&#43;1]-enerd-&gt;enerpart_lambda[0];<o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
……<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
Also, in the replica exchange code (repl_ex.c) we find this term again;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp;if (re-&gt;type == ereLAMBDA || re-&gt;type == ereTL)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; bDLambda = TRUE;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; /* lambda differences. */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; /* de[i][j] is the energy of the jth simulation in the ith Hamiltonian<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;minus the energy of the jth simulation in the jth Hamiltonian */<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; for (i = 0; i &lt; re-&gt;nrepl; i&#43;&#43;)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (j = 0; j &lt; re-&gt;nrepl; j&#43;&#43;)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; re-&gt;de[i][j] = 0;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; }<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; for (i = 0; i &lt; re-&gt;nrepl; i&#43;&#43;)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; re-&gt;de[i][re-&gt;repl] = (enerd-&gt;enerpart_lambda[(int)re-&gt;q[ereLAMBDA][i]&#43;1]-enerd-&gt;enerpart_lambda[0]);<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; ……<o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
I’m trying to understand how this term is used in Thermodynamic integration (Pymbar for instance). Also, I’ve noticed that the enerd-&gt;enerpart_lambda[0] term is only updated every nstenergy step. Could anyone explain what the 0 term is and how this enerpart_lambda[i]-enerpart_lambda[0]
 term would be used in TI?&nbsp;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
The bottom line is that I need the correct value for the energy difference between neighboring lambda simulations. Does the de term do that for me?&nbsp;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
If de is the correct term, is delta lambda part of the calculation? The reason I ask this question is from not understanding the output of debug information in force.c, specifically;<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (debug)<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(debug, &quot;enerdiff lam %g: (%15s), non-linear %f linear %f*%f\n&quot;,<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fepvals-&gt;all_lambda[j][i], efpt_names[j],<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (enerd-&gt;enerpart_lambda[i&#43;1] - enerd-&gt;enerpart_lambda[0]),<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dlam, enerd-&gt;dvdl_lin[j]);<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
Does this mean that the energy difference is &nbsp;(enerd-&gt;enerpart_lambda[i&#43;1] - enerd-&gt;enerpart_lambda[0]) &#43; dlam*dvdl_lin[i]? I’m very confused.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
Thanks,<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
-ChrisM<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: 'Times New Roman';">
Mirabzadeh, Christopher&nbsp;<br class="">
Graduate&nbsp;Research Assistant/Physics&nbsp;Instructor<br class="">
Department of Physics<br class="">
University of Idaho<br class="">
Moscow, Id<br class="">
(509)339-5647<br class="">
<br class="">
<o:p class=""></o:p></p>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman';" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
</div>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">--<span class="Apple-converted-space">&nbsp;</span></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">Gromacs
 Developers mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">*
 Please search the archive at<span class="Apple-converted-space">&nbsp;</span></span><a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>before
 posting!</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">*
 Can't post? Read<span class="Apple-converted-space">&nbsp;</span></span><a href="http://www.gromacs.org/Support/Mailing_Lists" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">http://www.gromacs.org/Support/Mailing_Lists</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">*
 For (un)subscribe requests visit</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>or
 send a mail to<span class="Apple-converted-space">&nbsp;</span></span><a href="mailto:gmx-developers-request@gromacs.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">gmx-developers-request@gromacs.org</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">.</span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>