Dear Greg,

Thanks.

As for
In [19]: frags = Chem.GetMolFrags(nm,asMols=True)
In [20]: [AllChem.CalcMolFormula(x) for x in frags]
Out[20]: ['C4H5N3O', 'C6H6']

Is it possible to directly get 'C6H5+' instead of 'C6H6'?

As for the difference between ExactMolWt() and MolWt(). The confusion is
from the following case:

>>>[Chem.MolToSmiles(x) for x in frags]
['Cc1nncc(O)n1', 'c1ccccc1']

>>> Descriptors.MolWt(Chem.MolFromSmiles('Cc1nncc(O)n1'))
111.10399999999998
>>> Descriptors.MolWt(Chem.MolFromSmiles('c1ccccc1'))
78.11399999999999
>>> [Descriptors.ExactMolWt(x) for x in frags]
[111.04326178, 78.046950192]

By far, every thing is perfect.

But if I use

>>>[Descriptors.MolWt(x) for x in frags]
[5.04, 6.048]

It looks I can get correct mass by MolWt() if I transfer mol to Smiles
format, and transfer Smiles format back to mol. However, if I directly
apply MolWt() on the original mol, I got weird results.

Yingfeng
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to