Skip to content

Commit

Permalink
vacuum minimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ndonyapour committed Jul 9, 2024
1 parent 5c6786e commit f36f8a9
Show file tree
Hide file tree
Showing 21 changed files with 344 additions and 188 deletions.
16 changes: 15 additions & 1 deletion cwl_adapters/combine_structure.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ baseCommand: ['python', '/combine_structure.py']

hints:
DockerRequirement:
dockerPull: ndonyapour/combine_structure
dockerPull: ndonyapour/combine_structure_zip

inputs:
input_structure1:
Expand Down Expand Up @@ -40,6 +40,20 @@ inputs:
- edam:format_3877
inputBinding:
prefix: --input_structure2

input_top_zip_path:
label: Input zip file
doc: |-
Input zip file
Type: string
File type: input
Accepted formats: zip
Example file: https://github.com/bioexcel/biobb_md/blob/master/biobb_md/test/data/gromacs/genion.zip
type: File
format:
- edam:format_3987
inputBinding:
prefix: --input_top_zip_path

output_structure_path:
label: Output combined PDB file path
Expand Down
6 changes: 5 additions & 1 deletion examples/config_ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"vs_demo_2_weekly",
"vs_demo_3_weekly",
"vs_demo_4_weekly",
"docking_rescoring_weekly"
"docking_rescoring_weekly",
"stability",
"docking_stability",
"nmr",
"tutorial"
],
// NOTE: Most of the workflows in this list have free variables because they are subworkflows
// i.e. if you try to run them, you will get "Missing required input parameter"
Expand Down
3 changes: 2 additions & 1 deletion examples/docking/docking.wic
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ steps:
- output_top_zip_path: !& complex_vac.zip
combine_structure:
in:
input_structure1: !* receptor.xyz # receptor_hydrogens.pdb
input_structure1: !* receptor.xyz # !* receptor_hydrogens.pdb
input_structure2: !* pose_ligand.xyz
input_top_zip_path: !* complex_vac.zip
out:
- output_structure_path: !& complex_vac.pdb

Expand Down
26 changes: 25 additions & 1 deletion examples/docking/docking_stability.wic
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ steps:
dt: !ii 0.002
temperature: !ii 298.0
pressure: !ii 1.0

wic:
graphviz:
label: Docking + MD Stability Analysis
Expand All @@ -31,12 +32,31 @@ wic:
wic:
inlineable: False
steps:
(1, setup_vac_min.wic):
wic:
steps:
(3, solv_ion.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(2, basic.wic):
in:
top_zip_path: !* genion_complex.zip
wic:
steps:
(3, prod.wic):
wic:
steps:
(2, grompp):
in:
input_top_zip_path: !* genion_complex.zip
(3, mdrun):
out:
- output_crd_path: !& prod_complex.gro # overload prod.gro
- output_trr_path: !& prod.trr
- output_edr_path: !& prod.edr
(4, cwl_subinterpreter_analysis.wic):
wic:
implementation: complex
Expand All @@ -45,4 +65,8 @@ wic:
steps:
(1, analysis_realtime.wic):
wic:
implementation: complex
implementation: complex
(2, analysis_final.wic):
wic:
implementation: complex

1 change: 1 addition & 0 deletions examples/docking/gen_topol_params.wic
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ steps:
in:
input_structure1: input_receptor_xyz_path
input_structure2: !* pose_ligand.xyz
input_top_zip_path: !* complex_vac.zip
out:
- output_structure_path: !& complex_vac.pdb

Expand Down
15 changes: 10 additions & 5 deletions examples/docking/vs_demo_2.wic
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,19 @@ wic:
wic:
inlineable: False
steps:
(1, setup.wic):
(1, setup_vac_min.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(3, solv_ion.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(2, basic.wic):
wic:
in:
top_zip_path: !* genion_complex.zip
wic:
steps:
(3, prod.wic):
wic:
Expand Down
16 changes: 11 additions & 5 deletions examples/docking/vs_demo_3.wic
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,24 @@ wic:
(7, gen_topol_params.wic):
wic:
inlineable: False

(8, stability.wic):
wic:
inlineable: False
steps:
(1, setup.wic):
(1, setup_vac_min.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(3, solv_ion.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(2, basic.wic):
wic:
in:
top_zip_path: !* genion_complex.zip
wic:
steps:
(3, prod.wic):
wic:
Expand Down
15 changes: 10 additions & 5 deletions examples/docking/vs_demo_4.wic
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,19 @@ wic:
wic:
inlineable: False
steps:
(1, setup.wic):
(1, setup_vac_min.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(3, solv_ion.wic):
wic:
steps:
(4, genion):
out:
- output_top_zip_path: !& genion_complex.zip
(2, basic.wic):
wic:
in:
top_zip_path: !* genion_complex.zip
wic:
steps:
(3, prod.wic):
wic:
Expand Down
22 changes: 14 additions & 8 deletions examples/gromacs/basic.wic
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
inputs:
top_zip_path:
type: File
format:
- edam:format_3987
nsteps:
type: int
dt:
Expand All @@ -15,14 +19,16 @@ steps:
# (i.e. immediately before molecular dynamics) so we can extract &min.tpr
# to this level and use the following syntax to pass it to only one call site.
# (Moreover, the former will create multiple definitions of &min.tpr, which is not allowed.)
min.wic:
equil.wic:
prod.wic:
in:
nsteps: nsteps
dt: dt
ref-t: ref-t
ref-p: ref-p
min.wic:
in:
top_zip_path: top_zip_path
equil.wic:
prod.wic:
in:
nsteps: nsteps
dt: dt
ref-t: ref-t
ref-p: ref-p

# Pass the CWL `in` tag as a parameter through BOTH of the yml DSL tags cg.wic and grompp.
# Use (1-based) indexing to uniquely reference (step_number, step_name).
Expand Down
63 changes: 35 additions & 28 deletions examples/gromacs/cg.wic
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
inputs:
top_zip_path:
type: File
format:
- edam:format_3987

steps:
grompp:
in:
config: !ii
mdp:
integrator: cg
define: -DFLEXIBLE # Defines a flexible water model if it exists in the system
# https://manual.gromacs.org/current/reference-manual/algorithms/energy-minimization.html#conjugate-gradient
rvdw: 1.4
rcoulomb: 1.4
#coulombtype: PME
nsteps: 1000
emstep: 0.01
emtol: 10
nstxout: 100
nstenergy: 1
mdrun:
in:
nb_terms: !ii cpu # NOTE: Workaround for a bug in gromacs 2022.2, fixed in 2022.3
# https://manual.gromacs.org/current/release-notes/2022/2022.3.html#energy-minimization-would-not-converge-with-gpu-and-without-dd
bonded_terms: !ii cpu # GPU implementation IS supported for md integrator, is NOT supported for sd integrator, etc.
pme_terms: !ii cpu
pme_fft_terms: !ii cpu
update_terms: !ii cpu
gmx_energy:
in:
config: !ii
terms: [Potential]
output_xvg_path: !ii energy_min_cg.xvg
grompp:
in:
input_top_zip_path: top_zip_path
config: !ii
mdp:
integrator: cg
define: -DFLEXIBLE # Defines a flexible water model if it exists in the system
# https://manual.gromacs.org/current/reference-manual/algorithms/energy-minimization.html#conjugate-gradient
rvdw: 1.4
rcoulomb: 1.4
#coulombtype: PME
nsteps: 1000
emstep: 0.01
emtol: 10
nstxout: 100
nstenergy: 1
mdrun:
in:
nb_terms: !ii cpu # NOTE: Workaround for a bug in gromacs 2022.2, fixed in 2022.3
# https://manual.gromacs.org/current/release-notes/2022/2022.3.html#energy-minimization-would-not-converge-with-gpu-and-without-dd
bonded_terms: !ii cpu # GPU implementation IS supported for md integrator, is NOT supported for sd integrator, etc.
pme_terms: !ii cpu
pme_fft_terms: !ii cpu
update_terms: !ii cpu
gmx_energy:
in:
config: !ii
terms: [Potential]
output_xvg_path: !ii energy_min_cg.xvg

wic:
graphviz:
Expand Down
4 changes: 2 additions & 2 deletions examples/gromacs/equil.wic
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
nvt.wic:
npt.wic:
nvt.wic:
npt.wic:

wic:
graphviz:
Expand Down
14 changes: 12 additions & 2 deletions examples/gromacs/min.wic
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
inputs:
top_zip_path:
type: File
format:
- edam:format_3987

steps:
steep.wic:
steep.wic:
in:
top_zip_path: top_zip_path
# Fatal error:
# The coordinates could not be constrained. Minimizer 'cg' can not handle
# constraint failures, use minimizer 'steep' before using 'cg'.
cg.wic:
cg.wic:
in:
top_zip_path: top_zip_path
# Fatal error:
# The combination of constraints and L-BFGS minimization is not implemented.
# Either do not use constraints, or use another minimizer (e.g. steepest
Expand Down
Loading

0 comments on commit f36f8a9

Please sign in to comment.