Model¶
- class openfts.model.ChiAB(Nref=None, bref=None, init_fields=None, C=None, rho0=None, B=None, u0=None, chiN=None, chi=None, inverse_zetaN=None, zeta=None, inverse_BC=None)¶
Chi AB Model
- Parameters:
Nref (float) – Reference degree of polymerization
bref (float) – Reference statistical segment length
init_fields (InitField object) – Describes how to initialize fields within model. See InitField
C (float) – System density
. Only one can be specified. Default: C=1.rho0 (float) – System density
. Only one can be specified. Default: C=1.chiN (float) – Flory-Huggins
parameter, optionally multiplied Nref. Only one can be specified.chi (float) – Flory-Huggins
parameter, optionally multiplied Nref. Only one can be specified.inverse_zetaN (float) – Helfand compressibility parameter
, optionally multiplied Nref and inverted (i.e. ). Only one can be specified. Default: inverse_zetaN=0 (incompressible).zeta (float) – Helfand compressibility parameter
, optionally multiplied Nref and inverted (i.e. ). Only one can be specified. Default: inverse_zetaN=0 (incompressible).inverse_BC (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.B (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.u0 (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.
Note
Only one compressibility parameter (i.e. u0, B, zeta, inverse_zetaN or inverse_BC) can be specified.
Example (python)
import openfts fts = openfts.OpenFTS() ... fts.model = openfts.model.ChiAB(Nref=1.0,bref=1.0,chiN=20.) ...
Example (json)
"model": { "type": "ChiAB" "Nref": 1.0, "bref": 1.0, "chiN": 20 , "initfields": { ... see "Initialize Model Fields" ... }, },
Formally, ModelChiAB is defined by
where the form of
depends on the compressibility constraint.Incompressible (inverse_BC = 0 or inverse_zetaN=0):
This model is a smeared version of Model C/E given in Fredrickson 2006.
where
and . where and .Helfand compressibility (inverse_zetaN != 0):
This model is given in Delaney 2016 Eq 15.
Excluded volume compressibility (inverse_BC != 0):
This model is given in Delaney 2016 Eq 30 and Lequieu 2023 Eq 7-8.
For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential
where
- class openfts.model.ChiMultiSpecies(Nref=None, bref=None, init_fields=None, C=None, rho0=None, B=None, u0=None, inverse_zetaN=None, zeta=None, inverse_BC=None, chiN_array=None, chi_array=None, chiN_diagonal=None, chi_diagonal=None)¶
Chi Multi-Species Model
- Parameters:
Nref (float) – Reference degree of polymerization
bref (float) – Reference statistical segment length
init_fields (InitField object) – Describes how to initialize fields within model. See InitField
C (float) – System density
. Only one can be specified. Default: C=1.rho0 (float) – System density
. Only one can be specified. Default: C=1.inverse_zetaN (float) – Helfand compressibility parameter
, optionally multiplied Nref and inverted (i.e. ). Only one can be specified. Default: inverse_zetaN=0 (incompressible).zeta (float) – Helfand compressibility parameter
, optionally multiplied Nref and inverted (i.e. ). Only one can be specified. Default: inverse_zetaN=0 (incompressible).inverse_BC (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.B (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.u0 (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.chiN_array (float array) – Flory-Huggins
parameters, optionally multiplied Nref. Ordering of array elements are and correspond to the upper diagonal of the interaction matrix.chi_array (float array) – Flory-Huggins
parameters, optionally multiplied Nref. Ordering of array elements are and correspond to the upper diagonal of the interaction matrix.chiN_diagonal (float array) – Flory-Huggins
self interaction parameters, optionally multiplied Nref. This can be used to make some species more or less compressible than others. Length of array should be equal to number of species and corresponds to the diagonal elements of the interaction matrix. Ordering of elements arechi_diagonal (float array) – Flory-Huggins
self interaction parameters, optionally multiplied Nref. This can be used to make some species more or less compressible than others. Length of array should be equal to number of species and corresponds to the diagonal elements of the interaction matrix. Ordering of elements are
Note
Only one compressibility parameter (i.e. u0, B, zeta, inverse_zetaN or inverse_BC) can be specified.
For a 3 species model:
For a 4 species model:
Example (python)
chiN = 30.0 fts.model = openfts.model.ChiMultiSpecies(Nref=1.0,bref=1.0,inverse_zetaN=0.01,chiN_array=[chiN, chiN, chiN]) ... # to initialize EXCHANGE fields fts.model.init_fields['mu_1'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_2'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_3'] = openfts.init_field.Random(mean=0.0,stdev=1.0) # to initialize SPECIES fields fts.model.init_fields['mu_A'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_B'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_C'] = openfts.init_field.Random(mean=0.0,stdev=1.0) ... # three species must be present fts.species.append(openfts.Species(label='A',stat_segment_length=1.0)) fts.species.append(openfts.Species(label='B',stat_segment_length=1.0)) fts.species.append(openfts.Species(label='C',stat_segment_length=1.0))
Example (json)
"model": { "type": "ChiMultiSpecies" "Nref": 1.0, "bref": 1.0, "chiN_array": [20,40,20] , "initfields": { ... see "Initialize Model Fields" ... }, },
The formal definition of ModelChiMultiSpecies depends on the compressibility constraint.
Incompressible (inverse_BC = 0 or inverse_zetaN=0):
This model is given in Duchs 2014 Eq 6-7 and Appendix A.
Helfand compressibility (inverse_zetaN != 0):
This model is given in Duchs 2014 Eq 25-26 and Appendix B.
Excluded volume compressibility (inverse_BC != 0):
This model is given in Lequieu 2024 Eq 9-10 (with varphi = 0)
For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential
where
- class openfts.model.ChiMultiSpeciesCharge(Nref=None, bref=None, init_fields=None, C=None, rho0=None, B=None, u0=None, inverse_zetaN=None, zeta=None, inverse_BC=None, chiN_array=None, chi_array=None, chiN_diagonal=None, chi_diagonal=None, E=None, lB=None)¶
Chi Multi-Species Charge Model
- Parameters:
Nref (float) – Reference degree of polymerization
bref (float) – Reference statistical segment length
init_fields (InitField object) – Describes how to initialize fields within model. See InitField
C (float) – System density
. Only one can be specified. Default: C=1.rho0 (float) – System density
. Only one can be specified. Default: C=1.inverse_zetaN (float) – Helfand compressibility parameter
, optionally multiplied Nref and inverted (i.e. ). Only one can be specified. Default: inverse_zetaN=0 (incompressible).zeta (float) – Helfand compressibility parameter
, optionally multiplied Nref and inverted (i.e. ). Only one can be specified. Default: inverse_zetaN=0 (incompressible).inverse_BC (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.B (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.u0 (float) – Excluded volume incompressiblity.
is the dimensionless excluded volume and . See Delaney2016 for details.chiN_array (float array) – Flory-Huggins
parameters, optionally multiplied Nref. Ordering of array elements are and correspond to the upper diagonal of the interaction matrix.chi_array (float array) – Flory-Huggins
parameters, optionally multiplied Nref. Ordering of array elements are and correspond to the upper diagonal of the interaction matrix.chiN_diagonal (float array) – Flory-Huggins
self interaction parameters, optionally multiplied Nref. This can be used to make some species more or less compressible than others. Length of array should be equal to number of species and corresponds to the diagonal elements of the interaction matrix. Ordering of elements arechi_diagonal (float array) – Flory-Huggins
self interaction parameters, optionally multiplied Nref. This can be used to make some species more or less compressible than others. Length of array should be equal to number of species and corresponds to the diagonal elements of the interaction matrix. Ordering of elements areE (float) – Electrostatic interaction strength. Only one can be specified.
lB (float) – Electrostatic interaction strength. Only one can be specified.
Note
Only one compressibility parameter (i.e. u0, B, zeta, inverse_zetaN or inverse_BC) can be specified.
For a 3 species model:
For a 4 species model:
Example (python)
chiN = 30.0 fts.model = openfts.model.ChiMultiSpeciesCharge(Nref=1.0,bref=1.0,inverse_zetaN=0.01,chiN_array=[chiN, chiN, chiN],E=1000) ... # to initialize EXCHANGE fields fts.model.init_fields['mu_1'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_2'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_3'] = openfts.init_field.Random(mean=0.0,stdev=1.0) # to initialize SPECIES fields fts.model.init_fields['mu_A'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_B'] = openfts.init_field.Random(mean=0.0,stdev=1.0) fts.model.init_fields['mu_C'] = openfts.init_field.Random(mean=0.0,stdev=1.0) ... # three species must be present fts.species.append(openfts.Species(label='A',stat_segment_length=1.0, charge=+1)) fts.species.append(openfts.Species(label='B',stat_segment_length=1.0, charge=0)) fts.species.append(openfts.Species(label='C',stat_segment_length=1.0, charge=-1))
Example (json)
"model": { "type": "ChiMultiSpeciesCharge" "Nref": 1.0, "bref": 1.0, "E":1000, "chiN_array": [20,40,20] , "initfields": { ... see "Initialize Model Fields" ... }, },
The formal definition of ModelChiMultiSpecies depends on the compressibility constraint.
Incompressible (inverse_BC = 0 or inverse_zetaN=0):
This model is given in Duchs 2014 Eq 6-7 and Appendix A plus an electrostatic
field.Helfand compressibility (inverse_zetaN != 0):
This model is given in Duchs 2014 Eq 25-26 and Appendix B plus an electrostatic
field.Excluded volume compressibility (inverse_BC != 0):
This model is given in Lequieu 2024 Eq 9-10.
For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential (see Lequieu 2024 Eq 3):
where
is the Bjerrum length, and .
- class openfts.model.Edwards(Nref=None, bref=None, init_fields=None, C=None, rho0=None, B=None, u0=None)¶
Edwards Model
- Parameters:
Nref (float) – Reference degree of polymerization
bref (float) – Reference statistical segment length
init_fields (InitField object) – Describes how to initialize fields within model. See InitField
C (float) – System density
. Only one can be specified.rho0 (float) – System density
. Only one can be specified.B (float) – Excluded volume parameter
. Only one can be specified.u0 (float) – Excluded volume parameter
. Only one can be specified.
Example (python):
fts.model = openfts.model.Edwards(Nref=1.0,bref=1.0,C=4.0,B=2.0)
Example (json):
"model": { "Nref": 1.0, "bref": 1.0, "C": 4.0, "B": 2.0, "initfields": { "mu": { "type": "random", "mean": 1.0, "stdev": 0.1 } }, "type": "Edwards" }, "model": { "type": "Edwards", "Nref": 1.0, "bref": 1.0, "nu0": 30, "rho0": 10, "initfields": { "mu": { "seed": 0, "type": "random" } } },
Formally, ModelEdwards is defined by (see Villet 2014)
where
For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential
- class openfts.model.EdwardsCharge(Nref=None, bref=None, init_fields=None, C=None, rho0=None, B=None, u0=None, charge_ref=None, E=None, lB=None)¶
Edwards Charge Model
- Parameters:
Nref (float) – Reference degree of polymerization
bref (float) – Reference statistical segment length
init_fields (InitField object)
charge_ref (float) – Reference charge density
B (float) – Excluded volume parameter
. Only one can be specified.u0 (float) – Excluded volume parameter
. Only one can be specified.C (float) – System density
. Only one can be specified.rho0 (float) – System density
. Only one can be specified.E (float) – Electrostatic interaction strength. Only one can be specified.
lB (float) – Electrostatic interaction strength. Only one can be specified.
Example (python):
import openfts fts = openfts.OpenFTS() ... fts.model = openfts.model.EdwardsCharge(Nref=1.0,bref=1.0,charge_ref=1.0, C=6.0,B=0.3,E=64000.0) ...
Example (json)
"model": { "B": 0.3, "C": 6.0, "E": 64000.0, "Nref": 1.0, "bref": 1.0, "charge_ref": 1.0, "initfields": { "mu": { "mean": 1.0, "stdev": 0.1, "type": "random" }, "phi": { "mean": 1.0, "stdev": 0.1, "type": "random" } }, "type": "EdwardsCharge" },
Formally, ModelEdwardsCharge is defined by (see Delaney 2017, Riggleman 2012, Lee 2008)
where
For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential
.