PSCF v1.1
Field File - K-Grid (Periodic)

Field File - R-Grid (Periodic) (Prev)         Command Files (Next)

The pscf_pc and pscf_gp programs for periodic systems can also read and write files in format that gives the unsymmetrized discrete Fourier transform of the field associated with each monomer type. The required file format is very similar to that used for the coordinate space grid. The file consists of a header and a data section. The format of the header is identical to that used for the coordinate grid format, and includes a list of the number of grid points used in each direction, denoted by mesh.

The data section contains the Fourier coefficients obtained by a discrete Fourier transform of each field at wavevectors given by

\[ \textbf{k}(n_1, \ldots, n_{D}) = \sum_{i=0}^{\textrm{D}-1} n_{i}\textbf{b}_{i} \]

where \(D\) is the dimensionality of the crystal (i.e., dim in the header file), \(\textbf{b}_{i}\) is a reciprocal lattice basis vector, \(N_{i}\) is the number of grid points along direction \(i\), and \(n_{i}\) is an integer in the range \(0 \leq n_{D-1} \leq N_{1}/2\) for the last index and \(0 \leq n_{i} \leq N_{i} - 1\) for indices \(i < D-1\). The number of rows in the data section is equal to the total number of such wavevectors, and each row contains values of Fourier coefficients associated with a single wavevector, with coefficients for fields associated with different monomer types in different columnns.

Coefficients for different wavevectors are output in sequential order, using the last index (e.g., \(n_{2}\) for a 3D crystal) as the most rapidly varying (inner-most) loop index. This is implemented by a fortran loop of the form

for (n0 = 0; n0 < N0; ++n0) {
for (n1 = 0; n1 < N1: ++n1) {
for (n2 = 0; n2 < N2/2; ++n2) {
[Read or write coefficients for wavevector k(n0, n1, n2)]
}
}
}

Note that this is not the same as the way that the k-grid files are written in the Fortran version of PSCF, which have the number of gridpoints halved in the first index (n0 in the code above) rather than the last index, as is the case here. This means that k-grid files are not compatible between the two codes.


Field File - R-Grid (Periodic) (Prev)         Field Files (Up)         Command Files (Next)