Home >
Community >
Open Source SDF (Chemical Table File) Parser in any language
Upvote
28
Downvote
+ Software
+ Cheminformatics
Posted by
Karen Constable
Open Source SDF (Chemical Table File) Parser in any language
The free, open-source RDKit chemoinformatics software can read .sdf files. This software is most often used via it's Python API.
You can learn more about RDKit at the project's home page.
I recommend installing it via conda. (If you use python regularly but don't use conda for controlling environments and package distribution, you probably should.) The installation command is conda install -c https://conda.anaconda.org/rdkit rdkit
.
The python code to parse an sdf file and write to a csv file is very simple.
import pandas as pd
from rdkit import Chem
from rdkit.Chem import PandasTools
my_sdf_file = '/Users/curt/Desktop/sdf-isothiocyanates.sdf'
frame = PandasTools.LoadSDF(my_sdf_file,
smilesName='SMILES',
molColName='Molecule',
includeFingerprints=False)
frame.to_csv('/Users/curt/Desktop/excel_isothiocyanates.csv')
The free, open-source RDKit chemoinformatics software can read .sdf files. This software is most often used via it's Python API.
You can learn more about RDKit at the project's home page.
I recommend installing it via conda. (If you use python regularly but don't use conda for controlling environments and package distribution, you probably should.) The installation command is conda install -c https://conda.anaconda.org/rdkit rdkit.
The python code to parse an sdf file and write to a csv file is very simple.
The .png below has some stand alone python that will read .sdf files and produce comma separated output. Its come out rather small but should still be readable. You can run the code from Atom on an apple mac or notepad++ on a pc.
The .png below has some stand alone python that will read .sdf files and produce comma separated output. Its come out rather small but should still be readable. You can run the code from Atom on an apple mac or notepad++ on a pc.
You can also have a look at Bioclipse, which mixes a graphical interface with scripting (JavaScript, Python, and Groovy):
I blogged about an example script for Bioclipse before, which looks like:
hmdbIndex = molTable.createSDFIndex( "/WikiPathways/hmdb.sdf");props = new java.util.HashSet();props.add("HMDB_ID");molTable.parseProperties(hmdbIndex, props);idIndex = new java.util.HashMap();molCount = hmdbIndex.getNumberOfMolecules();for (i=0; i
Bioclipse is developed by a team predominantly working on OS/X.
The free, open-source RDKit chemoinformatics software can read
.sdffiles. This software is most often used via it's Python API.You can learn more about RDKit at the project's home page.
I recommend installing it via
conda. (If you use python regularly but don't use conda for controlling environments and package distribution, you probably should.) The installation command isconda install -c https://conda.anaconda.org/rdkit rdkit.The python code to parse an
sdffile and write to acsvfile is very simple.The free, open-source RDKit chemoinformatics software can read
.sdffiles. This software is most often used via it's Python API.You can learn more about RDKit at the project's home page.
I recommend installing it via
conda. (If you use python regularly but don't use conda for controlling environments and package distribution, you probably should.) The installation command isconda install -c https://conda.anaconda.org/rdkit rdkit.The python code to parse an
sdffile and write to acsvfile is very simple.More
VOTE
The .png below has some stand alone python that will read .sdf files and produce comma separated output. Its come out rather small but should still be readable. You can run the code from Atom on an apple mac or notepad++ on a pc.
The .png below has some stand alone python that will read .sdf files and produce comma separated output. Its come out rather small but should still be readable. You can run the code from Atom on an apple mac or notepad++ on a pc.
More
VOTE
You can also have a look at Bioclipse, which mixes a graphical interface with scripting (JavaScript, Python, and Groovy):
I blogged about an example script for Bioclipse before, which looks like:
Bioclipse is developed by a team predominantly working on OS/X.
You can also have a look at Bioclipse, which mixes a graphical interface with scripting (JavaScript, Python, and Groovy):
I blogged about an example script for Bioclipse before, which looks like:
Bioclipse is developed by a team predominantly working on OS/X.
More
VOTE