-
Notifications
You must be signed in to change notification settings - Fork 5
/
antechamber.sh
executable file
·92 lines (88 loc) · 2.99 KB
/
antechamber.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
###################################################################
#Script Name : run-SN.sh
#Description : execute Dynemol from pwd using local dynemol src files
#Args : see usage
#Author : Luis G C Rego
#date : 30/Sept/2023
###################################################################
# Function to display usage instructions
usage() {
bf=$(tput bold)
fb=$(tput sgr0)
echo "Usage: $0 [OPTIONS]"
echo " "
echo " ${bf}-h, --help, help${fb} Display this help message"
echo " "
echo " ${bf}manipulate${fb}, calls suite of manipulate routines for pre- and post-processing data"
echo " "
echo " ${bf}resume${fb}, resumes MD simulation; need to mv velocities.out -> velocities.inpt; no need to update input.pdb"
echo " "
echo " ${bf}preview${fb}, just initiates Dynemol, for the sake of checking initial execution"
echo " "
echo " ${bf}spawn${fb}, generates thermal configurations out of an MD run ; usage below"
echo " usage: spawn {# of configurations to be saved}"
echo " "
echo " ${bf}PDOS${fb}, generates PDOS of atomic features , implemented in driver = diagnostic ; usage below"
echo " usage:"
echo " PDOS {EHSymbol or Symbol}"
echo " PDOS {AO} {MO_i} - {MO_f} , range of MO's from MO_i to MO_f"
echo " "
echo " ${bf}MO${fb}, generates MO cube files for visualization , implemented in driver = {diagnostic,Genetic_Alg} ; usage below"
echo " usage:"
echo " MO {MO_i} - {MO_f} , range of MO's from MO_i to MO_f"
echo " "
echo " for (driver = MM_Dynamics) and (driver_MM = Parametrize) choose among the arguments below"
echo " newOPT , repeat , resume"
exit 1
}
force_flag=false
# Parse command line arguments
if [[ "$#" -ne 0 ]]; then
case "$1" in
-h|--help|help)
usage
;;
-f|--force)
force_flag=true
shift
;;
manipulate)
$DYNEMOLDIR/manipulate/manipulate
exit 1
;;
resume)
arguments="resume"
;;
preview)
arguments="preview"
;;
spawn)
arguments="spawn $2"
;;
PDOS|pdos|Pdos)
if [ "$#" -lt 2 ]; then
usage; exit
elif [ "$#" -eq 2 ]; then
arguments="PDOS $2"
elif [ "$#" -eq 5 ]; then
arguments="PDOS AO $3"\ -\ "$5"
fi
;;
MO|mo)
if [ "$#" -le 2 ]; then
usage; exit
elif [ "$#" -eq 3 ]; then
arguments="MO $2 $3"
elif [ "$#" -eq 4 ]; then
arguments="MO $2"\ -\ "$4"
fi
;;
*)
echo "Error: Unknown option: $1"
usage
;;
esac
fi
echo "$arguments"
export force_flag