box_volume
- mdtools.box.box_volume(box, debug=False)[source]
Calculate the volume of a (triclinic) box.
The box can be triclinic or orthogonal.
- Parameters:
box (
array_like
) – Box for which to calculate the volume. It must provided in the same format as returned byMDAnalysis.coordinates.base.Timestep.dimensions
:[lx, ly, lz, alpha, beta, gamma]
.debug (
bool
, optional) – IfTrue
, check the input arguments.Deprecated since version 0.0.0.dev0: This argument is without functionality and will be removed in a future release.
- Returns:
volume (
scalar
) – The volume of the box.- Raises:
ValueError – If the volume of the box is equal to or less than zero.
See also
mdtools.box.volume()
Calculate the volume of (multiple) orthogonal box(es)
MDAnalysis.lib.mdamath.box_volume()
Calculate the volume of a single (triclinic) box
Notes
This function is just a wrapper around
MDAnalysis.lib.mdamath.box_volume()
that raises an exception if the calculated volume is equal to or less than zero.