Crystal#

Class#

Crystal([lattice, atoms, relative, standardize])

Crystal class.

Hint

All properties and methods of Lattice are accessible directly from the crystal instance:

>>> import radtools as rad
>>> c = rad.Crystal()
>>> c.a
1.0
>>> c.b
1.0
>>> c.c
1.0

Atom methods#

  • Crystal.atoms

Crystal.add_atom([new_atom, relative])

Add atom to the crystal.

Crystal.remove_atom(atom[, index])

Remove atom from the crystal.

Crystal.get_atom(name[, index, return_all])

Return atom object of the crystal.

Positioning of atoms#

Crystal.get_atom_coordinates(atom[, R, ...])

Getter for the atom coordinates.

Crystal.get_distance(atom1, atom2[, R, ...])

Getter for distance between the atom1 and atom2.

Crystal.get_vector(atom1, atom2[, R, ...])

Getter for vector from atom1 to atom2.

Primitive cell#

Crystal.find_primitive_cell()

Detect primitive cell.

Energy properties#

Crystal.mag_dipdip_energy(na, nb, nc[, ...])

Computes magnetic dipole-dipole energy.

Crystal.converge_mag_dipdip_energy([start, ...])

Converge magnetic dipole-dipole energy.

Lattice getter#

Crystal.lattice

Lattice of the crystal.