Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docking.wic #112

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions docking/autodock-vina/docking.wic
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
inputs:
sdf_path:
type: File
format:
- edam:format_3814

steps:
# Ligand
# NOTE: Searching for conformers tends to cause the ligand to curl up into a ball.
# Although this lowers its energy in isolation, the decreased surface area tends
# to weaken the binding free energy! (as reported by autodock vina)
flc.wic:
in:
sdf_path: sdf_path
# minimize_ligand_only.wic:

# NOTE: We converted to mol2 format above because it allows explicit charges.
# Thus, if we only infer charges once and then preserve them, we don't have to
# worry about using different charges in autodock vs molecular dynamics.
# It also stores explicit bond order info, so the topology will be identical.
# (Also note that we did NOT convert to pdb and then to pdbqt, because that loses both!)

# NOTE: Rename all residues to MOL before calling acpypye. Otherwise, acpype crashes with:
# "ERROR: more than one residue detected '{'UNL', 'MOL'}'"
python3_mol2_to_mol2:
in:
script: !ii /rename_residues_mol.py # NOTE: Initial / required
input_mol2_path: !* ligand_min.mol2
out:
- output_mol2_path: !& conformer.mol2

# NOTE: minimize before calling acpype so 1. tleap complains less about close contacts:
# /usr/local/bin/teLeap: Warning!
# Close contact of 1.418311 angstroms between .R<UNL 1>.A<CG 8> and .R<UNL 1>.A<HD2 30>
# and 2. acpype doesn't complain about 'ERROR: Atoms TOO alone (> 3.0 Ang.)'
# (acpype suggests using --force, but it's better to just minimize.)
acpype:
# NOTE: We are using our own acpypye CWL adapter (NOT the biobb version) so
# we have the choice of using charges from the mol2 file.
in:
input_path: !* conformer.mol2 # Do NOT use pose_ligand.pdb
out:
- output_itp_path: !& ligand_GMX.itp
# NOTE: Although we don't need the *.itp topology file yet, we
# need to use these coordinates with autodock because they are
# sorted to agree with the *.itp topology include file.
# Otherwise, we will get the grompp atom name warning (see below).
- output_gro_path: !& ligand_GMX.gro
- output_top_path: !& ligand_GMX.top
#charge_method: user # take charges from mol2 file
# NOTE: acpype doesn't add forcefield or water topology #include lines.
bash_top:
in:
script: !ii /gmx_add_topology_includes.sh # NOTE: Initial / required
input_top_path: !* ligand_GMX.top
out:
- output_top_path: !& ligand_GMX_includes.top
zip_top:
in:
input_top_path: !* ligand_GMX_includes.top
input_itp_path: !* ligand_GMX.itp
out:
- output_top_zip_path: !& ligand_GMX.zip

# Docking
convert_ligand_mol2_to_pdbqt_obabel.wic:
# convert_ligand_mol2_to_pdbqt_mdanalysis.wic: # generates ligand_rigid.pdbqt only

autodock_vina_run:
in:
input_ligand_pdbqt_path: !* ligand_flex.pdbqt
#input_ligand_pdbqt_path: !* ligand_rigid.pdbqt
input_receptor_pdbqt_path: !* pdb.pdbqt
input_box_path: !* box.pdb
out:
- output_pdbqt_path: !& poses_ligand.pdbqt
- output_log_path: !& vina.log
extract_model_pdbqt:
in:
input_pdbqt_path: !* poses_ligand.pdbqt
output_pdbqt_path: !ii pose_ligand.pdbqt
config: !ii
model: 1 # NOTE: score, rmsd l.b., rmsd u.b. stored in REMARK lines
out:
- output_pdbqt_path: !& pose_ligand.pdbqt
convert_xyz:
in:
input_path: !* pose_ligand.pdbqt
output_xyz_path: !ii pose_ligand.xyz
out:
- output_xyz_path: !& pose_ligand.xyz
# Molecular Dynamics combine receptor & ligand
append_ligand:
in:
input_itp_path: !* ligand_GMX.itp
input_top_zip_path: !* receptor.zip
out:
- output_top_zip_path: !& complex_vac.zip
combine_structure:
in:
input_structure1: !* receptor.xyz # receptor_hydrogens.pdb
input_structure2: !* pose_ligand.xyz
out:
- output_structure_path: !& complex_vac.pdb

wic:
graphviz:
label: Cheminformatics + Docking + Initial Topology Setup
steps:
(2, python3_mol2_to_mol2):
wic:
graphviz:
label: Rename Ligand\nResidues to MOL
(3, acpype):
wic:
graphviz:
label: Generate Ligand\nParameters & Topology
(4, bash_top):
wic:
graphviz:
label: Fix Gromacs\n Topology Includes
(5, zip_top):
wic:
graphviz:
label: Zip Topology/Files
(7, autodock_vina_run):
wic:
graphviz:
label: Perform Docking
(8, extract_model_pdbqt):
wic:
graphviz:
label: Extract Best\nDocking Pose
(9, convert_xyz):
wic:
graphviz:
label: Convert Complex\npdbqt to xyz
(10, append_ligand):
wic:
graphviz:
label: Append Ligand Topology\nto Receptor Topology
(11, combine_structure):
wic:
graphviz:
label: Append Ligand Coordinates\nto Receptor Coordinates
48 changes: 48 additions & 0 deletions docking/autodock-vina/docking_stability.wic
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
inputs:
sdf_path:
type: File
format:
- edam:format_3814

steps:
docking.wic:
in:
# NOTE: sdf_path is currently only necessary
# due to a limitation of the inlineing implementation.
sdf_path: sdf_path
stability.wic:
in:
# NOTE: crd_path and top_zip_path are currently only necessary
# due to a limitation of the inlineing implementation.
crd_path: !* complex_vac.pdb
top_zip_path: !* complex_vac.zip
nsteps: !ii 100000
dt: !ii 0.002
temperature: !ii 298.0
pressure: !ii 1.0
wic:
graphviz:
label: Docking + MD Stability Analysis
steps:
(1, docking.wic):
wic:
inlineable: True
(2, stability.wic):
wic:
inlineable: False
steps:
(2, basic.wic):
wic:
steps:
(3, prod.wic):
wic:
steps:
(4, cwl_subinterpreter_analysis.wic):
wic:
implementation: complex
(3, analysis.wic):
wic:
steps:
(1, analysis_realtime.wic):
wic:
implementation: complex
Loading