Sphere

class hoomd.md.manifold.Sphere(r, P=(0, 0, 0))

Bases: Manifold

Sphere manifold.

Parameters:
  • r (float) – radius of the a-axis of the spherical constraint [length][\mathrm{length}].

  • P (tuple [float, float, float]) – center of the spherical constraint (default origin) [length][\mathrm{length}].

Sphere defines a sphere:

F(x,y,z)=(xPx)2+(yPy)2+(zPz)2r2F(x,y,z) = (x-P_x)^{2} + (y-P_y)^{2} + (z-P_z)^{2} - r^{2}

Example:

sphere1 = manifold.Sphere(r=10)
sphere2 = manifold.Sphere(r=5, P=(1, 0, 1.5))