Discussion:
[Open Babel] making a custom pH model
Sandro Boland
2008-08-29 06:15:02 UTC
Permalink
Dear openbabel users,

I am currently using openbabel to convert an number of molecules from smiles
to various formats. One thing of importance for docking (and biological
activity) is the protonation state of the molecule. However, the general
rules from openbabel seem to be a bit too simple in that area... I would
therefore like to add new rules to the phomdel.txt file, so that more
realistic results can be obtained.

Some typical problems I have concern amine groups... While most of them are
protonated at pH7, some of them are not.

Molecules such as C1CCCCC1C(N)C(F)(F)F or c1ccccc1C(N)C(F)(F)F should have a
pKa <7 Does anyone know how to modify the phmodel.txt file so that this
group is not protonated while using the phmodel?
(And of course, I would still like to protonate the other "regular"
amines!).

The same problem happens with piperazines; for instance:

a molecule such as: c1ccccc1CCN2CCNCC2
should carry a single positive charge at pH7: c1ccccc1CCN2CC[N+]CC2
and not two charges such as: c1ccccc1CC[N+]2CC[N+]CC2 (what I currently get
from openbabel).

The differences resulting from this problem can have a significant impact on
further modeling work:
* electrostatic repulsion while modeling/docking/scoring
* wrong conformations of the molecule (miscalculated internal H bonds,..)
* wrong values of charge descriptors in QSAR/QSPR
* .....

I would gladly spend some time modifying the pH model if I just had a clue
on how to do this... And I think that having a larger and more accurate set
of rules could be beneficial for all users (making a topic with new rules
that can be implemented, posting an updated pHmodel???)

So, does any of you have a clue?

Thank you in advance! :-)

Sandro
--
View this message in context: http://www.nabble.com/making-a-custom-pH-model-tp19158521p19158521.html
Sent from the openbabel-discuss mailing list archive at Nabble.com.
Geoffrey Hutchison
2008-09-04 19:59:33 UTC
Permalink
Post by Sandro Boland
rules from openbabel seem to be a bit too simple in that area... I would
therefore like to add new rules to the phomdel.txt file, so that more
realistic results can be obtained.
Some typical problems I have concern amine groups... While most of them are
protonated at pH7, some of them are not.
Are you using the new pH model with Open Babel 2.2?
Post by Sandro Boland
Molecules such as C1CCCCC1C(N)C(F)(F)F or c1ccccc1C(N)C(F)(F)F
should have a
pKa <7 Does anyone know how to modify the phmodel.txt file so that this
group is not protonated while using the phmodel?
The phmodel.txt file uses "transforms" from the world of Reaction
SMILES:
http://www.daylight.com/meetings/summerschool01/course/basics/smirks.html

Does that help, or do you need something more specific?

Cheers,
-Geoff
Sandro Boland
2008-09-08 10:46:48 UTC
Permalink
Post by Geoffrey Hutchison
Are you using the new pH model with Open Babel 2.2?
No, using openbabel v2.2 doesn't really help. After all, there is still only
one rule for all "charged amines" that are all associated with a pKa of
10... So for the moment, I'm still using the former version, because of some
corrections that I already did and that I still need to implement in v2.2.
Post by Geoffrey Hutchison
The phmodel.txt file uses "transforms" from the world of Reaction
http://www.daylight.com/meetings/summerschool01/course/basics/smirks.html
I am aware of the possibility of using SMIRKS reaction patterns for addi,g
new rules in file phmodel.txt. I actually did it for some specific groups
(acidic sulfonamides, some phosphonates,...) It is in fact quite easy to add
rules for groups that were not previously recognized by the pH model. My
problem here is that I have a common group that is recognized by the pH
model of openbabel (here an amine) but that I need to add some exceptions to
this rule so that some specific groups (i.e. an amine with a CF3 on the
neighboring position) are left uncharged.

So my question is actually: how should I add these rules in the pH model?

The only alternative would be to build, one by one, rules for all types of
amines one could find.... That means that for sure, quite a few groups will
be forgotten....

I still hope you (or anyone) can help me avoid this ....
--
View this message in context: http://www.nabble.com/making-a-custom-pH-model-tp19158521p19369675.html
Sent from the openbabel-discuss mailing list archive at Nabble.com.
Tim Vandermeersch
2008-09-08 13:26:33 UTC
Permalink
Hi,

The problem with the phmodel.txt in 2.2 is that there is no real way
to determine the "quality" of a given rule. All transformations are
applied when the begin pattern matches... Also, I don't really know
why it was implemented using transformations in the first place.

A simpler and more flexible solution would be to have a OBpKaModel
which assigns pKa values. These values could be given by rules like:

ACID C(=O)[O:1] 4.0
ACID F(F)(F)CC(=O)[O:1] 3.0
BASE [N^3:1] 10.0
BASE [N:1]CC(F)(F)F 6.0
...

As a "quality" parameter I'm currently using the number of atoms in
the pattern. (so if the second pattern matches it is used if it has
more atoms to describe the atom's environment). Later these values
could be used to calculate the % of each species at a given pH taking
all pKa values into account.

I have some code for this already but this isn't included in 2.2. It
works for simple acids and bases but doesn't support multiple pKa
values for a single atom yet. Adding this shouldn't be too much work
though. Do you build from source or do you use the binary package for
macOS or windows? (I can make a windows binary with the new code if
you want...)

Any help in this area (adding rules) would be greatly appreciated.

Thanks,
Tim

PS: sorry for the late reply, but

On Mon, Sep 8, 2008 at 12:46 PM, Sandro Boland
Post by Sandro Boland
Post by Geoffrey Hutchison
Are you using the new pH model with Open Babel 2.2?
No, using openbabel v2.2 doesn't really help. After all, there is still only
one rule for all "charged amines" that are all associated with a pKa of
10... So for the moment, I'm still using the former version, because of some
corrections that I already did and that I still need to implement in v2.2.
Post by Geoffrey Hutchison
The phmodel.txt file uses "transforms" from the world of Reaction
http://www.daylight.com/meetings/summerschool01/course/basics/smirks.html
I am aware of the possibility of using SMIRKS reaction patterns for addi,g
new rules in file phmodel.txt. I actually did it for some specific groups
(acidic sulfonamides, some phosphonates,...) It is in fact quite easy to add
rules for groups that were not previously recognized by the pH model. My
problem here is that I have a common group that is recognized by the pH
model of openbabel (here an amine) but that I need to add some exceptions to
this rule so that some specific groups (i.e. an amine with a CF3 on the
neighboring position) are left uncharged.
So my question is actually: how should I add these rules in the pH model?
The only alternative would be to build, one by one, rules for all types of
amines one could find.... That means that for sure, quite a few groups will
be forgotten....
I still hope you (or anyone) can help me avoid this ....
--
View this message in context: http://www.nabble.com/making-a-custom-pH-model-tp19158521p19369675.html
Sent from the openbabel-discuss mailing list archive at Nabble.com.
Sandro Boland
2008-09-08 14:05:52 UTC
Permalink
Post by Tim Vandermeersch
A simpler and more flexible solution would be to have a OBpKaModel
As a "quality" parameter I'm currently using the number of atoms in
the pattern. (so if the second pattern matches it is used if it has
more atoms to describe the atom's environment). Later these values
could be used to calculate the % of each species at a given pH taking
all pKa values into account.
This sounds like a great idea!
Post by Tim Vandermeersch
I have some code for this already but this isn't included in 2.2. It
works for simple acids and bases but doesn't support multiple pKa
values for a single atom yet.
Sounds reasonable for most drug-like molecules, anyway!
--
View this message in context: http://www.nabble.com/making-a-custom-pH-model-tp19158521p19372406.html
Sent from the openbabel-discuss mailing list archive at Nabble.com.
Geoffrey Hutchison
2008-09-08 14:10:32 UTC
Permalink
Post by Tim Vandermeersch
The problem with the phmodel.txt in 2.2 is that there is no real way
to determine the "quality" of a given rule. All transformations are
applied when the begin pattern matches... Also, I don't really know
why it was implemented using transformations in the first place.
Transformations are obviously more general, so in principle, it can be
re-used beyond just simple pH.

I'll note that because all transformations are applied when matching,
Post by Tim Vandermeersch
My problem here is that I have a common group that is recognized by
the pH
model of openbabel (here an amine) but that I need to add some
exceptions to
this rule so that some specific groups (i.e. an amine with a CF3 on the
neighboring position) are left uncharged.
In this case, I'd add the specific cases as "corrections." That is,
assume that the amine has been matched and corrected (IIRC,
transformations are applied in matching order from top to bottom in
the file).

Then, use the CF3 SMIRKS to correct for cases where the amine should
*not* be protonated at those pKas.

Does that make sense?

Cheers,
-Geoff

Loading...