source: pcp/src/pseudo.h@ 64ca279

Last change on this file since 64ca279 was a0bcf1, checked in by Frederik Heber <heber@…>, 17 years ago

-initial commit
-Minimum set of files needed from ESPACK SVN repository
-Switch to three tantamount package parts instead of all relating to pcp (as at some time Ralf's might find inclusion as well)

  • Property mode set to 100644
File size: 4.8 KB
Line 
1#ifndef pseudo_h
2#define pseudo_h
3
4/** \file pseudo.h
5 * Header file for \ref pseudo.c
6 *
7 * Contains declarations of the functions implemented in \ref pseudo.c and
8 * the PseudoPot'ential structure.
9 *
10 Project: ParallelCarParrinello
11 Jan Hamaekers
12 2000
13
14 File: pseudo.h
15 $Id: pseudo.h,v 1.19 2007/02/05 16:04:23 foo Exp $
16*/
17
18
19// use double precision fft when we have it
20#ifdef HAVE_CONFIG_H
21#include <config.h>
22#endif
23
24#ifdef HAVE_DFFTW_H
25#include "dfftw.h"
26#else
27#include "fftw.h"
28#endif
29
30struct Problem;
31
32/** Pseudopotential structure.
33 * Contains paramaters, form factors, positions of the for the plane waves
34 * needed Pseudopotentials which merge fixed core electron with the core itself.
35 */
36struct PseudoPot {
37 double *zval;
38 int *nang;
39 /* Potential Parameters */
40 double **r; //!< radial mesh for ion type
41 double ***v; //!< Potential
42 double ***R; //!< Radial density \f$R_{I_s,l} (r)\f$
43 double ***v_loc; //!< Pseudo potentials \f$\nu^{ps}_{I_s} \f$, read from file in InitPseudoRead()
44 double *clog; //!< Integration width in Simpson formula, see Simps()
45 int *mmax; //!< array of number of mesh points (array size of \a **r and others) over ion type
46 /* Gaussian */
47 double **core;
48 double **rc;
49 double ***rcl;
50 double ***al;
51 double ***bl;
52 double **FacGauss; //!< Gaussian form factor \f$\phi_{I_s}^{Gauss} (G)\f$
53 /* formfacLocPot */
54 int Mmax; //!< maximum number of mesh points of all ion types
55 double **integrand2; //!< temporary array containing integrand in evaluating form factor **vpsloc
56 double *integrand; //!< temporary array containing integrand in evaluating form factor **vpsloc
57 double *integrand1; //!< temporary array containing partial integrand in evaluating form factor **vpsloc
58 double ***phi_ps_nl; //!< non-local pseudopotential form factor for certain ion type, l and m (2l+1 ones per l!) value \f$\phi^{ps,nl}_{I_s,l,m}\f$, \sa FormFacNonLocPot()
59 //double ***phi_ps_nl_a; //!< sort of backup array for PseudoPot::pkg
60 double **phi_ps_loc; //!< local pseudo potential form factor for certain ion type on reciprocal mesh \f$\phi^{ps,loc}_{I_s}\f$, \sa FormFacLocPot()
61 double **wNonLoc; //!< non-local pseudopotential weight \f$w^{nl}_{I_s,l}\f$, \sa FormFacNonLocPot()
62 fftw_complex ****fnl; //!< factors of non-local pseudopotential energy, array containing \f$f^{nl}_{i,I_s,I_a,l,m}\f$ for a certain wave function i, ion of type, ion of type \f$I_s \f$and lm value, \sa CalculateNonLocalEnergyNoRT()
63 fftw_complex ***CDfnl; //!< factors of non-local pseudopotential energy for conjugate direction (CD), array for a certain ion type, ion of type and lm value
64 fftw_complex *dfnl; //!< temporary array containing part (of one process) of non-local factors \f$f^{nl}_{i,I_s,I_a,l,m}\f$ for a certain ion of type, , \sa CalculateNonLocalEnergyNoRT()
65 fftw_complex *VCoulombc; //!< Coulomb or Hartree potential and local pseudopotenial \f$\frac{4\pi}{V|G|^2} |\hat{\widetilde{n}}(G)|^2 + \sum_{I_s} S_{I_s} (G) \phi^{ps,loc}_{I_s} (G) \hat{n}^\ast (G)\f$
66 fftw_complex ***ei; //!< topmost (zeroth) level: \f$\exp(i R_{I_s,I_a}\cdot G)\f$, three-dimensional array over ion type, ion of type and grid vector in LatticeLevel::GArray
67 fftw_complex ***expiGR; //!< standard level: \f$\exp(i(G \cdot R))\f$ for each ion type, ion of type and grid vector, \sa CalcExpiGR()
68 int *lm_end; //!< array of over ion type \f$I_S\f$ containing its topmost m eigenvalue
69 int lm_endmax; //!< maximum m eigenvalue of all ion types
70 double *rr;
71 fftw_complex *t;
72 struct Plans *P;
73 double fac1sqrt2PI; //!< factor: \f$\frac{1}{\sqrt{2\pi}}\f$
74 double fac1sqrtPI; //!< factor: \f$\frac{1}{\sqrt{\pi}}\f$
75 double **corewave;
76 double **formfCore; //!< partial core form factor, \f$\phi^{pc}_{I_s}(G)\f$
77 enum CoreCorrType corecorr;
78};
79
80
81void InitPseudoRead(struct Problem *P, char *mainname);
82void ChangePseudoToLevUp(struct Problem *P);
83void UpdatePseudoToNewWaves(struct Problem *P);
84void RemovePseudoRead(struct Problem *P);
85void CalculateNonLocalEnergyNoRT(struct Problem *P, const int i);
86void CalculateNonLocalEnergyUseRT(struct Problem *P, const int i);
87
88void CalculateGaussSelfEnergyNoRT(struct Problem *P, struct PseudoPot *PP, struct Ions *I);
89void CalculateSomeEnergyAndHGNoRT(struct Problem *P);
90
91void CalculateAddNLPot(struct Problem *P, fftw_complex *HNL, fftw_complex ***fnl, double PsiFactor);
92void CalculateCDfnl(struct Problem *P, fftw_complex *ConDir, fftw_complex ***CDfnl);
93void CalculateIonLocalForce(struct Problem *P);
94void CalculateIonNonLocalForce(struct Problem *P);
95#endif
Note: See TracBrowser for help on using the repository browser.