ConfigSimulator

class mrsimulator.simulator.ConfigSimulator(*, number_of_sidebands: mrsimulator.simulator.config.ConstrainedIntValue = 64, integration_volume: Literal[octant, hemisphere] = 'octant', integration_density: mrsimulator.simulator.config.ConstrainedIntValue = 70, decompose_spectrum: Literal[none, spin_system] = 'none')

Bases: pydantic.main.BaseModel

The configurable attributes for the Simulator class used in simulation.

number_of_sidebands

The value is the requested number of sidebands that will be computed in the simulation. The value cannot be zero or negative. The default value is 64.

Type

int (optional)

integration_volume

The value is the volume over which the solid-state spectral frequency integration is performed. The valid literals of this enumeration are

  • octant (default), and

  • hemisphere

Type

enum (optional)

integration_density

The value represents the integration density or equivalently the number of orientations over which the frequency integration is performed within a given volume. If \(n\) is the integration_density, then the total number of orientation is given as

(24)\[n_\text{octants} \frac{(n+1)(n+2)}{2},\]

where \(n_\text{octants}\) is the number of octants in the given volume. The default value is 70.

Type

int (optional)

decompose_spectrum

The value specifies how a simulation result is decomposed into an array of spectra. The valid literals of this enumeration are

  • none (default): When the value is none, the resulting simulation is a single spectrum, which is an integration of the spectra over all spin systems.

  • spin_system: When the value is spin_system, the resulting simulation is an array of spectra, where each spectrum arises from a spin system within the Simulator object.

Type

enum (optional)

Example

>>> a = Simulator()
>>> a.config.number_of_sidebands = 128
>>> a.config.integration_density = 96
>>> a.config.integration_volume = 'hemisphere'
>>> a.config.decompose_spectrum = 'spin_system'

Method Documentation

get_orientations_count()

Return the total number of orientations.

Example

>>> a = Simulator()
>>> a.config.integration_density = 20
>>> a.config.integration_volume = 'hemisphere'
>>> a.config.get_orientations_count() # (4 * 21 * 22 / 2) = 924
924