Subroutines in DoD Planewave



[Home] [TechDoc] [Files] [Subroutines] [Modules] [Common blocks]

UNDER CONSTRUCTION!


FUNCTIONS:

awfun | dec | erfcGen

f | fermi1 | fx

g | g1 | gammaGen | gcbari | gcbarl | gx

psnl | primeTest | rgenq | spin

vloc | wgtfun


SUBROUTINES:

allocErr

bands | bcast_setup | begin_prog | blacs_barrier | blacs_get | blacs_gridexit | blacs_gridinit | blacs_pcoord | blacs_pinfo |

cdnsum | cdnsym | cft | charge_dist | checkFFT | comp | corlsd | cs

descinit | dist | dspgv

egas | eigenGen | eiggo | eign | end_prog | eve | ewald | ewaldforce

fermi | flushall | fsum

gcor | gen_atom | gen_kpoint | gen_pwlist | gen_star | ges | get_chgden | get_energy | get_force | gft2x | gftx

hsort | init_prog | initvc | job_dynamics | job_optimize

lages | locforce | logGamma | lsppot

make_dupl | map_pwlist | md_moveatom | mix_chgden | modify_force | mpi_abort | mpi_barrier | mpi_bcast | mpi_comm_rank | mpi_comm_size | mpi_finalize | mpi_init | mpi_irecv | mpi_isend | mpi_reduce | mpi_sendrecv_replace | mpi_wait

opt_moveatom | pdgemr2d | pdsygvx | pdtrmr2d | perdew2 | pmesh | print_core_charge | print_ppot | print_spcgrp | print_spcgrp_raw | psnlm | pwlst | pzgemr2d | pzhegvx | pztrmr2d | pzung

rcft | read_atom_posn | read_atomtype | read_atom_velo | read_CTRL | read_CTRL_command | read_INFILE | read_input | read_kpoint | read_ppfile | readrho | read_SPCGRP | read_SPCGRP_file | read_SPCGRP_v0 | read_window | run_md

scalages | second | set_child_atom | set_core | set_gvct_range | setup_atom | setup_atomtype | setup_basis | setup_basis_psi | setup_derived | setup_dynamics | setup_fft | setup_kpoint | setup_lattice | setup_nbrmap | setup_pc_coeff | setup_ppot | setup_prog | setup_SCF | setup_spcgrp | setup_window | set_vloc | stpme | stuf | svloc

test_force | tot_ener

valid_fft | vgen | vlda | vx1 | vx2

wdanb | write_CTRL | write_CTRL_atom | write_CTRL_cnst | write_dimension | write_INFILE | write_output | write_SPCGRP | write_SPCGRP_file | write_SPCGRP_v0 | write_xmol |

ylm2 | zhpgv


FUNCTION awfun (indx) RESULT (wgt)

This function computes the mixing weight, wgt, of indx.

Back to index


FUNCTION DEC (RS, Z)

This function is used internal to the 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.0.1 of DoD Planewave, but will be needed to implement the Weighted Density Approximation in subsequent releases.

Back to index


function erfcGen (x)

This function provides a generic interface to the system-specific function that computes the complementary error function, erfc(x).

This function returns the value of the complementary error function (erfc) of x.

Back to index


FUNCTION F (Z)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION FERMI1 (E, WE, N, L, TKB, ELECT)

This function is used internal to the subroutine fermi.

Back to index


FUNCTION FX (Y)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION G (RS, A, A1, B1, B2, B3, B4)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION G1 (RS, A, A1, B1, B2, B3, B4)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


function gammaGen (x)

This function provides a generic interface to the system-specific function that computes the \Gamma function or the natural logarithm of the \Gamma function.

This function returns the value of the \Gamma function of x.

Back to index


FUNCTION GCBARI (S, Y)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION GCBARL (RS, S, Y)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION GX (S, Y)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION PSNL (R, L, NA)

This function interpolates the value of the nonlocal pseudopotential of atom NA for angular momentum L at the radial position R, and returns it.

Back to index


function primeTest(Value, numPrimes, primeTable)

This function determines the smallest integer, greater than or equal to VALUE, which can be factored into powers of the NUMPRIMES prime numbers in PRIMETABLE. This integer value is returned to the caller.

Back to index


FUNCTION rgenq (gmag, iatom) RESULT (v)

This function interpolates the charge density of atom |iatom| at a distance gmag from the atom origin, and returns it. The sign of iatom determines whether valence (> 0) or core (<= 0) charge density is returned.

Back to index


FUNCTION SPIN (S)

This function is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


FUNCTION vloc (g, iatom) RESULT (v)

This function computes the value of the local pseudopotential of atom iatom at the reciprocal space radial postion g, and returns it.

Back to index


function wgtfun (ene) result (wgt)

This function computes the value of the Fermi-Dirac probability function for the input energy, ene, and returns it as wgt.

Back to index


subroutine allocErr(source, operation, object, status)

This routine displays an error message and aborts the program if STATUS (the STAT value for ALLOCATE and DEALLOCATE) is not zero.

SOURCE contains the name of the calling function/subroutine, operation is either ALLOCATING or DEALLOCATING, and OBJECT is the allocatable object for which the operation failed. No checking of the validity of the strings is done.

Back to index


SUBROUTINE BANDS (NE, NEOLD, NE1, NEMAX, EIGVALS, EMAX, IERR)

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 the number of bands in EIGVALS. NEMAX is the maximum value of NE.

IERR returns the status: 0 if successful, nonzero otherwise.

Back to index


subroutine bcast_setup

This subroutine broadcasts constants and arrays that are used by all processes.

Back to index


subroutine begin_prog

This subroutine provides the interface to the setup and running of the program.

Back to index


SUBROUTINE BLACS_BARRIER

BLACS library subroutine

This routine waits until all processes in the scope have called it.

Back to index


SUBROUTINE BLACS_GET

BLACS library subroutine

This routine returns information about the BLACS context.

Back to index


SUBROUTINE BLACS_GRIDEXIT

BLACS library subroutine

This routine frees the resources associated with the BLACS context.

Back to index


SUBROUTINE BLACS_GRIDINIT

BLACS library subroutine

This routine defines the process grid associated with the BLACS context.

Back to index


SUBROUTINE BLACS_PCOORD

BLACS library subroutine

This routine defines the coordinates of the input process number on the process grid.

Back to index


SUBROUTINE BLACS_PINFO

BLACS library subroutine

This routine returns the process number and number of processes.

Back to index


SUBROUTINE CDNSUM (CDNP, VEC, WG, NV, NE, MAPG, M1, M2, M3)

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.

Back to index


SUBROUTINE CDNSYM (CDNR, CDN, M1, M2, 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.

Back to index


SUBROUTINE CFT (N1, N2, N3, DATA, IFSET)

This routine does the three-dimensional fast Fourier transform of values in DATA, returning the result in DATA. This routine provides a generic interface to the system-specific fast Fourier transform subroutine(s).

N1, N2, N3 are the dimensions of the transform. IFSET = 0 indicates an initialization of internal tables, if applicable; IFSET > 0 indicates a Fourier transform; IFSET < 0 indicates an inverse Fourier transform.

Back to index


subroutine charge_dist (dist)

This subroutine computes the root-mean-square (rms) difference between the previous and current charge densities. This value is returned as dist.

Back to index


subroutine checkFFT(n1, n2, n3, workSize, changed)

This routine checks the Fourier transform dimensions and the size of the work array for the Fourier transform library subroutines. It provides a wrapper for the system-specific checking of these values.

N1, N2, and N3 are the Fourier transform lengths, and WORKSIZE is the dimension of the work space array used. If any of these values will not work with the system-specific Fourier transform subroutine, the new value(s) is (are) returned to the caller. CHANGED is set to .true. if a new value is returned, and .false. otherwise.

Back to index


SUBROUTINE COMP (RS, S, Y, G11, G00, G10)

This subroutine is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


SUBROUTINE CORLSD (RS, ZET, EC, VCUP, VCDN, ECRS, ECZET, ALFC)

This subroutine is used internal to the subroutine egas.

Back to index


SUBROUTINE CS (RS, S, ECS, P, T1, C1, C2, C3, C4)

This subroutine is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


SUBROUTINE DESCINIT

ScaLAPACK library subroutine

This routine initializes the descriptor array for the distributed arrays.

Back to index


SUBROUTINE DIST (M1, M2, M3, JSPINS, WSVOL)

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 paramagnetic, 2 for spin-polarized calculations). WSVOL is the volume of the unit cell

Back to index


SUBROUTINE DSPGV

LAPACK library subroutine

This routine computes the eigenvalues and eigenvectors of the real symmetric generalized eigenproblem.

Back to index


SUBROUTINE EGAS (FU, FD, VU, VD, EXC)

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.

Back to index


subroutine eigenGen(a, eigenval, eigenvec, n, ldn, work, sizeWork)

This function provides a generic interface to the system-specific subroutine that computes the eigenvalues and eigenvectors of the real, symmetric matrix of order n stored as a lower triangular, packed matrix in a. eigenval and eigenvec contain the eigenvalues and eigenvectors on exit.

ldn is the leading dimension of a as declared in the calling routine. work is a working array used by the eigensolving routine dimensioned to at least sizeWork in the calling routine.

Back to index


SUBROUTINE EIGGO (JSPINS, EMAX, M1, M2, M3, IT, MX1, MX2, MX3)

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 the subroutine eign. The updated eigenvectors are then written out.

JSPINS is the number of spins (1 for paramagnetic, 2 for spin-polarized 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.

Back to index


SUBROUTINE EIGN (VEC, EIG, NE, NV, GKMAG2, KPT, MAPG, MAPS, POTR, AVPOT, EMAX, M1, M2, M3, IT, MX1, MX2, MX3, NELOC)

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.

Back to index


subroutine end_prog

This subroutine closes output files and ends the program

Back to index


SUBROUTINE EVE(RS, Z, E0, E1, EC)

This subroutine is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


SUBROUTINE EWALD (ECOUL)

This routine computes the Ewald contribution to the total energy, returning the value in ECOUL.

Back to index


SUBROUTINE EWALDFORCE (IATOM, NUMATOM, NUMKIND, NUMG, NUMSTAR, GCOMP, MAPSTAR, ATOMKIND, VALENCE, VOLUME, FORCE, POSN, A, B, GMAG)

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 contains the components of the G-vectors, ordered by magnitude, in terms of the reciprocal lattice vectors, B. MAPSTAR indexes the NUMG G-vectors into the NUMSTAR stars of G-vectors that are of equal magnitude and related by the symmetry operations. The NUMG magnitudes of the stars are in GMAG. ATOMKIND indexes the NUMATOM atoms by type; the valence charge of each type of atom are in VALENCE. VOLUME is the volume of the cell. The NUMATOM atomic positions are stored in POSN as components in terms of the lattice vectors, A.

Back to index


SUBROUTINE FERMI (EF, WSP, JSP1, JSP2, JSPINS, HFLD, TKB, ZFILL, WK, NK)

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 indices. JSPINS is the number of spins (1 for paramagnetic, 2 for spin-polarized 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.

Back to index


SUBROUTINE FLUSHALL

This routine provides an interface to the standard C library function fflush(), flushing all output buffers.

Back to index


SUBROUTINE FSUM (FNL, VEC, WG, NV, NE, MAPS, MX1, MX2, MX3, KPT, IG2, GKMAG2, FNLI)

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. GKMAG2 and FNLI are unused.

Back to index


SUBROUTINE GCOR(A, A1, B1, B2, B3, B4, P, RS, GG, GGRS)

This subroutine is used internal to the subroutine egas.

Back to index


subroutine gen_atom (root, ichild, newposn, newvelo)

This subroutine adds to the list associated with root, an equivalent atom with index ichild, position newposn, and velocity newvelo.

Back to index


subroutine gen_kpoint

This subroutine generates the k-points from the mesh provided.

Back to index


subroutine gen_pwlist

This subroutine generates the list of G-vectors.

Back to index


subroutine gen_star

This subroutine determines the list of stars of equivalent G-vectors.

Back to index


SUBROUTINE GES (TYPE, N, A, B, NE, EIGVALS, EIGVECS, NEOLD, NEMAX, EMAX, INFOT)

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 = 1 uses the LAPACK subroutines, TYPE = 2 uses the ScaLAPACK subroutines. An unknown value for TYPE defaults to TYPE = 2 (ScaLAPACK).

Back to index


subroutine get_chgden

This subroutine computes the symmetrized charge density and also the nonlocal pseudopotential contribution to the ionic forces.

Back to index


subroutine get_energy

This subroutine computes the total electronic energy and ionic forces for the

Back to index


subroutine get_force

This subroutine computes the symmetrized ionic forces.

Back to index


SUBROUTINE GFT2X (Q, I, RVI, GQ, GRQ, DGDN, DGDNR)

This subroutine is used internal to the subroutine wdanb.
Not used in version 1.0.1.

Back to index


SUBROUTINE GFTX (Q, I, RVI, GQ, GRQ, DGDN, DGDNR)

This subroutine is used internal to the subroutine wdanb.
Not used in version 1.0.1.

Back to index


SUBROUTINE HSORT (N, A, IND)

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.

Back to index


subroutine init_prog

This subroutine initializes the program.

Back to index


SUBROUTINE INITVC (JSPINS, EKM, M1, M2, M3, MX1, MX2, MX3, INIT_EVEC, INIT_EVAL, NVFIX)

This routine initializes the wave functions as unit vectors, and initializes the planewave lists.

JSPINS is the number of spins (1 for paramagnetic, 2 for spin-polarized 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_EVEC is a switch for initializing the wavefunctions. INIT_EVAL is a switch for initializing the energy bands to 0. NVFIX is the number of G-vectors necessary for the planewave cutoff and k-points being utilized.

Back to index


subroutine job_dynamics

This subroutine provides an interface for running a molecular dynamics simulation.

Back to index


subroutine job_optimize

This subroutine provides an interface to running the structural optimization of the atomic positions.

Back to index


SUBROUTINE LAGES(N, A, B, EIGVALS, EIGVECS, NE, NEOLD, NEMAX, EMAX, IERR)

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.

Back to index


SUBROUTINE LOCFORCE (IATOM, NUMG, NUMSTAR, GCOMP, SIZESTAR, MAPSTAR, FORCE, POSN, B, GMAG, CHARGE, PHASE)

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 contains 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.

Back to index


logGamma(x, gamSign, lnGamma)

This routine provides a generic interface to the system-specific C function that computes the
ln | \Gamma(x) |. This is only useful where a corresponding Fortran routine does not already exist.

x is the value at which to evaluate the function. gamSign and lnGamma return the sign of the function value and the natural log of the function value.

Back to index


SUBROUTINE LSPPOT (NTYPE, RCNL, GMAX)

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.

Back to index


subroutine make_dupl

This subroutine duplicates data.

Back to index


subroutine map_pwlist

This subroutine creates the mapping of the G-vectors on the Fourier transform grids.

Back to index


subroutine md_moveatom

This subroutine moves the atoms in a molecular dynamics simulation.

Back to index


subroutine mix_chgden

This subroutine mixes the previous and the current charge density to create the charge density input for the next self-consistent iteration.

Back to index


subroutine modify_force

This subroutine modifies the ionic forces based on the constraints on the atoms.

Back to index


SUBROUTINE MPI_ABORT

MPI library subroutine

This routine aborts all the MPI processes.

Back to index


SUBROUTINE MPI_BARRIER

MPI library subroutine

This routine waits until all processes in the scope call it.

Back to index


SUBROUTINE MPI_BCAST

MPI library subroutine

This routine broadcasts the input data to all the processes in the scope.

Back to index


SUBROUTINE MPI_COMM_RANK

MPI library subroutine

This routine returns the process rank within the scope.

Back to index


SUBROUTINE MPI_COMM_SIZE

MPI library subroutine

This routine returns the number of processes in the scope.

Back to index


SUBROUTINE MPI_FINALIZE

MPI library subroutine

This routine cleans up before terminating an MPI program.

Back to index


SUBROUTINE MPI_INIT

MPI library subroutine

This routine initializes an MPI program.

Back to index


SUBROUTINE MPI_IRECV

MPI library subroutine

This routine does an asynchronous receive of data from an MPI process.

Back to index


SUBROUTINE MPI_ISEND

MPI library subroutine

This routine does an asynchronous send of data to an MPI process.

Back to index


SUBROUTINE MPI_REDUCE

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.

Back to index


SUBROUTINE MPI_SENDRECV_REPLACE

MPI library subroutine

This routine sends data to an MPI process, then receives data from an MPI process, reusing the same storage area.

Back to index


SUBROUTINE MPI_WAIT

MPI library subroutine

This routine waits until the specified communication operation is completed.

Back to index


subroutine opt_moveatom

This subroutine moves the atoms for structural optimization.

Back to index


SUBROUTINE PDGEMR2D

ScaLAPACK REDIST library subroutine

This routine redistributes an array from that of one array descriptor to that of a second array descriptor.

Back to index


SUBROUTINE PDSYGVX

ScaLAPACK library subroutine

This routine computes the eigenvalues and eigenvectors of the real symmetric generalized eigenproblem.

Back to index


SUBROUTINE PDTRMR2D

ScaLAPACK REDIST library subroutine

This routine redistributes an array from that of one array descriptor to that of a second array descriptor.

Back to index


SUBROUTINE PERDEW2 (S, RS, X, NX, AG11, AG00, AG10, AG)

This routine computes the exchange-correlation hole function as parameterized by J.P. Perdew.

This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


SUBROUTINE PMESH(MX1, MX2, MX3, STYLE, PMESH0TOL0ZERO)

This routine converts the non-local pseudopotential from semi-local to real space projector form.

MX1, MX2, MX3 are the Fourier transform grid dimensions. STYLE is a logical variable (not used in this implementation). PMESH0TOL0ZERO is a tolerance factor applied to the largest eigenvalue to determine the threshhold eigenvalues to retain.

More information about the transformations.

Back to index


subroutine print_core_charge

This subroutine prints out the partial core charge density associated with the pseudopotential.

Back to index


subroutine print_ppot

This subroutine prints out the pseudopotential data.

Back to index


subroutine print_spcgrp (coord_rot, coord_trans, coord_shift)

This subroutine prints the space group operators where coord_rot, coord_trans, and coord_shift indicate the vector space in which the rotation, translation, and shift operators are defined.

Back to index


SUBROUTINE PSNLM (L, NA, IPM, PROD)

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.

Back to index


SUBROUTINE PWLST (EKM, KPT, IG2, GKMAG2, MAPG, MAPS, NV, M1, M2, M3, MX1, MX2, MX3, NVFIX)

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. NVFIX is the number of G-vectors necessary to satisfy the planewave cutoff.

Back to index


SUBROUTINE PZGEMR2D

ScaLAPACK REDIST library subroutine

This routine redistributes an array from that of one array descriptor to that of a second array descriptor.

Back to index


SUBROUTINE PZHEGVX

ScaLAPACK library subroutine

This routine computes the eigenvalues and eigenvectors of the complex Hermitean generalized eigenproblem.

Back to index


SUBROUTINE PZTRMR2D

ScaLAPACK REDIST library subroutine

This routine redistributes an array from that of one array descriptor to that of a second array descriptor.

Back to index


SUBROUTINE PZUNG (RH3, VXC, EXC)

This subroutine is used internal to the subroutine vx1.

Back to index


subroutine rcft(init, x, y, n, sign, scale)

This routine provides a generic interface to the system-dependent one-dimensional real-to-complex Fourier transform of the input data stored in x, returning the transform in y.

init is nonzero when initializing internal trignometric tables and 0 for transforming data. n is the size of the data set. sign is 1 for a forward transform and -1 for an inverse transform. scale is a scaling factor to be applied to the transformed data.

Back to index


subroutine read_atom_posn

This subroutine reads the positions of the basis atoms from the current input.

Back to index


subroutine read_atomtype

This subroutine reads the atomic species types from the current input.

Back to index


subroutine read_atom_velo

This subroutine reads the velocities of the basis atoms from the current input.

Back to index


subroutine read_CTRL

This subroutine reads the input file named fname using the token-based, free-format form.

Back to index


subroutine read_CTRL_command

This subroutine reads the current input file and acts on each command token parsed.

Back to index


subroutine read_INFILE

This subroutine reads the file named fname using the fixed-format form compatible with all versions of DoD Planewave.

Back to index


subroutine read_input

This subroutine provides an interface to the subroutines that read the input files of the different format types.

Back to index


subroutine read_kpoint

This subrouitne reads the list of k-points from the user input.

Back to index


subroutine read_ppfile (itype, lunit, fname, header, stat)

This subroutine reads the pseudopotential for the itype'th atomic species from the unit lunit, filename fname. header is a flag indicating if only the header information of the file is to be read. If stat is not 0, an error has occurred.

Back to index


subroutine read_SPCGRP (lunit, fname)

This subroutine reads the space group operators from the unit lunit, filename fname.

Back to index


subroutine read_SPCGRP_file

This subroutine reads the space group operators from unit lunit using a token-based, free-format form.

Back to index


subroutine read_SPCGRP_v0

This subroutine reads the space group operators from unit lunit using a fixed-format compatible with all versions of DoD Planewave.

Back to index


subroutine read_window

This subroutine reads the energy window data.

Back to index


SUBROUTINE READRHO (LURHO, RHO, NSTAR, NSPIN, NWINDOW, MAX0NSTAR, MAX0NSPIN)

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 paramagnetic, 2 for spin-polarized 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.

Back to index


subroutine run_md

This subroutine runs the molecular dynamics.

Back to index


SUBROUTINE SCALAGES (N, A, B, EIGVALS, EIGVECS, NE, NEOLD, NEMAX, EMAX, IERR)

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.

Back to index


SUBROUTINE SECOND (TIME)

This routine computes the current amount of wall-clock time for an MPI program. The time is returned in TIME.

Back to index


subroutine set_child_atom (root)

This subroutine generates the atoms in the cell that are equivalent to the atom root.

Back to index


subroutine set_core

This subroutine sets up the partial core charge density.

Back to index


subroutine set_gvct_range (gmax, irange)

For the input gmax, this subroutine determines the maximum multiples (returned in irange) of each of the reciprocal lattice vectors for G-vectors with length less than gmax.

Back to index


subroutine set_vloc

This subroutine sets the local pseudopotential parameters.

Back to index


subroutine setup_atom

This subroutine sets up the arrays associated with the atoms in the cell.

Back to index


subroutine setup_atomtype

This subroutine sets up the arrays associated with each atomic species.

Back to index


subroutine setup_basis

This subroutine sets up the arrays associated with the set of G-vectors.

Back to index


subroutine setup_basis_psi

This subroutine sets up the arrays associated with the planewave basis for each inequivalent k-point.

Back to index


subroutine setup_derived

This subroutine sets up derived parameters.

Back to index


subroutine setup_dynamics

This subroutine sets the parameters for a molecular dynamics simulation.

Back to index


subroutine setup_fft

This subroutine sets up the arrays associated with Fourier transform grids.

Back to index


subroutine setup_kpoint

This subroutine sets up the k-points in the Brillouin zone.

Back to index


subroutine setup_lattice

This subroutine sets up the lattice parameters.

Back to index


subroutine setup_nbrmap

This subroutine sets up a neighbor map of the atoms.

Back to index


subroutine setup_pc_coeff

This subroutine sets the parameters for a predictor-corrector scheme.

Back to index


subroutine setup_ppot

This subroutine sets up the pseudopotential data.

Back to index


subroutine setup_prog

This subroutine sets up the program.

Back to index


subroutine setup_SCF

This subroutine sets up the parameters for the self-consistent field (SCF) calculations.

Back to index


subroutine setup_spcgrp

This subroutine sets up the space group operators.

Back to index


subroutine setup_window

This subroutine sets up the energy window.

Back to index


subroutine stpme (message)

This routine prints message to the standard output and stops all processes on all nodes using MPI_ABORT.

Back to index


SUBROUTINE STUF (RS, S, ECS, Y, GCBAR)

This subroutine is used internal to the subroutine perdew2. This is code supplied by Professor J.P. Perdew, Tulane University.

Back to index


SUBROUTINE SVLOC

This routine generates the total local ionic pseudopotential from the individual pseudopotentials and structure factors.

VQ00 is the total ionic potential at G=0. M1, M2, and M3 are unused.

Back to index


subroutine test_force

This subroutine tests the ionic forces.

Back to index


subroutine tot_ener (etot)

This subroutine computes the total electronic energy of the system, returning it in etot.

Back to index


subroutine valid_fft (nfft)

This subroutine checks that the array nfft contains valid Fourier transform lengths for available Fourier transform routine(s).

Back to index


SUBROUTINE VGEN (JSPINS, IO, ICORR, VPSLOC, M1, M2, M3, TOT, LWDA)

This routine generates the local potential including the Hartree and local pseudopotential terms.

JSPINS is the number of spins (1 for paramagnetic, 2 for spin-polarized 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).

Back to index


SUBROUTINE VLDA (RH, VXC, EXC)

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 Rydberg units
EXC is the exchange correlation energy density in Rydberg units

Back to index


SUBROUTINE VX1 (RHO, V, ICORR, TOT)

This routine computes the local density exchange-correlation energy or potential for the input charge density RHO using the exchange-correlation function indexed by ICORR (0 - X_alpha, 1 - Wigner interpolation, 2 - Hedin-Lundqvist, 3 - Perdew-91, 4 - Perdew-Zunger).

TOT is a logical flag indicating whether the calling sequence includes the subroutine totenr. If true, the exchange-correlation energy is returned in V; otherwise, the exchange-correlation potential is returned in V.

Back to index


SUBROUTINE VX2 (RH1, RH2, VU, VD, ICORR, TOT)

This routine computes the local spin density exchange-correlation energy or potential for the input charge density RHO using the exchange-correlation function indexed by ICORR (2 - Hedin-Lundqvist, 3 - Perdew-91).

TOT is a logical flag indicating whether the calling sequence includes the subroutine totenr. If true, the exchange-correlation energy is returned in V; otherwise, the exchange-correlation potential is returned in V.

Back to index


SUBROUTINE WDANB (M1, M2, M3, VOL, BV, DEN, DENB, EXC, VXC, RV, NDEN, LRD, SETRV, LWDA)

This routine is used to compute the weighted density in the weighted density approximation.

Not used in version 1.0.1.

Back to index


subroutine write_CTRL (lunit, fname)

This subroutine writes out the token-based, free-format input file on unit lunit, filename fname.

Back to index


subroutine write_CTRL_atom (lunit)

This subroutine writes out the atom species information in the token-based form to the unit lunit.

Back to index


subroutine write_CTRL_cnst (lunit)

This subroutine writes the atom constraint information in the token-based form to the unit lunit.

Back to index


subroutine write_dimension (lunit)

This subroutine writes out the various dimension (parameter) files using unit lunit.

Back to index


subroutine write_INFILE (lunit, fname)

This subroutine writes out the data in the fixed-format form of INFILE consistent with all versions of DoD Planewave to the unit lunit, filename fname.

Back to index


subroutine write_output

This subroutine writes the output files.

Back to index


subroutine write_SPCGRP (lunit, fname)

This subroutine writes an SPCGRP file (space group operations) to the unit lunit, filename fname.

Back to index


subroutine write_SPCGRP_file (lunit)

This subroutine outputs the space group operations in a free-format form that labels the terms to the unit lunit.

Back to index


subroutine write_SPCGRP_v0 (lunit)

This subroutine outputs the space group operations in a fixed-format form consistent with previous version of DoD Planewave.

Back to index


subroutine write_xmol (lunit, fname)

This subroutine writes an xmol file to the unit lunit, filename fname.

Back to index


SUBROUTINE YLM2 (V, LOMAX, YR, YI)

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.

Back to index


SUBROUTINE ZHPGV

LAPACK library subroutine

This routine computes the eigenvalues and eigenvectors of the complex Hermitean generalized eigenproblem.

Back to index


Last Modified: 1 December 1998