comparison PLIDflow/scripts/draw_mol.py @ 6:795e11fac81b draft default tip

Included new tools for standardization
author bitlab
date Wed, 22 Apr 2020 06:12:00 -0400
parents
children
comparison
equal deleted inserted replaced
5:97f12f7cc852 6:795e11fac81b
1 from rdkit import Chem
2 from rdkit.Chem import Draw
3
4 import sys
5
6
7 if(len(sys.argv) < 3):
8 print("Use: ", str(sys.argv[0]), " <chain in smiles> <output png>")
9 sys.exit(-1)
10
11 chainfile = str(sys.argv[1])
12 output = str(sys.argv[2])
13
14 print(chainfile)
15 print(output)
16
17 with open(chainfile) as f:
18 chain = f.readline()
19
20
21 mol = Chem.MolFromSmiles(chain)
22
23 Draw.MolToFile(mol, output)
24
25