spindynam package¶
Submodules¶
spindynam.calculator module¶
- class spindynam.calculator.SpinLatticeHeisenberg(**kwargs)[source]¶
Bases:
CalculatorCoupled spin-lattice Heisenberg calculator.
Implements equations from Tranchida et al. (2018).
-
calculate(atoms=
None, properties=None, system_changes=['positions', 'numbers', 'cell', 'pbc', 'initial_charges', 'initial_magmoms'])[source]¶ Do the calculation.
- properties: list of str
List of what needs to be calculated. Can be any combination of ‘energy’, ‘forces’, ‘stress’, ‘dipole’, ‘charges’, ‘magmom’ and ‘magmoms’.
- system_changes: list of str
List of what has changed since last calculation. Can be any combination of these six: ‘positions’, ‘numbers’, ‘cell’, ‘pbc’, ‘initial_charges’ and ‘initial_magmoms’.
Subclasses need to implement this, but can ignore properties and system_changes if they want. Calculated properties should be inserted into results dictionary like shown in this dummy example:
self.results = {'energy': 0.0, 'forces': np.zeros((len(atoms), 3)), 'stress': np.zeros(6), 'dipole': np.zeros(3), 'charges': np.zeros(len(atoms)), 'magmom': 0.0, 'magmoms': np.zeros(len(atoms))}The subclass implementation should first call this implementation to set the atoms attribute and create any missing directories.
-
default_parameters : dict[str, Any] =
{'H_ext': (0.0, 0.0, 0.0), 'J0': 0.1, 'K': 10.0, 'alpha': 2.0, 'g_i': 2.0, 'hbar': 0.6582119569, 'r0': 2.5}¶ Default parameters
-
implemented_properties : list[str] =
['energy', 'forces', 'magnetic_forces', 'mag_energy']¶ Properties calculator can handle (energy, forces, …)
-
calculate(atoms=
spindynam.cli module¶
spindynam.dynamics module¶
-
class spindynam.dynamics.SpinLatticeDynamics(atoms, timestep, trajectory=
None, logfile=None, loginterval=1, append_trajectory=False, **kwargs)[source]¶ Bases:
MolecularDynamicsCoupled Spin-Lattice Dynamics integrator.
Following Tranchida et al., J. Comput. Phys. 372 (2018) 406-425.
Module contents¶
-
class spindynam.SpinLatticeDynamics(atoms, timestep, trajectory=
None, logfile=None, loginterval=1, append_trajectory=False, **kwargs)[source]¶ Bases:
MolecularDynamicsCoupled Spin-Lattice Dynamics integrator.
Following Tranchida et al., J. Comput. Phys. 372 (2018) 406-425.
- class spindynam.SpinLatticeHeisenberg(**kwargs)[source]¶
Bases:
CalculatorCoupled spin-lattice Heisenberg calculator.
Implements equations from Tranchida et al. (2018).
-
calculate(atoms=
None, properties=None, system_changes=['positions', 'numbers', 'cell', 'pbc', 'initial_charges', 'initial_magmoms'])[source]¶ Do the calculation.
- properties: list of str
List of what needs to be calculated. Can be any combination of ‘energy’, ‘forces’, ‘stress’, ‘dipole’, ‘charges’, ‘magmom’ and ‘magmoms’.
- system_changes: list of str
List of what has changed since last calculation. Can be any combination of these six: ‘positions’, ‘numbers’, ‘cell’, ‘pbc’, ‘initial_charges’ and ‘initial_magmoms’.
Subclasses need to implement this, but can ignore properties and system_changes if they want. Calculated properties should be inserted into results dictionary like shown in this dummy example:
self.results = {'energy': 0.0, 'forces': np.zeros((len(atoms), 3)), 'stress': np.zeros(6), 'dipole': np.zeros(3), 'charges': np.zeros(len(atoms)), 'magmom': 0.0, 'magmoms': np.zeros(len(atoms))}The subclass implementation should first call this implementation to set the atoms attribute and create any missing directories.
-
default_parameters : dict[str, Any] =
{'H_ext': (0.0, 0.0, 0.0), 'J0': 0.1, 'K': 10.0, 'alpha': 2.0, 'g_i': 2.0, 'hbar': 0.6582119569, 'r0': 2.5}¶ Default parameters
-
implemented_properties : list[str] =
['energy', 'forces', 'magnetic_forces', 'mag_energy']¶ Properties calculator can handle (energy, forces, …)
-
calculate(atoms=