DeltaSpin is a self-adaptive spin-constraining method based on constrained Density Functional Theory (cDFT). It operates as an extension to the Vienna Ab-initio Simulation Package (VASP).
@article{cai2023self,
title={A self-adaptive first-principles approach for magnetic excited states},
author={Cai, Zefeng and Wang, Ke and Xu, Yong and Wei, Su-Huai and Xu, Ben},
journal={Quantum Frontiers},
volume={2},
number={1},
pages={21},
year={2023},
publisher={Springer}
}
To acquire the source code, please send an email to [email protected].
The system requirements, including all software dependencies and supported operating systems, are similar to those of the original Vienna Ab initio Simulation Package (VASP).
-
Clone the entire repository, not just the
deltaspin
directory. -
Install Intel Parallel Studio >= 2019 / oneAPI >= 2020 and load environment variables correctly.
-
(Optional) In some versions of the Intel compiler, you might need to modify
FFLAGS
inmakefile.include
asFFLAGS = -assume byterecl -w -warn nointerfaces
to disable type checking due to the usage of some outdated type casting techniques in the VASP codebase.
-
Compile
vasp_deltaspin
specifically using one single thread. This is crucial, as multi-threading is not supported.make deltaspin
Please note that the compilation might take several minutes.
For the following commands, replace the values within the angle brackets (< >
) with relevant values for your system.
-
Inspect your system configurations, such as Intel runtime libraries and system stack size. Configure the stack size to unlimited if it hasn't been configured as such already. This is necessary because VASP uses numerous stack-based variables and arrays.
ulimit -s unlimited
-
Change your working directory to
examples/insulator/NiO
.cd <repository root>/examples/insulator/NiO
-
Review the INCAR file. Pay particular attention to the following tags and their respective meanings. As a reference, the ground-state magnetic configuration for the provided NiO example is
-0.424907764 1.024101942 0.627479909 0.424903960 -1.024103888 -0.627479400
.M_CONSTR = 0.75914 0.16146 -1.00688 -0.67954 -0.91284 0.56668 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 SCTYPE = 1 CONSTRL = 6*1 6*0
-
Execute the binary
bin/vasp_deltaspin
, or submit it to your cluster as you would a regular VASP task.mpirun -np <number of threads> ../../../bin/vasp_deltaspin
-
Wait for the calculation to finish. The time this takes can vary based on your system specifications. For reference, it takes approximately 1 hour and 7 minutes on a 56-thread compute node powered by two Intel Xeon Gold 6258R CPUs.
-
After the calculation is complete, the obtained magnetic moments,
MW_current
in the outputOSZICAR
, should match the valueM_CONSTR
set in theINCAR
input.grep "M_CONSTR = " INCAR grep "MW_current" OSZICAR -A 2 | tail -2 | awk '{print$2,$3,$4}'
All VASP outputs, such as the total energy and electronic structure, correspond to the achieved constrained state.
-
(Optional) For convenience, you can use the provided
energy_force.sh
script to inspect the critical properties of the achieved constrained state, including the magnetic moments and magnetic forces (also known as magnetic effective fields).bash ../../../scripts/energy_force.sh
For additional information, please download the manual DeltaSpin_Manual.pdf.
VASP is a proprietary software. Ensure that you possess an appropriate license to use it.