aiida_pythonjob_ins.data.mixins¶
Mixins for the Euphonic-wrapping Data classes.
Kept separate from the JSON-storage base (EuphonicJSONData) so that a
capability like to_structure() is only present on Data classes that actually
wrap an object with a .crystal (e.g. ForceConstants,
QpointPhononModes) – and not, say, a future Spectrum1DCollectionData,
which has no crystal.
Classes¶
Structural type for a node that can yield its crystal as a StructureData. |
|
Add |
Module Contents¶
- class aiida_pythonjob_ins.data.mixins.SupportsToStructure[source]¶
Bases:
ProtocolStructural type for a node that can yield its crystal as a StructureData.
Used to type the generic
extract_structurecalcfunction.
- class aiida_pythonjob_ins.data.mixins.CrystalStructureMixin[source]¶
Add
to_structure()to a Data class wrapping an object with.crystal.Mix in alongside
EuphonicJSONData(which providesget_object()), e.g.class ForceConstantsData(CrystalStructureMixin, EuphonicJSONData).- get_object() Any¶
- to_structure() aiida.orm.StructureData[source]¶
Extract the wrapped object’s
.crystalas a nativeStructureData.Delegates to
crystal_to_structure()(the single Crystal -> StructureData converter).