本文整理汇总了Python中zeobuilder.actions.composed.Parameters类的典型用法代码示例。如果您正苦于以下问题:Python Parameters类的具体用法?Python Parameters怎么用?Python Parameters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Parameters类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: default_parameters
def default_parameters(cls):
result = Parameters()
result.number1 = 6
result.number2 = 6
result.distance = 0.5
result.bond_type = BOND_SINGLE
return result
示例2: fn
def fn():
context.application.model.file_open("test/input/core_objects.zml")
context.application.main.toggle_selection(context.application.model.universe.children[3], on=True)
parameters = Parameters()
parameters.translation = Translation([2.0, 4.1, -1.0])
TranslateDialog = context.application.plugins.get_action("TranslateDialog")
assert TranslateDialog.analyze_selection(parameters)
TranslateDialog(parameters)
示例3: free_optimize
def free_optimize(self, springs):
context.application.main.select_nodes(springs)
OptimizeSprings = context.application.plugins.get_action("OptimizeSprings")
parameters = Parameters()
parameters.allow_rotation = True
parameters.update_interval = 0.4
parameters.update_steps = 1
OptimizeSprings(parameters)
示例4: execute_drag
def execute_drag(self, destination, child_index):
parameters = Parameters()
context.application.cache.drag_destination = destination
parameters.child_index = child_index
for drag_action in self.drag_actions:
if drag_action.cached_analyze_selection(parameters=parameters):
drag_action(parameters=parameters)
return True
return False
示例5: default_parameters
def default_parameters(cls):
result = Parameters()
universe = context.application.model.universe
if universe.cell.active[0]:
result.interval_a = numpy.array([0.0, universe.repetitions[0]], float)
if universe.cell.active[1]:
result.interval_b = numpy.array([0.0, universe.repetitions[1]], float)
if universe.cell.active[2]:
result.interval_c = numpy.array([0.0, universe.repetitions[2]], float)
return result
示例6: fn
def fn():
context.application.model.file_open("test/input/lau.zml")
context.application.main.select_nodes([context.application.model.universe])
parameters = Parameters()
parameters.number1 = 14
parameters.number2 = 14
parameters.distance = 6.0
parameters.bond_type = BOND_SINGLE
AutoConnectParameters = context.application.plugins.get_action("AutoConnectParameters")
assert AutoConnectParameters.analyze_selection(parameters)
AutoConnectParameters(parameters)
示例7: fn
def fn():
context.application.model.file_open("test/input/springs.zml")
context.application.main.select_nodes(
context.application.model.universe.children[7:9][::-1] +
context.application.model.universe.children[2:6][::-1]
)
parameters = Parameters()
parameters.allow_rotation = True
parameters.update_interval = 0.4
parameters.update_steps = 1
OptimizeSprings = context.application.plugins.get_action("OptimizeSprings")
assert OptimizeSprings.analyze_selection(parameters)
OptimizeSprings(parameters)
示例8: default_parameters
def default_parameters(cls):
result = Parameters()
result.filter_atom1 = Expression()
result.filter_bond12 = Expression()
result.filter_atom2 = Expression()
result.filter_bond23 = Expression()
result.filter_atom3 = Expression()
result.filter_bond34 = Expression()
result.filter_atom4 = Expression()
return result
示例9: default_parameters
def default_parameters(cls):
result = Parameters()
result.n = 5
result.m = 1
result.flat = False
result.max_length = 50*angstrom
result.max_error = 0.01*angstrom
result.tube_length = Undefined(50*angstrom)
return result
示例10: default_parameters
def default_parameters(cls):
result = Parameters()
result.translation = Translation.identity()
return result
示例11: default_parameters
def default_parameters(cls):
result = Parameters()
result.expression = Expression()
result.recursive = cls.SELECT_PLAIN
return result