Examples of InChIToStructure


Examples of org.openscience.cdk.inchi.InChIToStructure

public final class JNIInChIHandler implements InChIHandler {

    @Override public IAtomContainer parse(InChI inchi) throws CDKException {

        InChIGeneratorFactory igf = InChIGeneratorFactory.getInstance();
        InChIToStructure its = igf.getInChIToStructure(inchi.getInChI(),
                                                       DefaultChemObjectBuilder.getInstance());

        if (its.getReturnStatus() != INCHI_RET.OKAY && its.getReturnStatus() != INCHI_RET.WARNING)
            throw new CDKException("Could not parse InChI - " + its.getMessage());

        return its.getAtomContainer();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.