Detect
Detect pockets using a field of points.
get_fop_pocket(protein, pocket_c_alphas, center, resolution, radius, clustering_model=None, clustering_kwargs=None)
¶
Calculate the field of points (FOP) for a pocket.
This function generates a field of points (FOP) representing the shape of a pocket using the provided protein and alpha carbon coordinates. It applies several processing steps including removing steric clashes and clustering.
PARAMETER | DESCRIPTION |
---|---|
protein |
XYZ coordinates of protein atoms. |
pocket_c_alphas |
XYZ coordinates of all alpha carbons in the pocket. |
center |
XYZ center of the pocket. |
resolution |
Resolution for the FOP.
TYPE:
|
radius |
Radius of sphere for FOP.
TYPE:
|
clustering_model |
Scikit-learn clustering model class to use.
TYPE:
|
clustering_kwargs |
Keyword arguments for
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Sequence[float]]
|
Pocket shape as a field of points. |
Example
protein_coords = [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]] alpha_carbons = [[1.1, 2.1, 3.1], [4.1, 5.1, 6.1]] center = [2.0, 3.0, 4.0] resolution = 0.5 radius = 5.0 fop = get_fop_pocket(protein_coords, alpha_carbons, center, resolution, radius) print(f"Field of Points: {fop}")
get_fop_pocket_convenience(atoms_frame, subpex_config, *args, **kwargs)
¶
Convenience function for getting the FOP for a pocket.
This function simplifies the process of calculating the field of points (FOP) for a pocket using a simulation frame and the SuPEx configuration.
PARAMETER | DESCRIPTION |
---|---|
atoms_frame |
Trajectory frame to analyze.
TYPE:
|
subpex_config |
SuPEx configuration containing selection strings and other parameters.
TYPE:
|
*args |
Additional positional arguments.
TYPE:
|
**kwargs |
Additional keyword arguments.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Sequence[float]]
|
Pocket shape as a field of points. |
Example
u = mda.Universe("topology.pdb", "trajectory.dcd") frame = u.select_atoms("protein") config = SubpexConfig(pocket=PocketConfig(selection_str="protein")) fop = get_fop_pocket_convenience(frame, config) print(f"Field of Points: {fop}")
get_pocket_selection(u, center, radius, water_dist=6.7, water_resnames=['WAT', 'HOH', 'H2O'], selection_append='and (not name H*)')
¶
Get the initial selection of the pocket based on the specified radius.
This function identifies the initial selection of pocket residues based on a user-specified radius, and optionally considers distance from water molecules as an approximation of surface residues.
PARAMETER | DESCRIPTION |
---|---|
universe |
MDA universe containing the protein.
|
center |
XYZ coordinates of the pocket center. |
radius |
Radius of the pocket to be considered.
TYPE:
|
water_dist |
Constraint to use for proximity to calculate surface residues.
TYPE:
|
water_resnames |
Residue names for water molecules. |
selection_append |
String to append to pocket selection. By default we exclude hydrogen atoms.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
Selection string of the pocket as used in MDAnalysis. |
Example
u = mda.Universe("topology.pdb", "trajectory.dcd") center = [10.0, 10.0, 10.0] radius = 5.0 selection = get_pocket_selection(u, center, radius) print(f"Pocket selection: {selection}")
Note
If water molecules are found within radius
of the pocket center, we will
try to limit the pocket residues to those near the surface. We approximate
Residues are included if they are within water_dist
away from any water
molecule.
get_residues_in_pocket(u, center, radius, resnames)
¶
Get residues within the pocket.
PARAMETER | DESCRIPTION |
---|---|
u |
MDAnalysis universe containing the protein.
TYPE:
|
center |
XYZ coordinates of the pocket center. |
radius |
Radius of the pocket to be considered.
TYPE:
|
resnames |
Residue names for selection. |
RETURNS | DESCRIPTION |
---|---|
AtomGroup
|
mda.AtomGroup: AtomGroup of residues within the pocket. |