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:
TypeError – atomic must be a list or a numpy.ndarray.
ValueError – atomic has incorrect shape. It must be (n, 8).
TypeError – probe_out must be a non-negative real number.
ValueError – probe_out must be a non-negative real number.
TypeError – step must be a positive real number.
ValueError – step must be a positive real number.
See also
read_pdb
,read_xyz
,detect
,constitutional
,hydropathy
,export
Example
With the atomic data read with
read_pdb
orread_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]])