Skip to content

Compute

Field of points properties

get_fop_inputs(atoms_frame, pocket_selection, subpex_config, *args, **kwargs)

Generates a dictionary of inputs for field of points (FoP) calculations.

This function selects atoms from the provided MDAnalysis AtomGroup according to the given pocket selection string and the Subpex configuration. It returns a dictionary containing the positions of protein atoms, pocket C-alpha atoms, pocket radius, resolution, and pocket center.

PARAMETER DESCRIPTION
atoms_frame

An MDAnalysis AtomGroup object containing the atoms of the molecular structure.

TYPE: AtomGroup

pocket_selection

A string specifying the selection criteria for pocket atoms. This string should follow the MDAnalysis selection syntax.

TYPE: str | None

subpex_config

The Subpex configuration object containing parameters for pocket radius, resolution, and center.

TYPE: SubpexConfig

*args

Additional positional arguments.

TYPE: Any DEFAULT: ()

**kwargs

Additional keyword arguments.

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
MutableMapping[str, Any]

A dictionary with the following keys:

  • protein: Positions of protein atoms.
  • pocket_c_alphas: Positions of pocket C-alpha atoms.
  • radius: Radius of the pocket.
  • resolution: Resolution of the pocket.
  • center: Center of the pocket.
RAISES DESCRIPTION
ValueError

If the pocket selection string is None or if the pocket center is None.

Example
atoms_frame = u.select_atoms("protein")
pocket_selection = "resid 50-60"
subpex_config = SubpexConfig(...)
inputs = get_fop_inputs(atoms_frame, pocket_selection, subpex_config)

get_fop_volume(fop, resolution, *args, **kwargs)

Computes the volume of a field of points (FoP) based on the given resolution.

This function calculates the volume occupied by a field of points by assuming that each point occupies a cubic space defined by the resolution.

PARAMETER DESCRIPTION
fop

A sequence of sequences containing XYZ coordinates for each point.

TYPE: Sequence[Sequence[float]]

resolution

The resolution of the field of points in Angstroms.

TYPE: float

*args

Additional positional arguments.

TYPE: Any DEFAULT: ()

**kwargs

Additional keyword arguments.

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
float

The volume of the field of points as a float.

Example
fop = [[0.0, 0.0, 0.0], [1.0, 1.0, 1.0], [2.0, 2.0, 2.0]]
resolution = 1.0
volume = get_fop_volume(fop, resolution)