-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathexecute_experiments.sh
More file actions
executable file
·42 lines (33 loc) · 1.1 KB
/
execute_experiments.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.1 KB
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
#!/bin/bash
# check the input parameters ($1 path of proteins | $2 initial number of bits | $3 final number of bits)
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
echo "Any parameter is missing"
echo "Parameter 1 (proteins path): " $1
echo "Parameter 2 (initial number bits): " $2
echo "Parameter 3 (final number bits): " $3
exit 1
fi
# read all lines of the file
lines=()
while read line; do
lines+=("$line")
done <$1
for index in $(seq $2 $3); do
for line in "${lines[@]}"; do
proteinline="$(tr -s ' ' <<< "$line")"
protein="$(cut -d' ' -f1 <<<"$proteinline")"
aa="$(cut -d' ' -f2 <<<"$proteinline")"
id="$(cut -d' ' -f3 <<<"$proteinline")"
id=${id/"("/""}
id=${id/")"/""}
if [[ $id == *"#"* ]]; then
for init in minifold random; do
python3 main.py $protein $aa $index $init simulation
done
else
for init in minifold random; do
python3 main.py $protein $aa $index $init simulation -i $id
done
fi
done
done