本文整理匯總了Python中zeobuilder.actions.composed.Parameters.num_hydrogens方法的典型用法代碼示例。如果您正苦於以下問題:Python Parameters.num_hydrogens方法的具體用法?Python Parameters.num_hydrogens怎麽用?Python Parameters.num_hydrogens使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類zeobuilder.actions.composed.Parameters
的用法示例。
在下文中一共展示了Parameters.num_hydrogens方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: fn
# 需要導入模塊: from zeobuilder.actions.composed import Parameters [as 別名]
# 或者: from zeobuilder.actions.composed.Parameters import num_hydrogens [as 別名]
def fn():
context.application.model.file_open("test/input/tpa.xyz")
Atom = context.application.plugins.get_node("Atom")
for child in context.application.model.universe.children[::-1]:
if isinstance(child, Atom) and child.number == 1:
context.application.model.universe.children.remove(child)
context.application.main.select_nodes([context.application.model.universe])
AutoConnectPhysical = context.application.plugins.get_action("AutoConnectPhysical")
assert AutoConnectPhysical.analyze_selection()
AutoConnectPhysical()
parameters = Parameters()
parameters.num_hydrogens = 2
parameters.valence_angle = 1.9093
context.application.main.select_nodes([context.application.model.universe.children[1]])
SaturateHydrogensManual = context.application.plugins.get_action("SaturateHydrogensManual")
assert SaturateHydrogensManual.analyze_selection(parameters)
SaturateHydrogensManual(parameters)
示例2: default_parameters
# 需要導入模塊: from zeobuilder.actions.composed import Parameters [as 別名]
# 或者: from zeobuilder.actions.composed.Parameters import num_hydrogens [as 別名]
def default_parameters(cls):
result = Parameters()
result.num_hydrogens = 2
result.valence_angle = 109.4*deg
return result