CurlySMILES class Notation: method mf_total

Method mf_total belongs to class Notation, the core class for managing a CurlySMILES notation. A call to mf_total returns the brutto molecular formula derived from all components of a CurlySMILES notation. The formula format is based on the Hill convention, writing C first, H second, and then all other chemical elements in alphabetical order of their atomic symbols. A stoichiometric integer, if greater than 1, follows the symbol. A cation or anion formula, ends with an appended charge notation, (n+) or (n-), respectively, where n > 0.

Module file: csm_notation.py
Method: mf_total()
Argument: no argument
Return: sMF, a string with the brutto molecular formula or None, if any one of the components does not evalaute to a molecular formula
Example 1: Cobalt(II) nitrate hexahydrate, Co(NO3)2·H2O
sNotation = "[Co+2].[O-]N(=O)=O{2}.O{6}"
Result: sMF = "H12CoN2O12"


Please, email comments and suggestions to axeleratio@yahoo.com
Custom Search