def export(input, output, database=None): print 'Loading the new RMG-Py database...' if not database: database = RMGDatabase() database.load(input) print 'Constructing additional rate rules from kinetics depository...' for family in database.kinetics.families.values(): generateRules(family, database) print 'Saving old RMG-Java database...' database.saveOld(output)
def export(input, output, database=None): print 'Loading the new RMG-Py database...' if not database: database = RMGDatabase() database.load(input, kineticsFamilies='all', kineticsDepositories='all') print 'Constructing additional rate rules from kinetics depository...' for family in database.kinetics.families.values(): family.addKineticsRulesFromTrainingSet(thermoDatabase=database.thermo) print "Deleting thermo library entries with atoms RMG-Java can't understand..." database.thermo.pruneHeteroatoms(allowed=['C','H','O','S']) print 'Saving old RMG-Java database...' database.saveOld(output) print "Done!"
def export(input, output, database=None): print 'Loading the new RMG-Py database...' if not database: database = RMGDatabase() database.load(input, kineticsFamilies='all', kineticsDepositories='all') print 'Constructing additional rate rules from kinetics depository...' for family in database.kinetics.families.values(): family.addKineticsRulesFromTrainingSet(thermoDatabase=database.thermo) print "Deleting thermo library entries with atoms RMG-Java can't understand..." database.thermo.pruneHeteroatoms(allowed=['C', 'H', 'O', 'S']) print 'Saving old RMG-Java database...' database.saveOld(output) print "Done!"
data = kinetics, reference = entry0.reference, rank = entry0.rank, shortDesc = entry0.shortDesc, longDesc = entry0.longDesc, history = entry0.history, ) # Add the new rate rule to the depository of rate rules rules.entries[entry.index] = entry index += 1 ################################################################################ if __name__ == '__main__': oldPath = 'output/RMG_database' newPath = 'input' print 'Loading the new RMG-Py database...' database = RMGDatabase() database.load(newPath) print 'Constructing additional rate rules from kinetics depository...' for family in database.kinetics.groups: generateAdditionalRateRules(family, database) print 'Saving old RMG-Java database...' database.saveOld(oldPath)