计算化学公社

标题: 编译Gromacs-Colvars进行自由能计算 [打印本页]

作者
Author:
fhh2626    时间: 2020-10-22 12:57
标题: 编译Gromacs-Colvars进行自由能计算
本帖最后由 fhh2626 于 2021-8-12 16:51 编辑

本文禁止转载

更新:对于gromacs2021, -DGMX_GPU=on要改成 -DGMX_GPU=cuda

Colvars是非常流行的自由能计算插件,里面实现了大量的自由能计算方法(比如US,eABF,MtD,SMD等),与竞争对手Plumed相比,Colvars在实现上跟MD软件结合更紧密,运行效率更高,使用也方便一些,而Plumed则对不同的MD软件兼容性更高,更容易在里面实现新的算法

以往gmx只能跟Plumed结合使用,最近(发帖当天)Colvars也支持gmx了,下面是编译的简单步骤

首先下载gmx和Colvars,发帖时最新版本为2020.4,Colvars下master branch就行:
http://manual.gromacs.org/documentation/2020.4/download.html
https://github.com/Colvars/colvars

然后上传到服务器上,解压
unzip colvars-master.zip
tar xvf gromacs-2020.4.tar.gz

用Colvars patch gmx:
sh ./colvars-master/update-colvars-code.sh ./gromacs-2020.4

编译gmx:
cd gromacs-2020.4
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=on -DCMAKE_INSTALL_PREFIX=xxx
make -j12
make install

source xxxxxxx/GMXRC

在gmx中调用Colvars:
在运行gmx的命令后面跟上-colvars xxxx.dat,其中xxxxx.dat是Colvars输入文件
例如:
gmx mdrun -v  -ntmpi 1 -ntomp 2 -gpu_id 0 -deffnm step5 -colvars colvars.dat
或者跟上-colvars xxxx.dat -colvars_restart test.colvars.state.dat

Colvars输入文件的简单介绍见:
http://bbs.keinsci.com/thread-10805-1-1.html
在gmx中使用时,需要在开头加上:
units gromacs

作者
Author:
xiaowu759    时间: 2020-10-31 14:48
谢谢分享!
作者
Author:
moluren    时间: 2020-12-3 09:41
老师您好,请问Colvars插件是否支持GMX-2020.4之前的版本吗,现在使用的是2018.4版本,请问能否支持呢?谢谢老师
作者
Author:
fhh2626    时间: 2020-12-3 12:10
moluren 发表于 2020-12-3 09:41
老师您好,请问Colvars插件是否支持GMX-2020.4之前的版本吗,现在使用的是2018.4版本,请问能否支持呢?谢 ...

https://github.com/Colvars/colvars 有打过补丁的2018.8版本下载

有什么特殊的理由需要用老版本吗?
作者
Author:
moluren    时间: 2020-12-9 09:21
非常抱歉这几天忙着实验没有及时回复,非常感谢老师的指导。
没有特殊的理由必须要用老版本,还是自己懒惰不太愿意更新,您又让我发现了“新大陆”,太感谢您了
作者
Author:
wmu-lyg    时间: 2020-12-29 10:41
请问下,gmx中调用Colvars,是在跑mdrun成品md时候调用吗,但是显示报错“unkown command-line option -colvars”
另外想请教下,Colvars输入文件colvars.dat内容都是一样的吗,是否有范本
(我做的是蛋白配体复合物,跑完动力学后想计算小分子的结合能)
作者
Author:
fhh2626    时间: 2020-12-29 11:42
wmu-lyg 发表于 2020-12-29 10:41
请问下,gmx中调用Colvars,是在跑mdrun成品md时候调用吗,但是显示报错“unkown command-line option -col ...

你按照教程编译用Colvars patch过的gmx了吗

Colvars文件当然不一样,你要定义描述你体系运动的反应坐标(比如距离,角度)
作者
Author:
HZW    时间: 2021-1-15 21:20
fhh2626 发表于 2020-12-3 12:10
https://github.com/Colvars/colvars 有打过补丁的2018.8版本下载

有什么特殊的理由需要用老版本吗?

老师您好,请问在colvars的github官网下载的patch过的gromacs-2018.8-colvars编译后咋使用colvars
作者
Author:
fhh2626    时间: 2021-1-15 22:19
HZW 发表于 2021-1-15 21:20
老师您好,请问在colvars的github官网下载的patch过的gromacs-2018.8-colvars编译后咋使用colvars

你平时怎么用的就怎么用啊。。。没明白你的意思
作者
Author:
HZW    时间: 2021-1-15 23:09
老师我的意思是说patch过的gromacs包不需要单独下载colvars,编译好gromacs就能在gmx命令末尾加上-colvars xxx. dat使用,还有就是colvars需要编译吗?
作者
Author:
fhh2626    时间: 2021-1-16 16:15
HZW 发表于 2021-1-15 23:09
老师我的意思是说patch过的gromacs包不需要单独下载colvars,编译好gromacs就能在gmx命令末尾加上-colvars  ...

不需要单独编译colvars了
作者
Author:
HZW    时间: 2021-1-16 21:10
fhh2626 发表于 2021-1-16 16:15
不需要单独编译colvars了

好的,谢谢老师啦。用上了。
作者
Author:
HZW    时间: 2021-1-27 21:59
fhh2626 发表于 2021-1-16 16:15
不需要单独编译colvars了

FU老师,gromacs使用colvar的ABF时出现问题。
colvars.dat文件:
units gromacs
indexFile index.ndx

colvarsTrajFrequency      500
colvarsRestartFrequency  20000

colvar {
   name AtomDistance

   width 0.1

   lowerboundary 27.2
   upperboundary 100.0

   lowerwallconstant 100.0
   upperwallconstant 100.0

   distance {
      group1 {
          indexGroup O5
      }
      group2 {
          indexGroup O3
      }
   }
}


abf {
   colvars AtomDistance
   fullSamples   500
   hideJacobian
}

错误:
colvars: ----------------------------------------------------------------------
colvars: Initializing the collective variables module, version "2020-11-09".
colvars: Please cite Fiorin et al, Mol Phys 2013:
https://dx.doi.org/10.1080/00268976.2013.813594
in any publication based on this calculation.
colvars: SMP parallelism is enabled; if needed, use "smp off" to override this.
colvars: This version was built with the C++11 standard or higher.
colvars: Using GROMACS interface, version "2020-10-22".
colvars: ----------------------------------------------------------------------
colvars: Reading new configuration from file "colvars.dat":
colvars: # units = "gromacs"
colvars: # indexFile = "index.ndx"
colvars: The following index groups are currently defined:
colvars:   System (340151 atoms)
colvars:   DNA (911 atoms)
colvars:   K (27 atoms)
colvars:   Water (339213 atoms)
colvars:   SOL (339213 atoms)
colvars:   non-Water (938 atoms)
colvars:   Ion (27 atoms)
colvars:   Water_and_ions (339240 atoms)
colvars:   O5 (1 atoms)
colvars:   O3 (1 atoms)
colvars: # smp = on [default]
colvars: # colvarsTrajFrequency = 500
colvars: # colvarsRestartFrequency = 20000
colvars: # scriptedColvarForces = off [default]
colvars: # scriptingAfterBiases = off [default]
colvars: ----------------------------------------------------------------------
colvars:   Initializing a new collective variable.
colvars:   # name = "AtomDistance"
colvars:   Initializing a new "distance" 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:       Initializing atom group "group1".
colvars:       # name = "" [default]
colvars:       # centerReference = off [default]
colvars:       # rotateReference = off [default]
colvars:       # atomsOfGroup = "" [default]
colvars:       # indexGroup = "O5"
colvars:       # psfSegID =  [default]
colvars:       # atomsFile = "" [default]
colvars:       # dummyAtom = ( 0 , 0 , 0 ) [default]
colvars:       # enableFitGradients = on [default]
colvars:       # printAtomIDs = off [default]
colvars:       Atom group "group1" defined with 1 atoms requested: total mass = 16, total charge = -0.834.
colvars:       Initializing atom group "group2".
colvars:       # name = "" [default]
colvars:       # centerReference = off [default]
colvars:       # rotateReference = off [default]
colvars:       # atomsOfGroup = "" [default]
colvars:       # indexGroup = "O3"
colvars:       # psfSegID =  [default]
colvars:       # atomsFile = "" [default]
colvars:       # dummyAtom = ( 0 , 0 , 0 ) [default]
colvars:       # enableFitGradients = on [default]
colvars:       # printAtomIDs = off [default]
colvars:       Atom group "group2" defined with 1 atoms requested: total mass = 1.008, total charge = 0.417.
colvars:     # oneSiteSystemForce = off [default]
colvars:     # oneSiteTotalForce = off [default]
colvars:   All components initialized.
colvars:   # timeStepFactor = 1 [default]
colvars:   # width = 0.1
colvars:   # lowerBoundary = 27.2
colvars:   # upperBoundary = 100
colvars:   Reading legacy options lowerWall and lowerWallConstant: consider using a harmonicWalls restraint (caution: force constant would then be scaled by width^2).
colvars:   # lowerWall = 100
colvars:   Reading legacy options upperWall and upperWallConstant: consider using a harmonicWalls restraint (caution: force constant would then be scaled by width^2).
colvars:   # upperWall = 0 [default]
colvars: Error: the value of upperWall must be set explicitly.
colvars: If this error message is unclear, try recompiling with -DCOLVARS_DEBUG.

作者
Author:
fhh2626    时间: 2021-1-27 23:29
HZW 发表于 2021-1-27 21:59
FU老师,gromacs使用colvar的ABF时出现问题。
colvars.dat文件:
units gromacs

Colvars修改了边界力常数的定义方式,要删掉  lowerwallconstant 100.0和upperwallconstant 100.0这两句,然后在文件后面加上
harmonicWalls {              
    colvars           AtomDistance              
    lowerWalls        27.2     
    upperWalls        100.0  
    lowerWallConstant 1.0                  
    upperWallConstant 1.0                  
}
注意这里的边界力常数要除以width才是真正的k值           
作者
Author:
HZW    时间: 2021-1-28 00:57
还有一个问题,就是colvarsRestartFrequency要设置和gromacs运行的步长一样吗?colvars里边步长是多少fs,我跑的是沿着首尾5端和3端氧原子拉一个28个碱基的G4结构,fullSamples2000步够吗?
作者
Author:
fhh2626    时间: 2021-1-28 13:16
HZW 发表于 2021-1-28 00:57
还有一个问题,就是colvarsRestartFrequency要设置和gromacs运行的步长一样吗?colvars里边步长是多少fs, ...

colvarsRestartFrequency是colvars断点续跑文件输出频率,设一个合理的值就行
够了
作者
Author:
Ekko    时间: 2021-4-27 10:17
老师您好,请问在lammps里如何安装colvars呢?
作者
Author:
fhh2626    时间: 2021-4-29 18:12
Ekko 发表于 2021-4-27 10:17
老师您好,请问在lammps里如何安装colvars呢?

没有用过LAMMPS,但是LAMMPS似乎是自带colvars的
作者
Author:
HZW    时间: 2021-7-20 09:49
您好,付博士,我想问下我用最新的colvars,然后gmx用的2018.8用colvars patch过的,使用时报这个错误是什么意思?如何解决啊。
colvars: Initializing the collective variables module, version "2021-03-09".
colvars: Please cite Fiorin et al, Mol Phys 2013:
https://dx.doi.org/10.1080/00268976.2013.813594
in any publication based on this calculation.
colvars: SMP parallelism is enabled; if needed, use "smp off" to override this.
colvars: This version was built with the C++11 standard or higher.
colvars: Using GROMACS interface, version "2021-03-02".
colvars: ----------------------------------------------------------------------
colvars: Reading new configuration from file "colvars.dat":
colvars: Error: unmatched curly braces in configuration.
colvars: If this error message is unclear, try recompiling with -DCOLVARS_DEBUG.

-------------------------------------------------------
Program:     gmx mdrun, version 2018.8-dev
Source file: src/gromacs/colvars/colvarproxy_gromacs.cpp (line 338)
MPI rank:    0 (out of 2)

Fatal error:
Error in collective variables module.

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
作者
Author:
fhh2626    时间: 2021-7-21 15:07
HZW 发表于 2021-7-20 09:49
您好,付博士,我想问下我用最新的colvars,然后gmx用的2018.8用colvars patch过的,使用时报这个错误是什 ...

colvars配置文件里面括号没有对应匹配
作者
Author:
HZW    时间: 2021-7-22 11:15
fhh2626 发表于 2021-7-21 15:07
colvars配置文件里面括号没有对应匹配

付博, 前天就发现并改正了错误,但是后面还是错了。

colvar.dat 如下:

units gromacs
colvar {
  name dist
    distance {
           group1  { atomNumbers { 2 } }
           group2  { atomNumbers   { 410}  }
                     }
             }

harmonic {
            colvars  dist
            forceConstant 1000
            centers       1.52                            # initial distance
            targetCenters           3.0              # final distance
            targetNumSteps      500000
             }


错误如下:

colvars: ----------------------------------------------------------------------
colvars: Initializing the collective variables module, version "2021-03-09".
colvars: Please cite Fiorin et al, Mol Phys 2013:
https://dx.doi.org/10.1080/00268976.2013.813594
in any publication based on this calculation.
colvars: SMP parallelism is enabled; if needed, use "smp off" to override this.
colvars: This version was built with the C++11 standard or higher.
colvars: Using GROMACS interface, version "2021-03-02".
colvars: ----------------------------------------------------------------------
colvars: Reading new configuration from file "colvars.dat":
colvars: # units = "gromacs"
colvars: # smp = on [default]
colvars: # colvarsTrajFrequency = 100 [default]
colvars: # colvarsRestartFrequency = 0 [default]
colvars: # scriptedColvarForces = off [default]
colvars: # scriptingAfterBiases = off [default]
colvars: ----------------------------------------------------------------------
colvars:   Initializing a new collective variable.
colvars:   # name = "dist"
colvars:   Initializing a new "distance" 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:       Initializing atom group "group1".
colvars:       # name = "" [default]
colvars:       # centerToOrigin = off [default]
colvars:       # centerToReference = off [default]
colvars:       # rotateToReference = off [default]
colvars:       # atomsOfGroup = "" [default]
colvars:       # indexGroup = "" [default]
colvars:       # psfSegID =  [default]
colvars:       # atomsFile = "" [default]
colvars:       # dummyAtom = ( 0 , 0 , 0 ) [default]
colvars:       # enableFitGradients = on [default]
colvars:       # printAtomIDs = off [default]
colvars:       Atom group "group1" defined with 1 atoms requested: total mass = 16, total charge = -0.6318.
colvars:       Initializing atom group "group2".
colvars:       # name = "" [default]
colvars:       # centerToOrigin = off [default]
colvars:       # centerToReference = off [default]
colvars:       # rotateToReference = off [default]
colvars:       # atomsOfGroup = "" [default]
colvars:       # indexGroup = "" [default]
colvars:       # psfSegID =  [default]
colvars:       # atomsFile = "" [default]
colvars:       # dummyAtom = ( 0 , 0 , 0 ) [default]
colvars:       # enableFitGradients = on [default]
colvars:       # printAtomIDs = off [default]
colvars:       Atom group "group2" defined with 1 atoms requested: total mass = 16, total charge = -0.6549.
colvars:     # oneSiteSystemForce = off [default]
colvars:     # oneSiteTotalForce = off [default]
colvars:   All components initialized.
colvars:   # timeStepFactor = 1 [default]
colvars:   # width = 1 [default]
colvars:   # lowerBoundary = 0 [default]
colvars:   # upperBoundary = 0 [default]
colvars:   # hardLowerBoundary = on [default]
colvars:   # hardUpperBoundary = off [default]
colvars:   # expandBoundaries = off [default]
colvars:   # extendedLagrangian = off [default]
colvars:   # outputValue = on [default]
colvars:   # outputVelocity = off [default]
colvars:   # outputTotalForce = off [default]
colvars:   # outputAppliedForce = off [default]
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 "harmonic" instance.
colvars:   # name = "harmonic1" [default]
colvars:   # colvars = { dist }
colvars:   # stepZeroData = off [default]
colvars:   # outputEnergy = off [default]
colvars:   # outputFreq = 0 [default]
colvars:   # timeStepFactor = 1 [default]
colvars:   # writeTISamples = off [default]
colvars:   # writeTIPMF = off [default]
colvars:   # centers = { 1.52 }
colvars:   # targetCenters = { 3 }
colvars:   # targetNumSteps = 500000
colvars:   # targetNumStages = 0 [default]
colvars:   # outputAccumulatedWork = off [default]
colvars:   # outputCenters = off [default]
colvars:   # forceConstant = 1000
colvars:   # targetForceConstant = -1 [default]
colvars:   The force constant for colvar "dist" will be rescaled to 1000 according to the specified width (1).
colvars: ----------------------------------------------------------------------
colvars: Collective variables biases initialized, 1 in total.
colvars: ----------------------------------------------------------------------
colvars: Collective variables module (re)initialized.
colvars: ----------------------------------------------------------------------
colvars: Re-initialized atom group for variable "dist":0/0. 1 atoms: total mass = 16, total charge = -0.6318.
colvars: Re-initialized atom group for variable "dist":0/1. 1 atoms: total mass = 16, total charge = -0.6549.
colvars: The restart output state file will be "md.restart.colvars.state".
colvars: The final output state file will be "md.colvars.state".
colvars: Opening trajectory file "md.colvars.traj".
Back Off! I just backed up md.colvars.traj to ./#md.colvars.traj.1#
colvars: Error: trying to allocate the collective variable module twice.
colvars: If this error message is unclear, try recompiling with -DCOLVARS_DEBUG.

-------------------------------------------------------
Program:     gmx mdrun, version 2018.8-dev
Source file: src/gromacs/colvars/colvarproxy_gromacs.cpp (line 338)
MPI rank:    0 (out of 6)

Fatal error:
Error in collective variables module.

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
作者
Author:
fhh2626    时间: 2021-7-22 16:41
HZW 发表于 2021-7-22 11:15
付博, 前天就发现并改正了错误,但是后面还是错了。

colvar.dat 如下:

看起来文件没有问题,你试试加上SMP off还会出错吗
作者
Author:
HZW    时间: 2021-7-22 20:48
fhh2626 发表于 2021-7-22 16:41
看起来文件没有问题,你试试加上SMP off还会出错吗

还是一样报错,我把错误信息和colvars.dat发给 Ph.D Jérôme Hénin了,他说叫我在Git-Hub上提交问题
作者
Author:
天黑打烊    时间: 2021-11-23 14:46
本帖最后由 天黑打烊 于 2021-11-23 16:26 编辑

老师,请问metadynamic中的hillwidth该如何选择呢?看到一篇文章讲高斯宽度和网格间距的比率最好为1.25,请问这里的网格间距指的是width吗?This keyword sets the Gaussian width 2σξi for all colvars, expressed innumber of grid points, with the grid spacing along each colvarξdetermined by the respective value of width.手册里对hillwidth的注释是这样的,但是我不太懂“以网格点的数量表示”这句话该如何理解?


作者
Author:
fhh2626    时间: 2021-11-23 17:25
天黑打烊 发表于 2021-11-23 14:46
老师,请问metadynamic中的hillwidth该如何选择呢?看到一篇文章讲高斯宽度和网格间距的比率最好为1.25,请 ...

一般设3-5都行
作者
Author:
天黑打烊    时间: 2021-11-23 19:28
fhh2626 发表于 2021-11-23 17:25
一般设3-5都行

Warning: gaussianSigmas is too narrow for the grid spacing along distZ.老师,按照3-5设置之后出现这种提示是为什么呢?
作者
Author:
fhh2626    时间: 2021-11-24 12:56
天黑打烊 发表于 2021-11-23 19:28
Warning: gaussianSigmas is too narrow for the grid spacing along distZ.老师,按照3-5设置之后出现 ...

你设置的是hillWidth吧?别设置gaussianSigmas
作者
Author:
天黑打烊    时间: 2021-11-30 16:01
老师您好,请问跑完mtd得到的PMF曲线如何判断其收敛呢?
作者
Author:
fhh2626    时间: 2021-12-1 11:51
天黑打烊 发表于 2021-11-30 16:01
老师您好,请问跑完mtd得到的PMF曲线如何判断其收敛呢?

你可以看看不同时刻输出的PMF,看看是否还有变化
作者
Author:
天黑打烊    时间: 2021-12-1 15:32
fhh2626 发表于 2021-12-1 11:51
你可以看看不同时刻输出的PMF,看看是否还有变化

好的,谢谢老师!
作者
Author:
CrysW555    时间: 2022-1-11 15:15
老师您好,请问用gromacs+colvars 能否进行eabf,meta-eabf,WTM-eabf等自由能计算,如果能的话在制备输入文件和模拟时有什么注意事项?是否能直接将您文章中SI的脚本直接加gromacs units 再根据自己体系修改后直接使用?
作者
Author:
fhh2626    时间: 2022-1-11 18:46
CrysW555 发表于 2022-1-11 15:15
老师您好,请问用gromacs+colvars 能否进行eabf,meta-eabf,WTM-eabf等自由能计算,如果能的话在制备输入 ...

可以,没什么特别的注意事项

可以参考这些文件
https://github.com/fhh2626/ABF-example-files-for-NAMD-and-OpenMM
作者
Author:
CrysW555    时间: 2022-1-11 20:06
fhh2626 发表于 2022-1-11 18:46
可以,没什么特别的注意事项

可以参考这些文件

好的,谢谢您
作者
Author:
luckylu    时间: 2022-11-25 08:34
gmx -colvars之后GPU利用率不到10%,计算效率一言难尽,请问这个有没有办法解决呢?
作者
Author:
fhh2626    时间: 2022-11-25 18:12
luckylu 发表于 2022-11-25 08:34
gmx -colvars之后GPU利用率不到10%,计算效率一言难尽,请问这个有没有办法解决呢?

是这样的。。。用Plumed也差不多,因为Colvars/Plumed是CPU代码,GMX在GPU上的数据和CPU交互效率比较低

可以考虑用timestepfactor   2(或者更大,取决于你的任务)降低交换频率,会有一定的效果
作者
Author:
luckylu    时间: 2022-12-10 22:20
fhh2626 发表于 2022-11-25 18:12
是这样的。。。用Plumed也差不多,因为Colvars/Plumed是CPU代码,GMX在GPU上的数据和CPU交互效率比较低
...

好的,谢谢您的回答
作者
Author:
Chris——szk    时间: 2023-7-18 14:27
fu老师您好,能否问一下您我使用gromacs+colvars进行meta-eabf自由能计算的时候我发现输出的metaeabf.abf1.czar.pmf文件中的第三列数据都是为0,可以问一下老师是什么原因吗:

colvars的输入文件如下:

units gromacs

colvarsTrajFrequency 20000
colvarsRestartFrequency 500000

colvar {
   name psi
   width 1
   lowerboundary 30
   upperboundary 90
   expandboundaries    on
   subtractAppliedForce   on
   extendedlagrangian   on
   extendedFluctuation  1
   extendedTimeConstant   200

   angle {
      oneSiteTotalForce
      group1 {
         atomnumbers { 7494 7513 7532 7549 7568 7575 7592 }
      }
      group2 {
         atomnumbers { 7480 }
      }
      group3 {
         atomnumbers { 1757 }
      }

   }
}

#7494

colvar {
   name d
   width 1
   lowerboundary 6
   upperboundary 18
   expandboundaries    on
   subtractAppliedForce   on
   extendedlagrangian   on
   extendedFluctuation  1
   extendedTimeConstant   200

   distance {
      group1 {
         atomnumbers { 6905 }
      }
      group2 {
         atomnumbers { 308 }
      }

   }
}

harmonicWalls {
  name walls1
  colvars psi
  lowerWalls 30 30
  upperWalls 90 90
  forceConstant 1.0
}

harmonicWalls {
  name walls2
  colvars d
  lowerWalls 7 7
  upperWalls 17 17
  forceConstant 1.0
}

abf {
   colvars d psi
   fullSamples 1000
#   hideJacobian
   historyfreq  500000
   writeCZARwindowFile on
   CZARestimator on
}

metadynamics {
  colvars d psi
  hillwidth  2
  hillweight  0.1
  welltempered   on
  biastemperature  4000
}

作者
Author:
fhh2626    时间: 2023-7-18 16:56
Chris——szk 发表于 2023-7-18 14:27
fu老师您好,能否问一下您我使用gromacs+colvars进行meta-eabf自由能计算的时候我发现输出的metaeabf.abf1. ...

还没有跑满fullsamples吧

另外你这个harmonicWalls应该这么定义

harmonicWalls {
  name walls
  colvars psi d
  lowerWalls 30 7
  upperWalls 90 17
  forceConstant 1.0
}

或者就别用harmonic walls,直接用reflecting boundaries
作者
Author:
Chris——szk    时间: 2023-7-18 17:07
fhh2626 发表于 2023-7-18 16:56
还没有跑满fullsamples吧

另外你这个harmonicWalls应该这么定义

好的好的,非常谢谢老师我回去试试!
作者
Author:
kokiw    时间: 2024-7-9 09:51
请问下老师 跑回旋半径的colvars的话,要怎么设置啊?我参照手册里但是没看到除了atoms外的关键词,我之前是这么设置的,但是感觉跑出来的轨迹的rg值对不上。

colvar { # Define a new variable
  name rg1 # Must give a name to this variable
             # width 0.2 # Estimated fluctuation amplitude and/or grid resolution, "w_d"
  gyration { # This variable is a distance between centers of mass (COMs)
    atoms { atomNumbers 521 822 844 916 950 1055 1079 2225 2530 2552 2611 2645 2753 2777 3812 4117 4139 4211 4245 4350 4374 5555 5872 5894 5966 6000 6105 6129 } # List the atoms of the 1st group
  }
}

harmonic { # Define a harmonic potential, 1/2*K*(d-d0)^2/w_d^2
  colvars rg1 # Apply it to the variable "d"
  centers 1.7 # The center of the potential, "d0"
  forceConstant 956.0 # Force constant, "K"
}
作者
Author:
fhh2626    时间: 2024-7-9 10:07
kokiw 发表于 2024-7-9 09:51
请问下老师 跑回旋半径的colvars的话,要怎么设置啊?我参照手册里但是没看到除了atoms外的关键词,我之前 ...

看起来问题不大,你可以看看.colvars.traj文件,看看输出的rg值是多少
作者
Author:
kokiw    时间: 2024-7-9 10:57
fhh2626 发表于 2024-7-9 10:07
看起来问题不大,你可以看看.colvars.traj文件,看看输出的rg值是多少

老师,我的rg输出值都在1.6±0.04附近,不超过1.7,所以我不太确定这样正不正常?之前用NAMD跑的话感觉rg在17埃附近分布得比gromacs的这个更开一点,不知道gromacs里用colvars的话我需要再加大rg的设置值吗?
作者
Author:
fhh2626    时间: 2024-7-10 11:35
kokiw 发表于 2024-7-9 10:57
老师,我的rg输出值都在1.6±0.04附近,不超过1.7,所以我不太确定这样正不正常?之前用NAMD跑的话感觉rg ...

应该不是rg值的问题,是两次模拟约束力常数不太一样,注意单位换算
作者
Author:
neocc    时间: 2024-10-7 22:53
请问范老师,需要用什么增强采样方法来研究溶剂溶解破坏高分子链之间氢键网络的过程呢,WTM-eABF或者meta-ABF可以吗?
还有氢键网络里面形成氢键的原子对很多,溶剂分子出现在高分子链的周围也不是一直固定的,相应的CV应该怎么写呢?
作者
Author:
fhh2626    时间: 2024-10-7 23:00
neocc 发表于 2024-10-7 22:53
请问范老师,需要用什么增强采样方法来研究溶剂溶解破坏高分子链之间氢键网络的过程呢,WTM-eABF或者meta-A ...

这个问题非常难,如果不是100%理解这个问题的话,建议不要做




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3