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] OBChemTsfm in Python

2011-08-02 Thread Geoff Hutchison
> I am trying to use OBChemTsfm in Python 3.1 with OpenBabel 2.3 . I can access > the basic parts of openbabel (OBMol) but not OBChemTsfm. My code is as > follows: The scripting bindings must "wrap" each class from C++. So we have a very large subset in the Python bindings, but not OBChemTsfm.

Re: [Open Babel] obabel PNG depiction speedup and make test failures

2011-08-02 Thread Noel O'Boyle
If you're going to run "make test", you may have to set up the environment a bit as it uses the files from the build directory (rather than from "make install"). Try setting BABEL_DATADIR to ob-source-dir/data. You may also need to set BABEL_FORMATDIR (to build-dir/lib) or LD_LIBRARY_PATH (to build

Re: [Open Babel] OBChemTsfm in Python

2011-08-02 Thread Geoff Hutchison
On Aug 2, 2011, at 2:36 PM, Tom Lamar wrote: > So for now if I want to access OBChemTsfm I should just code in C++? It depends upon how fast you need a revised binding. We can try out adding phmodel.h to the openbabel-python.i SWIG file and re-run. I won't have time to try that today, but it's

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