📜  rdkit mol 到网格公共核心对齐 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:21.889000             🧑  作者: Mango

代码示例1
>>> p = Chem.MolFromSmiles('[nH]1cnc2cncnc21')
>>> subms = [x for x in ms if x.HasSubstructMatch(p)]
>>> len(subms)
14
>>> AllChem.Compute2DCoords(p)
0
>>> for m in subms:
...   _ = AllChem.GenerateDepictionMatching2DStructure(m,p)
>>> img=Draw.MolsToGridImage(subms,molsPerRow=4,subImgSize=(200,200),legends=[x.GetProp("_Name") for x in subms])    
>>> img.save('images/cdk2_molgrid.aligned.o.png')