-
Notifications
You must be signed in to change notification settings - Fork 0
Geometric Path Collective Variables
The geometric path collective variables is a set of CVs to define a path in the space of other CVs or atomic coordinates. This set of CVs contains two variables, s(ξ) and z(ξ). The former depicts the progress along the path and the latter measures the distance from current image to the path.
Clone this fork of colvars:
git clone https://github.com/HanatoK/colvars.git
Switch to the
gpathCV
branch by running:
git checkout gpathCV
======Update 2019-07-29======
The gpathCV
branch has been merged into the official colvars repository and then deleted, so you need to clone https://github.com/Colvars/colvars
and use the master
branch instead.
=============================
Download NAMD from https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD and extract the tarball.
Update the colvars code bundled with NAMD:
<colvars directory>/update-colvars-code.sh <NAMD source code directory>
Configure NAMD and compile it. It should be noted that before compiling you need run make depends
in the build directory of NAMD.
The following colvars configuration shows an example of how to define the path on atomic Cartesian coordinate space and apply eABF bias on it.
colvar {
name gs
width 0.01
lowerboundary 0.0
upperboundary 1.0
lowerwallconstant 10.0
upperwallconstant 10.0
extendedLagrangian on
extendedFluctuation 0.01
gspath {
atoms {atomnumbers { 1 5 6 7 9 11 15 16 17 19 }}
refPositionsFile1 string-00.pdb
refPositionsFile2 string-01.pdb
refPositionsFile3 string-02.pdb
refPositionsFile4 string-03.pdb
refPositionsFile5 string-04.pdb
refPositionsFile6 string-05.pdb
refPositionsFile7 string-06.pdb
refPositionsFile8 string-07.pdb
refPositionsFile9 string-08.pdb
refPositionsFile10 string-09.pdb
refPositionsFile11 string-10.pdb
refPositionsFile12 string-11.pdb
refPositionsFile13 string-12.pdb
refPositionsFile14 string-13.pdb
refPositionsFile15 string-14.pdb
refPositionsFile16 string-15.pdb
refPositionsFile17 string-16.pdb
refPositionsFile18 string-17.pdb
refPositionsFile19 string-18.pdb
refPositionsFile20 string-19.pdb
}
}
colvar {
name gz
width 0.01
lowerboundary -99.0
upperboundary 99.0
gzpath {
atoms {atomnumbers { 1 5 6 7 9 11 15 16 17 19 }}
refPositionsFile1 string-00.pdb
refPositionsFile2 string-01.pdb
refPositionsFile3 string-02.pdb
refPositionsFile4 string-03.pdb
refPositionsFile5 string-04.pdb
refPositionsFile6 string-05.pdb
refPositionsFile7 string-06.pdb
refPositionsFile8 string-07.pdb
refPositionsFile9 string-08.pdb
refPositionsFile10 string-09.pdb
refPositionsFile11 string-10.pdb
refPositionsFile12 string-11.pdb
refPositionsFile13 string-12.pdb
refPositionsFile14 string-13.pdb
refPositionsFile15 string-14.pdb
refPositionsFile16 string-15.pdb
refPositionsFile17 string-16.pdb
refPositionsFile18 string-17.pdb
refPositionsFile19 string-18.pdb
refPositionsFile20 string-19.pdb
}
}
harmonic {
colvars gz
centers 0.0
forceConstant 0.5
}
abf {
colvars gs
fullSamples 500
}
The following colvars configuration shows an example of how to define the path on a collective variable space (a path in Ramachandran plot of NANMA) and apply eABF bias on it. The path is defined in the file path.txt
. The format of it is straightforward. For example, the first column in path.txt
matches the first component, a dihedral named 001, and the second column matches the dihedral named 002.
colvar {
name gpath_s_dihed
lowerBoundary 0.01
upperBoundary 0.99
width 0.005
extendedLagrangian on
extendedFluctuation 0.005
gspathCV {
dihedral {
name 001
group1 {atomNumbers {5}}
group2 {atomNumbers {7}}
group3 {atomNumbers {9}}
group4 {atomNumbers {15}}
}
dihedral {
name 002
group1 {atomNumbers {7}}
group2 {atomNumbers {9}}
group3 {atomNumbers {15}}
group4 {atomNumbers {17}}
}
pathFile ./path.txt
}
}
colvar {
name gpath_z_dihed
gzpathCV {
useZsquare off
dihedral {
name 001
scalable off
group1 {atomNumbers {5}}
group2 {atomNumbers {7}}
group3 {atomNumbers {9}}
group4 {atomNumbers {15}}
}
dihedral {
name 002
scalable off
group1 {atomNumbers {7}}
group2 {atomNumbers {9}}
group3 {atomNumbers {15}}
group4 {atomNumbers {17}}
}
pathFile ./path.txt
}
}
colvar {
name phi
dihedral {
group1 {atomNumbers {5}}
group2 {atomNumbers {7}}
group3 {atomNumbers {9}}
group4 {atomNumbers {15}}
}
}
colvar {
name psi
dihedral {
group1 {atomNumbers {7}}
group2 {atomNumbers {9}}
group3 {atomNumbers {15}}
group4 {atomNumbers {17}}
}
}
harmonicWalls {
colvars gpath_z_dihed
lowerWalls 0.0
upperWalls 2.0
forceConstant 100.0
}
harmonicWalls {
colvars gpath_s_dihed
lowerWalls 0.01
upperWalls 0.99
forceConstant 20.0
}
abf {
colvars gpath_s_dihed
fullSamples 1000
}
Contents of path.txt
:
-81.5412 87.2240
-87.0517 73.8089
-92.5622 60.3938
-96.0727 46.4251
-93.7814 32.8157
-92.5438 17.4152
-87.2344 2.5162
-79.3889 -9.7353
-68.8109 -21.4483
-60.5656 -34.0756
-46.3885 -37.8237
-34.0320 -48.0059
-22.6411 -54.1188
-11.4854 -61.6313
0.7224 -69.6824
16.7302 -78.1529
27.8288 -85.6552
41.8101 -89.9240
55.7774 -92.5046
68.1026 -84.7537
70.4533 -69.6071
72.8040 -54.4605
The equation for z(ξ) can be found at https://plumed.github.io/doc-v2.5/user-doc/html/_p_a_t_h.html There are two workarounds: (1) set the derivatives to zero when z(ξ) is zero; (2) use z(ξ)^2 instead of z(ξ).
Currently the implementation use (1) for default. If you want to use (2), turn on useZsquare
in gzpath
or gzpathCV
.
The implementation now only supports linear combination of other CVs. Scripted functions or lepton custom funtions are not supported.
A C++11 compatible compiler is required. If you use the gcc 4.8 version, you may need to add -std=c++11
flag when compiling NAMD.