ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Functions | Variables
vdwd3_autoset_xcparam.cpp File Reference
#include <map>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <cassert>
#include <algorithm>
#include "source_base/formatter.h"
#include "source_base/tool_quit.h"
#include "source_hamilt/module_vdw/vdwd3_parameters.h"
Include dependency graph for vdwd3_autoset_xcparam.cpp:

Functions

std::vector< double > _search_impl (const std::string &xc, const std::map< std::string, std::vector< double > > &dict)
 
void _search (const std::string &xc, const std::string &method, std::vector< double > &param)
 Get the dftd3 params object. dftd3 method fall back: xc-bjm -> xc-bj -> pbe-bj xc-zerom -> xc-zero -> pbe-zero.
 

Variables

const std::pair< const char *, std::vector< double > > bj_data []
 
const std::map< std::string, std::vector< double > > bj = {std::begin(bj_data), std::end(bj_data)}
 
const std::pair< const char *, std::vector< double > > zero_data []
 
const std::map< std::string, std::vector< double > > zero = {std::begin(zero_data), std::end(zero_data)}
 
const std::pair< const char *, std::vector< double > > bjm_data []
 
const std::map< std::string, std::vector< double > > bjm = {std::begin(bjm_data), std::end(bjm_data)}
 
const std::pair< const char *, std::vector< double > > zerom_data []
 
const std::map< std::string, std::vector< double > > zerom = {std::begin(zerom_data), std::end(zerom_data)}
 
const std::pair< const char *, std::vector< double > > op_data []
 
const std::map< std::string, std::vector< double > > op = {std::begin(op_data), std::end(op_data)}
 

Function Documentation

◆ _search()

void _search ( const std::string &  xc,
const std::string &  method,
std::vector< double > &  param 
)

Get the dftd3 params object. dftd3 method fall back: xc-bjm -> xc-bj -> pbe-bj xc-zerom -> xc-zero -> pbe-zero.

Parameters
xcthe functional name
d3methodthe d3 method, can be "bj", "zero-damping", "bj-modified", "zero-damping-modified", "op"
paramthe dftd3 parameters, ALL_KEYS = {'s6', 'rs6', 'a1', 's8', 'rs8', 'a2', 's9', 'alp', 'bet'}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _search_impl()

std::vector< double > _search_impl ( const std::string &  xc,
const std::map< std::string, std::vector< double > > &  dict 
)
Here is the caller graph for this function:

Variable Documentation

◆ bj

const std::map<std::string, std::vector<double> > bj = {std::begin(bj_data), std::end(bj_data)}

◆ bj_data

const std::pair<const char*, std::vector<double> > bj_data[]

Intro

This file stores XC dependent DFT-D3 parameters for Grimme-D3 dispersion correction.

Supported forms:

DFT-D3(0): zero-damping DFT-D3(BJ): Becke-Johnson damping DFT-D3M(0): zero-damping with modified damping function DFT-D3M(BJ): Becke-Johnson damping with modified damping function

A detailed introduction of undamped, and BJ damping, the modified damping can be found in DFT-D3 software manual, see: https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3/man.pdf

Other excellent learning materials (where you can find expression of both DFT-D2 and DFT-D3): DFT-D2: https://www.vasp.at/wiki/index.php/DFT-D2 DFT-D3: https://www.vasp.at/wiki/index.php/DFT-D3

Usage

call function DFTD3::search(xc, method, param) to get the DFT-D3 parameters for the given XC functional. The obtained param should be a std::vector<double>, in which the first 9 elements are the DFT-D3 parameters: 's6', 'sr6', 'a1', 's8', 'sr8', 'a2', 's9', 'alp', 'bet'

ParamNotFoundError

If the requested D3 parameters of XC are not found, then the ABACUS will WARNING_QUIT with the message "DFT-D3 parameters for XC not found".

Other dispersion correction

there are other kinds of dispersion correction, such as the xc VV09, VV10, and rVV10, and the vdw-DF family nonlocal dispersion correction. They will be mixed directly with the correlation and exchange part, which act differently from the DFT-D2 and D3 methods.

Special: Omega-B97 family

(thanks for help and discussion with @hhebrewsnabla and @moolawooda) wB97 XC family is special, their DFT-D3 supports are quite complicated.

wB97 long-range exx with B97 wB97X wB97 with additional short-range exx wB97X-D wB97X_D from libXC with DFTD2, not in DFTD3 framework wB97X-D3 wB97X_D3 from libXC with DFTD3(0) wB97X-D3(BJ) wB97X_V from libXC with DFTD3(BJ) wB97X-V with VV10, not in DFTD3 framework wB97M-V with VV10, not in DFTD3 framework

Recommended: http://bbs.keinsci.com/thread-19076-1-1.html Related information from Pyscf Github repo: https://github.com/pyscf/pyscf/issues/2069

◆ bjm

const std::map<std::string, std::vector<double> > bjm = {std::begin(bjm_data), std::end(bjm_data)}

◆ bjm_data

const std::pair<const char*, std::vector<double> > bjm_data[]
Initial value:
= {
{"__default__", {1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 14.0, 0.0}},
{"bp", {1.0, 0.82185, 0.82185, 3.140281, 2.728151, 2.728151, 1.0, 14.0, 0.0}},
{"blyp", {1.0, 0.448486, 0.448486, 1.875007, 3.610679, 3.610679, 1.0, 14.0, 0.0}},
{"b97_d", {1.0, 0.240184, 0.240184, 1.206988, 3.864426, 3.864426, 1.0, 14.0, 0.0}},
{"pbe", {1.0, 0.012092, 0.012092, 0.35894, 5.938951, 5.938951, 1.0, 14.0, 0.0}},
{"b3lyp", {1.0, 0.278672, 0.278672, 1.466677, 4.606311, 4.606311, 1.0, 14.0, 0.0}},
{"pbe0", {1.0, 0.007912, 0.007912, 0.528823, 6.162326, 6.162326, 1.0, 14.0, 0.0}},
{"b2plyp", {0.64, 0.486434, 0.486434, 0.67282, 3.656466, 3.656466, 1.0, 14.0, 0.0}},
{"lcwpbe", {1.0, 0.563761, 0.563761, 0.906564, 3.59368, 3.59368, 1.0, 14.0, 0.0}},
}

◆ op

const std::map<std::string, std::vector<double> > op = {std::begin(op_data), std::end(op_data)}

◆ op_data

const std::pair<const char*, std::vector<double> > op_data[]
Initial value:
= {
{"__default__", {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 14.0, 0.0}},
{"blyp", {1.0, 0.425, 0.425, 1.31867, 3.5, 3.5, 1.0, 14.0, 2.0}},
{"revpbe", {1.0, 0.6, 0.6, 1.44765, 2.5, 2.5, 1.0, 14.0, 0.0}},
{"b97_d", {1.0, 0.6, 0.6, 1.46861, 2.5, 2.5, 1.0, 14.0, 0.0}},
{"pbe", {0.91826, 0.2, 0.2, 0.0, 4.75, 4.75, 1.0, 14.0, 6.0}},
{"b3lyp", {1.0, 0.3, 0.3, 0.78311, 4.25, 4.25, 1.0, 14.0, 4.0}},
{"tpss", {1.0, 0.575, 0.575, 0.51581, 3.0, 3.0, 1.0, 14.0, 8.0}},
{"pbe0", {0.8829, 0.15, 0.15, 0.0, 4.75, 4.75, 1.0, 14.0, 6.0}},
{"revpbe0", {1.0, 0.725, 0.725, 1.25684, 2.25, 2.25, 1.0, 14.0, 0.0}},
{"tpssh", {1.0, 0.575, 0.575, 0.43185, 3.0, 3.0, 1.0, 14.0, 8.0}},
{"revtpss", {1.0, 0.7, 0.7, 0.27632, 2.5, 2.5, 1.0, 14.0, 8.0}},
{"b97_1", {0.97388, 0.15, 0.15, 0.0, 4.25, 4.25, 1.0, 14.0, 6.0}},
{"revtpssh", {1.0, 0.575, 0.575, 0.12467, 3.0, 3.0, 1.0, 14.0, 10.0}},
{"ms2", {1.0, 0.7, 0.7, 0.90743, 4.0, 4.0, 1.0, 14.0, 2.0}},
{"ms2h", {1.0, 0.65, 0.65, 1.69464, 4.75, 4.75, 1.0, 14.0, 0.0}},
}

◆ zero

const std::map<std::string, std::vector<double> > zero = {std::begin(zero_data), std::end(zero_data)}

◆ zero_data

const std::pair<const char*, std::vector<double> > zero_data[]

◆ zerom

const std::map<std::string, std::vector<double> > zerom = {std::begin(zerom_data), std::end(zerom_data)}

◆ zerom_data

const std::pair<const char*, std::vector<double> > zerom_data[]
Initial value:
= {
{"__default__", {1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 14.0, 0.0}},
{"bp", {1.0, 1.23346, 1.23346, 1.945174, 1.0, 1.0, 1.0, 14.0, 0.0}},
{"blyp", {1.0, 1.279637, 1.279637, 1.841686, 1.0, 1.0, 1.0, 14.0, 0.01437}},
{"b97_d", {1.0, 1.151808, 1.151808, 1.020078, 1.0, 1.0, 1.0, 14.0, 0.035964}},
{"pbe", {1.0, 2.340218, 2.340218, 0.0, 1.0, 1.0, 1.0, 14.0, 0.129434}},
{"b3lyp", {1.0, 1.338153, 1.338153, 1.532981, 1.0, 1.0, 1.0, 14.0, 0.013988}},
{"pbe0", {1.0, 2.077949, 2.077949, 8.1e-05, 1.0, 1.0, 1.0, 14.0, 0.116755}},
{"b2plyp", {0.64, 1.313134, 1.313134, 0.717543, 1.0, 1.0, 1.0, 14.0, 0.016035}},
{"lcwpbe", {1.0, 1.366361, 1.366361, 1.280619, 1.0, 1.0, 1.0, 14.0, 0.00316}},
}