Skip to content
Snippets Groups Projects
Commit 8730919b authored by Winokan, Max S Dr (PG/R - Maths & Physics)'s avatar Winokan, Max S Dr (PG/R - Maths & Physics)
Browse files

First version of Avogadro DNA PDB converted for pdb2gmx compatibility

parent e6ac6fb3
No related branches found
No related tags found
No related merge requests found
# pdb_mod.sh --find-atom "HTER" -i ATGCTACG_AVO.pdb
# pdb_mod.sh --find-atom "OXT" -i ATGCTACG_AVO.pdb
# pdb_mod.sh --replace "HTER" "H5T" -i ATGCTACG_AVO.pdb --filter DA -o ATGCTACG_MOD.pdb -x
# pdb_mod.sh --replace "OXT" "O5'" -i ATGCTACG_MOD.pdb --filter DA -f -o ATGCTACG_MOD.pdb -x
source $MWSHPATH/out.sh
EXPERT=0
while test $# -gt 0; do
case "$1" in
-i|--input)
shift
INPUT=$1
shift
;;
-o|--output)
shift
OUTPUT=$1
shift
;;
-x|--expert)
shift
EXPERT=1
;;
*)
warningOut "Unrecognised CLI flag: $colArg$1"
break
;;
esac
done
if [[ -z $INPUT ]] ; then
errorOut "No input file specified."
exit
fi
if [[ -z $OUTPUT ]] ; then
OUTPUT=$(echo "$INPUT" | sed 's/AVO/MOD/' | sed 's/avo/mod/')
if [ $EXPERT -eq 0 ] ; then
warningOut "No output file specified. Defaulted to $colFile""$OUTPUT"
fi
fi
if [[ $INPUT == $OUTPUT ]] ; then
if [ $FORCE -eq 1 ] ; then
if [ $EXPERT -eq 0 ] ; then
warningOut "Overwriting $colFile"$INPUT"$colWarning!"
fi
else
errorOut "Overwriting is not permitted. Select different input and output files. (ignore with -f)"
exit
fi
fi
if [[ -z $INPUT ]] ; then
errorOut "No input file specified."
exit
fi
if [[ "$OUTPUT" == "__temp__" ]] ; then
errorOut "Choose a different output name."
exit
fi
# PDB Summary
pdb_mod.sh --summary $INPUT
pdb_mod.sh --summary $INPUT --filter A -rlo # Chain A
pdb_mod.sh --summary $INPUT --filter B -rlo # Chain B
echo ""
N3TER=0
N5TER=0
TER_NUM=0
# Deal with termini
headerOut "Renaming termini atoms:"
pdb_mod.sh --replace "HTER" "H5T" -i $INPUT -o $OUTPUT -x
RET=$?
let "N5TER = N5TER + RET"
pdb_mod.sh --replace "OXT" "O5'" -i $OUTPUT -f -o $OUTPUT -x
pdb_mod.sh --replace "HCAP" "H3T" -i $OUTPUT -f -o $OUTPUT -x
RET=$?
let "N3TER = N3TER + RET"
let "TER_NUM = N5TER + N3TER"
echo ""
if [ $TER_NUM -ne 0 ] ; then
headerOut "You will likely have to select $TER_NUM termini when using $colFunc""pdb2gmx"
headerOut "$N5TER x $colArg""5TER"
headerOut "$N3TER x $colArg""3TER"
echo ""
fi
# Deal with backbone
headerOut "Renaming backbone atoms:"
pdb_mod.sh --replace "H5'1" "H5'" -i $OUTPUT -f -o $OUTPUT -x
pdb_mod.sh --replace "H5'2" "H5''" -i $OUTPUT -f -o $OUTPUT -x
pdb_mod.sh --replace "H2'1" "H2'" -i $OUTPUT -f -o $OUTPUT -x
pdb_mod.sh --replace "H2'2" "H2''" -i $OUTPUT -f -o $OUTPUT -x
echo ""
headerOut "Now try to run pdb2gmx:"
echo -e "$colFunc""source"$colClear" $colFile\$GROMAX/load_gmx.sh"$colClear
echo -e "$colFunc""source"$colClear" $colFile\$GROMAX/gmx_funcs.sh"$colClear
echo -e "$colFunc""gromax$colClear "$colFunc"pdb2gmx$colClear $colArg-inter -f $colFile$OUTPUT$colArg"
echo ""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment