DALTON


Table of Contents


Installation

Local installation (serial on own computer)
  1. Clone DALTON from either public or private (for developers) repo.
    Public git clone git@gitlab.com:dalton/dalton.git dalton-public
    Private git clone git@gitlab.com:dalton/dalton-private.git dalton-private
  2. In both cases, do ``git submodule update --init --recursive```
  3. Go to folder dalton-public/dalton-private and use setup (requires CMake):
    ./setup build_name && cd build_name && make -j4
Installation of computer clusters

Use the following commands to install DALTON.

  • Parallel installation abacus (OpenMPI/MKL)
    module load GCC/7.3.0-2.30 OpenMPI/3.1.1 iomkl/2018b CMake/3.12.1
    ./setup --mpi --mkl=sequential build_name

  • Parallel installation abacus (intel)
    module load cmake/3.9.4 intel/2018.05 intelmpi/2018.05
    ./setup --fc=mpiifort --cc=mpiicc --cxx=mpiicpc --mpi --mkl=sequential build_name

  • Parallel installation GenomeDK (OpenMPI)
    source /faststorage/project/DeiC-SDU-L-10/Modules/setup_modules.sh # to get module loading system
    module load cmake/3.21.1 gcc/11.2.0 openmpi/4.1.1
    ./setup --fc=mpi90 --cc=mpicc --cxx=mpicxx --mpi build_master_ompi && cd build_master_ompi && make -j4

  • Parallel installation GenomeDK (Intel/MKL)
    source /faststorage/project/DeiC-SDU-L-10/Modules/setup_modules.sh # to get module loading system
    module load cmake/3.21.1 intel-compilers/2021.3 intel-mpi/2021.3 intel-mkl/2021.3
    ./setup --fc=mpiifort --cc=mpiicc --cxx=mpiicpc --mpi build_master_impi && cd build_master_impi && make -j4

Run-scripts for the different clusters and installations can be found under Runs cripts.

Examples of inputs

Below different examples on running dalton are shown

Generate dalton mol inputs from xyz files

This can be done with openbabel:

babel -i xyz input.xyz -o dalmol output.mol # Default basis: 6-31G*

Sometimes it is more flexible to employ a atom-specific basis set. This can be fixed by:

sed -i '/Charge/ s/$/ Basis=def2-svp/' input.mol

Remember to remove the default basis set and replace "BASIS" by "ATOMBASIS" in the mol file. Below is an example script for a molecule:

sed -i '/6-31G*/d' mol.mol
sed -i 's/BASIS/ATOMBASIS/' mol.mol
sed -e 's/\<NoSymmetry\>//g' mol.mol > mol_2.mol # removes NoSymm in mol (if symmetry is not wanted, remove this and next 2 lines)
sed -i 's/ Angstrom/Angstrom/' mol_2.mol
mv mol_2.mol mol.mol
sed -i 's/\Charge=25.0 Atoms=1\b/& Basis=aug-cc-pVTZ/' mol.mol
sed -i 's/\Charge=7.0 Atoms=4\b/& Basis=cc-pVTZ/' mol.mol
sed -i 's/\Charge=6.0 Atoms=6\b/& Basis=cc-pVTZ/' mol.mol
sed -i 's/\Charge=1.0 Atoms=10\b/& Basis=cc-pVDZ/' mol.mol
Optical rotation (ORD) and electric circular dichroism (ECD)

Here is a small tutorial for running ORD and ECD calculations in DALTON.

  • Input example of ORD and ECD calculation, using damped response theory

  • copy the example below into a file "input.dal"

BASIS
aug-cc-pVDZ
Methyloxirane (B3LYP/6-31G* optimized geometry)
================================================
Atomtypes=3 Generators=0 Angstrom
Charge=6.0 Atoms=3
C       -1.045082    0.615240   -0.060290
C        0.152118   -0.037513    0.489147
C        1.511521    0.100482   -0.148726
Charge=8.0 Atoms=1
O       -0.827106   -0.789457   -0.242703
Charge=1.0 Atoms=6
H       -1.875126    0.879897    0.595964
H       -0.958595    1.221760   -0.963024
H        0.155847   -0.255258    1.560108
H        1.416164    0.337467   -1.213207
H        2.077966   -0.833346   -0.056439
H        2.089255    0.895882    0.337436

**DALTON INPUT
.RUN PROPERTIES
.DIRECT
**WAVE FUNCTION
.DFT
 B3LYP
**PROPERTIES
.OPTROT
*ABALNR
.DAMPING
 0.0045566
.FREQ INTERVAL
 0.18 0.28 0.0025
*END OF
  • run <path-to-dalton>/dalton -d -nobackup -noarch -M 1024 -N 1 -o output.log input.dal
  • For running on aurora, see below

Run scripts

GenomeDK
  • Parallel installation GenomeDK (OpenMPI)
#!/bin/bash
#SBATCH --job-name=dalton-test
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=24
#SBATCH --constraint=gen2|gen3
#SBATCH --partition=express ! alternatives are short or normal
#SBATCH --time=00:10:00
#SBATCH --mem=2500

source /faststorage/project/DeiC-SDU-L-10/erikh/programs/.dalton-ompi.sh
export DALTON_TMPDIR=/home/<user>/DeiC-SDU-L-10/<user>/scratch

dalton -mb 2000 -N 24 -dal <dal file> -mol <mol file> -o output.out
  • Parallel installation GenomeDK (Intel/MKL)
#!/bin/bash

#SBATCH --job-name=dalton-test
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=24
#SBATCH --constraint=gen2|gen3
#SBATCH --partition=express ! alternatives are short or normal
#SBATCH --time=00:10:00
#SBATCH --mem=2500

source /faststorage/project/DeiC-SDU-L-10/erikh/programs/.dalton-impi.sh
export DALTON_TMPDIR=/home/<user>/DeiC-SDU-L-10/<user>/scratch

dalton -mb 2000 -N 24 -dal <dal file> -mol <mol file> -o output.out
Aurora

Example run scripts are given below

#!/bin/sh
#SBATCH -N 1
#SBATCH --tasks-per-node=8
#SBATCH -t 24:00:00 # Max time is 168 hous (7 days) 
##SBATCH --qos=test # Test queue (uncomment if wanted but set time to max 1 hour)

source /home/erikh/programs/.dalton-ompi-master
cd $SNIC_TMP
cp -p $SLURM_SUBMIT_DIR/* .
$DALTON/dalton -d -nobackup -M 4000 -N 8 -o output.out input.dal
cp -pu * $SLURM_SUBMIT_DIR

Localized orbitals

To transform to localized orbitals in first iteration, make a specialized DALTON: Find the section in (sirinp.F)

*****  PROCESS AND CHECK INPUT DATA *****
IF (DOSCF .OR. DOCI .OR. DOMC) THEN
         IF(MAXMAC.LE.0 .OR.MAXMAC.GT.200) CALL ERRINP( 5,INPERR)
         ! edh modification to get localized virtuals !
         IF(THRGRD.LT.D0.OR.THRGRD.GT.1000)  CALL ERRINP( 7,INPERR)
END IF

OBS: Do not use this DALTON for anything else than localized orbitals - the insert allows the gradient to be VERY large (because we do not want do any iterations!)

Debugging

Some tips and tricks for debugging

MCSCF code Debugging of the MCSCF code in DALTON can be tricky, but can be helped by checking some of the convergence parameters.

The optimization scheme in DALTON builds on a second order Taylor expansion, where the predicted energy change for a parameter step L is q(L) = gL + LHL (g = gradient and H = Hessian). The true energy change is E(L). Associated with E(L) and q(L) are a number of convergence parameters that can be used to check for quadratic convergence (which is a pre-requisite for a correct code). Check these convergence parameters, listed below:

  • GRDNORM: Gradient norm. Should decrease quadratic (e.g. 0.1, 0.01, 0.0001 etc...). The CI part calculated in routine CIGRAD, and the orbital part in routine ORBGRD.
    • If error is in gradient, locate the high element(s) giving rise to the problem
  • RATIO: E(L) / q(L). Should go (monotimically) towards 1.0 (0.99...) in the optimization (note that in the last step it is usually set to 1.0000 and this therefore does not count). In DALTON this parameters is calculated as routine SIRSTP.
  • STPLNG. Step length taken during the optimization.
  • In the first MACRO ITERATION (MACRO 1), check active energy and CIDIAG - the CI diagonal elements should have an absolute value that is lower than the active energy (otherwise the Hessian gets negative elements as CIDIAG is used in the Davidson preconditioning).
  • Look at actual and predicted energy change. They should be similar (almost identical close to convergence)
  • STEP control (if strange steps are observed, there might be a problem here)
  • Alternatively, use the NR solver (note that it cannot back-step and will stop if there are negative eigenvalues in the Hessian)
    • With .NR ALWAYS solver: 2. order contribution should be exactly one half of 1. order contribution
  • Check that reduced Hessian is symmetric (redH") can also be done with p6flag(51) in input
  • Things to be dumbed from file can be done with dmplab

Memory bugs

  • Trace the routine that gives the problem
  • More nasty ones, e.g, where inserting print statements makes code fail/run: boil down to exactly what print statement (and where in the code) it goes wrong If a routine is spotted, go to this and write debug prints (e.g. debug print 1, debug print 2 etc...) - continue with locate spot where it goes wrong
  • If inside a loop, is it first time it quits? If not, are there as many loop prints as expected?

MC-srDFT

  • Compare single determinant with full CI and only exchange (possibly also full HF exchange) using very high mu - here exchange is shifted between lr and sr parts but total energy should be equilvalent. Check convergence

results matching ""

    No results matching ""