I've hit a strange problem with org.openscience.cdk.silent.Atom in that
several methods just throw a UnsupportedOperationException. This doesn't
make much sense to me.
I'm reading a molfile which generates that type of Atom, but if lots of its
methods are unsupported then that molecule isn't much use. What am I
missing?
This is using CDK 2.9.
package org.squonk.cdk.depict;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.io.IChemObjectReader;
import org.openscience.cdk.io.MDLV2000Reader;
import org.openscience.cdk.silent.AtomContainer;
import java.io.FileInputStream;
public class MolTest {
public static void main(String[] args) throws Exception {
MDLV2000Reader parser = new MDLV2000Reader(
new FileInputStream("../data/example.mol"),
IChemObjectReader.Mode.RELAXED);
IAtomContainer mol = parser.read(new AtomContainer());
IAtom atom = mol.getAtom(0);
Iterable<IBond> bonds = atom.bonds();
}
}
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user