64 std::stringstream filebuffer;
65 skfile.open(
"rhok_IonIon.dat");
67 ss <<
" rho_" << i <<
"_r" 68 <<
" rho_" << i <<
"_i";
70 filebuffer << ss.str() << std::endl;
72 for (
int k = 0; k <
NumK; k++)
84 filebuffer <<
" " << rho_r <<
" " << rho_i;
87 filebuffer << std::endl;
90 skfile << filebuffer.str();
108 for (
int k = 0; k <
NumK; k++)
123 for (
int k = 0; k <
NumK; k++, kc++)
125 for (
int k = 0; k <
NumK; k++, kc++)
127 for (
int k = 0; k <
NumK; k++, kc++)
132 for (
int k = 0; k <
NumK; k++)
146 std::vector<RealType> tmp(3 *
NumK);
147 collectables.
add(tmp.begin(), tmp.end());
153 for (
int i = 0; i <
NumK; i++)
155 std::stringstream sstr;
156 sstr <<
"rhok_e_e_" << i;
157 int id = plist.
add(sstr.str());
170 for (
int k = 0; k <
NumK; k++)
172 std::stringstream sstr1, sstr2;
173 sstr1 <<
"rhok_e_r_" << k;
174 sstr2 <<
"rhok_e_i_" << k;
175 int id = plist.
add(sstr1.str());
176 int id2 = plist.
add(sstr2.str());
185 for (
int i = 0; i <
NumK; i++)
187 std::stringstream sstr;
188 sstr <<
"rhok_e_e_" << i;
189 int id = plist.
add(sstr.str());
201 for (
int k = 0; k <
NumK; k++)
203 std::stringstream sstr1, sstr2;
204 sstr1 <<
"rhok_e_r_" << k;
205 sstr2 <<
"rhok_e_i_" << k;
206 int id = plist.
add(sstr1.str());
207 int id2 = plist.
add(sstr2.str());
231 h5desc.emplace_back(hdf_name /
"kpoints");
232 auto& ohKPoints = h5desc.back();
233 ohKPoints.addProperty(
const_cast<std::vector<PosType>&
>(
ions->
getSimulationCell().getKLists().kpts_cart),
"value",
237 std::vector<int> ng(1);
240 h5desc.emplace_back(hdf_name /
"rhok_e_e");
241 auto& ohRhoKEE = h5desc.back();
244 h5desc.emplace_back(hdf_name /
"rhok_e_r");
245 auto& ohRhoKER = h5desc.back();
248 h5desc.emplace_back(hdf_name /
"rhok_e_i");
249 auto& ohRhoKEI = h5desc.back();
256 std::string hdf5_flag =
"no";
257 std::string write_ionion_flag =
"no";
259 pAttrib.
add(hdf5_flag,
"hdf5");
260 pAttrib.
add(write_ionion_flag,
"writeionion");
262 if (hdf5_flag ==
"yes")
268 if (write_ionion_flag ==
"Yes" || write_ionion_flag ==
"yes")
270 app_log() <<
"SkAll: evaluateIonIon()\n";
282 app_log() <<
" SkAllEstimator Settings:\n";
283 app_log() <<
" ========================\n";
284 app_log() <<
" NumeSpecies " << std::setw(10) << std::setprecision(4) <<
NumeSpecies <<
"\n";
285 app_log() <<
" NumIonSpecies " << std::setw(10) << std::setprecision(4) <<
NumIonSpecies <<
"\n";
286 app_log() <<
" NumK " << std::setw(10) << std::setprecision(4) <<
NumK <<
"\n";
287 app_log() <<
" MaxKshell " << std::setw(10) << std::setprecision(4) <<
MaxKshell <<
"\n";
294 std::unique_ptr<SkAllEstimator> myclone = std::make_unique<SkAllEstimator>(*this);
std::vector< RealType > Kmag
instantaneous structure factor
void resize(size_type n, Type_t val=Type_t())
Resize the container.
void setParticlePropertyList(PropertySetType &plist, int offset) override
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
size_type size() const
return the size of the data
Matrix< RealType > rhok_r
2-D container for the phase
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
helper functions for EinsplineSetBuilder
size_t getTotalNum() const
Matrix< RealType > rhok_i
int my_index_
starting index of this object
bool put(xmlNodePtr cur)
assign attributes to the set
std::vector< T >::iterator begin()
iterators to use std algorithms
std::vector< RealType > OneOverDnk
1.0/degenracy for a kshell
Vectorized record engine for scalar properties.
bool put(xmlNodePtr cur) override
Read the input parameter.
Vector< RealType > RhokTot_i
std::vector< int > Kshell
kshell counters
for(int i=0;i< size_test;++i) CHECK(Approx(gauss_random_vals[offset_for_rs+i])
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
int getTotalNum() const
return the number of species
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
const auto & getSimulationCell() const
std::string name_
name of this object
Specialized paritlce class for atomistic simulations.
void addObservables(PropertySetType &plist)
int add(const std::string &aname)
class to handle a set of attributes of an xmlNode
Vector< RealType > values
const StructFact & getSK() const
return Structure Factor
Walker_t * t_walker_
reference to the current walker
Vector< RealType > RhokTot_r
for species index
bool get(std::ostream &os) const override
write about the class
Buffer_t Collectables
observables in addition to those registered in Properties/PropertyList
unsigned int NumK
number of kpoints
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
FullPrecRealType Return_t
type of return value of evaluate
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
Class to represent a many-body trial wave function.
int MaxKshell
number of kshells
FullPrecRealType Weight
Weight of the walker.
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
SkAllEstimator(ParticleSet &ions, ParticleSet &elns)
void accumulate_elements(IT1 first, IT1 last, IT2 res)
RealType OneOverN
normalization factor
std::bitset< 8 > update_mode_
set the current update mode