Element
#
- class pymeasurement.util.chem.element.Element(string, protons=None, neutrons=None, mass=None)[source]#
A class to represent an chemical element.
- Parameters:
string – The name of the element. :type string: str :param protons: The number of protons in the element. :type protons: int or None :param neutrons: The number of neutrons in the element. :type neutrons: int or None :param mass: The mass of the element. :type mass: int or None
- __eq__(other)[source]#
Check if two elements are equal.
- Parameters:
other (Element) – The other element to compare to.
- Returns:
True if the elements are equal, False otherwise.
- Return type:
bool
- __repr__()[source]#
Get the string representation of the element.
- Returns:
The string representation of the element.
- Return type:
str
- __str__()[source]#
Get the string representation of the element.
- Returns:
The string representation of the element.
- Return type:
str
- __weakref__#
list of weak references to the object (if defined)
- atomicWeights()[source]#
Get a dictionary of all atomic weights.
- Returns:
A dictionary of all atomic weights.
- Return type:
dict