Skip to content

Commit 64a91d0

Browse files
Brandon Duane WalkerBrandon Duane Walker
authored andcommitted
Revert "Revert "Merge pull request PolusAI#230 from ndonyapour/Molgan_DockingRescoring_errorlogging""
This reverts commit a4e678c.
1 parent fc7f0f1 commit 64a91d0

File tree

11 files changed

+131
-21
lines changed

11 files changed

+131
-21
lines changed

cwl_adapters/convert_mol2.cwl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ outputs:
126126
glob: $(inputs.output_mol2_path)
127127
format: edam:format_3816 # mol2
128128
129+
stderr:
130+
type: File
131+
outputBinding:
132+
glob: stderr
133+
134+
stderr: stderr
135+
129136
$namespaces:
130137
edam: https://edamontology.org/
131138

cwl_adapters/extract_molecules_sdf.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ arguments: [$(inputs.input_path), "-o", "sdf", "-O", $(inputs.output_sdf_path),
7070

7171
hints:
7272
DockerRequirement:
73-
#dockerPull: jakefennick/openbabel
73+
#dockerPull: ndonyapour/openbabel
7474
dockerPull: quay.io/biocontainers/biobb_chemistry:4.0.0--pyhdfd78af_1
7575

7676
inputs:

cwl_adapters/load_trained_molgan_model.cwl

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ hints:
1111
DockerRequirement:
1212
dockerPull: ndonyapour/molgan
1313

14+
# Set environment variables for the tool,
15+
# See: https://www.commonwl.org/user_guide/topics/environment-variables.html
16+
requirements:
17+
EnvVarRequirement:
18+
envDef:
19+
RDKIT_ERROR_LOGGING: $(inputs.rdkit_error_logging)
1420
inputs:
1521
input_data_path:
1622
label: Path to the input data file
@@ -41,7 +47,7 @@ inputs:
4147
default: NP.gz
4248
inputBinding:
4349
prefix: --input_NP_Score_path
44-
50+
4551
input_SA_Score_path:
4652
label: Output ceout file (AMBER ceout)
4753
doc: |-
@@ -60,10 +66,10 @@ inputs:
6066
input_model_dir:
6167
label: Input directory of trained models
6268
type: string
63-
format:
69+
format:
6470
- edam:format_2330 # 'Textual format'
6571
inputBinding:
66-
prefix: --input_model_dir
72+
prefix: --input_model_dir
6773
default: output
6874

6975
output_log_path:
@@ -107,6 +113,14 @@ inputs:
107113
prefix: --num_samples
108114
default: 1000
109115

116+
rdkit_error_logging:
117+
label: Enable or disable RDKit error logging
118+
doc: |-
119+
Enable or disable RDKit error logging
120+
type: string?
121+
# RDKit prints out all errors by default, which can pose issues for CI,
122+
# particularly with large databases. It would be more efficient to suppress these errors.
123+
default: "ON"
110124
outputs:
111125
output_log_path:
112126
label: Path to the log file
@@ -126,6 +140,12 @@ outputs:
126140
glob: $(inputs.output_sdf_path)
127141
format: edam:format_3814 # sdf
128142

143+
stderr:
144+
type: File
145+
outputBinding:
146+
glob: stderr
147+
148+
stderr: stderr
129149

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

cwl_adapters/obmin.cwl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ baseCommand: bash
1212

1313
hints:
1414
DockerRequirement:
15-
dockerPull: jakefennick/openbabel
15+
dockerPull: ndonyapour/openbabel
1616

1717
inputs:
1818
script:
@@ -31,8 +31,8 @@ inputs:
3131
type: string
3232
format:
3333
- edam:format_3816
34-
# inputBinding:
35-
# position: 3
34+
inputBinding:
35+
position: 3
3636
default: system.mol2
3737

3838
outputs:
@@ -43,7 +43,13 @@ outputs:
4343
outputBinding:
4444
glob: $(inputs.output_mol2_path)
4545

46-
stdout: $(inputs.output_mol2_path)
46+
stderr:
47+
type: File
48+
outputBinding:
49+
glob: stderr
50+
51+
stderr: stderr
52+
4753

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

cwl_adapters/preprocess_molgan_database.cwl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ hints:
1111
DockerRequirement:
1212
dockerPull: ndonyapour/molgan
1313

14+
# Set environment variables for the tool,
15+
# See: https://www.commonwl.org/user_guide/topics/environment-variables.html
16+
requirements:
17+
EnvVarRequirement:
18+
envDef:
19+
RDKIT_ERROR_LOGGING: $(inputs.rdkit_error_logging)
20+
1421
inputs:
1522
input_sdf_path:
1623
label: Path to the input file
@@ -41,6 +48,17 @@ inputs:
4148
prefix: --output_data_path
4249
default: system.pkl
4350

51+
rdkit_error_logging:
52+
label: Enable or disable RDKit error logging
53+
doc: |-
54+
Enable or disable RDKit error logging
55+
type: string?
56+
format:
57+
- edam:format_2330
58+
# RDKit prints out all errors by default, which can pose issues for CI,
59+
# particularly with large databases. It would be more efficient to suppress these errors.
60+
default: "ON"
61+
4462
outputs:
4563
output_data_path:
4664
label: Path to the output data file
@@ -51,6 +69,13 @@ outputs:
5169
glob: $(inputs.output_data_path)
5270
format: edam:format_3653 # sdf
5371

72+
stderr:
73+
type: File
74+
outputBinding:
75+
glob: stderr
76+
77+
stderr: stderr
78+
5479
$namespaces:
5580
edam: https://edamontology.org/
5681

cwl_adapters/run_trained_molgan_model.cwl

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@ cwlVersion: v1.0
33

44
class: CommandLineTool
55

6-
label: MolGAN tool for generating small molecules
6+
label: MolGAN tool for generating small molecules
77

88
baseCommand: ["python", "/MolGAN/run_trained_model.py"]
99

1010
hints:
1111
DockerRequirement:
1212
dockerPull: ndonyapour/molgan
1313

14+
# Set environment variables for the tool,
15+
# See: https://www.commonwl.org/user_guide/topics/environment-variables.html
16+
requirements:
17+
EnvVarRequirement:
18+
envDef:
19+
RDKIT_ERROR_LOGGING: $(inputs.rdkit_error_logging)
20+
1421
inputs:
1522
input_data_path:
1623
label: Path to the input data file
@@ -41,7 +48,7 @@ inputs:
4148
default: NP.gz
4249
inputBinding:
4350
prefix: --input_NP_Score_path
44-
51+
4552
input_SA_Score_path:
4653
label: Output ceout file (AMBER ceout)
4754
doc: |-
@@ -60,10 +67,10 @@ inputs:
6067
input_model_dir:
6168
label: Input directory of trained models
6269
type: Directory
63-
format:
70+
format:
6471
- edam:format_2330 # 'Textual format'
6572
inputBinding:
66-
prefix: --input_model_dir
73+
prefix: --input_model_dir
6774
default: output
6875

6976
output_log_path:
@@ -106,6 +113,16 @@ inputs:
106113
prefix: --num_samples
107114
default: 1000
108115

116+
rdkit_error_logging:
117+
label: Enable or disable RDKit error logging
118+
doc: |-
119+
Enable or disable RDKit error logging
120+
type: string?
121+
format:
122+
- edam:format_2330
123+
# RDKit prints out all errors by default, which can pose issues for CI,
124+
# particularly with large databases. It would be more efficient to suppress these errors.
125+
default: "ON"
109126
outputs:
110127
output_log_path:
111128
label: Path to the log file
@@ -125,6 +142,13 @@ outputs:
125142
glob: $(inputs.output_sdf_path)
126143
format: edam:format_3814 # sdf
127144

145+
stderr:
146+
type: File
147+
outputBinding:
148+
glob: stderr
149+
150+
stderr: stderr
151+
128152

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

cwl_adapters/train_molgan_model.cwl

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ hints:
1111
DockerRequirement:
1212
dockerPull: ndonyapour/molgan
1313

14+
# Set environment variables for the tool,
15+
# See: https://www.commonwl.org/user_guide/topics/environment-variables.html
16+
requirements:
17+
EnvVarRequirement:
18+
envDef:
19+
RDKIT_ERROR_LOGGING: $(inputs.rdkit_error_logging)
20+
1421
inputs:
1522
input_data_path:
1623
label: Path to the input data file
@@ -41,7 +48,7 @@ inputs:
4148
default: NP.gz
4249
inputBinding:
4350
prefix: --input_NP_Score_path
44-
51+
4552
input_SA_Score_path:
4653
label: Output ceout file (AMBER ceout)
4754
doc: |-
@@ -74,10 +81,10 @@ inputs:
7481
output_model_dir:
7582
label: Output directory
7683
type: string
77-
format:
84+
format:
7885
- edam:format_2330 # 'Textual format'
7986
inputBinding:
80-
prefix: --output_model_dir
87+
prefix: --output_model_dir
8188
default: output
8289

8390
validation_metrics:
@@ -86,13 +93,13 @@ inputs:
8693
The metrics are used during validation and testing
8794
type: string?
8895
format:
89-
- edam:format_2330
96+
- edam:format_2330
9097
inputBinding:
9198
prefix: --validation_metrics
9299
default: 'np,logp,sas,qed,novelty,dc,unique,diversity,validity'
93100

94101
num_epochs:
95-
label: The number of training epochs
102+
label: The number of training epochs
96103
doc: |-
97104
The number of training epochs
98105
Type: int
@@ -111,7 +118,18 @@ inputs:
111118
format:
112119
- edam:format_2330
113120
inputBinding:
114-
prefix: --save_frequency
121+
prefix: --save_frequency
122+
123+
rdkit_error_logging:
124+
label: Enable or disable RDKit error logging
125+
doc: |-
126+
Enable or disable RDKit error logging
127+
type: string?
128+
format:
129+
- edam:format_2330
130+
# RDKit prints out all errors by default, which can pose issues for CI,
131+
# particularly with large databases. It would be more efficient to suppress these errors.
132+
default: "ON"
115133

116134
outputs:
117135

@@ -130,6 +148,13 @@ outputs:
130148
glob: $(inputs.output_model_dir)
131149
format: edam:format_2330 # 'Textual format
132150

151+
stderr:
152+
type: File
153+
outputBinding:
154+
glob: stderr
155+
156+
stderr: stderr
157+
133158
$namespaces:
134159
edam: https://edamontology.org/
135160

docker/dockerBuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sudo docker build --no-cache --pull -f Dockerfile_bash_scripts -t jakefennick/ba
2525
sudo docker build --no-cache --pull -f Dockerfile_calculate_net_charge -t jakefennick/calculate_net_charge .
2626
sudo docker build --no-cache --pull -f Dockerfile_mol2_to_pdbqt -t jakefennick/mol2_to_pdbqt .
2727
sudo docker build --no-cache --pull -f Dockerfile_nmr4md -t jakefennick/nmr4md .
28-
sudo docker build --no-cache --pull -f Dockerfile_openbabel -t jakefennick/openbabel .
28+
sudo docker build --no-cache --pull -f Dockerfile_openbabel -t ndonyapour/openbabel .
2929
sudo docker build --no-cache --pull -f Dockerfile_remove_terminal_residue_name_prefixes -t jakefennick/remove_terminal_residue_name_prefixes .
3030
sudo docker build --no-cache --pull -f Dockerfile_rename_residues_mol -t jakefennick/rename_residues_mol .
3131
sudo docker build --no-cache --pull -f Dockerfile_combine_structure -t ndonyapour/combine_structure .

dockerPull.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ docker pull jakefennick/calculate_net_charge
1717
docker pull jakefennick/generate_conformers
1818
docker pull jakefennick/mol2_to_pdbqt
1919
docker pull jakefennick/nmr4md
20-
docker pull jakefennick/openbabel
20+
docker pull ndonyapour/openbabel
2121
docker pull jakefennick/remove_terminal_residue_name_prefixes
2222
docker pull jakefennick/rename_residues_mol
2323
docker pull ndonyapour/molgan

examples/scripts/Dockerfile_molgan

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
FROM condaforge/mambaforge
33
# NOT mambaforge-pypy3 (rdkit is incompatible with pypy)
44

5+
# RDKIT logging
6+
ENV RDKIT_ERROR_LOGGING="OFF"
7+
58
RUN apt-get update && apt-get install -y wget git
69

710
# Clone MolGAN

0 commit comments

Comments
 (0)