计算化学公社

标题: 求助:请问如何在NAMD的conf文件里加余弦电场? [打印本页]

作者
Author:
枝昂昂昂    时间: 2020-9-29 13:19
标题: 求助:请问如何在NAMD的conf文件里加余弦电场?
目前我在conf文件里加的是静电场 如图为0.1V/nm,请问如何修改conf文件达到把这个电场变成余弦的交流电呢?

作者
Author:
fhh2626    时间: 2020-9-29 16:25
efield aaa aaa aaa
run 10000
efield bbb bbb bbb
run 10000
efield ccc ccc ccc
run 10000

你只要efield按余弦变化设置就行了,当然你可以写一个循环完成这个事情
作者
Author:
枝昂昂昂    时间: 2020-9-29 20:07
fhh2626 发表于 2020-9-29 16:25
efield aaa aaa aaa
run 10000
efield bbb bbb bbb

您好,请问可以具体举个例子吗?我还是没太明白,比如我想加x方向0.5V/nm的交流电该怎么实现?万分感激!
作者
Author:
fhh2626    时间: 2020-9-30 09:56
枝昂昂昂 发表于 2020-9-29 20:07
您好,请问可以具体举个例子吗?我还是没太明白,比如我想加x方向0.5V/nm的交流电该怎么实现?万分感激!

比如
efield 1 0 0
run 10000
efield -1 0 0
run 10000
efield 1 0 0
run 10000
efield -1 0 0

这就是一个方波类型的交流电
你想要什么形状,什么频率的交流电就调efield和run就行了
作者
Author:
枝昂昂昂    时间: 2020-10-18 14:29
fhh2626 发表于 2020-9-30 09:56
比如
efield 1 0 0
run 10000

老师你好 这是我写的循环 :
eField 0.23 0.0 0.0
for {set i 0} {$i < 20} {incr i} {
        if {$i % 2 == 0} {
                eField 0.23 0.0 0.0
                run 25000
        } else {
                eField -0.23 0.0 0.0
                run 25000
        }
}

可是运行不了 运行错误显示:
Reason: FATAL ERROR: ERROR(S) IN THE CONFIGURATION FILE

Charm++ fatal error:
FATAL ERROR: ERROR(S) IN THE CONFIGURATION FILE
请问问题出在哪里?该怎么修改?多谢!
作者
Author:
fhh2626    时间: 2020-10-18 21:15
枝昂昂昂 发表于 2020-10-18 14:29
老师你好 这是我写的循环 :
eField 0.23 0.0 0.0
for {set i 0} {$i < 20} {incr i} {

你要把完整的出错信息贴上来我才能看出来问题出在哪里
作者
Author:
枝昂昂昂    时间: 2020-10-19 15:15
fhh2626 发表于 2020-10-18 21:15
你要把完整的出错信息贴上来我才能看出来问题出在哪里

老师,我想设置的是50W步内震荡10次的模拟,可是我的结果确实100W步,可以教教我怎么修改吗?
下面是我的CONF文件
#############################################################
## JOB DESCRIPTION                                         ##
#############################################################

# Minimization and Equilibration of
# Ubiquitin in a Water Box


#############################################################
## ADJUSTABLE PARAMETERS                                   ##
#############################################################

structure          /public/home/jiangzt/namd-simulation/zhendang/1bbl.psf
coordinates       /public/home/jiangzt/namd-simulation/zhendang/1bbl.pdb

set temperature    310
set outputname     eq

firsttimestep      0

# continuing a run
set inputname    /public/home/jiangzt/namd-simulation/zhendang/min/min  ;#only need to edit this in one place!
bincoordinates $inputname.coor    ;# coordinates from last run (binary)
#binvelocities  $inputname.vel     ;# velocities from last run (binary)
extendedSystem $inputname.xsc       ;# cell dimensions from last run


#############################################################
## SIMULATION PARAMETERS                                   ##
#############################################################

# Input
paraTypeCharmm            on
parameters          /public/home/jiangzt/namd-simulation/zhendang/par_all27_prot_lipid.inp
temperature         $temperature


# Force-Field Parameters
exclude             scaled1-4
1-4scaling          1.0
cutoff              12.0
switching           on
switchdist          10.0
pairlistdist        14.0


# Integrator Parameters
timestep            2.0  ;# 2fs/step
rigidBonds          all  ;# needed for 2fs steps
nonbondedFreq       1
fullElectFrequency  2  
stepspercycle       10


# Constant Temperature Control
langevin            on    ;# do langevin dynamics
langevinDamping     1     ;# damping coefficient (gamma) of 1/ps
langevinTemp        $temperature
langevinHydrogen    off    ;# don't couple langevin bath to hydrogens

# Periodic Boundary Conditions
cellBasisVector1    53.674   0.0   0.0
cellBasisVector2      0.0   53.991  0.0
cellBasisVector3     0.0    0     51.618
cellOrigin          -5.023  2.199  -0.741

wrapAll             on


# PME (for full-system periodic electrostatics)
PME                 yes
PMEGridSpacing      1.0

#manual grid definition
PMEGridSizeX       64
PMEGridSizeY       64
PMEGridSizeZ       64


# Constant Pressure Control (variable volume)
useGroupPressure      yes ;# needed for rigidBonds
useFlexibleCell       no
useConstantArea       no

langevinPiston        on
langevinPistonTarget  1.01325 ;#  in bar -> 1 atm
langevinPistonPeriod  100.0
langevinPistonDecay   50.0
langevinPistonTemp    $temperature

                                                                                         
# Output
outputName          $outputname

restartfreq         2000    ;# 500steps = every 1ps
dcdfreq             2000
xstFreq             2000
outputEnergies      2000
outputPressure      2000

#Elect field
eFieldon     yes
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
eField       1.38   0.0   0.0
run 25000
eField       -1.38   0.0   0.0
run 25000
#############################################################
## EXTRA PARAMETERS                                        ##
#############################################################
#############################################################
## EXECUTION SCRIPT                                        ##
#############################################################
# Minimization

reinitvels $temperature
run 500000

作者
Author:
fhh2626    时间: 2020-10-19 17:12
reinitvels $temperature
run 500000

这两句删了
作者
Author:
枝昂昂昂    时间: 2020-10-19 20:04
fhh2626 发表于 2020-10-19 17:12
reinitvels $temperature
run 500000

谢谢老师 倒数第二句是什么意思啊?
作者
Author:
fhh2626    时间: 2020-10-20 10:08
枝昂昂昂 发表于 2020-10-19 20:04
谢谢老师 倒数第二句是什么意思啊?

将原子速度初始化为你设置的温度




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