from chemformula import ChemFormula
atom
Fill in a module description here
Element
Element
Element (formula:str, charge:int=0, coordinate=None)
Initialize self. See help(type(self)) for accurate signature.
Type | Default | Details | |
---|---|---|---|
formula | str | the chemical formula of the element | |
charge | int | 0 | |
coordinate | NoneType | None |
= ChemFormula("((CH3)3N)(C6H11O2)", charge = 1, name = "L-(+)-Muscarine") muscarine
unicode muscarine.
'((CH₃)₃N)(C₆H₁₁O₂)⁺'
muscarine.element
{'C': 9, 'H': 20, 'N': 1, 'O': 2}
muscarine.hill_formula
<chemformula.ChemFormulaString>
= Element(formula='H2O', charge=-1) water
water.__dict__
{'element': {'H': 2, 'O': 1},
'unicode': 'H₂O',
'charge': -1,
'coordinate': None}
'H'] water.element[
2
water
H₂O
Compound
Compound
Compound (*args:__main__.Element)
Initialize self. See help(type(self)) for accurate signature.
'H2O') Element(
H₂O
'H2'), Element('O')) Compound(Element(
<__main__.Compound>
Vector
distance
distance (a, b)
Type | Details | |
---|---|---|
a | the coordinate of point a | |
b | the coordinate of point b | |
Returns | float | the distance between vector a and vector b |