Ejemplo n.º 1
0
 def testSpinMultiplicityFromQChemLog(self):
     """
     Uses a QChem log file for npropyl to test that its
     molecular degrees of freedom can be properly read.
     """
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','npropyl.out'))
     conformer, unscaled_frequencies = log.loadConformer()
     self.assertEqual(conformer.spinMultiplicity, 2)
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','co.out'))
     conformer, unscaled_frequencies = log.loadConformer()
     self.assertEqual(conformer.spinMultiplicity, 1)
Ejemplo n.º 2
0
 def testSpinMultiplicityFromQChemLog(self):
     """
     Uses a QChem log file for npropyl to test that its
     molecular degrees of freedom can be properly read.
     """
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','npropyl.out'))
     conformer, unscaled_frequencies = log.loadConformer(symfromlog=True)
     self.assertEqual(conformer.spinMultiplicity, 2)
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','co.out'))
     conformer, unscaled_frequencies = log.loadConformer(symfromlog=True)
     self.assertEqual(conformer.spinMultiplicity, 1)
Ejemplo n.º 3
0
 def testLoadVibrationsFromQChemLog(self):
     """
     Uses a QChem log files to test that
     molecular energies can be properly read.
     """
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','npropyl.out'))
     conformer, unscaled_frequencies = log.loadConformer()
     self.assertEqual(len(conformer.modes[2]._frequencies.getValue()), 24)    
     self.assertEqual(conformer.modes[2]._frequencies.getValue()[5], 881.79)       
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','co.out'))
     conformer, unscaled_frequencies = log.loadConformer()
     self.assertEqual(len(conformer.modes[2]._frequencies.getValue()), 1)         
     self.assertEqual(conformer.modes[2]._frequencies.getValue(), 2253.16)    
Ejemplo n.º 4
0
 def testLoadVibrationsFromQChemLog(self):
     """
     Uses a QChem log files to test that
     molecular energies can be properly read.
     """
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','npropyl.out'))
     conformer, unscaled_frequencies = log.loadConformer(symfromlog=True)
     self.assertEqual(len(conformer.modes[2]._frequencies.getValue()), 24)    
     self.assertEqual(conformer.modes[2]._frequencies.getValue()[5], 881.79)       
     log = QChemLog(os.path.join(os.path.dirname(__file__),'data','co.out'))
     conformer, unscaled_frequencies = log.loadConformer(symfromlog=True)
     self.assertEqual(len(conformer.modes[2]._frequencies.getValue()), 1)         
     self.assertEqual(conformer.modes[2]._frequencies.getValue(), 2253.16)    
Ejemplo n.º 5
0
    def testLoadNpropylModesFromQChemLog(self):
        """
        Uses a QChem log file for npropyl to test that its
        molecular modes can be properly read.
        """
        log = QChemLog(
            os.path.join(os.path.dirname(__file__), 'data', 'npropyl.out'))
        conformer, unscaled_frequencies = log.loadConformer()

        self.assertTrue(
            len([
                mode for mode in conformer.modes
                if isinstance(mode, IdealGasTranslation)
            ]) == 1)
        self.assertTrue(
            len([
                mode for mode in conformer.modes
                if isinstance(mode, NonlinearRotor)
            ]) == 1)
        self.assertTrue(
            len([
                mode for mode in conformer.modes
                if isinstance(mode, HarmonicOscillator)
            ]) == 1)
        self.assertTrue(
            len([
                mode for mode in conformer.modes
                if isinstance(mode, HinderedRotor)
            ]) == 0)
Ejemplo n.º 6
0
    def testLoadNpropylModesFromQChemLog(self):
        """
        Uses a QChem log file for npropyl to test that its
        molecular modes can be properly read.
        """
        log = QChemLog(os.path.join(os.path.dirname(__file__),'data','npropyl.out'))
        conformer, unscaled_frequencies = log.loadConformer()

        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode,IdealGasTranslation)]) == 1)
        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode,NonlinearRotor)]) == 1)
        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode,HarmonicOscillator)]) == 1)
        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode,HinderedRotor)]) == 0)