# hoomd.operation¶

Overview

 Compute Base class for all HOOMD computes. Operation Represents operations that are added to an hoomd.Operations object. Tuner Base class for all HOOMD tuners. Updater Base class for all HOOMD updaters. Writer Base class for all HOOMD analyzers.

Details

Base classes for all HOOMD-blue operations.

class hoomd.operation.Operation

Represents operations that are added to an hoomd.Operations object.

Operations in the HOOMD-blue data scheme are objects that operate on a hoomd.Simulation object. They broadly consist of 5 subclasses: Updater, Writer, Compute, Tuner, and hoomd.integrate.BaseIntegrator. All HOOMD-blue operations inherit from one of these five base classes. To find the purpose of each class see its documentation.

classmethod from_state(state, final_namespace=None, **kwargs)

Creates a new object from another object’s state.

Parameters
• state (str or dict) – A state dictionary for an object of this type, a gsd file name, or a dictionary outputted by hoomd.logging.Logger.

• final_namespace (str) – The name for the key of the parent dictionary from where the state is stored. This is to allow for users to specify the property state information in the case where multiple of the same object have their state information stored in the same location. As an example if two LJ pair potentials are stored, the final namespaces would be LJ and LJ_1.

• frame (int) – Only accepted when a gsd file name is passed for state. The frame to access the state information. Is keyword only.

property loggables

Return a name, category mapping of loggable quantities.

Type

dict[str, str]

property state

The state of the object.

Provides a mapping of attributes to their values for use in storing objects state for later object reinitialization. An object’s state can be used to create an identical object using the from_state method (some object require other parameters to be passed in from_state besides the state mapping).

(Loggable: category=”state”)

class hoomd.operation.Compute

Base class for all HOOMD computes.

A compute is an operation which computes some property for another operation or use by a user.

Note

This class should not be instantiated by users. The class can be used for isinstance or issubclass checks.

class hoomd.operation.Tuner

Base class for all HOOMD tuners.

A tuner is an operation which tunes the parameters of another operation for performance or other reasons. A tuner does not modify the current microstate of the simulation. That is a tuner does not change quantities like temperature, particle position, or the number of bonds in a simulation.

Note

This class should not be instantiated by users. The class can be used for isinstance or issubclass checks.

class hoomd.operation.Updater(trigger)

Base class for all HOOMD updaters.

An updater is an operation which modifies a simulation’s state.

Note

This class should not be instantiated by users. The class can be used for isinstance or issubclass checks.

class hoomd.operation.Writer(trigger)

Base class for all HOOMD analyzers.

An analyzer is an operation which writes out a simulation’s state.

Note

This class should not be instantiated by users. The class can be used for isinstance or issubclass checks.