Last active
August 29, 2015 14:04
-
-
Save yukimya/da0cf5e01d225157a95f to your computer and use it in GitHub Desktop.
add water and IONs
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: 04addWaterION.sh | |
# | |
# | |
# written by Naoyuki Miyashita 7/22/2014 | |
#INPUT | |
inputPrefix="01_dd" | |
inpdcd="03.min/r.03.min.dcd" | |
outPrefix="04_addwt" | |
outPrefix2="04_ddng" | |
cons=0.15 | |
SALT="POT" | |
numOfFrame=500 | |
numberOfTopology=2 | |
topology_0="../../par/top_prot_wation.rtf" | |
topology_1="../../par/top_all36_na.rtf" | |
topology=("$topology_0" "$topology_1") | |
program="catdcd" | |
# OUT | |
#mk pdb from dcd | |
$program -otype pdb -o $outPrefix.pre.pdb \ | |
-first $numOfFrame -last $numOfFrame \ | |
-s $inputPrefix.psf -stype psf \ | |
-dcd $inpdcd | |
line_1="package require solvate" | |
echo $line_1 > $outPrefix.inp | |
i=0 | |
while [ $i -lt $numberOfTopology ] | |
do | |
topf=${topology[$i]} | |
line_1="topology $topf" | |
echo $line_1 >> $outPrefix.inp | |
i=$((i+1)) | |
done | |
line_1="solvate $inputPrefix.psf $outPrefix.pre.pdb -t 15 -o $outPrefix" | |
echo $line_1 >> $outPrefix.inp | |
line_1="exit" | |
echo $line_1 >> $outPrefix.inp | |
vmd -dispdev text -e $outPrefix.inp > $outPrefix.log | |
## | |
line_1="package require autoionize" | |
echo $line_1 > $outPrefix2.inp | |
i=0 | |
while [ $i -lt $numberOfTopology ] | |
do | |
topf=${topology[$i]} | |
line_1="topology $topf" | |
echo $line_1 >> $outPrefix2.inp | |
i=$((i+1)) | |
done | |
line_1="autoionize -psf $outPrefix.psf -pdb $outPrefix.pdb -sc $cons -o $outPrefix2 -cation $SALT" | |
echo $line_1 >> $outPrefix2.inp | |
line_1="exit" | |
echo $line_1 >> $outPrefix2.inp | |
vmd -dispdev text -e $outPrefix2.inp > $outPrefix2.log | |
python maxmin.py $outPrefix2.pdb "all" > $outPrefix2.data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment