The current ConnectTheDots is generally N log N since the atoms are sorted.
But my question would be whether the PerceiveBondOrders is being triggered
on your CIF files. Try, for example, running:
obabel file.cif -O file.cml -as #output only single bonds from
ConnectTheDots()
I just did this - on top of a full code profile - and PerceiveBondOrders is
definitely the culprit.
Avogadro *does* read molecule files in a background thread. Granted, you
can't do anything until the molecule is read, but the interface still
works. Again, if you're seeing a huge CPU hit, my guess is that it's from
PBO. Now if you have a bit of free time for coding, I've got a great idea
there for a huge performance win. :-)
For a short-term hack, I'm going just disable PBO for crystals loaded
through my program. However, I'd be interested in hearing about *any* ideas
related to crystals + performance, even if it's just to reclaim bond orders.
Pat
On Sun, Feb 9, 2014 at 8:40 PM, Geoffrey Hutchison <
geoff.hutchi...@gmail.com> wrote:
> 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.
>
>
> The current ConnectTheDots is generally N log N since the atoms are
> sorted. But my question would be whether the PerceiveBondOrders is being
> triggered on your CIF files. Try, for example, running:
>
> obabel file.cif -O file.cml -as #output only single bonds from
> ConnectTheDots()
>
> I suspect the problem is not in perceiving bonds, but the ring perception
> and aromaticity detection needed in the PerceiveBondOrders.
>
> BTW, I'd try benchmarking before and after the commit with -as for
> perceiving only single bonds. I'd be curious on large CIF files how much
> the hash-based algorithm helps.
>
> 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?
>
>
> Avogadro *does* read molecule files in a background thread. Granted, you
> can't do anything until the molecule is read, but the interface still
> works. Again, if you're seeing a huge CPU hit, my guess is that it's from
> PBO. Now if you have a bit of free time for coding, I've got a great idea
> there for a huge performance win. :-)
>
> -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