29 :
ForceBase(ions, elns), d_aa_ID(ions.addTable(ions)), d_ei_ID(elns.addTable(ions))
32 name_ =
"Ceperley_Force_Base";
49 for (
size_t ipart = 1; ipart <
n_nuc_; ipart++)
51 const auto& dist = d_aa.getDistRow(ipart);
52 const auto& displ = d_aa.getDisplRow(ipart);
53 for (
size_t jpart = 0; jpart < ipart; ++jpart)
56 RealType r3zz = Zat[jpart] * Zat[ipart] * rinv * rinv * rinv;
57 forces[jpart] += r3zz * displ[jpart];
58 forces[ipart] -= r3zz * displ[jpart];
68 for (
int k = 0; k <
N_basis; k++)
71 for (
int j = 0; j <
N_basis; j++)
91 for (
int jat = 0; jat <
n_el_; jat++)
93 const auto& dist = d_ab.getDistRow(jat);
94 const auto& displ = d_ab.getDisplRow(jat);
95 for (
int iat = 0; iat <
n_nuc_; iat++)
99 RealType zoverr3 = Qat[jat] * Zat[iat] / (r * r * r);
102 forces_[iat] += zoverr3 * displ[iat];
107 for (
int q = 0; q <
N_basis; q++)
113 forces_[iat] += g_q * displ[iat];
122 std::string ionionforce(
"yes");
125 attr.
add(ionionforce,
"add_ion_ion_");
127 add_ion_ion_ = (ionionforce ==
"yes") || (ionionforce ==
"true");
128 app_log() <<
"ionionforce = " << ionionforce << std::endl;
132 fcep_param_set.
add(
Rcut,
"rcut");
134 fcep_param_set.
add(
m_exp,
"weight_exp");
135 fcep_param_set.
put(cur);
136 app_log() <<
" ForceCeperley Parameters" << std::endl;
137 app_log() <<
" ForceCeperley::Rcut=" <<
Rcut << std::endl;
139 app_log() <<
" ForceCeperley::m_exp=" <<
m_exp << std::endl;
146 return std::make_unique<ForceCeperley>(*this);
void resize(size_type n, Type_t val=Type_t())
Resize the container.
MatrixA::value_type invert_matrix(MatrixA &M, bool getdet=true)
invert a matrix
ForceCeperley(ParticleSet &ions, ParticleSet &elns)
helper functions for EinsplineSetBuilder
const DistanceTableAA & getDistTableAA(int table_ID) const
get a distance table by table_ID and dyanmic_cast to DistanceTableAA
QTBase::RealType RealType
ParticleSet::ParticlePos forces_
Matrix< FullPrecRealType > Sinv
bool put(xmlNodePtr cur)
assign attributes to the set
void resize(size_type n, size_type m)
Resize the container.
void update(bool skipSK=false)
update the internal data
Attaches a unit to a Vector for IO.
bool put(std::istream &is) override
read from std::istream
const DistanceTableAB & getDistTableAB(int table_ID) const
get a distance table by table_ID and dyanmic_cast to DistanceTableAB
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)
std::string name_
name of this object
Specialized paritlce class for atomistic simulations.
class to handle a set of parameters
bool add_ion_ion_
Determines if ion-ion force will be added to electron-ion force in derived force estimators. If false, forces_ion_ion_=0.0.
void product(const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C)
static function to perform C=AB for real matrices
Final class and should not be derived.
class to handle a set of attributes of an xmlNode
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
declaration of ProgressReportEngine
ParticleScalar Z
charge of each particle
ParticleSet::Scalar_t ParticleScalar
typedef for the ParticleScalar
void add(PDT &aparam, const std::string &aname_in, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new parameter corresponding to an xmlNode <parameter>
FullPrecRealType Return_t
type of return value of evaluate
Define determinant operators.
Class to represent a many-body trial wave function.
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
Vector< FullPrecRealType > h
void evaluate_IonIon(ParticleSet::ParticlePos &forces) const
ParticleSet::ParticlePos forces_ion_ion_
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
Vector< FullPrecRealType > c
bool put(xmlNodePtr cur) override
Read the input parameter.