Sphere¶
- class hoomd.wall.Sphere(radius, origin=(0.0, 0.0, 0.0), inside=True, open=True)¶
Bases:
WallGeometryA sphere.
- Parameters:
radius (float) – The radius of the sphere .
origin (
tuple[float,float,float], optional) – The origin of the sphere, defaults to(0, 0, 0).inside (
bool, optional) – Whether positive signed distances are inside or outside the sphere, defaults toTrue.open (
bool, optional) – Whether to include the surface of the sphere in the space.Truemeans do not include the surface, defaults toTrue.
The signed distance from the wall surface is:
for
inside=True, where is the particle position, is the origin of the sphere, and is the sphere’s radius. The distance is negated wheninside=False.Warning
When running MD simulations in 2D simulation boxes, set
origin[2]=(x,y,0). Otherwise, the wall force will push particles off the xy plane.Note
Sphereobjects are immutable.Example:
sphere = hoomd.wall.Sphere(radius=10.0)
- open¶
Whether to include the surface of the sphere in the space. Open means do not include the surface.
- Type:
- __repr__()¶
A string representation of the Sphere.
- __str__()¶
A string representation of the Sphere.