Commit 7177f478 authored by David M. Rogers's avatar David M. Rogers
Browse files

Bug fixes and final updates before RDRP docking.

parent 1055499d
......@@ -3,7 +3,7 @@
# database know what effective virtual host name you have.
from pathlib import Path, PurePosixPath
import os, subprocess
import os, subprocess, time
bucket = 'gs://ccddc'
......
......@@ -17,12 +17,30 @@ def fix(s):
return m[0]
return s[s.index("ROOT"):]
# Pandas has too many types
def get_name(df, i, idx):
if idx:
return df.index[i]
else:
return df.iloc[i]['name']
# This script breaks out a dataframe into several
# ligand pdbqt files. It also prints a list of <name>\n<file>
# pairs suitable for sending to autodock-GPU's filelist.
#
# Note the workarounds for different conventions of input
# dataframes: frames with name-as-index
# or pdbqt-s containing extraneous data to remove
def main(argv):
assert len(argv) == 2, "Usage: %s <ligs.pq>"
df = pd.read_parquet(argv[1])
idx = True
if 'name' in df.columns:
idx = False
for i in range(len(df)):
name = df.iloc[i]['name']
name = get_name(df, i, idx)
conf = df.iloc[i]['conf']
fname = name + '.pdbqt'
with open(fname, "w") as f:
......
......@@ -5,12 +5,12 @@
#SBATCH --gres gpu:1
#SBATCH -J dock
#SBATCH -o %x.%A_%a.%j.out
#SBATCH --array=1-866
#SBATCH --array=1-868
echo "Starting $SLURM_JOB_NAME-$SLURM_ARRAY_TASK_ID at" `date`
source /apps/launchad/env.sh $SLURM_JOB_NAME
export OMP_NUM_THREADS=2
export OMP_NUM_THREADS=1
srun -n2 -N2 --gres=gpu:1 --cpus-per-task=2 --exclusive \
$LAD ccddc-controller $SLURM_JOB_NAME
......
......@@ -76,7 +76,7 @@ def collect_lig(name, max_clusters=3):
if len(xml) > max_clusters:
xml = xml[:max_clusters]
return [(en, confs[i][1]) for en,i in xml], tors
return [(en, confs[i-1][1]) for en,i in xml], tors
# inputstrings are all containing "DOCKED:"
# [(en,pdbqt)]
......@@ -134,7 +134,7 @@ def add_score(name, confs):
conf, ntor = collect_lig(name, len(confs))
for i in range(len(confs)):
if len(conf) < i:
if len(conf) <= i:
confs[i][0].append(None)
confs[i][1].append(None)
else:
......
......@@ -68,7 +68,8 @@ def run_job(job, item):
ret = copyin(inp.format(**job))
if ret: return ret
ret = subprocess.call( job['script'].format(**job), shell=True )
ret = subprocess.call( "set -e\n"
+ job['script'].format(**job), shell=True )
if ret: return ret
for out in job['out']:
......
......@@ -5,7 +5,7 @@
#SBATCH --gres gpu:1
#SBATCH -J dock
#SBATCH -o %x.%A_%a.%j.out
#SBATCH --array=1-2
#SBATCH --array=1-50
echo "Starting $SLURM_JOB_NAME-$SLURM_ARRAY_TASK_ID at" `date`
source /apps/launchad/env.sh $SLURM_JOB_NAME
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment