PourPy.common ============= .. py:module:: PourPy.common Classes ------- .. autoapisummary:: PourPy.common.State PourPy.common.Constants PourPy.common.Defaults Module Contents --------------- .. py:class:: State(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access:: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: aqueous :value: 'aq' .. py:attribute:: solid :value: 's' .. py:attribute:: gaseous :value: 'g' .. py:attribute:: liquid :value: 'l' .. py:attribute:: electron :value: 'e' .. py:class:: Constants Bases: :py:obj:`float`, :py:obj:`enum.Flag` Convert a string or number to a floating point number, if possible. .. py:attribute:: GAS :value: 8.31446262 .. py:attribute:: FARADAY :value: 96485.3321 .. py:attribute:: STANDARD_TEMPERATURE :value: 298.15 .. py:attribute:: STANDARD_PRESSURE :value: 1.0 .. py:class:: Defaults Bases: :py:obj:`object` .. py:attribute:: activity :value: 1.0 .. py:attribute:: maximum_electrode_potential :value: 2.0 .. py:attribute:: minimum_electrode_potenital :value: -2.0 .. py:attribute:: maximum_pH_value :value: 16.0 .. py:attribute:: minimum_pH_value :value: 0.0 .. py:attribute:: pressure :value: 1.0 .. py:attribute:: temperature :value: 298.15 .. py:attribute:: reference_electrode_abbreviation :value: 'SHE' .. py:attribute:: reference_potential_difference :value: 0.0 .. py:attribute:: reference_electrodes