PSCF v1.3.2
|
The AmCompressor classes used by both the pscf_pc and pscf_pg programs each implement a Anderson mixing compressor algorithm. Two closely analogous classes named Pscf::Rpc::AmCompressor and Pscf::Rpg::AmCompressor implement this algorithm for the pscf_pc CPU program and the pscf_pg GPU-accelerated program, respectively. These two classes implement the same step algorithm and use the same parameter file format, as documented below.
A general discussion of compressor algorithms for PS-FTS is given here. The implementation of the AM mixing algorithm used in PSCF is discussed 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). ,
The only required parameter for this algorithm is the error threshhold "epsilon". A minimal parameter file block could thus look something like this:
The full parameter file format, including all optional parameters, is shown below:
Meanings of all parameters are explained in the general discussion of Anderson mixing algorithms, and more briefly summarized below:
Label | Description |
epsilon | error tolerance (Required) |
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 0, 1, or 2. 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) |
lambda* | Mixing parameter \( \lambda \) in a standard mixing correction step for an Anderson mixing algorithm. (1.0 by default) |
useLambdaRamp* | If true, use slow ramp-up of mixing parameter, as discussed here. (true by default) |
r* | Ratio \( r \) used in formula for ramp factor \( \alpha \) that multiplies the mixing parameter, as discussed here. (0.9 by default, only valid if useLambdaRamp is true) |
The residual vector for the AmCompressor 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.