Thanks, this worked like a charm!

I was wondering on another thing: I wanted to calculate the bond angle between 
three atoms in the two conformers (essentially looking for possible hydrogen 
bonding). Again, rdMolTransforms.GetAngleDeg() inputs only one conformer, while 
the Point3D angle functions inputs either two or four atom indices. Is there 
some function I've either misunderstood/missed or is it better to retrieve this 
angle from vector calculations?


Illimar Rekand
Ph.D. candidate,
Brenk-lab, Haug-lab
Department of Biomedicine
Department of Chemistry
University of Bergen


________________________________
From: Paolo Tosco <paolo.tosco.m...@gmail.com>
Sent: Friday, August 16, 2019 4:33:36 PM
To: Illimar Hugo Rekand
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Get distances between two atoms in different 
molecules

Hi Illimar,

You may use Point3D.Distance:

conf_a.GetAtomPosition(i).Distance(conf_b.GetAtomPosition(j))

Cheers,
p.

> On 16 Aug 2019, at 16:01, Illimar Hugo Rekand <illimar.rek...@uib.no> wrote:
>
> Hello everyone,
>
>
> I see that GetBondDistance() is a useful tool for calculating the distances 
> between atoms, whether bonded or nonbonded. However, I am unsure on how to 
> implement this function to calculate distances between atoms in different 
> molecule, as the functions requires a conformer as an argument.
>
>
> Would I need to generate a conformer containing both molecules in order to 
> use this function for calculating the intermolecular atom distances?
>
>
> Illimar Rekand
> Ph.D. candidate,
> Brenk-lab, Haug-lab
> Department of Biomedicine
> Department of Chemistry
> University of Bergen
>
>
>
> _______________________________________________
> 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

Reply via email to