Hi Aziz,

What I could see that on my computer with the given SMILES that it takes 
about 1.5 minutes to run in Eclipse, so a lot shorter than 15 minutes.
The main bottleneck seems to be this bit:

/*processing for which bonds which are not in resonance*/
for(int number = 0; number < ac.getBondCount() ; number++){
        IAtomContainer aa = setAntiFlags(container,ac, number,true);
        if(aa != null){
                IMoleculeSet ab = gR2.getStructures((IMolecule) aa);

For each bond, setAntiFlags is called and StructureResonanceGenerator's 
method getStructures is called. Each call can take seconds, and that 
adds up to more than a minute and a half.

I can't be of much more help, perhaps Miguel Rojas would have some 
pointers how to possibly speed things up.

cheers,
Mark



> Dear Mark,
> 
>  > Could you send the source code that runs for 15 minutes to the list? It
>  > should be relatively easy to debug it, to find out where things stall.
> 
> Thank you for lookng at this issue. here is the  jython code I am using 
> to calculate partial charge for an atom.
> 
> 
> sp = smilesParser()   
> 
> smi = 
> /"COC1=CC=C(c...@h]2n(C)C(=O)[...@h](C)NC(=O)[C@@H](C)NC(=O)[...@h]3cc4=cc=c(O)C(OC5=CC=C(C=C5)C(O)[...@h](N(C)C(=O)[...@h](C)NC2=O)C(=O)N3C)=C4)C=C1"/
> 
> mol = sp.parseSimles(smi)
> 
> mol = reader.next()
> 
> desc = PartialTChargePEOEDescriptor ()
> 
> atoms = mol.atoms().iterator()
> 
> firstAtom = atoms.next()
> 
> pcharge = desc.calculate(firstAtom, mol).getValue().doubleValue()
> 
>  
> 
>  
> 
> I also went through the code of of the one of the java object that is 
> instanced by PartialTChargePEOEDescriptor  and one of its methods that 
> is called to calculate the partial charges, I found out some bizare code 
> I paste here:
> 
>  
> 
> public class GasteigerMarsiliPartialCharges implements IChargeCalculator {
> 
> …
> 
> public IAtomContainer 
> assignGasteigerMarsiliSigmaPartialCharges(IAtomContainer ac, boolean 
> setCharge) throws Exception {
> 
> ….
> 
>         double[] q_old = new double[ac.getAtomCount()];
> 
>         for(int i = 0 ; i < q_old.length ; i++)
> 
>             q_old[*0*] = 20.0; ////// STRANGE
> 
>                 ….
> 
> the index should "i" not "0" if I understand this part of the code.
> 
> 
> thanks ,
> 
> 
> AYASRI
> 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to