Also useful for others..

---------- Forwarded message ----------
From: John M <john.wilkinson...@gmail.com>
Date: 29 April 2015 at 10:10
Subject: Re: [Cdk-user] Fwd: CDKPsearch speed
To: Rajarshi Guha <rajarshi.g...@gmail.com>


Great to hear - ​lots more to come of course.

Some points for an extra performance boost

1. Use the Silent objects as much as possible, it doesn't look like you're
using the listeners of the Default classes.
2. Aromaticity state is fixed once initialised and can be created outside
the loop and reused across multiple threads.
3. MDLV2000Reader can now be used as a lazy iterator akin to line reading
with BufferedReader. Note the 0,0,0,0 is important since each read will
know how many atoms as bonds there are we don't want to allocate then
reallocate the arrays.

MDLV2000Reader mdlr = new MDLV2000Reader(file);
IAtomContainer container;
while ((container = mdlr.read(new AtomContainer(0,0,0,0)) != null) {
 // do stuff
}

Also switching out the SMARTSQueryTool to the newer SmartsPattern in the
pcore matcher should also give a speed boost, the later will only run more
expensive ring size when the pattern needs it
<https://github.com/cdk/cdk/blob/master/tool/smarts/src/main/java/org/openscience/cdk/smiles/smarts/SmartsPattern.java#L105-L108>.
Will make that change tonight.

J
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to