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 \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified. Default: C=1.

  • rho0 (float) – System density \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified. Default: C=1.

  • chiN (float) – Flory-Huggins \(\chi\) parameter multiplied Nref.

  • chi (float) – Flory-Huggins \(\chi\) parameter, optionally multiplied Nref. Only chiN or chi can be specified.

  • inverse_zetaN (float) – Helfand compressibility parameter \(\zeta\), optionally multiplied Nref and inverted (i.e. \((\zeta N)^{-1}\)). Only one can be specified. Default: inverse_zetaN=0 (incompressible).

  • zeta (float) – Helfand compressibility parameter \(\zeta\), optionally multiplied Nref and inverted (i.e. \((\zeta N)^{-1}\)). Only one can be specified. Default: inverse_zetaN=0 (incompressible).

  • inverse_BC (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • B (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • u0 (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). 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

\[\mathcal{Z} = \int \mathcal{D} w_+ \int \mathcal{D} w_- \exp{-H[w_+,w_-]}\]

where the form of \(H[w_+,w_-]\) 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.

\[H[\mu_+,\mu_-] = C \int d \pmb{x} [\frac{1}{\chi N} \mu_-^2 - \mu_+] - C \tilde{V} \sum_{p=1}^P \frac{\phi_p}{\alpha_p} \ln Q_p[\Gamma \star \mu_A,\Gamma \star \mu_B].\]

where \(w_A = i w_+ - w_-\) and \(w_B = i w_+ + w_-\). where \(\mu_A = \mu_+ - \mu_-\) and \(\mu_B = \mu_+ + \mu_-\).

  • Helfand compressibility (inverse_zetaN != 0):

    This model is given in Delaney 2016 Eq 15.

\[\begin{split}H[\mu_+,\mu_-] = \frac{-C}{\chi N + 2 \zeta N} \int d \pmb{x} (\mu_+^2 + 2\zeta N \mu_+) + \\frac{C}{\chi N} \int d\pmb{x} (\mu_-^2) - C \tilde{V} \sum_{p=1}^P \frac{\phi_p}{\alpha_p} \ln Q_p[\Gamma \star \mu_A,\Gamma \star \mu_B]\end{split}\]
\[H[\mu_+,\mu_-] = \frac{-C}{\chi N + 2 BC} \int d \pmb{x} (\mu_+^2) + \frac{C}{\chi N} \int d\pmb{x} (\mu_-^2) - C \tilde{V} \sum_{p=1}^P \frac{\phi_p}{\alpha_p} \ln Q_p[\Gamma \star \mu_A,\Gamma \star \mu_B]\]

For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential

\[\begin{split}\beta u_{nb}(r) = \begin{cases} \beta u_0 \psi(r) &\text{ if } AA \text{ or } BB \text{}\\ (\beta u_0 + \frac{\chi}{\rho_0}) \psi(r) &\text{ if } AB \text{} \end{cases}\end{split}\]

where

\[\psi_(r) = \frac{1}{(8\pi^{3/2}a^3)} \exp[-r^2/4a^2]\]
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 \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified. Default: C=1.

  • rho0 (float) – System density \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified. Default: C=1.

  • inverse_zetaN (float) – Helfand compressibility parameter \(\zeta\), optionally multiplied Nref and inverted (i.e. \((\zeta N)^{-1}\)). Only one can be specified. Default: inverse_zetaN=0 (incompressible).

  • zeta (float) – Helfand compressibility parameter \(\zeta\), optionally multiplied Nref and inverted (i.e. \((\zeta N)^{-1}\)). Only one can be specified. Default: inverse_zetaN=0 (incompressible).

  • inverse_BC (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • B (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • u0 (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • chiN_array (float array) – Flory-Huggins \(\chi\) parameters, optionally multiplied Nref. Ordering of array elements are \({\chi_1, \chi_2, \chi_3, ...}\) and correspond to the upper diagonal of the \(\pmb{\chi}\) interaction matrix.

  • chi_array (float array) – Flory-Huggins \(\chi\) parameters. Ordering of array elements is same as chiN_array. Only chi_array or chiN_array can be specified.

  • chiN_diagonal (float array) – Flory-Huggins \(\chi^s_{ii}\) 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 \(\pmb{\chi}\) interaction matrix. Ordering of elements are \({\chi^s_{11}, \chi^{s}_{22}, \chi^s_{33}, ...}\)

  • chi_diagonal (float array) – Flory-Huggins \(\chi^s_{ii}\) 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 \(\pmb{\chi}\) interaction matrix. Ordering of elements are \({\chi^s_{11}, \chi^{s}_{22}, \chi^s_{33}, ...}\)

  • chi_diagonal – Flory-Huggins \(\chi^s_{ii}\) self interaction parameters. Ordering of array elements is same as chi_diagonal

Note

Only one compressibility parameter (i.e. u0, B, zeta, inverse_zetaN or inverse_BC) can be specified.

For a 3 species model:

\[\begin{split}\pmb{\chi} = \begin{pmatrix} \chi^s_{11} & \chi_1 & \chi_2 \\ \chi_1 & \chi^s_{22} & \chi_3 \\ \chi_2 & \chi_3 & \chi^s_{33} \\ \end{pmatrix}\end{split}\]

For a 4 species model:

\[\begin{split}\pmb{\chi} = \begin{pmatrix} \chi^s_{11} & \chi_1 & \chi_2 & \chi_3 \\ \chi_1 & \chi^s_{22} & \chi_4 & \chi_5 \\ \chi_2 & \chi_4 & \chi^s_{33} & \chi_6 \\ \chi_3 & \chi_5 & \chi_6 & \chi^s_{44} \\ \end{pmatrix}\end{split}\]

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

    \[\beta u_{nb}(r) = \frac{\beta u_{ij}}{8 \pi^{3/2} a_{ij}^3}\exp \left(-\frac{r^2}{4 a_{ij}^2} \right)\]

    where

    \[\beta u_{ij} = \beta u_0 + \chi_{ij} / \rho_0\]
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 \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified. Default: C=1.

  • rho0 (float) – System density \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified. Default: C=1.

  • inverse_zetaN (float) – Helfand compressibility parameter \(\zeta\), optionally multiplied Nref and inverted (i.e. \((\zeta N)^{-1}\)). Only one can be specified. Default: inverse_zetaN=0 (incompressible).

  • zeta (float) – Helfand compressibility parameter \(\zeta\), optionally multiplied Nref and inverted (i.e. \((\zeta N)^{-1}\)). Only one can be specified. Default: inverse_zetaN=0 (incompressible).

  • inverse_BC (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • B (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • u0 (float) – Excluded volume incompressiblity. \(B =\beta u_0 N^2 / R_g^3\) is the dimensionless excluded volume and \(C = n R_g^3 / V\). See Delaney2016 for details.

  • chiN_array (float array) – Flory-Huggins \(\chi\) parameters, optionally multiplied Nref. Ordering of array elements are \({\chi_1, \chi_2, \chi_3, ...}\) and correspond to the upper diagonal of the \(\pmb{\chi}\) interaction matrix.

  • chi_array (float array) – Flory-Huggins \(\chi\) parameters, optionally multiplied Nref. Ordering of array elements are \({\chi_1, \chi_2, \chi_3, ...}\) and correspond to the upper diagonal of the \(\pmb{\chi}\) interaction matrix.

  • chiN_diagonal (float array) – Flory-Huggins \(\chi^s_{ii}\) 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 \(\pmb{\chi}\) interaction matrix. Ordering of elements are \({\chi^s_{11}, \chi^{s}_{22}, \chi^s_{33}, ...}\)

  • chi_diagonal (float array) – Flory-Huggins \(\chi^s_{ii}\) 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 \(\pmb{\chi}\) interaction matrix. Ordering of elements are \({\chi^s_{11}, \chi^{s}_{22}, \chi^s_{33}, ...}\)

  • E (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:

\[\begin{split}\pmb{\chi} = \begin{pmatrix} \chi^s_{11} & \chi_1 & \chi_2 \\ \chi_1 & \chi^s_{22} & \chi_3 \\ \chi_2 & \chi_3 & \chi^s_{33} \\ \end{pmatrix}\end{split}\]

For a 4 species model:

\[\begin{split}\pmb{\chi} = \begin{pmatrix} \chi^s_{11} & \chi_1 & \chi_2 & \chi_3 \\ \chi_1 & \chi^s_{22} & \chi_4 & \chi_5 \\ \chi_2 & \chi_4 & \chi^s_{33} & \chi_6 \\ \chi_3 & \chi_5 & \chi_6 & \chi^s_{44} \\ \end{pmatrix}\end{split}\]

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 \(\varphi\) field.

  • Helfand compressibility (inverse_zetaN != 0):

    This model is given in Duchs 2014 Eq 25-26 and Appendix B plus an electrostatic \(\varphi\) 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):

    \[\beta u_{nb}(r) = \frac{\beta u_{ij}}{8 \pi^{3/2} a_{ij}^3}\exp \left(-\frac{r^2}{4 a_{ij}^2} \right) + \frac{l_B z_i z_j}{r} \text{ erf} \left( \frac{r}{2 a_{ij}} \right)\]

    where \(l_B\) is the Bjerrum length, \(a_{ij} = ((a_i^2 + a_j^2) / 2)^{1/2}\) and \(\beta u_{ij} = \beta u_0 + \chi_{ij} / \rho_0\).

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 \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified.

  • rho0 (float) – System density \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified.

  • B (float) – Excluded volume parameter \(B = u0 N_{ref}^2 / R_g^3\). Only one can be specified.

  • u0 (float) – Excluded volume parameter \(B = u0 N_{ref}^2 / R_g^3\). 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)

\[\mathcal{Z} = Z_0 \int \mathcal{D} w \exp{\left(-H[w]\right)}\]

where

\[H[w] = \frac{1}{2 \nu} \int d \pmb{r} [w(\pmb{r})]^2 - \sum_p^P n_p \ln Q_p[i \Gamma * w]\]

For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential

\[\beta u_{nb}(r) = \frac{\beta u_{0}}{8 \pi^{3/2} a^3}\exp \left(-\frac{r^2}{4 a^2} \right)\]
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 \(B = u0 N_{ref}^2 / R_g^3\). Only one can be specified.

  • u0 (float) – Excluded volume parameter \(B = u0 N_{ref}^2 / R_g^3\). Only one can be specified.

  • C (float) – System density \(C = \rho_0 R_g^3 / N_{ref}\). Only one can be specified.

  • rho0 (float) – System density \(C = \rho_0 R_g^3 / N_{ref}\). 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)

\[\mathcal{Z} = \frac{Z_0}{Z_w Z_\varphi} \int \mathcal{D} w \int \mathcal{D} \varphi \exp{\left(-H[w,\varphi]\right)}\]

where

\[H[w] = \frac{1}{B} \int d \pmb{r} [w(\pmb{r})]^2 + \frac{1}{2E} \int_{\tilde{V}} d^3 r\, |\nabla \varphi|^2 - \sum_p^P n_p \ln Q_p[i \Gamma * w]\]

For discrete chains, this model can be mapped exactly to a particle based model with nonbonded potential

\[\beta u_{nb}(r) = \frac{\beta u_{0}}{8 \pi^{3/2} a_{ij}^3}\exp \left(-\frac{r^2}{4 a_{ij}^2} \right) + \frac{l_B z_i z_j}{r} \text{ erf} \left( \frac{r}{2 a_{ij}} \right)\]

.