Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread Francois Berenger

On 09/09/2020 01:33, Tim Dudgeon wrote:

Hi All,
thanks for the suggestions.

Greg, that's part of what's needed but there's also some more complex
logic needed. For instance, if the atom the H is attached to is
rotatable e.g. an OH group) then it is more complex than if it is
fixed (e.g a N in a ring).
I was wondering whether anyone had already encoded these types of
rules.

BTW I also found https://oddt.readthedocs.io/en/latest/ which seems to
handle a whole range of interaction types nicely, and can use RDKit as
its underlying toolkit (as well as OBabel).


More precisely:
https://oddt.readthedocs.io/en/latest/rst/oddt.html?module-oddt.interactions#module-oddt.interactions


Tim

On Tue, Sep 8, 2020 at 1:24 PM Greg Landrum 
wrote:


Hi Tim,

Assuming that you already have the indices of the atoms that you're
interested in looking at, it's pretty easy to calculate the angle
between three arbitrary atoms. Here's an example:

In [3]: m = Chem.AddHs(Chem.MolFromSmiles('COCO'))

In [4]: AllChem.EmbedMolecule(m)
Out[4]: 0

In [5]: conf = m.GetConformer()

In [6]: ps = [conf.GetAtomPosition(x) for x in
range(conf.GetNumAtoms())]

The atom0 - atom1 - atom2 angle:
In [7]: (ps[1]-ps[0]).AngleTo(ps[1]-ps[2])
Out[7]: 1.8295300825582068

Those happened to be bonded, but that's not necessary, here's the
atom1 - atom6 - atom3 angle:
In [15]: (ps[6]-ps[1]).AngleTo(ps[6]-ps[3])
Out[15]: 0.4862648980647286

Is that what you're looking for?

-greg

On Mon, Sep 7, 2020 at 3:06 PM Tim Dudgeon 
wrote:


Hi RDKitters,
I was wondering whether anyone has any RDKit code that checks on
the geometry of a H-bond.
e.g. once a donor and acceptor are located within a reasonable
distance of each other to check on the angles involved to
establish if that is a reasonable H-bond.
Tim

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread Tim Dudgeon
Hi All,
thanks for the suggestions.

Greg, that's part of what's needed but there's also some more complex logic
needed. For instance, if the atom the H is attached to is rotatable e.g. an
OH group) then it is more complex than if it is fixed (e.g a N in a ring).
I was wondering whether anyone had already encoded these types of rules.

BTW I also found https://oddt.readthedocs.io/en/latest/ which seems to
handle a whole range of interaction types nicely, and can use RDKit as its
underlying toolkit (as well as OBabel).

Tim

On Tue, Sep 8, 2020 at 1:24 PM Greg Landrum  wrote:

> Hi Tim,
>
> Assuming that you already have the indices of the atoms that you're
> interested in looking at, it's pretty easy to calculate the angle between
> three arbitrary atoms. Here's an example:
>
> In [3]: m = Chem.AddHs(Chem.MolFromSmiles('COCO'))
>
> In [4]: AllChem.EmbedMolecule(m)
> Out[4]: 0
>
> In [5]: conf = m.GetConformer()
>
> In [6]: ps = [conf.GetAtomPosition(x) for x in range(conf.GetNumAtoms())]
>
> The atom0 - atom1 - atom2 angle:
> In [7]: (ps[1]-ps[0]).AngleTo(ps[1]-ps[2])
> Out[7]: 1.8295300825582068
>
>
> Those happened to be bonded, but that's not necessary, here's the atom1 -
> atom6 - atom3 angle:
> In [15]: (ps[6]-ps[1]).AngleTo(ps[6]-ps[3])
> Out[15]: 0.4862648980647286
>
> Is that what you're looking for?
>
> -greg
>
>
>
> On Mon, Sep 7, 2020 at 3:06 PM Tim Dudgeon  wrote:
>
>> Hi RDKitters,
>> I was wondering whether anyone has any RDKit code that checks on the
>> geometry of a H-bond.
>> e.g. once a donor and acceptor are located within a reasonable
>> distance of each other to check on the angles involved to establish if that
>> is a reasonable H-bond.
>> Tim
>>
>>
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread Greg Landrum
Hi Tim,

Assuming that you already have the indices of the atoms that you're
interested in looking at, it's pretty easy to calculate the angle between
three arbitrary atoms. Here's an example:

In [3]: m = Chem.AddHs(Chem.MolFromSmiles('COCO'))

In [4]: AllChem.EmbedMolecule(m)
Out[4]: 0

In [5]: conf = m.GetConformer()

In [6]: ps = [conf.GetAtomPosition(x) for x in range(conf.GetNumAtoms())]

The atom0 - atom1 - atom2 angle:
In [7]: (ps[1]-ps[0]).AngleTo(ps[1]-ps[2])
Out[7]: 1.8295300825582068


Those happened to be bonded, but that's not necessary, here's the atom1 -
atom6 - atom3 angle:
In [15]: (ps[6]-ps[1]).AngleTo(ps[6]-ps[3])
Out[15]: 0.4862648980647286

Is that what you're looking for?

-greg



On Mon, Sep 7, 2020 at 3:06 PM Tim Dudgeon  wrote:

> Hi RDKitters,
> I was wondering whether anyone has any RDKit code that checks on the
> geometry of a H-bond.
> e.g. once a donor and acceptor are located within a reasonable distance of
> each other to check on the angles involved to establish if that is a
> reasonable H-bond.
> Tim
>
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread Tosstorff, Andreas via Rdkit-discuss
  Hi Tim,

also not a solution within RDKit, but maybe of help:
The CSD Python API has a lot of functions around hbonds:

https://downloads.ccdc.cam.ac.uk/documentation/API/modules/molecule_api.html?highlight=hbond#ccdc.molecule.Molecule.hbonds

Hope this helps,
Andy

On Mon, Sep 7, 2020 at 3:07 PM Tim Dudgeon  wrote:

> Hi RDKitters,
> I was wondering whether anyone has any RDKit code that checks on the
> geometry of a H-bond.
> e.g. once a donor and acceptor are located within a reasonable distance of
> each other to check on the angles involved to establish if that is a
> reasonable H-bond.
> Tim
>
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>


-- 
*Dr. Andreas Tosstorff*


*Post Doctorate Scientist*
*Computer Aided Drug Design | Roche Pharma Research and Early Development**F.
Hoffmann-La Roche Ltd* | Bldg. 92.3.88 | Grenzacherstrasse 124 | CH-4070
Basel | Switzerland
Tel +41 (0) 61 68 20 867

 *Doing now what patients need next*
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread David Cosgrove
Hi Tim,
I don’t have any code, but if you go to
https://github.com/harryjubb/arpeggio and look in config.py there are
SMARTS definitions for various interaction types with geometric tests that
might help. If you already have a suitable complex, you could just use
arpeggio.py to pull out the interactions directly. It doesn’t use RDKit,
but an unholy alliance of OpenBabel and Biopython.

HTH,
Dave


On Mon, 7 Sep 2020 at 14:07, Tim Dudgeon  wrote:

> Hi RDKitters,
> I was wondering whether anyone has any RDKit code that checks on the
> geometry of a H-bond.
> e.g. once a donor and acceptor are located within a reasonable distance of
> each other to check on the angles involved to establish if that is a
> reasonable H-bond.
> Tim
>
>
>
>
> ___
>
> Rdkit-discuss mailing list
>
> Rdkit-discuss@lists.sourceforge.net
>
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
> --
David Cosgrove
Freelance computational chemistry and chemoinformatics developer
http://cozchemix.co.uk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] h-bond geometry

2020-09-07 Thread Tim Dudgeon
Hi RDKitters,
I was wondering whether anyone has any RDKit code that checks on the
geometry of a H-bond.
e.g. once a donor and acceptor are located within a reasonable distance of
each other to check on the angles involved to establish if that is a
reasonable H-bond.
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss