Created
July 22, 2014 10:50
-
-
Save yukimya/d53f941387fe6b89c85e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# GPL v. 3 | |
# Program mkMu: 06mkAllEqu.sh | |
# | |
# | |
# written by Naoyuki Miyashita 7/22/2014 | |
inputPrefix="04_ddng" | |
inpPrefix="06.eq" | |
outPrefix="07.eq" | |
scaling=10.0 | |
Temp=310 | |
c1=`grep -e size 04_ddng.dat | awk '{print $4}'` | |
c2=`grep -e size 04_ddng.dat | awk '{print $5}'` | |
c3=`grep -e size 04_ddng.dat | awk '{print $6}'` | |
Size_x=$c1 | |
Size_y=$c2 | |
Size_z=$c3 | |
#PME_x=90 | |
#PME_y=80 | |
#PME_z=80 | |
PME_x=120 | |
PME_y=100 | |
PME_z=100 | |
par="../../par/par_prot_wation.prm" | |
minfix="./07_min_fix2.pdb" | |
program="perl set_minfix2.pl " | |
nmpi=12 | |
mkdir $outPrefix | |
line_0=" | |
#############################################################\n | |
## JOB DESCRIPTION ##\n | |
#############################################################\n | |
\n | |
# Minimization\n | |
\n | |
#############################################################\n | |
## ADJUSTABLE PARAMETERS ##\n | |
#############################################################\n | |
set name $inputPrefix\n | |
structure \$name.psf\n | |
coordinates \$name.pdb\n | |
set otime 2500\n | |
set finalstep 50000 | |
\n | |
set tempe $Temp\n | |
set outputname $outPrefix/r.$outPrefix\n | |
set inputname $inpPrefix/r.$inpPrefix\n | |
\n | |
binCoordinates \$inputname.restart.coor\n | |
binVelocities \$inputname.restart.vel\n | |
extendedSystem \$inputname.restart.xsc\n | |
#\n | |
# 7.11172 7.11172 8.81032\n | |
#cellBasisVector1 $Size_x 0 0\n | |
#cellBasisVector2 0 $Size_y 0\n | |
#cellBasisVector3 0 0 $Size_z \n | |
#cellOrigin 60.0 60.0 60.0\n | |
#cellOrigin 0.0 0.0 0.0\n | |
#6.74252 6.74252 9.81649\n | |
#firsttimestep 2000\n | |
\n | |
#############################################################\n | |
## SIMULATION PARAMETERS ##\n | |
#############################################################\n | |
\n | |
# Input\n | |
paraTypeCharmm on\n | |
parameters $par\n | |
#parameters par_all36_lipid.prm\n | |
#temperature \$tempe\n | |
\n | |
\n | |
# Force-Field Parameters\n | |
exclude scaled1-4\n | |
1-4scaling 1.0\n | |
cutoff 12.0\n | |
switching on\n | |
switchdist 10.0\n | |
pairlistdist 14.0\n | |
vdwForceSwitching off\n | |
LJcorrection off\n | |
\n | |
# Integrator Parameters\n | |
timestep 2.0 ;# 2fs/step\n | |
rigidBonds all ;# needed for 2fs steps\n | |
nonbondedFreq 1\n | |
fullElectFrequency 2 \n | |
stepspercycle 10\n | |
longSplitting c2\n | |
\n | |
# Constant Temperature Control\n | |
langevin on ;# do langevin dynamics\n | |
langevinDamping 5 ;# damping coefficient (gamma) of 5/ps\n | |
langevinTemp \$tempe\n | |
langevinHydrogen off ;# don't couple langevin bath to hydrogens\n | |
\n | |
# Periodic Boundary Conditions\n | |
\n | |
wrapAll on\n | |
wrapWater on\n | |
wrapNearest on\n | |
dcdUnitCell yes\n | |
\n | |
# PME (for full-system periodic electrostatics)\n | |
PME yes\n | |
PMEGridSizeX $PME_x\n | |
PMEGridSizeY $PME_y\n | |
PMEGridSizeZ $PME_z\n | |
PMEGridSpacing 1.0\n | |
margin 5.0\n | |
\n | |
# Constant Pressure Control\n | |
useGroupPressure yes ; # needed for rigidBonds\n | |
useFlexibleCell no\n | |
useConstantArea no \n | |
useConstantRatio no\n | |
\n | |
langevinPiston on\n | |
langevinPistonTarget 1.01325 ; # in bar -> 1 atm \n | |
langevinPistonPeriod 100.0\n | |
langevinPistonDecay 50.0\n | |
langevinPistonTemp \$tempe\n | |
\n | |
# Output\n | |
outputName \$outputname\n | |
\n | |
restartfreq \$otime ;# 2500steps = every 5ps\n | |
dcdfreq \$otime\n | |
xstFreq \$otime\n | |
outputEnergies \$otime\n | |
outputPressure \$otime\n | |
\n | |
#############################################################\n | |
## EXTRA PARAMETERS ##\n | |
#############################################################\n | |
\n | |
# Harmonic constraint\n | |
constraints on\n | |
consref $minfix\n | |
conskfile $minfix\n | |
conskcol O\n | |
constraintScaling $scaling\n | |
#\n | |
# FIXED ATOM\n | |
#fixedAtomsForces on\n | |
#fixedAtoms on\n | |
#fixedAtomsCol O\n | |
#fixedAtomsFile $minfix\n | |
\n | |
#############################################################\n | |
## EXECUTION SCRIPT ##\n | |
#############################################################\n | |
\n | |
# Minimization\n | |
minimization off\n | |
#minimize 10000\n | |
#minimization on\n | |
#minTinyStep 1.0e-11 # d 1.0e-6\n | |
#minBabyStep 1.0e-7 # d 1.0e-2\n | |
#minLineGoal 1.0e-9 # d 1.0e-4\n | |
#minimize 10000\n | |
\n | |
#minimization on\n | |
#minTinyStep 1.0e-8 # d 1.0e-6\n | |
#minBabyStep 1.0e-5 # d 1.0e-2\n | |
#minLineGoal 1.0e-7 # d 1.0e-4\n | |
#minimize 2000\n | |
\n | |
#minimization on\n | |
#minTinyStep 1.0e-6 # d 1.0e-6\n | |
#minBabyStep 1.0e-3 # d 1.0e-2\n | |
#minLineGoal 1.0e-5 # d 1.0e-4\n | |
#minimize 1000\n | |
\n | |
#reinitvels \$temperature\n | |
\n | |
run \$finalstep ; # 10.0ns \n | |
" | |
echo -n -e $line_0 > $outPrefix.inp | |
line_0=" | |
#!/bin/bash -f\n | |
#$ -N $outPrefix\n | |
#$ -V -S /bin/bash\n | |
#$ -l gpu=1\n | |
#$ -cwd\n | |
namd2 +p$nmpi +idlepoll $outPrefix.inp > $outPrefix/$outPrefix.out \n | |
" | |
echo -n -e $line_0 > $outPrefix.sh | |
# run | |
$program $inputPrefix.pdb > $minfix | |
sh $outPrefix.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment