rdkit mol 属性操作
源码
https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/PropertyMol.py
get set has 都有,基本也就可以向mol对象添加新属性了,比如图谱之类
>>> pm = PropertyMol(m)
>>> pm.GetProp('_Name')
'benzene.mol'
>>> pm.SetProp('MyProp','foo')
>>> pm.HasProp('MyProp')
>>> pm2 = pickle.loads(pickle.dumps(pm)) >>> Chem.MolToSmiles(pm2) 'c1ccccc1' >>> pm2.GetProp('_Name') 'benzene.mol' >>> pm2.HasProp('MyProp') 1 >>> pm2.GetProp('MyProp') 'foo' >>> pm2.HasProp('MissingProp') 0
—————————————