Skip to content

Commit

Permalink
relax PDB requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ndonyapour committed Oct 16, 2023
1 parent 7813ef5 commit 0d7080c
Show file tree
Hide file tree
Showing 15 changed files with 209 additions and 235 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
calculate_net_charge, generate_conformers,
mol2_to_pdbqt, nmr4md, openbabel,
remove_terminal_residue_name_prefixes,
rename_residues_mol, combine_pdb,
rename_residues_mol, combine_structure,
remove_terminal_residue_name_prefixes, molgan,
pdbbind_refined, onionnet-sfct, smina] # No username for pdbind_refined
# skip data/ and cwl_adapters/file_format_conversions/biosimspace/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ cwlVersion: v1.0

class: CommandLineTool

label: A tool that employs MDtraj to combine two PDB structures in a single PDB file.
label: A tool that employs RDKit to combine two XYZ structures in a single PDB file.

doc: |-
None

baseCommand: ['python', '/combine_pdb.py']
baseCommand: ['python', '/combine_structure.py']

hints:
DockerRequirement:
dockerPull: ndonyapour/combine_pdb
dockerPull: ndonyapour/combine_structure

inputs:
input_structure1:
Expand All @@ -21,11 +21,10 @@ inputs:
Input structure 1 file path
Type: string
File type: input
Accepted formats: pdb
Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/data/utils/cat_protein.pdb
Accepted formats: xyz
type: File
format:
- edam:format_1476
- edam:format_3877
inputBinding:
prefix: --input_structure1

Expand All @@ -35,18 +34,17 @@ inputs:
Input structure 2 file path
Type: string
File type: input
Accepted formats: pdb
Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/data/utils/cat_ligand.pdb
Accepted formats: xyz
type: File
format:
- edam:format_1476
- edam:format_3877
inputBinding:
prefix: --input_structure2

output_structure_path:
label: Output protein file path
label: Output combined PDB file path
doc: |-
Output protein file path
Output combined PDB file path
Type: string
File type: output
Accepted formats: pdb
Expand All @@ -57,20 +55,6 @@ inputs:
inputBinding:
prefix: --output_structure_path
default: system.pdb

method:
label: The frequency to save the outputs
doc: |-
The frequency to save the outputs
Type: string
type: string?
format:
- edam:format_2330
inputBinding:
prefix: --method
default: rdkit


outputs:
output_structure_path:
label: Output protein file path
Expand Down
69 changes: 69 additions & 0 deletions cwl_adapters/convert_xyz.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.2

class: CommandLineTool

label: This class is a wrapper of the Open Babel tool.

doc: |-
Converts small molecules in 2D or 3D formats to the XYZ format.

baseCommand: obabel
#Usage:
#obabel[-i<input-type>] <infilename> [-o<output-type>] -O<outfilename> [Options]
#...
#Options, other than -i -o -O -m, must come after the input files.
arguments: [$(inputs.input_path), "-o", "xyz", "-O", $(inputs.output_xyz_path)]

hints:
DockerRequirement:
dockerPull: quay.io/biocontainers/biobb_chemistry:4.0.0--pyhdfd78af_1

requirements:
InlineJavascriptRequirement: {}

inputs:
input_path:
label: Path to the input file
doc: |-
Path to the input file
Type: string
File type: input
Accepted formats: gro, mol, mol2, pdb, pdbqt, sdf
Example file: https://github.com/bioexcel/biobb_chemistry/raw/master/biobb_chemistry/test/data/babel/babel.smi
type: File
format:
- edam:format_2033
- edam:format_3815
- edam:format_3816
- edam:format_1476
- edam:format_1476
- edam:format_3814

output_xyz_path:
label: Path to the output file
doc: |-
Path to the output file
Type: string
File type: output
Accepted formats: xyz
type: string
format:
- edam:format_3877 # xyz
default: system.xyz

outputs:
output_xyz_path:
label: Path to the output file
doc: |-
Path to the output file
type: File
outputBinding:
glob: $(inputs.output_xyz_path)
format: edam:format_3877 # xyz

$namespaces:
edam: https://edamontology.org/

$schemas:
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl
2 changes: 2 additions & 0 deletions cwl_adapters/pymol_align_protein_ca.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ inputs:
type: File
format:
- edam:format_1476 # pdb
- edam:format_3877 # xyz

input_2_path:
type: File
format:
- edam:format_1476 # pdb
- edam:format_3877 # xyz

input_3_path:
type: File
Expand Down
2 changes: 1 addition & 1 deletion docker/dockerBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sudo docker build --no-cache --pull -f Dockerfile_nmr4md -t jakefennick/nmr4md .
sudo docker build --no-cache --pull -f Dockerfile_openbabel -t jakefennick/openbabel .
sudo docker build --no-cache --pull -f Dockerfile_remove_terminal_residue_name_prefixes -t jakefennick/remove_terminal_residue_name_prefixes .
sudo docker build --no-cache --pull -f Dockerfile_rename_residues_mol -t jakefennick/rename_residues_mol .
sudo docker build --no-cache --pull -f Dockerfile_combine_pdb -t ndonyapour/combine_pdb .
sudo docker build --no-cache --pull -f Dockerfile_combine_structure -t ndonyapour/combine_structure .
sudo docker build --no-cache --pull -f Dockerfile_molgan -t ndonyapour/molgan .
sudo docker build --no-cache --pull -f Dockerfile_onionnet-sfct -t cyangnyu/onionnet-sfct .
sudo docker build --no-cache --pull -f Dockerfile_smina -t cyangnyu/smina .
Expand Down
1 change: 1 addition & 0 deletions dockerPull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ docker pull jakefennick/rename_residues_mol
docker pull ndonyapour/molgan
docker pull cyangnyu/onionnet-sfct
docker pull cyangnyu/smina
docker pull ndonyapour/combine_structure

2 changes: 1 addition & 1 deletion examples/docking/align_protein_CA_pymol.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- pymol_align_protein_ca:
in:
input_1_path: '*receptor_gro.pdb'
input_1_path: '*receptor.xyz'
input_2_path: '*pose_ligand_1.pdb'
input_3_path: '*npt.gro' # Do NOT use prod.gro!
# It is only written after the final timestep and thus cannot possibly be used for realtime analysis!
Expand Down
18 changes: 8 additions & 10 deletions examples/docking/docking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,21 @@ steps:
output_pdbqt_path: '&pose_ligand.pdbqt'
config:
model: 1 # NOTE: score, rmsd l.b., rmsd u.b. stored in REMARK lines
- babel_convert:
- convert_xyz:
in:
input_path: '*pose_ligand.pdbqt'
output_path: '&pose_ligand.pdb'

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'
output_top_zip_path: '&complex_vac.zip'
- combine_pdb:
- combine_structure:
in:
input_structure1: '*receptor_gro.pdb' # '*receptor_hydrogens.pdb'
input_structure2: '*pose_ligand.pdb'
input_structure1: '*receptor.xyz' # '*receptor_hydrogens.pdb'
input_structure2: '*pose_ligand.xyz'
output_structure_path: '&complex_vac.pdb'
method: rdkit # Must use rdkit! See combine_pdb.py

wic:
graphviz:
Expand Down Expand Up @@ -122,15 +120,15 @@ wic:
wic:
graphviz:
label: Extract Best\nDocking Pose
(9, babel_convert):
(9, convert_xyz):
wic:
graphviz:
label: Convert Complex\npdb to pdbqt
label: Convert Complex\npdbqt to xyz
(10, append_ligand):
wic:
graphviz:
label: Append Ligand Topology\nto Receptor Topology
(11, combine_pdb):
(11, combine_structure):
wic:
graphviz:
label: Append Ligand Coordinates\nto Receptor Coordinates
30 changes: 14 additions & 16 deletions examples/docking/gen_topol_params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ inputs:
type: File
format:
- edam:format_1476
input_receptor_pdb_path:
input_receptor_xyz_path:
type: File
format:
- edam:format_1476
- edam:format_3877
input_top_zip_path:
type: File
format:
Expand Down Expand Up @@ -37,7 +37,7 @@ steps:
# 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_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.
Expand All @@ -51,23 +51,21 @@ steps:
# input_top_path: '*ligand_GMX_includes.top'
input_itp_path: '*ligand_GMX.itp'
# output_top_zip_path: '&ligand_GMX.zip'
- babel_convert:
- convert_xyz:
in:
# input_path: '*ligand_GMX.gro' #'*pose_ligand.pdbqt'
output_path: '&pose_ligand.pdb'

input_path: '*ligand_GMX.gro' #'*pose_ligand.pdbqt'
output_xyz_path: '&pose_ligand.xyz'
# Molecular Dynamics combine receptor & ligand
- append_ligand:
in:
# input_itp_path: '*ligand_GMX.itp'
input_top_zip_path: ~input_top_zip_path #'*receptor.zip'
output_top_zip_path: '&complex_vac.zip'
- combine_pdb:
- combine_structure:
in:
input_structure1: ~input_receptor_pdb_path # '*receptor_hydrogens.pdb'
input_structure2: '*pose_ligand.pdb'
input_structure1: ~input_receptor_xyz_path
input_structure2: '*pose_ligand.xyz'
output_structure_path: '&complex_vac.pdb'
method: rdkit # Must use rdkit! See combine_pdb.py

wic:
graphviz:
Expand All @@ -93,15 +91,15 @@ wic:
wic:
graphviz:
label: Create Topology\nZip File
(6, babel_convert):
wic:
graphviz:
label: Convert to\nPDB format
(6, convert_xyz):
wic:
graphviz:
label: Convert to\nXYZ format
(7, append_ligand):
wic:
graphviz:
label: Combine Receptor\nLigand Topologies
(8, combine_pdb):
(8, combine_structure):
wic:
graphviz:
label: Combine Receptor\nLigand Coordinates
9 changes: 4 additions & 5 deletions examples/docking/setup_pdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ steps:
# "Warning: atom name nnn in *.top and *.g96 does not match"
output_top_zip_path: '&receptor.zip'
config: '*config_tag_pdb2gmx'
- babel_convert:
- convert_xyz:
in:
input_path: '*receptor.gro'
output_path: '&receptor_gro.pdb'

output_xyz_path: '&receptor.xyz'
wic:
graphviz:
label: Receptor Modeling + Docking + Initial Topology Setup
Expand Down Expand Up @@ -147,7 +146,7 @@ wic:
wic:
graphviz:
label: Generate Initial\nReceptor Topology
(10, babel_convert):
(10, convert_xyz):
wic:
graphviz:
label: Convert Receptor\ngro to pdb
label: Convert Receptor\ngro to xyz
Loading

0 comments on commit 0d7080c

Please sign in to comment.