Пример #1
0
    def add_sphere_wall(self, radius, origin, inside = True):
        R""" Add a spherical wall to the simulation.

        Args:
            radius (float): radius of spherical wall
            origin (tuple): origin (center) of spherical wall.
            inside (bool): When True, particles are CONFINED by the wall if they exist entirely inside the sphere (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 sphere (in the portion of connected space that does not contain the origin).

        Quick Example::

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

        """
        self.cpp_compute.AddSphereWall(_hpmc.make_sphere_wall(radius, origin, inside));
Пример #2
0
    def add_sphere_wall(self, radius, origin, inside = True):
        R""" Add a spherical wall to the simulation.

        Args:
            radius (float): radius of spherical wall
            origin (tuple): origin (center) of spherical wall.
            inside (bool): When True, particles are CONFINED by the wall if they exist entirely inside the sphere (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 sphere (in the portion of connected space that does not contain the origin).

        Quick Example::

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

        """
        hoomd.util.print_status_line();
        self.cpp_compute.AddSphereWall(_hpmc.make_sphere_wall(radius, origin, inside));
Пример #3
0
    def set_sphere_wall(self, index, radius, origin, inside = True):
        R""" Change the parameters associated with a particular sphere wall.

        Args:
            index (int): index of the sphere wall to be modified. indices begin at 0 in the order the sphere walls were added to the system.
            radius (float): New radius of spherical wall
            origin (tuple): New origin (center) of spherical wall.
            inside (bool): New confinement condition. When True, particles are CONFINED by the wall if they exist entirely inside the sphere (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 sphere (in the portion of connected space that does not contain the origin).

        Example::

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

        """
        self.cpp_compute.SetSphereWallParameter(index, _hpmc.make_sphere_wall(radius, origin, inside));
Пример #4
0
    def set_sphere_wall(self, index, radius, origin, inside = True):
        R""" Change the parameters associated with a particular sphere wall.

        Args:
            index (int): index of the sphere wall to be modified. indices begin at 0 in the order the sphere walls were added to the system.
            radius (float): New radius of spherical wall
            origin (tuple): New origin (center) of spherical wall.
            inside (bool): New confinement condition. When True, particles are CONFINED by the wall if they exist entirely inside the sphere (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 sphere (in the portion of connected space that does not contain the origin).

        Example::

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

        """
        hoomd.util.print_status_line();
        self.cpp_compute.SetSphereWallParameter(index, _hpmc.make_sphere_wall(radius, origin, inside));