forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
227 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
source/module_hamilt_lcao/hamilt_lcaodft/fvl_dphi_gamma.cpp
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
source/module_hamilt_lcao/hamilt_lcaodft/pulay_force_stress/pulay_force_stress.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma once | ||
#include "module_basis/module_nao/two_center_bundle.h" | ||
#include "module_elecstate/module_dm/density_matrix.h" | ||
#include "module_hamilt_lcao/module_gint/gint_gamma.h" | ||
#include "module_hamilt_lcao/module_gint/gint_k.h" | ||
#include "module_elecstate/potentials/potential_new.h" | ||
#include "module_cell/unitcell.h" | ||
#include "module_hamilt_lcao/hamilt_lcaodft/stress_tools.h" | ||
#ifndef TGINT_H | ||
#define TGINT_H | ||
template <typename T> | ||
struct TGint; | ||
template <> struct TGint<double> { using type = Gint_Gamma; }; | ||
template <> struct TGint<std::complex<double>> { using type = Gint_k; }; | ||
#endif | ||
|
||
/// calculate $Tr[D*dH/dx]$ and $1/V Tr[D*(dH/dx_a*x_b)] | ||
/// where D can be either density matrix or energy density matrix | ||
namespace PulayForceStress | ||
{ | ||
/// for 2-center terms | ||
// template<typename TK, typename TR> | ||
// void cal_pulay_fs( | ||
// ModuleBase::matrix& f, ///< [out] force | ||
// ModuleBase::matrix& s, ///< [out] stress | ||
// const elecstate::DensityMatrix<TK, TR>& dm, ///< [in] density matrix or energy density matrix | ||
// const UnitCell& ucell, ///< [in] unit cell | ||
// const ForceStressArrays& fsr, | ||
// const bool& isstress | ||
// ); | ||
/// for grid terms | ||
template<typename TK, typename TR> | ||
void cal_pulay_fs( | ||
ModuleBase::matrix& f, ///< [out] force | ||
ModuleBase::matrix& s, ///< [out] stress | ||
const elecstate::DensityMatrix<TK, TR>& dm, ///< [in] density matrix or energy density matrix | ||
const UnitCell& ucell, ///< [in] unit cell | ||
const elecstate::Potential* pot, ///< [in] potential on grid | ||
typename TGint<TK>::type& gint, ///< [in] Gint object | ||
const bool& isforce, | ||
const bool& isstress, | ||
const bool& set_dmr_gint = true | ||
); | ||
} | ||
|
||
#include "pulay_force_stress.hpp" |
Oops, something went wrong.