本文整理汇总了Python中rmgpy.data.rmg.RMGDatabase.forbiddenStructures方法的典型用法代码示例。如果您正苦于以下问题:Python RMGDatabase.forbiddenStructures方法的具体用法?Python RMGDatabase.forbiddenStructures怎么用?Python RMGDatabase.forbiddenStructures使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rmgpy.data.rmg.RMGDatabase
的用法示例。
在下文中一共展示了RMGDatabase.forbiddenStructures方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpModule
# 需要导入模块: from rmgpy.data.rmg import RMGDatabase [as 别名]
# 或者: from rmgpy.data.rmg.RMGDatabase import forbiddenStructures [as 别名]
def setUpModule():
"""A function that is run ONCE before all unit tests in this module."""
global database
database = RMGDatabase()
database.load(
path=os.path.join(settings['test_data.directory'], 'testing_database'),
thermoLibraries=['primaryThermoLibrary'],
reactionLibraries=['GRI-Mech3.0'],
kineticsFamilies=[
'R_Recombination',
'Disproportionation',
'R_Addition_MultipleBond',
'H_Abstraction',
'intra_H_migration',
],
testing=True,
depository=False,
solvation=False,
)
#load empty forbidden structures to avoid any dependence on forbidden structures
#for these tests
for family in database.kinetics.families.values():
family.forbidden = ForbiddenStructures()
database.forbiddenStructures = ForbiddenStructures()
# Prepare the database by loading training reactions and averaging the rate rules
for family in database.kinetics.families.values():
family.addKineticsRulesFromTrainingSet(thermoDatabase=database.thermo)
family.fillKineticsRulesByAveragingUp(verbose=True)