示例#1
0
    def createOutput(self):
        """
        Generate output html file from the path containing chemkin and dictionary files.
        """
        import rmgpy.tools.diff_models as diff_models

        kwargs = {"web": True, "wd": self.path}
        diff_models.execute(self.chemkin1, self.dict1, None, self.chemkin2, self.dict2, None, **kwargs)
示例#2
0
    def createOutput(self):
        """
        Generate output html file from the path containing chemkin and dictionary files.
        """
        import rmgpy.tools.diff_models as diff_models

        kwargs = {
            'web': True,
            'wd': self.path,
        }
        diff_models.execute(self.chemkin1, self.dict1, None, self.chemkin2,
                            self.dict2, None, **kwargs)
示例#3
0
def check(name, chemkin, speciesDict):
    """
    Compare the provided chemkin model to the
    default chemkin model.
    """

    filename_chemkin = os.path.split(chemkin)[-1]
    filename_spcDict = os.path.split(speciesDict)[-1]

    folder = os.path.join(os.getcwd(),'testing/check/', name)
    chemkinOrig = os.path.join(folder,filename_chemkin)
    speciesDictOrig = os.path.join(folder,filename_spcDict)

    kwargs = {
        'wd': os.getcwd(),
        'web': True,
        }

    thermo, thermoOrig = None, None
    commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig, commonReactions, uniqueReactionsTest, uniqueReactionsOrig = \
    execute(chemkin, speciesDict, thermo, chemkinOrig, speciesDictOrig, thermoOrig, **kwargs)

    errorModel = checkModel(commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig, commonReactions, uniqueReactionsTest, uniqueReactionsOrig)

    errorSpecies = checkSpecies(commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig)

    errorReactions = checkReactions(commonReactions, uniqueReactionsTest, uniqueReactionsOrig)
示例#4
0
    def test_identical_models(self):
        folder = os.path.join(os.getcwd(), 'rmgpy/tools/data/diffmodels')

        chemkin1 = os.path.join(folder, 'chem1.inp')
        species_dict1 = os.path.join(folder, 'species_dictionary1.txt')

        chemkin2 = os.path.join(folder, 'chem2.inp')
        species_dict2 = os.path.join(folder, 'species_dictionary2.txt')

        kwargs = {
            'wd': folder,
        }

        execute(chemkin1, species_dict1, None, chemkin2, species_dict2, None, **kwargs)

        shutil.rmtree(os.path.join(folder, 'species1'))
        shutil.rmtree(os.path.join(folder, 'species2'))
        os.remove(os.path.join(folder, 'diff.html'))
示例#5
0
def check(name, benchChemkin, benchSpeciesDict, testChemkin, testSpeciesDict):
    """
    Compare the tested model to the benchmark model.
    """
    kwargs = {
        'web': True,
        }

    testThermo, benchThermo = None, None
    commonSpecies, uniqueSpeciesOrig, uniqueSpeciesTest, commonReactions, uniqueReactionsOrig, uniqueReactionsTest = \
    execute(benchChemkin, benchSpeciesDict, benchThermo, testChemkin, testSpeciesDict, testThermo, **kwargs)

    errorModel = checkModel(commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig, commonReactions, uniqueReactionsTest, uniqueReactionsOrig)

    errorSpecies = checkSpecies(commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig)

    errorReactions = checkReactions(commonReactions, uniqueReactionsTest, uniqueReactionsOrig)
示例#6
0
def check(name, benchChemkin, benchSpeciesDict, testChemkin, testSpeciesDict):
    """
    Compare the tested model to the benchmark model.
    """
    kwargs = {
        'web': True,
        }

    testThermo, benchThermo = None, None
    commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig, commonReactions, uniqueReactionsTest, uniqueReactionsOrig = \
    execute(benchChemkin, benchSpeciesDict, benchThermo, testChemkin, testSpeciesDict, testThermo, **kwargs)

    errorModel = checkModel(commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig, commonReactions, uniqueReactionsTest, uniqueReactionsOrig)

    errorSpecies = checkSpecies(commonSpecies, uniqueSpeciesTest, uniqueSpeciesOrig)

    errorReactions = checkReactions(commonReactions, uniqueReactionsTest, uniqueReactionsOrig)
示例#7
0
def check(name, benchChemkin, benchSpeciesDict, testChemkin, testSpeciesDict):
    """
    Compare the tested model to the benchmark model.
    """
    kwargs = {
        'web': True,
    }

    test_thermo, bench_thermo = None, None
    common_species, unique_species_orig, unique_species_test, common_reactions, unique_reactions_orig, unique_reactions_test = \
        execute(benchChemkin, benchSpeciesDict, bench_thermo, testChemkin, testSpeciesDict, test_thermo, **kwargs)

    error_model = checkModel(common_species, unique_species_test,
                             unique_species_orig, common_reactions,
                             unique_reactions_test, unique_reactions_orig)

    error_species = checkSpecies(common_species, unique_species_test,
                                 unique_species_orig)

    error_reactions = checkReactions(common_reactions, unique_reactions_test,
                                     unique_reactions_orig)