You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We anticipate implementing the Mie m-n potential and the Exp-6 potential.
Here are some simple python codes for both potentials:
Note that the Exp-6 code does not account for the fact that at low distances (low values of r) the potential turns over. To correct for this it is common to assign a variable r_max to the minimum value of r at which dU_Exp6/dr = 0. U is assigned to infinity for all values of r less than r_max since these short distances have a very high repulsion.
from __future__ importdivision#In case using Python 2.7importnumpyasnpdefU_Mie(r, epsilon, sigma, n=12, m=6):
""" The Mie potential calculated in the same units as epsilon. Standard practice is for "epsilon" to actually be epsilon/kB which is [K]. Note that r and sigma must be in the same units. The exponents (n and m) are set to default values of 12 and 6 to return the LJ potential """C= (n/(n-m))*(n/m)**(m/(n-m)) # The normalization constant for the Mie potentialU=C*epsilon*((r/sigma)**-n- (r/sigma)**-m)
returnUdefU_Exp6(r, epsilon, r_min, alpha):
""" The Exp-6 potential calculated in the same units as epsilon. Standard practice is for "epsilon" to actually be epsilon/kB which is [K]. Note that r and r_min must be in the same units. alpha determines the shape of the Exp-6 potential """U=epsilon/(1-6./alpha)*((6./alpha)*np.exp(alpha*(1-r/r_min))-(r_min/r)**6)
returnU
The text was updated successfully, but these errors were encountered:
We anticipate implementing the Mie m-n potential and the Exp-6 potential.
Here are some simple python codes for both potentials:
Note that the Exp-6 code does not account for the fact that at low distances (low values of r) the potential turns over. To correct for this it is common to assign a variable r_max to the minimum value of r at which dU_Exp6/dr = 0. U is assigned to infinity for all values of r less than r_max since these short distances have a very high repulsion.
The text was updated successfully, but these errors were encountered: