AtomsEnsemble
AtomsEnsemble#
- class abtem.inelastic.phonons.AtomsEnsemble(trajectory, ensemble_mean=True, ensemble_axes_metadata=None, cell=None)[source]#
Bases:
abtem.inelastic.phonons.BaseFrozenPhononsFrozen phonons based on a molecular dynamics simulation.
- Parameters
trajectory (list of ASE.Atoms, dask.core.Array, list of dask.Delayed) – Sequence of atoms representing a distribution of atomic configurations.
ensemble_mean (True, optional) – If True, the mean of the ensemble of results from a multislice simulation is calculated, otherwise, the result of every frozen phonon is returned.
ensemble_axes_metadata (list of AxesMetadata, optional) – Axis metadata for each ensemble axis. The axis metadata must be compatible with the shape of the array.
cell (Cell, optional) –
Methods
__init__(trajectory[, ensemble_mean, ...])copy()Make a copy.
ensemble_blocks([chunks])Split the ensemble into an array of smaller ensembles.
generate_blocks([chunks])Generate chunks of the ensemble.
randomize(atoms)Randomize the atoms.
select_block(index, chunks)Select a block from the ensemble.
Standard deviation of the positions of each atom in each direction.
Attributes
The unique atomic number of the atoms.
Base atomic configuration used for displacements.
List of AxisMetadata.
List of AxisMetadata of the base axes.
Shape of the base axes.
The cell of the atoms.
List of AxisMetadata of the ensemble axes.
The mean of the ensemble of results from a multislice simulation is calculated.
Shape of the ensemble axes.
Number of atomic configurations.
Shape of the ensemble.
Array of atoms representing an ensemble of atomic configurations.
- property atomic_numbers: numpy.ndarray#
The unique atomic number of the atoms.
- Return type
ndarray
- property atoms: ase.atoms.Atoms#
Base atomic configuration used for displacements.
- Return type
Atoms
- property axes_metadata: abtem.core.axes.AxesMetadataList#
List of AxisMetadata.
- Return type
AxesMetadataList
- property base_axes_metadata: list[abtem.core.axes.AxisMetadata]#
List of AxisMetadata of the base axes.
- Return type
list[AxisMetadata]
- property base_shape: tuple[int, ...]#
Shape of the base axes.
- Return type
tuple[int,...]
- property cell: ase.cell.Cell#
The cell of the atoms.
- Return type
Cell
- copy()#
Make a copy.
- property ensemble_axes_metadata: list[abtem.core.axes.AxisMetadata]#
List of AxisMetadata of the ensemble axes.
- Return type
list[AxisMetadata]
- ensemble_blocks(chunks=None)#
Split the ensemble into an array of smaller ensembles.
- Parameters
chunks (iterable of tuples) – Block sizes along each dimension.
- Return type
Array
- property ensemble_mean#
The mean of the ensemble of results from a multislice simulation is calculated.
- property ensemble_shape: tuple[int, ...]#
Shape of the ensemble axes.
- Return type
tuple[int,...]
- generate_blocks(chunks=1)#
Generate chunks of the ensemble.
- Parameters
chunks (iterable of tuples) – Block sizes along each dimension.
- property num_configs: int#
Number of atomic configurations.
- Return type
int
- select_block(index, chunks)#
Select a block from the ensemble.
- Parameters
index (tuple of ints) – Index of selected block.
chunks (iterable of tuples) – Block sizes along each dimension.
- property shape#
Shape of the ensemble.
- standard_deviations()[source]#
Standard deviation of the positions of each atom in each direction.
- Return type
ndarray
- property trajectory: np.ndarray | da.core.Array#
Array of atoms representing an ensemble of atomic configurations.
- Return type
np.ndarray | da.core.Array