radtools.Crystal#
- class radtools.Crystal(lattice: Lattice = None, atoms=None)[source]#
Crystal class.
Iterable over atoms. All attributes of the
Latticeare accessible directly from the crystal or from the lattice attribute, i.e. the following lines are equivalent:>>> import radtools as rad >>> cub = rad.lattice_example("CUB") >>> crystal = rad.Crystal(cub) >>> crystal.lattice.pearson_symbol 'cP' >>> crystal.pearson_symbol 'cP'
For the full description of the lattice attributes and methods see Lattice.
- Parameters:
- Attributes:
- atomslist
List of atoms of the crystal.
Methods:
add_atom(new_atom[, relative])Add atom to the crystall.
converge_mag_dipdip_energy([start, step, ...])Converge magnetic dipole-dipole energy.
Detect primitive cell.
get_atom(name[, index, return_all])Return atom object of the crystal.
get_atom_coordinates(atom[, R, relative])Getter for the atom coordinates.
get_distance(atom1, atom2[, R])Getter for distance between the atom1 and atom2.
get_vector(atom1, atom2[, R, relative])Getter for vector between the atom1 and atom2.
identify([find_primitive])Identify Bravais lattice type.
mag_dipdip_energy(na, nb, nc[, progress_bar])Computes magnetic dipole-dipole energy.
remove_atom(atom)Remove atom from the crystal.
Properties: