PSCF v1.3.2
LrAmCompressor

The LrAmCompressor classes used by both the pscf_pc and pscf_pg programs implements a linear-response Anderson mixing (LRAM) algorithm. Two closely analogous classes named Pscf::Rpc::LrAmCompressor and Pscf::Rpg::LrAmCompressor implement this algorithm for the pscf_pc CPU and program and the pscf_pg GPU-accelerated program, respectively. These two classes implement the same step algorithm and use the same parameter file format, which are documented below.

A general discussion of compressor algorithms for PS-FTS is given here. The LrAm compressor algorithm is described in the article: "Improved algorithm for identifying partial saddle-points in polymer field theoretic simulations", K. Chen and D.C. Morse, J. Chem. Phys. 162 , 243901 (2025). .

Parameter file

The only parameter needed by this algorithm are the error threshhold "epsilon". A minimal version of the required parameter block might thus look like this:

LrAmCompressor{
epsilon 1.0E-4
}

The full parameter file format, including all optional parameters, is shown below:

LrAmCompressor{
epsilon float
maxItr* int (default 100)
maxHist int (default 50)
verbose int (default 0)
errorType* string ("norm", "rms", "max", or "relNorm". "rms" by default")
}

Meanings of all parameters are described briefly below:

Label Description
epsilon error threshhold
maxItr*
maximum number of iterations to attempt before declaring failure (100 by default)
maxHist*
maximum number of previous states to retain in history (50 by default)
verbose*
verbosity level. lower values are less verbose (0 by default)
errorType* Identifer for the choice of a definition for the scalar error. Meaning of the allowed values are "norm", "rms" "max", and "relNorm", are discussed here ("rms" by default).

Residual definition

The residual vector for the LrAmCompressor is defined in real space, as an array in which each element is associated with one node of a regular computational grid. The value \( R({\bf r}) \) of the residual element associated with a grid point located at position \( {\bf r} \) is given by

\[ R({\bf r}) = -1 + \sum_{i=1}^{N_{\rm m}} \phi_{i}({\bf r}) \]

where \( \phi_{i}({\bf r}) \) is the volume fraction of monomer type \( i \) at that grid point, and \( N_{\rm m} \) is the number of monomer types, also known as nMonomer.