![]() |
QMCPACK
|
Factory class to build a many-body wavefunction. More...
Inheritance diagram for HamiltonianFactory:
Collaboration diagram for HamiltonianFactory:Public Types | |
| using | PSetMap = std::map< std::string, const std::unique_ptr< ParticleSet > > |
| using | PsiPoolType = std::map< std::string, const std::unique_ptr< TrialWaveFunction > > |
Public Types inherited from MPIObjectBase | |
| using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
| HamiltonianFactory (const std::string &hName, ParticleSet &qp, const PSetMap &pset, const PsiPoolType &oset, Communicate *c) | |
| constructor More... | |
| bool | put (xmlNodePtr cur) |
| read from xmlNode More... | |
| void | renameProperty (const std::string &a, const std::string &b) |
| add a property whose name will be renamed by b More... | |
| void | renameProperty (std::string &a) |
| renamd a property More... | |
| QMCHamiltonian * | getH () const |
| get targetH More... | |
Public Member Functions inherited from MPIObjectBase | |
| MPIObjectBase (Communicate *c) | |
| constructor with communicator More... | |
| int | rank () const |
| return the rank of the communicator More... | |
| int | getGroupID () const |
| return the group id of the communicator More... | |
| Communicate * | getCommunicator () const |
| return myComm More... | |
| Communicate & | getCommRef () const |
| return a TEMPORARY reference to Communicate More... | |
| mpi_comm_type | getMPI () const |
| return MPI communicator if one wants to use MPI directly More... | |
| bool | is_manager () const |
| return true if the rank == 0 More... | |
| const std::string & | getName () const |
| return the name More... | |
| void | setName (const std::string &aname) |
Private Member Functions | |
| bool | build (xmlNodePtr cur) |
| process xmlNode to populate targetPsi More... | |
| void | addCoulombPotential (xmlNodePtr cur) |
| void | addForceHam (xmlNodePtr cur) |
| void | addPseudoPotential (xmlNodePtr cur) |
| void | addMPCPotential (xmlNodePtr cur, bool physical=false) |
Private Attributes | |
| int | PBCType |
| type of the lattice. 0=non-periodic, 1=periodic More... | |
| std::unique_ptr< QMCHamiltonian > | targetH |
| many-body wavefunction object More... | |
| ParticleSet & | targetPtcl |
| target ParticleSet More... | |
| const PSetMap & | ptclPool |
| reference to the PSetMap More... | |
| const PsiPoolType & | psiPool |
| reference to the TrialWaveFunction Pool More... | |
| std::string | psiName |
| name of the TrialWaveFunction More... | |
| std::map< std::string, std::string > | RenamedProperty |
| list of the old to new name More... | |
Additional Inherited Members | |
Protected Attributes inherited from MPIObjectBase | |
| Communicate * | myComm |
| pointer to Communicate More... | |
| std::string | ClassName |
| class Name More... | |
| std::string | myName |
| name of the object More... | |
Factory class to build a many-body wavefunction.
Definition at line 28 of file HamiltonianFactory.h.
| using PSetMap = std::map<std::string, const std::unique_ptr<ParticleSet> > |
Definition at line 31 of file HamiltonianFactory.h.
| using PsiPoolType = std::map<std::string, const std::unique_ptr<TrialWaveFunction> > |
Definition at line 32 of file HamiltonianFactory.h.
| HamiltonianFactory | ( | const std::string & | hName, |
| ParticleSet & | qp, | ||
| const PSetMap & | pset, | ||
| const PsiPoolType & | oset, | ||
| Communicate * | c | ||
| ) |
constructor
Definition at line 56 of file HamiltonianFactory.cpp.
References MPIObjectBase::ClassName, ParticleSet::getLattice(), MPIObjectBase::myName, HamiltonianFactory::PBCType, ParticleSet::set_quantum(), and HamiltonianFactory::targetPtcl.
|
private |
Definition at line 78 of file CoulombPotentialFactory.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::app_log(), qmcplusplus::app_summary(), PlatformSelector< KIND >::candidate_values(), qmcplusplus::DC_POS_OFFLOAD, ERRORMSG, ParticleSet::get(), ParticleSet::getCoordinates(), DynamicCoordinates::getKind(), OhmmsElementBase::getName(), ParticleSet::getTotalNum(), qmcplusplus::OMPTARGET, HamiltonianFactory::PBCType, HamiltonianFactory::ptclPool, OhmmsAttributeSet::put(), PlatformSelector< KIND >::selectPlatform(), HamiltonianFactory::targetH, and HamiltonianFactory::targetPtcl.
Referenced by HamiltonianFactory::build().
|
private |
Definition at line 157 of file CoulombPotentialFactory.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::app_log(), ERRORMSG, ParticleSet::get(), OhmmsElementBase::getName(), HamiltonianFactory::PBCType, HamiltonianFactory::psiPool, HamiltonianFactory::ptclPool, OhmmsAttributeSet::put(), TrialWaveFunction::put(), HamiltonianFactory::renameProperty(), HamiltonianFactory::targetH, and HamiltonianFactory::targetPtcl.
Referenced by HamiltonianFactory::build().
|
private |
Definition at line 41 of file CoulombPotentialFactory.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::app_summary(), Communicate::barrier_and_abort(), ParticleSet::Density_G, MPIObjectBase::myComm, OhmmsAttributeSet::put(), HamiltonianFactory::renameProperty(), HamiltonianFactory::targetH, and HamiltonianFactory::targetPtcl.
Referenced by HamiltonianFactory::build().
|
private |
Definition at line 233 of file CoulombPotentialFactory.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::app_summary(), qmcplusplus::app_warning(), ERRORMSG, ParticleSet::get(), MPIObjectBase::myComm, HamiltonianFactory::psiName, HamiltonianFactory::psiPool, HamiltonianFactory::ptclPool, ECPotentialBuilder::put(), OhmmsAttributeSet::put(), HamiltonianFactory::renameProperty(), HamiltonianFactory::targetH, and HamiltonianFactory::targetPtcl.
Referenced by HamiltonianFactory::build().
|
private |
process xmlNode to populate targetPsi
main hamiltonian build function
| cur | element node <hamiltonian> |
| buildtree | if true, build xml tree for a reuse |
A valid hamiltonian node contains
Definition at line 88 of file HamiltonianFactory.cpp.
References OhmmsAttributeSet::add(), HamiltonianFactory::addCoulombPotential(), HamiltonianFactory::addForceHam(), HamiltonianFactory::addMPCPotential(), HamiltonianFactory::addPseudoPotential(), APP_ABORT, qmcplusplus::app_log(), qmcplusplus::app_summary(), ParticleSet::get(), OhmmsElementBase::getName(), TrialWaveFunction::getSPOMap(), getXMLAttributeValue(), MPIObjectBase::myComm, MPIObjectBase::myName, HamiltonianFactory::PBCType, processChildren(), HamiltonianFactory::psiName, HamiltonianFactory::psiPool, HamiltonianFactory::ptclPool, OhmmsAttributeSet::put(), Communicate::rank(), HamiltonianFactory::renameProperty(), HamiltonianFactory::targetH, and HamiltonianFactory::targetPtcl.
Referenced by HamiltonianFactory::put().
|
inline |
get targetH
Definition at line 58 of file HamiltonianFactory.h.
References HamiltonianFactory::targetH.
Referenced by qmcplusplus::create_CN_Hamiltonian(), and qmcplusplus::TEST_CASE().
| bool put | ( | xmlNodePtr | cur | ) |
read from xmlNode
Definition at line 429 of file HamiltonianFactory.cpp.
References HamiltonianFactory::build().
Referenced by qmcplusplus::create_CN_Hamiltonian(), and qmcplusplus::TEST_CASE().
| void renameProperty | ( | const std::string & | a, |
| const std::string & | b | ||
| ) |
add a property whose name will be renamed by b
| a | target property whose name should be replaced by b |
| b | new property name |
Definition at line 418 of file HamiltonianFactory.cpp.
References HamiltonianFactory::RenamedProperty.
Referenced by HamiltonianFactory::addForceHam(), HamiltonianFactory::addMPCPotential(), HamiltonianFactory::addPseudoPotential(), and HamiltonianFactory::build().
| void renameProperty | ( | std::string & | a | ) |
renamd a property
| a | current name |
If a is found among the RenamedProperty, a is replaced,
Definition at line 420 of file HamiltonianFactory.cpp.
References HamiltonianFactory::RenamedProperty.
|
private |
type of the lattice. 0=non-periodic, 1=periodic
Definition at line 71 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::addCoulombPotential(), HamiltonianFactory::addForceHam(), HamiltonianFactory::build(), and HamiltonianFactory::HamiltonianFactory().
|
private |
name of the TrialWaveFunction
Definition at line 82 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::addPseudoPotential(), and HamiltonianFactory::build().
|
private |
reference to the TrialWaveFunction Pool
Definition at line 79 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::addForceHam(), HamiltonianFactory::addPseudoPotential(), and HamiltonianFactory::build().
|
private |
reference to the PSetMap
Definition at line 77 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::addCoulombPotential(), HamiltonianFactory::addForceHam(), HamiltonianFactory::addPseudoPotential(), and HamiltonianFactory::build().
|
private |
list of the old to new name
Definition at line 85 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::renameProperty().
|
private |
many-body wavefunction object
Definition at line 73 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::addCoulombPotential(), HamiltonianFactory::addForceHam(), HamiltonianFactory::addMPCPotential(), HamiltonianFactory::addPseudoPotential(), HamiltonianFactory::build(), and HamiltonianFactory::getH().
|
private |
target ParticleSet
Definition at line 75 of file HamiltonianFactory.h.
Referenced by HamiltonianFactory::addCoulombPotential(), HamiltonianFactory::addForceHam(), HamiltonianFactory::addMPCPotential(), HamiltonianFactory::addPseudoPotential(), HamiltonianFactory::build(), and HamiltonianFactory::HamiltonianFactory().