spirit.parameters¶
Monte Carlo (MC)¶
-
spirit.parameters.mc.
get_iterations
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the maximum number of iterations and the step size.
-
spirit.parameters.mc.
get_metropolis_cone
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the Metropolis algorithm configuration.
- whether the spins are displaced within a cone (otherwise: on the entire unit sphere)
- the opening angle within which the spin is placed
- whether the cone angle is automatically adapted to achieve the set acceptance ratio
- target acceptance ratio for the adaptive cone algorithm
-
spirit.parameters.mc.
get_temperature
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the global base temperature [K].
-
spirit.parameters.mc.
set_iterations
(p_state, n_iterations, n_iterations_log, idx_image=-1, idx_chain=-1)¶ Set the number of iterations and how often to log and write output.
- n_iterations: the maximum number of iterations
- n_iterations_log: the number of iterations after which status is logged and output written
-
spirit.parameters.mc.
set_metropolis_cone
(p_state, use_cone=True, cone_angle=40, use_adaptive_cone=True, target_acceptance_ratio=0.5, idx_image=-1, idx_chain=-1)¶ Configure the Metropolis parameters.
- use_cone: whether to displace the spins within a cone (otherwise: on the entire unit sphere)
- cone_angle: the opening angle within which the spin is placed
- use_adaptive_cone: automatically adapt the cone angle to achieve the set acceptance ratio
- target_acceptance_ratio: target acceptance ratio for the adaptive cone algorithm
-
spirit.parameters.mc.
set_output_configuration
(p_state, step=False, archive=True, filetype=3, idx_image=-1, idx_chain=-1)¶ Set whether to write spin configuration output files.
- step: whether to write a new file after each set of iterations
- archive: whether to append to an archive file after each set of iterations
- filetype: the format in which the data is written
-
spirit.parameters.mc.
set_output_energy
(p_state, step=False, archive=True, spin_resolved=False, divide_by_nos=True, add_readability_lines=True, idx_image=-1, idx_chain=-1)¶ Set whether to write energy output files.
- step: whether to write a new file after each set of iterations
- archive: whether to append to an archive file after each set of iterations
- spin_resolved: whether to write a file containing the energy of each spin
- divide_by_nos: whether to divide energies by the number of spins
- add_readability_lines: whether to separate columns by lines
-
spirit.parameters.mc.
set_output_folder
(p_state, folder, idx_image=-1, idx_chain=-1)¶ Set the folder, where output files are placed.
-
spirit.parameters.mc.
set_output_general
(p_state, any=True, initial=False, final=False, idx_image=-1, idx_chain=-1)¶ Set whether to write any output files at all.
-
spirit.parameters.mc.
set_output_tag
(p_state, tag, idx_image=-1, idx_chain=-1)¶ Set the tag placed in front of output file names.
If the tag is “<time>”, it will be the date-time of the creation of the state.
-
spirit.parameters.mc.
set_temperature
(p_state, temperature, idx_image=-1, idx_chain=-1)¶ Set the global base temperature [K].
Landau-Lifshitz-Gilbert (LLG)¶
-
spirit.parameters.llg.
get_convergence
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the convergence value.
-
spirit.parameters.llg.
get_damping
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the Gilbert damping parameter.
-
spirit.parameters.llg.
get_direct_minimization
(p_state, idx_image=-1, idx_chain=-1)¶ Returns whether only energy minimisation will be performed.
-
spirit.parameters.llg.
get_iterations
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the maximum number of iterations and the step size.
-
spirit.parameters.llg.
get_stt
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the spin current configuration.
- magnitude
- direction, array of shape(3)
- whether the spatial gradient is used
-
spirit.parameters.llg.
get_temperature
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the temperature configuration.
- global base temperature [K]
- inclination of the temperature gradient [K/a]
- direction of the temperature gradient, array of shape(3)
-
spirit.parameters.llg.
get_timestep
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the time step [ps].
-
spirit.parameters.llg.
set_convergence
(p_state, convergence, idx_image=-1, idx_chain=-1)¶ Set the convergence limit.
When the maximum absolute component value of the force drops below this value, the calculation is considered converged and will stop.
-
spirit.parameters.llg.
set_damping
(p_state, damping, idx_image=-1, idx_chain=-1)¶ Set the Gilbert damping parameter [unitless].
-
spirit.parameters.llg.
set_direct_minimization
(p_state, use_minimization, idx_image=-1, idx_chain=-1)¶ Set whether to minimise the energy without precession.
This only influences dynamics solvers, which will then perform pseudodynamics, simulating only the damping part of the LLG equation.
-
spirit.parameters.llg.
set_iterations
(p_state, n_iterations, n_iterations_log, idx_image=-1, idx_chain=-1)¶ Set the number of iterations and how often to log and write output.
- n_iterations: the maximum number of iterations
- n_iterations_log: the number of iterations after which status is logged and output written
-
spirit.parameters.llg.
set_output_configuration
(p_state, step=False, archive=True, filetype=3, idx_image=-1, idx_chain=-1)¶ Set whether to write spin configuration output files.
- step: whether to write a new file after each set of iterations
- archive: whether to append to an archive file after each set of iterations
- filetype: the format in which the data is written
-
spirit.parameters.llg.
set_output_energy
(p_state, step=False, archive=True, spin_resolved=False, divide_by_nos=True, add_readability_lines=True, idx_image=-1, idx_chain=-1)¶ Set whether to write energy output files.
- step: whether to write a new file after each set of iterations
- archive: whether to append to an archive file after each set of iterations
- spin_resolved: whether to write a file containing the energy of each spin
- divide_by_nos: whether to divide energies by the number of spins
- add_readability_lines: whether to separate columns by lines
-
spirit.parameters.llg.
set_output_folder
(p_state, folder, idx_image=-1, idx_chain=-1)¶ Set the folder, where output files are placed.
-
spirit.parameters.llg.
set_output_general
(p_state, any=True, initial=False, final=False, idx_image=-1, idx_chain=-1)¶ Set whether to write any output files at all.
-
spirit.parameters.llg.
set_output_tag
(p_state, tag, idx_image=-1, idx_chain=-1)¶ Set the tag placed in front of output file names.
If the tag is “<time>”, it will be the date-time of the creation of the state.
-
spirit.parameters.llg.
set_stt
(p_state, use_gradient, magnitude, direction, idx_image=-1, idx_chain=-1)¶ Set the spin current configuration.
- use_gradient: True: use the spatial gradient, False: monolayer approximation
- magnitude: current strength
- direction: current direction or polarisation direction, array of shape(3)
-
spirit.parameters.llg.
set_temperature
(p_state, temperature, gradient_inclination=0, gradient_direction=[1.0, 0.0, 0.0], idx_image=-1, idx_chain=-1)¶ Set the temperature configuration.
- temperature: homogeneous base temperature [K]
- gradient_inclination: inclination of the temperature gradient [K/a]
- gradient_direction: direction of the temperature gradient, array of shape(3)
-
spirit.parameters.llg.
set_timestep
(p_state, dt, idx_image=-1, idx_chain=-1)¶ Set the time step [ps] for the calculation.
Geodesic nudged elastic band (GNEB)¶
-
spirit.parameters.gneb.
IMAGE_CLIMBING
= 1¶ Climbing GNEB image type. Climbing images move towards maxima along the path.
-
spirit.parameters.gneb.
IMAGE_FALLING
= 2¶ Falling GNEB image type. Falling images move towards the closest minima.
-
spirit.parameters.gneb.
IMAGE_NORMAL
= 0¶ Regular GNEB image type.
-
spirit.parameters.gneb.
IMAGE_STATIONARY
= 3¶ Stationary GNEB image type. Stationary images are not influenced during a GNEB calculation.
-
spirit.parameters.gneb.
get_climbing_falling
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the integer of whether an image is regular, climbing, falling, or stationary.
The integers are defined above.
-
spirit.parameters.gneb.
get_convergence
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the convergence value.
-
spirit.parameters.gneb.
get_iterations
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the maximum number of iterations and the step size.
-
spirit.parameters.gneb.
get_n_energy_interpolations
(p_state, idx_chain=-1)¶ Returns the number of energy values interpolated between images.
-
spirit.parameters.gneb.
get_path_shortening_constant
(p_state, idx_image=-1, idx_chain=-1)¶ Return the path shortening constant.
-
spirit.parameters.gneb.
get_spring_force
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the spring force constant and Ratio of energy to reaction coordinate.
-
spirit.parameters.gneb.
set_climbing_falling
(p_state, image_type, idx_image=-1, idx_chain=-1)¶ Set the GNEB image type (see the integers defined above).
-
spirit.parameters.gneb.
set_convergence
(p_state, convergence, idx_image=-1, idx_chain=-1)¶ Set the convergence limit.
When the maximum absolute component value of the force drops below this value, the calculation is considered converged and will stop.
-
spirit.parameters.gneb.
set_image_type_automatically
(p_state, idx_chain=-1)¶ Automatically set GNEB image types.
Minima along the path will be set to falling, maxima to climbing and the rest to regular.
-
spirit.parameters.gneb.
set_iterations
(p_state, n_iterations, n_iterations_log, idx_image=-1, idx_chain=-1)¶ Set the number of iterations and how often to log and write output.
- n_iterations: the maximum number of iterations
- n_iterations_log: the number of iterations after which status is logged and output written
-
spirit.parameters.gneb.
set_output_chain
(p_state, step=False, filetype=3, idx_image=-1, idx_chain=-1)¶ Set whether to write chain output files.
- step: whether to write a new file after each set of iterations
- filetype: the format in which the data is written
-
spirit.parameters.gneb.
set_output_energies
(p_state, step=True, interpolated=True, divide_by_nos=True, add_readability_lines=True, idx_image=-1, idx_chain=-1)¶ Set whether to write energy output files.
- step: whether to write a new file after each set of iterations
- interpolated: whether to write a file containing interpolated reaction coordinate and energy values
- divide_by_nos: whether to divide energies by the number of spins
- add_readability_lines: whether to separate columns by lines
-
spirit.parameters.gneb.
set_output_folder
(p_state, folder, idx_image=-1, idx_chain=-1)¶ Set the folder, where output files are placed.
-
spirit.parameters.gneb.
set_output_general
(p_state, any=True, initial=False, final=False, idx_image=-1, idx_chain=-1)¶ Set whether to write any output files at all.
-
spirit.parameters.gneb.
set_output_tag
(p_state, tag, idx_image=-1, idx_chain=-1)¶ Set the tag placed in front of output file names.
If the tag is “<time>”, it will be the date-time of the creation of the state.
-
spirit.parameters.gneb.
set_path_shortening_constant
(p_state, shortening_constant, idx_image=-1, idx_chain=-1)¶ Set the path shortening constant.
-
spirit.parameters.gneb.
set_spring_force
(p_state, spring_constant=1, ratio=0, idx_image=-1, idx_chain=-1)¶ Set the spring force constant and the ratio between energy and reaction coordinate.
Eigenmode analysis (EMA)¶
This method, if needed, calculates modes (they can also be read in from a file) and perturbs the spin system periodically in the direction of the eigenmode.
-
spirit.parameters.ema.
get_n_mode_follow
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the index of the mode to use.
-
spirit.parameters.ema.
get_n_modes
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the number of modes to calculate or use.
-
spirit.parameters.ema.
set_n_mode_follow
(p_state, n_mode, idx_image=-1, idx_chain=-1)¶ Set the index of the mode to use.
-
spirit.parameters.ema.
set_n_modes
(p_state, n_modes, idx_image=-1, idx_chain=-1)¶ Set the number of modes to calculate or use.
Minimum mode following (MMF)¶
-
spirit.parameters.mmf.
get_iterations
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the maximum number of iterations and the step size.
-
spirit.parameters.mmf.
get_n_mode_follow
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the index of the mode which to follow.
-
spirit.parameters.mmf.
get_n_modes
(p_state, idx_image=-1, idx_chain=-1)¶ Returns the number of modes calculated at each iteration.
-
spirit.parameters.mmf.
set_iterations
(p_state, n_iterations, n_iterations_log, idx_image=-1, idx_chain=-1)¶ Set the number of iterations and how often to log and write output.
- n_iterations: the maximum number of iterations
- n_iterations_log: the number of iterations after which status is logged and output written
-
spirit.parameters.mmf.
set_n_mode_follow
(p_state, n_mode, idx_image=-1, idx_chain=-1)¶ Set the index of the mode to follow.
-
spirit.parameters.mmf.
set_n_modes
(p_state, n_modes, idx_image=-1, idx_chain=-1)¶ Set the number of modes to be calculated at each iteration.
-
spirit.parameters.mmf.
set_output_configuration
(p_state, step=False, archive=True, filetype=3, idx_image=-1, idx_chain=-1)¶ Set whether to write spin configuration output files.
- step: whether to write a new file after each set of iterations
- archive: whether to append to an archive file after each set of iterations
- filetype: the format in which the data is written
-
spirit.parameters.mmf.
set_output_energy
(p_state, step=False, archive=True, spin_resolved=False, divide_by_nos=True, add_readability_lines=True, idx_image=-1, idx_chain=-1)¶ Set whether to write energy output files.
- step: whether to write a new file after each set of iterations
- archive: whether to append to an archive file after each set of iterations
- spin_resolved: whether to write a file containing the energy of each spin
- divide_by_nos: whether to divide energies by the number of spins
- add_readability_lines: whether to separate columns by lines
-
spirit.parameters.mmf.
set_output_folder
(p_state, folder, idx_image=-1, idx_chain=-1)¶ Set the folder, where output files are placed.
-
spirit.parameters.mmf.
set_output_general
(p_state, any=True, initial=False, final=False, idx_image=-1, idx_chain=-1)¶ Set whether to write any output files at all.
-
spirit.parameters.mmf.
set_output_tag
(p_state, tag, idx_image=-1, idx_chain=-1)¶ Set the tag placed in front of output file names.
If the tag is “<time>”, it will be the date-time of the creation of the state.