<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd"> <html> <head> <title>Class: formula_dict</title> </head> <body bgcolor="#ffffff"> <p><i><a href="../../../../index.html">Table of Contents</a></i></p> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th rowspan="2" valign="top" align="left" width="10%" bgcolor="#88bbee"><font color="#000000">Class: formula_dict</font> </th> <th bgcolor="#88bbee" width="90%" align="right"><font color="#000000">../bkchem/oasa/oasa/periodic_table.py</font> </th> </tr> <tr> <td> <p>special dict that automatically converts itself to human readable formula on str(). Implements += for convenient formula concatenation</p> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="Base Classes">Base Classes</a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000"> </font> </th> </tr> <tr> <td> dict<br> </td></tr> </table> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="Methods">Methods</a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000"> </font> </th> </tr> <tr> <td> <table border="0" cellspacing="2" cellpadding="2" width="100%"> <tr> <td align="LEFT" valign="TOP"> <a href="#__add__">__add__</a><br> <a href="#__iadd__">__iadd__</a><br> <a href="#__init__">__init__</a><br> <a href="#__mul__">__mul__</a><br> <a href="#__str__">__str__</a><br> <a href="#get_element_fraction">get_element_fraction</a><br> <a href="#get_html_repr_as_string">get_html_repr_as_string</a><br> </td> <td align="LEFT" valign="TOP"> <a href="#get_molecular_weight">get_molecular_weight</a><br> <a href="#is_saturated_alkyl_chain">is_saturated_alkyl_chain</a><br> <a href="#keys_in_order">keys_in_order</a><br> <a href="#read_formula_string">read_formula_string</a><br> <a href="#sorted_keys">sorted_keys</a><br> <a href="#to_tuple">to_tuple</a><br> </td> </tr> </table> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="__add__"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">__add__ </font> </th> </tr> <tr> <td> <font color="#000088"><pre> __add__ ( self, other ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="__iadd__"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">__iadd__ </font> </th> </tr> <tr> <td> <font color="#000088"><pre> __iadd__ ( self, other ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="__init__"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">__init__ </font> </th> </tr> <tr> <td> <font color="#000088"><pre> __init__ ( self, form=None ) </pre></font> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="Exceptions">Exceptions</a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000"> </font> </th> </tr> <tr> <td> ValueError, "some of the dictionary entries are not valid for formula_dict (%s => %s)" %(str( key ), str( val ) )<br> </td></tr> </table> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="__mul__"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">__mul__ </font> </th> </tr> <tr> <td> <font color="#000088"><pre> __mul__ ( self, other ) </pre></font> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="Exceptions">Exceptions</a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000"> </font> </th> </tr> <tr> <td> TypeError, "formula_dict can be only multiplied by an integer"<br> </td></tr> </table> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="__str__"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">__str__ </font> </th> </tr> <tr> <td> <font color="#000088"><pre> __str__ ( self, reverse=0 ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="get_element_fraction"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">get_element_fraction </font> </th> </tr> <tr> <td> <font color="#000088"><pre> get_element_fraction ( self, element ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="get_html_repr_as_string"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">get_html_repr_as_string </font> </th> </tr> <tr> <td> <font color="#000088"><pre> get_html_repr_as_string ( self, outer_element=None, reverse=0, ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="get_molecular_weight"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">get_molecular_weight </font> </th> </tr> <tr> <td> <font color="#000088"><pre> get_molecular_weight ( self ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="is_saturated_alkyl_chain"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">is_saturated_alkyl_chain </font> </th> </tr> <tr> <td> <font color="#000088"><pre> is_saturated_alkyl_chain ( self ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="keys_in_order"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">keys_in_order </font> </th> </tr> <tr> <td> <font color="#000088"><pre> keys_in_order ( self ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="read_formula_string"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">read_formula_string </font> </th> </tr> <tr> <td> <font color="#000088"><pre> read_formula_string ( self, form ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="sorted_keys"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">sorted_keys </font> </th> </tr> <tr> <td> <font color="#000088"><pre> sorted_keys ( self ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="to_tuple"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">to_tuple </font> </th> </tr> <tr> <td> <font color="#000088"><pre> to_tuple ( self ) </pre></font> </td></tr> </td></tr> </table> </td> </tr> </table> <hr> <p><i><a href="../../../../index.html">Table of Contents</a></i></p> <font size="-2"><i>This document was automatically generated on Tue Dec 12 13:46:43 2006 by <a href="http://happydoc.sourceforge.net">HappyDoc</a> version 2.1</i></font> </body> </html>