QMCPACK
SPOInfo.cpp
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: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
8 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
9 //
10 // File created by: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 #include "SPOInfo.h"
15 #include <limits>
16 
17 
18 namespace qmcplusplus
19 {
21 
22 const int SPOInfo::no_index = -1;
23 const int SPOInfo::no_degeneracy = -1;
24 const RealType SPOInfo::no_energy = std::numeric_limits<RealType>::max();
25 
27 {
28  index = no_index;
30  energy = no_energy;
31 }
32 
33 SPOInfo::SPOInfo(int orb_index, RealType en)
34 {
35  index = orb_index;
37  energy = en;
38 }
39 
40 void SPOInfo::report(const std::string& pad) const
41 {
42  if (has_index())
43  app_log() << pad << "index = " << index << std::endl;
44  else
45  app_log() << pad << "index = not assigned" << std::endl;
46  if (has_energy())
47  app_log() << pad << "energy = " << energy << std::endl;
48  else
49  app_log() << pad << "energy = not assigned" << std::endl;
50  if (has_degeneracy())
51  app_log() << pad << "degeneracy = " << degeneracy << std::endl;
52  else
53  app_log() << pad << "degeneracy = not assigned" << std::endl;
54  app_log().flush();
55 }
56 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
std::ostream & app_log()
Definition: OutputManager.h:65
bool has_energy() const
Definition: SPOInfo.h:54
static const RealType no_energy
Definition: SPOInfo.h:34
bool has_degeneracy() const
Definition: SPOInfo.h:56
int index
original orbital index in the maximal basis
Definition: SPOInfo.h:37
RealType energy
energy of the orbital (in Hartree units)
Definition: SPOInfo.h:43
static const int no_index
Definition: SPOInfo.h:32
static const int no_degeneracy
Definition: SPOInfo.h:33
bool has_index() const
Definition: SPOInfo.h:52
void report(const std::string &pad="") const
write orbital info to stdout
Definition: SPOInfo.cpp:40
QMCTraits::RealType RealType
int degeneracy
energetic degeneracy of the orbital
Definition: SPOInfo.h:40
QMCTraits::RealType RealType
Definition: SPOInfo.h:25