posts - 431,  comments - 344,  trackbacks - 0
公告
 Don't Repeat Yourself
座右铭:you can lose your money, you can spent all of it, and if you work hard you get it all back. But if you waste your time, you're never gonna get it back.
公告本博客在此声明部分文章为转摘,只做资料收集使用。


微信: szhourui
QQ:109450684
Email
lsi.zhourui@gmail.com
<2011年4月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

留言簿(15)

随笔分类(1019)

文章分类(3)

文章档案(21)

收藏夹

Link

好友博客

最新随笔

搜索

  •  

积分与排名

  • 积分 - 855923
  • 排名 - 47

最新评论

阅读排行榜

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 周锐 阅读(596) 评论(0)  编辑  收藏 所属分类: ChemistryJava

只有注册用户登录后才能发表评论。


网站导航: