Structure#

The structure module contains classes for constructing unit and supercells.

class SuperCell(filename, nu=1, nv=1, nw=1, tol=0.01)[source]

Supercell.

Parameters:
filenamestr

Name of CIF file.

nu, nv, nwint

Extents \(N_1\), \(N_2\), \(N_3\) along the \(a\), \(b\), and \(c\)-axis of the supercell.

tolfloat, optional

Tolerance of unique atom coordinates.

Methods

save()

Save supercell data.

load()

Load supercell data.

get_super_cell_extents()

Number of cells along each dimension.

set_super_cell_extents()

Update number of cells along each dimension.

get_super_cell_size()

Total number of cells.

get_number_atoms_per_super_cell()

Total number of atoms.

get_cartesian_lattice_points()

Position of lattice points in Cartesian coordinates.

get_super_cell_cartesian_atomic_coordinates()

Average atom positions in Cartesian coordinates.

get_super_cell_cartesian_displaced_atomic_coordinates()

Displaced atom positions in Cartesian coordinates.

get_super_cell_occupancies()

Occupancies.

get_super_cell_cartesian_magnetic_moments()

Magnetic moments in Cartesian coordinates.

displacement_correlations_1d(fract, tol, average=False)[source]

Spherically-averaged displacement correlations.

Parameters:
fractfloat

Fraction of longest distance for radial cutoff.

tolfloat

Tolerance of distances for unique pairs.

Returns:
corr1d array

Correlation.

coll1d array

Collinearity.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

displacement_correlations_3d(fract, tol, average=False, laue=None)[source]

Three-dimensional displacement correlations.

Parameters:
fractfloat

Fraction of longest distance for radial cutoff.

tolfloat

Tolerance of distances for unique pairs.

Returns:
corr1d array

Correlation.

coll1d array

Collinearity.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

displacive_single_crystal_intensity(extents, bins, W, laue=None, order=2, centering='P')[source]

Calculate displacive single crystal intensity.

Parameters:
extentslist of lists, float

Reciprocal space extents.

binslist, int

Number of bins.

W2d array

Projection matrix.

lauestr, optional

Laue symmetry.

Returns:
I1d array

Displacive scattering intensity.

get_cartesian_lattice_points()[source]

Position of lattice points in Cartesian coordinates,

Returns:
Rx, Ry, Rz1d array

Lattice vectors \(R_x\), \(R_y\), and \(R_z\).

get_number_atoms_per_super_cell()[source]

Total number of atoms.

Returns:
nint

Number of atoms \(n\) in the supercell.

get_super_cell_cartesian_atomic_coordinates()[source]

Average atom positions in Cartesian coordinates.

Returns:
rx, ry, rz1d array

Spatial vectors \(r_x\), \(r_y\), and \(r_z\).

atms1d array, str

Atoms, ions, or isotopes.

get_super_cell_cartesian_displaced_atomic_coordinates()[source]

Displaced atom positions in Cartesian coordinates.

Returns:
px, py, pzlist, 1d array

Spatial vectors \(r_x\), \(r_y\), and \(r_z\).

get_super_cell_cartesian_magnetic_moments()[source]

Magnetic moments in Cartesian coordinates

Returns:
mu_x, mu_y, mu_zlist, 1d array

Magnetic moments \(\mu_x\), \(\mu_y\), and \(\mu_z\).

get_super_cell_extents()[source]

Number of cells along each dimension.

Returns:
nu, nv, nwint

Extents \(N_1\), \(N_2\), \(N_3\) along the \(a\), \(b\), and \(c\)-axis of the supercell.

get_super_cell_occupancies()[source]

Occupancies.

Returns:
deltalist, 1d array

Spatial vectors \(r_x\), \(r_y\), and \(r_z\).

get_super_cell_size()[source]

Total number of cells.

Returns:
n_uvwint

Supercell size \(N_1N_2N_3\).

load(filename)[source]

Load supercell data.

Parameters:
filenamestr

Name of HDF5 file.

magnetic_powder_intensity(extents, bins)[source]

Calculate magnetic powder intensity.

Parameters:
extentslist, float

Reciprocal space extents.

binsint

Number of bins.

Returns:
I1d array

Magnetic scattering intensity.

magnetic_single_crystal_intensity(extents, bins, W, laue=None)[source]

Calculate magnetic single crystal intensity.

Parameters:
extentslist of lists, float

Reciprocal space extents.

binslist, int

Number of bins.

W2d array

Projection matrix.

lauestr, optional

Laue symmetry.

Returns:
I1d array

Magnetic scattering intensity.

occupancy_correlations_1d(fract, tol, average=False)[source]

Spherically-averaged occupancy correlations.

Parameters:
fractfloat

Fraction of longest distance for radial cutoff.

tolfloat

Tolerance of distances for unique pairs.

Returns:
corr1d array

Correlation.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

occupancy_correlations_3d(fract, tol, average=False, laue=None)[source]

Three-dimensional occupancy correlations.

Parameters:
fractfloat

Fraction of longest distance for radial cutoff.

tolfloat

Tolerance of distances for unique pairs.

Returns:
corr1d array

Correlation.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

occupational_single_crystal_intensity(extents, bins, W, laue=None)[source]

Calculate occupational single crystal intensity.

Parameters:
extentslist of lists, float

Reciprocal space extents.

binslist, int

Number of bins.

W2d array

Projection matrix.

lauestr, optional

Laue symmetry.

Returns:
I1d array

Occupational scattering intensity.

randomize_atomic_displacements()[source]

Generate random atomic displacements.

randomize_magnetic_moments()[source]

Generate random spin vectors.

randomize_site_occupancies()[source]

Generate random site occupancies.

reset_disorder()[source]

Reset data arrays.

save(filename)[source]

Save supercell data.

Parameters:
filenamestr

Name of HDF5 file.

save_correlations_3d(filename, data, coordinates, pairs)[source]

Save three-dimensional correlations.

Vector

Scalar

Correlation and collinearity

Correlation

Parameters:
filenamestr

Name of file to be saved.

data2-tuple or 4-tuple of 1d-array

List of correlation data.

coordinates3-tuple of 1d-array

Separation vector in Cartesian coordinates.

pairs1d-array, str

Pair identifier.

save_data(filename, signal, sigma_sq, extents, bins)[source]

Save the dataset to a h5 binary file.

Parameters:
filenamestr

Name of file to be saved.

signal3d-array

THe data signal.

sigma_sq3d-array

The error weights.

bins3-tuple, int

Number of voxels along each dimension.

extents3-tuple of 2-list, float

The (min, max) limits along each dimension.

save_intensity_3d(filename, I, extents, W=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]))[source]

Save the intensity to VTK file.

Parameters:
filenamestr

Name of file to be saved.

I1d-array

Intensity data.

extents3-tuple of 2-list, float

The (min, max) limits along each dimension.

W2d-array, optional

Projection matrix of the intensity file. The default is np.eye(3).

set_super_cell_extents(nu, nv, nw)[source]

Update number of cells along each dimension.

Parameters:
nu, nv, nwint

Extents \(N_1\), \(N_2\), \(N_3\) along the \(a\), \(b\), and \(c\)-axis of the supercell.

single_crystal_intensity_blur(I, sigma)[source]

Perform an approximate Gaussian blur to the intensity dataset.

Parameters:
I1d-array

Intensity data.

sigma3-tuple, float or float

Blur width in voxels.

Returns:
I_blur3d-array

Gaussian blurred intensity.

spin_correlations_1d(fract, tol, average=False)[source]

Spherically-averaged spin correlations.

Parameters:
fractfloat

Fraction of longest distance for radial cutoff.

tolfloat

Tolerance of distances for unique pairs.

Returns:
corr1d array

Correlation.

coll1d array

Collinearity.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

spin_correlations_3d(fract, tol, average=False, laue=None)[source]

Three-dimensional spin correlations.

Parameters:
fractfloat

Fraction of longest distance for radial cutoff.

tolfloat

Tolerance of distances for unique pairs.

Returns:
corr1d array

Correlation.

coll1d array

Collinearity.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

class UnitCell(filename, tol=0.01)[source]

Unit cell.

Parameters:
filenamestr

Name of CIF file.

tolfloat, optional

Tolerance of unique atom coordinates.

Methods

save()

Save unit cell data.

load()

Load unit cell data.

get_filepath()

Path of CIF file.

get_filename()

Name of CIF file.

get_sites()

Atom sites in the unit cell.

get_atom_sites()

Atom sites in the unit cell.

get_active_sites()

Active atom sites in the unit cell.

set_active_sites()

Update active atom sites in the unit cell.

get_number_atoms_per_unit_cell()

Total number of atoms in the unit cell.

get_fractional_coordinates()

Fractional coordiantes.

set_fractional_coordinates()

Update fractional coordiantes of active atoms.

get_unit_cell_cartesian_atomic_coordinates()

Cartesian coordiantes.

get_unit_cell_atoms()

Atom symbols of active atoms.

set_unit_cell_atoms()

Update atom symbols.

get_unit_cell_charge_numbers()

Charge numbers of active ions.

set_unit_cell_charge_numbers()

Update charge numbers of active ions.

get_unit_cell_isotope_numbers()

Mass numbers of active isotopes.

set_unit_cell_isotope_numbers()

Update mass numbers of active isotopes.

get_occupancies()

Occupancies.

set_occupancies()

Update occupancies.

get_anisotropic_displacement_parameters()

Anisotropic displacement parameters in crystal coordinates.

set_anisotropic_displacement_parameters()

Update anisotropic displacement parameters in crystal coordinates.

get_isotropic_displacement_parameter()

Isotropic displacement parameters.

set_isotropic_displacement_parameter()

Update isotropic displacement parameters.

get_principal_displacement_parameters()

Principal displacement parameters in Cartesian coordinates.

get_cartesian_anisotropic_displacement_parameters()

Anisotropic displacement parameters in Cartesian coordinates.

get_crystal_axis_magnetic_moments()

Magnetic moments in crystal coordinates.

set_crystal_axis_magnetic_moments()

Update magnetic moments in crystal coordinates.

get_magnetic_moment_magnitude()

Magnitude of magnetic moments.

get_cartesian_magnetic_moments()

Magnetic moments in Cartesian coordinates.

get_g_factors()

g-factors.

set_g_factors()

Update g-factors.

get_lattice_constants()

Lattice parameters.

set_lattice_constants()

Update lattice parameters.

get_all_lattice_constants()

All lattice parameters.

get_reciprocal_lattice_constants()

Reciprocal lattice parameters.

get_symmetry_operators()

Symmetry operators.

get_magnetic_symmetry_operators()

Magnetic symmetry operators.

get_lattice_system()

Lattice system of unit cell.

get_lattice_volume()

Lattice volume of unit cell.

get_reciprocal_lattice_volume()

Reciprocal lattice volume of reciprocal cell.

get_metric_tensor()

Unit cell metric tensor.

get_reciprocal_metric_tensor()

Reciprocal cell metric tensor.

get_fractional_cartesian_transform()

Fractional to Cartesian coordinates transform matrix.

get_miller_cartesian_transform()

Miller to Cartesian coordinates transform matrix.

get_cartesian_rotation()

Transform matrix between Cartesian axes of real and reciprocal lattice.

get_moment_cartesian_transform()

Magnetic moment components crystal to Cartesian transfomrmation matrix.

get_atomic_displacement_cartesian_transform()

Atomic displacement parameters crystal to Cartesian transfomrmation matrix.

get_space_group_symbol()

Space group symbol.

get_space_group_number()

Space group number.

get_laue()

Laue class.

get_site_symmetries()

Site symmetry operators.

get_wyckoff_special_positions()

Wyckoff special positions.

get_site_multiplicities()

Site multiplicites.

get_twins()

Twin transformation matrices and mass fractions.

set_twins()

Update twin transformation matrices and mass fractions.

get_space_group_symmetry_operators()

All symmetry operators.

get_atom_colors()

Color of each atom.

get_atom_radii()

Radius of each atom.

get_active_sites()[source]

Active atom sites in the unit cell.

Returns:
sites1d array, int

All active site numbers.

get_all_lattice_constants()[source]

All lattice parameters.

Returns:
constantstuple

Lattice constants and angles. Angles in radians.

get_anisotropic_displacement_parameters()[source]

Anisotropic displacement parameters in crystal coordinates of active atoms.

Returns:
U11, U22, U33, U23, U13, U121d array

Atomic displacement parameters \(U_{11}\), \(U_{22}\), \(U_{33}\), \(U_{23}\), \(U_{13}\), and \(U_{12}\).

get_atom_colors()[source]

Color of each atom.

Parameters:
colors1d array

Colors of atoms in RGB.

get_atom_radii(radii='empirical')[source]

Radius of each atom.

Parameters:
r1d array

Radii of atoms in angstroms. One of 'empirical', 'calculated', or 'van der waals'. Default 'empirical'.

get_atom_sites()[source]

Atom site symbols in the unit cell.

Returns:
atms1d array, int

All atom sites.

get_atomic_displacement_cartesian_transform()[source]

Transform matrix between crystal and Cartesian coordinates for atomic displacement parameters.

\[\begin{split}\begin{bmatrix} U_{xx} & U_{xy} & U_{xz} \\ U_{yx} & U_{yy} & U_{yz} \\ U_{zx} & U_{zy} & U_{zz} \end{bmatrix} = \begin{bmatrix} D_{11} & D_{12} & D_{13} \\ D_{21} & D_{22} & D_{23} \\ D_{31} & D_{32} & D_{33} \end{bmatrix} \begin{bmatrix} U_{11} & U_{12} & U_{13} \\ U_{21} & U_{22} & U_{23} \\ U_{31} & U_{32} & U_{33} \end{bmatrix} \begin{bmatrix} D_{11} & D_{21} & D_{31} \\ D_{12} & D_{22} & D_{32} \\ D_{13} & D_{23} & D_{33} \end{bmatrix}\end{split}\]
Returns:
D2d array

Components of the \(D\) matrix.

get_cartesian_anisotropic_displacement_parameters()[source]

Anisotropic displacement parameters in Cartesian coordinates of active atoms.

Returns:
Uxx, Uyy, Uzz, Uyz, Uxz, Uxy1d array

Atomic displacement parameters \(U_{xx}\), \(U_{yy}\), \(U_{zz}\), \(U_{yz}\), \(U_{xz}\), and \(U_{xy}\).

get_cartesian_magnetic_moments()[source]

Magnetic moments in Cartesian coordinates of active atoms.

Returns:
mu_x, mu_y, mu_z1d array

Magnetic moments \(\mu_x\), \(\mu_y\), and \(\mu_z\).

get_cartesian_rotation()[source]

Transform matrix between Cartesian axes of real and reciprocal lattice.

\[\begin{split}\begin{bmatrix} Q_x \\ Q_y \\ Q_z \end{bmatrix} = 2\pi \begin{bmatrix} R_{11} & R_{12} & R_{13} \\ R_{21} & R_{22} & R_{23} \\ R_{31} & R_{32} & R_{33} \end{bmatrix} \begin{bmatrix} B_{11} & B_{12} & B_{13} \\ 0 & B_{22} & B_{23} \\ 0 & 0 & B_{33} \end{bmatrix} \begin{bmatrix} h \\ k \\ l \end{bmatrix}\end{split}\]
Returns:
R2d array

Components of the \(R\) matrix.

get_crystal_axis_magnetic_moments()[source]

Magnetic moments in crystal coordinates of active atoms.

Returns:
mu1, mu2, mu31d array

Magnetic moments \(\mu_1\), \(\mu_2\), and \(\mu_3\).

get_filename()[source]

Name of CIF file.

Returns:
filenamestr

Name of file excluding path.

get_filepath()[source]

Path of CIF file.

Returns:
filepathstr

Name of path excluding filename.

get_fractional_cartesian_transform()[source]

Trasform matrix from fractional to Cartesian coordinates.

\[\begin{split}\begin{bmatrix} r_x \\ r_y \\ r_z \end{bmatrix} = \begin{bmatrix} A_{11} & A_{12} & A_{13} \\ 0 & A_{22} & A_{23} \\ 0 & 0 & A_{33} \end{bmatrix} \begin{bmatrix} u \\ v \\ w \end{bmatrix}\end{split}\]
Returns:
A2d array

Components of the \(A\) matrix.

get_fractional_coordinates()[source]

Fractional coordiantes of active atoms

Returns:
u, v, w1d array

Fractional coordiantes \(u\), \(v\), and \(w\).

get_g_factors()[source]

g-factors of active ions.

Returns:
g1d array

Magnetic \(g\)-factors.

get_isotropic_displacement_parameter()[source]

Isotropic displacement parameters of active atoms.

Returns:
Uiso1d array

Isotropic atomic displacement parameters \(U_\mathrm{iso}\).

get_lattice_constants()[source]

Lattice parameters.

Cell

Parameters

Cubic

a

Hexagonal

a, c

Rhombohedral

a, alpha

Tetragonal

a, c

Orthorhombic

a, b, c

Monoclinic

a, b, c, alpha, beta or gamma

Triclinic

a, b, c, alpha, beta, gamma

Returns:
constantstuple

Non-constrained lattice constants and angles. Angles in radians.

get_lattice_system()[source]

Lattice system of unit cell.

Returns:
systemstr

One of 'Cubic', 'Hexagonal', 'Rhombohedral', 'Tetragonal', 'Orthorhombic', 'Monoclinic', or 'Triclinic'.

get_lattice_volume()[source]

Lattice volume of unit cell.

\[V = abc\sqrt{1-\cos^2{\alpha}-\cos^2{\beta}-\cos^2{\gamma} +2\cos{\alpha}\cos{\beta}\cos{\gamma}}\]
Returns:
Vfloat

Unit cell volume \(V\).

get_laue()[source]

Laue class.

Returns:
lauestr

One of '-1', '2/m', 'mmm', '4/m', '4/mmm', '-3', '-3m', '6/m', '6/mmm', 'm-3', or 'm-3m'.

get_magnetic_moment_magnitude()[source]

Magnitude of magnetic moments of active atoms.

Returns:
mu1d array

Moment of magnetic moments \(\mu\).

get_magnetic_symmetry_operators()[source]

Magnetic symmetry operators of active atoms.

Returns:
mag_op1d array, str

Magnetic symmetry operator of each site.

get_metric_tensor()[source]

Unit cell metric tensor.

\[\begin{split}G = \begin{bmatrix} a^2 & ab\cos{\gamma} & ac\cos{\beta} \\ ba\cos{\gamma} & b^2 & bc\cos{\alpha} \\ ca\cos{\beta} & cb\cos{\alpha} & c^2 \end{bmatrix}\end{split}\]
Returns:
G2d array

Components of the \(G\) metric tensor.

get_miller_cartesian_transform()[source]

Trasform matrix from Miller to Cartesian coordinates.

\[\begin{split}\begin{bmatrix} Q_x \\ Q_y \\ Q_z \end{bmatrix} = 2\pi \begin{bmatrix} R_{11} & R_{12} & R_{13} \\ R_{21} & R_{22} & R_{23} \\ R_{31} & R_{32} & R_{33} \end{bmatrix} \begin{bmatrix} B_{11} & B_{12} & B_{13} \\ 0 & B_{22} & B_{23} \\ 0 & 0 & B_{33} \end{bmatrix} \begin{bmatrix} h \\ k \\ l \end{bmatrix}\end{split}\]
Returns:
B2d array

Components of the \(B\) matrix.

get_moment_cartesian_transform()[source]

Transform matrix between crystal and Cartesian coordinates for magnetic moments.

\[\begin{split}\begin{bmatrix} \mu_x \\ \mu_y \\ \mu_z \end{bmatrix} = \begin{bmatrix} C_{11} & C_{12} & C_{13} \\ C_{21} & C_{22} & C_{23} \\ C_{31} & C_{32} & C_{33} \end{bmatrix} \begin{bmatrix} \mu_1 \\ \mu_2 \\ \mu_3 \end{bmatrix}\end{split}\]
Returns:
C2d array

Components of the \(C\) matrix.

get_number_atoms_per_unit_cell()[source]

Total number of atoms in the unit cell.

Returns:
n_atmint

All active atoms.

get_occupancies()[source]

Occupancies of active atoms.

Returns:
occ1d array

Site occupancies.

get_principal_displacement_parameters()[source]

Principal displacement parameters in Cartesian coordinates of active atoms.

Returns:
U1, U2, U31d array

Atomic displacement parameters \(U_1\), \(U_2\), and \(U_3\).

get_reciprocal_lattice_constants()[source]

Reciprocal lattice parameters.

Returns:
a_, b_, c_, alpha_, beta_, gamma_float

Reciprocal lattice constants and angles \(a^*\), \(b^*\), \(c^*\), \(\alpha^*\), \(\beta^*\) and \(\gamma^*\). Angles in radians.

get_reciprocal_lattice_volume()[source]

Reciprocal lattice volume of reciprocal cell.

\[V^* = a^*b^*c^*\sqrt{1-\cos^2{\alpha^*}-\cos^2{\beta^*} -\cos^2{\gamma^*}+2\cos{\alpha^*} \cos{\beta^*}\cos{\gamma^*}}\]
Returns:
V_float

Reciprocal unit cell volume \(V^*\).

get_reciprocal_metric_tensor()[source]

Reciprocal cell metric tensor.

\[\begin{split}G^* = \begin{bmatrix} (a^*)^2 & a^*b^*\cos{\gamma} & a^*c^*\cos{\beta} \\ b^*a^*\cos{\gamma} & (b^*)^2 & b^*c^*\cos{\alpha} \\ c^*a^*\cos{\beta} & c^*b^*\cos{\alpha} & (c^*)^2 \end{bmatrix}\end{split}\]
Returns:
G_2d array

Components of the \(G^*\) metric tensor.

get_site_multiplicities()[source]

Site multiplicites of active atoms.

Returns:
mult1d array, int

Multiplicity of each site.

get_site_symmetries()[source]

Site symmetry operators.

Returns:
pg1d array, str

Point group symmetry of each site.

get_sites()[source]

Atom sites in the unit cell.

Returns:
sites1d array, int

All site numbers.

get_space_group_number()[source]

Space group number.

Returns:
groupint

Number between 1 and 230.

get_space_group_symbol()[source]

Space group symbol.

Returns:
hmstr

Symbol in Hermann–Mauguin notation.

get_space_group_symmetry_operators()[source]

All symmetry operators.

Returns:
sym_ops1d array, str

Space group symmetry operators.

get_symmetry_operators()[source]

Symmetry operators of active atoms.

Returns:
op1d array, str

Symmetry operator of each site.

get_twins()[source]

Twin transformation matrices and mass fractions.

\[\begin{split}\begin{bmatrix} h^\prime \\ k^\prime \\ l^\prime \end{bmatrix} = \begin{bmatrix} T_{11} & T_{12} & T_{13} \\ T_{21} & T_{22} & T_{23} \\ T_{31} & T_{32} & T_{33} \end{bmatrix} \begin{bmatrix} h \\ k \\ l \end{bmatrix}\end{split}\]
Returns:
T3d array

Twin transformation matrices.

weights1d array

Twin mass fractions.

get_unit_cell_atoms()[source]

Atom symbols of active atoms.

Returns:
atm1d array, str

Atom symbols.

get_unit_cell_cartesian_atomic_coordinates()[source]

Cartesian coordiantes of active atoms.

Returns:
rx, ry, rz1d array

Cartesian coordiantes \(r_x\), \(r_y\), and \(r_z\).

get_unit_cell_charge_numbers()[source]

Charge numbers of active ions.

Returns:
ion1d array, str

Valence charge number of active ions.

get_unit_cell_ions()[source]

Ion symbols of active ions.

Returns:
ion1d array, str

Ion symbols.

get_unit_cell_isotopes()[source]

Isotopes symbols of active isotopes.

Returns:
iso1d array, str

Isotopes symbols.

get_unit_cell_mass_numbers()[source]

Mass numbers of active isotopes.

Returns:
iso1d array, str

Nuclide charge number of active ions.

get_wyckoff_special_positions()[source]

Wyckoff special positions of active atoms.

Returns:
sp_pos1d array, str

Special position of each site

load(filename)[source]

Load unit cell data.

Parameters:
filenamestr

Name of HDF5 file.

save(filename)[source]

Save unit cell data.

Parameters:
filenamestr

Name of HDF5 file.

set_active_sites(act)[source]

Update active atom sites in the unit cell.

Parameters:
act1d array, int

All active site numbers.

set_anisotropic_displacement_parameters(U11, U22, U33, U23, U13, U12)[source]

Update anisotropic displacement parameters in crystal coordinates of active atoms.

Parameters:
U11, U22, U33, U23, U13, U121d array

Atomic displacement parameters \(U_{11}\), \(U_{22}\), \(U_{33}\), \(U_{23}\), \(U_{13}\), and \(U_{12}\).

set_crystal_axis_magnetic_moments(mu1, mu2, mu3)[source]

Update magnetic moments in crystal coordinates of active atoms.

Parameters:
mu1, mu2, mu31d array

Magnetic moments \(\mu_1\), \(\mu_2\), and \(\mu_3\).

set_fractional_coordinates(u, v, w)[source]

Update fractional coordiantes of active atoms.

Parameters:
u, v, w1d array

Fractional coordiantes \(u\), \(v\), and \(w\).

set_g_factors(g)[source]

Update g-factors of active ions.

Parameters:
g1d array

Magnetic \(g\)-factors.

set_isotropic_displacement_parameter(Uiso)[source]

Update isotropic displacement parameters of active atoms.

Parameters:
Uiso1d array

Isotropic atomic displacement parameters \(U_\mathrm{iso}\).

set_lattice_constants(constants)[source]

Update lattice parameters.

Cell

Parameters

Cubic

a

Hexagonal

a, c

Rhombohedral

a, alpha

Tetragonal

a, c

Orthorhombic

a, b, c

Monoclinic

a, b, c, alpha, beta or gamma

Triclinic

a, b, c, alpha, beta, gamma

Parameters:
constantstuple

Non-constrained lattice constants and angles. Angles in radians.

set_occupancies(occ)[source]

Update occupancies of active atoms.

Parameters:
occ1d array

Site occupancies.

set_twins(T, weights)[source]

Update twin transformation matrices and mass fractions.

Parameters:
T3d array

Twin transformation matrices.

weights1d array

Twin mass fractions.

set_unit_cell_atoms(atm)[source]

Update atom symbols of active atoms.

Parameters:
atm1d array, str

Atom symbols.

set_unit_cell_charge_numbers(ion)[source]

Update charge numbers of active ions.

Parameters:
ion1d array, str

Valence charge number of active ions.

set_unit_cell_mass_numbers(iso)[source]

Update mass numbers of active isotopes.

Parameters:
iso1d array, str

Nuclide mass number of active ions.