Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Rogers, David
launchad
Commits
7177f478
Commit
7177f478
authored
Nov 11, 2020
by
David M. Rogers
Browse files
Bug fixes and final updates before RDRP docking.
parent
1055499d
Changes
6
Hide whitespace changes
Inline
Side-by-side
config.py
View file @
7177f478
...
...
@@ -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'
...
...
create_inp.py
View file @
7177f478
...
...
@@ -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
:
...
...
docker.sh
View file @
7177f478
...
...
@@ -5,12 +5,12 @@
#SBATCH --gres gpu:1
#SBATCH -J dock
#SBATCH -o %x.%A_%a.%j.out
#SBATCH --array=1-86
6
#SBATCH --array=1-86
8
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
...
...
helpers.py
View file @
7177f478
...
...
@@ -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
:
...
...
loadem.py
View file @
7177f478
...
...
@@ -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'
]:
...
...
small_docker.sh
View file @
7177f478
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment