use of org.openscience.cdk.inchi.InChIToStructure in project MassBank-web by MassBank.
the class StructureToSvgStringGenerator method structureFromInChI.
public static IAtomContainer structureFromInChI(String inchi) {
IAtomContainer mol = null;
try {
// get atom container
InChIGeneratorFactory inchiFactory = InChIGeneratorFactory.getInstance();
InChIToStructure inchi2structure = inchiFactory.getInChIToStructure(inchi, DefaultChemObjectBuilder.getInstance());
mol = inchi2structure.getAtomContainer();
} catch (CDKException e) {
System.out.println("Warning: " + e.getLocalizedMessage());
}
return mol;
}
Aggregations