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 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).

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


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. We can certainly add that.

Cheers,
-Geoff


--
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


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-dir/lib).

On BSD, I've found that the forcefield tests fail when run through
"make test" but run fine from the command-line, so there's some Cmake
magic messing things up there somehow. (FYI, our test dashboard is at
http://my.cdash.org/index.php?project=Open+Babel)

- Noel

On 2 August 2011 15:22, Vedrin Jeliazkov  wrote:
> Hi Noel,
>
> We've upgraded successfully both our development and production system
> to use the latest svn trunk (rev. 4534) version of obabel. PNG
> depiction of SMILES works fine on both systems and is much faster than
> with the older obabel versions that we've tried -- that's great!
>
> We've also noticed that some of the tests that are executed by 'make
> test' are failing. Some of these failures are specific to the
> development server (Linux 2.6.26-2-amd64, gcc 4.3.2:
> inchiSamples.sdf_Test, logp_psa_Test), others to the production server
> (FreeBSD 8.2-STABLE, amd64, gcc 4.2.2: charge-gasteiger_Test), while
> the remaining failures are exhibited on both servers (builder_Test,
> charge-mmff94_Test, ffgaff_Test, ffghemical_Test, ffuff_Test). The
> cmake options we've used in both cases are:
>
> -DCMAKE_INSTALL_PREFIX=/usr/local/openbabel -DPYTHON_BINDINGS=OFF
> -DBUILD_GUI=OFF
>
> Kind regards,
> Vedrin
>
> PS: I'm attaching a list of these make test failures in case that you
> would like to have a closer look at them:
>
> 1) Development server
>
> ambit:/home/vedrin/obabel/svn/openbabel/build# make test
> Running tests...
> Start processing tests
> Test project /home/vedrin/obabel/svn/openbabel/build
>  1/ 57 Testing automorphism_Test                Passed
>  2/ 57 Testing builder_Test                  ***Failed Error regular
> expression found in output. Regex=[FAIL]
>  3/ 57 Testing canonconsistent_Test             Passed
>  4/ 57 Testing canonstable_Test                 Passed
>  5/ 57 Testing cistrans_Test                    Passed
>  6/ 57 Testing graphsym_Test                    Passed
>  7/ 57 Testing implicitH_Test                   Passed
>  8/ 57 Testing lssr_Test                        Passed
>  9/ 57 Testing isomorphism_Test                 Passed
>  10/ 57 Testing rotor_Test                       Passed
>  11/ 57 Testing shuffle_Test                     Passed
>  12/ 57 Testing smiles_Test                      Passed
>  13/ 57 Testing spectrophore_Test                Passed
>  14/ 57 Testing squareplanar_Test                Passed
>  15/ 57 Testing stereo_Test                      Passed
>  16/ 57 Testing stereoperception_Test            Passed
>  17/ 57 Testing tetrahedral_Test                 Passed
>  18/ 57 Testing tetranonplanar_Test              Passed
>  19/ 57 Testing tetraplanar_Test                 Passed
>  20/ 57 Testing uniqueid_Test                    Passed
>  21/ 57 Testing inchiSamples.sdf_Test         ***Failed
>  22/ 57 Testing inchiSamplesTechMan.sdf_Test     Passed
>  23/ 57 Testing inchiSteffen_PubChem.smi_Test    Passed
>  24/ 57 Testing aromatest_Test                   Passed
>  25/ 57 Testing atom_Test                        Passed
>  26/ 57 Testing bond_Test                        Passed
>  27/ 57 Testing cansmi_Test                      Passed
>  28/ 57 Testing charge-mmff94_Test            ***Failed
>  29/ 57 Testing charge-gasteiger_Test            Passed
>  30/ 57 Testing conversion_Test                  Passed
>  31/ 57 Testing datatest_Test                    Passed
>  32/ 57 Testing ffgaff_Test                   ***Failed
>  33/ 57 Testing ffghemical_Test               ***Failed
>  34/ 57 Testing ffmmff94_Test                    Passed
>  35/ 57 Testing ffuff_Test                    ***Failed
>  36/ 57 Testing formalcharge_Test                Passed
>  37/ 57 Testing format_Test                      Passed
>  38/ 57 Testing formula_Test                     Passed
>  39/ 57 Testing internalcoord_Test               Passed
>  40/ 57 Testing invalidsmarts_Test               Passed
>  41/ 57 Testing invalidsmiles_Test               Passed
>  42/ 57 Testing iterators_Test                   Passed
>  43/ 57 Testing logp_psa_Test                 ***Failed Error regular
> expression found in output. Regex=[not ok]
>  44/ 57 Testing math_Test                        Passed
>  45/ 57 Testing mol_Test                         Passed
>  46/ 57 Testing phmodel_Test                     Passed
>  47/ 57 Testing residue_Test                     Passed
>  48/ 57 Testing ringtest_Test                    Passed
>  49/ 57 Testing smartstest_Test                  Passed
>  50/ 57 Testing smartsparse_Test                 Passed
>  51/ 57 Testing smilesmatch_Test                 Passed
>  52/ 57 Testing unitcell_Test                    Passed
>  53/ 57 Testing p

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 usually pretty easy to add new 
classes for the "trunk" development code. As long as you're happy to compile 
from the SVN repository, there's not much problem.

Best regards,
-Geoff
--
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


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
>>> 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).

> 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