36 case RepresentationPolicy::Diabatic:
39 case RepresentationPolicy::Adiabatic:
64 case NADForcePolicy::BO: {
69 case NADForcePolicy::EHR: {
76 for (
int b = 0, bj = 0, b0FF = 0, b0bb = 0; b < B;
78 double* Forceb0 =
Force + b0FF;
80 for (
int j = 0, bjbb = b0bb; j < J; ++j, ++bj, bjbb +=
Dimension::FF) {
86 double* dVj =
Force + jFF;
95 case NADForcePolicy::CV: {
102 for (
int b = 0, bj = 0, b0FF = 0, b0bb = 0; b < B;
104 double* Forceb0 =
Force + b0FF;
107 for (
int j = 0, bjbb = b0bb; j < J; ++j, ++bj, bjbb +=
Dimension::FF) {
114 double* dVj =
Force + jFF;
120 double fdotR = 0.0e0, PdotR = 0.0e0;
131 case NADForcePolicy::BOSD:
132 case NADForcePolicy::CVSD: {
139 for (
int b = 0, bj = 0, b0FF = 0, b0bb = 0; b < B;
141 double* Forceb0 =
Force + b0FF;
144 for (
int j = 0, bjbb = b0bb; j < J; ++j, ++bj, bjbb +=
Dimension::FF) {
151 double* dVj =
Force + jFF;
159 double fdotR = 0.0e0, vnorm2 = 0.0e0;
161 if (vnorm2 > 1.0e-8) {
initialization kernels for electonic DOFs
this file provides Kernel_NADForce class enabling force weighting from electronic properties.
#define ARRAY_TRACE2(_B, _C, _n1, _n2)
static int * occ_nuc
weighting density for nuclear force
static kids_complex * rho_nuc
virtual Status & executeKernel_impl(Status &stat)
Virtual function to execute the kernel implementation.
virtual void setInputParam_impl(std::shared_ptr< Param > &PM)
Virtual function to set input parameters for the kernel implementation.
static NADForcePolicy::_type NADForce_type
virtual Status & initializeKernel_impl(Status &stat)
Virtual function to initialize the kernel implementation.
virtual void setInputDataSet_impl(std::shared_ptr< DataSet > &DS)
Virtual function to set input data set for the kernel implementation.
virtual int getType() const
Get the type of the kernel.
virtual const std::string getName()
Get the name of the kernel.
static RepresentationPolicy::_type nuc_repr_type
representation for nuclear dynamics
static int transform(kids_complex *A, kids_real *T, int fdim, RepresentationPolicy::_type from, RepresentationPolicy::_type to, SpacePolicy::_type Stype)
static RepresentationPolicy::_type inp_repr_type
representatioin for input (quantities)
std::shared_ptr< Param > _param
Shared pointer to the Param object associated with this kernel.
Status & executeKernel(Status &stat)
Execute the kernel's algorithm and those of its children.
provide utils for debugging the code
#define LOC()
show the location information for debug
VARIABLE< kids_real > fproj
VARIABLE< kids_real > fadd
VARIABLE< kids_bint > succ
VARIABLE< kids_real > grad
std::size_t NFF
Product of N, F, and F (N * F * F).
std::size_t N
Number of nuclear degrees of freedom.
std::size_t P
Number of parallel trajectories (swarms of trajectories) in each Monte Carlo run.
std::size_t F
Number of electronic degrees of freedom.
std::size_t Fadd1
F plus 1 (F + 1).
std::size_t FF
Product of F and F (F * F).
< http://warp.povusers.org/FunctionParser/fparser.html
double kids_real
Alias for real number type.
std::complex< double > kids_complex
Alias for complex number type.
kids_real ARRAY_TRACE2_DIAG(kids_real *B, kids_real *C, size_t N1, size_t N2)
Compute the trace of the diagonal elements of the matrix product B * C for real matrices.
kids_real ARRAY_TRACE2_OFFD(kids_real *B, kids_real *C, size_t N1, size_t N2)
Compute the trace of the off-diagonal elements of the matrix product B * C for real matrices.
constexpr uint32_t hash(const char *str)
declaration of variables used in the program.