Skip to content

Ensemble

schemas.atomistic.ensemble.EnsembleSchema

Bases: BaseModel, YamlIO, Data

The EnsembleSchema class is a Pydantic model designed to represent a collection of molecular structures, referred to as frames. This class is used to manage and validate an ensemble of molecular data, facilitating the handling of multiple molecular configurations, such as those produced during atomistic calculations.

identification: IdentificationSchema = Field(default_factory=IdentificationSchema) class-attribute instance-attribute

This attribute stores identification information for the molecule, such as its name, unique identifiers, and other metadata. It uses the IdentificationSchema to validate and structure the data.

qc: QCSchema = Field(default_factory=QCSchema) class-attribute instance-attribute

This attribute holds quantum chemistry (QC) properties of the molecule, such as energy, wavefunction information, and other relevant QC data. It is structured and validated using the QCSchema.

system: SystemSchema = Field(default_factory=SystemSchema) class-attribute instance-attribute

This attribute contains system-related properties of the molecule, such as atomic coordinates, velocities, and other system-specific data. The SystemSchema is used for validation and structuring of this data.

topology: TopologySchema = Field(default_factory=TopologySchema) class-attribute instance-attribute

This attribute includes topological information about the molecule, such as the bonding structure, atom types, and other topology-related data. The TopologySchema validates and structures this data.

generate_fields(model, parent_key='') classmethod

Recursively generates all FieldInfo objects from a nested Pydantic BaseModel.

PARAMETER DESCRIPTION
model

The Pydantic model instance to process.

TYPE: Any

YIELDS DESCRIPTION
str

A generator yielding ModelField objects.

get_schema_map(model) classmethod

Generates a mapping of full field keys to UUIDs from a nested Pydantic BaseModel.

PARAMETER DESCRIPTION
model

The Pydantic model instance to process.

TYPE: BaseModel

RETURNS DESCRIPTION
dict[str, dict[str, str]]

Keys are the UUID of a single field and values are

  • field_key: key to the model field from [generate_fields] [schemas.atomistic.ensemble.EnsembleSchema.generate_fields].
  • cadence: The frequency of when this data would change; per molecule or ensemble basis.