Beispiel #1
0
    def __init__(self, period=1):
        # initialize base class
        hoomd.update._updater.__init__(self);

        # initialize the reflected c++ class
        if not hoomd.context.current.device.cpp_exec_conf.isCUDAEnabled():
            self.cpp_updater = _example_plugin.ExampleUpdater(hoomd.context.current.system_definition);
        else:
            self.cpp_updater = _example_plugin.ExampleUpdaterGPU(hoomd.context.current.system_definition);

        self.setupUpdater(period);
Beispiel #2
0
    def __init__(self, period=1):
        hoomd.util.print_status_line()

        # initialize base class
        hoomd.update._updater.__init__(self)

        # initialize the reflected c++ class
        if not hoomd.context.exec_conf.isCUDAEnabled():
            self.cpp_updater = _example_plugin.ExampleUpdater(
                hoomd.context.current.system_definition)
        else:
            self.cpp_updater = _example_plugin.ExampleUpdaterGPU(
                hoomd.context.current.system_definition)

        self.setupUpdater(period)