PSCF v1.1
Commands - pscf_pc

Commands - pscf_fd (Prev)         Commands - pscf_pg (Next)

The pscf_pc programs accept a larger set of commands than the simpler pscf_fd program, though the basic commands are similar. The number of commands is larger in part as a result of the fact that pscf_pc programs can use several different formats to read and write field files. By convention, the names of commands that read or write a field file in symmetry-adapted basis format end with a suffix _BASIS, while names of commands that read or write files in read-space grid (r-grid) format end with a suffic _RGRID. The pscf_pc programs also accept a set of commands that can be used convert between different possible field file formats.

Example: SCFT Calculation

Below is an example of a simple command file for any of pscf_pc programs for D-dimensionally periodic microstructures (i.e., for pscf_pc1, pscf_pc2, or pscf_pc3) for a calculation the performs a single SCFT calculation. Note that the names of pscf_pc commands that read or write field files include a string "BASIS", "RGRID" or "KGRID" that specifies which of the three available field formats to use:

READ_W_BASIS in/w.bf
ITERATE
WRITE_W_BASIS out/w.bf
WRITE_C_BASIS out/c.bf
WRITE_C_RGRID out/c.rf
WRITE_PARAM out/data
WRITE_THERMO out/data
FINISH

The command "READ_W_BASIS in/w.bf" reads an initial guess for the chemical potentials fields from the file in/w.bf, which must contain the components of the fields in "basis" format, as coefficients in an expansion in a symmetry-adapted Fourier basis functions. The ITERATE command attempts to iteratively solve the SCFT equations starting from this initial guess. The command "WRITE_W_BASIS out/w.bf" writes the resulting converged set of chemical potential fields to file out/w.bf in symmetry-adapted basis format. The command "WRITE_C_BASIS out/c.bf" writes the corresponding monomer volume fraction fields to the file out/c.bf in the same format, while "WRITE_C_RGRID out/c.rf" writes the volume fraction fields in r-grid format, which can be used for subsequent visualization. The command "WRITE_PARAM out/data" writes a param file for the current system to the file out/data. The command, "WRITE_THERMO out/data", appends the thermodynamic properties of the converged solution to the end of the same file. The FINISH command instructs the main program to finish execution and return.

Example: A Sweep

Here is a simple example of a command file to perform a sweep.

READ_W_BASIS in/w.bf
SWEEP
FINISH

The command "READ_W_BASIS in/w.bf" reads an initial guess for the chemical potentials fields at the initial state of the sweep (the state s=0) from the file in/w.bf. The SWEEP command actually executes a sweep operation.

Commands

The following table shows a list of available commands for the pscf_pc. Each clickable command name links to a more detailed discussion of that command or a group of closely related commands.

command parameter(s) action
W Field Initialization
READ_W_BASIS filename [string] Read w fields from file filename, in symmetry-adapted basis format
ESTIMATE_W_FROM_C filename [string] Read c fields in symmetry-adapted basis format from file filename, compute estimated w fields as initial guesses for iteration.
READ_W_RGRID filename [string] Read w fields from file filename, in real-space grid (r-grid) format. See discussion for constraints on usage.
Computation
COMPUTE Solve modified diffusion equation for the current w fields
ITERATE Iteratively solve SCFT equations (after initializing w fields)
SWEEP Perform a sweep, as specified by the Sweep object in the param file.
Thermodynamic Data Output
WRITE_PARAM filename [string] Write the param file associated with the current computation to specified file "filename", excluding any Sweep block
WRITE_THERMO filename [string] Write thermodynamic data (free energy, pressure, phi, and mu for each species) to file filename. See discussion
Field Output
WRITE_W_BASIS filename [string] Write w fields to file filename, in symmetry-adapted basis format
WRITE_W_RGRID filename [string] Write w fields to file filename, in real-space grid (r-grid) format
WRITE_C_BASIS filename [string] Write monomer volume fraction fields (c fields) to file filename, in symmetry adapted basis format
WRITE_C_RGRID filename [string] Write monomer volume fraction fields (c fields) to file filename, in r-grid format
WRITE_BLOCK_C_RGRID filename [string] Write volume fraction fields (c fields) for all individual polymer blocks and solvent species to file filename, in r-grid format.
Propagator Output
WRITE_Q_SLICE filename [string], ip[int], ib[int], id[int], is[int] Write a single "slice" of a propagator at fixed contour step number is, for direction id (id=0 or 1), block number ib, and polymer number ip to a file named filename, in r-grid format.
WRITE_Q_TAIL filename [string], ip[int], ib[int], id[int] Write the final slice (or "tail") of the propagator for direction id (id=0 or 1), block ib, and polymer ip to file filename, in r-grid format.
WRITE_Q filename [string], ip[int], ib[int], id[int] Write an entire propagator (all slices) for direction id, block ib, and polymer ip to a file named filename, in r-grid format.
WRITE_Q_ALL basename [string] Write all propagators for both directions of all blocks of all polymers to separate files with automatically generated filenames that begin with a common prefix given by the basename parameter.
Crystallographic Information
WRITE_WAVES filename [string] Write list of all allowed wavevectors to file filename.
WRITE_STARS filename [string] Write a list of all wavevector stars to file filename.
WRITE_GROUP filename [string] Write all group symmetry elements to file filename.
Field File Operations
BASIS_TO_RGRID inFile [string], outFile [string] Read fields from file inFile in symmetry-adapted basis format, write to file outFile in real-space grid (r-grid) format
RGRID_TO_BASIS inFile [string], outFile [string] Read fields from file inFile in real-space grid (r-grid) format, write to file outFile in symmetry-adapted basis format.
KGRID_TO_RGRID inFile [string], outFile [string] Read fields from file inFile in discrete Fourier transform (k-grid) format, write to file outFile in r-grid format
RGRID_TO_KGRID inFile [string], outFile [string] Read fields from file inFile in real-space (r-grid) format, write to outFile in discrete Fourier expansion (k-grid) format
BASIS_TO_KGRID inFile [string], outFile [string] Read fields from file inFile in symmetry-adapted basis format, write to outFile in discrete Fourier transform (k-grid) format
KGRID_TO_BASIS inFile [string], outFile [string] Read fields from file inFile in discrete Fourier transform (k-grid) format, write to file outFile in symmetry-adapted basis format.
CHECK_RGRID_SYMMETRY inFile [string], epsilon [double] Read fields from file inFile in real-space (r-grid) format, check whether the fields are invariant under all elements of the space group specified in the param file to within the error threshold epsilon.
COMPARE_BASIS file1 [string], file2 [string] Read fields from files file1 and file2 in basis format, compares all component of all fields and write a report of the magnitude of differences to the log output.
COMPARE_RGRID file1 [string], file2 [string] Read fields from files file1 and file2 in r-grid format, compares values at all grid nodes and writes a report of the magnitude of differences to the log output.
External Fields
READ_H_BASIS filename [string] Read external (h) fields from file filename, in symmetry-adapted basis format
READ_H_RGRID filename [string] Read external (h) fields from file filename, in real-space grid (r-grid) format
WRITE_H_BASIS filename [string] Write external potential fields (h fields) to file filename, in symmetry adapted basis format
WRITE_H_RGRID filename [string] Write external potential fields (h fields) to file filename, in r-grid format
Mask Field (Inhomogeneous Density Constraint)
READ_MASK_BASIS filename [string] Read a mask field from file filename, in symmetry-adapted basis format
READ_MASK_RGRID filename [string] Read a mask field from file filename, in real-space grid (r-grid) format
WRITE_MASK_BASIS filename [string] Write mask field to file filename, in symmetry adapted basis format
WRITE_MASK_RGRID filename [string] Write mask field to file filename, in r-grid format

Further discussion of particular commands and groups of commands is provided below.

W Field Initialization

The READ_W_BASIS, ESTIMATE_W_FROM_C and READ_W_RGRID commands allow a user to set or reset the w fields that are stored in program memory. The READ_W_BASIS and ESTIMATE_W_FROM_C commands both read files in symmetry-adapted basis format. The READ_W_RGRID command reads w files in real-space grid (r-grid) format, which does not require the fields to have any particular space group symmetry. One of these commands must be invoked to initialize the w fields before invoking any of the computation commands. The w fields must normally be initialized by either the READ_W_BASIS or ESTIMATE_W_FROM_C command prior to any operation which assumes the existence of a specified space group symmetry.

Each of these three field initialization commands reads a field file that contains a header section that includes information about the crystallographic unit cell and the space group name, as well as the number of monomer types. The description of the unit cell type and space group name given in this header section must match those declared in the parameter file, as must the value of the number of monomer types. Each of these three commands sets or resets the values of unit cell parameters that are stored in program memory, by setting them equal equal to the values that are given in this field file header.

READ_W_BASIS: The READ_W_BASIS command reads the coefficients of an expansion of the w fields in a symmetry-adapted Fourier basis from an input file whose name is specified as command parameter.

The code that reads files in basis format that is used by both READ_W_BASIS and ESTIMATE_W_FROM_C can read files that were generated for a structure that has the space group symmetry declared in the parameter file but that is defined on a different computation mesh mesh, with different number of grid points along each direction, than that described by the "mesh" parameter in the parameter file. This code initializes to zero the coefficients of any basis function that exists in the current basis (which is created for the mesh declared in the parameter file) but does appear in the input file. It also ignores values for coefficients of basis functions that appear in the input file but that do not exist in the current basis.

Technical note : The symmetry-adapted basis used by the pscf_pc programs is normally created during the process of reading the first field file that that the program is instructed to read. This basis is constructed immediately after reading the header of that file, which contains a list of values for the unit cell parameters. Initialization of the basis is delayed until this point in program execution because values for unit cell parameters are not provided in the parameter file, and required by the algorithm that creates this basis. The choice of the initial values for the unit cell parameters that are obtained in this way can affect the order in which basis functions are listed internally, because the basis functions are symmetry-adapted eigenvalues of the Lapacian that are listed in an order of non-decreasing eigenvalues (or non-decreasing wavenumber) at the time of creation. The set of basis functions that is created for a particular mesh and space group is, however, independent of the values of the unit cell parameter values that were used to create this order during creation of the basis.

ESTIMATE_W_FROM_C : The ESTIMATE_W_FROM_C command reads a set of approximate monomer volume fraction fields in symmetry-adapted basis format from the file whose name is passed as an argument, and uses these to construct and store an estimate of the corresponding w fields. This is intended to allow users to construct an initial guess for w fields needed as an input to the ITERATE and SWEEP commands from an initial guess for the volume fraction fields for the structure of interest. The initial guess for the volume fraction fields does not need to be perfect, just close enough to the final structure to allow a chosen iteration algorithm to converge.

The estimated w fields are computed by setting the Lagrange multiplier field to zero in the self-consistent field condition, giving an estimated w field

\[ w_{\alpha}({\bf r}) = \sum_{\beta} \chi_{\alpha\beta}\phi_{\beta}({\bf r}) \]

for monomer type \( \alpha \), in which \( \phi_{\beta} ({\bf r}) \) is the volume fraction of monomer type \( \beta \), as read from the input file, and \( \chi_{\alpha\beta} \) is a binary Flory-Huggins interaction parameter.

READ_W_RGRID : The READ_W_RGRID command reads the values of w fields in real-space grid (r-grid) format from an input file. The header of the an r-grid field file contains a description of the mesh, defined by the number of grid points in each direction. These values must exactly equal the values given in the parameter file by the elements of the "mesh" parameter, or the program will output an error message and stop execution.

The READ_W_RGRID command cannot be used to initialize w fields for subsequent use in an SCFT simulation of a structure with a specified symmetry, for reasons that are explained below. Users who wish to perform an SCFT calculation for a structure with a specified space group should thus initialize the w fields using either the READ_W_BASIS or ESTIMATE_W_FROM_C commands, rather than READ_W_RGRID. The r-grid file format can represent a field with no particular space group symmetry. When w fields are read in r-grid format using this command, the pscf_pc program thus assumes that the w fields and any fields that are computed from them may not be symmetric under the elements of the space group declared in the parameter file. Because the existing iteration algorithms for pscf_pc programs all use an expansion of the fields in symmetry-adapted basis, the ITERATE and SWEEP command thus cannot be invoked when the current w fields were initialized using the READ_W_RGRID command. W fields that were initialize with the READ_W_RGRID command may, however, be used by the COMPUTE command, which uses an algorithm that does not assume the existence of any space group symmetry.

The READ_W_RGRID command is thus currently of very limited utility in the pscf_pc programs. It was implemented as a starting point for later development of stochastic field theoretic simulation algorithms in which the fluctuating field generally do not exhibit any special symmetry.

Computation Commands

The COMPUTE, ITERATE and SWEEP commands perform the primary computations involved in a self-consistent field calculation. Each performs the same operation as the analogous command for the pscf_fd program. Each of these commands requires an initialized set of w fields and unit cell parameters as an input, which must have been initialized by a previous call to READ_W_BASIS, READ_W_RGRID, or ESTIMATE_W_FROM_C.

COMPUTE : The COMPUTE command solves solves the single molecule statistical mechanics problem for all polymer and solvent species for a system of non-interacting molecules subjected to the current w-fields. This modifies the current c-fields stored in program memory, but does not modify the w fields.

ITERATE : The ITERATE command attempts to iteratively solve the self self-consistent field equations for a fixed set of input parameters, and may optionally modify the unit cell parameter so as to minimize the Helmholtz free energy density. The choice of iteration algorithm and parameters for that algorithm must be declared in the parameter file, which is read before the command file. The parameters of the iteration algorithm generally include a boolean "isFlexible" flag that determines whether the iteration algorithm treat the unit cell as flexible (isFlexible == true) or rigid (isFlexible == false). Iteration modifies the current w fields (i.e., the fields that are stored in program memory), and modifies the unit cell parameters if and only if the unit cell is treated as flexible. The w fields and unit cell parameters that are in memory on entry to iteration are used as initial guesses.

SWEEP : THE SWEEP command attempts to solve the SCFT equations at a sequence of points along a path through the space of possible choices of input parameters. This command may only be invoked if the parameter file contains a Sweep block, which defines this set of state points. The SWEEP command uses the current w fields and unit cell parameters as initial guesses for the first state point in the sequence, and then generates initial guesses for subsequent points by extrapolation of the solutions obtained at previous points.

Data Output Commands

The WRITE_PARAM and WRITE_THERMO commands can be used to create a record of the input parameters and computed thermodynamic properties associated with an SCFT calculation.

WRITE_PARAM : The WRITE_PARAM writes a slightly modified copy of the parameter file to a file whose name that is specified as a command parameter. The version of the parameter file written by this command outputs the current values for all parameters, and excludes any Sweep block. The output of this command is designed to serve as a record of the input parameters associated with a single SCFT calculation.

WRITE_THERMO : The WRITE_THERMO command outputs a report of values for thermodynamic properties obtained after solution of a SCFT problem. The details of the output of this command can be found on the Thermodynamic Properties page.

If the file whose name is passed to the WRITE_THERMO command already exists, the report of thermodynamic properties will be appended to the end of this file, rather than overwriting the file. This is designed to allow users to output a parameter file block that contains the input parameters followed by a report of computed thermodynamic properties in a single file, if desired, by invoking WRITE_PARAM and WRITE_THERMO with the same file name parameter.

Field Output Commands

WRITE_(W|C)_(FORMAT) Commands : The WRITE_W_BASIS, WRITE_W_RGRID, WRITE_C_BASIS, and WRITE_C_RGRID can be used to output the current w fields or c fields associated with all different monomer types. Commands with names that end in BASIS output fields in basis format, and commands with names that end in RGRID output fields in r-grid format.

WRITE_W_(FORMAT) : The WRITE_W_BASIS and WRITE_W_RGRID commands output the current w fields (monomer chemical potential fields) to a specified output file in basis or rgrid format, respectively.

WRITE_C_(FORMAT) : The WRITE_W_BASIS and WRITE_W_RGRID commands output the current c fields (volume fraction fields) to a specified output file in basis or rgrid format.

Fields can be output in symmetry-adapted basis format only if those fields are known to have the specified space group symmetry. This symmetry is known to exist for w fields only if they were initialized using the READ_W_BASIS or ESTIMATE_W_FROM_C commands, and subsequently modified by iteration algorithms that maintain space group symmetry. Symmetry is assumed to exist for c fields only if the c fields were computed from w fields that are known to be symmetric.

WRITE_BLOCK_C_RGRID : The WRITE_BLOCK_C_RGRID command outputs the current volume fraction fields (c-fields) for all blocks of all polymers and for all solvent species r-grid format as separate fields within a single file. The resulting file has a data section analogous to that produced by the WRITE_BLOCK_C command of the pscf_fd program. The resulting file contains a header section identical to that contained in any r-grid field file, followed by a data section. The format of the data section is similar to that of an r-grid field file that contain one field per monomer type, except that each polymer block and solvent species is treated as a separate monomer type, and thus output in a separate column of the data section. Blocks and solvent species are output in the order in which they appear within the parameter file, as in the output of the WRITE_BLOCK_C command of the pscf_fd program.

Propagator Output

In the inner loop of a SCFT calculation, a modified diffusion equation (MDE) is solved within every block of every polymer to obtain a set of so-called propagator functions. Each polymer block has two associated propagator functions, each associated with one of the two directions in which the block can be traversed. Each propagator function \( q({\bf r}, s) \) is a function of position \( {\bf r} \) and a contour variable \( s \) measured within a block as a contour distance from the vertex at which the propagator originates. Each such propagator function is associated with a particular direction (identified by index id = 0 or 1), a particular block (block index ib), and a particular polymer (polymer index ip). We refer to the function of position alone that is obtained by evaluating a propagator at a fixed value of \( s \) as a "slice". Because the MDE for each such propagator is computed numerically at evenly spaced values of \( s \), a computationally accessible slice may be identified by a integer contour step index \( is \) that is equal to zero at the vertex at which the propagator originates, and increases with increasing distance \( s \) from that vertex.

The pscf_pc programs accept several commands that output propagators and propagator slices to one or more files. The names for these commands start with a string "WRITE_Q", followed by a suffix that describes what information is output by invoking the command. All of these commands take a filename string as a parameter, and all but one of them take values of several integer indices needed to identify a particular propagator or slice.

All of these commands use file formats that report values of slices on the nodes of the regular real-space grid that is used internally in computations, analogous to the r-grid file format for w and c fields. The file format always starts with a header section identical to that of an r-grid field file, followed by a data section in which the values of each slice are output in a format analogous to that of a r-grid field file for a system with only one monomer type, in which all values are output in a single column, with nodes listed in the same order as in an r-grid field file.

WRITE_Q_SLICE : The command WRITE_Q_SLICE write the values of a propagator slice at a specified contour variable index \( is \) to an output file. This command named must be followed by the name of the output file, and values for the polymer index \( ip \), the block index \( ib \) and the direction index \( id \), in that order. The data section for output by this function is the same as that of an r-grid field file for a system with one monomer type.

WRITE_Q_TAIL : The command WRITE_Q_TAIL write the values of the propagator slice at a value of \( s \) equal to the length of the block, corresponding to the slice evaluated at the vertex at which the propagator terminates. This command named must be followed by the name of the output file, and values for the polymer index \( ip \) and the block index \( ib \), in that order. The resulting output file has the same format as that used by WRITE_Q_SLICE.

Users may instead output the value of slice of a propagator corresponding to the vertex at which it originates (i.e., the propagator "head" rather than "tail"), by invoking WRITE_Q_SLICE with a contour variable index \( is = 0 \), corresponding to a contour variable \( s = 0 \),

WRITE_Q : The command WRITE_Q writes all slices of a specified propagator to a single file. This command name must be followed by the name of the output file and values for the polymer index \( ip \) and block index \( ib \), in that order.

The output file produced by this command contains a header section followed by a sequence of data sections, in which each data section contains the data for a single slice at an integer value of the countour variable index. Data sections are listed in order of increasing countour variable index. The header section is similar to that of an r-grid file, except for the addition of line at the end that contain the word "nslice" followed by the value of the number of slices. Each data section begins with a line containing the word "slice" followed by value of the contour variable index for the slice represented by that section. The value of the slice index ranges from 0 for the first slice (the "head") to nslice - 1 for the last (the "tail"). The format of the remainder of each data section is the same as that of the data section of an r-grid field file for a system containing one monomer type, which consists of a single column of numbers containing the values of the associated propagator slice on the nodes of the regular spatial mesh used throughout the computation.

Comment for readers who read the source code : This command calls the function Pspc::System::writeQ, which defines the output format, and is defined in the C++ file src/pspc/System.tpp.

WRITE_Q_ALL : The command WRITE_Q_ALL writes all slices of every propagator of every polymer to a set of files, with all the slices of each propagator written to a single file, but different propagators output in different files. This command name must be followed by the value of a string parameter "basename" that contains a common prefix for the names of the resulting file set of output files.

Each of files created by this command has the same format as that of a file created by the WRITE_Q command. The name of the file containing the propagator associated with polymer ip, block ib, and direction id is given by a string of the form (basename)_(ip)_(ib)_(id).rf, where (basename) denotes the value of the basename command parameter, and where (ip), (ib), and (id) denote string representations of the values of the non-negative integers ip, ib, and id. Thus, for example, if the command is passed a basename parameter out/q, then the file out/q_0_2_1.rf will contain all slices of the propagator associated with polymer 0, block 2 and direction 1.

Crystallographic Information

The commands WRITE_WAVES and WRITE_STARS allow the user to output information about the symmetry-adapted basis that program has constructed for space group and mesh specified in the parameter file. The command WRITE_GROUP outputs all of the symmetry operations of the space group.

The symmetry-adpated basis used by PSCF is constructed by identifying sets of allowed wavevectors that are related by symmetry, which we refer to as "stars", and constructing a basis function associated with each star as linear superpositions of planes waves with wavevectors that belong to that star. The coefficients of plane waves associated with wavevectors within such superposition are complex numbers with the same absolute magnitude and relative phases (i.e., differences between complex arguments) that are determined by the requirement that each such function be invariant under all operations of the specified space group.

WRITE_WAVES: The WRITE_WAVES command outputs an ordered list of unique wavevectors that can appear in the expansion of a function with the specified space group symmetry, with associated information about each wavevector. The name of this command must be followed by the name of the file to which this listing should be written. The format of the file created by this command is discussed here .

WRITE_STARS: The WRITE_STARS command outputs a list of information about stars, or associated basis functions. The name of this command must be followed by the name of the file to which this listing should be written. The format of the file created by this command is discussed here .

WRITE_GROUP: The WRITE_GROUP command outputs a list of all of the symmetry operations in the space group to a file. The name of the output file is given as a command argument that follows the command name. The format of the file created by this command is discussed here .

Field File Manipulations

The pscf_pc programs accept several commands that perform manipulations on field files, including conversions among different formats.

Field Format Conversions

The 6 commands BASIS_TO_RGRID, RGRID_TO_BASIS, KGRID_TO_RGRID, RGRID_TO_KGRID, BASIS_TO_KGRID, and KGRID_TO_BASIS each reads a field file containing a set of fields in the format specified by the first field file format descriptor in the command name (i.e., BASIS, RGRID, or KGRID) and writes the same field to another file in the format specified by the second descriptor. Each of these commands takes two file names as parameters, the first of which is the name of the input file, and the second of which is the name of the output file.

For example, a command

BASIS_TO_RGRID out/w.bf out/w.rf

would read a file named "out/w.bf" that contains a set of fields in symmetry-adapted basis format, and writes a representation of the same field to a file named "w.rf" in r-grid format. As with all file names, relative file names are interpreted as names defined relative to the current working directory.

These file conversion function do not have any effect on the w and c fields that are stored in memory to represent the current state of the system of primary interest. All of the mathematical operations that these commands perform in order to convert from one format to the other are performed using private temporary arrays.

The r-grid and k-grid formats can be used to represent any real field, but the basis format can only represent fields that are symmetric under all symmetry elements of a specified space group. The name of the relevant space group specified both in the parameter file and in the header of the field file. The conversion from r-grid or k-grid formats to basis format are thus only valid if the field contained in the r-grid or k-grid input file actually has the assumed symmetry. The RGRID_TO_BASIS and KGRID_TO_BASIS output warnings if they finds that one or more fields in the input file are not symmetric to within some tolerance, but nonetheless attempt to complete the conversion. Applying either of these conversion functions to a field that does not have the specified space group symmetry is not a valid operation, however, and can modify the fields in unpredictable ways.

The conversion to a basis format from an r-grid or k-grid format is guaranteed to be safe if the declared space group is the trivial group that contains only the identity element (i.e., 1D group P_1, 2D plane group p_1, or 3D space group P_1), since this group does no imply any nontrivial symmetry constraints.

Checking Symmetry

The CHECK_RGRID_SYMMETRY command can be used to check whether a field that is represented in r-grid format has a specified space group symmetry to within a specified tolerance. The command takes the name of an input file and error tolerance epsilon as parameters. It reads the file with the specified name, checks if it is invariant under all space group operations to within the specified tolerance, and writes a report to the log file.

Field Comparisons

The COMPARE_BASIS and COMPARE_RGRID commands each read a pair of field files in the same format (basis or rgrid format, respectively), computes differences between corresponding fields, and write a report to the log file summarizing several measures of the magnitude of the differences.

External Fields

The pscf_pc programs accept several commands that allow users to input and output external chemical potential fields that act on monomers of each type, in addition to the internally generated fields that arise in a self-consistent field approximation from interactions. External fields are referred to throughout the source code and documentation as "h" fields. This feature was introduced into the code to allow simulation of polymers in thin films or other confined geometries, for which external fields that act differently on different monomer types are used represent selective interactions of polymers with the confining walls.

When nonzero external fields have been set, the self-consistent field equations become equations of the form

\[ w_{\alpha}({\bf r}) = \sum_{\beta} \chi_{\alpha\beta}\phi_{\beta}({\bf r}) + \xi({\bf r}) + h_{\alpha}({\bf r}) \]

for each monomer type \( \alpha \), in which \( h_{\alpha}({\bf r}) \) is the external field for monomers of type \( \alpha \), \( \xi ({\bf r}) \) is the Lagrange multiplier local pressure field that imposes incompressibility, and \( \chi_{\alpha\beta} \) is the binary Flory-Huggins interaction parameter for monomers of types \( \alpha \) and \( \beta \).

Simulations of polymer liquids confined to thin films may use external fields to represent interactions of different monomer types with the boundaries or "walls" of the film. The external fields that are used to define a thin film problem are defined algorithmically by the thin film iterator, as described here.

The READ_H_BASIS and READ_H_RGRID commands can be used to instead read in external fields from an existing file and apply them to the current simulation. Files that contain external fields use the same formats as those used for w fields. Users who use this a thin film iterator to simulate a thin film generally do not need to read external fields from file, because they are instead defined by the iterator.

The WRITE_H_BASIS and WRITE_H_RGRID commands write the current external fields, if any, to a specified field in basis or r-grid format.

Mask Field (Inhomogeneous Density Constraint)

A polymer fluid can be confined to a specified region by introducing a "mask" field that modifies the incompressibility constraint. A mask field is a dimensionless function of position, denoted here by \( m({\bf r}) \), that has a value very close to 1 throughout a region to which the polymer material is confined and a value very close to 0 throughout a region from which the material is being excluded. The incompressibility constraint for a system that is subjected to a mask is modified so as to require that

\[ v \sum_{\alpha=1} c_\alpha({\bf r}) = m({\bf r}) \]

at every point in the system, where \( m({\bf r}) \) is the mask field, \( c_{\alpha}({\bf r}) \) is the number concentration of monomers of type \( \alpha \) at point \( {\bf r} \), \( v \) is the monomer reference volume, and the summation is over all distinct monomer types. Introduction of a mask provides a simple way to impose geometric confinment within a program that is designed for periodic systems.

The mask that is used to confine a polymer to a thin film is generated algorithmically by the thin film iterator, as described in more detail here.

The commands READ_MASK_BASIS or READ_MASK_RGRID may instead be used to read a mask field from a file in basis or r-grid format. The file formats are identical to those which would be used for w or c field file for a system with only one monomer type. These commands are generally not needed by users who use an interator to define a thin film problem, because the mask is defined by the iterator.

The commands WRITE_MASK_BASIS or WRITE_MASK_RGRID may instead be used to write any current mask field to a file in basis or r-grid format.

Contents (Subpages)

Each of the following subpages gives more detailed information about output formats of files created by particular commands. Each is also referred to above in the discussion of the corresponding command.

  1. WRITE_WAVES
  2. WRITE_STARS
  3. WRITE_GROUP


Commands - pscf_fd (Prev)         Command Files (Up)         Commands - pscf_pg (Next)