Multipolar

MagInt.Multipolar.Mult_interact(V4_ind, VM, VM1, MagInt, fname='V_Mult.dat', tol_prnt=5e-07)

Transform V4 from atomic states to a multipolar basis and save the results to a file.

This function transforms the interactions represented in atomic states (V4_ind) into a multipolar basis and stores the results in a file. It calculates the transformed interactions for various multipole components and coordinates, providing a detailed view of the transformed interactions.

Parameters:

V4_inddict

A dictionary containing atomic state interactions, typically generated from atomic calculations.

VMMultipolar object

Multipolar instance for the first site

VMMultipolar object

Multipolar instance for the second site

MagIntMagIntType

An instance of the MagIntType class containing information about multipolar interactions.

fnamestr

The name of the file where the transformed multipolar interactions will be saved. Default is ‘V_Mult.dat’.

tol_prntfloat

A tolerance threshold for printing transformed interactions. Interactions with absolute values below this threshold will not be printed. Default is 1e-6.

Returns:

Vmult (dict): A dictionary containing the transformed multipolar interactions.

class MagInt.Multipolar.Multipolar(J=None, Mult_Comp=None, action='dirprod', Kmax=None, basis='complex', conv_mon_dipol='sph_tensor', print_mat=False)

This class manipulates multipole operators .

__init__(J=None, Mult_Comp=None, action='dirprod', Kmax=None, basis='complex', conv_mon_dipol='sph_tensor', print_mat=False)

Initialize multipole tensors for magnetic interactions.

This constructor initializes a Multipolar object, which can be used to represent magnetic interactions in various bases and multipole components. It allows for flexibility in specifying the properties of the multipole tensors.

Parameters:

Jfloat, optional

Total angular momentum quantum number. If provided, multipole tensors are generated based on this J value. Either J or Mult_Comp should be defined. Defaults to None.

Mult_Complist of Multipolar objects, optional

A list of two Multipolar objects. If provided, they are used to define a direct product of the multipole components. Either J or Mult_Comp should be defined. Defaults to None.

actionstr, optional

The type of action to perform when initializing the multipole tensors. Can be ‘dirprod’ (direct product of two Multipolar objects) or ‘merge’. Defaults to ‘dirprod’.

Kmaxint, optional

Maximum K value for the multipole tensors. If not provided, it is calculated based on the value of J. Defaults to None.

basisstr, optional

The basis in which the multipole tensors are represented. Can be ‘real’ or ‘complex’. Defaults to ‘complex’.

conv_mon_dipolstr, optional

The convention used for monopoles and dipoles. Can be ‘sph_tensor’ or ‘operator’. Defaults to ‘sph_tensor’.

print_matbool, optional

If True, print information about the conversion of multipole tensors. Defaults to False.

Notes:

  • The action parameter determines how the multipole tensors are initialized. For example, specifying ‘dirprod’ will initialize the object as a direct product of two Mult_Comp objects.

  • The multipole tensors are generated based on the specified J and Kmax values. If J is not provided, it can be calculated based on Kmax.

convert_to_mcphase_inp()

Convert Stevens operators in TKQ notation to the normalization used in the McPhase package.

This function converts Stevens operators from TKQ (Tensorial Kramers-Quadratic) notation to the normalization used in the McPhase package. This conversion is necessary for consistency with McPhase’s implementation.

Parameters:

None

Returns:

None

upfold(trnmat)

Calculate upfolded interactions OT_kq O^herm_conj.

This function calculates upfolded interactions between operators represented in the TKQ (Tensorial Kramers-Quadratic) notation. It is used to transform operators from the original basis to a new basis defined by the transformation matrix trnmat.

Parameters:

trnmat (np.ndarray):

The transformation matrix used to change the basis of the operators.

Returns:

None

MagInt.Multipolar.Wigner3j(j1, j2, j3, m1, m2, m3)

Compute the Wigner 3j symbol using the Racah formula.

Parameters:

j1int or float

The first total angular momentum quantum number.

j2int or float

The second total angular momentum quantum number.

j3int or float

The third total angular momentum quantum number.

m1int or float

The first magnetic quantum number.

m2int or float

The second magnetic quantum number.

m3int or float

The third magnetic quantum number.

Returns:

wigner3jfloat

The value of the Wigner 3j symbol for the specified quantum numbers.

Usage:

from wigner import Wigner3j wigner = Wigner3j(j1, j2, j3, m1, m2, m3)

Symbol representation:

/ j1 j2 j3 | | m1 m2 m3 /

Notes:

MagInt.Multipolar.store_results_in_h5(Vmult, MagInt, fname, VM, VM1=None)

Store essential data in an HDF5 file for future reference.

This function is used to store important data related to multipolar interactions and other related information in an HDF5 file. The stored data can be used for future analysis, reference, or sharing with other users.

Parameters:

Vmultdict,

dictionary of multipolar couplings

MagIntMagIntType

An instance of the MagIntType class containing information about multipolar interactions.

fnamestr

The name of the HDF5 file (excluding the ‘.h5’ extension) where the data will be stored.

VMMultipolar object

Multipolar instance for the first site

VM1Multipolar object

Multipolar instance for the second site