Success! I have gotten it all to work. Thanks to Rajarshi and Egon for
their suggestions. I will update the web page as soon as possible.

Move everything to Java 1.5 (aka 5.0):
$ java -version
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)

$ echo $JAVA_HOME
/home/no228/Tools/Java/jdk1.5.0_03

$ jython
Jython 2.2a1 on java1.5.0_03 (JIT: null)

Compile the latest CDK from CVS using Java 1.5 and add to the CLASSPATH:
$ echo $CLASSPATH
.:/home/no228/Tools/CDK/cdk-cvs-java15.jar

Update pycalculateBCUT.py to reflect recent changes in the CDK API:
"""
from org.openscience.cdk import *
from org.openscience.cdk.qsar.descriptors.molecular import
BCUTDescriptor
from org.openscience.cdk.io.iterator import IteratingMDLReader

from java.io import InputStreamReader

import sys

try:
    sdfile=open(sys.argv[1],"r")
except (IOError,IndexError):
    print "You need to give the name of an existing .sd file"
    sys.exit(1)

bcut=BCUTDescriptor()
bcut.setParameters([1,1])
for mol in IteratingMDLReader( InputStreamReader(sdfile)):
    BCUTvalue=bcut.calculate(mol).getValue()
    # Create list of values in BCUTvalue
    BCUTlist=[str(BCUTvalue.get(i)) for i in range(6)]
    # Concatenate BCUTlist around tabs
    print "\t".join(BCUTlist)
"""

Regards,
Noel



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Cdk-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to