30 app_log() <<
" AGPDetermiant::resize checking size nup, ndown, basis " << nup <<
" " << ndown <<
" " <<
BasisSize 101 for (
int u = 0; u <
Nup; u++)
103 for (
int d = 0, jat =
Nup; d <
Ndown; d++, jat++)
109 for (
int d =
Ndown, unpaired = 0; d <
Nup; d++, unpaired++)
117 for (
int iat = 0; iat <
Nup; iat++)
119 for (
int d = 0, jat =
Nup; d <
Ndown; d++, jat++)
126 for (
int d =
Ndown, unpaired = 0; d <
Nup; d++, unpaired++)
136 myL[iat] = lap -
dot(rv, rv);
138 for (
int jat =
Nup, d = 0; jat <
NumPtcls; jat++, d++)
142 for (
int u = 0; u <
Nup; u++)
151 myL[jat] = lap -
dot(rv, rv);
238 for (
int d = 0, jat =
Nup; d <
Ndown; d++, jat++)
242 for (
int d =
Ndown, unpaired = 0; d <
Nup; d++, unpaired++)
250 for (
int u = 0; u <
Nup; u++)
263 for (
int d = 0, jat =
Nup; d <
Ndown; d++, jat++)
269 for (
int d =
Ndown, unpaired = 0; d <
Nup; d++, unpaired++)
283 for (
int d = 0, jat =
Nup; d <
Ndown; d++, jat++)
288 for (
int d =
Ndown, unpaired = 0; d <
Nup; d++, unpaired++)
293 for (
int jat =
Nup, d = 0; jat <
NumPtcls; jat++, d++)
307 for (
int u = 0; u <
Nup; u++)
321 for (
int u = 0; u <
Nup; u++)
326 for (
int kat = 0; kat <
Nup; kat++)
343 APP_ABORT(
"Incomplete AGPDeterminant::acceptMove Turn on useDrift ");
376 for (
int d = 0; d <
Ndown; d++)
387 for (
int kat = 0; kat <
Nup; kat++)
399 auto myclone = std::make_unique<AGPDeterminant>(
nullptr);
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Vector< ValueType > workV2
void resize(int nup, int ndown)
reset the size: with the number of particles and number of orbtials
Container_t::iterator begin()
ValueMatrix phiT
Transient data for gradient and laplacian evaluation.
virtual void evaluateForWalkerMove(const ParticleSet &P)=0
GradVector dPhi
dphi[i] the gradient of the i-th basis set
ValueVector Phi
phi[i] the value of the i-th basis set
helper functions for EinsplineSetBuilder
ValueVector phiTv
value of single-particle orbital for particle-by-particle update
T dot(const T *restrict a, const T *restrict b, int n, TRES res=TRES())
dot product
void InverseUpdateByRow(Matrix< T, ALLOC > &Minv, Vector< T, ALLOC > &newrow, Vector< T, ALLOC > &rvec, Vector< T, ALLOC > &rvecinv, int rowchanged, T c_ratio)
update a inverse matrix by a row substitution
ValueMatrix d2Y
store laplacians
ParticleSet::SingleParticleValue * FirstAddressOfG
address of myG[0][0]
ParticleSet::ParticleLaplacian myL
void copyFromBuffer(ParticleSet &P, WFBufferType &buf) override
For particle-by-particle move.
BasisSetType::ValueType * LastAddressOfdVD
address of FirstAddressOfdVD+OHMMS_DIM*Ndown*Nup
PsiValue curRatio
current ratio
ParticleSet::ParticleGradient myG
ParticleSet::ParticleGradient myG_temp
void resize(size_type n, size_type m)
Resize the container.
base class for a basis set
Attaches a unit to a Vector for IO.
std::complex< T > convertValueToLog(const std::complex< T > &logpsi)
evaluate log(psi) as log(|psi|) and phase
ParticleLaplacian L
laplacians of the particles
MatA::value_type DetRatioByRow(const MatA &Minv, const VecB &newv, int rowchanged)
determinant ratio with a row substitution
std::complex< QTFull::RealType > LogValue
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
virtual BasisSetBase * makeClone() const =0
clone the basis set
Declaration of AGPDeterminant for pairing orbitals.
Specialized paritlce class for atomistic simulations.
BasisSetType * GeminalBasis
void ratioDown(ParticleSet &P, int iat)
BasisSetType::ValueType * FirstAddressOfdVD
address of dpsiD[0][0]
ValueMatrix d2psiU
temporary determinant-related matrix for laplacians
void product(const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C)
static function to perform C=AB for real matrices
Matrix< ValueType > psiM_temp
typename OrbitalSetTraits< T >::ValueType ValueType
BasisSetType::ValueType * LastAddressOfdY
address of FirstAddressOfdY+NumPtcls*BasisSize
void InvertWithLog(T *restrict x, int n, int m, T *restrict work, int *restrict pivot, std::complex< T1 > &logdet)
BasisSetType::ValueType * FirstAddressOfdY
address of dY[0][0]
ParticleGradient G
gradients of the particles
MatA::value_type DetRatioByColumn(const MatA &Minv, const VecB &newv, int colchanged)
determinant ratio with a column substitution
ValueMatrix Lambda
coefficient of the up/down block
BasisSetType::ValueType * FirstAddressOfdVU
address of dpsiU[0][0]
GradMatrix dpsiU
temporary determinant-related matrix for gradients
void acceptMove(ParticleSet &P, int iat, bool safe_to_delay=false) override
move was accepted, update the real container
void restore(int iat) override
move was rejected.
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
QTFull::ValueType PsiValue
int Nup
number of major spins
int BasisSize
size of the basis set
GradMatrix dY
store gradients
std::unique_ptr< WaveFunctionComponent > makeClone(ParticleSet &tqp) const override
make clone
~AGPDeterminant() override
default destructor
LogValue log_value_
Current .
IndexType getBasisSetSize() const
return the basis set size
Define determinant operators.
ParticleSet::SingleParticleValue * LastAddressOfG
address of FirstAddressOfG+OHMMS_DIM*NumPtcls
void ratioUp(ParticleSet &P, int iat)
Vector< ValueType > workV1
ValueMatrix LambdaUP
coefficient of the major block
Matrix< ValueType > psiM
psiM(j,i)
void evaluateLogAndStore(const ParticleSet &P)
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
LatticeGaussianProduct::ValueType ValueType
int Ndown
number of minor spins
ValueVector d2Phi
d2phi[i] the laplacian of the i-th basis set
void resize(int ntargets)
resize the container
int NumPtcls
Total number of particles.
PsiValue ratio(ParticleSet &P, int iat) override
return the ratio only for the iat-th partcle move
virtual void evaluateForPtclMove(const ParticleSet &P, int iat)=0
BasisSetType::ValueType * LastAddressOfdVU
address of FirstAddressOfdVU+OHMMS_DIM*Nup*Nup
Container_t::iterator end()
LogValue evaluateLog(const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override
Calculate the log value of the Dirac determinant for particles.
void registerData(ParticleSet &P, WFBufferType &buf) override
For particle-by-particle move.
AGPDeterminant(BasisSetType *bs=nullptr)
constructor
void put(std::complex< T1 > &x)
ParticleSet::ParticleLaplacian myL_temp
LogValue updateBuffer(ParticleSet &P, WFBufferType &buf, bool fromscratch=false) override
For particle-by-particle move.
void InverseUpdateByColumn(Matrix< T, ALLOC > &Minv, Vector< T, ALLOC > &newcol, Vector< T, ALLOC > &rvec, Vector< T, ALLOC > &rvecinv, int colchanged, T c_ratio)
void add(std::complex< T1 > &x)
int UpdateMode
current update mode
void get(std::complex< T1 > &x)