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 \([\mathrm{length}]\).

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

Sphere defines a sphere:

\[F(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))