Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
raise NotImplementedError('Mixed term {0} not implemented for uncoupled rovib model'.format(
k))
else:
raise KeyError('Unexpected coefficient: {0}'.format(k))
coeffs_vib1 = coeffs_vib['1']
coeffs_vib2 = coeffs_vib['2']
coeffs_vib3 = coeffs_vib['3']
# Get rotational coeffs:
coeffs_rot = {k:v for (k,v) in coeff_dict.items() if k in herzberg_coefficients_rot}
# Energies
G1 = Gv(v1, gv=gv1, **coeffs_vib1)
G2 = Gv(v2, gv=gv2, **coeffs_vib2)
G3 = Gv(v3, gv=gv3, **coeffs_vib3)
G = G1 + G2 + G3
F = Fv(0, J, **coeffs_rot) # Uncoupled model: v dependance ignored
if remove_ZPE:
ZPE = (Gv(0, **coeffs_vib1) + Gv(0, gv=2, **coeffs_vib2) + Gv(0, **coeffs_vib3))
else:
ZPE = 0
return G + F - ZPE # cm-1
beta_e = c.get('beta_e', 0)
gamma_e = c.get('gamma_e', 0)
delta_e = c.get('delta_e', 0)
pi_e = c.get('pi_e', 0)
He = c.get('He', 0)
eta_e = c.get('eta_e', 0)
# Energies
# Te = c['Te'] # electronic energy
G = Gv(v, we, wexe, weye, weze, weae, webe) # vibrational energy
F = Fv(v, J, Be, De, alpha_e, beta_e, gamma_e, delta_e, pi_e=pi_e,
He=He, eta_e=eta_e) # rotational energy
if remove_ZPE:
ZPE = Gv(0, we, wexe, weye, weze)
else:
ZPE = 0
E = G + F - ZPE # cm-1
except KeyError as err:
raise KeyError('Mandatory spectroscopic constant `{0}` '.format(err.args[0]) +
'not defined for electronic state {0}'.format(self.get_fullname()) +
'. Check your ElectronicState definition')
return E
coeffs_vib1 = coeffs_vib['1']
coeffs_vib2 = coeffs_vib['2']
coeffs_vib3 = coeffs_vib['3']
# Get rotational coeffs:
coeffs_rot = {k:v for (k,v) in coeff_dict.items() if k in herzberg_coefficients_rot}
# Energies
G1 = Gv(v1, gv=gv1, **coeffs_vib1)
G2 = Gv(v2, gv=gv2, **coeffs_vib2)
G3 = Gv(v3, gv=gv3, **coeffs_vib3)
G = G1 + G2 + G3
F = Fv(0, J, **coeffs_rot) # Uncoupled model: v dependance ignored
if remove_ZPE:
ZPE = (Gv(0, **coeffs_vib1) + Gv(0, gv=2, **coeffs_vib2) + Gv(0, **coeffs_vib3))
else:
ZPE = 0
return G + F - ZPE # cm-1
elif k in herzberg_coefficients_rovib:
raise NotImplementedError('Mixed term {0} not implemented for uncoupled rovib model'.format(
k))
else:
raise KeyError('Unexpected coefficient: {0}'.format(k))
coeffs_vib1 = coeffs_vib['1']
coeffs_vib2 = coeffs_vib['2']
coeffs_vib3 = coeffs_vib['3']
# Get rotational coeffs:
coeffs_rot = {k:v for (k,v) in coeff_dict.items() if k in herzberg_coefficients_rot}
# Energies
G1 = Gv(v1, gv=gv1, **coeffs_vib1)
G2 = Gv(v2, gv=gv2, **coeffs_vib2)
G3 = Gv(v3, gv=gv3, **coeffs_vib3)
G = G1 + G2 + G3
F = Fv(0, J, **coeffs_rot) # Uncoupled model: v dependance ignored
if remove_ZPE:
ZPE = (Gv(0, **coeffs_vib1) + Gv(0, gv=2, **coeffs_vib2) + Gv(0, **coeffs_vib3))
else:
ZPE = 0
return G + F - ZPE # cm-1
coeffs_vib[vib_mode][k[:-1]] = v
elif k in herzberg_coefficients_rovib:
raise NotImplementedError('Mixed term {0} not implemented for uncoupled rovib model'.format(
k))
else:
raise KeyError('Unexpected coefficient: {0}'.format(k))
coeffs_vib1 = coeffs_vib['1']
coeffs_vib2 = coeffs_vib['2']
coeffs_vib3 = coeffs_vib['3']
# Get rotational coeffs:
coeffs_rot = {k:v for (k,v) in coeff_dict.items() if k in herzberg_coefficients_rot}
# Energies
G1 = Gv(v1, gv=gv1, **coeffs_vib1)
G2 = Gv(v2, gv=gv2, **coeffs_vib2)
G3 = Gv(v3, gv=gv3, **coeffs_vib3)
G = G1 + G2 + G3
F = Fv(0, J, **coeffs_rot) # Uncoupled model: v dependance ignored
if remove_ZPE:
ZPE = (Gv(0, **coeffs_vib1) + Gv(0, gv=2, **coeffs_vib2) + Gv(0, **coeffs_vib3))
else:
ZPE = 0
return G + F - ZPE # cm-1
# Rotational constants
Be = c['Be']
De = c.get('De', 0)
alpha_e = c.get('alpha_e', 0)
beta_e = c.get('beta_e', 0)
gamma_e = c.get('gamma_e', 0)
delta_e = c.get('delta_e', 0)
pi_e = c.get('pi_e', 0)
He = c.get('He', 0)
eta_e = c.get('eta_e', 0)
# Energies
# Te = c['Te'] # electronic energy
G = Gv(v, we, wexe, weye, weze, weae, webe) # vibrational energy
F = Fv(v, J, Be, De, alpha_e, beta_e, gamma_e, delta_e, pi_e=pi_e,
He=He, eta_e=eta_e) # rotational energy
if remove_ZPE:
ZPE = Gv(0, we, wexe, weye, weze)
else:
ZPE = 0
E = G + F - ZPE # cm-1
except KeyError as err:
raise KeyError('Mandatory spectroscopic constant `{0}` '.format(err.args[0]) +
'not defined for electronic state {0}'.format(self.get_fullname()) +
'. Check your ElectronicState definition')
return E