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
precisionaresingleanddouble. Ifprecisionis not specified, the precision is selected according to the compute device:singlefor GPU computing anddoubleotherwise.
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.