def vib_calc(vib_file, temp_r): """Description Needed Parameters ---------- vib_file : type description temp_r : type description zpe_true : type description ent_true : type description Returns ------- zpe : description svib : description """ vib_prop = ut.read_vibdata(vib_file) new_temp = ut.build_tempgrid(temp_r, vib_prop['Frequencies']) freq = ut.build_freqgrid(vib_prop['Frequencies'], temp_r) zpe = 0 zpe = zpe_calc(vib_prop) svib = entropy_calc(freq, new_temp, vib_prop) return zpe, svib
def test_entropy_calc(self): vib_prop = ut.read_vibdata(test_data) new_temp = ut.build_tempgrid(np.arange(10), vib_prop['Frequencies']) freq = ut.build_freqgrid(vib_prop['Frequencies'], np.arange(10)) svib = vd.entropy_calc(freq, new_temp, vib_prop)[0] avib = vd.entropy_calc(freq, new_temp, vib_prop)[1] assert_approx_equal(svib[1], 4.5220660932E-05) assert_approx_equal(avib[1], -1.492071248040480E-05)
def vib_calc(vib_file, temp_r): """Calculates and returns the Zero Point Energy (ZPE) and vibrational entropy for the temperature range provided. Parameters ---------- vib_file : :py:attr:`str`): yaml file containing vibrational frequencies temp_r : :py:attr:`array_like` Temperature range at which the vibrational entropy is calculated Returns ------- zpe : :py:attr:`float` Zero Point energy for the system svib : :py:attr:`array_like` Vibrational entropy for the system calculated using the temperature range provided. """ vib_prop = ut.read_vibdata(vib_file) new_temp = ut.build_tempgrid(temp_r, vib_prop['Frequencies']) freq = ut.build_freqgrid(vib_prop['Frequencies'], temp_r) zpe = 0 zpe = zpe_calc(vib_prop) svib, avib = entropy_calc(freq, new_temp, vib_prop) return zpe, svib, avib
def test_zpe_calc(self): vib_prop = ut.read_vibdata(test_data) x = vd.zpe_calc(vib_prop) assert_approx_equal(x, 0.0017047827283306525)
def test_entropy_calc(self): vib_prop = ut.read_vibdata(test_data) new_temp = ut.build_tempgrid(np.arange(10), vib_prop['Frequencies']) freq = ut.build_freqgrid(vib_prop['Frequencies'], np.arange(10)) svib = vd.entropy_calc(freq, new_temp, vib_prop) assert svib[1] == 5.77204564238144e-05
def test_zpe_calc(self): vib_prop = ut.read_vibdata(test_data) x = vd.zpe_calc(vib_prop) assert x == 0.0017049071357836591