diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/scripts/draw_mol.py	Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,25 @@
+from rdkit import Chem
+from rdkit.Chem import Draw
+
+import sys
+
+
+if(len(sys.argv) < 3):
+    print("Use: ", str(sys.argv[0]), " <chain in smiles> <output png>")
+    sys.exit(-1)
+
+chainfile = str(sys.argv[1])
+output = str(sys.argv[2])
+
+print(chainfile)
+print(output)
+
+with open(chainfile) as f:
+    chain = f.readline()
+
+
+mol = Chem.MolFromSmiles(chain)
+
+Draw.MolToFile(mol, output)
+
+