PS. just to make sure I'm not reading some stale garbage from the heap:

>>> for i in (9, 8, 7, 6, 5, 4) :
...     mol = pybel.readstring("smi","C(=O)=O")
...     mol.OBMol.BeginModify()
...     for atom in mol.atoms :
...             if atom.OBAtom.IsCarbon() : atom.OBAtom.SetIsotope( i )
...     mol.OBMol.EndModify()
...     print i, ":", mol.molwt
...     del mol
...
9 : 41.0298367
8 : 40.036475
7 : 31.9988
6 : 31.9988
5 : 31.9988
4 : 31.9988
>>>

And with the same code:

21 : 53.04814
22 : 54.056
23 : 31.9988
24 : 31.9988

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to