Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions propnet/core/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ def as_dict(self):
"@module": "propnet.core.quantity",
"@class": "Quantity"}

@classmethod
def from_key_value(cls, key, value):
for symbol_type, prop in DEFAULT_SYMBOLS.items():
if key == symbol_type or key in prop.display_symbols:
return cls(symbol_type, ureg.parse_expression(value))

@classmethod
def from_weighted_mean(cls, quantities):
"""
Expand Down
7 changes: 7 additions & 0 deletions propnet/symbols/properties/formation_enthalpy_per_mole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: formation_enthalpy_per_mole
units: eV / mol
display_names: [Formation Enthalpy per Mole]
display_symbols: ["ΔH"]
shape: 1
comment: ''
category: property