def setUp(self):
        unittest.TestCase.setUp(self)

        # Using Cl2 as an example
        molecular_weight = 71.
        self.trans_1D = trans.FreeTrans(molecular_weight=molecular_weight,
                                        n_degrees=1)
        self.trans_2D = trans.FreeTrans(molecular_weight=molecular_weight,
                                        n_degrees=2)
        self.trans_3D = trans.FreeTrans(molecular_weight=molecular_weight,
                                        n_degrees=3)
        self.trans_3D_dict = {
            'class': "<class 'pmutt.statmech.trans.FreeTrans'>",
            'molecular_weight': 71.,
            'n_degrees': 3
        }

        self.T = 300  # K
        self.P = 0.99768  # bar
示例#2
0
# - rigid rotor rotations 
# - ground state electronic structure - 
# - ground state nuclear structure).
# 
# <img src="images/butane.png" width=300>

# In[2]:


from ase.build import molecule
from pmutt.statmech import StatMech, trans, vib, rot, elec

butane_atoms = molecule('trans-butane')

'''Translational'''
butane_trans = trans.FreeTrans(n_degrees=3, atoms=butane_atoms)

'''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])
示例#3
0
# - no contribution from nuclear modes.
#
# <img src="images/H2_1.jpg" width=200>

# <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')