Potential Class
This module contains the Morse and Potential1D classes
Notes:
The Morse class is used to fit the Morse potential to the potential energy data. The Potential1D class is used to read the data from the files and then fit the potential energy and dipole moment to a polynomial.
Examples:
>>> from empmap.potential import Morse
>>> morse = Morse()
>>> morse.fit_parameters(r, E, mu, p0=[100, 10, 1.0])
>>> from empmap.potential import Potential1D
>>> pot = Potential1D("rOH_file", "pot_file", "dip_file", "eOH_file")
>>> pot.fit_potential_to_poly(3)
>>> pot.fit_dipole_to_poly(2)
- class empmap.potential.Morse
- description()
Print the Morse potential parameters
- energy(r, de, a, re)
Calculate the Morse potential
Notes:
This function is used to calculate the Morse potential.
The Morse potential is given by: V(r) = de*(1 - exp(-a*(r - re)))^2
Parameters:
- defloat
The dissociation energy [Energy Unit]
- afloat
The Morse potential parameter [1/Distance Unit]
- refloat
The equilibrium bond length [Distance Unit]
Returns:
float: The Morse potential [Energy Unit]
- fit_parameters(r, E, mu, p0=None)
Fit the Morse potential parameters
Notes:
This function is used to fit the Morse potential parameters to the potential energy data.
Parameters:
- rarray_like
The bond distance values [Distance Unit]
- Earray_like
The potential energy values [Energy Unit]
- mufloat
The reduced mass of the oscillator [Mass Unit]
- p0array_like
The initial guess for the Morse potential parameters (de, a, re)
Returns:
- poptarray_like
The optimized parameters
- pcovarray_like
The covariance matrix
- morse_Bfactor(alpha, mu, de)
Calculate the Morse potential B factor
Notes:
This function is used to calculate the Morse potential B factor.
The Morse potential B factor is given by: B = sqrt(alpha^2*hbar^2/(2*mu*de))
Parameters:
- alphafloat
The Morse potential parameter [1/Distance Unit]
- mufloat
The reduced mass of the oscillator [Mass Unit]
- defloat
The dissociation energy [Energy Unit]
Returns:
float: The Morse potential B factor [Energy Unit]
- static morse_eigenvalues(de, B, n)
Calculate the Morse potential eigenvalues
Notes:
This function is used to calculate the Morse potential eigenvalues.
The Morse potential eigenvalues are given by: E_n = de*(n+0.5)*(2-B*(n+0.5))
Parameters:
- defloat
The dissociation energy [Energy Unit]
- Bfloat
The Morse potential B factor [Energy Unit]
- nint
The quantum number
Returns:
float: The Morse potential eigenvalues [Energy Unit]
- class empmap.potential.Potential1D(rOH_file, pot_file, dip_file, eOH_file, pol_file)
- calculate_iso_pol()
Calculate the isotropic polarizability
Notes:
This function is used to calculate the isotropic polarizability.
This assumes that the polarizability is given in the form: [alpha_xx, alpha_yx, alpha_yy, alpha_zx, alpha_zy, alpha_zz]
This is the order output by Gaussian.
Returns:
None
- fit_dipole_to_poly(order)
Fit the dipole to a polynomial
Notes:
This function is used to fit the dipole moment to a polynomial.
Parameters:
- orderint
The order of the polynomial
Returns:
None
- fit_polarizability_to_poly(order)
Fit the polarizability to a polynomial
Notes:
This function is used to fit the polarizability to a polynomial.
Parameters:
- orderint
The order of the polynomial
Returns:
None