Re: Alchemical FEP simulation

From: Daipayan Sarkar (
Date: Sat Nov 19 2022 - 08:10:18 CST

Hi Anirvinya,

As I mentioned in my earlier response, if you look at the underlying
probability distribution for both forward and reverse process you will
understand why you can end up with such large values for the change in
free energy with a coarse grid for lambda. The reason here is because
the sampling is not sufficient per lambda window, over the reaction path
undertaken by the alchemical transformation. For more details please
refer to the paper,;!!DZ3fjg!7dn3ySn7sMcADSasMCrbHr6aPxuA1zVBLJQXbUAict5JQr7uJeI1jX5n8sARZ-Pv6Bxy6fqKwAK27CS7kCk$ . Specifically, you
can refer to the example and discussion on the necessity to stratify the
reaction path undertaking alchemical transformation. This is also the
reference for the ParseFEP plugin available in VMD, which is used to
analyze the FEP output that NAMD generates.


On 2022-11-19 08:23, Anirvinya Gururajan wrote:
> Hi Daipayan,
> Thanks a lot for your reply.
> Given we compute FEP as a function of \lambda (PFA the image), I had a
> couple of concerns:
> 1.  It is not obvious to me why coarse-grained \lambda should result
> in free energy being inf. (Also given that energy values are
> finite - PFA)
> 2. How exactly is the ensemble averaging done? From .fepout file, I'm
> not sure how ensemble averaging is done over \lambda_i and
> \lambda_ i+1 (viz \lambda + d\lambda) with information presented
> in the file. This brings me back to 1.
> As for the endpoints are concerned, I make use of soft-core potential
> which I believe should take care of it (irrespective of the choice of
> d\lambda).
> Regards,
> Anirvinya G
> ------------------------------------------------------------------------
> *From:* Daipayan Sarkar <>
> *Sent:* Thursday, November 17, 2022 6:32 PM
> *To:* Anirvinya Gururajan <>
> *Cc:* <>
> *Subject:* Re: namd-l: Alchemical FEP simulation
> Hi Anirvinya,
> You should look at the underlying probability distribution for the
> forward and backward alchemical transformation. This can be achieved
> using the FEP output (files with .fepout extension) in the ParseFEP
> plugin in VMD
> ( Also, very
> important to look at is the BAR estimator.
> Now the range of lambda is from 0 to 1 and dlambda is how gradually
> you want your alchemical transformation to occur. This also depends on
> the atom selection the transformation is applied to, because the
> change in free energy (A -> B) is exponentially weighted for that
> selection. So yes, if you are choosing a coarse grid for lambda (such
> as dlambda = 0.1), especially at the end points of the transformation,
> it is highly likely that you will get erroneous results for the net
> free energy change. I recommend that you use a fine grid for lambda
> such as 0.01, especially at the end points of the transformation. Now,
> if you want the same grid spacing over lambda, you will need 100
> windows in each direction. This can be computationally expensive, but
> the FEP calculation implemented in NAMD3 performs well for
> applications I have worked on recently. Are you using NAMD3 to perform
> the FEP calculations? Also, you can try increasing the grid spacing to
> 0.02 and compare the results, as this would cut the number of windows
> by half.
> This is an empirical approach, and I am not aware if there is any
> theoretical framework that would provide insight into what our optimal
> lambda grid spacing should be.
> Hope this helps,
> Daipayan
> *From: *"" <> on
> behalf of Anirvinya Gururajan <>
> *Reply-To: *"" <>, Anirvinya
> Gururajan <>
> *Date: *Thursday, November 17, 2022 at 1:01 AM
> *To: *"" <>
> *Subject: *namd-l: Alchemical FEP simulation
> Hi all,
> I am trying to carry out an alchemical free energy perturbation
> simulation and I observe very high values of dG (99999999999.9999
> throughout) for all steps and all \lambda values (d\lambda = 0.1) even
> though the energy values seem reasonable. If I perform the same
> simulation but at a different d\lambda = 0.01, dG values are in a
> reasonable range. Theoretically, how does the choice of d\lambda
> affect dG given d\lambda is reasonably small and how should one go
> about choosing an optimal d\lambda? Is there any plausible way to
> circumvent this and make it work for d\lambda = 0.1?
> Regards,
> Anirvinya G

This archive was generated by hypermail 2.1.6 : Tue Dec 13 2022 - 14:32:44 CST