Sphere

Defines a spherical domain and a predicate whether a given position is inside or outside of the domain.

class halmd.mdsim.geometries.sphere(args)

Construct sphere geometry instance.

Parameters:
  • args (table) – keyword arguments
  • args.centre (table) – sphere centre
  • args.radius (number) – sphere radius
  • args.precision (string) –

    floating point precision (optional)

    The supported values for precision are single and double. If precision is not specified, the precision is selected according to the compute device: single for GPU computing and double otherwise.

Note

This module does not perform a validation of the meaningfulness of the domain, i.e. it does not test whether the geometry is placed outside the simulation domain.

centre

Coordinates of sphere centre.

radius

Sphere radius.

volume

The volume of the sphere.