Cylinder¶
- class hoomd.wall.Cylinder(radius, axis, origin=(0.0, 0.0, 0.0), inside=True, open=True)¶
Bases:
WallGeometryA right circular cylinder.
- Parameters:
radius (float) – The radius of the circle faces of the cylinder .
axis (
tuple[float,float,float]) – A vector perpendicular to the circular faces.origin (
tuple[float,float,float], optional) – The origin of the cylinder defined as the center of the circle along the cylinder’s axis .inside (
bool, optional) – Whether positive signed distances are inside or outside the cylinder.open (
bool, optional) – Whether to include the surface of the cylinder in the space.Truemeans do not include the surface, defaults toTrue.
Cylinder walls in HOOMD span the simulation box in the direction given by the
axisattribute.The signed distance from the wall surface is
for
inside=True, where is the particle position, is the origin of the cylinder, is the cylinder’s unit axis, and is the cylinder’s radius. The distance is negated wheninside=False.Warning
When running MD simulations in 2D simulation boxes, set
axis=(0,0,1). Otherwise, the wall force will push particles off the xy plane.Note
Cylinderobjects are immutable.Example:
cylinder = hoomd.wall.Cylinder(radius=10.0, axis=(0, 0, 1))
- origin¶
The origin of the cylinder defined as the center of the circle along the cylinder’s axis .
- open¶
Whether to include the surface of the cylinder in the space.
Truemeans do not include the surface.- Type:
bool, optional
- __repr__()¶
A string representation of the Cylinder.
- __str__()¶
A string representation of the Cylinder.