26 const std::string& pwname,
27 const std::string& pwmultname,
33 app_log() <<
" PWBasis::" << pwmultname <<
" is found " << std::endl;
34 h5basisgroup.
read(
gvecs,
"/electrons/kpoint_0/gvectors");
37 throw std::runtime_error(
" PWBasis::readbasis Basis is missing.");
63 bool sameTwist =
dot(dang, dang) < std::numeric_limits<RealType>::epsilon();
88 app_log() <<
" PWBasis::TwistAngle (unit) =" <<
twist << std::endl;
91 std::vector<GIndex_t> gvecCopy(
gvecs);
98 for (
int ig = 0, newig = 0; ig < ngIn; ig++)
109 gvecs.push_back(gvecCopy[ig]);
118 gvecs.push_back(gvecCopy[ig]);
131 #if defined(PWBASIS_USE_RECURSIVE) void resize(size_type n, Type_t val=Type_t())
Resize the container.
a class that defines a supercell in D-dimensional Euclean space.
PosType twist
twist angle in reduced
helper functions for EinsplineSetBuilder
MakeReturn< UnaryNode< FnFabs, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t abs(const Vector< T1, C1 > &l)
void setTwistAngle(const PosType &tang)
set the twist angle
std::vector< GIndex_t > gvecs_shifted
Reduced coordinates with offset gvecs_shifted[][idim]=gvecs[][idim]+maxg[idim].
void resize(size_type n, size_type m)
Resize the container.
int maxmaxg
max of maxg[i]
SingleParticlePos k_cart(const SingleParticlePos &kin) const
conversion of a reciprocal-vector
void trimforecut()
Remove basis elements if kinetic energy > ecut.
std::vector< GIndex_t > gvecs
gvecs in reduced coordiates
int readbasis(hdf_archive &h5basisgroup, RealType ecutoff, const ParticleLayout &lat, const std::string &pwname="planewaves", const std::string &pwmultname="multipliers", bool resizeContainer=true)
Read basisset from hdf5 file.
int NumPlaneWaves
total number of basis functions
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
void read(T &data, const std::string &aname)
read the data from the group aname and check status runtime error is issued on I/O error ...
std::vector< RealType > minusModKplusG2
Declaration of Plane-wave basis set.
PosType twist_cart
twist angle in cartesian
std::vector< PosType > kplusgvecs_cart
std::vector< int > inputmap