pyKVFinder.get_vertices

pyKVFinder.get_vertices(atomic: ndarray | List[List[str | float | int]], probe_out: float | int = 4.0, step: float | int = 0.6) ndarray[source]

Gets 3D grid vertices.

Parameters:
  • atomic (Union[numpy.ndarray, List[List[Union[str, float, int]]]]) – A numpy array with atomic data (residue number, chain, residue name, atom name, xyz coordinates and radius) for each atom.

  • probe_out (Union[float, int], optional) – Probe Out size (A), by default 4.0.

  • step (Union[float, int], optional) – Grid spacing (A), by default 0.6.

Returns:

vertices – A numpy.ndarray with xyz vertices coordinates (origin, X-axis, Y-axis, Z-axis).

Return type:

numpy.ndarray

Raises:
  • TypeErroratomic must be a list or a numpy.ndarray.

  • ValueErroratomic has incorrect shape. It must be (n, 8).

  • TypeErrorprobe_out must be a non-negative real number.

  • ValueErrorprobe_out must be a non-negative real number.

  • TypeErrorstep must be a positive real number.

  • ValueErrorstep must be a positive real number.

Example

With the atomic data read with read_pdb or read_xyz, we can get the coordinates of 3D grid vertices (origin, X-axis, Y-axis, Z-axis):

>>> from pyKVFinder import get_vertices
>>> vertices = get_vertices(atomic)
>>> vertices
array([[-19.911, -32.125, -30.806],
    [ 40.188, -32.125, -30.806],
    [-19.911,  43.446, -30.806],
    [-19.911, -32.125,  27.352]])