def setUp(self): unittest.TestCase.setUp(self) self.rot_He = rot.RigidRotor(symmetrynumber=1, geometry='monatomic', rot_temperatures=[0.]) self.rot_CO2 = rot.RigidRotor(symmetrynumber=2, geometry='linear', rot_temperatures=[0.561]) self.rot_H2O = rot.RigidRotor(symmetrynumber=2, geometry='nonlinear', rot_temperatures=[40.1, 20.9, 13.4]) self.T = 300 # K self.rot_CO2_dict = { 'class': "<class 'pmutt.statmech.rot.RigidRotor'>", 'symmetrynumber': 2, 'geometry': 'linear', 'rot_temperatures': [0.561], }
'''Vibrational''' butane_vib = vib.HarmonicVib(vib_wavenumbers=[3054.622862, 3047.573455, 3037.53448, 3030.21322, 3029.947329, 2995.758708, 2970.12166, 2968.142985, 2951.122942, 2871.560685, 1491.354921, 1456.480829, 1455.224163, 1429.084081, 1423.153673, 1364.456094, 1349.778994, 1321.137752, 1297.412109, 1276.969173, 1267.783512, 1150.401492, 1027.841298, 1018.203753, 945.310074, 929.15992, 911.661049, 808.685354, 730.986587, 475.287654, 339.164649, 264.682213, 244.584138, 219.956713, 115.923768, 35.56194]) '''Rotational''' butane_rot = rot.RigidRotor(symmetrynumber=2, atoms=butane_atoms) '''Electronic''' butane_elec = elec.GroundStateElec(potentialenergy=-73.7051, spin=0) '''StatMech Initialization''' butane_statmech = StatMech(name='butane', trans_model=butane_trans, vib_model=butane_vib, rot_model=butane_rot, elec_model=butane_elec) H_statmech = butane_statmech.get_H(T=298., units='kJ/mol') S_statmech = butane_statmech.get_S(T=298., units='J/mol/K') print('H_butane(T=298) = {:.1f} kJ/mol'.format(H_statmech)) print('S_butane(T=298) = {:.2f} J/mol/K'.format(S_statmech))
# <a id='section_5_2'></a> # ## 5.2. Initializing StatMech modes individually # In[5]: from ase.build import molecule from pmutt.statmech import StatMech, trans, vib, rot, elec H2_atoms = molecule('H2') '''Translational''' H2_trans = trans.FreeTrans(n_degrees=3, atoms=H2_atoms) '''Vibrational''' H2_vib = vib.HarmonicVib(vib_wavenumbers=[4342.]) # vib_wavenumbers in cm-1 '''Rotational''' H2_rot = rot.RigidRotor(symmetrynumber=2, atoms=H2_atoms) '''Electronic''' H2_elec = elec.GroundStateElec(potentialenergy=-6.77, spin=0) # potentialenergy in eV '''StatMech Initialization''' H2_statmech = StatMech(name='H2', trans_model=H2_trans, vib_model=H2_vib, rot_model=H2_rot, elec_model=H2_elec) '''Calculate thermodynamic properties''' H_statmech = H2_statmech.get_H(T=298., units='kJ/mol') S_statmech = H2_statmech.get_S(T=298., units='J/mol/K') print('H_H2(T=298 K) = {:.1f} kJ/mol'.format(H_statmech)) print('S_H2(T=298 K) = {:.2f} J/mol/K'.format(S_statmech))