Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@

**Enhaced_Sampling_Methods_Tutorials**
# Enhaced Sampling Methods Tutorials






* Molecular Dynamics(**MD**): Will be updated soon
* Molecular Dynamics(**MD**) : Will be updated soon
* Umbrella Sampling([**US**](https://github.com/NNairIITK/Enhanced_Sampling_Methods_Tutorials/tree/master/Umbrella_Sampling)) : will be updated soon
* Metadynamics([**METAD**](https://github.com/NNairIITK/Enhanced_Sampling_Methods_Tutorials/tree/master/Metadynamics)) : Will be updated soon
* Replica Exchange MD([**REMD**](https://github.com/NNairIITK/Enhanced_Sampling_Methods_Tutorials/tree/master/Replica_Exchange_MD))
: Updated
* Well Sliced Metadynamics(**WS-METAD**) : Will be updated soon
* Replica Exchange Solute Scaling([**REST2**](https://github.com/NNairIITK/Enhanced_Sampling_Methods_Tutorials/tree/master/REST2))
: Updated
* Temperature Accelerated Sliced Sampling([**TASS**](https://github.com/NNairIITK/Enhanced_Sampling_Methods_Tutorials/tree/master/TASS)) : Updated
Expand All @@ -20,10 +15,8 @@






** Keep looking at this page for more updates**

**Keep looking at this page for more updates**

Cheers !!!
Anji Babu
Expand Down
76 changes: 76 additions & 0 deletions REST2/Process_topology_REST2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#-------------------------------------------------------------------------------#
# Bash script to Process the topology for REST2 setup
# Selects the HOT atoms for REST2
#
# Author: Anji Babu Kapakayala
# IIT Kanpur, India.
#
# USAGE : bash Process_topology_REST2.sh topol.top
#
# Equilant command in vim: :%s/\%V /_/g
#
#-------------------------------------------------------------------------------#
#!/bin/bash
infile="$1"
#infile="trp_processed.top"
resid=0

#---> Setting output filename
fname=`echo "$infile"|cut -d "." -f1`
outfile="${fname}_hot.top"

#---> Make lines starts with * to ;*
sed -i "s/\*/;\*/g" $infile

while read line;do
#---->
res=`echo $line|awk '{print $2}'`
if [ "$res" == 'residue' ]
then
resid=`echo $line|awk '{print $3}'`
resid_ref=$resid
fi
#<---
resid_new=`echo $line|awk '{print $3}'`
if [ "$line" != "" ];then
if [ "$resid_new" != "" ];then
if [ "$resid_new" == "$resid_ref" ];then
C1=`echo $line|awk '{print $1}'`
C2=`echo $line|awk '{print $2}'`
C4=`echo $line|awk '{print $4}'`
C5=`echo $line|awk '{print $5}'`
C6=`echo $line|awk '{print $6}'`
C7=`echo $line|awk '{print $7}'`
C8=`echo $line|awk '{print $8}'`
C9=`echo $line|awk '{print $9}'`
C10=`echo $line|awk '{print $10}'`
C11=`echo $line|awk '{print $11}'`

if [ "$res" != 'residue' ] ;then
echo $C1$'\t'${C2}_$'\t'$resid_new$'\t'$C4$'\t'$C5$'\t'$C6$'\t'$C7$'\t'$C8$'\t'$C9$'\t'$C10$'\t' $C11 >> $outfile
else
echo "$line" >> $outfile
fi
else
echo "$line" >> $outfile
fi
else
echo "$line" >> $outfile
fi
else
echo "$line" >> $outfile
fi

first=`echo $line|awk '{print $1}'`
if [ "$first" == "[" ];then
#resid_new="X"
resid_ref="Y"
fi
done<$infile

#---> Make lines starts with ;* to *
sed -i "s/;\*/\*/g" $infile
sed -i "s/;\*/\*/g" $outfile
#---------------------------------------------------------#
# <========== ANJI BABU KAPAKAYALA ==========>
#---------------------------------------------------------#
119 changes: 119 additions & 0 deletions REST2/process_for_resid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#-------------------------------------------------------------------------------#
# Bash script to Process the topology for REST2 setup
# Selects the HOT atoms for REST2
#
# Author: Anji Babu Kapakayala
# IIT Kanpur, India.
#
# USAGE : bash Process_topology_REST2.sh topol.top
# bash process_topology_REST2.sh toptl.top --resid 1-5
#
# Equilant command in vim: :%s/\%V /_/g
#
#-------------------------------------------------------------------------------#
#!/bin/bash
infile="$1"
#infile="trp_processed.top"
resid=$3

#---> Setting output filename
fname=`echo "$infile"|cut -d "." -f1`
outfile="${fname}_hot.top"
touch $outfile

#---> Make lines starts with * to ;*
sed -i "s/\*/;\*/g" $infile

#-------------------------------------------------------------------------------#
function select_hot_atoms() {

while read line;do
echo "Processing for Resid: $resid"
#---->
res=`echo $line|awk '{print $2}'`
if [ "$res" == 'residue' ]
then
#--->
if [ "$1" == "all" ];then
resid=`echo $line|awk '{print $3}'`
resid_ref=$resid
else
resid_ref=$1
echo "Processing for Resid: $1"
fi
#<---
fi
#<---
resid_new=`echo $line|awk '{print $3}'`
if [ "$line" != "" ];then
if [ "$resid_new" != "" ];then
if [ "$resid_new" == "$resid_ref" ];then
C1=`echo $line|awk '{print $1}'`
C2=`echo $line|awk '{print $2}'`
C4=`echo $line|awk '{print $4}'`
C5=`echo $line|awk '{print $5}'`
C6=`echo $line|awk '{print $6}'`
C7=`echo $line|awk '{print $7}'`
C8=`echo $line|awk '{print $8}'`
C9=`echo $line|awk '{print $9}'`
C10=`echo $line|awk '{print $10}'`
C11=`echo $line|awk '{print $11}'`

if [ "$res" != 'residue' ] ;then
echo $C1$'\t'${C2}_$'\t'$resid_new$'\t'$C4$'\t'$C5$'\t'$C6$'\t'$C7$'\t'$C8$'\t'$C9$'\t'$C10$'\t' $C11 >> $outfile
else
echo "$line" >> $outfile
fi
else
echo "$line" >> $outfile
fi
else
echo "$line" >> $outfile
fi
else
echo "$line" >> $outfile
fi

first=`echo $line|awk '{print $1}'`
if [ "$first" == "[" ];then
#resid_new="X"
resid_ref="Y"
fi
done<$infile
}
#-------------------------------------------------------------------------------#
# <========================== MAIN CODE ====================================>
#-------------------------------------------------------------------------------#
if [ "$2" == "" ];then
echo "Processing All Residues"
select_hot_atoms all
else
case "$2" in
--resid|-r) echo "Resid : $resid"
if [ "$3" != "" ];then
r1=`echo $3|cut -d "-" -f1`
r2=`echo $3|cut -d "-" -f2`
echo "Initial Resid: $r1"
echo "Final Resid: $r2"
for i in `seq $r1 1 $r2`;do
select_hot_atoms $i
mv $outfile tmp
infile="tmp"
done

else
echo "Invalid resid.";exit
fi
;;
*) echo " Invalid Argument.";;
esac
fi

#-------------------------------------------------------------------------------#
#---> Make lines starts with ;* to *
sed -i "s/;\*/\*/g" $infile
sed -i "s/;\*/\*/g" $outfile
mv tmp $outfile
#-------------------------------------------------------------------------------#
# <========== ANJI BABU KAPAKAYALA ==========>
#-------------------------------------------------------------------------------#