#!/usr/bin/env python
# encoding: utf-8 -*-

"""
This module contains unit tests of the rmgpy.reaction module.
"""

import numpy
import unittest
from external.wip import work_in_progress

from rmgpy.species import Species, TransitionState
from rmgpy.reaction import Reaction
from rmgpy.statmech.translation import Translation, IdealGasTranslation
from rmgpy.statmech.rotation import Rotation, LinearRotor, NonlinearRotor, KRotor, SphericalTopRotor
from rmgpy.statmech.vibration import Vibration, HarmonicOscillator
from rmgpy.statmech.torsion import Torsion, HinderedRotor
from rmgpy.statmech.conformer import Conformer
from rmgpy.kinetics import Arrhenius
from rmgpy.thermo import Wilhoit
import rmgpy.constants as constants

################################################################################

class PseudoSpecies:
    """
    Can be used in place of a :class:`rmg.species.Species` for isomorphism checks.
    
    PseudoSpecies('a') is isomorphic with PseudoSpecies('A')
    but nothing else.
    """
    def __init__(self, label):
        self.label = label
    def __repr__(self):
        return "PseudoSpecies('{0}')".format(self.label)
    def __str__(self):
        return self.label
    def isIsomorphic(self, other):
        return self.label.lower() == other.label.lower()

class TestReactionIsomorphism(unittest.TestCase):
    """
    Contains unit tests of the isomorphism testing of the  Reaction class.
    """

    def makeReaction(self,reaction_string):
        """"
        Make a Reaction (containing PseudoSpecies) of from a string like 'Ab=CD'
        """
        reactants, products = reaction_string.split('=')
        reactants = [PseudoSpecies(i) for i in reactants]
        products = [PseudoSpecies(i) for i in products]
        return Reaction(reactants=reactants, products=products)
    def test1to1(self):
        r1 = self.makeReaction('A=B')
        self.assertTrue(r1.isIsomorphic(self.makeReaction('a=B')))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('b=A')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('B=a'),eitherDirection=False))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('A=C')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('A=BB')))
    def test1to2(self):
        r1 = self.makeReaction('A=BC')
        self.assertTrue(r1.isIsomorphic(self.makeReaction('a=Bc')))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('cb=a')))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('a=cb'),eitherDirection=False))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('bc=a'),eitherDirection=False))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('a=c')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('ab=c')))
    def test2to2(self):
        r1 = self.makeReaction('AB=CD')
        self.assertTrue(r1.isIsomorphic(self.makeReaction('ab=cd')))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('ab=dc'),eitherDirection=False))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('dc=ba')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('cd=ab'),eitherDirection=False))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('ab=ab')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('ab=cde')))
    def test2to3(self):
        r1 = self.makeReaction('AB=CDE')
        self.assertTrue(r1.isIsomorphic(self.makeReaction('ab=cde')))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('ba=edc'),eitherDirection=False))
        self.assertTrue(r1.isIsomorphic(self.makeReaction('dec=ba')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('cde=ab'),eitherDirection=False))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('ab=abc')))
        self.assertFalse(r1.isIsomorphic(self.makeReaction('abe=cde')))


class TestReaction(unittest.TestCase):
    """
    Contains unit tests of the Reaction class.
    """
    
    def setUp(self):
        """
        A method that is called prior to each unit test in this class.
        """
        ethylene = Species(
            label = 'C2H4',
            conformer = Conformer(
                E0 = (44.7127, 'kJ/mol'),
                modes = [
                    IdealGasTranslation(
                        mass = (28.0313, 'amu'),
                    ),
                    NonlinearRotor(
                        inertia = (
                            [3.41526, 16.6498, 20.065],
                            'amu*angstrom^2',
                        ),
                        symmetry = 4,
                    ),
                    HarmonicOscillator(
                        frequencies = (
                            [828.397, 970.652, 977.223, 1052.93, 1233.55, 1367.56, 1465.09, 1672.25, 3098.46, 3111.7, 3165.79, 3193.54],
                            'cm^-1',
                        ),
                    ),
                ],
                spinMultiplicity = 1,
                opticalIsomers = 1,
            ),
        )
        
        hydrogen = Species(          
            label = 'H',
            conformer = Conformer(
                E0 = (211.794, 'kJ/mol'),
                modes = [
                    IdealGasTranslation(
                        mass = (1.00783, 'amu'),
                    ),
                ],
                spinMultiplicity = 2,
                opticalIsomers = 1,
            ),
        )
        
        ethyl = Species(
            label = 'C2H5',
            conformer = Conformer(
                E0 = (111.603, 'kJ/mol'),
                modes = [
                    IdealGasTranslation(
                        mass = (29.0391, 'amu'),
                    ),
                    NonlinearRotor(
                        inertia = (
                            [4.8709, 22.2353, 23.9925],
                            'amu*angstrom^2',
                        ),
                        symmetry = 1,
                    ),
                    HarmonicOscillator(
                        frequencies = (
                            [482.224, 791.876, 974.355, 1051.48, 1183.21, 1361.36, 1448.65, 1455.07, 1465.48, 2688.22, 2954.51, 3033.39, 3101.54, 3204.73],
                            'cm^-1',
                        ),
                    ),
                    HinderedRotor(
                        inertia = (1.11481, 'amu*angstrom^2'),
                        symmetry = 6,
                        barrier = (0.244029, 'kJ/mol'),
                        semiclassical = None,
                    ),
                ],
                spinMultiplicity = 2,
                opticalIsomers = 1,
            ),
        )
        
        TS = TransitionState(
            label = 'TS',
            conformer = Conformer(
                E0 = (266.694, 'kJ/mol'),
                modes = [
                    IdealGasTranslation(
                        mass = (29.0391, 'amu'),
                    ),
                    NonlinearRotor(
                        inertia = (
                            [6.78512, 22.1437, 22.2114],
                            'amu*angstrom^2',
                        ),
                        symmetry = 1,
                    ),
                    HarmonicOscillator(
                        frequencies = (
                            [412.75, 415.206, 821.495, 924.44, 982.714, 1024.16, 1224.21, 1326.36, 1455.06, 1600.35, 3101.46, 3110.55, 3175.34, 3201.88],
                            'cm^-1',
                        ),
                    ),
                ],
                spinMultiplicity = 2,
                opticalIsomers = 1,
            ),
            frequency = (-750.232, 'cm^-1'),
        )
        
        self.reaction = Reaction(
            reactants = [hydrogen, ethylene],
            products = [ethyl], 
            kinetics = Arrhenius(
                A = (501366000.0, 'cm^3/(mol*s)'),
                n = 1.637,
                Ea = (4.32508, 'kJ/mol'),
                T0 = (1, 'K'),
                Tmin = (300, 'K'),
                Tmax = (2500, 'K'),
            ),
            transitionState = TS,
        )
    
        # CC(=O)O[O]
        acetylperoxy = Species(
            label='acetylperoxy',
            thermo=Wilhoit(Cp0=(4.0*constants.R,"J/(mol*K)"), CpInf=(21.0*constants.R,"J/(mol*K)"), a0=-3.95, a1=9.26, a2=-15.6, a3=8.55, B=(500.0,"K"), H0=(-6.151e+04,"J/mol"), S0=(-790.2,"J/(mol*K)")),
        )

        # C[C]=O
        acetyl = Species(
            label='acetyl',
            thermo=Wilhoit(Cp0=(4.0*constants.R,"J/(mol*K)"), CpInf=(15.5*constants.R,"J/(mol*K)"), a0=0.2541, a1=-0.4712, a2=-4.434, a3=2.25, B=(500.0,"K"), H0=(-1.439e+05,"J/mol"), S0=(-524.6,"J/(mol*K)")),
        )

        # [O][O]
        oxygen = Species(
            label='oxygen',
            thermo=Wilhoit(Cp0=(3.5*constants.R,"J/(mol*K)"), CpInf=(4.5*constants.R,"J/(mol*K)"), a0=-0.9324, a1=26.18, a2=-70.47, a3=44.12, B=(500.0,"K"), H0=(1.453e+04,"J/mol"), S0=(-12.19,"J/(mol*K)")),
        )
        
        self.reaction2 = Reaction(
            reactants=[acetyl, oxygen], 
            products=[acetylperoxy], 
            kinetics = Arrhenius(
                A = (2.65e12, 'cm^3/(mol*s)'),
                n = 0.0,
                Ea = (0.0, 'kJ/mol'),
                T0 = (1, 'K'),
                Tmin = (300, 'K'),
                Tmax = (2000, 'K'),
            ),
        )
        
    def testIsIsomerization(self):
        """
        Test the Reaction.isIsomerization() method.
        """
        isomerization = Reaction(reactants=[Species()], products=[Species()])
        association = Reaction(reactants=[Species(),Species()], products=[Species()])
        dissociation = Reaction(reactants=[Species()], products=[Species(),Species()])
        bimolecular = Reaction(reactants=[Species(),Species()], products=[Species(),Species()])
        self.assertTrue(isomerization.isIsomerization())
        self.assertFalse(association.isIsomerization())
        self.assertFalse(dissociation.isIsomerization())
        self.assertFalse(bimolecular.isIsomerization())
        
    def testIsAssociation(self):
        """
        Test the Reaction.isAssociation() method.
        """
        isomerization = Reaction(reactants=[Species()], products=[Species()])
        association = Reaction(reactants=[Species(),Species()], products=[Species()])
        dissociation = Reaction(reactants=[Species()], products=[Species(),Species()])
        bimolecular = Reaction(reactants=[Species(),Species()], products=[Species(),Species()])
        self.assertFalse(isomerization.isAssociation())
        self.assertTrue(association.isAssociation())
        self.assertFalse(dissociation.isAssociation())
        self.assertFalse(bimolecular.isAssociation())

    def testIsDissociation(self):
        """
        Test the Reaction.isDissociation() method.
        """
        isomerization = Reaction(reactants=[Species()], products=[Species()])
        association = Reaction(reactants=[Species(),Species()], products=[Species()])
        dissociation = Reaction(reactants=[Species()], products=[Species(),Species()])
        bimolecular = Reaction(reactants=[Species(),Species()], products=[Species(),Species()])
        self.assertFalse(isomerization.isDissociation())
        self.assertFalse(association.isDissociation())
        self.assertTrue(dissociation.isDissociation())
        self.assertFalse(bimolecular.isDissociation())

    def testHasTemplate(self):
        """
        Test the Reaction.hasTemplate() method.
        """
        reactants = self.reaction.reactants[:]
        products = self.reaction.products[:]
        self.assertTrue(self.reaction.hasTemplate(reactants, products))
        self.assertTrue(self.reaction.hasTemplate(products, reactants))
        self.assertFalse(self.reaction2.hasTemplate(reactants, products))
        self.assertFalse(self.reaction2.hasTemplate(products, reactants))
        
        reactants.reverse()
        products.reverse()
        self.assertTrue(self.reaction.hasTemplate(reactants, products))
        self.assertTrue(self.reaction.hasTemplate(products, reactants))
        self.assertFalse(self.reaction2.hasTemplate(reactants, products))
        self.assertFalse(self.reaction2.hasTemplate(products, reactants))
        
        reactants = self.reaction2.reactants[:]
        products = self.reaction2.products[:]
        self.assertFalse(self.reaction.hasTemplate(reactants, products))
        self.assertFalse(self.reaction.hasTemplate(products, reactants))
        self.assertTrue(self.reaction2.hasTemplate(reactants, products))
        self.assertTrue(self.reaction2.hasTemplate(products, reactants))
        
        reactants.reverse()
        products.reverse()
        self.assertFalse(self.reaction.hasTemplate(reactants, products))
        self.assertFalse(self.reaction.hasTemplate(products, reactants))
        self.assertTrue(self.reaction2.hasTemplate(reactants, products))
        self.assertTrue(self.reaction2.hasTemplate(products, reactants))

    def testEnthalpyOfReaction(self):
        """
        Test the Reaction.getEnthalpyOfReaction() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        Hlist0 = [float(v) for v in ['-146007', '-145886', '-144195', '-141973', '-139633', '-137341', '-135155', '-133093', '-131150', '-129316']]
        Hlist = self.reaction2.getEnthalpiesOfReaction(Tlist)
        for i in range(len(Tlist)):
            self.assertAlmostEqual(Hlist[i] / 1000., Hlist0[i] / 1000., 2)

    def testEntropyOfReaction(self):
        """
        Test the Reaction.getEntropyOfReaction() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        Slist0 = [float(v) for v in ['-156.793', '-156.872', '-153.504', '-150.317', '-147.707', '-145.616', '-143.93', '-142.552', '-141.407', '-140.441']]
        Slist = self.reaction2.getEntropiesOfReaction(Tlist)
        for i in range(len(Tlist)):
            self.assertAlmostEqual(Slist[i], Slist0[i], 2)

    def testFreeEnergyOfReaction(self):
        """
        Test the Reaction.getFreeEnergyOfReaction() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        Glist0 = [float(v) for v in ['-114648', '-83137.2', '-52092.4', '-21719.3', '8073.53', '37398.1', '66346.8', '94990.6', '123383', '151565']]
        Glist = self.reaction2.getFreeEnergiesOfReaction(Tlist)
        for i in range(len(Tlist)):
            self.assertAlmostEqual(Glist[i] / 1000., Glist0[i] / 1000., 2)

    def testEquilibriumConstantKa(self):
        """
        Test the Reaction.getEquilibriumConstant() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        Kalist0 = [float(v) for v in ['8.75951e+29', '7.1843e+10', '34272.7', '26.1877', '0.378696', '0.0235579', '0.00334673', '0.000792389', '0.000262777', '0.000110053']]
        Kalist = self.reaction2.getEquilibriumConstants(Tlist, type='Ka')
        for i in range(len(Tlist)):
            self.assertAlmostEqual(Kalist[i] / Kalist0[i], 1.0, 4)

    def testEquilibriumConstantKc(self):
        """
        Test the Reaction.getEquilibriumConstant() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        Kclist0 = [float(v) for v in ['1.45661e+28', '2.38935e+09', '1709.76', '1.74189', '0.0314866', '0.00235045', '0.000389568', '0.000105413', '3.93273e-05', '1.83006e-05']]
        Kclist = self.reaction2.getEquilibriumConstants(Tlist, type='Kc')
        for i in range(len(Tlist)):
            self.assertAlmostEqual(Kclist[i] / Kclist0[i], 1.0, 4)

    def testEquilibriumConstantKp(self):
        """
        Test the Reaction.getEquilibriumConstant() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        Kplist0 = [float(v) for v in ['8.75951e+24', '718430', '0.342727', '0.000261877', '3.78696e-06', '2.35579e-07', '3.34673e-08', '7.92389e-09', '2.62777e-09', '1.10053e-09']]
        Kplist = self.reaction2.getEquilibriumConstants(Tlist, type='Kp')
        for i in range(len(Tlist)):
            self.assertAlmostEqual(Kplist[i] / Kplist0[i], 1.0, 4)

    def testStoichiometricCoefficient(self):
        """
        Test the Reaction.getStoichiometricCoefficient() method.
        """
        for reactant in self.reaction.reactants:
            self.assertEqual(self.reaction.getStoichiometricCoefficient(reactant), -1)
        for product in self.reaction.products:
            self.assertEqual(self.reaction.getStoichiometricCoefficient(product), 1)
        for reactant in self.reaction2.reactants:
            self.assertEqual(self.reaction.getStoichiometricCoefficient(reactant), 0)
        for product in self.reaction2.products:
            self.assertEqual(self.reaction.getStoichiometricCoefficient(product), 0)

    def testRateCoefficient(self):
        """
        Test the Reaction.getRateCoefficient() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            self.assertAlmostEqual(self.reaction.getRateCoefficient(T, P) / self.reaction.kinetics.getRateCoefficient(T), 1.0, 6)
    
    def testGenerateReverseRateCoefficient(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method.
        """
        Tlist = numpy.arange(200.0, 2001.0, 200.0, numpy.float64)
        P = 1e5
        reverseKinetics = self.reaction2.generateReverseRateCoefficient()
        for T in Tlist:
            kr0 = self.reaction2.getRateCoefficient(T, P) / self.reaction2.getEquilibriumConstant(T)
            kr = reverseKinetics.getRateCoefficient(T)
            self.assertAlmostEqual(kr0 / kr, 1.0, 0)

    def testGenerateReverseRateCoefficientArrhenius(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the Arrhenius format.
        """
        original_kinetics = Arrhenius(
                    A = (2.65e12, 'cm^3/(mol*s)'),
                    n = 0.0,
                    Ea = (0.0, 'kJ/mol'),
                    T0 = (1, 'K'),
                    Tmin = (300, 'K'),
                    Tmax = (2000, 'K'),
                )
        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(original_kinetics.Tmin.value_si, original_kinetics.Tmax.value_si, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)

    @work_in_progress
    def testGenerateReverseRateCoefficientArrheniusEP(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the ArrheniusEP format.
        """
        from rmgpy.kinetics import ArrheniusEP

        original_kinetics = ArrheniusEP(
                    A = (2.65e12, 'cm^3/(mol*s)'),
                    n = 0.0,
                    alpha = 0.5,
                    E0 = (41.84, 'kJ/mol'),
                    Tmin = (300, 'K'),
                    Tmax = (2000, 'K'),
                )
        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(original_kinetics.Tmin, original_kinetics.Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)

    def testGenerateReverseRateCoefficientPDepArrhenius(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the PDepArrhenius format.
        """
        from rmgpy.kinetics import PDepArrhenius

        arrhenius0 = Arrhenius(
            A = (1.0e6,"s^-1"),
            n = 1.0, 
            Ea = (10.0,"kJ/mol"), 
            T0 = (300.0,"K"), 
            Tmin = (300.0,"K"), 
            Tmax = (2000.0,"K"), 
            comment = """This data is completely made up""",
        )

        arrhenius1 = Arrhenius(
            A = (1.0e12,"s^-1"), 
            n = 1.0, 
            Ea = (20.0,"kJ/mol"), 
            T0 = (300.0,"K"), 
            Tmin = (300.0,"K"), 
            Tmax = (2000.0,"K"), 
            comment = """This data is completely made up""",
        )

        pressures = numpy.array([0.1, 10.0])
        arrhenius = [arrhenius0, arrhenius1]
        Tmin = 300.0
        Tmax = 2000.0
        Pmin = 0.1
        Pmax = 10.0
        comment = """This data is completely made up"""

        original_kinetics = PDepArrhenius(
            pressures = (pressures,"bar"),
            arrhenius = arrhenius,
            Tmin = (Tmin,"K"), 
            Tmax = (Tmax,"K"), 
            Pmin = (Pmin,"bar"), 
            Pmax = (Pmax,"bar"),
            comment = comment,
        )

        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(Tmin, Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)


    def testGenerateReverseRateCoefficientMultiArrhenius(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the MultiArrhenius format.
        """
        from rmgpy.kinetics import MultiArrhenius

        pressures = numpy.array([0.1, 10.0])
        Tmin = 300.0
        Tmax = 2000.0
        Pmin = 0.1
        Pmax = 10.0
        comment = """This data is completely made up"""

        arrhenius = [
            Arrhenius(
                A = (9.3e-14,"cm^3/(molecule*s)"),
                n = 0.0,
                Ea = (4740*constants.R*0.001,"kJ/mol"),
                T0 = (1,"K"),
                Tmin = (Tmin,"K"),
                Tmax = (Tmax,"K"),
                comment = comment,
            ),
            Arrhenius(
                A = (1.4e-9,"cm^3/(molecule*s)"),
                n = 0.0,
                Ea = (11200*constants.R*0.001,"kJ/mol"),
                T0 = (1,"K"),
                Tmin = (Tmin,"K"),
                Tmax = (Tmax,"K"),
                comment = comment,
            ),
        ]

        original_kinetics = MultiArrhenius(
            arrhenius = arrhenius,
            Tmin = (Tmin,"K"),
            Tmax = (Tmax,"K"),
            comment = comment,
        )

        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(Tmin, Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)

    def testGenerateReverseRateCoefficientMultiPDepArrhenius(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the MultiPDepArrhenius format.
        """
        from rmgpy.kinetics import PDepArrhenius, MultiPDepArrhenius

        Tmin = 350.
        Tmax = 1500.
        Pmin = 1e-1
        Pmax = 1e1
        pressures = numpy.array([1e-1,1e1])
        comment = 'CH3 + C2H6 <=> CH4 + C2H5 (Baulch 2005)'
        arrhenius = [
            PDepArrhenius(
                pressures = (pressures,"bar"),
                arrhenius = [
                    Arrhenius(
                        A = (9.3e-16,"cm^3/(molecule*s)"),
                        n = 0.0,
                        Ea = (4740*constants.R*0.001,"kJ/mol"),
                        T0 = (1,"K"),
                        Tmin = (Tmin,"K"),
                        Tmax = (Tmax,"K"),
                        comment = comment,
                    ),
                    Arrhenius(
                        A = (9.3e-14,"cm^3/(molecule*s)"),
                        n = 0.0,
                        Ea = (4740*constants.R*0.001,"kJ/mol"),
                        T0 = (1,"K"),
                        Tmin = (Tmin,"K"),
                        Tmax = (Tmax,"K"),
                        comment = comment,
                    ),
                ],
                Tmin = (Tmin,"K"), 
                Tmax = (Tmax,"K"), 
                Pmin = (Pmin,"bar"), 
                Pmax = (Pmax,"bar"),
                comment = comment,
            ),
            PDepArrhenius(
                pressures = (pressures,"bar"),
                arrhenius = [
                    Arrhenius(
                        A = (1.4e-11,"cm^3/(molecule*s)"),
                        n = 0.0,
                        Ea = (11200*constants.R*0.001,"kJ/mol"),
                        T0 = (1,"K"),
                        Tmin = (Tmin,"K"),
                        Tmax = (Tmax,"K"),
                        comment = comment,
                    ),
                    Arrhenius(
                        A = (1.4e-9,"cm^3/(molecule*s)"),
                        n = 0.0,
                        Ea = (11200*constants.R*0.001,"kJ/mol"),
                        T0 = (1,"K"),
                        Tmin = (Tmin,"K"),
                        Tmax = (Tmax,"K"),
                        comment = comment,
                    ),
                ],
                Tmin = (Tmin,"K"), 
                Tmax = (Tmax,"K"), 
                Pmin = (Pmin,"bar"), 
                Pmax = (Pmax,"bar"),
                comment = comment,
            ),
        ]  

        original_kinetics = MultiPDepArrhenius(
            arrhenius = arrhenius,
            Tmin = (Tmin,"K"),
            Tmax = (Tmax,"K"),
            Pmin = (Pmin,"bar"),
            Pmax = (Pmax,"bar"),
            comment = comment,
        )

        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(Tmin, Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)

    def testGenerateReverseRateCoefficientThirdBody(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the ThirdBody format.
        """

        from rmgpy.kinetics import ThirdBody

        arrheniusLow = Arrhenius(
            A = (2.62e+33,"cm^6/(mol^2*s)"), 
            n = -4.76, 
            Ea = (10.21,"kJ/mol"), 
            T0 = (1,"K"),
        )
        efficiencies = {"C": 3, "C(=O)=O": 2, "CC": 3, "O": 6, "[Ar]": 0.7, "[C]=O": 1.5, "[H][H]": 2}
        Tmin = 300.
        Tmax = 2000.
        Pmin = 0.01
        Pmax = 100.
        comment = """H + CH3 -> CH4"""
        thirdBody = ThirdBody(
            arrheniusLow = arrheniusLow,
            Tmin = (Tmin,"K"),
            Tmax = (Tmax,"K"),
            Pmin = (Pmin,"bar"),
            Pmax = (Pmax,"bar"),
            efficiencies = efficiencies,
            comment = comment,
        )
         
        original_kinetics = thirdBody

        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(Tmin, Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)

    def testGenerateReverseRateCoefficientLindemann(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the Lindemann format.
        """

        from rmgpy.kinetics import Lindemann

        arrheniusHigh = Arrhenius(
            A = (1.39e+16,"cm^3/(mol*s)"), 
            n = -0.534, 
            Ea = (2.243,"kJ/mol"), 
            T0 = (1,"K"),
        )
        arrheniusLow = Arrhenius(
            A = (2.62e+33,"cm^6/(mol^2*s)"), 
            n = -4.76, 
            Ea = (10.21,"kJ/mol"), 
            T0 = (1,"K"),
        )
        efficiencies = {"C": 3, "C(=O)=O": 2, "CC": 3, "O": 6, "[Ar]": 0.7, "[C]=O": 1.5, "[H][H]": 2}
        Tmin = 300.
        Tmax = 2000.
        Pmin = 0.01
        Pmax = 100.
        comment = """H + CH3 -> CH4"""
        lindemann = Lindemann(
            arrheniusHigh = arrheniusHigh,
            arrheniusLow = arrheniusLow,
            Tmin = (Tmin,"K"),
            Tmax = (Tmax,"K"),
            Pmin = (Pmin,"bar"),
            Pmax = (Pmax,"bar"),
            efficiencies = efficiencies,
            comment = comment,
        )
         
        original_kinetics = lindemann
        
        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(Tmin, Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)


    def testGenerateReverseRateCoefficientTroe(self):
        """
        Test the Reaction.generateReverseRateCoefficient() method works for the Troe format.
        """

        from rmgpy.kinetics import Troe

        arrheniusHigh = Arrhenius(
            A = (1.39e+16,"cm^3/(mol*s)"), 
            n = -0.534, 
            Ea = (2.243,"kJ/mol"), 
            T0 = (1,"K"),
        )
        arrheniusLow = Arrhenius(
            A = (2.62e+33,"cm^6/(mol^2*s)"), 
            n = -4.76, 
            Ea = (10.21,"kJ/mol"), 
            T0 = (1,"K"),
        )
        alpha = 0.783
        T3 = 74
        T1 = 2941
        T2 = 6964
        efficiencies = {"C": 3, "C(=O)=O": 2, "CC": 3, "O": 6, "[Ar]": 0.7, "[C]=O": 1.5, "[H][H]": 2}
        Tmin = 300.
        Tmax = 2000.
        Pmin = 0.01
        Pmax = 100.
        comment = """H + CH3 -> CH4"""
        troe = Troe(
            arrheniusHigh = arrheniusHigh,
            arrheniusLow = arrheniusLow,
            alpha = alpha,
            T3 = (T3,"K"),
            T1 = (T1,"K"),
            T2 = (T2,"K"),
            Tmin = (Tmin,"K"),
            Tmax = (Tmax,"K"),
            Pmin = (Pmin,"bar"),
            Pmax = (Pmax,"bar"),
            efficiencies = efficiencies,
            comment = comment,
        )
         
        original_kinetics = troe
        
        self.reaction2.kinetics = original_kinetics

        reverseKinetics = self.reaction2.generateReverseRateCoefficient()

        self.reaction2.kinetics = reverseKinetics
        # reverse reactants, products to ensure Keq is correctly computed
        self.reaction2.reactants, self.reaction2.products = self.reaction2.products, self.reaction2.reactants
        reversereverseKinetics = self.reaction2.generateReverseRateCoefficient()

        # check that reverting the reverse yields the original
        Tlist = numpy.arange(Tmin, Tmax, 200.0, numpy.float64)
        P = 1e5
        for T in Tlist:
            korig = original_kinetics.getRateCoefficient(T, P)
            krevrev = reversereverseKinetics.getRateCoefficient(T, P)
            self.assertAlmostEqual(korig / krevrev, 1.0, 0)

    def testTSTCalculation(self):
        """
        A test of the transition state theory k(T) calculation function,
        using the reaction H + C2H4 -> C2H5.
        """
        Tlist = 1000.0/numpy.arange(0.4, 3.35, 0.01)
        klist = numpy.array([self.reaction.calculateTSTRateCoefficient(T) for T in Tlist])
        arrhenius = Arrhenius().fitToData(Tlist, klist, kunits='m^3/(mol*s)')
        klist2 = numpy.array([arrhenius.getRateCoefficient(T) for T in Tlist])
        
        # Check that the correct Arrhenius parameters are returned
        self.assertAlmostEqual(arrhenius.A.value_si, 2265.2488, delta=1e-2)
        self.assertAlmostEqual(arrhenius.n.value_si, 1.45419, delta=1e-4)
        self.assertAlmostEqual(arrhenius.Ea.value_si, 6645.24, delta=1e-2)
        # Check that the fit is satisfactory (defined here as always within 5%)
        for i in range(len(Tlist)):
            self.assertAlmostEqual(klist[i], klist2[i], delta=5e-2 * klist[i])
        
    def testPickle(self):
        """
        Test that a Reaction object can be successfully pickled and
        unpickled with no loss of information.
        """
        import cPickle
        reaction = cPickle.loads(cPickle.dumps(self.reaction,-1))

        self.assertEqual(len(self.reaction.reactants), len(reaction.reactants))
        self.assertEqual(len(self.reaction.products), len(reaction.products))
        for reactant0, reactant in zip(self.reaction.reactants, reaction.reactants):
            self.assertAlmostEqual(reactant0.conformer.E0.value_si / 1e6, reactant.conformer.E0.value_si / 1e6, 2)
            self.assertEqual(reactant0.conformer.E0.units, reactant.conformer.E0.units)
        for product0, product in zip(self.reaction.products, reaction.products):
            self.assertAlmostEqual(product0.conformer.E0.value_si / 1e6, product.conformer.E0.value_si / 1e6, 2)
            self.assertEqual(product0.conformer.E0.units, product.conformer.E0.units)
        self.assertAlmostEqual(self.reaction.transitionState.conformer.E0.value_si / 1e6, reaction.transitionState.conformer.E0.value_si / 1e6, 2)
        self.assertEqual(self.reaction.transitionState.conformer.E0.units, reaction.transitionState.conformer.E0.units)
        self.assertAlmostEqual(self.reaction.transitionState.frequency.value_si, reaction.transitionState.frequency.value_si, 2)
        self.assertEqual(self.reaction.transitionState.frequency.units, reaction.transitionState.frequency.units)
        
        self.assertAlmostEqual(self.reaction.kinetics.A.value_si, reaction.kinetics.A.value_si, delta=1e-6)
        self.assertAlmostEqual(self.reaction.kinetics.n.value_si, reaction.kinetics.n.value_si, delta=1e-6)
        self.assertAlmostEqual(self.reaction.kinetics.T0.value_si, reaction.kinetics.T0.value_si, delta=1e-6)
        self.assertAlmostEqual(self.reaction.kinetics.Ea.value_si, reaction.kinetics.Ea.value_si, delta=1e-6)
        self.assertEqual(self.reaction.kinetics.comment, reaction.kinetics.comment)

        self.assertEqual(self.reaction.duplicate, reaction.duplicate)
        self.assertEqual(self.reaction.degeneracy, reaction.degeneracy)        

    def testOutput(self):
        """
        Test that a Reaction object can be successfully reconstructed
        from its repr() output with no loss of information.
        """
        exec('reaction = %r' % (self.reaction))

        self.assertEqual(len(self.reaction.reactants), len(reaction.reactants))
        self.assertEqual(len(self.reaction.products), len(reaction.products))
        for reactant0, reactant in zip(self.reaction.reactants, reaction.reactants):
            self.assertAlmostEqual(reactant0.conformer.E0.value_si / 1e6, reactant.conformer.E0.value_si / 1e6, 2)
            self.assertEqual(reactant0.conformer.E0.units, reactant.conformer.E0.units)
        for product0, product in zip(self.reaction.products, reaction.products):
            self.assertAlmostEqual(product0.conformer.E0.value_si / 1e6, product.conformer.E0.value_si / 1e6, 2)
            self.assertEqual(product0.conformer.E0.units, product.conformer.E0.units)
        self.assertAlmostEqual(self.reaction.transitionState.conformer.E0.value_si / 1e6, reaction.transitionState.conformer.E0.value_si / 1e6, 2)
        self.assertEqual(self.reaction.transitionState.conformer.E0.units, reaction.transitionState.conformer.E0.units)
        self.assertAlmostEqual(self.reaction.transitionState.frequency.value_si, reaction.transitionState.frequency.value_si, 2)
        self.assertEqual(self.reaction.transitionState.frequency.units, reaction.transitionState.frequency.units)
        
        self.assertAlmostEqual(self.reaction.kinetics.A.value_si, reaction.kinetics.A.value_si, delta=1e-6)
        self.assertAlmostEqual(self.reaction.kinetics.n.value_si, reaction.kinetics.n.value_si, delta=1e-6)
        self.assertAlmostEqual(self.reaction.kinetics.T0.value_si, reaction.kinetics.T0.value_si, delta=1e-6)
        self.assertAlmostEqual(self.reaction.kinetics.Ea.value_si, reaction.kinetics.Ea.value_si, delta=1e-6)
        self.assertEqual(self.reaction.kinetics.comment, reaction.kinetics.comment)
        
        self.assertEqual(self.reaction.duplicate, reaction.duplicate)
        self.assertEqual(self.reaction.degeneracy, reaction.degeneracy)   

################################################################################

if __name__ == '__main__':
    unittest.main(testRunner=unittest.TextTestRunner(verbosity=2))

[((1776, 1824), 'rmgpy.reaction.Reaction', 'Reaction', ([], {'reactants': 'reactants', 'products': 'products'}), '(reactants=reactants, products=products)\n', (1784, 1824), False, 'from rmgpy.reaction import Reaction\n'), ((13183, 13232), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (13195, 13232), False, 'import numpy\n'), ((13689, 13738), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (13701, 13738), False, 'import numpy\n'), ((14193, 14242), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (14205, 14242), False, 'import numpy\n'), ((14708, 14757), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (14720, 14757), False, 'import numpy\n'), ((15250, 15299), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (15262, 15299), False, 'import numpy\n'), ((15796, 15845), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (15808, 15845), False, 'import numpy\n'), ((17007, 17056), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (17019, 17056), False, 'import numpy\n'), ((17389, 17438), 'numpy.arange', 'numpy.arange', (['(200.0)', '(2001.0)', '(200.0)', 'numpy.float64'], {}), '(200.0, 2001.0, 200.0, numpy.float64)\n', (17401, 17438), False, 'import numpy\n'), ((17972, 18097), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(2650000000000.0, 'cm^3/(mol*s)')", 'n': '(0.0)', 'Ea': "(0.0, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(300, 'K')", 'Tmax': "(2000, 'K')"}), "(A=(2650000000000.0, 'cm^3/(mol*s)'), n=0.0, Ea=(0.0, 'kJ/mol'),\n    T0=(1, 'K'), Tmin=(300, 'K'), Tmax=(2000, 'K'))\n", (17981, 18097), False, 'from rmgpy.kinetics import Arrhenius\n'), ((18760, 18865), 'numpy.arange', 'numpy.arange', (['original_kinetics.Tmin.value_si', 'original_kinetics.Tmax.value_si', '(200.0)', 'numpy.float64'], {}), '(original_kinetics.Tmin.value_si, original_kinetics.Tmax.\n    value_si, 200.0, numpy.float64)\n', (18772, 18865), False, 'import numpy\n'), ((19378, 19506), 'rmgpy.kinetics.ArrheniusEP', 'ArrheniusEP', ([], {'A': "(2650000000000.0, 'cm^3/(mol*s)')", 'n': '(0.0)', 'alpha': '(0.5)', 'E0': "(41.84, 'kJ/mol')", 'Tmin': "(300, 'K')", 'Tmax': "(2000, 'K')"}), "(A=(2650000000000.0, 'cm^3/(mol*s)'), n=0.0, alpha=0.5, E0=(\n    41.84, 'kJ/mol'), Tmin=(300, 'K'), Tmax=(2000, 'K'))\n", (19389, 19506), False, 'from rmgpy.kinetics import ArrheniusEP\n'), ((20168, 20255), 'numpy.arange', 'numpy.arange', (['original_kinetics.Tmin', 'original_kinetics.Tmax', '(200.0)', 'numpy.float64'], {}), '(original_kinetics.Tmin, original_kinetics.Tmax, 200.0, numpy.\n    float64)\n', (20180, 20255), False, 'import numpy\n'), ((20745, 20914), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1000000.0, 's^-1')", 'n': '(1.0)', 'Ea': "(10.0, 'kJ/mol')", 'T0': "(300.0, 'K')", 'Tmin': "(300.0, 'K')", 'Tmax': "(2000.0, 'K')", 'comment': '"""This data is completely made up"""'}), "(A=(1000000.0, 's^-1'), n=1.0, Ea=(10.0, 'kJ/mol'), T0=(300.0, 'K'\n    ), Tmin=(300.0, 'K'), Tmax=(2000.0, 'K'), comment=\n    'This data is completely made up')\n", (20754, 20914), False, 'from rmgpy.kinetics import Arrhenius\n'), ((21036, 21211), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1000000000000.0, 's^-1')", 'n': '(1.0)', 'Ea': "(20.0, 'kJ/mol')", 'T0': "(300.0, 'K')", 'Tmin': "(300.0, 'K')", 'Tmax': "(2000.0, 'K')", 'comment': '"""This data is completely made up"""'}), "(A=(1000000000000.0, 's^-1'), n=1.0, Ea=(20.0, 'kJ/mol'), T0=(\n    300.0, 'K'), Tmin=(300.0, 'K'), Tmax=(2000.0, 'K'), comment=\n    'This data is completely made up')\n", (21045, 21211), False, 'from rmgpy.kinetics import Arrhenius\n'), ((21328, 21352), 'numpy.array', 'numpy.array', (['[0.1, 10.0]'], {}), '([0.1, 10.0])\n', (21339, 21352), False, 'import numpy\n'), ((21565, 21731), 'rmgpy.kinetics.PDepArrhenius', 'PDepArrhenius', ([], {'pressures': "(pressures, 'bar')", 'arrhenius': 'arrhenius', 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'Pmin': "(Pmin, 'bar')", 'Pmax': "(Pmax, 'bar')", 'comment': 'comment'}), "(pressures=(pressures, 'bar'), arrhenius=arrhenius, Tmin=(Tmin,\n    'K'), Tmax=(Tmax, 'K'), Pmin=(Pmin, 'bar'), Pmax=(Pmax, 'bar'), comment\n    =comment)\n", (21578, 21731), False, 'from rmgpy.kinetics import PDepArrhenius, MultiPDepArrhenius\n'), ((22354, 22400), 'numpy.arange', 'numpy.arange', (['Tmin', 'Tmax', '(200.0)', 'numpy.float64'], {}), '(Tmin, Tmax, 200.0, numpy.float64)\n', (22366, 22400), False, 'import numpy\n'), ((22898, 22922), 'numpy.array', 'numpy.array', (['[0.1, 10.0]'], {}), '([0.1, 10.0])\n', (22909, 22922), False, 'import numpy\n'), ((23733, 23825), 'rmgpy.kinetics.MultiArrhenius', 'MultiArrhenius', ([], {'arrhenius': 'arrhenius', 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(arrhenius=arrhenius, Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (23747, 23825), False, 'from rmgpy.kinetics import MultiArrhenius\n'), ((24411, 24457), 'numpy.arange', 'numpy.arange', (['Tmin', 'Tmax', '(200.0)', 'numpy.float64'], {}), '(Tmin, Tmax, 200.0, numpy.float64)\n', (24423, 24457), False, 'import numpy\n'), ((25061, 25085), 'numpy.array', 'numpy.array', (['[0.1, 10.0]'], {}), '([0.1, 10.0])\n', (25072, 25085), False, 'import numpy\n'), ((27357, 27493), 'rmgpy.kinetics.MultiPDepArrhenius', 'MultiPDepArrhenius', ([], {'arrhenius': 'arrhenius', 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'Pmin': "(Pmin, 'bar')", 'Pmax': "(Pmax, 'bar')", 'comment': 'comment'}), "(arrhenius=arrhenius, Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    Pmin=(Pmin, 'bar'), Pmax=(Pmax, 'bar'), comment=comment)\n", (27375, 27493), False, 'from rmgpy.kinetics import PDepArrhenius, MultiPDepArrhenius\n'), ((28105, 28151), 'numpy.arange', 'numpy.arange', (['Tmin', 'Tmax', '(200.0)', 'numpy.float64'], {}), '(Tmin, Tmax, 200.0, numpy.float64)\n', (28117, 28151), False, 'import numpy\n'), ((28637, 28727), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(2.62e+33, 'cm^6/(mol^2*s)')", 'n': '(-4.76)', 'Ea': "(10.21, 'kJ/mol')", 'T0': "(1, 'K')"}), "(A=(2.62e+33, 'cm^6/(mol^2*s)'), n=-4.76, Ea=(10.21, 'kJ/mol'), T0\n    =(1, 'K'))\n", (28646, 28727), False, 'from rmgpy.kinetics import Arrhenius\n'), ((29033, 29197), 'rmgpy.kinetics.ThirdBody', 'ThirdBody', ([], {'arrheniusLow': 'arrheniusLow', 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'Pmin': "(Pmin, 'bar')", 'Pmax': "(Pmax, 'bar')", 'efficiencies': 'efficiencies', 'comment': 'comment'}), "(arrheniusLow=arrheniusLow, Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    Pmin=(Pmin, 'bar'), Pmax=(Pmax, 'bar'), efficiencies=efficiencies,\n    comment=comment)\n", (29042, 29197), False, 'from rmgpy.kinetics import ThirdBody\n'), ((29867, 29913), 'numpy.arange', 'numpy.arange', (['Tmin', 'Tmax', '(200.0)', 'numpy.float64'], {}), '(Tmin, Tmax, 200.0, numpy.float64)\n', (29879, 29913), False, 'import numpy\n'), ((30400, 30489), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1.39e+16, 'cm^3/(mol*s)')", 'n': '(-0.534)', 'Ea': "(2.243, 'kJ/mol')", 'T0': "(1, 'K')"}), "(A=(1.39e+16, 'cm^3/(mol*s)'), n=-0.534, Ea=(2.243, 'kJ/mol'), T0=\n    (1, 'K'))\n", (30409, 30489), False, 'from rmgpy.kinetics import Arrhenius\n'), ((30575, 30665), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(2.62e+33, 'cm^6/(mol^2*s)')", 'n': '(-4.76)', 'Ea': "(10.21, 'kJ/mol')", 'T0': "(1, 'K')"}), "(A=(2.62e+33, 'cm^6/(mol^2*s)'), n=-4.76, Ea=(10.21, 'kJ/mol'), T0\n    =(1, 'K'))\n", (30584, 30665), False, 'from rmgpy.kinetics import Arrhenius\n'), ((30971, 31165), 'rmgpy.kinetics.Lindemann', 'Lindemann', ([], {'arrheniusHigh': 'arrheniusHigh', 'arrheniusLow': 'arrheniusLow', 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'Pmin': "(Pmin, 'bar')", 'Pmax': "(Pmax, 'bar')", 'efficiencies': 'efficiencies', 'comment': 'comment'}), "(arrheniusHigh=arrheniusHigh, arrheniusLow=arrheniusLow, Tmin=(\n    Tmin, 'K'), Tmax=(Tmax, 'K'), Pmin=(Pmin, 'bar'), Pmax=(Pmax, 'bar'),\n    efficiencies=efficiencies, comment=comment)\n", (30980, 31165), False, 'from rmgpy.kinetics import Lindemann\n'), ((31856, 31902), 'numpy.arange', 'numpy.arange', (['Tmin', 'Tmax', '(200.0)', 'numpy.float64'], {}), '(Tmin, Tmax, 200.0, numpy.float64)\n', (31868, 31902), False, 'import numpy\n'), ((32375, 32464), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1.39e+16, 'cm^3/(mol*s)')", 'n': '(-0.534)', 'Ea': "(2.243, 'kJ/mol')", 'T0': "(1, 'K')"}), "(A=(1.39e+16, 'cm^3/(mol*s)'), n=-0.534, Ea=(2.243, 'kJ/mol'), T0=\n    (1, 'K'))\n", (32384, 32464), False, 'from rmgpy.kinetics import Arrhenius\n'), ((32550, 32640), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(2.62e+33, 'cm^6/(mol^2*s)')", 'n': '(-4.76)', 'Ea': "(10.21, 'kJ/mol')", 'T0': "(1, 'K')"}), "(A=(2.62e+33, 'cm^6/(mol^2*s)'), n=-4.76, Ea=(10.21, 'kJ/mol'), T0\n    =(1, 'K'))\n", (32559, 32640), False, 'from rmgpy.kinetics import Arrhenius\n'), ((33015, 33262), 'rmgpy.kinetics.Troe', 'Troe', ([], {'arrheniusHigh': 'arrheniusHigh', 'arrheniusLow': 'arrheniusLow', 'alpha': 'alpha', 'T3': "(T3, 'K')", 'T1': "(T1, 'K')", 'T2': "(T2, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'Pmin': "(Pmin, 'bar')", 'Pmax': "(Pmax, 'bar')", 'efficiencies': 'efficiencies', 'comment': 'comment'}), "(arrheniusHigh=arrheniusHigh, arrheniusLow=arrheniusLow, alpha=alpha,\n    T3=(T3, 'K'), T1=(T1, 'K'), T2=(T2, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax,\n    'K'), Pmin=(Pmin, 'bar'), Pmax=(Pmax, 'bar'), efficiencies=efficiencies,\n    comment=comment)\n", (33019, 33262), False, 'from rmgpy.kinetics import Troe\n'), ((33998, 34044), 'numpy.arange', 'numpy.arange', (['Tmin', 'Tmax', '(200.0)', 'numpy.float64'], {}), '(Tmin, Tmax, 200.0, numpy.float64)\n', (34010, 34044), False, 'import numpy\n'), ((23096, 23263), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(9.3e-14, 'cm^3/(molecule*s)')", 'n': '(0.0)', 'Ea': "(4740 * constants.R * 0.001, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(A=(9.3e-14, 'cm^3/(molecule*s)'), n=0.0, Ea=(4740 * constants.R *\n    0.001, 'kJ/mol'), T0=(1, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (23105, 23263), False, 'from rmgpy.kinetics import Arrhenius\n'), ((23401, 23569), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1.4e-09, 'cm^3/(molecule*s)')", 'n': '(0.0)', 'Ea': "(11200 * constants.R * 0.001, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(A=(1.4e-09, 'cm^3/(molecule*s)'), n=0.0, Ea=(11200 * constants.R *\n    0.001, 'kJ/mol'), T0=(1, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (23410, 23569), False, 'from rmgpy.kinetics import Arrhenius\n'), ((34478, 34507), 'numpy.arange', 'numpy.arange', (['(0.4)', '(3.35)', '(0.01)'], {}), '(0.4, 3.35, 0.01)\n', (34490, 34507), False, 'import numpy\n'), ((35482, 35514), 'cPickle.dumps', 'cPickle.dumps', (['self.reaction', '(-1)'], {}), '(self.reaction, -1)\n', (35495, 35514), False, 'import cPickle\n'), ((39720, 39756), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (39743, 39756), False, 'import unittest\n'), ((7826, 7953), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(501366000.0, 'cm^3/(mol*s)')", 'n': '(1.637)', 'Ea': "(4.32508, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(300, 'K')", 'Tmax': "(2500, 'K')"}), "(A=(501366000.0, 'cm^3/(mol*s)'), n=1.637, Ea=(4.32508, 'kJ/mol'),\n    T0=(1, 'K'), Tmin=(300, 'K'), Tmax=(2500, 'K'))\n", (7835, 7953), False, 'from rmgpy.kinetics import Arrhenius\n'), ((8229, 8428), 'rmgpy.thermo.Wilhoit', 'Wilhoit', ([], {'Cp0': "(4.0 * constants.R, 'J/(mol*K)')", 'CpInf': "(21.0 * constants.R, 'J/(mol*K)')", 'a0': '(-3.95)', 'a1': '(9.26)', 'a2': '(-15.6)', 'a3': '(8.55)', 'B': "(500.0, 'K')", 'H0': "(-61510.0, 'J/mol')", 'S0': "(-790.2, 'J/(mol*K)')"}), "(Cp0=(4.0 * constants.R, 'J/(mol*K)'), CpInf=(21.0 * constants.R,\n    'J/(mol*K)'), a0=-3.95, a1=9.26, a2=-15.6, a3=8.55, B=(500.0, 'K'), H0=\n    (-61510.0, 'J/mol'), S0=(-790.2, 'J/(mol*K)'))\n", (8236, 8428), False, 'from rmgpy.thermo import Wilhoit\n'), ((8515, 8719), 'rmgpy.thermo.Wilhoit', 'Wilhoit', ([], {'Cp0': "(4.0 * constants.R, 'J/(mol*K)')", 'CpInf': "(15.5 * constants.R, 'J/(mol*K)')", 'a0': '(0.2541)', 'a1': '(-0.4712)', 'a2': '(-4.434)', 'a3': '(2.25)', 'B': "(500.0, 'K')", 'H0': "(-143900.0, 'J/mol')", 'S0': "(-524.6, 'J/(mol*K)')"}), "(Cp0=(4.0 * constants.R, 'J/(mol*K)'), CpInf=(15.5 * constants.R,\n    'J/(mol*K)'), a0=0.2541, a1=-0.4712, a2=-4.434, a3=2.25, B=(500.0, 'K'),\n    H0=(-143900.0, 'J/mol'), S0=(-524.6, 'J/(mol*K)'))\n", (8522, 8719), False, 'from rmgpy.thermo import Wilhoit\n'), ((8806, 9007), 'rmgpy.thermo.Wilhoit', 'Wilhoit', ([], {'Cp0': "(3.5 * constants.R, 'J/(mol*K)')", 'CpInf': "(4.5 * constants.R, 'J/(mol*K)')", 'a0': '(-0.9324)', 'a1': '(26.18)', 'a2': '(-70.47)', 'a3': '(44.12)', 'B': "(500.0, 'K')", 'H0': "(14530.0, 'J/mol')", 'S0': "(-12.19, 'J/(mol*K)')"}), "(Cp0=(3.5 * constants.R, 'J/(mol*K)'), CpInf=(4.5 * constants.R,\n    'J/(mol*K)'), a0=-0.9324, a1=26.18, a2=-70.47, a3=44.12, B=(500.0, 'K'),\n    H0=(14530.0, 'J/mol'), S0=(-12.19, 'J/(mol*K)'))\n", (8813, 9007), False, 'from rmgpy.thermo import Wilhoit\n'), ((9150, 9275), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(2650000000000.0, 'cm^3/(mol*s)')", 'n': '(0.0)', 'Ea': "(0.0, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(300, 'K')", 'Tmax': "(2000, 'K')"}), "(A=(2650000000000.0, 'cm^3/(mol*s)'), n=0.0, Ea=(0.0, 'kJ/mol'),\n    T0=(1, 'K'), Tmin=(300, 'K'), Tmax=(2000, 'K'))\n", (9159, 9275), False, 'from rmgpy.kinetics import Arrhenius\n'), ((34619, 34630), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {}), '()\n', (34628, 34630), False, 'from rmgpy.kinetics import Arrhenius\n'), ((9562, 9571), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9569, 9571), False, 'from rmgpy.species import Species, TransitionState\n'), ((9584, 9593), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9591, 9593), False, 'from rmgpy.species import Species, TransitionState\n'), ((9638, 9647), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9645, 9647), False, 'from rmgpy.species import Species, TransitionState\n'), ((9648, 9657), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9655, 9657), False, 'from rmgpy.species import Species, TransitionState\n'), ((9670, 9679), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9677, 9679), False, 'from rmgpy.species import Species, TransitionState\n'), ((9725, 9734), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9732, 9734), False, 'from rmgpy.species import Species, TransitionState\n'), ((9747, 9756), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9754, 9756), False, 'from rmgpy.species import Species, TransitionState\n'), ((9757, 9766), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9764, 9766), False, 'from rmgpy.species import Species, TransitionState\n'), ((9811, 9820), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9818, 9820), False, 'from rmgpy.species import Species, TransitionState\n'), ((9821, 9830), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9828, 9830), False, 'from rmgpy.species import Species, TransitionState\n'), ((9843, 9852), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9850, 9852), False, 'from rmgpy.species import Species, TransitionState\n'), ((9853, 9862), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (9860, 9862), False, 'from rmgpy.species import Species, TransitionState\n'), ((10251, 10260), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10258, 10260), False, 'from rmgpy.species import Species, TransitionState\n'), ((10273, 10282), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10280, 10282), False, 'from rmgpy.species import Species, TransitionState\n'), ((10327, 10336), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10334, 10336), False, 'from rmgpy.species import Species, TransitionState\n'), ((10337, 10346), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10344, 10346), False, 'from rmgpy.species import Species, TransitionState\n'), ((10359, 10368), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10366, 10368), False, 'from rmgpy.species import Species, TransitionState\n'), ((10414, 10423), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10421, 10423), False, 'from rmgpy.species import Species, TransitionState\n'), ((10436, 10445), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10443, 10445), False, 'from rmgpy.species import Species, TransitionState\n'), ((10446, 10455), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10453, 10455), False, 'from rmgpy.species import Species, TransitionState\n'), ((10500, 10509), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10507, 10509), False, 'from rmgpy.species import Species, TransitionState\n'), ((10510, 10519), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10517, 10519), False, 'from rmgpy.species import Species, TransitionState\n'), ((10532, 10541), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10539, 10541), False, 'from rmgpy.species import Species, TransitionState\n'), ((10542, 10551), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10549, 10551), False, 'from rmgpy.species import Species, TransitionState\n'), ((10926, 10935), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10933, 10935), False, 'from rmgpy.species import Species, TransitionState\n'), ((10948, 10957), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (10955, 10957), False, 'from rmgpy.species import Species, TransitionState\n'), ((11002, 11011), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11009, 11011), False, 'from rmgpy.species import Species, TransitionState\n'), ((11012, 11021), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11019, 11021), False, 'from rmgpy.species import Species, TransitionState\n'), ((11034, 11043), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11041, 11043), False, 'from rmgpy.species import Species, TransitionState\n'), ((11089, 11098), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11096, 11098), False, 'from rmgpy.species import Species, TransitionState\n'), ((11111, 11120), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11118, 11120), False, 'from rmgpy.species import Species, TransitionState\n'), ((11121, 11130), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11128, 11130), False, 'from rmgpy.species import Species, TransitionState\n'), ((11175, 11184), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11182, 11184), False, 'from rmgpy.species import Species, TransitionState\n'), ((11185, 11194), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11192, 11194), False, 'from rmgpy.species import Species, TransitionState\n'), ((11207, 11216), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11214, 11216), False, 'from rmgpy.species import Species, TransitionState\n'), ((11217, 11226), 'rmgpy.species.Species', 'Species', ([], {}), '()\n', (11224, 11226), False, 'from rmgpy.species import Species, TransitionState\n'), ((25291, 25458), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(9.3e-16, 'cm^3/(molecule*s)')", 'n': '(0.0)', 'Ea': "(4740 * constants.R * 0.001, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(A=(9.3e-16, 'cm^3/(molecule*s)'), n=0.0, Ea=(4740 * constants.R *\n    0.001, 'kJ/mol'), T0=(1, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (25300, 25458), False, 'from rmgpy.kinetics import Arrhenius\n'), ((25668, 25835), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(9.3e-14, 'cm^3/(molecule*s)')", 'n': '(0.0)', 'Ea': "(4740 * constants.R * 0.001, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(A=(9.3e-14, 'cm^3/(molecule*s)'), n=0.0, Ea=(4740 * constants.R *\n    0.001, 'kJ/mol'), T0=(1, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (25677, 25835), False, 'from rmgpy.kinetics import Arrhenius\n'), ((26365, 26533), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1.4e-11, 'cm^3/(molecule*s)')", 'n': '(0.0)', 'Ea': "(11200 * constants.R * 0.001, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(A=(1.4e-11, 'cm^3/(molecule*s)'), n=0.0, Ea=(11200 * constants.R *\n    0.001, 'kJ/mol'), T0=(1, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (26374, 26533), False, 'from rmgpy.kinetics import Arrhenius\n'), ((26743, 26911), 'rmgpy.kinetics.Arrhenius', 'Arrhenius', ([], {'A': "(1.4e-09, 'cm^3/(molecule*s)')", 'n': '(0.0)', 'Ea': "(11200 * constants.R * 0.001, 'kJ/mol')", 'T0': "(1, 'K')", 'Tmin': "(Tmin, 'K')", 'Tmax': "(Tmax, 'K')", 'comment': 'comment'}), "(A=(1.4e-09, 'cm^3/(molecule*s)'), n=0.0, Ea=(11200 * constants.R *\n    0.001, 'kJ/mol'), T0=(1, 'K'), Tmin=(Tmin, 'K'), Tmax=(Tmax, 'K'),\n    comment=comment)\n", (26752, 26911), False, 'from rmgpy.kinetics import Arrhenius\n'), ((4228, 4270), 'rmgpy.statmech.translation.IdealGasTranslation', 'IdealGasTranslation', ([], {'mass': "(28.0313, 'amu')"}), "(mass=(28.0313, 'amu'))\n", (4247, 4270), False, 'from rmgpy.statmech.translation import Translation, IdealGasTranslation\n'), ((4341, 4427), 'rmgpy.statmech.rotation.NonlinearRotor', 'NonlinearRotor', ([], {'inertia': "([3.41526, 16.6498, 20.065], 'amu*angstrom^2')", 'symmetry': '(4)'}), "(inertia=([3.41526, 16.6498, 20.065], 'amu*angstrom^2'),\n    symmetry=4)\n", (4355, 4427), False, 'from rmgpy.statmech.rotation import Rotation, LinearRotor, NonlinearRotor, KRotor, SphericalTopRotor\n'), ((4603, 4762), 'rmgpy.statmech.vibration.HarmonicOscillator', 'HarmonicOscillator', ([], {'frequencies': "([828.397, 970.652, 977.223, 1052.93, 1233.55, 1367.56, 1465.09, 1672.25, \n    3098.46, 3111.7, 3165.79, 3193.54], 'cm^-1')"}), "(frequencies=([828.397, 970.652, 977.223, 1052.93, \n    1233.55, 1367.56, 1465.09, 1672.25, 3098.46, 3111.7, 3165.79, 3193.54],\n    'cm^-1'))\n", (4621, 4762), False, 'from rmgpy.statmech.vibration import Vibration, HarmonicOscillator\n'), ((5200, 5242), 'rmgpy.statmech.translation.IdealGasTranslation', 'IdealGasTranslation', ([], {'mass': "(1.00783, 'amu')"}), "(mass=(1.00783, 'amu'))\n", (5219, 5242), False, 'from rmgpy.statmech.translation import Translation, IdealGasTranslation\n'), ((5596, 5638), 'rmgpy.statmech.translation.IdealGasTranslation', 'IdealGasTranslation', ([], {'mass': "(29.0391, 'amu')"}), "(mass=(29.0391, 'amu'))\n", (5615, 5638), False, 'from rmgpy.statmech.translation import Translation, IdealGasTranslation\n'), ((5709, 5795), 'rmgpy.statmech.rotation.NonlinearRotor', 'NonlinearRotor', ([], {'inertia': "([4.8709, 22.2353, 23.9925], 'amu*angstrom^2')", 'symmetry': '(1)'}), "(inertia=([4.8709, 22.2353, 23.9925], 'amu*angstrom^2'),\n    symmetry=1)\n", (5723, 5795), False, 'from rmgpy.statmech.rotation import Rotation, LinearRotor, NonlinearRotor, KRotor, SphericalTopRotor\n'), ((5971, 6149), 'rmgpy.statmech.vibration.HarmonicOscillator', 'HarmonicOscillator', ([], {'frequencies': "([482.224, 791.876, 974.355, 1051.48, 1183.21, 1361.36, 1448.65, 1455.07, \n    1465.48, 2688.22, 2954.51, 3033.39, 3101.54, 3204.73], 'cm^-1')"}), "(frequencies=([482.224, 791.876, 974.355, 1051.48, \n    1183.21, 1361.36, 1448.65, 1455.07, 1465.48, 2688.22, 2954.51, 3033.39,\n    3101.54, 3204.73], 'cm^-1'))\n", (5989, 6149), False, 'from rmgpy.statmech.vibration import Vibration, HarmonicOscillator\n'), ((6294, 6411), 'rmgpy.statmech.torsion.HinderedRotor', 'HinderedRotor', ([], {'inertia': "(1.11481, 'amu*angstrom^2')", 'symmetry': '(6)', 'barrier': "(0.244029, 'kJ/mol')", 'semiclassical': 'None'}), "(inertia=(1.11481, 'amu*angstrom^2'), symmetry=6, barrier=(\n    0.244029, 'kJ/mol'), semiclassical=None)\n", (6307, 6411), False, 'from rmgpy.statmech.torsion import Torsion, HinderedRotor\n'), ((6841, 6883), 'rmgpy.statmech.translation.IdealGasTranslation', 'IdealGasTranslation', ([], {'mass': "(29.0391, 'amu')"}), "(mass=(29.0391, 'amu'))\n", (6860, 6883), False, 'from rmgpy.statmech.translation import Translation, IdealGasTranslation\n'), ((6954, 7041), 'rmgpy.statmech.rotation.NonlinearRotor', 'NonlinearRotor', ([], {'inertia': "([6.78512, 22.1437, 22.2114], 'amu*angstrom^2')", 'symmetry': '(1)'}), "(inertia=([6.78512, 22.1437, 22.2114], 'amu*angstrom^2'),\n    symmetry=1)\n", (6968, 7041), False, 'from rmgpy.statmech.rotation import Rotation, LinearRotor, NonlinearRotor, KRotor, SphericalTopRotor\n'), ((7217, 7392), 'rmgpy.statmech.vibration.HarmonicOscillator', 'HarmonicOscillator', ([], {'frequencies': "([412.75, 415.206, 821.495, 924.44, 982.714, 1024.16, 1224.21, 1326.36, \n    1455.06, 1600.35, 3101.46, 3110.55, 3175.34, 3201.88], 'cm^-1')"}), "(frequencies=([412.75, 415.206, 821.495, 924.44, 982.714,\n    1024.16, 1224.21, 1326.36, 1455.06, 1600.35, 3101.46, 3110.55, 3175.34,\n    3201.88], 'cm^-1'))\n", (7235, 7392), False, 'from rmgpy.statmech.vibration import Vibration, HarmonicOscillator\n')]