I have different sets of molecules and I would like to compute the principal moment o inertia for the molecules of each set. I am looking for a way to do it easy and fast.
Usually, to manage molecules and compute different descriptors I program my own scripts with python and pybel but now, I have no idea how to do it.
Matteo Floris
[ Editor ]
Hi, there is a CDK implementation of principal moment of inertia descriptor:
org.openscience.cdk.qsar.descriptors.molecular.MomentOfInertiaDescriptor
This is a piece of code (any 3D input file):
MomentOfInertiaDescriptor descriptor = new MomentOfInertiaDescriptor();
IMolecule m = null;
IteratingMDLReader reader = new IteratingMDLReader(
new FileReader(new File( "MMsInc_STRUCTURES.sdf)),
NoNotificationChemObjectBuilder.getInstance() );
while (reader.hasNext()) {
m = (IMolecule) reader.next();
DoubleArrayResult retval = (DoubleArrayResult) descriptor.calculate(m).getValue();
System.out.println( m.getProperty("cdk:Title") + " " + retval);
}