QMCPACK
SkPot.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
8 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
9 //
10 // File created by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 /** @file SkPot.h
15  * @brief Declare SkPot
16  */
17 #ifndef QMCPLUSPLUS_SK_POT_H
18 #define QMCPLUSPLUS_SK_POT_H
20 #include "LongRange/StructFact.h"
21 namespace qmcplusplus
22 {
23 /** SkPot evaluate the structure factor of the target particleset
24  *
25  * <estimator name="sk" type="sk" debug="no"/>
26  */
27 class SkPot : public OperatorBase
28 {
29 public:
30  SkPot(ParticleSet& elns);
31 
32  std::string getClassName() const override { return "SkPot"; }
33  void resetTargetParticleSet(ParticleSet& P) override;
34 
35  [[noreturn]] Return_t evaluate(ParticleSet& P) override;
36 
37  bool put(xmlNodePtr cur) override;
38  bool get(std::ostream& os) const override;
39  std::unique_ptr<OperatorBase> makeClone(ParticleSet& qp, TrialWaveFunction& psi) final;
40 
41  inline void FillFk()
42  {
43  for (int ki = 0; ki < NumK; ki++)
44  {
45  RealType k = dot(sourcePtcl->getSimulationCell().getKLists().kpts_cart[ki],
46  sourcePtcl->getSimulationCell().getKLists().kpts_cart[ki]);
47  k = std::sqrt(k) - K_0;
48  Fk[ki] = OneOverN * V_0 * std::exp(-k * k);
49  // app_log()<<ki<<": "<<Fk[ki] << std::endl;
50  }
51  }
52 
53 
54 protected:
56  /** number of species */
58  /** number of kpoints */
59  int NumK;
60  /** number of kshells */
61  int MaxKshell;
62  /** normalization factor */
64  /** kshell counters */
65  std::vector<int> Kshell;
66  /** instantaneous structure factor */
67  std::vector<RealType> Kmag;
68  /** 1.0/degenracy for a ksell */
69  std::vector<RealType> OneOverDnk;
70  /** \f$rho_k = \sum_{\alpha} \rho_k^{\alpha} \f$ for species index \f$\alpha\f$ */
74  /** resize the internal data
75  *
76  * The argument list is not completed
77  */
78  void resize();
79 
80  bool hdf5_out;
81 };
82 
83 } // namespace qmcplusplus
84 #endif
Vector< ComplexType > RhokTot
for species index
Definition: SkPot.h:71
bool put(xmlNodePtr cur) override
Read the input parameter.
Definition: SkPot.cpp:48
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
SkPot(ParticleSet &elns)
Definition: SkPot.cpp:21
void FillFk()
Definition: SkPot.h:41
RealType V_0
Definition: SkPot.h:73
int NumSpecies
number of species
Definition: SkPot.h:57
Declaration of OperatorBase.
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
Definition: SkPot.cpp:64
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
Definition: SkPot.cpp:42
const auto & getSimulationCell() const
Definition: ParticleSet.h:250
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
std::vector< RealType > OneOverDnk
1.0/degenracy for a ksell
Definition: SkPot.h:69
Vector< RealType > Fk
Definition: SkPot.h:72
std::vector< int > Kshell
kshell counters
Definition: SkPot.h:65
std::vector< RealType > Kmag
instantaneous structure factor
Definition: SkPot.h:67
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
RealType OneOverN
normalization factor
Definition: SkPot.h:63
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
std::string getClassName() const override
return class name
Definition: SkPot.h:32
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
int NumK
number of kpoints
Definition: SkPot.h:59
Class to represent a many-body trial wave function.
RealType K_0
Definition: SkPot.h:73
ParticleSet * sourcePtcl
Definition: SkPot.h:55
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
SkPot evaluate the structure factor of the target particleset.
Definition: SkPot.h:27
void resize()
resize the internal data
int MaxKshell
number of kshells
Definition: SkPot.h:61
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
Definition: SkPot.cpp:40
BareKineticEnergy::Return_t Return_t