newanalysis.voro.calcTessellation

newanalysis.voro.calcTessellation(xyz, boxlength, f2c, natoms, nmolecules, maxshell, corelist, vols, fa)

This function wraps a c++ function calling the voro++ library

args: xyz — 2-dim numpy array of 64 bit floats in C format with coordinates

boxlength — boxlength as a float f2c — fine2coarse array, 1-dim, C-format, 32 bit integers natoms — number of atoms nmolecules — number of molecules maxshell — outermost shell to be calculated corelist — residue numbers of the ‘core’ molecules vols — array in which the calculated volumes are to be inserted, 1-dim, C-format, 64-bit floats [optional] fa — array in which the calculated interface areas are to be inserted, 2-dim, C-format, 64-bit floats [optional]

shells = sel.calcTessellation(maxshell=3,core_sel=None,volumes=None,face_areas=None)

Doc-String:

Calculates the Voronoi tessellation of the whole box with the current AtomGroup as the core selection and returns the Delaunay distance matrix.

Arguments:

maxshell: Maximum shell to calculate (default is 3) core_sel: AtomGroup object of core selection (default is self) volumes: 1-dim numpy.float64 array for cell volume calculation (only together with face_areas!) face_areas: 2-dim numpy.float64 array for surface area calculation (only together with volumes!)

The returned shells array will have n x n size, with n being the total number of residues in the box, but only those lines corresponding to the residue numbers of the residues in sel will be filled (cf. the output of sel.f2c(), meaning fine2coarse – atom number -> residue number). In this way, one can save time by not generating the neighborhood information for unneeding residues.