I got the hash-based algorithm up and running (commit
here<https://github.com/patrickfuller/openbabel/commit/f48bc03418e7e85344c12624f0354e62665787b3>).
I ran it on a folder of ~100 cif files, and it's about 5% faster. I don't
think the small performance gain is worth migrating away from tried and
tested code, but, if there's another opinion out there, let me know.

Geoff - This might be more of a question for the Avogadro mailing list, but
do you think there's a more elegant way to handle these large cifs in a
GUI? The example cif currently freezes up Avogadro (and the internal
front-end software at my job) with a ton of CPU work. Maybe this could be
run in a background thread with a timeout?

Pat


On Sun, Feb 9, 2014 at 3:20 PM, Patrick Fuller <patrickful...@gmail.com>wrote:

> Thanks! I feel rather stupid not checking for ConnectTheDots.
>
>
> On Sun, Feb 9, 2014 at 6:18 AM, Noel O'Boyle <baoille...@gmail.com> wrote:
>
>> I guessed that Roger will just call it ConnectTheDots...
>>
>> $ grep -i connectthedots `find . | grep cpp`
>> ./Code/GraphMol/FileParsers/ProximityBonds.cpp:static void
>> ConnectTheDots_Small(RWMol *mol)
>> ./Code/GraphMol/FileParsers/ProximityBonds.cpp:static void
>> ConnectTheDots_Medium(RWMol *mol)
>> ./Code/GraphMol/FileParsers/ProximityBonds.cpp:static void
>> ConnectTheDots_Large(RWMol *mol)
>> ./Code/GraphMol/FileParsers/ProximityBonds.cpp:void ConnectTheDots(RWMol
>> *mol)
>> ./Code/GraphMol/FileParsers/ProximityBonds.cpp:
>>  ConnectTheDots_Large(mol);
>> ./Code/GraphMol/FileParsers/PDBParser.cpp:    ConnectTheDots(mol);
>>
>> - Noel
>>
>> On 9 February 2014 00:12, Patrick Fuller <patrickful...@gmail.com> wrote:
>> > Noel - Thanks for the link to that presentation! It's useful to see
>> > information from someone who's clearly looked into this sort of thing.
>> That
>> > being said, I'm having no luck grepping around RDKit's source for the
>> bond
>> > inference algorithm. Do you know where to look for this?
>> >
>> > Thanks,
>> > Pat
>> >
>> >
>> > On Mon, Feb 3, 2014 at 3:17 PM, Noel O'Boyle <baoille...@gmail.com>
>> wrote:
>> >>
>> >> FYI, Roger added a connect the dots to RDKit a few months back for a
>> >> PDB parser. You can see his discussion of various algorithms at the
>> >> end of http://www.slideshare.net/NextMoveSoftware/rdkit-gems. We could
>> >> repurpose this code considering the licence.
>> >>
>> >> - Noel
>> >>
>> >> On 3 February 2014 19:58, Patrick Fuller <patrickful...@gmail.com>
>> wrote:
>> >> > So you can use -ab or -aB if you want to ignore ConnectTheDots.
>> >> >
>> >> > Good to know, thanks!
>> >> >
>> >> > The biggest talk has largely centered on PerceiveBondOrders and
>> Kekule /
>> >> > aromatic detection, which are usually slower than ConnectTheDots. If
>> >> > you'd
>> >> > like to take a stab at an improved implementation of ConnectTheDots
>> >> > (octree?) for larger systems, that would certainly be well received.
>> >> > Since
>> >> > the number of atoms is known before CTD is called, the method could
>> >> > choose
>> >> > implementations as needed.
>> >> >
>> >> > Sounds like fun - I'll take a stab at it in the coming weeks.
>> >> >
>> >> > Pat
>> >> >
>> >> >
>> >> >
>> >> > On Mon, Feb 3, 2014 at 9:54 AM, Geoffrey Hutchison
>> >> > <geoff.hutchi...@gmail.com> wrote:
>> >> >>
>> >> >> Looking through the source, it seems that the crash is due to
>> automatic
>> >> >> O(N^2) bond inference on crystals. I was able to verify this by
>> >> >> manually
>> >> >> parsing the cif and building an OBMol from scratch (just adding
>> atoms).
>> >> >>
>> >> >>
>> >> >> From the documentation for cif (and most formats):
>> >> >>
>> >> >> Read Options e.g. -ab:
>> >> >>   v  Verbose CIF conversion
>> >> >>   s  Output single bonds only
>> >> >>   b  Disable bonding entirely
>> >> >>   B  Use bonds listed in CIF file from _geom_bond_etc records
>> >> >> (overrides
>> >> >> option b)
>> >> >>
>> >> >> So you can use -ab or -aB if you want to ignore ConnectTheDots.
>> >> >>
>> >> >> I don't want to make a bond-disabling API change just to fix a
>> corner
>> >> >> case. Instead, has there been any talk about making ConnectTheDots
>> >> >> O(NlogN)?
>> >> >> I feel like it could be construed as a graph search problem.
>> >> >>
>> >> >>
>> >> >> The biggest talk has largely centered on PerceiveBondOrders and
>> Kekule
>> >> >> /
>> >> >> aromatic detection, which are usually slower than ConnectTheDots. If
>> >> >> you'd
>> >> >> like to take a stab at an improved implementation of ConnectTheDots
>> >> >> (octree?) for larger systems, that would certainly be well received.
>> >> >> Since
>> >> >> the number of atoms is known before CTD is called, the method could
>> >> >> choose
>> >> >> implementations as needed.
>> >> >>
>> >> >> Cheers,
>> >> >> -Geoff
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> ------------------------------------------------------------------------------
>> >> > Managing the Performance of Cloud-Based Applications
>> >> > Take advantage of what the Cloud has to offer - Avoid Common
>> Pitfalls.
>> >> > Read the Whitepaper.
>> >> >
>> >> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>> >> > _______________________________________________
>> >> > OpenBabel-Devel mailing list
>> >> > OpenBabel-Devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>> >> >
>> >
>> >
>>
>
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to