special dict that automatically converts itself to human readable
formula on str(). Implements += for convenient formula concatenation
Methods
|
|
|
|
__add__
|
__add__ ( self, other )
|
|
__iadd__
|
__iadd__ ( self, other )
|
|
__init__
|
__init__ ( self, form=None )
Exceptions
|
|
ValueError, "some of the dictionary entries are not valid for formula_dict (%s => %s)" %(str( key ), str( val ) )
|
|
|
__mul__
|
__mul__ ( self, other )
Exceptions
|
|
TypeError, "formula_dict can be only multiplied by an integer"
|
|
|
__str__
|
__str__ ( self, reverse=0 )
|
|
get_element_fraction
|
get_element_fraction ( self, element )
|
|
get_html_repr_as_string
|
get_html_repr_as_string (
self,
outer_element=None,
reverse=0,
)
|
|
get_molecular_weight
|
get_molecular_weight ( self )
|
|
is_saturated_alkyl_chain
|
is_saturated_alkyl_chain ( self )
|
|
keys_in_order
|
keys_in_order ( self )
|
|
read_formula_string
|
read_formula_string ( self, form )
|
|
sorted_keys
|
sorted_keys ( self )
|
|
to_tuple
|
to_tuple ( self )
|
|