Compound

Fill in a module description here
H2O = chemlib.Compound('H2O')
H2O.__dict__
{'occurences': {'H': 2, 'O': 1},
 'elements': [<chemlib.chemistry.Element>,
  <chemlib.chemistry.Element>,
  <chemlib.chemistry.Element>],
 'formula': 'H₂O₁',
 'coefficient': 1}
H2O
<chemlib.chemistry.Compound>
from mendeleev import Fe
Fe.specific_heat_capacity
0.449

source

Compound

 Compound (formula:str)

Represents a chemical compound.

Type Details
formula str the chemical formula
H2O = Compound('H2O')
H2O.setAmount(mass=Q(2.2, 'kilograms'))
<__main__.Compound>
H2O.setName('water')
<__main__.Compound>
str(H2O.formula)
'H₂O₁'
H2O.__dict__
{'occurences': {'H': 2, 'O': 1},
 'elements': [<chemlib.chemistry.Element>,
  <chemlib.chemistry.Element>,
  <chemlib.chemistry.Element>],
 'formula': 'H₂O₁',
 'coefficient': 1,
 'name': 'water',
 'mass': 2.2 <Unit('kilogram')>,
 'mass_t': <chemchem.core.Symbol>,
 'moles': 122.12045517624202 <Unit('mole')>,
 'specific_heat': None,
 'temperature': 0    None
 Name: temperature, dtype: object,
 'state': None}
H2O.specific_heat
H2O.setName('water')
<__main__.Compound>
H2 = Compound('H2')
H2.setAmount(volume=Q(10, 'liter'))
<__main__.Compound>

Compound Builder


source

CompoundBuilder

 CompoundBuilder (formula)

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

CompoundBuilder('H2O').__dict__
{'compound': <__main__.Compound>}