Hi ,
I am trying to write a java class that calculates some of the
properties listed by the obprop utility.

I can easily get the molecular weight , number of heavy atoms and
number of rotatable bonds.
However I was wondering how to get the number of stereocenters from a
0D smiles molecule , the number of rings , the logP and PSA.

I am quite new to SWIG ( and java too) , but the eclipse IDE does not
seem to pick up the Stereo classes. Any pointers on how to code the
NumStereoCenters, NumRings, the logP and PSA.

Thanks for your help
Hari


My very rudimentary java code is pasted here.

import org.openbabel.*;

public class CalcDescriptor {
        public static String testString = new 
String("CC(=O)OC1=CC=CC=C1C(=O)O");
        public static void main(String[] args){
                System.loadLibrary("openbabel_java");
                OBMol mymol = new org.openbabel.OBMol();
                OBConversion conv = new OBConversion();
                conv.SetInFormat("smiles");
                conv.ReadString(mymol, testString);
                System.out.println("Molecular Weight:" + mymol.GetMolWt());     
                System.out.println("Number of heavy Atoms:" + 
mymol.NumHvyAtoms());
                System.out.println("Number of rotatable bonds:" + 
mymol.NumRotors());
                
        }

}

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to