def __init__(self): # initialize the base class _constraint_force.__init__(self); self.composite = True # create the c++ mirror class if not hoomd.context.current.device.cpp_exec_conf.isCUDAEnabled(): self.cpp_force = _md.ForceComposite(hoomd.context.current.system_definition); else: self.cpp_force = _md.ForceCompositeGPU(hoomd.context.current.system_definition); hoomd.context.current.system.addCompute(self.cpp_force, self.force_name);
def __init__(self): hoomd.util.print_status_line() # initialize the base class _constraint_force.__init__(self) self.composite = True # create the c++ mirror class if not hoomd.context.exec_conf.isCUDAEnabled(): self.cpp_force = _md.ForceComposite( hoomd.context.current.system_definition) else: self.cpp_force = _md.ForceCompositeGPU( hoomd.context.current.system_definition) hoomd.context.current.system.addCompute(self.cpp_force, self.force_name)