# Molecular rotational g-tensors¶

## Introduction¶

In this tutorial we introduce the calculation of molecular rotational g-tensors as given in the DIRAC code, based on the theoretical
developments by I. Agustín Aucar *et al.* For details, you are welcome to consult [Aucar_JCP2014].

The Molecular rotational g-tensor elements are given by

They have two terms: the first of them is independent of the electronic variables, whereas the second one is given by a linear response (LR) function.

In tensorial notation, the rotational g-tensor contributions of a molecule are given by:

where \({\bf R}_{M,GO}\) is the position of nucleus \(M\) with respect to the gauge origin; \({\bf R}_{M,CM}\) is the position of nucleus \(M\) with respect to the molecular center of mass; \({\bf R}_{GO}\) is the position of the gauge origin; \({\bf I}\) is the inertia tensor of the molecule and \({\bf J}_e = \left({\bf r} - {\bf R}_{CM} \right) \times {\bf p}+{\bf S}_e\) is the electronic total angular momentum.

## Application to the HF molecule¶

As an example, we show a calculation of the g-tensor of the Hydrogen fluoride molecule. The input file rotg.inp is given by

```
**DIRAC
.TITLE
g-tensor
.WAVE FUNCTION
.PROPERTIES
**HAMILTONIAN
.URKBAL
**INTEGRALS
*READIN
.UNCONTRACT
**WAVE FUNCTIONS
.SCF
**PROPERTIES
.ROTG
.PRINT
1
*END OF
```

whereas the molecular input file HF_cv3z.mol is

```
INTGRL
Hydrogen fluoride. Experimental bond length: 0.917 A.
dyall.cv3z Basis set
C 2 A .10D-15
9.0 1
F 0.00000000000 0.00000000000 0.00000000000 Isotope=19
LARGE BASIS dyall.cv3z
1.0 1
H 0.00000000000 0.00000000000 0.91700000000 Isotope=1
LARGE BASIS dyall.cv3z
FINISH
```

The calculation is run using:

```
pam --inp=rotg --mol=HF_cv3z
```

As a result, g-factors are obtained at the coupled Hartree-Fock level. The code also works at the DFT level.

It is also interesting to note that as *.URKBAL* is requested in the present calculation, the results will be very close to those obtained using the RKB prescription, because the diamagnetic (e-p) contributions to \(g_{\alpha\beta}^{LR}\) are almost zero (see Eq. 41 of [Aucar_JCP2014]).

## Reading the output file¶

As the *.PRINT* flag in the input file is set to 1, the results are fully detailed.

The g-factor Hydrogen fluoride molecule will look like:

```
Molecular g-tensor
------------------
Total molecular g-factor : 0.76389212
Nuclear contribution to g-factor (g^nuc) : 0.97314534
Electronic contribution to g-factor (g^LR) : -0.20925322
g^LR-L(e-e) : -0.20924939
g^LR-S(e-e) : -0.00000604
g^LR-L(e-p) : 0.00009541
g^LR-S(e-p) : -0.00009320
```

One should recall that in the case of linear molecules, as the present one, only one tensor element is printed out (the g-factor) because for these molecules the g-tensor has only two equal and non-zero elements.

As it can be seen, the total g-tensor of the Hydrogen fluoride molecule is given, and then separated in its two terms (nuc and LR). The latter contribution, the linear response function, is further separated in their (e-e) and (e-p) linear response parts, as well as in their \(\mathbf{L}\) and \(\mathbf{S}\) parts. It is seen how the (e-p) contribution to the linear response term of the g-factor is almost zero.