RE: Excessively high dE_avg values in FEP output (NAMD CVS)

From: Radak, Brian K (bradak_at_anl.gov)
Date: Fri May 20 2016 - 11:58:43 CDT

I had noticed that too, but there was no scaling of the bonded terms being done in the example Reza sent.

I've avoided cleaning up the FEP code mostly bc I don't understand the WCA code front to back. IMO there shouldn't even be two separate computations of dE. Nonetheless, this will hopefully get done at some point.

I know that everyone has their preferred analysis approach, but I strongly suggest the TI output for now since it is most flexible after the fact.

Cheers,
Brian

Brian Radak
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

9700 South Cass Avenue, Bldg. 240
Argonne, IL 60439-4854
(630) 252-8643
brian.radak_at_anl.gov

________________________________________
From: Jrme Hnin [jerome.henin_at_ibpc.fr]
Sent: Friday, May 20, 2016 10:25 AM
To: Namd Mailing List; Radak, Brian K
Cc: Reza Salari
Subject: Re: namd-l: Excessively high dE_avg values in FEP output (NAMD CVS)

Looking at the code again, I just noticed this: Controller::outputFepEnergy and Controller::writeFepEnergyData don't use the same expression for dE - one is missing the bonded terms. This explains the discrepancy, it is fixed by:
Index: src/Controller.C
===================================================================
RCS file: /namd/cvsroot/namd2/src/Controller.C,v
retrieving revision 1.1314
diff -r1.1314 Controller.C
2994c2994,2996
< BigReal dE = eeng_f + ljEnergy_f - eeng - ljEnergy;

---
>   BigReal dE = bondedEnergy_f + electEnergy_f + electEnergySlow_f + ljEnergy_f
>                - (bondEnergy + angleEnergy + dihedralEnergy + improperEnergy
>                   + electEnergy + electEnergySlow + ljEnergy);
Maybe we need unit tests for these things. If only we had an occasion to meet and discuss issues with NAMD development...
Jerome
On 20 May 2016 at 14:47, Brian Radak <bradak_at_anl.gov<mailto:bradak_at_anl.gov>> wrote:
Nothing looks particularly wrong there. The only "strange" thing is the accumulation of average alchemical force during TI, but it is always assumed that this will get masked out during integration.
Since you only have one alchemical group, it should be trivial to compare forces and energies with a non-alchemical run. However these will, in general, only match exactly with "alchDecouple off" and "alchBondDecouple on" while you have the opposite settings I believe (we chose terrible output vocabulary for that). Unless you really know what you are wanting to calculate, I recommend those settings anyway.
Let me know if that doesn't help,
Brian
On 05/19/2016 05:21 PM, Reza Salari wrote:
Hi Brian,
Sure. I ran a quick test with the updated parameters (as you suggested) and put the ti.out and logfile here: <https://gist.github.com/resal81/250d65964d72dd85759a26e8b9bb0a20#gistcomment-1782098> https://gist.github.com/resal81/250d65964d72dd85759a26e8b9bb0a20#gistcomment-1782098 .
Best,
Reza
=========================================
Reza Salari, M.D. Ph.D.
Postdoctoral Researcher
Center for Computational and Integrative Biology
Rutgers University
Science Building
Camden, NJ 08102
(856) 225-6492
=========================================
On Wed, May 18, 2016 at 2:25 PM, Brian Radak <bradak_at_anl.gov<mailto:bradak_at_anl.gov>> wrote:
Thanks for the notice Jerome.
Yes, that is quite possibly a bug. I admittedly have not been as careful with the FEP code base while implementing the new bonded scaling code, etc.
Reza -
Can you try the same calculation using "alchType TI" and using the same seed value? You can send me the output logs for 10 steps or so off list (also set outputEnergies 1 and alchOutFreq 1, if you would). I will be worried (and act with haste accordingly) if the energies diverge very quickly. Divergence of the alchemical force should also indicate if some other problem is at play.
Cheers,
Brian
On 05/17/2016 02:44 PM, Jrme Hnin wrote:
Yup, this isn't a colvars issue, I think it may have to do with the recent alchemy improvements by Brian Radak. Let me CC him to get his attention... :-)
Jerome
On 17 May 2016 at 21:20, Reza Salari <<mailto:resal81_at_gmail.com>resal81_at_gmail.com<mailto:resal81_at_gmail.com>> wrote:
Hi Giacomo,
I repeated my test simulation without colvars and it seems that the problem still persists. I provided more info here: https://gist.github.com/resal81/250d65964d72dd85759a26e8b9bb0a20
Reza
=========================================
Reza Salari, M.D. Ph.D.
Postdoctoral Researcher
Center for Computational and Integrative Biology
Rutgers University
Science Building
Camden, NJ 08102
(856) 225-6492
=========================================
On Mon, May 16, 2016 at 7:51 PM, Giacomo Fiorin <<mailto:giacomo.fiorin_at_gmail.com>giacomo.fiorin_at_gmail.com<mailto:giacomo.fiorin_at_gmail.com>> wrote:
Hi Reza can you post the complete output of NAMD (including colvars output)?
The error could come from the latest NAMD, the latest colvars snapshot (not merged into NAMD yet), or by an interaction between the two.
Although you probably want to keep the colvars restraints to continue your production run, it may also be a good idea to disable colvars and see if this will gives a consistent behavior between NAMD 2.11 and CVS.
Giacomo
On May 16, 2016 5:30 PM, "Reza Salari" <<mailto:resal81_at_gmail.com>resal81_at_gmail.com<mailto:resal81_at_gmail.com>> wrote:
Hi,
I'm running some FEP tests on Stampede using the development versions of NAMD and Colvars (from CVS and github, respectively) and noticed very large dE_avg (and subsequently dG) values in the fepout files:
          STEP                 Elec                            vdW                    dE           dE_avg         Temp             dG
#                           l             l+dl             l            l+dl         E(l+dl)-E(l)
#NEW FEP WINDOW: LAMBDA SET TO 0.89 LAMBDA2 0.9
FepEnergy:     50    -172948.7128   -172948.7462      3821.4453      3822.1917         0.7129    -36458.2406       300.2047 -9999999999.9999
FepEnergy:    100    -172545.4504   -172545.4839      3375.0287      3375.7949         0.7328    -36445.1885       301.0309 -9999999999.9999
FepEnergy:    150    -173167.4969   -173167.5303      3786.2865      3786.9088         0.5888    -36445.1217       302.0768 -9999999999.9999
FepEnergy:    200    -172776.3445   -172776.3780      3466.1294      3466.9678         0.8050    -36458.5775       301.4277 -9999999999.9999
FepEnergy:    250    -172866.1536   -172866.1870      3604.4608      3605.2236         0.7293    -36456.9526       300.7179 -9999999999.9999
The compile script is attached at the end. I think this is a bug - possibly because dE_avg is not initially set to the dE value of the first step. In the meantime the dG values are recoverable by using dE and Temp directly.
Best Regards,
Reza Salari
#===================================================
System: Stampede
Loaded modules:
$ module list
  1) intel/15.0.2   2) mvapich2/2.1   3) xalt/0.6   4) TACC
#===================================================
#!/usr/bin/env bash
set -e
NAMD_VERSION="2016-05-09"
download_namd () {
    wget <http://www.ks.uiuc.edu/Research/namd/cvs/download/741376/NAMD_CVS-$> http://www.ks.uiuc.edu/Research/namd/cvs/download/741376/NAMD_CVS-${NAMD_VERSION}_Source.tar.gz
    tar xzf NAMD_CVS-${NAMD_VERSION}_Source.tar.gz
    ln -s NAMD_CVS-${NAMD_VERSION}_Source namd_cvs
}
download_colvars () {
    wget <https://github.com/colvars/colvars/archive/master.zip> https://github.com/colvars/colvars/archive/master.zip
    unzip master.zip
    ln -s colvars-master colvars
}
download_fftw_tcl () {
    cd namd_cvs
    wget <http://www.ks.uiuc.edu/Research/namd/libraries/fftw-linux-x86_64.tar.gz> http://www.ks.uiuc.edu/Research/namd/libraries/fftw-linux-x86_64.tar.gz
    tar xzf fftw-linux-x86_64.tar.gz
    ln -s linux-x86_64 fftw
    wget <http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64.tar.gz> http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64.tar.gz
    tar xzf tcl8.5.9-linux-x86_64.tar.gz
    ln -s tcl8.5.9-linux-x86_64 tcl
    wget <http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64-threaded.tar.gz> http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64-threaded.tar.gz
    tar xzf tcl8.5.9-linux-x86_64-threaded.tar.gz
    ln -s tcl8.5.9-linux-x86_64-threaded tcl-threaded
    cd ..
}
patch_namd () {
    cd colvars
    ./update-colvars-code.sh -f ../namd_cvs
    cd ..
}
compile_charm () {
    cd namd_cvs
    tar xf charm-*
    cd charm-*
    env MPICXX=mpicxx ./build charm++ mpi-linux-x86_64 --no-build-shared --with-production
    cd ../..
}
config_namd () {
    cd namd_cvs
    ./config Linux-x86_64-icc --charm-arch mpi-linux-x86_64
    cd ..
}
compile_namd () {
    cd namd_cvs
    cd Linux-x86_64-icc
    make depends
    make -j 4 release
    cd ../..
}
download_namd
download_colvars
download_fftw_tcl
patch_namd
compile_charm
config_namd
compile_namd
#===================================================
=========================================
Reza Salari, M.D. Ph.D.
Postdoctoral Researcher
Center for Computational and Integrative Biology
Rutgers University
Science Building
Camden, NJ 08102
(856) 225-6492<tel:%28856%29%20225-6492>
=========================================
--
Brian Radak
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
9700 South Cass Avenue, Bldg. 240
Argonne, IL 60439-4854
(630) 252-8643<tel:%28630%29%20252-8643>
brian.radak_at_anl.gov<mailto:brian.radak_at_anl.gov>
--
Brian Radak
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
9700 South Cass Avenue, Bldg. 240
Argonne, IL 60439-4854
(630) 252-8643
brian.radak_at_anl.gov<mailto:brian.radak_at_anl.gov>

This archive was generated by hypermail 2.1.6 : Sun Dec 31 2017 - 23:20:27 CST