Hi Zheng,

Works fine for me. I think your problem is you have old version of CDK on the 
class path. The method that is throwing the exception doesn’t have an array in 
it, but it did in 1.4.x. Do you have another version on your class path? It may 
be there indirectly, i.e. from padel (which used 1.4.x)?

How are you including dependencies?

Also some pointers..

>       IteratingSDFReader sdfr = new IteratingSDFReader(new 
> FileReader("/Users/johnmay/Downloads/C.sdf"),
>                                                          
> SilentChemObjectBuilder.getInstance()); // <- use Silent rather than Default
> 
>         // immutable object can be created outside of loop and safely reuse
>         Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdk(),
>                                                   Cycles.all()); 
>         
>         while (sdfr.hasNext()) {
>             IAtomContainer container = sdfr.next();
>             
> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(container);
>             try {
>               // may return false, but we still want descriptors right?
>                 boolean isArom = aromaticity.apply(container); 
>             } catch (CDKException e) {
>                 // ...
>             }
>         }
>         
>         sdfr.close();


Cheers,
J

On Aug 12, 2014, at 9:13 PM, Zheng Shi <zs...@ualberta.ca> wrote:

> Hi, John,
> 
> I just want to perceive aromaticity for the molecules in a data. The data 
> represents the benzene ring as sing/double bond pairs like below. So I just 
> wonder how I can perceive the aromaticity in such representation. I use the 
> aromaticity class like below, and keeps getting the exceptions. I don't know 
> why. Then how to use the aromaticity class to get the aromaticity property 
> for data like this. Thanks. 
> <example data.JPG><exception error.JPG>

------------------------------------------------------------------------------
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to