Click Start Over at the left bottom to start Back to Contents
Applying external force
# input
set toppar /p/home/kuangz/CharmmGUItoppar
set restart 1
set fixed 0
set temperature 308.15
set inputname min
set output heat
coordinates ../com.pdb
structure ../com.psf
if { $restart } {
binCoordinates $inputname.restart.coor
binVelocities $inputname.restart.vel ;# remove the “temperature” entry if you use this!
extendedSystem $inputname.restart.xsc
} else {
temperature $temperature; # initial temperature
cellBasisVector1 242 0 0
cellBasisVector2 0 242 0
cellBasisVector3 0 0 410
cellOrigin 0 0 0
}
paraTypeCharmm on
parameters $toppar/par_all36m_prot.prm
parameters $toppar/par_all36_cgenff.prm
parameters $toppar/toppar_all36_nano_lig.str
# output
outputname $output
binaryoutput no
outputEnergies 50000
restartfreq 50000
dcdfreq 50000
xstFreq 50000
wrapWater on
wrapAll on
dcdUnitCell yes
# mobile atom selection:
if { $fixed } {
fixedAtoms on
fixedAtomsFile fixed.pdb
fixedAtomsCol B
}
constraints on
consexp 2
consref fixed.pdb
conskfile fixed.pdb
conskcol O
# Basic dynamics
exclude scaled1-4
1-4scaling 1
# COMmotion yes # dielectric 1.0
# Simulation space partitioning
switching on
switchdist 10
cutoff 12
pairlistdist 16
# Multiple timestepping
firsttimestep 0
timestep 2.0
stepspercycle 20
pairlistsPerCycle 2
nonbondedFreq 2
fullElectFrequency 2
rigidbonds all #! SHAKE_H SPC
# Temperature control
# Langevin Dynamics
langevin on; # do langevin dynamics
langevinDamping 1;# damping coefficient (gamma) of 1/ps
#langevinTemp $temperature; # bath temperature
langevinHydrogen no; # don’t couple langevin bath to hydrogens
# Constant Pressure Control
langevinPiston on
langevinPistonTarget 1.01325 ;# in bar -> 1 atm
langevinPistonPeriod 100.
langevinPistonDecay 50.
# langevinPistonTemp $temperature
useFlexibleCell yes
useGroupPressure yes
useConstantRatio yes
# useConstantArea yes
margin 3
# PBC
PME yes
# the number of grid points should be a multiple of 2, 3, or 5
#PMEGridSizeX 182
#PMEGridSizeY 182
#PMEGridSizeZ 276
PMEInterpOrder 6
PMEGridSpacing 1.0
#extraBonds on
#extraBondsFile extra.psf
#colvars on
#colvarsConfig SGAU.in
#colvarsInput $inputname.restart.colvars.state
#
# Scripting
# minimize 10000
# run 100000000
#
# heating up
# reassignFreq 10000 # reassignTemp 0.0 # reassignIncr 30.0 # reassignHold $temperature # reinitvels $temperature # run 58500000
set temp 283.15
while { $temp < 308.15 } {
langevinTemp $temp
langevinPistonTemp $temp
run 1000
set temp [expr $temp + 5.0]
}
# set freq 59520
set totalStep 300000000
eFieldOn yes
for {set i 0} { $i < $totalStep } {incr i} {
if {$i % 2 == 0} {
eField 0.000002 0.0 0.0
} else {
eField -0.000002 0.0 0.0
}
run $freq
}