Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Converts a SMILES string to a 2D picture
import sys
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from rdkit.sping import PIL
filename = sys.argv[1]
file = open(filename, "r+")
for line in file:
words = line.split()
name = words[0]
smiles = words[1]
m = Chem.MolFromSmiles(smiles)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment