Skip to content

Commit

Permalink
Regression test for lambda-ABF in NAMD
Browse files Browse the repository at this point in the history
Had to force single-thread calculation to work around unreliable results on the singel timestep level
  • Loading branch information
jhenin committed Aug 30, 2024
1 parent 8507083 commit f580527
Show file tree
Hide file tree
Showing 18 changed files with 436 additions and 5 deletions.
122 changes: 122 additions & 0 deletions namd/tests/interface/009_lambda_dynamics/AutoDiff/test.colvars.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
colvars: ----------------------------------------------------------------------
colvars: Please cite Fiorin et al, Mol Phys 2013:
colvars: https://doi.org/10.1080/00268976.2013.813594
colvars: as well as all other papers listed below for individual features used.
colvars: This version was built with the C++11 standard or higher.
colvars: Summary of compile-time features available in this build:
colvars: - SMP parallelism: enabled (num. threads = 1)
colvars: - Lepton custom functions: available
colvars: - Tcl interpreter: available
colvars: Redefining the Tcl "cv" command to the new script interface.
colvars: The restart output state file will be "test.tmp.colvars.state".
colvars: The final output state file will be "test.colvars.state".
colvars: ----------------------------------------------------------------------
colvars: Reading new configuration from file "test.in":
colvars: # units = "" [default]
colvars: # smp = on [default]
colvars: # colvarsTrajFrequency = 1
colvars: # colvarsRestartFrequency = 10
colvars: # scriptedColvarForces = off [default]
colvars: # scriptingAfterBiases = off [default]
colvars: # sourceTclFile = "" [default]
colvars: ----------------------------------------------------------------------
colvars: Initializing a new collective variable.
colvars: # name = "lambda"
colvars: Initializing a new "alchLambda" component.
colvars: # name = "" [default]
colvars: # componentCoeff = 1 [default]
colvars: # componentExp = 1 [default]
colvars: # period = 0 [default]
colvars: # wrapAround = 0 [default]
colvars: # forceNoPBC = off [default]
colvars: # scalable = on [default]
colvars: All components initialized.
colvars: # timeStepFactor = 1 [default]
colvars: # width = 1 [default]
colvars: # lowerBoundary = 0
colvars: # upperBoundary = 1
colvars: # hardLowerBoundary = off [default]
colvars: # hardUpperBoundary = off [default]
colvars: # expandBoundaries = off [default]
colvars: # extendedLagrangian = on
colvars: Enabling the extended Lagrangian term for colvar "lambda".
colvars: # extendedTemp = 300 [default]
colvars: # extendedMass = 150000
colvars: # outputEnergy = off [default]
colvars: # extendedLangevinDamping = 1 [default]
colvars: # reflectingLowerBoundary = on
colvars: # reflectingUpperBoundary = on
colvars: # outputValue = on [default]
colvars: # outputVelocity = off [default]
colvars: # outputTotalForce = on
colvars: # outputAppliedForce = on
colvars: # subtractAppliedForce = off [default]
colvars: # runAve = off [default]
colvars: # corrFunc = off [default]
colvars: ----------------------------------------------------------------------
colvars: Collective variables initialized, 1 in total.
colvars: ----------------------------------------------------------------------
colvars: Initializing a new "abf" instance.
colvars: # name = "abf1" [default]
colvars: # colvars = { lambda }
colvars: # stepZeroData = off [default]
colvars: # outputEnergy = off [default]
colvars: # outputFreq = 10 [default]
colvars: # timeStepFactor = 1 [default]
colvars: # applyBias = on [default]
colvars: # hideJacobian = off [default]
colvars: Jacobian (geometric) forces will be included in reported free energy gradients.
colvars: # fullSamples = 0
colvars: # minSamples = 0 [default]
colvars: # inputPrefix = [default]
colvars: # historyFreq = 0 [default]
colvars: # shared = off [default]
colvars: # updateBias = on [default]
colvars: # maxForce = [default]
colvars: # integrate = on [default]
colvars: Finished ABF setup.
colvars: ----------------------------------------------------------------------
colvars: Collective variables biases initialized, 1 in total.
colvars: ----------------------------------------------------------------------
colvars: Collective variables module (re)initialized.
colvars: ----------------------------------------------------------------------
colvars: Updating NAMD interface:
colvars: updating atomic data (0 atoms).
colvars: updating group data (0 scalable groups, 0 atoms in total).
colvars: updating grid object data (0 grid objects in total).
colvars:
colvars: SUMMARY OF COLVARS FEATURES USED SO FAR AND THEIR CITATIONS:
colvars:
colvars: - BAOA integrator:
colvars: BouRabee2010 https://doi.org/10.1137/090758842
colvars:
colvars: - Colvars module:
colvars: - Colvars-NAMD interface:
colvars: Fiorin2013 https://doi.org/10.1080/00268976.2013.813594
colvars:
colvars: - ABF colvar bias implementation:
colvars: - Internal-forces free energy estimator:
colvars: Henin2010 https://doi.org/10.1021/ct9004432
colvars:
colvars: - alchLambda colvar component:
colvars: Lagardere2023 https://arxiv.org/abs/2307.08006
colvars:
colvars: - NAMD engine:
colvars: Phillips2020 https://doi.org/10.1063/5.0014475
colvars:
colvars: updating target temperature (T = 300 K).
colvars: Updating NAMD interface:
colvars: updating atomic data (0 atoms).
colvars: updating group data (0 scalable groups, 0 atoms in total).
colvars: updating grid object data (0 grid objects in total).
colvars: updating target temperature (T = 300 K).
colvars: Current simulation parameters: initial step = 0, integration timestep = 1
colvars: Updating atomic parameters (masses, charges, etc).
colvars: The restart output state file will be "test.tmp.colvars.state".
colvars: Initializing extended coordinate to colvar value.
colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj".
colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj".
colvars: Saving collective variables state to "test.tmp.colvars.state".
colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj".
colvars: Saving collective variables state to "test.tmp.colvars.state".
colvars: Saving collective variables state to "test.colvars.state".
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
configuration {
step 20
dt 1.000000e+00
}

colvar {
name lambda
x 0.20245122980265
extended_x 0.20245122980265
extended_v 0.00015391572142221
}

abf {
configuration {
step 20
name abf1
}

samples
20

gradient
-8.0141711538951
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# step lambda ft_lambda fa_lambda
0 2.00000000000000e-01 0.00000000000000e+00 0.00000000000000e+00
1 1.99992395820152e-01 7.96684221784716e+00 -7.96684221784716e+00
2 1.99901022015639e-01 7.88324824580072e+00 -7.92504523182394e+00
3 1.99800875537990e-01 7.80665457013810e+00 -7.88558167792866e+00
4 1.99762218563404e-01 7.73048537492151e+00 -7.84680760217688e+00
5 1.99769367689661e-01 7.65449840553533e+00 -7.80834576284857e+00
6 1.99807952653923e-01 7.58324655116611e+00 -7.77082922756816e+00
7 1.99845484395962e-01 7.52736002846028e+00 -7.73604791340989e+00
8 1.99869775547569e-01 7.50005661145498e+00 -7.70654900066553e+00
9 1.99836075126736e-01 7.51578941134210e+00 -7.68535349074070e+00
10 1.99812694785606e-01 7.57995782043818e+00 -7.67481392371045e+00
11 1.99873218443446e-01 7.69049228724148e+00 -7.67623922948600e+00
12 2.00011013975393e-01 7.84032662263539e+00 -7.68991317891511e+00
13 2.00168434974116e-01 8.01767282114353e+00 -7.71512545908653e+00
14 2.00359096146772e-01 8.20385566003222e+00 -7.75003475915408e+00
15 2.00679173048730e-01 8.37628507963051e+00 -7.79178478051917e+00
16 2.01074279279389e-01 8.52227734901836e+00 -7.83744056605037e+00
17 2.01467672933468e-01 8.63554749590671e+00 -7.88438803251251e+00
18 2.01869356438853e-01 8.71184768812576e+00 -7.93035801337991e+00
19 2.02221179933948e-01 8.75639425563999e+00 -7.97383360507781e+00
20 2.02451229802647e-01 8.78058458142414e+00 -8.01417115389513e+00
4 changes: 4 additions & 0 deletions namd/tests/interface/009_lambda_dynamics/AutoDiff/test.count
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 1
# 0.00000000000000e+00 1.00000000000000e+00 1 0

5.00000000000000e-01 20
4 changes: 4 additions & 0 deletions namd/tests/interface/009_lambda_dynamics/AutoDiff/test.grad
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 1
# 0.00000000000000e+00 1.00000000000000e+00 1 0

5.00000000000000e-01 -8.01417115389513e+00
5 changes: 5 additions & 0 deletions namd/tests/interface/009_lambda_dynamics/AutoDiff/test.pmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1
# -5.00000000000000e-01 1.00000000000000e+00 2 0

0.00000000000000e+00 8.01417115389513e+00
1.00000000000000e+00 0.00000000000000e+00
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
colvars: ----------------------------------------------------------------------
colvars: Please cite Fiorin et al, Mol Phys 2013:
colvars: https://doi.org/10.1080/00268976.2013.813594
colvars: as well as all other papers listed below for individual features used.
colvars: This version was built with the C++11 standard or higher.
colvars: Summary of compile-time features available in this build:
colvars: - SMP parallelism: enabled (num. threads = 1)
colvars: - Lepton custom functions: available
colvars: - Tcl interpreter: available
colvars: Redefining the Tcl "cv" command to the new script interface.
colvars: The restart output state file will be "test.restart.tmp.colvars.state".
colvars: The final output state file will be "test.restart.colvars.state".
colvars: ----------------------------------------------------------------------
colvars: Reading new configuration from file "test.in":
colvars: # units = "" [default]
colvars: # smp = on [default]
colvars: # colvarsTrajFrequency = 1
colvars: # colvarsRestartFrequency = 10
colvars: # scriptedColvarForces = off [default]
colvars: # scriptingAfterBiases = off [default]
colvars: # sourceTclFile = "" [default]
colvars: ----------------------------------------------------------------------
colvars: Initializing a new collective variable.
colvars: # name = "lambda"
colvars: Initializing a new "alchLambda" component.
colvars: # name = "" [default]
colvars: # componentCoeff = 1 [default]
colvars: # componentExp = 1 [default]
colvars: # period = 0 [default]
colvars: # wrapAround = 0 [default]
colvars: # forceNoPBC = off [default]
colvars: # scalable = on [default]
colvars: All components initialized.
colvars: # timeStepFactor = 1 [default]
colvars: # width = 1 [default]
colvars: # lowerBoundary = 0
colvars: # upperBoundary = 1
colvars: # hardLowerBoundary = off [default]
colvars: # hardUpperBoundary = off [default]
colvars: # expandBoundaries = off [default]
colvars: # extendedLagrangian = on
colvars: Enabling the extended Lagrangian term for colvar "lambda".
colvars: # extendedTemp = 300 [default]
colvars: # extendedMass = 150000
colvars: # outputEnergy = off [default]
colvars: # extendedLangevinDamping = 1 [default]
colvars: # reflectingLowerBoundary = on
colvars: # reflectingUpperBoundary = on
colvars: # outputValue = on [default]
colvars: # outputVelocity = off [default]
colvars: # outputTotalForce = on
colvars: # outputAppliedForce = on
colvars: # subtractAppliedForce = off [default]
colvars: # runAve = off [default]
colvars: # corrFunc = off [default]
colvars: ----------------------------------------------------------------------
colvars: Collective variables initialized, 1 in total.
colvars: ----------------------------------------------------------------------
colvars: Initializing a new "abf" instance.
colvars: # name = "abf1" [default]
colvars: # colvars = { lambda }
colvars: # stepZeroData = off [default]
colvars: # outputEnergy = off [default]
colvars: # outputFreq = 10 [default]
colvars: # timeStepFactor = 1 [default]
colvars: # applyBias = on [default]
colvars: # hideJacobian = off [default]
colvars: Jacobian (geometric) forces will be included in reported free energy gradients.
colvars: # fullSamples = 0
colvars: # minSamples = 0 [default]
colvars: # inputPrefix = [default]
colvars: # historyFreq = 0 [default]
colvars: # shared = off [default]
colvars: # updateBias = on [default]
colvars: # maxForce = [default]
colvars: # integrate = on [default]
colvars: Finished ABF setup.
colvars: ----------------------------------------------------------------------
colvars: Collective variables biases initialized, 1 in total.
colvars: ----------------------------------------------------------------------
colvars: Collective variables module (re)initialized.
colvars: ----------------------------------------------------------------------
colvars: Updating NAMD interface:
colvars: updating atomic data (0 atoms).
colvars: updating group data (0 scalable groups, 0 atoms in total).
colvars: updating grid object data (0 grid objects in total).
colvars:
colvars: SUMMARY OF COLVARS FEATURES USED SO FAR AND THEIR CITATIONS:
colvars:
colvars: - BAOA integrator:
colvars: BouRabee2010 https://doi.org/10.1137/090758842
colvars:
colvars: - Colvars module:
colvars: - Colvars-NAMD interface:
colvars: Fiorin2013 https://doi.org/10.1080/00268976.2013.813594
colvars:
colvars: - ABF colvar bias implementation:
colvars: - Internal-forces free energy estimator:
colvars: Henin2010 https://doi.org/10.1021/ct9004432
colvars:
colvars: - alchLambda colvar component:
colvars: Lagardere2023 https://arxiv.org/abs/2307.08006
colvars:
colvars: - NAMD engine:
colvars: Phillips2020 https://doi.org/10.1063/5.0014475
colvars:
colvars: updating target temperature (T = 300 K).
colvars: ----------------------------------------------------------------------
colvars: Loading state from text file "test.colvars.state".
colvars: Restarting collective variable "lambda" from value: 0.202451
colvars: Restarted abf bias "abf1" with step number 20.
colvars: ----------------------------------------------------------------------
colvars: Updating NAMD interface:
colvars: updating atomic data (0 atoms).
colvars: updating group data (0 scalable groups, 0 atoms in total).
colvars: updating grid object data (0 grid objects in total).
colvars: updating target temperature (T = 300 K).
colvars: Current simulation parameters: initial step = 20, integration timestep = 1
colvars: Updating atomic parameters (masses, charges, etc).
colvars: The restart output state file will be "test.restart.tmp.colvars.state".
colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.colvars.traj".
colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.colvars.traj".
colvars: Saving collective variables state to "test.restart.tmp.colvars.state".
colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.colvars.traj".
colvars: Saving collective variables state to "test.restart.tmp.colvars.state".
colvars: Saving collective variables state to "test.restart.colvars.state".
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
configuration {
step 40
dt 1.000000e+00
}

colvar {
name lambda
x 0.20836051020006
extended_x 0.20836051020006
extended_v 0.0004528018356754
}

abf {
configuration {
step 40
name abf1
}

samples
40

gradient
-9.1800383003581
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# step lambda ft_lambda fa_lambda
20 2.02451229802650e-01 0.00000000000000e+00 -8.01417115389510e+00
21 2.02544063317688e-01 8.79677173742116e+00 -8.05143784834872e+00
22 2.02557993229958e-01 8.81441210482505e+00 -8.08611849637037e+00
23 2.02568176589621e-01 8.83952439255414e+00 -8.11887527446532e+00
24 2.02645067021906e-01 8.87347035441114e+00 -8.15031673612973e+00
25 2.02773241774165e-01 8.91763592471448e+00 -8.18100950367312e+00
26 2.02938664924388e-01 8.97161705686943e+00 -8.21141748648836e+00
27 2.03109223468217e-01 9.03911380941207e+00 -8.24207290585590e+00
28 2.03273109969140e-01 9.13005964298271e+00 -8.27378671789615e+00
29 2.03385946933364e-01 9.26505411891078e+00 -8.30796835241389e+00
30 2.03516464758499e-01 9.46339797126387e+00 -8.34648267304223e+00
31 2.03738807200153e-01 9.74220853201881e+00 -8.39150608784792e+00
32 2.04047164987984e-01 1.01132685590046e+01 -8.44531116507157e+00
33 2.04385089669305e-01 1.05741725498844e+01 -8.50982211612650e+00
34 2.04767813595167e-01 1.10964359033778e+01 -8.58589899222213e+00
35 2.05293465871353e-01 1.16275890959526e+01 -8.67280442375728e+00
36 2.05909736002440e-01 1.21203178221254e+01 -8.76856868482306e+00
37 2.06541843034024e-01 1.25351891085928e+01 -8.87036923681684e+00
38 2.07201416018228e-01 1.28409084557337e+01 -8.97485711099886e+00
39 2.07831424699300e-01 1.30323135766731e+01 -9.07889445627256e+00
40 2.08360510200055e-01 1.31246482196932e+01 -9.18003830035808e+00
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 1
# 0.00000000000000e+00 1.00000000000000e+00 1 0

5.00000000000000e-01 40
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 1
# 0.00000000000000e+00 1.00000000000000e+00 1 0

5.00000000000000e-01 -9.18003830035807e+00
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1
# -5.00000000000000e-01 1.00000000000000e+00 2 0

0.00000000000000e+00 9.18003830035808e+00
1.00000000000000e+00 0.00000000000000e+00
11 changes: 11 additions & 0 deletions namd/tests/interface/009_lambda_dynamics/alchemy.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

langevin on
langevinTemp 300.0
langevinDamping 0.000000001

alch on
alchType TI
alchFile ../Common/da.pdb
alchCol B
alchLambda 0.2

3 changes: 3 additions & 0 deletions namd/tests/interface/009_lambda_dynamics/namd-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Info: NAMD 3.1alpha2 for Linux-x86_64-multicore
colvars: Initializing the collective variables module, version 2024-06-04.
colvars: Using NAMD interface, version "2023-12-05".
Empty file.
Loading

0 comments on commit f580527

Please sign in to comment.