希望在显示分子的时候同时看到原子序号,可以采用下面代码,来源为这里:https://www.rdkit.org/docs/Cookbook.html#drawing-molecules-jupyter
def mol_with_atom_index(mol):
for atom in mol.GetAtoms():
atom.SetAtomMapNum(atom.GetIdx())
return mol
smi = 'NC(=O)C1CN(Cc2nc[nH]n2)C1'
mol = Chem.MolFromSmiles(smi)
mol_with_atom_index(mol)


3827

被折叠的 条评论
为什么被折叠?



