[gmx-developers] doing energy evaluations at alternate lambda values (i.e. for bennett acceptance ratio)
David van der Spoel
spoel at xray.bmc.uu.se
Thu Jan 4 10:19:39 CET 2007
Mark Abraham wrote:
> David Mobley wrote:
>> Dear all,
>>
>> We're attempting to modify mdrun to be able to write out the system
>> total potential energy evaluated at a number of alternate lambda
>> values during a free energy calculation, when energies are written to
>> output. (The goal is to use this output for doing free energy
>> calculations with Bennett Acceptance Ratio or other methods which
>> require potential energies evaluated at a variety of alternate lambda
>> values).
>>
>> I'm assuming this would be a straightforward (perhaps 20 minutes?)
>> task for anyone who already knows the inner workings of the code, but
>> since I'm not that familiar with it, it seems a bit more difficult for
>> me. Is there anyone who wants to volunteer?
>>
>> If not, can anyone help by telling me the complete set of function
>> calls that need to be done in the inner loop of do_md(), in order to
>> safely:
>> 1) Change the current lambda value to some other lambda'
>> 2) Compute the new total energy
>> 3) Restore lambda to its original value so the simulation can continue.
>
> My feeling is that you should be able to take the call do do_force in
> do_md and loop over lambda values there. I followed down a few levels of
> functions (until my interest ran out) and I didn't see anything that
> ought to break .From having played with the assembly innerloop code, I
> can say that the lambda-interpolation is going on at that level , so I
> don't think you have any worries with breaking some data structure
> through toying with lambda at the do_md level.
>
> Assuming you can do zero-step energy "singlepoints" on a given
> configuration at various lambda values to get data to check against,
> then at the call to do_force, write a simple for loop over whatever
> range of lambda you want to use, get the potential energy at each
> iterate and write it somewhere for comparison. That's a simple test to
> see if the method works.
>
> Mark
I think Mark is right in that no harm will come of trying different
lambda values, however it is important to use the correct forces for
doing the dynamics, that is you want to stay at your fixed lambda value
for the dynamics.
So how would you specify the different lambda values that you would want
to try?
If you only do the extra lambda values at nsteout times, their
statistics will be a lot poorer of course. The statistics that you get
from normal g_energy is determined by the total number of steps, because
mdrun stores the statistics internally, independent of nsteout.
--
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596, 75124 Uppsala, Sweden
phone: 46 18 471 4205 fax: 46 18 511 755
spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the gromacs.org_gmx-developers
mailing list