pyPRISM.closure.MeanSphericalApproximation module

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

Bases: pyPRISM.closure.MeanSphericalApproximation.MeanSphericalApproximation

Alias of MeanSphericalApproximation

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

Bases: pyPRISM.closure.AtomicClosure.AtomicClosure

Mean Spherical Approximation closure

Mathematial Definition

\[c_{\alpha,\beta}(r) = -U_{\alpha,\beta}(r)\]

Variables Definitions

  • \(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 Mean Spherical Approximation (MSA) closure assumes an interaction potential that contains a hard-core interaction and a tail interaction. See Reference [1] for a derivation and discussion of this closure.

The MSA does a good job of describing the properties of the square-well fluid, and allows for the analytical solution of the PRISM/RISM equations for some systems. The MSA closure reduces to the PercusYevick closure if the tail is ignored.

References

  1. Hansen, J.P.; McDonald, I.R.; Theory of Simple Liquids; Chapter 4, Section 4; 4th Edition (2013), Elsevier [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.MeanSphericalApproximation()

# ** 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