|
PSCF v1.4.0
|
This class is designed to be used in conjuction with a Perturbation that is used during a simulation.
The PerturbationDerivative class calculates the derivative \( \partial F/ \partial \lambda \) of total free energy \( F \) with respect to the parameter \( \lambda \) that controls the strength of the associated "perturbation". This quantity is given by the average
\[ \frac{\partial F}{\partial \lambda} = \langle \Psi \rangle \]
in which
\[ \Psi \equiv \frac{\partial H}{\partial \lambda} \]
is the partial derivative of the perturbed Hamiltonian with respect to the perturbation parameter \( \lambda \), evaluated with a fixed field configuration and fixed values for all other parameters.
The design of the PerturbationDerivative class template relies on the fact any subclass of a Perturbation base class is required to implement a virtual function that returns the value of the derivative \( \Psi \) defined above. The PerturbationDerivative class template thus simply calls this virtual function to compute this quantity, and evaluates the average of this quantity over a sequence. The design of the PerturbationDerivative class is thus independent of the nature of the perturbation. See the discussion of perturbations for further details.
Parameter file format:
Meanings of the parameters:
| Label | Description |
| interval* | number of steps between data samples |
| outputFileName | name of output file |
| nSamplePerOutput* | number of sampled values per block average output to file |
In the following, the symbol "{outputFileName}" is used to represent the string value of the outputFileName parameter within descriptions of output file names.
Output during a simulation or trajectory file analysis :
If nSamplePerOutput > 1, then block average values \( \Psi \), averaged over blocks of nSamplePerOutput sequential samples, are output to the file {outputFileName}.dat every interval * nSamplerPerBlock simulation steps or trajectory file frames.
If nSamplePerOutput == 1, (or if this optional parameter is omitted), then values of \( \Psi \) are output every interval simulation steps or frames, with no block averaging.
If nSamplerPerBlock = 0, then {outputFileName}.dat data file is not created.
Final output :
At the end of a simulation or trajectory file analysis:
See the discussion of error analysis for further details.