38 <parameter name="lattice" units="bohr"> 43 <parameter name="bconds"> 46 <parameter name="LR_dim_cutoff" > 6 </parameter> 50 const char*
pset_xml = R
"(<particleset name="e" random="yes"> 51 <group name="u" size="4" mass="1.0"> 52 <parameter name="charge" > -1 </parameter> 53 <parameter name="mass" > 1.0 </parameter> 55 <group name="d" size="4" mass="1.0"> 56 <parameter name="charge" > -1 </parameter> 57 <parameter name="mass" > 1.0 </parameter> 62 const char*
gofr_xml = R
"(<estimator type="gofr" name="gofr" rmax="2.0" num_bin="99" />)"; 69 std::cout << std::fixed;
70 std::cout << std::setprecision(8);
78 std::cout <<
"\n\n\ntest_paircorr:: START\n";
91 pset_builder.
put(pset_xml_root);
96 std::cout <<
"cheeeee " << elec->
getLattice().R << std::endl;
130 elec->
get(std::cout);
133 const int ee_table_id = elec->
addTable(*elec);
139 std::string name = elec->
getName();
144 paircorr.
put(gofr_xml_root);
154 const int Nbins = 99;
159 std::cout <<
"gofr:\n";
160 std::cout << std::fixed;
161 std::cout << std::setprecision(6);
162 std::cout << std::setw(4) <<
"i" 163 <<
" " << std::setw(12) <<
"r" 164 <<
" " << std::setw(12) <<
"uu" 165 <<
" " << std::setw(12) <<
"ud" 166 <<
" " << std::setw(12) <<
"dd" 168 std::cout <<
"============================================================\n";
170 for (
int i = 0; i < Nbins; i++)
172 std::cout << std::setw(4) << i <<
" " << std::setw(12) << i * deltaR <<
" " << std::setw(12) << gofr[i] <<
" " 173 << std::setw(12) << gofr[i + Nbins] <<
" " << std::setw(12) << gofr[i + 2 * Nbins] <<
"\n";
185 const int bin_nn = 49;
186 REQUIRE(std::fabs(gofr[49] - 0.00000000) < eps);
187 REQUIRE(std::fabs(gofr[148] - 23.6361163) < eps);
188 REQUIRE(std::fabs(gofr[247] - 0.00000000) < eps);
191 const int bin_2n = 70;
192 REQUIRE(std::fabs(gofr[70] - 15.536547) < eps);
193 REQUIRE(std::fabs(gofr[169] - 0.0000000) < eps);
194 REQUIRE(std::fabs(gofr[268] - 15.536547) < eps);
197 REQUIRE(std::fabs(gofr[85] - 0.00000000) < eps);
198 REQUIRE(std::fabs(gofr[184] - 2.6408410) < eps);
199 REQUIRE(std::fabs(gofr[283] - 0.0000000) < eps);
201 std::cout <<
"test_paircorr:: STOP\n";
204 TEST_CASE(
"Pair Correlation Pair Index",
"[hamiltonian]")
class that handles xmlDoc
const std::string & getName() const
return the name
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
bool put(xmlNodePtr cur)
process an xml element
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
TEST_CASE("complex_helper", "[type_traits]")
bool put(xmlNodePtr cur) override
Read the input parameter.
void update(bool skipSK=false)
update the internal data
Communicate * Controller
Global Communicator for a process.
Declaration of CrystalLattice<T,D>
PropertySetType PropertyList
name-value map of Walker Properties
Wrapping information on parallelism.
int addTable(const ParticleSet &psrc, DTModes modes=DTModes::ALL_OFF)
add a distance table
Specialized paritlce class for atomistic simulations.
REQUIRE(std::filesystem::exists(filename))
ParticleSet * getParticleSet(const std::string &pname)
get a named ParticleSet
Manage a collection of ParticleSet objects.
void addObservables(PropertySetType &plist)
auto & getDistTable(int table_ID) const
get a distance table by table_ID
Buffer_t Collectables
observables in addition to those registered in Properties/PropertyList
bool readSimulationCellXML(xmlNodePtr cur)
initialize the supercell shared by all the particle sets
bool parseFromString(const std::string_view data)
static int gen_pair_id(const int ig, const int jg, const int ns)
generate the unique pair id from the group ids of particle i and j and the number of species ...
const auto & getLattice() const
bool get(std::ostream &os) const override
dummy. For satisfying OhmmsElementBase.
Declaration of ParticleSetPool.