Re: [Open Babel] Shortest path between 2 atoms

2011-08-17 Thread Tim Vandermeersch
Hi, On Tue, Aug 2, 2011 at 10:47 PM, Noel O'Boyle wrote: > On 2 August 2011 14:08, Pascal Muller 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 n

Re: [Open Babel] Shortest path between 2 atoms

2011-08-02 Thread Noel O'Boyle
On 2 August 2011 14:08, Pascal Muller 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 >>> atom

Re: [Open Babel] Shortest path between 2 atoms

2011-08-02 Thread Pascal Muller
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

Re: [Open Babel] Shortest path between 2 atoms

2011-08-01 Thread Pascal Muller
Hi, > You're looking for a breadth-first search (BFS), which is available in > OB. See the Python code at > http://baoilleach.blogspot.com/2008/07/calculate-circular-fingerprints-with.html > to get some idea of how to use it. > > You just need to start the BFS at atom1, and stop it when it comes t

Re: [Open Babel] Shortest path between 2 atoms

2011-08-01 Thread Noel O'Boyle
You're looking for a breadth-first search (BFS), which is available in OB. See the Python code at http://baoilleach.blogspot.com/2008/07/calculate-circular-fingerprints-with.html to get some idea of how to use it. You just need to start the BFS at atom1, and stop it when it comes to atom2. The val

[Open Babel] Shortest path between 2 atoms

2011-08-01 Thread Pascal Muller
Hi, I would to know the number of bonds between two atoms within a molecule (i.e. the shortest path). Is there a function giving this information? I only found this thread http://forums.openbabel.org/OB-GetDistance-function-td959922.html with a piece of code... but I still don't understand C++, e