Hi Miriame, I have had the same problems and profiling my project showed that it is the saturate() methode of the class ValencyChecker (called by parseSmiles()) that needed most of the time. The problem here are the lower case letters of hetero atoms (s, n,o) in aromatic ring systems. Their hybridisation is set to sp2 by default and saturate() tries to add hydrogens to fill up valencies. This seems to consume a lot of time in some cases. This is at least my experience. It is not the size of molecules but the lower case letters of hetero-atoms (s, n,o) in aromatic ring systems. Parsing big molecules without lower case letters is still fast. One way to fix it or at least to verify that this is the problem might be using the notation C1=CC=CC=C1 instead of c1cccc1.
Your second question: There is a class named InterruptableSmilesParser. You can pass a max. time cutoff (in ms) for smiles parsing as a argument of constructor. I think this is what you are searching for. I hope I was able to help. Best regards Markus allouche miriame schrieb: > Hi, > I am using CDK 1.0 to visualize SMILES structures. I have noticed that > SMILES parsing can be very slow, (it can take close one minute) when big > structures are concerned. > This is the call to IMolecule im = sp.parseSmiles(smilesString); which is > time consuming. > Here are a few examples of SMILES structures that take about 20 seconds each > to be parsed: > > 1/ > NC(=[NH2+])c1ccc(O)c(\C=C\CN(C(=O)CCC(=O)O)c2ccc(OC3CCN(CC(=O)O)CC3)c(c2)C(F)(F)F)c1 > 2/ > COc1ccc(NS(=O)(=O)C(F)(F)F)cc1Oc2c(F)c(Oc3cccc(c3)C4=NCCN4C)nc(Oc5cc(ccc5O)C(=[NH2+])N)c2F > 3/ > COC(=O)[EMAIL > PROTECTED](Cc1cccc(c1)C(=[NH2+])N)[C@@H](CC(C)C)NC(=O)c2ccc(cc2)c3cccc(CN)c3 > 4/ > CCOC(=O)c1cc(Oc2c(F)c(Oc3cccc(c3)C4=NCCN4C)nc(Oc5cc(ccc5O)C(=[NH2+])N)c2F)cc(c1)C(=O)O > 5/ CN(C)C(=O)c1cccc(Oc2nc(Oc3cc(ccc3O)C(=[NH2+])N)c4nc(C)n(Cc5ccccc5)c4n2)c1 > 6/ Cc1cc(C(=O)Nc2ccc(cc2)c3ccccc3F)n(n1)c4cccc(c4)C(=[NH2+])N > > Is that a known issue?Is it possible to set like a timeout when parsing is > too long? > here are other informations that can be useful : > Hardware configuration : Windows Vista Intel core 2CPU 2Ghz 3000Mo RAM (same > pb with XP) > JDK 1.5.0_11 > CDK 1.0 > > thanks a lot for your help. > Miriame ALLOUCHE > > _________________________________________________________________ > Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/ > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Cdk-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cdk-user > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

