peppr.volume_overlap#
- peppr.volume_overlap(molecules: list[AtomArray], voxel_size: float = 0.5) tuple[ndarray[tuple[Any, ...], dtype[floating]], float, float] [source]#
Calculate the volume of the given molecules and how their volumes overlap (i.e. their intersection and union).
- Parameters:
- moleculeslist of struc.AtomArray, length=n
The molecules to calculate the volume of.
- voxel_sizefloat, optional
The size of the voxels used for volume calculation. The computation becomes more accurate with smaller voxel sizes, but the run time scales inverse cubically with voxel size.
- Returns:
- volumesnp.ndarray, shape=(n,), dtype=float
The volume of each input molecule.
- intersection_volumefloat
The volume intersection of all molecules.
- union_volumefloat
The volume union of all molecules.