RDKit(2023.09.1 )环系统模板

环境

  • Python 3.9
  • RDKit 2023.09.1

from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem import Draw
from rdkit.Chem.Draw import IPythonConsole

IPythonConsole.ipython_useSVG=True
%matplotlib inline
import rdkit
print(rdkit.__version__)
2023.09.1

mol = Chem.MolFromSmiles("NC(CCC1CCC2C(C1)C1CCN2NN1)CC(=O)CCC1=CCCC2CCCCC2CCCCC2CCCC(CCCCCCC1)C2")
mol_with_templates = Chem.Mol(mol)

# use rdkit native coordinate generation
rdDepictor.SetPreferCoordGen(False)
rdDepictor.Compute2DCoords(mol)

# the first time you call this, 
rdDepictor.Compute2DCoords(mol_with_templates, useRingTemplates=True)

Draw.MolsToGridImage([mol, mol_with_templates], subImgSize=(400,400))

你可能感兴趣的:(RDKit,化学信息学与AI,python,RDKit,化学信息学)