计算化学公社

 找回密码 Forget password
 注册 Register

求助:请问如何在NAMD的conf文件里加余弦电场?

查看数: 6892 | 评论数: 9 | 收藏 Add to favorites 1
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2020-9-29 13:19

正文摘要:

目前我在conf文件里加的是静电场 如图为0.1V/nm,请问如何修改conf文件达到把这个电场变成余弦的交流电呢?

回复 Reply

fhh2626 发表于 Post on 2020-10-20 10:08:22
枝昂昂昂 发表于 2020-10-19 20:04
谢谢老师 倒数第二句是什么意思啊?

将原子速度初始化为你设置的温度
枝昂昂昂 发表于 Post on 2020-10-19 20:04:54
fhh2626 发表于 2020-10-19 17:12
reinitvels $temperature
run 500000

谢谢老师 倒数第二句是什么意思啊?
fhh2626 发表于 Post on 2020-10-19 17:12:19
reinitvels $temperature
run 500000

这两句删了
枝昂昂昂 发表于 Post on 2020-10-19 15:15:56
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
fhh2626 发表于 Post on 2020-10-18 21:15:42
枝昂昂昂 发表于 2020-10-18 14:29
老师你好 这是我写的循环 :
eField 0.23 0.0 0.0
for {set i 0} {$i < 20} {incr i} {

你要把完整的出错信息贴上来我才能看出来问题出在哪里
枝昂昂昂 发表于 Post on 2020-10-18 14:29:54
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
请问问题出在哪里?该怎么修改?多谢!
fhh2626 发表于 Post on 2020-9-30 09:56:07
枝昂昂昂 发表于 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就行了
枝昂昂昂 发表于 Post on 2020-9-29 20:07:03
fhh2626 发表于 2020-9-29 16:25
efield aaa aaa aaa
run 10000
efield bbb bbb bbb

您好,请问可以具体举个例子吗?我还是没太明白,比如我想加x方向0.5V/nm的交流电该怎么实现?万分感激!
fhh2626 发表于 Post on 2020-9-29 16:25:49
efield aaa aaa aaa
run 10000
efield bbb bbb bbb
run 10000
efield ccc ccc ccc
run 10000

你只要efield按余弦变化设置就行了,当然你可以写一个循环完成这个事情

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-22 03:44 , Processed in 0.171320 second(s), 25 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list