-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_colabfold.sh
executable file
·76 lines (62 loc) · 1.41 KB
/
run_colabfold.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
#!/bin/env bash
#$ -adds l_hard gpu 1
#$ -adds l_hard cuda.0.name 'NVIDIA A40'
#$ -j y
#$ -N colabfold
#$ -o colabfold_logs/$JOB_NAME.o$JOB_ID
#$ -cwd
set -e
usage() {
echo "Usage: $0 -i /path/to/fasta/file [-c 'colabfold arguments'] [-h] [-u]"
echo
echo "Note that colabfold arguments passed via '-c' must be surrounded with quotes to ensure they are all passed to colabfold"
echo
echo "run $0 -u for colabfold_batch help"
echo
exit 1
}
colabfold_usage() {
colabfold_batch -h
exit 1
}
while getopts "i:c:uh" opt; do
case $opt in
i)
input=$OPTARG
;;
c)
colabfold_args=$OPTARG
;;
u)
colabfold_usage
;;
h)
usage
;;
*)
;;
esac
done
read -a colabfold_args_list <<< "$colabfold_args"
for arg in "${colabfold_args_list[@]}"; do
if [[ "$arg" == "--use-gpu-relax" ]]; then
echo
echo "WARNING: Running amber relaxation on GPUs is unreliable and may fail."
echo "Should this occur, rerun without --use-gpu-relax"
echo
fi
done
if [[ -z "$input" ]]; then
usage
fi
if [[ ! -e "$input" ]]; then
echo "Specified input file (${input} not found..."
exit 1
fi
echo "Hostname: $HOSTNAME"
echo "Job ID: $SGE_JOB_ID"
echo "GPU: $CUDA_VISIBLE_DEVICES"
echo "Command line: colabfold_batch ${colabfold_args_list[@]} ${input} ${input_dir}/colabfold_outputs"
input_dir=$(dirname $input)
TF_CPP_MIN_LOG_LEVEL=2
colabfold_batch ${colabfold_args_list[@]} ${input} ${input_dir}/colabfold_outputs