ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_vdw.cpp File Reference
#include "mpi.h"
#include "source_base/mathzone.h"
#include "source_base/vector3.h"
#include "source_cell/unitcell.h"
#include "source_hamilt/module_vdw/vdwd2.h"
#include "source_hamilt/module_vdw/vdwd2_parameters.h"
#include "source_hamilt/module_vdw/vdwd3.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <memory>
#include <unistd.h>
#include "source_hamilt/module_vdw/vdw.h"
Include dependency graph for test_vdw.cpp:

Classes

struct  atomtype_
struct  stru_
class  vdwd2Test
class  vdwd3Test
class  vdwd3abcTest

Functions

void construct_ucell (stru_ &stru, UnitCell &ucell)
void ClearUcell (UnitCell &ucell)
void construct_two_si_with_ghost (UnitCell &ucell)
void expect_empty_atoms_excluded (const vdw::VdwResult &reference, const vdw::VdwResult &ghost, int reference_nat)
stru_ deform_structure (const stru_ &base, int row, int col, double h)
double vdw_energy (stru_ &structure, const Input_para &input)
void expect_stress_matches_finite_strain (const stru_ &base, const Input_para &input)
 TEST_F (vdwd2Test, D2Default)
 TEST_F (vdwd2Test, WrongVdwType)
 TEST_F (vdwd2Test, D2ReadFile)
 TEST_F (vdwd2Test, D2ReadFileError)
 TEST_F (vdwd2Test, D2c6UniteVA6)
 TEST_F (vdwd2Test, D2r0UnitBohr)
 TEST_F (vdwd2Test, D2WrongUnit)
 TEST_F (vdwd2Test, D2RadiusUnitAngstrom)
 TEST_F (vdwd2Test, D2CutoffTypePeriod)
 TEST_F (vdwd2Test, D2R0ZeroQuit)
 TEST_F (vdwd2Test, D2GetEnergy)
 TEST_F (vdwd2Test, D2GetForce)
 TEST_F (vdwd2Test, D2GetStress)
 TEST_F (vdwd2Test, D2StressMatchesFiniteStrain)
 TEST_F (vdwd2Test, EmptyAtomsAreExcluded)
 TEST_F (vdwd3Test, AutomaticXcInferenceFromPseudopotential)
 TEST_F (vdwd3Test, FullyCustomParametersDoNotRequireKnownFunctional)
 TEST_F (vdwd3Test, D30GetEnergy)
 TEST_F (vdwd3Test, D30LibxcFunctionalName)
 TEST_F (vdwd3Test, D30GetForce)
 TEST_F (vdwd3Test, D30GetStress)
 TEST_F (vdwd3Test, EmptyAtomsAreExcluded)
 TEST_F (vdwd3Test, D3bjGetEnergy)
 TEST_F (vdwd3Test, D3bjGetForce)
 TEST_F (vdwd3Test, D3bjGetStress)
 TEST_F (vdwd3Test, D30StressMatchesFiniteStrain)
 TEST_F (vdwd3Test, D3bjStressMatchesFiniteStrain)
 TEST_F (vdwd3abcTest, InconsistentPseudopotentialXcIsRejected)
 TEST_F (vdwd3abcTest, D30GetEnergy)
 TEST_F (vdwd3abcTest, D30GetForce)
 TEST_F (vdwd3abcTest, D30GetStress)
 TEST_F (vdwd3abcTest, D3bjGetEnergy)
 TEST_F (vdwd3abcTest, D3bjGetForce)
 TEST_F (vdwd3abcTest, D3bjGetStress)
 TEST_F (vdwd3abcTest, D30StressMatchesFiniteStrain)
 TEST_F (vdwd3abcTest, D3bjStressMatchesFiniteStrain)
 TEST_F (vdwd3abcTest, EmptyAtomsAreExcludedWithThreeBodyTerm)
int main (int argc, char **argv)

Function Documentation

◆ ClearUcell()

void ClearUcell ( UnitCell & ucell)
Here is the caller graph for this function:

◆ construct_two_si_with_ghost()

void construct_two_si_with_ghost ( UnitCell & ucell)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_ucell()

void construct_ucell ( stru_ & stru,
UnitCell & ucell )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deform_structure()

stru_ deform_structure ( const stru_ & base,
int row,
int col,
double h )
Here is the caller graph for this function:

◆ expect_empty_atoms_excluded()

void expect_empty_atoms_excluded ( const vdw::VdwResult & reference,
const vdw::VdwResult & ghost,
int reference_nat )
Here is the caller graph for this function:

◆ expect_stress_matches_finite_strain()

void expect_stress_matches_finite_strain ( const stru_ & base,
const Input_para & input )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )

◆ TEST_F() [1/37]

TEST_F ( vdwd2Test ,
D2c6UniteVA6  )
Here is the call graph for this function:

◆ TEST_F() [2/37]

TEST_F ( vdwd2Test ,
D2CutoffTypePeriod  )
Here is the call graph for this function:

◆ TEST_F() [3/37]

TEST_F ( vdwd2Test ,
D2Default  )
Here is the call graph for this function:

◆ TEST_F() [4/37]

TEST_F ( vdwd2Test ,
D2GetEnergy  )
Here is the call graph for this function:

◆ TEST_F() [5/37]

TEST_F ( vdwd2Test ,
D2GetForce  )
Here is the call graph for this function:

◆ TEST_F() [6/37]

TEST_F ( vdwd2Test ,
D2GetStress  )
Here is the call graph for this function:

◆ TEST_F() [7/37]

TEST_F ( vdwd2Test ,
D2r0UnitBohr  )
Here is the call graph for this function:

◆ TEST_F() [8/37]

TEST_F ( vdwd2Test ,
D2R0ZeroQuit  )
Here is the call graph for this function:

◆ TEST_F() [9/37]

TEST_F ( vdwd2Test ,
D2RadiusUnitAngstrom  )
Here is the call graph for this function:

◆ TEST_F() [10/37]

TEST_F ( vdwd2Test ,
D2ReadFile  )
Here is the call graph for this function:

◆ TEST_F() [11/37]

TEST_F ( vdwd2Test ,
D2ReadFileError  )
Here is the call graph for this function:

◆ TEST_F() [12/37]

TEST_F ( vdwd2Test ,
D2StressMatchesFiniteStrain  )
Here is the call graph for this function:

◆ TEST_F() [13/37]

TEST_F ( vdwd2Test ,
D2WrongUnit  )
Here is the call graph for this function:

◆ TEST_F() [14/37]

TEST_F ( vdwd2Test ,
EmptyAtomsAreExcluded  )
Here is the call graph for this function:

◆ TEST_F() [15/37]

TEST_F ( vdwd2Test ,
WrongVdwType  )
Here is the call graph for this function:

◆ TEST_F() [16/37]

TEST_F ( vdwd3abcTest ,
D30GetEnergy  )
Here is the call graph for this function:

◆ TEST_F() [17/37]

TEST_F ( vdwd3abcTest ,
D30GetForce  )
Here is the call graph for this function:

◆ TEST_F() [18/37]

TEST_F ( vdwd3abcTest ,
D30GetStress  )
Here is the call graph for this function:

◆ TEST_F() [19/37]

TEST_F ( vdwd3abcTest ,
D30StressMatchesFiniteStrain  )
Here is the call graph for this function:

◆ TEST_F() [20/37]

TEST_F ( vdwd3abcTest ,
D3bjGetEnergy  )
Here is the call graph for this function:

◆ TEST_F() [21/37]

TEST_F ( vdwd3abcTest ,
D3bjGetForce  )
Here is the call graph for this function:

◆ TEST_F() [22/37]

TEST_F ( vdwd3abcTest ,
D3bjGetStress  )
Here is the call graph for this function:

◆ TEST_F() [23/37]

TEST_F ( vdwd3abcTest ,
D3bjStressMatchesFiniteStrain  )
Here is the call graph for this function:

◆ TEST_F() [24/37]

TEST_F ( vdwd3abcTest ,
EmptyAtomsAreExcludedWithThreeBodyTerm  )
Here is the call graph for this function:

◆ TEST_F() [25/37]

TEST_F ( vdwd3abcTest ,
InconsistentPseudopotentialXcIsRejected  )
Here is the call graph for this function:

◆ TEST_F() [26/37]

TEST_F ( vdwd3Test ,
AutomaticXcInferenceFromPseudopotential  )
Here is the call graph for this function:

◆ TEST_F() [27/37]

TEST_F ( vdwd3Test ,
D30GetEnergy  )
Here is the call graph for this function:

◆ TEST_F() [28/37]

TEST_F ( vdwd3Test ,
D30GetForce  )
Here is the call graph for this function:

◆ TEST_F() [29/37]

TEST_F ( vdwd3Test ,
D30GetStress  )
Here is the call graph for this function:

◆ TEST_F() [30/37]

TEST_F ( vdwd3Test ,
D30LibxcFunctionalName  )
Here is the call graph for this function:

◆ TEST_F() [31/37]

TEST_F ( vdwd3Test ,
D30StressMatchesFiniteStrain  )
Here is the call graph for this function:

◆ TEST_F() [32/37]

TEST_F ( vdwd3Test ,
D3bjGetEnergy  )
Here is the call graph for this function:

◆ TEST_F() [33/37]

TEST_F ( vdwd3Test ,
D3bjGetForce  )
Here is the call graph for this function:

◆ TEST_F() [34/37]

TEST_F ( vdwd3Test ,
D3bjGetStress  )
Here is the call graph for this function:

◆ TEST_F() [35/37]

TEST_F ( vdwd3Test ,
D3bjStressMatchesFiniteStrain  )
Here is the call graph for this function:

◆ TEST_F() [36/37]

TEST_F ( vdwd3Test ,
EmptyAtomsAreExcluded  )
Here is the call graph for this function:

◆ TEST_F() [37/37]

TEST_F ( vdwd3Test ,
FullyCustomParametersDoNotRequireKnownFunctional  )
Here is the call graph for this function:

◆ vdw_energy()

double vdw_energy ( stru_ & structure,
const Input_para & input )
Here is the call graph for this function:
Here is the caller graph for this function: