Ejemplo n.º 1
0
    def __init__(self, field_x, field_y, field_z, p):

        # initialize the base class
        Force.__init__(self)

        # create the c++ mirror class
        self.cppForce = _md.ConstExternalFieldDipoleForceCompute(
            hoomd.context.current.system_definition, field_x, field_y, field_z,
            p)

        hoomd.context.current.system.addCompute(self.cppForce, self.force_name)

        # store metadata
        self.field_x = field_x
        self.field_y = field_y
        self.field_z = field_z
Ejemplo n.º 2
0
    def __init__(self, field_x,field_y,field_z,p):
        hoomd.util.print_status_line()

        # initialize the base class
        _force.__init__(self)

        # create the c++ mirror class
        self.cpp_force = _md.ConstExternalFieldDipoleForceCompute(hoomd.context.current.system_definition, field_x, field_y, field_z, p)

        hoomd.context.current.system.addCompute(self.cpp_force, self.force_name)

        # store metadata
        self.metadata_fields = ['field_x', 'field_y', 'field_z']
        self.field_x = field_x
        self.field_y = field_y
        self.field_z = field_z