pyPRISM.potential.HardCoreLennardJones module¶
-
class
pyPRISM.potential.HardCoreLennardJones.
HardCoreLennardJones
(epsilon, sigma=None, high_value=1000000.0)[source]¶ Bases:
pyPRISM.potential.Potential.Potential
12-6 Lennard-Jones potential with Hard Core
Warning
This potential uses a slightly different form than what is implemented for the classic LJ potential. This means that the epsilon in the LJ and HCLJ potentials will not correspond to the same interaction strengths.
Mathematical Definition
\[U_{\alpha,\beta}(r>\sigma_{\alpha,\beta}) = \epsilon_{\alpha,\beta}\left[\left(\frac{\sigma_{\alpha,\beta}}{r}\right)^{12} - 2 \left(\frac{\sigma_{\alpha,\beta}}{r}\right)^{6}\right]\]\[U_{\alpha,\beta}(r\leq\sigma_{\alpha,\beta}) = C^{high}\]Variable Definitions
- \(\epsilon_{\alpha,\beta}\)
- Strength of interaction (attraction or repulsion) between sites \(\alpha\) and \(\beta\).
- \(\sigma_{\alpha,\beta}\)
- Length scale of interaction between sites \(\alpha\) and \(\beta\).
- \(r\)
- Distance between sites.
- \(C^{high}\)
- High value used to approximate an infinite potential due to overlap
Description
Unlike the classic LJ potential, the HCLJ potential has an infinitely hard core and can handle negative and positive epsilons, corresponding to attractive and repulsive interactions.References
- Yethiraj, A. and K.S. Schweizer, INTEGRAL-EQUATION THEORY OF POLYMER BLENDS - NUMERICAL INVESTIGATION OF MOLECULAR CLOSURE APPROXIMATIONS. Journal of Chemical Physics, 1993. 98(11): p. 9080-9093. [link]
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.HardCoreLennardJones(epsilon=1.0,sigma=1.0,high_value=10**6)
Warning
If sigma is specified such that it does not fall on the solution grid of the
Domain
object specified inSystem
, then the sigma will effectively be rounded. A warning should be emitted during the construction of aPRISM
object if this occurs.-
__init__
(epsilon, sigma=None, high_value=1000000.0)[source]¶ Constructor
Parameters: - epsilon (float) – Depth of attractive well
- sigma (float, optional) – Contact distance. If not specified, sigma will be calculated from
the diameters specified in the
System
object. - high_value (float, optional) – High value used to approximate an infinite potential due to overlap