コード例 #1
0
ファイル: field.py プロジェクト: edmondztt/hoomd-blue
    def set_cylinder_wall(self,
                          index,
                          radius,
                          origin,
                          orientation,
                          inside=True):
        R""" Change the parameters associated with a particular cylinder wall.

        Args:
            index (int): index of the cylinder wall to be modified. indices begin at 0 in the order the cylinder walls were added to the system.
            radius (float): New radius of cylindrical wall
            origin (tuple): New origin (center) of cylindrical wall
            orientation (tuple): New vector that defines the direction of the long axis of the cylinder. will be normalized automatically by hpmc.
            inside (bool): New confinement condition. When True, then particles are CONFINED by the wall if they exist entirely inside the cylinder (in the portion of connected space that contains the origin).
                           When False, then particles are CONFINED by the wall if they exist entirely outside the cylinder (in the portion of connected space that does not contain the origin). DEFAULTS to True.


        Example::

            mc = hpmc.integrate.sphere(seed = 415236);
            ext_wall = hpmc.compute.wall(mc);
            ext_wall.add_cylinder_wall(radius = 1.0, origin = [0, 0, 0], orientation = [0, 0, 1], inside = True);
            ext_wall.set_cylinder_wall(index = 0, radius = 3.0, origin = [0, 0, 0], orientation = [0, 0, 1], inside = True);

        """
        hoomd.util.print_status_line()
        param = _hpmc.make_cylinder_wall(radius, origin, orientation, inside)
        self.cpp_compute.SetCylinderWallParameter(index, param)
コード例 #2
0
    def add_cylinder_wall(self, radius, origin, orientation, inside=True):
        R""" Add a cylindrical wall to the simulation.

        Args:
            radius (float): radius of cylindrical wall
            origin (tuple): origin (center) of cylindrical wall
            orientation (tuple): vector that defines the direction of the long axis of the cylinder. will be normalized automatically by hpmc.
            inside (bool): When True, then particles are CONFINED by the wall if they exist entirely inside the cylinder (in the portion of connected space that contains the origin).
                           When False, then particles are CONFINED by the wall if they exist entirely outside the cylinder (in the portion of connected space that does not contain the origin). DEFAULTS to True.

        Example::

            mc = hpmc.integrate.sphere(seed = 415236);
            ext_wall = hpmc.compute.wall(mc);
            ext_wall.add_cylinder_wall(radius = 1.0, origin = [0, 0, 0], orientation = [0, 0, 1], inside = True);

        """

        param = _hpmc.make_cylinder_wall(radius, origin, orientation, inside)
        self.cpp_compute.AddCylinderWall(param)
コード例 #3
0
ファイル: field.py プロジェクト: joaander/hoomd-blue
    def add_cylinder_wall(self, radius, origin, orientation, inside = True):
        R""" Add a cylindrical wall to the simulation.

        Args:
            radius (float): radius of cylindrical wall
            origin (tuple): origin (center) of cylindrical wall
            orientation (tuple): vector that defines the direction of the long axis of the cylinder. will be normalized automatically by hpmc.
            inside (bool): When True, then particles are CONFINED by the wall if they exist entirely inside the cylinder (in the portion of connected space that contains the origin).
                           When False, then particles are CONFINED by the wall if they exist entirely outside the cylinder (in the portion of connected space that does not contain the origin). DEFAULTS to True.

        Example::

            mc = hpmc.integrate.sphere(seed = 415236);
            ext_wall = hpmc.compute.wall(mc);
            ext_wall.add_cylinder_wall(radius = 1.0, origin = [0, 0, 0], orientation = [0, 0, 1], inside = True);

        """

        hoomd.util.print_status_line();
        param = _hpmc.make_cylinder_wall(radius, origin, orientation, inside);
        self.cpp_compute.AddCylinderWall(param);
コード例 #4
0
ファイル: field.py プロジェクト: joaander/hoomd-blue
    def set_cylinder_wall(self, index, radius, origin, orientation, inside = True):
        R""" Change the parameters associated with a particular cylinder wall.

        Args:
            index (int): index of the cylinder wall to be modified. indices begin at 0 in the order the cylinder walls were added to the system.
            radius (float): New radius of cylindrical wall
            origin (tuple): New origin (center) of cylindrical wall
            orientation (tuple): New vector that defines the direction of the long axis of the cylinder. will be normalized automatically by hpmc.
            inside (bool): New confinement condition. When True, then particles are CONFINED by the wall if they exist entirely inside the cylinder (in the portion of connected space that contains the origin).
                           When False, then particles are CONFINED by the wall if they exist entirely outside the cylinder (in the portion of connected space that does not contain the origin). DEFAULTS to True.


        Example::

            mc = hpmc.integrate.sphere(seed = 415236);
            ext_wall = hpmc.compute.wall(mc);
            ext_wall.add_cylinder_wall(radius = 1.0, origin = [0, 0, 0], orientation = [0, 0, 1], inside = True);
            ext_wall.set_cylinder_wall(index = 0, radius = 3.0, origin = [0, 0, 0], orientation = [0, 0, 1], inside = True);

        """
        hoomd.util.print_status_line();
        param = _hpmc.make_cylinder_wall(radius, origin, orientation, inside)
        self.cpp_compute.SetCylinderWallParameter(index, param);