-
Notifications
You must be signed in to change notification settings - Fork 0
/
predict-binding-site
executable file
·43 lines (37 loc) · 1.06 KB
/
predict-binding-site
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
#!/bin/bash
# Input directory
if [ -z "$1" ]; then
echo "Please provide input directory containing pdb files"
exit 1
fi
input_dir=$(readlink -f $1)
if [ ! -d "$input_dir" ]; then
echo "Input directory $input_dir does not exist"
exit 1
fi
# Output file
if [ -z "$2" ]; then
echo "Please provide output file"
exit 1
fi
output_file=$2
output_dir=$(dirname $output_file)
mkdir -p $output_dir
output_dir=$(readlink -f $output_dir)
output_filename=$(basename $output_file)
# Additional arguments
additional_args=${@:3}
echo "Input directory: $input_dir"
echo "Output file: $output_file"
#full path
input_dir=$(readlink -f $input_dir)
# Run
MOUNT_STR="-v $output_dir:/output -v $input_dir:/input"
GPU_STR="--runtime=nvidia -e NVIDIA_DRIVER_CAPABILITIES=compute,utility -e NVIDIA_VISIBLE_DEVICES=all"
docker run --rm $MOUNT_STR $GPU_STR daeseoklee/bsp-inference -i /input -o /output/$output_filename $additional_args
if [ -f $output_file ]; then
echo "Output file $output_file is generated"
else
echo "Output file $output_file is not generated"
exit 1
fi