From dab55ffe133ec393863762b7bc97508d44a286d3 Mon Sep 17 00:00:00 2001 From: Cody Melton Date: Thu, 9 Mar 2023 13:23:00 -0700 Subject: [PATCH] change SOECPComponent variables to follow standards --- src/QMCHamiltonians/ECPComponentBuilder.2.cpp | 6 +-- src/QMCHamiltonians/SOECPComponent.cpp | 42 +++++++++---------- src/QMCHamiltonians/SOECPComponent.h | 12 +++--- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/QMCHamiltonians/ECPComponentBuilder.2.cpp b/src/QMCHamiltonians/ECPComponentBuilder.2.cpp index 6ffa2b03b3..ac1c9dc48c 100644 --- a/src/QMCHamiltonians/ECPComponentBuilder.2.cpp +++ b/src/QMCHamiltonians/ECPComponentBuilder.2.cpp @@ -135,7 +135,7 @@ void ECPComponentBuilder::buildSemiLocalAndLocal(std::vector& semiPt // we may not know which one is local yet. std::vector angList; - std::vector angListSO; //For spin-orbit, if it exists + std::vector angListSO; //For spin-orbit, if it exists std::vector vpsPtr; std::vector vpsoPtr; //For spin-orbit, if it exists. Lmax = -1; @@ -364,8 +364,8 @@ void ECPComponentBuilder::buildSO(const std::vector& angList, app->spline(); pp_so->add(angList[l], app); } - NumSO = angList.size(); - pp_so->Rmax_ = rmax; + NumSO = angList.size(); + pp_so->setRmax(rmax); } bool ECPComponentBuilder::parseCasino(const std::string& fname, xmlNodePtr cur) diff --git a/src/QMCHamiltonians/SOECPComponent.cpp b/src/QMCHamiltonians/SOECPComponent.cpp index 3884440f6e..408b250b6a 100644 --- a/src/QMCHamiltonians/SOECPComponent.cpp +++ b/src/QMCHamiltonians/SOECPComponent.cpp @@ -20,32 +20,32 @@ namespace qmcplusplus { SOECPComponent::SOECPComponent() - : lmax_(0), nchannel_(0), nknot_(0), sknot_(0), total_knots_(0), Rmax_(-1), VP_(nullptr) + : lmax_(0), nchannel_(0), nknot_(0), sknot_(0), total_knots_(0), rmax_(-1), vp_(nullptr) {} SOECPComponent::~SOECPComponent() { for (int i = 0; i < sopp_m_.size(); i++) delete sopp_m_[i]; - if (VP_) - delete VP_; + if (vp_) + delete vp_; } void SOECPComponent::print(std::ostream& os) {} void SOECPComponent::initVirtualParticle(const ParticleSet& qp) { - assert(VP_ == nullptr); + assert(vp_ == nullptr); outputManager.pause(); - VP_ = new VirtualParticleSet(qp, total_knots_); + vp_ = new VirtualParticleSet(qp, total_knots_); outputManager.resume(); } void SOECPComponent::deleteVirtualParticle() { - if (VP_) - delete VP_; - VP_ = nullptr; + if (vp_) + delete vp_; + vp_ = nullptr; } void SOECPComponent::add(int l, RadialPotentialType* pp) @@ -59,8 +59,8 @@ SOECPComponent* SOECPComponent::makeClone(const ParticleSet& qp) SOECPComponent* myclone = new SOECPComponent(*this); for (int i = 0; i < sopp_m_.size(); i++) myclone->sopp_m_[i] = sopp_m_[i]->makeClone(); - if (VP_) - myclone->VP_ = new VirtualParticleSet(qp, total_knots_); + if (vp_) + myclone->vp_ = new VirtualParticleSet(qp, total_knots_); return myclone; } @@ -145,10 +145,10 @@ SOECPComponent::RealType SOECPComponent::evaluateOne(ParticleSet& W, RealType sold = W.spins[iel]; buildTotalQuadrature(r, dr, sold); - if (VP_) + if (vp_) { - VP_->makeMovesWithSpin(W, iel, deltaV_, deltaS_, true, iat); - Psi.evaluateRatios(*VP_, psiratio_); + vp_->makeMovesWithSpin(W, iel, deltaV_, deltaS_, true, iat); + Psi.evaluateRatios(*vp_, psiratio_); } else for (int iq = 0; iq < total_knots_; iq++) @@ -200,11 +200,11 @@ void SOECPComponent::mw_evaluateOne(const RefVectorWithLeader& s ResourceCollection& collection) { auto& soecp_component_leader = soecp_component_list.getLeader(); - if (soecp_component_leader.VP_) + if (soecp_component_leader.vp_) { // Compute ratios with VP - RefVectorWithLeader vp_list(*soecp_component_leader.VP_); - RefVectorWithLeader const_vp_list(*soecp_component_leader.VP_); + RefVectorWithLeader vp_list(*soecp_component_leader.vp_); + RefVectorWithLeader const_vp_list(*soecp_component_leader.vp_); RefVector> deltaV_list; RefVector> deltaS_list; RefVector> psiratios_list; @@ -222,8 +222,8 @@ void SOECPComponent::mw_evaluateOne(const RefVectorWithLeader& s component.buildTotalQuadrature(job.ion_elec_dist, job.ion_elec_displ, sold); - vp_list.push_back(*component.VP_); - const_vp_list.push_back(*component.VP_); + vp_list.push_back(*component.vp_); + const_vp_list.push_back(*component.vp_); deltaV_list.push_back(component.deltaV_); deltaS_list.push_back(component.deltaS_); psiratios_list.push_back(component.psiratio_); @@ -291,11 +291,11 @@ SOECPComponent::RealType SOECPComponent::evaluateValueAndDerivatives(ParticleSet //Now we have all the spin and spatial quadrature points acculated to use in evaluation //Now we need to obtain dlogpsi and dlogpsi_vp - if (VP_) + if (vp_) { // Compute ratios with VP - VP_->makeMovesWithSpin(W, iel, deltaV_, deltaS_, true, iat); - Psi.evaluateDerivRatios(*VP_, optvars, psiratio_, dratio_); + vp_->makeMovesWithSpin(W, iel, deltaV_, deltaS_, true, iat); + Psi.evaluateDerivRatios(*vp_, optvars, psiratio_, dratio_); } else for (int iq = 0; iq < total_knots_; iq++) diff --git a/src/QMCHamiltonians/SOECPComponent.h b/src/QMCHamiltonians/SOECPComponent.h index d73383b9e9..66ed70e305 100644 --- a/src/QMCHamiltonians/SOECPComponent.h +++ b/src/QMCHamiltonians/SOECPComponent.h @@ -52,7 +52,7 @@ class SOECPComponent : public QMCTraits int sknot_; int total_knots_; //spin + spatial knots ///Maximum cutoff the non-local pseudopotential - RealType Rmax_; + RealType rmax_; ///Angular momentum map aligned_vector angpp_m_; ///Non-Local part of the pseudo-potential @@ -76,7 +76,7 @@ class SOECPComponent : public QMCTraits //scratch spaces used by evaluateValueAndDerivative Matrix dratio_; Vector dlogpsi_vp_; - VirtualParticleSet* VP_; + VirtualParticleSet* vp_; //This builds the full quadrature grid for the Simpsons rule used for spin integrals as well as //the spatial quadrature. In this function, it specifies the deltaS_ and deltaV_ for all the quadrature points and sets the interal weights @@ -139,14 +139,14 @@ class SOECPComponent : public QMCTraits void initVirtualParticle(const ParticleSet& qp); void deleteVirtualParticle(); - inline void setRmax(RealType rmax) { Rmax_ = rmax; } - inline RealType getRmax() const { return Rmax_; } - inline void setLmax(int Lmax) { lmax_ = Lmax; } + inline void setRmax(RealType rmax) { rmax_ = rmax; } + inline RealType getRmax() const { return rmax_; } + inline void setLmax(int lmax) { lmax_ = lmax; } inline int getLmax() const { return lmax_; } inline int getNknot() const { return nknot_; } inline int getSknot() const { return sknot_; } - const VirtualParticleSet* getVP() const { return VP_; }; + const VirtualParticleSet* getVP() const { return vp_; }; friend struct ECPComponentBuilder; friend void copyGridUnrotatedForTest(SOECPComponent& nlpp);