pyPRISM.potential.WeeksChandlerAndersen module

class pyPRISM.potential.WeeksChandlerAndersen.WeeksChandlerAndersen(epsilon, sigma=None)[source]

Bases: pyPRISM.potential.LennardJones.LennardJones

Purely repulsive Weeks-Chandler-Andersen potential

Mathematical Definition

\[ \begin{align}\begin{aligned}U_{\alpha,\beta}(r) = \begin{cases} 4\epsilon_{\alpha,\beta}\left[\left(\frac{\sigma_{\alpha,\beta}}{r}\right)^{12.0} - \left(\frac{\sigma_{\alpha,\beta}}{r}\right)^{6.0}\right] + \epsilon_{\alpha,\beta} & r<r_{cut}\\ 0.0 & r \geq r_{cut} \end{cases}\end{aligned}\end{align} \]
\[r_{cut} = 2^{1/6}\sigma_{\alpha,\beta}\]

Variable Definitions

\(\epsilon_{\alpha,\beta}\)
Strength of repulsion between sites \(\alpha\) and \(\beta\).
\(\sigma_{\alpha,\beta}\)
Length scale of interaction between sites \(\alpha\) and \(\beta\).
\(r\)
Distance between sites.
\(r_{cut}\)
Cutoff distance where the value of the potential goes to zero.

Description

The Weeks-Chandler-Andersen potential for purely repulsive interactions. This potential is equivalent to the Lennard-Jones potential cut and shifted at the minimum of the potential, which occurs at \(r=2^{1/6}\sigma\).

Example

import pyPRISM

#Define a PRISM system and set the A-B interaction potential
sys = pyPRISM.System(['A','B'],kT=1.0)
sys.domain = pyPRISM.Domain(dr=0.1,length=1024)
sys.potential['A','B'] = pyPRISM.potential.WeeksChandlerAndersen(epsilon=1.0,sigma=1.0)

Warning

If sigma is specified such that it does not fall on the solution grid of the Domain object specified in System, then the sigma will effectively be rounded. A warning should be emitted during the construction of a PRISM object if this occurs.

__init__(epsilon, sigma=None)[source]

Constructor

Parameters:
  • epsilon (float) – Repulsive strength modifier
  • sigma (float, optional) – Contact distance. If not specified, sigma will be calculated from the diameters specified in the System object.
calculate(r)[source]

Calculate value of potential

r

Array of pair distances at which to calculate potential values

Type:float np.ndarray