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
66cc3266
Commit
66cc3266
authored
Nov 06, 2018
by
Jesse Kaminsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added documentation and typo fixes
parent
44343163
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
README.md
README.md
+8
-2
protonation_functions.py
protonation_functions.py
+3
-1
No files found.
README.md
View file @
66cc3266
...
...
@@ -21,9 +21,9 @@ Usage
```
usage: protonate.py [-h] [--min_ph MIN] [--max_ph MAX] [--st_dev STD]
[--smiles SMILES] [--smiles_file SMILES_FILE]
[--output_file OUTPUT_FILE]
[--output_file OUTPUT_FILE]
[--label_states]
Protonates small mole
uc
les.
Protonates small mole
cu
les.
optional arguments:
-h, --help show this help message and exit
...
...
@@ -35,6 +35,8 @@ optional arguments:
File which contains SMILES strings to protonate.
--output_file OUTPUT_FILE
File to write protonated SMILES. (Optional)
--label_states Label protonated SMILES with target state
("DEPROTONATED", "PROTONATED", or "BOTH").
```
The default pH range is 6.4 to 8.4, considered biologically relevant pH.
...
...
@@ -54,6 +56,10 @@ python protonate.py --smiles "CCC(=O)O" --min_ph -3 --max_ph -2
python protonate.py --smiles "CCCN" --min_ph -3 --max_ph -2 --output_file output.smi
```
```
python protonate.py --smiles_file sample_molecules.smi --st_dev 2.0 --label_states
```
Authors and Contacts
--------------------
...
...
protonation_functions.py
View file @
66cc3266
...
...
@@ -54,14 +54,16 @@ def protonate(args):
# in (not the one it IS in per the SMILES string). It's calculated
# based on the probablistic distributions obtained during training.
sites
=
get_prot_sites_and_target_states
(
smi
,
subs
)
states
=
'
\t
'
.
join
([
x
[
1
]
for
x
in
sites
])
new_smis
=
[
smi
]
for
site
in
sites
:
# Make a new smiles with the correct protonation state. Note that
# new_smis is a growing list. This is how multiple protonation
# sites are handled.
new_smis
=
protonate_site
(
new_smis
,
site
)
# If the user wants to see the target states, add those
# to the ends of each line.
if
args
[
"label_states"
]:
states
=
'
\t
'
.
join
([
x
[
1
]
for
x
in
sites
])
new_lines
=
[
x
+
"
\t
"
+
tag
+
"
\t
"
+
states
for
x
in
new_smis
]
else
:
new_lines
=
[
x
+
"
\t
"
+
tag
for
x
in
new_smis
]
...
...
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