Molecule Polymer Linear (discrete) ==================================== Arguments: * `nmolecule` (int) - Number of molecules in simulation * `moleculeX` (json object) - Information about `moleculeX` where `X` ranges from 0 to `nmolecule-1`. In each `moleculeX` object the following must be specified: * `type` (string) - Type of molecule. Here `PolymerLinear` * `label` (string) - label for this molecule, defaults to `molX` * `chain_type` (string) - Type of chain statistics. Either `discrete` (as documented here) or `continuous`. * `nbeads` (int) - Number of beads in discrete chain * `volume_frac` (float) - Volume fraction of `moleculeX` in the simulation. Must be 0-1. * `ncopies` (float) - number of copies of `moleculeX` in the simulation. Note that either `volume_frac` or `ncopies` can be specified, not both. * There are two options to initialize the polymer sequence 1. Initialize by block * `nblocks` (int) - Number of blocks in polymer * `block_species` (list string) - the species of each block. Length is `nblocks`. Must corresponds to a `label` entry in :ref:`Species`. * `block_fractions` (list float) - fractional length of each block. Length is `nblocks`, must sum to 1. 2. Initialize by monomer sequence * `monomer_sequence` (string) - String of length `nbeads` where each letter corresponds to a :ref:`Species` label. To use this option, each :ref:`Species` label must be a single character. Example (python):: # a block polymer fts.add_molecule(nbeads=100,nblocks=2,block_fractions=[0.5, 0.5],block_species=['A', 'B'],type='PolymerLinear',chain_type='discrete',volume_frac=1.0) # sequence defined polymer seq = "AABAAAAAABAAABAABBAAABABBABBABAABBABBBBBBBBBBBBAAA" fts.add_molecule(nbeads=50,type='PolymerLinear',chain_type='discrete',volume_frac=1.0,monomer_sequence=sv20) Example (json):: # block polmer "molecules": { "molecule0": { "nbeads": 100, "nblocks": 2, "block_fractions": [0.5, 0.5], "block_species": ["A","B"], "type": "PolymerLinear", "chain_type": "discrete", "volume_frac": 1.0 }, "nmolecule": 1 }, # sequence defined polymer "molecules": { "molecule0": { "chain_type": "discrete", "monomer_sequence": "AABAAAAAABAAABAABBAAABABBABBABAABBABBBBBBBBBBBBAAA", "nbeads": 50, "type": "PolymerLinear", "volume_frac": 1.0 }, "nmolecule": 1 }, Molecule Polymer Discrete Formalism -------------------------------------- TODO should consolidate. For now, see :ref:`Continuous vs Discrete Chains`.