QMCPACK
LCAOSpinorBuilder.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) 2020 QMCPACK developers.
6 //
7 // File developed by: Cody A. Melton, cmelton@sandia.gov, Sandia National Laboratories
8 //
9 // File created by: Cody A. Melton, cmelton@sandia.gov, Sandia National Laboratories
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #ifndef QMCPLUSPLUS_SOA_LCAO_SPINOR_BUILDER_H
14 #define QMCPLUSPLUS_SOA_LCAO_SPINOR_BUILDER_H
15 
17 
18 namespace qmcplusplus
19 {
20 /** @file LCAOSpinorBuidler.h
21  *
22  * Derives from LCAOrbitalBuilder.h. Overrides createSPOSetFromXML method to read up and
23  * down channel from HDF5 and construct SpinorSet
24  *
25  */
27 {
28 public:
29  /** constructor
30  * \param els reference to the electrons
31  * \param ions reference to the ions
32  *
33  * Derives from LCAOrbitalBuilder, but will require an h5_path to be set
34  */
35  LCAOSpinorBuilder(ParticleSet& els, ParticleSet& ions, Communicate* comm, xmlNodePtr cur);
36 
37  /** creates and returns SpinorSet
38  *
39  * Creates an up and down LCAOrbitalSet
40  * calls LCAOSpinorBuilder::loadMO to build up and down from the H5 file
41  * registers up and down into a SpinorSet and returns
42  */
43  std::unique_ptr<SPOSet> createSPOSetFromXML(xmlNodePtr cur) override;
44 
45 private:
46  /** load the up and down MO sets
47  *
48  * checks to make sure not PBC and initialize the Occ vector.
49  * call putFromH5 to parse the up and down MO coefficients
50  */
51  bool loadMO(LCAOrbitalSet& up, LCAOrbitalSet& dn, xmlNodePtr cur);
52 
53  /** parse h5 file for spinor info
54  *
55  * assumes the h5 file has KPTS_0/eigenset_0(_imag) for the real/imag part of up component of spinor
56  * assumes the h5 file as KPTS_0/eigenset_1(_imag) for the real/imag part of dn component of spinor
57  * reads the various coefficient matricies and broadcast
58  * after this, we have up/dn LCAOrbitalSet that can be registered to the SpinorSet
59  */
60  bool putFromH5(LCAOrbitalSet& up, LCAOrbitalSet& dn, xmlNodePtr);
61 };
62 } // namespace qmcplusplus
63 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
LCAOSpinorBuilder(ParticleSet &els, ParticleSet &ions, Communicate *comm, xmlNodePtr cur)
constructor
SPOSetBuilder using new LCAOrbitalSet and Soa versions.
std::unique_ptr< SPOSet > createSPOSetFromXML(xmlNodePtr cur) override
creates and returns SpinorSet
Wrapping information on parallelism.
Definition: Communicate.h:68
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
bool loadMO(LCAOrbitalSet &up, LCAOrbitalSet &dn, xmlNodePtr cur)
load the up and down MO sets
bool putFromH5(LCAOrbitalSet &up, LCAOrbitalSet &dn, xmlNodePtr)
parse h5 file for spinor info
class to handle linear combinations of basis orbitals used to evaluate the Dirac determinants.
Definition: LCAOrbitalSet.h:30