On Wednesday 02 May 2007, sushil ronghe wrote:
> I have builded the jar in netbeans.
OK, foreach (x:problems):
x=1,3:put the jar with the Jama classes in classpath (it's missing)
x=2,4:see below
> then i am using it in my program my code looks like this
<snip>
> for(int i=0;i<cll.length;i++){
> nameofvalue = cll[i].split("\\.")[0 <file://.%22)[0/>];
Add here this:
try {
> IMolecularDescriptor MD =
> (IMolecularDescriptor)Class.forName("
> org.openscience.cdk.qsar." +
>
> "descriptors."+nameofpackage+"."+nameofvalue).newInstance();
>
> IDescriptorResult DD=MD.calculate(molecule).getValue();
> System.out.println(nameofvalue);
> if (DD instanceof DoubleResult){
> System.out.println(((DoubleResult)DD).doubleValue());
> }
> if(DD instanceof IntegerResult){
> System.out.println(((IntegerResult)DD).intValue());
> }
> if(DD instanceof BooleanResult){
> System.out.println(((BooleanResult)DD).booleanValue());
> }
> if(DD instanceof IntegerArrayResult){
> IntegerArrayResult IAR = (IntegerArrayResult)DD;
> for(int j=0;j<IAR.size();j++){
> System.out.print(IAR.get(j));
> }
> System.out.println("--------");
> }
> if(DD instanceof DoubleArrayResult){
> DoubleArrayResult DAR = (DoubleArrayResult)DD;
> for(int k=0;k<DAR.size();k++){
> System.out.print(DAR.get(k));
> }
> System.out.println("--------");
> }
> }
} catch (Exception ex) {
System.out.println("Could not load the descriptor: " + nameofvalue);
}
> break;
> }
> catch(Exception ex){
> System.out.println("error in the claculation");
> }
> }
> }
That should cover problem 1-4... not sure about 5... will file that as bug
report and look into that later.
Egon
--
[EMAIL PROTECTED]
Blog: http://chem-bla-ics.blogspot.com/
GPG: 1024D/D6336BA6
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user