pyPRISM.closure.MartynovSarkisov module

class pyPRISM.closure.MartynovSarkisov.MS(apply_hard_core=False)[source]

Bases: pyPRISM.closure.MartynovSarkisov.MartynovSarkisov

Alias of MartynovSarkisov

class pyPRISM.closure.MartynovSarkisov.MartynovSarkisov(apply_hard_core=False)[source]

Bases: pyPRISM.closure.AtomicClosure.AtomicClosure

MartynovSarkisov closure

Mathematial Definition

\[c_{\alpha,\beta}(r) = \left(\exp\left(\sqrt{\gamma_{\alpha,\beta}(r) - U_{\alpha,\beta}(r) - 0.5}\right) - 1.0 \right) - 1.0 - \gamma_{\alpha,\beta}(r)\]
\[\gamma_{\alpha,\beta}(r) = h_{\alpha,\beta}(r) - c_{\alpha,\beta}(r)\]

Variables Definitions

  • \(h_{\alpha,\beta}(r)\)
    Total correlation function value at distance \(r\) between sites \(\alpha\) and \(\beta\).
  • \(c_{\alpha,\beta}(r)\)
    Direct correlation function value at distance \(r\) between sites \(\alpha\) and \(\beta\).
  • \(U_{\alpha,\beta}(r)\)
    Interaction potential value at distance \(r\) between sites \(\alpha\) and \(\beta\).

Description

The Martynov-Sarkisov (MS) closure is described as a generalization of the HyperNettedChain closure. See the references below for derivation and usage examples.

The change of variables is necessary in order to use potentials with hard cores in the computational setting. Written in the standard form, this closure diverges with divergent potentials, which makes it impossible to numerically solve.

The MS closure has been shown to be very accurate for hard-sphere spherical molecules and for high-density hard-core polymer systems.

References

  1. Martynov, G.A.; Sarkisov, G.N.; Mol. Phys. 49. 1495 (1983) [link]
  2. Yethiraj, A.; Schweizer, K.S.; J. Chem. Phys. 97. 1455 (1992) [link]

Example

import pyPRISM

sys = pyPRISM.System(['A','B'])

sys.closure['A','A'] = pyPRISM.closure.PercusYevick()
sys.closure['A','B'] = pyPRISM.closure.PercusYevick()
sys.closure['B','B'] = pyPRISM.closure.MartynovSarkisov()

# ** finish populating system object **

PRISM = sys.createPRISM()

PRISM.solve()
__init__(apply_hard_core=False)[source]

Contstructor

Parameters:apply_hard_core (bool) – If True, the total correlation function will be assumed to be -1 inside the core (\(r_{i,j}<(d_i + d_j)/2.0\)) and the closure will not be applied in this region.
calculate(r, gamma)[source]

Calculate direct correlation function based on supplied \(\gamma\)

Parameters:
  • r (np.ndarray) – array of real-space values associated with \(\gamma\)
  • gamma (np.ndarray) – array of \(\gamma\) values used to calculate the direct correlation function