Now I’m evaluating OETK.
I think all toolkits are very useful for drug design.
OEMedChem TK is new tool for Chemoinformatics.
The tool kit implemented MMP Analysis engine.
I used the TK and draw the transform via Python notebook.
OETK can integrate IPython notebook, so I can visualise molecule on the fly.
I couldn’t understand details of option.
So, I could only draw very simple smiles….
Upload code snippet to github
https://github.com/iwatobipen/mishimasyk/blob/master/OE_MMP.ipynb
Hmm… It worked.
I’ll study more and more about the TK ASAP…(there are no more time for evaluation.)
# coding: utf-8 from __future__ import print_function from openeye import oechem from openeye import oemedchem mol = oechem.OEGraphMol() ifs = oechem.oemolistream() ofs = oechem.oemolostream() ifs.SetFormat(oechem.OEFormat_SDF) ifs.open('cdk2.sdf') ifs.rewind() mols =[ ] for m in ifs.GetOEGraphMols(): newmol = oechem.OEGraphMol(m) mols.append(newmol) print(len(mols)) opts = oemedchem.OEMatchedPairAnalyzerOptions() mmp = oemedchem.OEMatchedPairAnalyzer( opts ) record = 0 for m in mols: record += 1 status = mmp.AddMol(m, record) print(mmp.NumMatchedPairs()) chemctxt = oemedchem.OEMatchedPairContext_AllBonds extractMode = (oemedchem.OEMatchedPairTransformExtractMode_NoSMARTS+ oemedchem.OEMatchedPairTransformExtractMode_AddAttachmentPts+ oemedchem.OEMatchedPairTransformExtractMode_AddMCSCorrespondence) transforms = [] for mmptransform in oemedchem.OEMatchedPairGetTransforms(mmp, chemctxt, extractMode): transforms.append(mmptransform) tf1=transforms[0] from openeye import oedepict from IPython.display import Image print(tf1.GetTransform()) w,h=400,300 image = oedepict.OEImage(w,h) qmol = oechem.OEGraphMol() oechem.OEParseSmiles(qmol,tf1.GetTransform()) oedepict.OEPrepareDepiction(qmol) oedepict.OERenderMolecule(image,qmol) Image(data=oedepict.OEWriteImageToString('png',img))