Thomas Relativistic Electronic Structure Calculation
(TRESC) is used to calculate the electronic structure of non-periodic polyatomic
systems under the Born-Oppenheimer approximation, it's designed to do
all-electron single-configuration self-consistent field calculation based on the
static 2-component DKH2 electronic Hamiltonian of a given molecule.
The main part of the code is written in Fortran 2008
free format.
If AVX2 / AVX512 instruction set is supported, please modify the compilation options and compiler directives (e.g. align_size) manually
- Deploy build tools by root or sudo user:
sudo apt install ninja-build
sudo apt install cmake
- Install Intel oneAPI HPC Toolkit,
and append the following to
~/.bashrc
:
export ONEAPI_ROOT="/path/to/oneapi"
export PATH="$ONEAPI_ROOT/compiler/latest/bin:$PATH"
source $ONEAPI_ROOT/compiler/latest/env/vars.sh
source $ONEAPI_ROOT/mkl/latest/env/vars.sh
source $ONEAPI_ROOT/mpi/latest/env/vars.sh
- Download the stable release of Libxc and build it by:
cmake -S. -B./build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DENABLE_FORTRAN=ON -DBUILD_TESTING=OFF -DBUILD_FPIC=ON -DCMAKE_Fortran_COMPILER="${ONEAPI_ROOT}/compiler/latest/bin/ifx" -DCMAKE_C_COMPILER="${ONEAPI_ROOT}/compiler/latest/bin/icx" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -O3 -xCORE-AVX2"
then
cd build && ninja
append to~/.bashrc
after a successful build:
export LIBXC_ROOT="/path/to/libxc"
- Change directory to TRESC root and build it by:
cmake -B build/release -G Ninja -DCMAKE_BUILD_TYPE=Release
then
cmake --build build/release
chmod +x tshell.sh && cp tshell.sh build
append to~/.bashrc
when everything is done:
export TRESC="/path/to/TRESC"
export PATH="$TRESC/build:$PATH
- Spherical-harmonic fragment contracted Gaussian type orbital(basis .gbs file).
- Initial guess load from Molden input file (generated by other programs, same or different basis) or .ao2mo file (generated by TRESC HF/KS-SCF earlier).
- Symmetric orthogonalisation of overlap matrix by default, canonical orthogonalisation will be used if basis linear dependence reaches the threshold.
- Relativistic 2-componnet 1e integrals using optimal parametrized Douglas-Kroll transformation proposed by Hess et al..
- Gaussian finite nucleus model is considered in 1e potential energy integrals,
affecting the integral values of
V
,pVp
, andpVppp
. - Non-relativistic scalar 2e integrals (including HF Coloumb and HF exchange) by Rys quadrature scheme, screened by Cauchy-Schwarz scheme.
- Construct Fock matrix via direct way, which is time consuming but less demanding on memory and disk r/w.
- Non-relativistic integrals are consistent with the Gaussian program.
- Kohn-Sham grid integration are based on Becke's fuzzy partitioning, the exchange-correlation energy and the partial derivative terms of the exchange-correlation potential are obtained by external library Libxc.
- Support for density functional calculation: LDA functionals, GGA functionals and hybrid functionals, the results of non-relativistic calculation differ negligibly from the Gaussian program
- 2c-SCF causes mixing between alpha and beta orbitals, sometimes we want this
mixing as little as possible (maintaining the initial spin state as much as
possible). In this case, you can try
cspin=f
orcspin=d
(the latter is for nearly degenerate frontier orbitals), but these keywords can cause variational instability, so be sure to check the convergence of the last few SCF loops. - DIIS(Pulay mixing) can be used to accelerate SCF, dynamic damping can be used to enhance convergence.
- Basic linear algebra is computed using LAPACK subroutines.
- 1e and 2e Fock matix construction and Kohn-Sham grid-based integration support OpenMP parallel computation and all parallel zone are thread safe.
- Outprint
$$\left< s^2 \right> \left( L\ddot{o}wdin \right)$$ , energy and orbital components. - Support dispersion correction via DFT-D4 program (stand-alone) developed by Grimme's group.
vis2c
is a python package for visualising spinor
(and scalar) molecular orbitals. When TRESC finishes its 2c-SCF calculation,
canonical orbitals will be dumped to jobname.molden.d
. With it, one can
launch python and use cub2c
function to generate 2 Gaussian cube format files
(contain grid data of real and imaginary part of alpha and beta components of
selected orbital) and then visualise the selected orbital based on grid data
automatically. The visualisation are as follows:
It's the HOMO of the triplet carbene
The cube file records structured grid data, which is
efficient for post-processing and visualisation. However, if the amplitude
of the small component of selected orbital is small enough(
To solve this problem, vis2c allows unstructured grid
data (Becke's fuzzy grid). With the jobname.molden.d
generated by TRESC, one
can launch python and use mog2c
function to generate a series of Becke grid
data binary files (via tshell -mog2c
), and then visualise the selected orbital
automatically. In the case of the triplet carbine, the Becke's grid data set is
less than one-tenth of the structured grid data set, but the visualisation is
superior:
Both structured and unstructured grid points can be set
in $TRESC/settings.ini.
When visualizing spinor orbitals, it is required to set
the motion of the molecule, which will affect the observations of the spatial
and spin portions of the orbital, although for the general case molecule move
at speed much lower than relativistic speed then reference frame effect
are negligible.
Second Relativized Thomas Precession (SRTP) is to
conbine the Lorentz vector feature of spin 4-vector
To accomplish it, we start with a newly-defined
reference frame transformation rule, which makes the observed
Assuming that frame O' is moving along the x-axis in
frame O, the Lorentz transformation and the newly-defined transformation
lead to different observations.
Its mathematical form can be given directly as a
nonlinear equation
which
This newly-defined transformation is kinematic, but it
will change the form of Thomas precession dynamically since Thomas precession is
related to the intrinsic property of reference frame transformation.
After some derivation, the contribution of the Thomas
precession to electron energy at low speed can be represented as
which
Then quantization and use Pauli vector rule to modify
Dirac matrices as
This formular leads to the modified electron spinor wave
function through DKH transformation.
In addition, SRTP effect is of order
SRTP is currently has no evidence support, if you're
interested, try keyword SRTP
when performing DKH2 calculation.
Code logic of TRESC allows it to dynamically update some
of parameters such as threads
, damp
at run-time. User can add or change
the corresponding keywords in the input .xyz file to implement the corresponding
changes at the next SCF loop. This does not affect the stability of the program,
even deleting keywords or the entire input file does not affect the running
computational task.
Spin pure states can be obtained from 2-component states using the rotation group integration:
Where
After finish DKH2 SCF, the
Where N is the number of electrons, M is an N*N matrix, calculated by:
Where $$|\phi i\rangle$$ denotes the i-th occupied orbital. The deviation of $$\kappa$$ from 0 reflects the deviation of the system from TRS. For scalar single-configuration wave function, the reference value of kappa is $$\sqrt{N{\alpha}-N_{\beta}}$$; deviation from this value in 2-component calculation reflects the deviation of the system from TRS caused by SOC, which is closely related to the zero-field split of the system.
- perturbation calculation;
- calculate 2e SOC by SOMF approach;