|
Method mf_compnt belongs to class
Notation, the core class for managing
a CurlySMILES notation. A call to
mf_compnt returns the
molecular formula for a component of the
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_compnt(iCompnt)
|
|
Argument:
|
iCompnt (index of component);
type: integer
|
|
Return:
|
sMF, a string
with the molecular formula of the iCompnt-th
component or None, if component notation
does not evaluate to a molecular formula.
|
|
Example:
|
Cobalt(II) nitrate hexahydrate,
Co(NO3)2·H2O |
| |
sNotation = "[Co+2].[O-]N(=O)=O{2}.O{6}"
|
| |
| iCompnt | sMF |
| 1 | Co(2+) |
| 2 | NO3(1-) |
| 3 | NO3(1-) |
| 4 | H2O |
| 5 | H2O |
| 6 | H2O |
| 7 | H2O |
| 8 | H2O |
| 9 | H2O |
|
|
|