Compound

Fill in a module description here

States


source

State

 State ()

Matter


source

Matter

 Matter ()

Initialize self. See help(type(self)) for accurate signature.

All properties that a compound has always being governed by some laws.

Laws


source

MassMoleRatio

 MassMoleRatio (compound)

Initialize self. See help(type(self)) for accurate signature.

Laws


source

Compound

 Compound (formula:str)

Initialize self. See help(type(self)) for accurate signature.

Type Details
formula str the chemical formula
Returns None
@patch
def set_amount(self: Compound, amount):
    pass
def set_mass():
    pass
class A:
    COMPOUNDS = [10, 20, 30]
    def __init__(self):
        self.compounds = [1, 2, 3]
class B(A):
    COMPOUNDS = [40, 50, 60]
    def __init__(self):
        super().__init__()
        self.compounds = [4, 5, 6]
    
    @classmethod
    def base(cls):
        return cls.__bases__
b = B()
b.base()
(__main__.A,)
A.__bases__
(object,)
B.__bases__
(__main__.A,)
b.__dict__
{'compounds': [4, 5, 6]}
H2O = Compound('H2O')
H2O.__dict__
{'properties': {'mass': <exex.core.Mass>,
  'mole': <exex.core.Mole>},
 'laws': {'mass_mole_ratio': <__main__.MassMoleRatio>},
 'time': None,
 'system': None,
 'add_laws': [__main__.MassMoleRatio],
 'elements': [<chemlib.chemistry.Element>,
  <chemlib.chemistry.Element>,
  <chemlib.chemistry.Element>],
 'formula': 'H₂O₁',
 '_formula': 'H2O',
 'coefficient': 1,
 'occurences': {'H': 2, 'O': 1}}