當前位置: 首頁>>代碼示例>>Python>>正文


Python RMGDatabase.saveOld方法代碼示例

本文整理匯總了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)
開發者ID:eWizardII,項目名稱:RMG-database,代碼行數:15,代碼來源:exportOldDatabase.py

示例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!"
開發者ID:Lyle-zhang,項目名稱:RMG-database,代碼行數:18,代碼來源:exportOldDatabase.py

示例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)
開發者ID:ajalan,項目名稱:RMG-database,代碼行數:32,代碼來源:exportOldDatabase.py


注:本文中的rmgpy.data.rmg.RMGDatabase.saveOld方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。