Skip to content

Commit 511cc6a

Browse files
authored
Merge pull request PolusAI#243 from jfennick/wic_inline_input
add !ii inline input custom yaml tag
2 parents 05ea30a + da49742 commit 511cc6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+417
-412
lines changed

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"yaml.customTags": [
1818
"!&",
1919
"!*",
20-
"!ii"
20+
"!ii",
21+
"!ii mapping",
22+
"!ii sequence"
2123
],
2224
"[yaml]": {
2325
"editor.suggest.showWords": false

examples/diffdock/run_diffdock.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ steps:
66
# "The query() method uses a slightly modified Python syntax by default.
77
# For example, the & and | (bitwise) operators have the precedence of their boolean cousins, and and or.
88
# This is syntactically valid Python, however the semantics are different."
9-
query: '(Kd_Ki == "Kd") and (value < 0.001)'
10-
max_row: 1 #25 # Use 1 for CI
11-
convert_Kd_dG: True
9+
query: !ii '(Kd_Ki == "Kd") and (value < 0.001)'
10+
max_row: !ii 1 #25 # Use 1 for CI
11+
convert_Kd_dG: !ii True
1212
out:
1313
- output_pdb_paths: !& pdbbind_pdbs
1414
- output_sdf_paths: !& pdbbind_sdfs
@@ -56,17 +56,17 @@ steps:
5656
in:
5757
protein_path: !* final_pdbbind_pdbs.pdb
5858
ligand_path: !* final_sanitized_sdfs
59-
samples_per_complex: 20 # figure 3 left in DiffDock paper
60-
inference_steps: 20 # figure S11 in DiffDock paper
59+
samples_per_complex: !ii 20 # figure 3 left in DiffDock paper
60+
inference_steps: !ii 20 # figure S11 in DiffDock paper
6161
out:
6262
- output_files: !& diffdock_poses
6363

6464
- rank_diffdock_poses:
6565
scatter: [diffdock_poses]
6666
in:
67-
top_n_confident: 1000 # if only using top_percent_confidence, then set top_n_confident to trivially high number
67+
top_n_confident: !ii 1000 # if only using top_percent_confidence, then set top_n_confident to trivially high number
6868
# if only want to use top_n_confident, then set top_percent_confidence to 100
69-
top_percent_confidence: 33 # take top third of most confident poses, see figure 3 right in DiffDock paper
69+
top_percent_confidence: !ii 33 # take top third of most confident poses, see figure 3 right in DiffDock paper
7070
diffdock_poses: !* diffdock_poses
7171
out:
7272
- output_poses: !& output_poses
@@ -75,7 +75,7 @@ steps:
7575
scatter: [predicted_poses]
7676
in:
7777
predicted_poses: !* output_poses
78-
centroid_cutoff: 5 # if centroid of all poses are within cutoff then only keep most confident pose, requires visual inspection
78+
centroid_cutoff: !ii 5 # if centroid of all poses are within cutoff then only keep most confident pose, requires visual inspection
7979

8080
wic:
8181
graphviz:

examples/diffdock/run_diffdock_weekly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ wic:
88
steps:
99
(1, extract_pdbbind_refined):
1010
in:
11-
max_row: 16 # Override default 1
11+
max_row: !ii 16 # Override default 1

examples/docking/align_protein_CA_pymol.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ steps:
1616
input_index_path: !* MOL.ndx
1717
# Which causes the first column of this file to be all zeros
1818
# (which ruins the timeseries plot, but not the histogram)
19-
output_xvg_path: rmsd_equil_ligand_notime.txt # Use .txt to avoid plotting
19+
output_xvg_path: !ii rmsd_equil_ligand_notime.txt # Use .txt to avoid plotting
2020
out:
2121
- output_xvg_path: !& rmsd_equil_ligand_notime
2222
- bash_xvg:
2323
in:
24-
script: /replace_first_column.sh # NOTE: Initial / required
24+
script: !ii /replace_first_column.sh # NOTE: Initial / required
2525
# But we can recover the time column by copying it from another xvg file.
2626
input_xvg1_path: !* rmsd_equil_ligand_notime
2727
input_xvg2_path: !* rmsd_equil_mainchain.xvg
28-
output_xvg_path: rmsd_equil_ligand_no_fit.xvg
28+
output_xvg_path: !ii rmsd_equil_ligand_no_fit.xvg
2929
out:
3030
- output_xvg_path: !& rmsd_equil_ligand_no_fit.xvg

examples/docking/assign_partial_charges.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
steps:
99
- convert_mol2:
1010
in:
11-
input_path: ~input_path #!* ligand_min.sdf
11+
input_path: input_path #!* ligand_min.sdf
1212
# out:
1313
# - output_mol2_path: !& ligand_min.mol2
1414
# NOTE: If we directly convert from sdf to pdbqt, openbabel will NOT add

examples/docking/autodock_vina_rescore.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ inputs:
99
steps:
1010
- python_script:
1111
in:
12-
script: ../scripts/atomselect.py
13-
dockerPull: jakefennick/atomselect
14-
selection_string: protein # Extract the protein from the last timestep
15-
input_pdb_path: ~input_pdb_path # !* prod.pdb
12+
script: !ii ../scripts/atomselect.py
13+
dockerPull: !ii jakefennick/atomselect
14+
selection_string: !ii protein # Extract the protein from the last timestep
15+
input_pdb_path: input_pdb_path # !* prod.pdb
1616
# Assign partial charges (protein)
1717
# NOTE: Although we only start off with one protein, the final coordinates
1818
# after doing MD with different ligands will be different; hence scatter
1919
- convert_mol2:
2020
- convert_pdbqt:
2121
in:
22-
arg1: -xr # Receptor needs to be rigid
22+
arg1: !ii -xr # Receptor needs to be rigid
2323
out:
2424
- output_pdb_path: !& protein_prod.pdbqt
2525
- python_script:
2626
in:
27-
script: ../scripts/atomselect.py
28-
dockerPull: jakefennick/atomselect
29-
selection_string: resname MOL # Extract the ligand from the last timestep
30-
input_pdb_path: ~input_pdb_path # !* prod.pdb
27+
script: !ii ../scripts/atomselect.py
28+
dockerPull: !ii jakefennick/atomselect
29+
selection_string: !ii resname MOL # Extract the ligand from the last timestep
30+
input_pdb_path: input_pdb_path # !* prod.pdb
3131
# out:
3232
# - output_pdb_path: !& ligand_temp.pdbqt
3333

@@ -41,7 +41,7 @@ steps:
4141
# ATOM 53 BR MOL Z 1 -14.786 -32.819 20.524 1.00 0.00 BR
4242
- fix_pdb_atom_column:
4343
in:
44-
input_helper_structure_path: ~input_ligand_pdb_path
44+
input_helper_structure_path: input_ligand_pdb_path
4545
# Assign partial charges (ligand)
4646
- convert_mol2:
4747
- convert_pdbqt:
@@ -51,8 +51,8 @@ steps:
5151
in:
5252
input_ligand_pdbqt_path: !* ligand_prod.pdbqt
5353
input_receptor_pdbqt_path: !* protein_prod.pdbqt
54-
score_only: True
55-
#local_only: True
54+
score_only: !ii True
55+
#local_only: !ii True
5656
out:
5757
- output_log_path: !& vina_rescore.log
5858
- docking_score: !& docking_rescores
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
steps:
22
- python3_mol2_to_pdbqt:
33
in:
4-
script: /mol2_to_pdbqt.py # NOTE: Initial / required
4+
script: !ii /mol2_to_pdbqt.py # NOTE: Initial / required
55
input_mol2_path: !* conformer.mol2
66
# out:
77
# - output_pdb_path: !& ligand_periods.pdbqt
88
- bash_pdb:
99
in:
1010
# MDAnalysis adds a . to the final atomtype column, which causes autodock to crash.
11-
script: /pdbqt_remove_trailing_period.sh # NOTE: Initial / required
11+
script: !ii /pdbqt_remove_trailing_period.sh # NOTE: Initial / required
1212
# input_pdb_path: !* ligand_periods.pdbqt
1313
# out:
1414
# - output_pdb_path: !& ligand_keywords.pdbqt
@@ -18,7 +18,7 @@ steps:
1818
# Even if there is actually only one model, autodock simply looks for MODEL and ENDMDL.
1919
# Unfortunately, all of the errors crash with the same cryptic message:
2020
# Parse error on line ... in file ".../ligand.pdbqt": Unknown or inappropriate tag
21-
script: /pdbqt_remove_keywords.sh # NOTE: Initial / required
21+
script: !ii /pdbqt_remove_keywords.sh # NOTE: Initial / required
2222
# input_pdb_path: !* ligand_keywords.pdbqt
2323
# out:
2424
# - output_pdb_path: !& ligand_temp.pdbqt
@@ -27,7 +27,7 @@ steps:
2727
# Add ROOT, ENDROOT, TORSDOF keywords (if necessary).
2828
# Unfortunately, all of the errors crash with the same cryptic message:
2929
# Parse error on line ... in file ".../ligand.pdbqt": Unknown or inappropriate tag
30-
script: /pdbqt_remove_flex.sh # NOTE: Initial / required
30+
script: !ii /pdbqt_remove_flex.sh # NOTE: Initial / required
3131
# input_pdb_path: !* ligand_temp.pdbqt
3232
out:
3333
- output_pdb_path: !& ligand_rigid.pdbqt

examples/docking/convert_ligand_mol2_to_pdbqt_obabel.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ steps:
2626
# Even if there is actually only one model, autodock simply looks for MODEL and ENDMDL.
2727
# Unfortunately, all of the errors crash with the same cryptic message:
2828
# Parse error on line ... in file ".../ligand.pdbqt": Unknown or inappropriate tag
29-
script: /pdbqt_remove_keywords.sh # NOTE: Initial / required
29+
script: !ii /pdbqt_remove_keywords.sh # NOTE: Initial / required
3030
# input_pdb_path: !* ligand_keywords.pdbqt
31-
output_pdb_path: ligand_flex.pdbqt
31+
output_pdb_path: !ii ligand_flex.pdbqt
3232
out:
3333
- output_pdb_path: !& ligand_flex.pdbqt
3434
- bash_pdb:
3535
in:
3636
# Add ROOT, ENDROOT, TORSDOF keywords (if necessary).
3737
# Unfortunately, all of the errors crash with the same cryptic message:
3838
# Parse error on line ... in file ".../ligand.pdbqt": Unknown or inappropriate tag
39-
script: /pdbqt_remove_flex.sh # NOTE: Initial / required
39+
script: !ii /pdbqt_remove_flex.sh # NOTE: Initial / required
4040
input_pdb_path: !* ligand_flex.pdbqt
41-
output_pdb_path: ligand_rigid.pdbqt
41+
output_pdb_path: !ii ligand_rigid.pdbqt
4242
out:
4343
- output_pdb_path: !& ligand_rigid.pdbqt
4444

examples/docking/convert_pdbqt.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ inputs:
1111
steps:
1212
- convert_mol2:
1313
in:
14-
input_path: ~input_sdf_path
14+
input_path: input_sdf_path
1515

1616
- convert_pdbqt:
1717
out:
1818
- output_pdb_path: !& mol_prod.pdbqt
1919

2020
- convert_mol2:
2121
in:
22-
input_path: ~input_pdb_path
22+
input_path: input_pdb_path
2323

2424
- convert_pdbqt:
2525
in:
26-
arg1: -xr # Receptor needs to be rigid
26+
arg1: !ii -xr # Receptor needs to be rigid
2727
out:
2828
- output_pdb_path: !& receptor_prod.pdbqt
2929
wic:

examples/docking/docking.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
# to weaken the binding free energy! (as reported by autodock vina)
1212
- flc.yml:
1313
in:
14-
sdf_path: ~sdf_path
14+
sdf_path: sdf_path
1515
# - minimize_ligand_only.yml:
1616

1717
# NOTE: We converted to mol2 format above because it allows explicit charges.
@@ -24,7 +24,7 @@ steps:
2424
# "ERROR: more than one residue detected '{'UNL', 'MOL'}'"
2525
- python3_mol2_to_mol2:
2626
in:
27-
script: /rename_residues_mol.py # NOTE: Initial / required
27+
script: !ii /rename_residues_mol.py # NOTE: Initial / required
2828
input_mol2_path: !* ligand_min.mol2
2929
out:
3030
- output_mol2_path: !& conformer.mol2
@@ -51,7 +51,7 @@ steps:
5151
# NOTE: acpype doesn't add forcefield or water topology #include lines.
5252
- bash_top:
5353
in:
54-
script: /gmx_add_topology_includes.sh # NOTE: Initial / required
54+
script: !ii /gmx_add_topology_includes.sh # NOTE: Initial / required
5555
input_top_path: !* ligand_GMX.top
5656
out:
5757
- output_top_path: !& ligand_GMX_includes.top
@@ -78,15 +78,15 @@ steps:
7878
- extract_model_pdbqt:
7979
in:
8080
input_pdbqt_path: !* poses_ligand.pdbqt
81-
output_pdbqt_path: pose_ligand.pdbqt
82-
config:
81+
output_pdbqt_path: !ii pose_ligand.pdbqt
82+
config: !ii
8383
model: 1 # NOTE: score, rmsd l.b., rmsd u.b. stored in REMARK lines
8484
out:
8585
- output_pdbqt_path: !& pose_ligand.pdbqt
8686
- convert_xyz:
8787
in:
8888
input_path: !* pose_ligand.pdbqt
89-
output_xyz_path: pose_ligand.xyz
89+
output_xyz_path: !ii pose_ligand.xyz
9090
out:
9191
- output_xyz_path: !& pose_ligand.xyz
9292
# Molecular Dynamics combine receptor & ligand

0 commit comments

Comments
 (0)