Пример #1
0
 def _load_refdata(cls):
     if cls.ref_data is None:
         logging.info('Loading reference database')
         db = ReferenceDatabase()
         db.load()
         cls.ref_data = {
             lbl: spc
             for lbl, spc in zip(SPECIES_LABELS,
                                 db.get_species_from_label(SPECIES_LABELS))
         }
Пример #2
0
import numpy as np
import pybel

from rmgpy.molecule import Molecule as RMGMolecule

import arkane.encorr.data as data
from arkane.encorr.data import (Molecule, Stats, BACDatapoint, DatasetProperty,
                                BACDataset, extract_dataset, geo_to_mol,
                                _pybel_to_rmg)
from arkane.encorr.reference import ReferenceDatabase
from arkane.exceptions import BondAdditivityCorrectionError
from arkane.modelchem import LOT, LevelOfTheory

DATABASE = ReferenceDatabase()
DATABASE.load()
LEVEL_OF_THEORY = LevelOfTheory(method='wb97m-v',
                                basis='def2-tzvpd',
                                software='qchem')


class TestDataLoading(unittest.TestCase):
    """
    A class for testing that the quantum correction data is loaded
    correctly from the RMG database.
    """
    def test_contains_data(self):
        """
        Test that the necessary dictionaries are available.
        """
        self.assertTrue(hasattr(data, 'atom_hf'))