Hi, On Tue, Aug 2, 2011 at 10:47 PM, Noel O'Boyle <baoille...@gmail.com> wrote: > On 2 August 2011 14:08, Pascal Muller <pascal.jm.mul...@gmail.com> wrote: >> Hi, >> >>>>> I would to know the number of bonds between two atoms within a molecule >>>>> (i.e. the shortest path). >> >>>> You're looking for a breadth-first search (BFS) >>>> You just need to start the BFS at atom1, and stop it when it comes to >>>> atom2. The value of depth will give you the answer. >> >> Ok, I have now the number of bonds between 2 atoms. >> Is there an easy way to know the type of each bond for the path >> between the 2 atoms? (I'm especially interested in counting the >> non-ring bong). > > You'll need to implement a BFS yourself, and keep track of the atoms > in the path. See > http://baoilleach.blogspot.com/2008/02/calculate-circular-fingerprints-with.html > for some ideas (it's a different link that my previous email).
The Floyd–Warshall algorithm also gives the shortest path and is easy to implement. >> Thanks, >> Regards, >> Pascal >> >> ------------------------------------------------------------------------------ >> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> The must-attend event for mobile developers. Connect with experts. >> Get tools for creating Super Apps. See the latest technologies. >> Sessions, hands-on labs, demos & much more. Register early & save! >> http://p.sf.net/sfu/rim-blackberry-1 >> _______________________________________________ >> OpenBabel-discuss mailing list >> OpenBabel-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >> > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss