OPSIN - Open Parser for Systematic IUPAC Nomenclature (OPSIN) OPSIN takes an IUPAC chemical name and outputs a structure either as as CML (Chemical Markup Language), SMILES, or InChI. OPSIN's primary focus is organic chemical nomenclature,本来Opsin是OSCAR中的一个小模块。
下载地址: http://bitbucket.org/dan2097/opsin/
下面我们直接看代码吧,很简单!
package com.founder.opsin;
import nu.xom.Element;
import uk.ac.cam.ch.wwmm.opsin.NameToInchi;
import uk.ac.cam.ch.wwmm.opsin.NameToStructure;
import uk.ac.cam.ch.wwmm.opsin.NameToStructureConfig;
import uk.ac.cam.ch.wwmm.opsin.NameToStructureException;
import uk.ac.cam.ch.wwmm.opsin.OpsinResult;
public class OpsinTest {
/**
* @param args
* @author Zhou Rui
* @throws NameToStructureException
*/
public static void main(String[] args) throws NameToStructureException {
NameToStructure n2s = NameToStructure.getInstance();
NameToStructureConfig n2sconfig = new NameToStructureConfig();
OpsinResult result = n2s.parseChemicalName("acetonitrile", n2sconfig);
System.out.println(result.getStatus());
String smiles = result.getSmiles();
String inchi = NameToInchi.convertResultToInChI(result);
System.out.println(smiles);
System.out.println(inchi);
}
}
输出结果如下:
SUCCESS
C(C)#N
InChI=1/C2H3N/c1-2-3/h1H3
posted on 2011-04-19 21:52
周锐 阅读(555)
评论(0) 编辑 收藏 所属分类:
Chemistry 、
Java