PSCF v1.3.1
|
Parameter File - Format Descriptions (Prev) Command Files (Next)
The first subblock of the main System block in every PSCF parameter file is required block that starts with a label "Mixture", and is referred to as the Mixture block. The Mixture block describes the chemical composition of the system that is being simulated, and includes a description of the chemical structure of each species in the mixture.
PSCF programs are designed to treat a mixture that may contain one or more polymer species and zero or more solvent point-particle species. Each polymer may be either a linear or acyclic branched block polymer. Polymers and solvents are both constructed from a palette of several types of monomer.
Each monomer type is assigned an integer index and a statistical segment length. Each copolymer block and each solvent species is assigned an integer parameter named monomerId that specifies the type of monomer from which it is constructed. The Mixture block contains information that specifies the structure of each polymer species within the mixture (including information about the length and connectivity of the blocks), the monomer type and volume of each solvent species, and the composition of the mixture.
For reference, here is the Mixture block from the example parameter file shown previously :
All three PSCF programs use very similar format for the Mixture block. The pscf_1d and pscf_pc programs use identical formats for this block, which was described on the previous page The format used by the pscf_pg program accepts one additional optional parameter named useBatchedFFT the end of the block. The format of the Mixture block used by pscf_pg is shown below
The asterisks after nSolvent, Solvent, vMonomer and useFFTBatched labels indicates that these are optional parameters or subblocks. The ellipses after the Polymer and Solvent blocks are used here to indicate that the Mixture block may contain several subblocks of each type. The number of Polymer subblocks must equal nPolymer, and the number of Solvent subblocks must equal nSolvent. Because the optional parameter nSolvent is set to 0 by default, no Solvent subblocks may be present if the nSolvent parameter is absent.
The meanings of parameters and subblocks are described in the following table:
Label | Description |
nMonomer | Number of distinct monomer types in the mixture (positive int) |
monomers | A 1D array of nMonomer elements in which the value of each element is the statistical segment length of the associated monomer type. |
nPolymer | The number of polymer species (positive int). |
nSolvent* | The number of solvent (point-particle) species (non-negative int, optional, 0 by default). |
Polymer{ ... } | Each Polymer{ ... } subblock describes one Polymer species. The number of such subblocks must equal nPolymer. |
Solvent{ ... } | Each Solvent{ ... } subblock contains data for one point-like Solvent species. The number of solvent subblocks must equal nSolvent. |
vMonomer* | monomer reference volume (optional, real, 1.0 by default) |
ds | Preferred value for the block length step size used to integrate the modified diffusion equation within each block. The ds parameter is only valid for the thread model. |
useBatchedFFT* | For pscf_pg, this boolean flag controls a computational detail that is discussed here. This parameter may only appear in pscf_pg parameter files (optional, 1 or true by default) |
The format for the Mixture block used by pscf_pg has one additional optional algorithm parameter named usedBatchedFFT at end of the block, as discussed here.
Comments:
Technical comments (for users who examine the source code) :
The source code for PCSF is defined within a C++ namespace named Pscf. This top-level namespace contains several enclosed namespaces named Prdc, R1d, Rpc, and Rpg. Namespace Pscf::Prdc contains code relevant to problems involving periodic boundary conditions, which is used to construct both pscf_pc and pscf_pg. The enclosed namespaces named R1d, Rpc, and each contain code that is only used by one executable program (e.g., pscf_1d, pscf_pc or pscf_pg, respectively).
We refer to the enclosed namespaces R1d, Rpc, and Rpg throughout this documentation as implementation-level namespaces, because each contains contain files that are only used within a single implementation of polymer field theory, corresponding executable program. By convention, code defined in any implementation-level namespace may not use names defined in a different impelementation level namespace. The segregation of code associated with different executables into separate namespaces allows identical names to be used for several analogous classes in different implementation-level namespaces without causing name clashes or ambiguity.
Each implementation-level namespace contains a class or class template named Mixture. The R1d namespace contains a class named Mixture. The Rpc and Rpg namespaces each contain a class template Mixture<int D>, in which the integer dimensionality of space D is a template parameter. The Mixture object used by the pscf_pc program to treat a 2D periodic structure is thus an instance of class Pscf::Rpc::Mixture<2>, for which the dimensionality of space is specified by the template parameter D=2. All of the Mixture classes and class templates defined in implementation level namespaces are derived from instances of a base class template named Pscf::MixtureTmpl. All of these Mixture classes use very similar parameter file formats, as described above. Most elements of this format are defined in the member function Pscf::MixtureTmpl::readParameters of the shared base class template.
The array "monomers" is implemented internally as an array of instances of the class Pscf::Monomer, as discussed here.
The Mixture block must contain one or more Polymer blocks, each of which contains information about a specific polymer molecule species. The format for a polymer block is
The meaning of different parameters is summarized in the table below:
Label | Description |
type* | enumeration with allowed text representations "linear" or "branched" (optional, "linear" by default). |
nBlock | Number of blocks in a block polymer. |
blocks | array in which each element contains a description of one block of a block polymer |
phi* | volume fraction of this species (real, optional). |
mu | chemical potential of this species (real, must be present if and only if phi is absent). |
Comments:
Descriptions of parameter file formats for individual blocks of linear and branched polymers are discussed separately below.
Technical comment (for users who examine the source code): A class or class template named Polymer is defined in each implementation-level namespace of the top-level Pscf namespace (i.e., in the R1d, Rpc and Rpg sub-namespaces of Pscf). These Polymer classes all use the same parameter file format, which is described above. Each of these Polymer classes is a subclass of an instances of a common class template named Pscf::PolymerTmpl. The readParameters function of this base class template defines the common file format.
The text representation of a block within the "blocks" array in a Polymer parameter file block is different depending on whether the polymer type is "linear" or "branched".
If the polymer type is linear, then blocks must be listed in the "blocks" array in the order in which they appear along the polymer, starting from one end. In this case the data required in each line of the blocks array takes a slightly different form when using a thread model or a bead model.
Thread model: For the thread model, each line of the blocks array for a linear polymer must have the form
where monomerId is the monomer type index for monomers in the block, and length is a real number giving the contour length of the block.
Bead model : For the bead model, each line of the blocks array for a linear polymer has the form
where monomerId is the monomer type index for every bead in the block and nBead is the integer number of beads in the block.
The meanings of these variable values are described in the following table:
Variable | Type | Description |
monomerId | int | monomer type index for all monomers in this block |
length | real | contour length of this block (thread model) |
nBead | int | number of bead in the block (bead model) |
The only difference between formats used for thread and bead models is the use of a floating point number "length" or an integer "nBead" to specify the block length.
If the polymer type is branched, then the information in the "blocks" array of a Polymer block must contain a description of the topology of the polymer, as well as the monomer type and length of each block. As discussed previously, a branched polymer is described in PSCF as an acyclic graph consisting of a set of vertices with integer labels connected by "edges", in which each edge corresponds to a block, and each vertex is a junction or chain end. An acyclic connected polymer with nBlock blocks always contains exactly nBlock + 1 vertices. To describe a branched polymer with nBlock blocks, the user must assign each vertex a unique index in the range 0, ..., nBlock. Each block connects a specific pair of vertices that may be identified by their integer vertex indices. The parameter file format for a block in a branched polymer differs from that used for a linear polymer in that the data for each block must include the indices of the two attached vertices.
Thread model: : In the thread model, the line associated with each block in the "blocks" array for a branched polymer must be of the form
where monomerId and length are the integer monomer type index and floating point length of the block, while vertexId0 and vertexId1 are integer indices of the two vertices to which the block is attached.
Bead model: : In the bead model, each line in the "blocks" array for a branched polymer is of the form
where nBead is the integer number of beads in the block, and the meaning of monomerId, vertexId0 and vertexId1 are the same as for the thread model.
Example: As a simple example of a branched polymer, consider a one-component melt containing an ABC star terpolymer that contains three chemically distinct blocks connected at a central junction. For simplicity, let the three blocks in this polymer have monomer types indices 0, 1 and 2. Let vertices 0, 1, and 2 represent the free ends of the blocks with monomers of types 0, 1, and 2, respectively, and let vertex 3 be the central junction. As an example, we use the thread model and set the length of each block to 1.0.
The Polymer block for such a star polymer would look like this:
Note that the type parameter must be explicitly set to "branched", because the type is set to linear by default. We have set phi = 1.0 in this example on the assumption that this is a one-component terpolymer melt, for which the volume fraction of this species must equal unity.
In the bead model, a corresponding description of an ABC star terpolymer would differ from that given above only in that the length of each block would have to be given as an integer number of beads. For example, for an ABC star polymer in which each block has 50 beads, the floating point length of 1.0 given in each line of the blocks array would be replaced by an integer value of 50.
Technical comment (for users who examine the source code): A class or class template named Block is defined in each implementation-level namespace. Each such Block class is a subclass of a base class named Pscf::Edge. The data for each line of the "blocks" array is read in using an overloaded insertion (>>) operator for an Edge, which defines the text representation of the data required in a single line of the "blocks" array. The required text representation depends both on whether the block is part of a linear or branched polymer, and on a globally accessible variable that determines whether the program is using the thread or bead model. A mixture may contain some polymers that are branched and others that are linear, but the polymers in a system must either all use the thread model, or all use the bead model.
A mixture block may contain zero or more Solvent blocks, each of which describes a small-molecule solvent species. Solvent species are treated in PSCF as point-like particles that occupy a specified volume (or "size"). Interactions of solvents with polymers and other solvents is described by assigning the solvent a monomer type index.
Solvent blocks should be present if and only if the optional parameter nSolvent is present and is assigned a positive value. When nSolvent is absent, this parameter is set to 0 by default. If nSolvent > 0, then exactly nSolvent Solvent blocks must appear within the Mixture block immediately after the Polymer blocks.
The format for a single solvent block is
The monomerId is a monomer type index that identifies the solvent as containing a specified monomer type. The size parameter gives the volume occupied a solvent molecule, in units in which the monomer reference volume is equal to unity. For each solvent, a value must be specified for either the volume fraction phi occupied by the species, or its chemical potential mu. It is an error to either specify values for phi and mu or to omit both variables.
Technical comment (for users who examine the source code): A Class or class template named Solvent is defined in each implementation-level namespace (i.e., in the R1d, Rpc and Rpg sub-namespaces of Pscf). These classes are all use the same parameter file format, which is described above, and are all subclasses of a common base class named Pscf::SolventSpecies. The member function Pscf::SolventSpecies::readParameters defines the file format described above.
Parameter File - Format Descriptions (Prev) Parameter Files (Up) Command Files (Next)