本文整理匯總了Python中rmgpy.data.rmg.RMGDatabase.saveOld方法的典型用法代碼示例。如果您正苦於以下問題:Python RMGDatabase.saveOld方法的具體用法?Python RMGDatabase.saveOld怎麽用?Python RMGDatabase.saveOld使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rmgpy.data.rmg.RMGDatabase
的用法示例。
在下文中一共展示了RMGDatabase.saveOld方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: export
# 需要導入模塊: from rmgpy.data.rmg import RMGDatabase [as 別名]
# 或者: from rmgpy.data.rmg.RMGDatabase import saveOld [as 別名]
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)
示例2: export
# 需要導入模塊: from rmgpy.data.rmg import RMGDatabase [as 別名]
# 或者: from rmgpy.data.rmg.RMGDatabase import saveOld [as 別名]
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!"
示例3: RMGDatabase
# 需要導入模塊: from rmgpy.data.rmg import RMGDatabase [as 別名]
# 或者: from rmgpy.data.rmg.RMGDatabase import saveOld [as 別名]
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)