JDFTx  1.7.0
Ionic system

Files

file  IonicDynamicsParams.h
 
file  IonicMinimizer.h
 
file  IonInfo.h
 
file  LatticeMinimizer.h
 
file  SpeciesInfo_internal.h
 

Classes

class  IonicDynamics
 Ionic dynamics (AIMD) More...
 
struct  IonicDynamicsParams
 Parameters to control IonicDynamics. More...
 
struct  IonicGradient
 Vector space entry for ionic minimization (forces) More...
 
class  IonicMinimizer
 Ionic minimizer. More...
 
class  IonInfo
 Container class for ionic system: collection of species, each with several atoms. More...
 
struct  LatticeGradient
 Vector-space entry for lattice minimization (stress and forces): More...
 
class  LatticeMinimizer
 Lattice minimizer. More...
 
class  SpeciesInfo
 Pseudopotential for a species of ions, and atom positions and other properties for that species. More...
 
struct  StaticLoopYlmTag< lm >
 
struct  StaticLoopYlm< Nlm, Functor, lmInv >
 
struct  StaticLoopYlm< Nlm, Functor, 0 >
 
struct  nAugmentFunctor
 
struct  nAugmentGradFunctor
 

Macros

#define SwitchTemplate_Nlm(Nlm, func, args)
 

Enumerations

enum  CoordsType { CoordsLattice , CoordsCartesian }
 Coordinate system for ion positions.
 
enum  ForcesOutputCoords { ForcesCoordsPositions , ForcesCoordsLattice , ForcesCoordsCartesian , ForcesCoordsContravariant }
 Coordinate system for force output:
 
enum  coreOverlapCheck { additive , vector , none }
 Check method used for determining whether pseudopotential cores overlap.
 
enum  VDWstyle { VDW_D2 , VDW_D3 }
 Style of vdW correction.
 

Functions

void axpy (double alpha, const IonicGradient &x, IonicGradient &y)
 accumulate operation: Y += alpha*X
 
double dot (const IonicGradient &x, const IonicGradient &y)
 inner product
 
IonicGradient clone (const IonicGradient &x)
 create a copy
 
void randomize (IonicGradient &x)
 initialize with random numbers
 
IonicGradient operator* (const matrix3<> &, const IonicGradient &)
 coordinate transformations
 
void axpy (double alpha, const LatticeGradient &x, LatticeGradient &y)
 accumulate operation: Y += alpha*X
 
double dot (const LatticeGradient &x, const LatticeGradient &y)
 inner product
 
LatticeGradient clone (const LatticeGradient &x)
 create a copy
 
void randomize (LatticeGradient &x)
 initialize with random numbers
 
template<int l, int m>
__hostanddev__ void Vnl_calc (int n, int atomStride, int nAtoms, const vector3<> &k, const vector3< int > *iGarr, const matrix3<> &G, const vector3<> *pos, const RadialFunctionG &VnlRadial, complex *Vnl)
 Compute Vnl at specific l and m for several atomic positions.
 
template<int l, int m>
__hostanddev__ void VnlPrime_calc (int n, int atomStride, int nAtoms, const vector3<> &k, const vector3< int > *iGarr, const matrix3<> &G, const vector3<> *pos, const RadialFunctionG &VnlRadial, const vector3<> &dir, const vector3<> &RTdir, complex *Vprime)
 Derivative of Vnl with respect to cartesian direction dir.
 
template<int l, int m>
__hostanddev__ void VnlStress_calc (int n, int atomStride, int nAtoms, const vector3<> &k, const vector3< int > *iGarr, const matrix3<> &G, const vector3<> *pos, const RadialFunctionG &VnlRadial, int iDir, int jDir, complex *V_RRT_ij)
 Derivative of Vnl with respect to lattice vectors (V_RRT) for specified iDir,jDir Cartesian components.
 
void Vnl (int nbasis, int atomStride, int nAtoms, int l, int m, const vector3<> k, const vector3< int > *iGarr, const matrix3<> G, const vector3<> *pos, const RadialFunctionG &VnlRadial, complex *Vnl, const vector3<> *derivDir=0, const int stressDir=-1)
 
void Vnl_gpu (int nbasis, int atomStride, int nAtoms, int l, int m, const vector3<> k, const vector3< int > *iGarr, const matrix3<> G, const vector3<> *pos, const RadialFunctionG &VnlRadial, complex *Vnl, const vector3<> *derivDir=0, const int stressDir=-1)
 
template<int Nlm, typename Functor >
__hostanddev__ void staticLoopYlm (Functor *f)
 
template<int Nlm>
__hostanddev__ void nAugment_calc (int i, const vector3< int > &iG, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, complex *n, const vector3<> *atposDeriv)
 
void nAugment (int Nlm, const vector3< int > S, const matrix3<> &G, int iGstart, int iGstop, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, complex *n, const vector3<> *atposDeriv)
 
void nAugment_gpu (int Nlm, const vector3< int > S, const matrix3<> &G, int iGstart, int iGstop, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, complex *n, const vector3<> *atposDeriv)
 
void setNagIndex (const vector3< int > &S, const matrix3<> &G, int iGstart, int iGstop, int nCoeff, double dGinv, uint64_t *nagIndex, size_t *nagIndexPtr)
 (In MPI mode, only a subset of G-vectors are indexed on each process (to correspond to nAUgment))
 
template<int Nlm>
__hostanddev__ void nAugmentGrad_calc (uint64_t key, const vector3< int > &S, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, const complex *ccE_n, double *E_nRadial, vector3< complex * > E_atpos, array< complex *, 6 > E_RRT, const vector3<> *atposDeriv=0, bool dummyGpuThread=false)
 
void nAugmentGrad (int Nlm, const vector3< int > S, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, const complex *ccE_n, double *E_nRadial, vector3< complex * > E_atpos, array< complex *, 6 > E_RRT, const vector3<> *atposDeriv, const uint64_t *nagIndex, const size_t *nagIndexPtr)
 
void nAugmentGrad_gpu (int Nlm, const vector3< int > S, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, const complex *ccE_n, double *E_nRadial, vector3< complex * > E_atpos, array< complex *, 6 > E_RRT, const vector3<> *atposDeriv, const uint64_t *nagIndex, const size_t *nagIndexPtr)
 
__hostanddev__ complex getSG_calc (const vector3< int > &iG, const int &nAtoms, const vector3<> *atpos)
 Get structure factor for a specific iG, given a list of atoms.
 
void getSG (const vector3< int > S, int nAtoms, const vector3<> *atpos, double invVol, complex *SG)
 Get structure factor in a ScalarFieldTilde's data/dataGpu (with 1/vol normalization factor)
 
void getSG_gpu (const vector3< int > S, int nAtoms, const vector3<> *atpos, double invVol, complex *SG)
 
__hostanddev__ void updateLocal_calc (int i, const vector3< int > &iG, const matrix3<> &GGT, complex *Vlocps, complex *rhoIon, complex *nChargeball, complex *nCore, complex *tauCore, int nAtoms, const vector3<> *atpos, double invVol, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 Calculate local pseudopotential, ionic density and chargeball due to one species at a given G-vector.
 
void updateLocal (const vector3< int > S, const matrix3<> GGT, complex *Vlocps, complex *rhoIon, complex *n_chargeball, complex *n_core, complex *tauCore, int nAtoms, const vector3<> *atpos, double invVol, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
void updateLocal_gpu (const vector3< int > S, const matrix3<> GGT, complex *Vlocps, complex *rhoIon, complex *n_chargeball, complex *n_core, complex *tauCore, int nAtoms, const vector3<> *atpos, double invVol, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
__hostanddev__ void gradLocalToSG_calc (int i, const vector3< int > iG, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, complex *ccgrad_SG, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 Propagate (complex conjugates of) gradients w.r.t Vlocps, rhoIon etc to complex conjugate gradient w.r.t SG (the strutcure factor)
 
void gradLocalToSG (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, complex *ccgrad_SG, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
void gradLocalToSG_gpu (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, complex *ccgrad_SG, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
__hostanddev__ void gradSGtoAtpos_calc (int i, const vector3< int > iG, const vector3<> atpos, const complex *ccgrad_SG, vector3< complex * > grad_atpos)
 
void gradSGtoAtpos (const vector3< int > S, const vector3<> atpos, const complex *ccgrad_SG, vector3< complex * > grad_atpos)
 
void gradSGtoAtpos_gpu (const vector3< int > S, const vector3<> atpos, const complex *ccgrad_SG, vector3< complex * > grad_atpos)
 
__hostanddev__ void gradLocalToStress_calc (int i, const vector3< int > iG, const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, symmetricMatrix3<> *grad_RRT, int nAtoms, const vector3<> *atpos, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 Propagate (complex conjugates of) gradients w.r.t Vlocps, rhoIon etc to symmetric gradient w.r.t lattice vectors.
 
void gradLocalToStress (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, symmetricMatrix3<> *grad_RRT, int nAtoms, const vector3<> *atpos, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
void gradLocalToStress_gpu (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, symmetricMatrix3<> *grad_RRT, int nAtoms, const vector3<> *atpos, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 

Detailed Description

Macro Definition Documentation

◆ SwitchTemplate_Nlm

#define SwitchTemplate_Nlm (   Nlm,
  func,
  args 
)
Value:
switch(Nlm) \
{ case 1: func<1> args; break; \
case 4: func<4> args; break; \
case 9: func<9> args; break; \
case 16: func<16> args; break; \
case 25: func<25> args; break; \
case 49: func<49> args; break; \
default: fprintf(stderr, "Invalid Nlm in SwitchTemplate_Nlm"); exit(1); \
}

Function Documentation

◆ gradSGtoAtpos_calc()

__hostanddev__ void gradSGtoAtpos_calc ( int  i,
const vector3< int >  iG,
const vector3<>  atpos,
const complex ccgrad_SG,
vector3< complex * >  grad_atpos 
)

Propagate the complex conjugate gradient w.r.t the structure factor to the given atomic position this is still per G-vector, need to sum grad_atpos over G to get the force on that atom

◆ Vnl()

void Vnl ( int  nbasis,
int  atomStride,
int  nAtoms,
int  l,
int  m,
const vector3<>  k,
const vector3< int > *  iGarr,
const matrix3<>  G,
const vector3<> *  pos,
const RadialFunctionG VnlRadial,
complex Vnl,
const vector3<> *  derivDir = 0,
const int  stressDir = -1 
)

Driver routine for calculating Vnl for all basis functions If derivDir is non-null, then calculate derivative with respect to Cartesian k oprojected along *derivDir If stressDir is >=0, then calculate (i,j) component of dVnl/dR . RT where stressDir = 3*i+j