<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-family: &quot;Times New Roman&quot;, Times, serif;" dir="ltr">
<p><font color="#212121"><span style="font-size: 15px;">I attempted to respond but I got an error that the message was too large so I'm re-sending.</span></font></p>
<p><font color="#212121"><span style="font-size: 15px;"><br>
</span></font></p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><span style="color: rgb(33, 33, 33); font-size: 15px;">This was very helpful, thank you. It confirms that I was on the right path. I’m storing the averages of the enerd-&gt;term[F_DVDL&#43;i] terms in a 2d array, we’ll
 call it dfhist-&gt;dfavg[efptNR][nlim].&nbsp;I’ve become very intimate with Gromacs expanded ensemble code so, as you know, efptNR is the number of possible lambda types (coul, vdw, etc…) and nlim is the number of lambdas defined in the mdp file. AIM uses the average
 of dU/dL in the acceptance criteria, so I am storing the individual type (like dU[Coul]/dL) by lambda index. Does that make sense?</span></p>
<div style="color: rgb(33, 33, 33); font-size: 15px;"><br>
</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;">You are correct in your assessment that I am only accessing the arrays inside the ExpandedEnsembleDynamics methods. I’ve simply added AIM as part of the &nbsp;expand-&gt;elmcmove enum where it is used inside the
 ChooseNewLambda() method to choose lamnew.&nbsp;</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;"><br>
</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;">When you say</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;"><br>
</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;">
<div style="margin: 14pt 30pt;">
<div style="margin: 0px;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><font face="Calibri" size="2"><span style="font-size: 11pt;">The potential energy differences are calculated from: from enerd-&gt;enerpart_lambda[i&#43;1]-enerd-&gt;enerpart_lambda[0]</span></font></span></font></div>
<div>
<div style="margin: 0px;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><font face="Calibri" size="2"><span style="font-size: 11pt;">&nbsp;</span></font></span></font></div>
<div style="margin: 0px;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><font face="Calibri" size="2"><span style="font-size: 11pt;">If you are only interested in the neighboring differences, the can be calculated from enerd-&gt;enerpart_lambda[i&#43;1]-
 enerd-&gt;enerpart_lambda[i] (as the [0] component cancels out).</span></font></span></font></div>
</div>
</div>
<br>
</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;">Do you mean the difference as in U(lamnew, x) - U(fep_state,x) or do you mean the differences of the potential energy at each lambda index?&nbsp;</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;"><br>
</div>
<div style="color: rgb(33, 33, 33); font-size: 15px;">Thank you,</div>
<br>
<p></p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">-ChrisM</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<div id="Signature" style="color: rgb(0, 0, 0); font-size: 12pt;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:'Times New Roman'; font-size:16px">Christopher A. Mirabzadeh</div>
<div style="font-family:'Times New Roman'; font-size:16px">Research Assistant/Physics Instructor</div>
<div style="font-family:'Times New Roman'; font-size:16px">Physics Department</div>
<div style="font-family:'Times New Roman'; font-size:16px">University of Idaho, Moscow</div>
<div style="font-family:'Times New Roman'; font-size:16px">509-339-5647</div>
</div>
</div>
</div>
</div>
</body>
</html>