cheminformatics

How to create a .cdx file from InChI with ChemDraw/Python?

我是研究僧i 提交于 2020-01-05 04:17:18
问题 I would like to create a ChemDraw .cdx file from an InChI with Python. This answer gives a solution for cdx --> InChI . The minimal example below cdx_to_inchi works fine, but I could not figure out how I can get inchi_to_cdx to work. import comtypes.client as w32 def cdx_to_inchi(cdx): ChemDraw = w32.CreateObject("ChemDraw.Application") ChemDraw.Visible = False Compound = ChemDraw.Documents.Open(cdx) # opens existing file inchi = Compound.Objects.Data("chemical/x-inchi") print(inchi) ChemDraw

SMILES from graph

你离开我真会死。 提交于 2019-12-18 04:54:14
问题 Is there a method or package that converts a graph (or adjacency matrix) into a SMILES string? For instance, I know the atoms are [6 6 7 6 6 6 6 8] ([C C N C C C C O]) , and the adjacency matrix is [[ 0., 1., 0., 0., 0., 0., 0., 0.], [ 1., 0., 2., 0., 0., 0., 0., 1.], [ 0., 2., 0., 1., 0., 0., 0., 0.], [ 0., 0., 1., 0., 1., 0., 0., 0.], [ 0., 0., 0., 1., 0., 1., 0., 0.], [ 0., 0., 0., 0., 1., 0., 1., 1.], [ 0., 0., 0., 0., 0., 1., 0., 0.], [ 0., 1., 0., 0., 0., 1., 0., 0.]] I need some

Data Structure of the Periodic Table of Elements

隐身守侯 提交于 2019-12-01 12:13:48
My goal is to use the periodic table of elements (or a list) to get information about a specific element in Java. I want to search it by atomic number and symbol (but that conversion should be simple). I found that information in this JQuery plugin . But it is stored as a JSON file. It seems like it would be most efficient to hardcode the information (since it doesn't change too often and due to performance reasons), but how do I convert JSON to a hardcoded enum ? Since: the information about elements is totally static each elemental symbol is alphanumeric the discovery of new elements is both

Data Structure of the Periodic Table of Elements

Deadly 提交于 2019-12-01 11:55:16
问题 My goal is to use the periodic table of elements (or a list) to get information about a specific element in Java. I want to search it by atomic number and symbol (but that conversion should be simple). I found that information in this JQuery plugin. But it is stored as a JSON file. It seems like it would be most efficient to hardcode the information (since it doesn't change too often and due to performance reasons), but how do I convert JSON to a hardcoded enum ? 回答1: Since: the information

SMILES from graph

ε祈祈猫儿з 提交于 2019-11-30 20:48:41
Is there a method or package that converts a graph (or adjacency matrix) into a SMILES string? For instance, I know the atoms are [6 6 7 6 6 6 6 8] ([C C N C C C C O]) , and the adjacency matrix is [[ 0., 1., 0., 0., 0., 0., 0., 0.], [ 1., 0., 2., 0., 0., 0., 0., 1.], [ 0., 2., 0., 1., 0., 0., 0., 0.], [ 0., 0., 1., 0., 1., 0., 0., 0.], [ 0., 0., 0., 1., 0., 1., 0., 0.], [ 0., 0., 0., 0., 1., 0., 1., 1.], [ 0., 0., 0., 0., 0., 1., 0., 0.], [ 0., 1., 0., 0., 0., 1., 0., 0.]] I need some function to output 'CC1=NCCC(C)O1' . It also works if some function can output the corresponding "mol" object