JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ionic system

Files

file  IonDynamicsParams.h
 
file  IonicMinimizer.h
 
file  IonInfo.h
 
file  LatticeMinimizer.h
 
file  SpeciesInfo_internal.h
 

Classes

class  IonDynamics
 Ionic dynamics (AIMD) More...
 
struct  IonDynamicsParams
 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  ConfiningPotentialType {
  ConfineLinear, ConfineQuadratic, ConfineCubic, ConfineSmoothLinear,
  ConfineNone
}
 Type of confining potential.
 
enum  DriftRemovalType { DriftNone, DriftVelocity, DriftMomentum }
 Strategy for eliminating drift. More...
 
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.
 

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 above with respect to Cartesian k in direction iDir.
 
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)
 
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)
 
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)
 
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)
 
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)
 
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, 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, 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, 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 wChargeball)
 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 wChargeball)
 
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 wChargeball)
 
__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 wChargeball)
 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 wChargeball)
 
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 wChargeball)
 
__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)
 

Detailed Description

Macro Definition Documentation

#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); \
}

Enumeration Type Documentation

Strategy for eliminating drift.

Enumerator
DriftNone 

No drift correction.

DriftVelocity 

Zero total velocity.

DriftMomentum 

Zero total momentum.

Function Documentation

__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

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 
)

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