-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiffdock.sh
More file actions
28 lines (23 loc) · 771 Bytes
/
diffdock.sh
File metadata and controls
28 lines (23 loc) · 771 Bytes
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
#!/bin/bash
# Script: diffdock.sh - Run inference using local files as input
# Usage: ./diffdock.sh [receptor].pdb [ligand].sdf
protein_file=$1
ligand_file=$2
protein_bytes=`grep -E ^ATOM $protein_file | sed -z 's/\n/\\\n/g'`
ligand_bytes=`sed -z 's/\n/\\\n/g' $ligand_file`
ligand_format=`basename $ligand_file | awk -F. '{print $NF}'`
echo "{
\"ligand\": \"${ligand_bytes}\",
\"ligand_file_type\": \"${ligand_format}\",
\"protein\": \"${protein_bytes}\",
\"num_poses\": 10,
\"time_divisions\": 20,
\"steps\": 18,
\"save_trajectory\": false,
\"is_staged\": false
}" > diffdock.json
curl --header "Content-Type: application/json" \
--request POST \
--data @diffdock.json \
--output output.json \
http://localhost:8000/molecular-docking/diffdock/generate