-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormatPDB.sh
executable file
·53 lines (46 loc) · 1.62 KB
/
FormatPDB.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# This program requires python 3 to be loaded with the biopython package
while getopts hi:o:f: option
do
case "${option}"
in
h) help="True";;
i) input=${OPTARG};;
o) output=${OPTARG};;
f) format=$OPTARG;;
*)
esac
done
if [ "$help" == "True" ]; then
echo 'FormatPDB'
echo ''
echo 'This script converts between PDB atom naming schemes'
echo 'Call this script anywhere'
echo 'Outputs a formatted pdb file'
echo ''
echo 'NOTE: this script requires python3'
echo 'If on Hoffman2 and this is not in your path, issue the following command:'
echo ' module load python/3.6.1_shared'
echo 'Other versions can be found with:'
echo ' module avail python'
echo ''
echo 'FormatPDB.sh [-h] [-i input.pdb] [-o output.pdb] [-f format]'
echo '-h: help - display this information'
echo '-i: input - path to pdb to be formatted'
echo '-o: output - path where formatted pdb should be stored'
echo '-f: format - naming convention to convert to, currently supported:'
echo ' - Standard (used for titr-MD)'
echo ' - OPLSAA'
echo ' - DMD'
echo ' - Amber03'
echo ' - GROMOS9654a7'
echo ''
elif [ "$input" == "?" ] || [ "$output" == "?" ] || [ "$format" == "?" ]; then
echo 'Must provide proper -i, -o, -f options'
echo 'Call FormatPDB.sh -h to see the run information'
else
echo 'Call FormatPDB.sh -h to see the run information'
script_loc=$(dirname $(readlink -f $0))
name_file_loc=$script_loc/resources/
python3 $script_loc/main.py $input $output $name_file_loc $format # Create the new file
fi