httk.atomistic.species_primitive¶
Backend wrapping a validated OPTIMADE species dict.
Classes¶
Backend for a species backed by an OPTIMADE species dict. |
Module Contents¶
- class httk.atomistic.species_primitive.SpeciesPrimitive(obj: dict[str, Any], **hints: Any)[source]¶
Bases:
httk.atomistic.species_backend.SpeciesBackendBackend for a species backed by an OPTIMADE species dict.
The native representation is a mapping with the OPTIMADE
speciesfields; the requiredname/chemical_symbols/concentrationare validated conservatively on construction. The accessors read the corresponding fields (optional fields absent from the dict read asNone), andunwrapreturns the original dict.- unwrap() Any[source]¶
Return the most raw representation possible of this backend, i.e., if it uses a backend with an internal representaion - or if it can (possibly lossly) convert itself into a more raw representation that still would be recognized as a <Something>Like type, that representation will be returned. If this is not possible, the instance itself is returned.