subroutine mpi_sendrecv_replace
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University. This function is used in computing the coupling constant averaged exchange correlation hole. It is not used in version 1.00 of DoD Planewave, but will be needed to implement the Weighted Density Approximation in subsequent releases.
XL Fortran library function
Returns the complementary error function value of X
XL Fortran library function
Returns the gamma function value of X
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function is used internal to subroutine fermi.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function forms the dot product of A and B with a metric tensor GIJ.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function interpolates the value of the nonlocal pseudopotential of atom NA for angular momentum L at the radial position R, and returns it.
This function interpolates the valence charge density of atom NA at a distance G from the atom origin, and returns it. This function is superseded by function rgenq.
This function interpolates the charge density of atom |IA| at a distance G from the atom origin, and returns it. The sign of IA determines whether valence (> 0) or core (<= 0) charge density is returned.
This function is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This function computes the value of the local pseudopotential of atom NA at the reciprocal space radial postion G, and returns it.
This routine computes the number of bands in EIGVALS that are at or below the input energy level EMAX.
NE is the previous number of bands as input and the current number of bands as output. NEOLD returns the previous number of bands. NE1 is number of bands in EIGVALS. NEMAX is the maximum value of NE.
IERR returns the status: 0 if successful, nonzero otherwise.
EISPACK library subroutine
This subroutine finds those eigenvalues of a tridiagonal symmetric matrix which lie in a specified interval, using bisection.
BLACS library subroutine
This routine waits until all processes in the scope have called it.
BLACS library subroutine
This routine returns information about the BLACS context.
BLACS library subroutine
This routine frees the resources associated with the BLACS context.
BLACS library subroutine
This routine defines the process grid associated with the BLACS context.
BLACS library subroutine
This routine defines the coordinates of the input process number on the process grid.
BLACS library subroutine
This routine returns the process number and number of processes.
CDNATM constructs a starting charge density file "CDINP1" using overlapping atomic charge densities. These are from the Fourier components of the individual atoms interpolated by function rgenq.
The arguments are:
JSPINS: number of spins (1 for non-spin-polarized, 2 for spin-polarized)
ZFILL: the number of valence electrons
INIT: a flag telling CDNATM whether to actually write a CDINP1 file or just save the form factors for possible use in initializing the eigenvectors latter.
This routine computes the charge density in real space using the wave functions in VEC and the weighting of the energy bands in WG. The charge density is returned in CDNP. Implicitly, the charge density is only the contribution for the wave functions of a given k-point that are resident on the node.
NV is the number of planewaves in the basis set. NE is the number of wave functions on the node. MAPG maps the indices of the sorted planewaves to the Fourier transform grid with dimensions M1, M2, and M3.
This routine takes the unsymmetrized real space charge density in CDNR, and returns the symmetrized reciprocal charge density in CDN.
M1, M2, M3 are the Fourier transform dimensions.
This routine does the three-dimensional fast Fourier transform of values in DATA, returning the result in DATA. This routine is machine dependent and operates by calling vendor supplied (e.g. IBM ESSL) one dimensional FFT routines in the appropriate combination.
N1, N2, N3 are the dimensions of the transform. IFSET = 0 does nothing; IFSET > 0 indicates a Fourier transform; IFSET < 0 indicates an inverse Fourier transform.
This routine computes the total charge density and nonlocal pseudopotential contributions to the ionic forces. The weighted eigenvalue sum is returned in ESUM. Because the calculations are carried out on the various nodes, the results are recombined on the root node.
JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). EF is the Fermi energy. WSP is the spin weighting factor. TKB is the temperature broadening parameter k_B T. HFLD is the strength of the applied magnetic field. IO is the Fortran unit to which to write the charge density information. M1, M2, and M3 are the dimensions of the Fourier transform grid for the charge density. MX1, MX2, and MX3 are the dimensions of the Fourier transform grid for the nonlocal projection operators.
This subroutine is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This subroutine is used internal to subroutine vx1.
This subroutine is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
ESSL library routine
This routine computes a complex Fourier transform of the input data.
ScaLAPACK library subroutine
This routine initializes the descriptor array for the distributed arrays.
This routine calculates RMS distance between the input and output charge densities to quantify self-consistency.
M1, M2, M3 are the dimensions of the Fourier transform grid. JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). WSVOL is the volume of the unit cell
LAPACK library subroutine
This routine backtransforms the eigenvectors of the tridiagonal matrix to those of the symmetric matrix.
LAPACK library subroutine
This routine computes the Cholesky factorization of the input matrix.
ESSL library routine
This routine computes a real-to-complex Fourier transform of the input data.
ESSL library subroutine
This routine computes the eigenvalues and eigenvectors of the input matrix.
LAPACK library subroutine
This routine reduces the generalized eigenproblem to the standard eigenproblem.
LAPACK library subroutine
This routine computes the eigenvalues and eigenvectors of the generalized eigenproblem.
LAPACK library subroutine
This routine computes the eigenvalues of the input tridiagonal matrix.
LAPACK library subroutine
This routine computes the eigenvectors of the input tridiagonal matrix.
LAPACK library subroutine
This routine reduces the input symmetric matrix to tridiagonal form.
This routine calculates the local density exchange correlation potential and energy using a fit to Monte Carlo Data performed by J. Perdew.
FU is the up spin density. FD is the down spin density. VU is the up spin potential. VD is the down spin potential. EXC is the exchange correlation energy density.
This routine sequentially updates the eigenvectors for each special k-point in the irreducible Brillouin zone. The eigenvectors are read in and distributed across the nodes. Then the eigenvectors and eigenvalues are updated by subroutine eign. The updated eigenvectors are then written out.
JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). EMAX is the maximum allowable eigenvalue. M1, M2, M3 are the Fourier transform dimensions of the charge density grid; MX1, MX2, MX3 are the FFT dimensions of the nonlocal potential operator grid. IT is the number of refinement steps.
This routine computes the updated eigenvalues and eigenvectors of the k-point in KPT using a Davidson method. The previous eigenvectors and eigenvalues are passed in VEC and EIG, respectively, and the updated eigenvectors and eigenvalues are returned in VEC and EIG, respectively. All the NE eigenvalues are stored on each node, but only the NELOC eigenvectors are stored on a particular node. EMAX is the upper bound on values in EIG and associated eigenvectors in VEC.
GKMAG2 are the magnitudes |G + k| of the G-vectors with KPT. MAPG and MAPS index the G-vectors on the three-dimensional FFT grids of the charge density and nonlocal potential operators, respectively. POTR is the local and Hartree potentials in real space, and AVPOT is the average potential over the cell. M1, M2, M3 are the FFT dimensions of the charge density grid; MX1, MX2, MX3 are the FFT dimensions of the nonlocal potential operator grid. IT is the number of iterations of the subspace diagonalization to use for updating the eigenvalues and eigenvectors.
This routine provides a calling interface for the EISPACK library subroutines that solve the generalized eigenproblem A x = \lambda B x for the input matrices A and B of order N. The eigenvalues and eigenvectors are returned on the root node in EIGVALS and EIGVECS, respectively.
NE enters with the previous number of eigenvalues and eigenvectors and exits with current number of eigenvectors and eigenvalues; NEOLD exits with the previous number of eigenvalues and eigenvectors. NEMAX is the maximum value for NE and NEOLD. EMAX is the upper limit on the values in EIGVALS. IER returns a status of 0 on success, and nonzero otherwise.
This subroutine is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This routine computes the Ewald contribution to the total energy, returning the value in ECOUL.
This routine computes the Ewald contributions of the ionic force on atom IATOM due to the NUMATOM atoms in the cell. The Cartesian components of the force are returned in FORCE.
GCOMP are the ordered indices in terms of the reciprocal lattice vectors, B. (i.e, G-vectors). MAPSTAR indexes the NUMG G-vectors into the NUMSTAR stars of G-vectors that are of equal magnitude. The NUMG magnitudes of the stars are the inputs in GMAG. ATOMKIND indexes the NUMATOM atoms by type; the valence charge of each type of atom are the inputs in VALENCE. VOLUME is the volume of the cell. The NUMATOM positions are the inputs in POSN in lattice vectors, A.
This routine determines the Fermi energy, EF, the associated weights on the energy bands, and the spin weighting factor, WSP.
JSP1 and JSP2 are the lower and upper bounds on the spin indexes. JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). HFLD is the strength of the applied magnetic field. TKB is the temperature broadening parameter k_B T. ZFILL is the core charge density. WK are the weights associated with the k-points. NK is the number of k-points.
This routine computes the symmetrized forces on each of the NATM atoms in the cell. The Cartesian components of the forces are returned in FC.
NSPIN is number of electron spins. WSP is the multiplicity of the Fermi-Dirac distribution. EF is the Fermi energy. TKB is temperature for Fermi-Dirac distribution function. HFIELD is the strength of the magnetic field. LURHO is the logical unit associated with the charge density file.
This routine computes the nonlocal pseudopotential contribution to the ionic forces for the k-point KPT, and returns the Cartesian components in FNL.
VEC contains the NE wave functions on the node. WG is the weighting factor for KPT. NV is the number of planewaves in the basis set. MAPS maps the indices of the sorted planewaves to the Fourier transform grid of the nonlocal projection operators with dimensions MX1, MX2, and MX3. IG2 indexes the G-vectors with the associated planewave.
This routine provides a common calling structure for the various generalized eigensolvers of the problem A x = \lambda B x for the input matrices A and B of order N. The eigenvalues and eigenvectors are returned on all nodes in EIGVALS and EIGVECS, respectively. In the case of serial solvers, the values of EIGVALS and EIGVECS are propagated to all nodes.
NE enters with the previous number of eigenvalues and eigenvectors and exits with current number of eigenvectors and eigenvalues; NEOLD exits with the previous number of eigenvalues and eigenvectors. NEMAX is the maximum value for NE and NEOLD. EMAX is the upper limit on the values in EIGVALS.
INFOT returns a status of 0 on success, and nonzero otherwise.
TYPE identifies the general eigensolver employed. TYPE = 0 uses the EISPACK subroutines, TYPE = 2 uses the ScaLAPACK subroutines. An unknown value for type defaults to TYPE = 2 (ScaLAPACK).
This subroutine is used internal to subroutine wdanb. Not used in version 1.0.
This subroutine is used internal to subroutine wdanb. Not used in version 1.0.
EISPACK library subroutine
This routine backtransforms the eigenvectors of the standard eigenproblem to that of the generalized eigenproblem.
EISPACK library subroutine
This routine reduces the generalized eigenproblem to the standard eigenproblem.
This routine does a heap sort of the N elements of A, returning the indices of the sorted elements in IND. The order of elements in A is unchanged.
This subroutine is used internal to subroutine wdanb. Not used in version 1.0.
This subroutine is used internal to subroutine wdanb. Not used in version 1.0.
This routine initializes the wave functions as unit vectors, and initializes the planewave lists.
JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). EKM is the maximum kinetic energy for the planewave expansion. M1, M2, M3 and MX1, MX2, MX3 are the Fourier transform grid dimensions for the charge density and nonlocal projector operators, respectively. INIT is a logical flag indicating that the wave functions should be initialized. NEWK is a logical that is not used at this time.
This routine generates the set of special k-points in the irreducible Brillouin zone for a lattice type LATTIC (bcc, hexagonal, bct) using grid dimensions KPD1, KPD2, KPD3.
This routine provides a calling interface for the LAPACK library subroutines that solve the generalized eigenproblem A x = \lambda B x for the input matrices A and B of order N. The eigenvalues and eigenvectors are returned on all nodes in EIGVALS and EIGVECS, respectively.
NE enters with the previous number of eigenvalues and eigenvectors and exits with current number of eigenvectors and eigenvalues; NEOLD exits with the previous number of eigenvalues and eigenvectors. NEMAX is the maximum value for NE and NEOLD. EMAX is the upper limit on the values in EIGVALS. IER returns a status of 0 on success, and nonzero otherwise.
This routine provides a calling interface for the LAPACK library subroutines that solve the generalized eigenproblem A x = \lambda B x for the input matrices A and B of order N. The eigenvalues and eigenvectors are returned on all nodes in EIGVALS and EIGVECS, respectively.
NE enters with the previous number of eigenvalues and eigenvectors and exits with current number of eigenvectors and eigenvalues; NEOLD exits with the previous number of eigenvalues and eigenvectors. NEMAX is the maximum value for NE and NEOLD. EMAX is the upper limit on the values in EIGVALS. IER returns a status of 0 on success, and nonzero otherwise.
This routine computes the force on atom IATOM due to the local potential terms. The Cartesian components of the force are returned in FORCE.
GCOMP are the ordered indices in reciprocal lattices vectors, B, of the G-vectors. MAPSTAR indexes the NUMG G-vectors into the NUMSTAR stars of G-vectors that are of equal magnitude. The NUMG magnitudes of the stars are the inputs in GMAG. SIZESTAR contains the number of G-vectors in each of the NUMSTAR stars. POSN is the position of atom IATOM in lattice vector units. CHARGE contains the charge density in reciprocal space at each of the GMAG points. PHASE is the phase factor associated with each of the NUMG G-vectors due to non-primitive lattice translations in nonsymmorphic symmetry operations.
This routine prints out the local pseudopotential and the nonlocal pseudopotentials for each of the NTYPE atoms.
GMAX is the maximum value of G for the local pseudopotential. RCNL contains the NTYPE maximum radii for the nonlocal pseudopotentials of the atom types.
Matrix multiply for square matrices, dimension NxN.
C = A*B, where A, B, C are real*8 matrices with dimension equal to the size of the matrix. MATMLT is used only for 3x3 multiplies in subroutine rdparm.
This routine does Broyden mixing of the charge density.
MPI library subroutine
This routine aborts all the MPI processes.
MPI library subroutine
This routine waits until all processes in the scope call it.
MPI library subroutine
This routine broadcasts the input data to all the processes in the scope.
MPI library subroutine
This routine returns the process rank within the scope.
This routine returns the number of processes in the scope.
MPI library subroutine
MPI library subroutine
This routine cleans up before terminating an MPI program.
MPI library subroutine
This routine initializes an MPI program.
MPI library subroutine
This routine does an asynchronous receive of data from an MPI process.
MPI library subroutine
This routine does an asynchronous send of data to an MPI process.
MPI library subroutine
This routine does a collective reduction of data on the MPI processes in the scope, storing the result at the defined process.
MPI library subroutine
This routine sends data to an MPI process, then receives data from an MPI process, reusing the same storage area.
MPI library subroutine
This routine waits until the specified communication operation is completed.
This routine opens the direct access file NAM as unit UNIT. The file is initially written with NREC records of length LREC. EX is a logical variable that is true if the file already exists.
ScaLAPACK REDIST library subroutine
This routine redistributes an array from that of one array descriptor to that of a second array descriptor.
ScaLAPACK library subroutine
This routine computes the eigenvalues and eigenvectors of the generalized eigenproblem.
ScaLAPACK REDIST library subroutine
This routine redistributes an array from that of one array descriptor to that of a second array descriptor.
This routine converts the non-local pseudopotential from semi-local to real space projector form. Click here for more information about the transformations.
MX1,MX2,MX3 are the Fourier transform grid dimensions. STYLE is a logical variable (not used in this implementation).
This routine generates an ordered list of G-vectors with magnitudes not larger than GMAX within the grid dimensions M1, M2, M3. It generates arrays of magnitudes, components with respect to reciprocal lattice vectors, and arrays related to the stars of G-vectors.
This routine computes the integral of the non-local pseudopotential with the polynomials, returning the integrals in PROD.
L is the angular momentum component. NA is the atom type. IPM is the maximum power of r for the polynomials.
This routine generates various lists associated with the planewave basis functions of k+G. The basis is the set of planewaves for the k-point KPT with kinetic energy up to EKM. IG2 returns with the indices of the G-vectors associated with the ordered NV basis functions. GKMAG2 returns with the magnitudes |k + G|^2. MAPG and MAPS return with the mappings from the ordered list of k + G vectors onto the Fourier transform grids for the charge density and nonlocal projection operators, respectively.
M1, M2, M3 and MX1, MX2, MX3 are the dimensions of the Fourier transform grids for the charge density and nonlocal projection operators, respectively.
ScaLAPACK REDIST library subroutine
This routine redistributes an array from that of one array descriptor to that of a second array descriptor.
ScaLAPACK library subroutine
This routine computes the eigenvalues and eigenvectors of the generalized eigenproblem.
ScaLAPACK REDIST library subroutine
This routine redistributes an array from that of one array descriptor to that of a second array descriptor.
This subroutine is used internal to subroutine vx1.
This routine opens and reads INFILE as unit 5. It reads the run-time selections for the calculation.
GMAX returns planewave cutoff for the charge density calculations. EKM returns the maximum kinetic energy. EMAX returns the upper limit of the energy band eigenvalues. HFIELD returns the applied magnetic field. TKB returns the Fermi energy temperature broadening parameter. ILAT returns the lattice type index. JSPINS returns the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). INIT returns a logical flag indicating if the wave functions should be initialized. M1, M2, M3 return the dimensions of the Fourier transform grid for the charge density. ICORR returns an index indicating the choice of exchange-correlation function. STYLE returns a logical variable (not used in this implementation). NEWK returns a logical variable (not used in this implementation). LWDA returns a logical variable (not used in this implementation). MX1, MX2, MX3 return the dimensions of the Fourier transform grid for the nonlocal projection operators.
This routine reads the ionic pseudopotential information for all types of atoms. ZFILL returns the total ionic charge in the cell. VQ00 returns the total potential at G=0.
GMAX is the maximum of the G-vector magnitude. M1, M2, and M3 are the dimensions of the Fourier transform grid for the nonlocal projection operators.
This routine reads the charge density RHO from the Fortran unit LURHO connected to the charge density file.
NSTAR is the number of stars of G-vectors. NSPIN is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). NWINDOW is the number of energy windows. MAX0NSTAR and MAX0NSPIN are declared dimensions of number of stars and number of spins for RHO in the calling routine.
EISPACK library subroutine
This routine transforms the eigenvectors of the standard eigenproblem to those of the generalized eigenproblem.
EISPACK library subroutine
This routine reduces the generalized eigenproblem to the standard eigenproblem.
This routine provides a calling interface for the ScaLAPACK library subroutines that solve the generalized eigenproblem A x = \lambda B x for the input matrices A and B of order N. The eigenvalues and eigenvectors are returned on all nodes in EIGVALS and EIGVECS, respectively.
NE enters with the previous number of eigenvalues and eigenvectors and exits with current number of eigenvectors and eigenvalues; NEOLD exits with the previous number of eigenvalues and eigenvectors. NEMAX is the maximum value for NE and NEOLD. EMAX is the upper limit on the values in EIGVALS. IER returns a status of 0 on success, and nonzero otherwise.
This routine computes the current amount of wall-clock time for an MPI program. The time is returned in TIME.
This routine sets the core charge density (or overlapping atomic charge density).
M1, M2, M3 are the FFT grid dimensions.
This routine prints MSG to the standard output and stops all processes on all nodes using MPIABORT.
This subroutine is used internal to subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.
This routine generates the total local ionic pseudopotential from the individual pseudopotentials and structure factors. POT returns this potential.
VQ00 is the total ionic potential at G=0. M1, M2, and M3 are unused.
This routine symmetrizes the NATOM ionic forces in FORCES using the symmetry operations of the cell. The symmetrized Cartesian force components are returned in FORCES.
NTYPE is the number of inequivalent atom types in the cell.
EISPACK library subroutine
This routine finds the eigenvectors of a tridiagonal matrix.
This routine computes the total energy of the system, returning it as ETOT.
ESUM is eigenvalue sum of the energy bands. M1, M2, M3 are the dimensions of the Fourier transform grid for the charge density. JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). ICORR is an index indicating the type of exchange-correlation function. ECOUL is the Ewald energy. LWDA is a logical flag (not used in this implementation).
EISPACK library subroutine
This routine backtransforms the eigenvectors of the tridiagonal matrix to those of the symmetric matrix.
EISPACK library subroutine
This routine reduces a real symmetric matrix to tridiagonal form.
This routine generates the local potential including the Hartree and local pseudopotential terms.
JSPINS is the number of spins (1 for unpolarized-, 2 for polarized-spin calculations). IO is the Fortran unit for the charge density file. ICORR is an index indicating the type of exchange-correlation function. VPSLOC is the total local ionic pseudopotential. M1, M2, and M3 are the dimensions of the Fourier transform grid. TOT is a logical flag indicating if the call is for the total energy calculation. LWDA is a logical flag (not used in this implementation).
Driver routine to call the LDA exchange correlation routine, vx1 for the WDA calculation.
rh (input) is the density in atomic units.
vxc is the exchange correlation potential in Ry. units
exc is the exchange correlation energy density in Ry. units
This routine writes out the Cartesian components of force, FC, on each of the NATM atoms on unit LULOG.
Modified EISPACK library subroutine
This routine backtransforms the eigenvectors of the tridiagonal matrix to those of the Hermitean matrix. It differs from the standard Eispack routine HTRIBK in the order of the indexing of some arrays.
Modified EISPACK library subroutine
This routine reduces the Hermitean matrix to tridiagonal form. It differs from the standard Eispack routine HTRIDI in the order of the indexing of some arrays.
This routine calculates the spherical harmonics for a direction defined by the three component vector V. Harmonics from 0 to a maximum angular momentum LOMAX are calculated. LOMAX must be less than or equal to the dimension LNLD.
The real and imaginary components of the calculated spherical harmonics are stored in YR and YI, respectively. These vectors are indexed by lm, Where l=0, m=0 is stored in element 1, l=1, m=-1 in 2, l=1, m=0 in 3, l=1, m=1 in 4, l=2, m=-2 in 5 etc.
Last Modified: June 25, 1997