Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dimorphite_dl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jdurrant
dimorphite_dl
Commits
eb68b349
Commit
eb68b349
authored
May 01, 2020
by
Jacob Durrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor updates.
parent
6c8aca90
Pipeline
#314
failed with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
14 deletions
+28
-14
CHANGES.md
CHANGES.md
+3
-0
README.md
README.md
+1
-1
dimorphite_dl.py
dimorphite_dl.py
+24
-13
No files found.
CHANGES.md
View file @
eb68b349
...
...
@@ -6,6 +6,9 @@ Changes
*
Updated protonation of nitrogen, oxygen, and sulfur atoms to be compatible
with the latest version of RDKit, which broke backwards compatibility.
*
Added "silent" option to suppress all output.
*
Added code to suppress unnecessary RDKit warnings.
*
Updated copyright to 2020.
1.
2.2
-----
...
...
README.md
View file @
eb68b349
...
...
@@ -35,7 +35,7 @@ usage: dimorphite_dl.py [-h] [--min_ph MIN] [--max_ph MAX]
[--label_states] [--test]
Dimorphite 1.2.3: Creates models of appropriately protonated small moleucles.
Apache 2.0 License. Copyright 20
18
Jacob D. Durrant.
Apache 2.0 License. Copyright 20
20
Jacob D. Durrant.
optional arguments:
-h, --help show this help message and exit
...
...
dimorphite_dl.py
View file @
eb68b349
# Copyright 20
18
Jacob D. Durrant
# Copyright 20
20
Jacob D. Durrant
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -30,19 +30,25 @@ except ImportError:
# Python3
from
io
import
StringIO
# Always let the user know a help file is available.
print
(
"
\n
For help, use: python dimorphite_dl.py --help"
)
def
print_header
():
"""Prints out header information."""
# Always let the user know a help file is available.
print
(
"
\n
For help, use: python dimorphite_dl.py --help"
)
# And always report citation information.
print
(
"
\n
If you use Dimorphite-DL in your research, please cite:"
)
print
(
"Ropp PJ, Kaminsky JC, Yablonski S, Durrant JD (2019) Dimorphite-DL: An"
)
print
(
"open-source program for enumerating the ionization states of drug-like small"
)
print
(
"molecules. J Cheminform 11:14. doi:10.1186/s13321-019-0336-9.
\n
"
)
# And always report citation information.
print
(
"
\n
If you use Dimorphite-DL in your research, please cite:"
)
print
(
"Ropp PJ, Kaminsky JC, Yablonski S, Durrant JD (2019) Dimorphite-DL: An"
)
print
(
"open-source program for enumerating the ionization states of drug-like small"
)
print
(
"molecules. J Cheminform 11:14. doi:10.1186/s13321-019-0336-9.
\n
"
)
try
:
import
rdkit
from
rdkit
import
Chem
from
rdkit.Chem
import
AllChem
# Disable the unnecessary RDKit warnings
from
rdkit
import
RDLogger
RDLogger
.
DisableLog
(
"rdApp.*"
)
except
:
msg
=
"Dimorphite-DL requires RDKit. See https://www.rdkit.org/"
print
(
msg
)
...
...
@@ -61,6 +67,8 @@ def main(params=None):
parser
=
ArgParseFuncs
.
get_args
()
args
=
vars
(
parser
.
parse_args
())
if
not
args
[
"silent"
]:
print_header
()
# Add in any parameters in params.
if
params
is
not
None
:
...
...
@@ -69,6 +77,7 @@ def main(params=None):
# If being run from the command line, print out all parameters.
if
__name__
==
"__main__"
:
if
not
args
[
"silent"
]:
print
(
"
\n
PARAMETERS:
\n
"
)
for
k
in
sorted
(
args
.
keys
()):
print
(
k
.
rjust
(
13
)
+
": "
+
str
(
args
[
k
]))
...
...
@@ -139,7 +148,7 @@ class ArgParseFuncs:
parser
=
MyParser
(
description
=
"Dimorphite 1.2.3: Creates models of "
+
"appropriately protonated small moleucles. "
+
"Apache 2.0 License. Copyright 20
18
Jacob D. "
+
"Apache 2.0 License. Copyright 20
20
Jacob D. "
+
"Durrant."
)
parser
.
add_argument
(
'--min_ph'
,
metavar
=
'MIN'
,
type
=
float
,
default
=
6.4
,
help
=
'minimum pH to consider (default: 6.4)'
)
...
...
@@ -158,6 +167,8 @@ class ArgParseFuncs:
parser
.
add_argument
(
'--label_states'
,
action
=
"store_true"
,
help
=
'label protonated SMILES with target state '
+
\
'(i.e., "DEPROTONATED", "PROTONATED", or "BOTH").'
)
parser
.
add_argument
(
'--silent'
,
action
=
"store_true"
,
help
=
'do not print any messages to the screen'
)
parser
.
add_argument
(
'--test'
,
action
=
"store_true"
,
help
=
'run unit tests (for debugging)'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment