Or you could loop over atom pairs calculating the shortest path.

Cheers,
Gareth

|rdkit.Chem.rdmolops.||GetShortestPath|(/(Mol)arg1/, /(int)arg2/, /(int)arg3/) → tuple :

   Find the shortest path between two atoms using the Bellman-Ford
   algorithm.

       ARGUMENTS:

             *

               mol: the molecule to use

             *

               idx1: index of the first atom

             *

               idx2: index of the second atom

   C++ signature :

       boost::python::tuple GetShortestPath(RDKit::ROMol,int,int)

On 4/1/2021 8:24 AM, Guillaume GODIN via Rdkit-discuss wrote:

Hello,

You can use the “topological” distance Matrix to have the atoms at a given distance of one atom. It’s not direct but it’s a good start:

*https://www.rdkit.org/docs/source/rdkit.Chem.rdmolops.html#rdkit.Chem.rdmolops.GetDistanceMatrix <https://www.rdkit.org/docs/source/rdkit.Chem.rdmolops.html#rdkit.Chem.rdmolops.GetDistanceMatrix>*

**

Guillaume

*De : *cmaye...@umbc.edu <cmaye...@umbc.edu>
*Date : *jeudi, 1 avril 2021 à 15:27
*À : *rdkit-discuss@lists.sourceforge.net <rdkit-discuss@lists.sourceforge.net> *Objet : *[*External*] [Rdkit-discuss] finding atoms at multiple bond distances from target

Good morning,

I’m familiar with the atom.GetNeighbors() function to find all atoms within one bond distance of a given atom.  Is there any method (either built-in or user-created) to find all atoms within n bond distances (n >= 2) of a given atom?  I’m working on a method to assign relative stereochemistry (D or L) to alpha-amino acids, which (to my first estimation) depends on the atomic numbers of the sidechain atoms within the first 2 bond distances of the alpha-carbon.  I’m currently iterating through the sidechain atoms after identifying the backbone heavy atoms (alpha-nitrogen, alpha-carbon, and carboxylate carbon), and am curious if there is some way to simplify this process by getting a list of atoms at progressively larger bond distances from a specific atom.

Thanks for your time, any advice is welcome.

-Chris

***********************************************************************************
DISCLAIMER
This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from Firmenich, are confidential and solely for the use of the intended recipient. The contents do not represent the opinion of Firmenich except to the extent that it relates to their official business.
***********************************************************************************


_______________________________________________
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