are_entities_inside_box

mdcraft.lib.cell.are_entities_inside_box(coordinates: np.ndarray[float_t] | 'unit.Quantity' | Q_, box_size: np.ndarray[float_t] | 'unit.Quantity' | Q_, *, n_dimensions: int | None = None) bool[source]

Checks whether all entities are within the bounds of a general parallelogram or triclinic box.

Parameters:
coordinatesnumpy.ndarray, openmm.unit.Quantity, or pint.Quantity

Coordinates \(\mathrm{r}\) of \(N\) entities.

Shape: \((N,d)\), where \(d\in\{2,3\}\) is the dimensionality.

Reference unit: \(\mathrm{nm}\).

box_sizenumpy.ndarray, openmm.unit.Quantity, or pint.Quantity

Dimensions \((L_x,L_y[,L_z])\), lattice parameters \((a,b[,c,\alpha,\beta],\gamma)\), or box vectors \((\mathbf{a};\mathbf{b}[;\mathbf{c}])\).

Note

Lattice parameters should always be provided in an array without explicit units.

Shapes: \((d,)\) for dimensions, \((3,)\) (2D) or \((6,)\) (3D) for lattice parameters, or \((d,d)\) for box vectors.

Reference units: \(\mathrm{nm}\) for lengths and degrees (\(^\circ\)) for angles.

n_dimensionsint, keyword-only, optional

Dimensionality of the box \(d\). Only used when box_size has shape \((3,)\).

Valid values: 2 or 3.

Returns:
all_insidebool

Whether all entities are inside the box.