Command-line interface
In addition to pyKVFinder package, a command-line interface (CLI) is available to ease cavity detection and characterization with the full set of customizable parameters.
-$ pyKVFinder
-Usage: pyKVFinder [-h] [-v] [--version] [-b <str>] [-O <str>]
- [--nthreads <int>] [-d <str>] [-s <float>] [-i <float>]
- [-o <float>] [-V <float>] [-R <float>] [-S <str>]
- [--ignore_backbone] [-D] [--plot_frequencies]
- [--hydropathy [{EisenbergWeiss, HessaHeijne, KyteDoolittle,
- MoonFleming, RadzickaWolfenden, WimleyWhite, ZhaoLondon, <.toml>}]]
- [-B <.toml>] [-L (<.pdb> | <.xyz>)] [--ligand_cutoff <float>]
- (<.pdb> | <.xyz>)
+$ pyKVFinder
+Usage: pyKVFinder [-h] [-v] [--version] [-b <str>] [-O <str>]
+ [--nthreads <int>] [-d <str>] [-s <float>] [-i <float>]
+ [-o <float>] [-V <float>] [-R <float>] [-S <str>]
+ [--ignore_backbone] [-D] [--plot_frequencies]
+ [--hydropathy [{EisenbergWeiss, HessaHeijne, KyteDoolittle,
+ MoonFleming, RadzickaWolfenden, WimleyWhite, ZhaoLondon, <.toml>}]]
+ [-B <.toml>] [-L (<.pdb> | <.xyz>)] [--ligand_cutoff <float>]
+ (<.pdb> | <.xyz>)
@@ -129,7 +129,7 @@ Positional argumentsThe positional arguments are:
(<.pdb> | <.xyz>)
: A path to a target PDB or XYZ file.
-$ pyKVFinder <.pdb>
+$ pyKVFinder <.pdb>
@@ -140,18 +140,18 @@ Optional arguments-h or --help
: Show help message.
-$ pyKVFinder -h
-$ pyKVFinder --help
+$ pyKVFinder -h
+$ pyKVFinder --help
--version
: Display pyKVFinder version.
-$ pyKVFinder --version
+$ pyKVFinder --version
-v
or --verbose
: Print extra information to standard output.
-$ pyKVFinder <.pdb> --verbose
+$ pyKVFinder <.pdb> --verbose
@@ -161,8 +161,8 @@ Optional arguments-b <str> or --base_name <str>
: A prefix for output files.
-$ pyKVFinder <.pdb> -b <str>
-$ pyKVFinder <.pdb> --base_name <str>
+$ pyKVFinder <.pdb> -b <str>
+$ pyKVFinder <.pdb> --base_name <str>
@@ -172,8 +172,8 @@ Optional arguments-O <str> or --output_directory <str>
: A path to a directory for output files.
-$ pyKVFinder <.pdb> -O <str>
-$ pyKVFinder <.pdb> --output_directory <str>
+$ pyKVFinder <.pdb> -O <str>
+$ pyKVFinder <.pdb> --output_directory <str>
@@ -183,7 +183,7 @@ Optional arguments--nthreads <int>: Number of threads to apply in parallel routines.
-$ pyKVFinder <.pdb> --nthreads <int>
+$ pyKVFinder <.pdb> --nthreads <int>
@@ -198,8 +198,8 @@ Detection and characterization-d <str> or --dictionary <str>
: A path to a van der Waals radii file (see template).
-$ pyKVFinder <.pdb> -d <str>
-$ pyKVFinder <.pdb> --dictionary <str>
+$ pyKVFinder <.pdb> -d <str>
+$ pyKVFinder <.pdb> --dictionary <str>
@@ -209,8 +209,8 @@ Detection and characterization-s <float> or --step <float>
: Grid spacing (A).
-$ pyKVFinder <.pdb> -s <float>
-$ pyKVFinder <.pdb> --step <float>
+$ pyKVFinder <.pdb> -s <float>
+$ pyKVFinder <.pdb> --step <float>
@@ -220,8 +220,8 @@ Detection and characterization-i <float> or --probe_in <float>
: Probe In size (A).
-$ pyKVFinder <.pdb> -i <float>
-$ pyKVFinder <.pdb> --probe_in <float>
+$ pyKVFinder <.pdb> -i <float>
+$ pyKVFinder <.pdb> --probe_in <float>
@@ -231,8 +231,8 @@ Detection and characterization-o <float> or --probe_out <float>
: Probe Out size (A).
-$ pyKVFinder <.pdb> -o <float>
-$ pyKVFinder <.pdb> --probe_out <float>
+$ pyKVFinder <.pdb> -o <float>
+$ pyKVFinder <.pdb> --probe_out <float>
@@ -242,8 +242,8 @@ Detection and characterization-V <float> or --volume_cutoff <float>
: Cavities volume filter (A3).
-$ pyKVFinder <.pdb> -V <float>
-$ pyKVFinder <.pdb> --volume_cutoff <float>
+$ pyKVFinder <.pdb> -V <float>
+$ pyKVFinder <.pdb> --volume_cutoff <float>
@@ -253,8 +253,8 @@ Detection and characterization-R <float> or --removal_distance <float>
: Length to be removed from the cavity-bulk frontier (A).
-$ pyKVFinder <.pdb> -R <float>
-$ pyKVFinder <.pdb> --removal_distance <float>
+$ pyKVFinder <.pdb> -R <float>
+$ pyKVFinder <.pdb> --removal_distance <float>
@@ -264,8 +264,8 @@ Detection and characterization-S <str> or --surface <str>
: A surface representation. Options are: SES
and SAS
. SES specifies solvent excluded surface and SAS specifies solvent accessible surface.
-$ pyKVFinder <.pdb> -S <str>
-$ pyKVFinder <.pdb> --surface <str>
+$ pyKVFinder <.pdb> -S <str>
+$ pyKVFinder <.pdb> --surface <str>
@@ -275,7 +275,7 @@ Detection and characterization--ignore_backbone: Ignore backbone contacts to cavity when defining interface residues.
-$ pyKVFinder <.pdb> --ignore_backbone
+$ pyKVFinder <.pdb> --ignore_backbone
@@ -291,8 +291,8 @@ Extra characterizationThe parameters for additional characterization are:
--D or --depth
: Characterize the depth of the detected cavities. This mode includes depth of each cavity point as the B-factor in the cavity PDB file and maximum and average depth of the detected cavities in the results file.
-$ pyKVFinder <.pdb> -D
-$ pyKVFinder <.pdb> --depth
+$ pyKVFinder <.pdb> -D
+$ pyKVFinder <.pdb> --depth
@@ -302,7 +302,7 @@ Extra characterization
--plot_frequencies
: Plot bar charts of calculated frequencies (residues and classes of residues) of the detected cavities in a PDF file. The classes of residues are aliphatic apolar (R1), aromatic (R2), polar uncharged (R3), negatively charged (R4), positively charged (R5) and non-standard (RX) residues.
-$ pyKVFinder <.pdb> --plot_frequencies
+$ pyKVFinder <.pdb> --plot_frequencies
@@ -312,21 +312,21 @@ Extra characterization
--hydropathy [{EisenbergWeiss, HessaHeijne, KyteDoolittle, MoonFleming, WimleyWhite, ZhaoLondon, <.toml>}]
: Characterize the hydropathy of the detected cavities. This mode maps a target hydrophobicity scale as B-factor at surface points of the detected cavities. Also, it calculates the average hydropathy of each detected cavity. The constant hydrophobicity scale is EisenbergWeiss.
-$ pyKVFinder <.pdb> --hydropathy
+$ pyKVFinder <.pdb> --hydropathy
In addition, the user can define one of the built-in hydrophobicity scale. The built-in hydrophobicity scales are: EisenbergWeiss, HessaHeijne, KyteDoolittle, MoonFleming, RadzickaWolfenden, WimleyWhite and ZhaoLondon.
-$ pyKVFinder <.pdb> --hydropathy EisenbergWeiss
-$ pyKVFinder <.pdb> --hydropathy HessaHeijne
-$ pyKVFinder <.pdb> --hydropathy KyteDoolittle
-$ pyKVFinder <.pdb> --hydropathy MoonFleming
-$ pyKVFinder <.pdb> --hydropathy RadzickaWolfenden
-$ pyKVFinder <.pdb> --hydropathy WimleyWhite
-$ pyKVFinder <.pdb> --hydropathy ZhaoLondon
+$ pyKVFinder <.pdb> --hydropathy EisenbergWeiss
+$ pyKVFinder <.pdb> --hydropathy HessaHeijne
+$ pyKVFinder <.pdb> --hydropathy KyteDoolittle
+$ pyKVFinder <.pdb> --hydropathy MoonFleming
+$ pyKVFinder <.pdb> --hydropathy RadzickaWolfenden
+$ pyKVFinder <.pdb> --hydropathy WimleyWhite
+$ pyKVFinder <.pdb> --hydropathy ZhaoLondon
Further, the user can also define a custom hydrophobicity scale file via a TOML-formatted file (see template).
-$ pyKVFinder <.pdb> --hydropathy <.toml>
+$ pyKVFinder <.pdb> --hydropathy <.toml>
@@ -345,8 +345,8 @@ Box adjusment-B <.toml> or --box <.toml>
: A path to TOML-formatted file with box parameters (see template). Adjust the 3D grid based on a list of residues ([“resnum”, “chain”]) and a padding or a set of four vertices (p1: origin, p2: X-axis max, p3: Y-axis max, p4: Z-axis max) with xyz coordinates ([x, y, z]).
-$ pyKVFinder <.pdb> -B <.toml>
-$ pyKVFinder <.pdb> --box <.toml>
+$ pyKVFinder <.pdb> -B <.toml>
+$ pyKVFinder <.pdb> --box <.toml>
@@ -362,8 +362,8 @@ Ligand adjustment-L (<.pdb> | <.xyz>) or --ligand (<.pdb> | <.xyz>)
: A path to a ligand PDB or XYZ file to limit the cavities within a radius (ligand_cutoff) around it.
-$ pyKVFinder <.pdb> -L <.pdb>
-$ pyKVFinder <.pdb> --ligand <.pdb>
+$ pyKVFinder <.pdb> -L <.pdb>
+$ pyKVFinder <.pdb> --ligand <.pdb>
@@ -373,7 +373,7 @@ Ligand adjustment--ligand_cutoff <float>: A radius value to limit a space around the defined ligand.
-$ pyKVFinder <.pdb> -L <.pdb> --ligand_cutoff <float>
+$ pyKVFinder <.pdb> -L <.pdb> --ligand_cutoff <float>
diff --git a/docs/_installation/index.html b/docs/_installation/index.html
index 7074bc0a..0c37791e 100644
--- a/docs/_installation/index.html
+++ b/docs/_installation/index.html
@@ -4,7 +4,7 @@
- Requirements — pyKVFinder 0.6.0 documentation
+ Requirements — pyKVFinder 0.6.7 documentation
@@ -117,11 +117,11 @@ Requirements
Package managers
On Linux:
-sudo apt install python3 swig
+sudo apt install python3 swig
On macOS:
-brew install python3 swig
+brew install python3 swig
@@ -133,10 +133,10 @@ Package managers
If you use conda, you can install Python v3 and SWIG from the defaults channel:
# Use an environment rather than install in base environement (recommended)
-conda create -n myenv python=3
-conda activate myenv
+conda create -n myenv python=3
+conda activate myenv
# The SWIG install command
-conda install swig
+conda install swig
@@ -146,12 +146,12 @@ Installationsection.
To install the latest release on PyPI,
run:
-pip install pyKVFinder
+pip install pyKVFinder
Or to install the latest developmental version, run:
-git clone https://github.com/LBC-LNBio/pyKVFinder.git
-pip install pyKVFinder
+git clone https://github.com/LBC-LNBio/pyKVFinder.git
+pip install pyKVFinder
diff --git a/docs/_modules/index.html b/docs/_modules/index.html
index 81a9b8c9..7cd3a90d 100644
--- a/docs/_modules/index.html
+++ b/docs/_modules/index.html
@@ -3,7 +3,7 @@
- Overview: module code — pyKVFinder 0.6.0 documentation
+ Overview: module code — pyKVFinder 0.6.7 documentation
diff --git a/docs/_modules/pyKVFinder/grid.html b/docs/_modules/pyKVFinder/grid.html
index 18aa772a..b6c73ab3 100644
--- a/docs/_modules/pyKVFinder/grid.html
+++ b/docs/_modules/pyKVFinder/grid.html
@@ -3,7 +3,7 @@
- pyKVFinder.grid — pyKVFinder 0.6.0 documentation
+ pyKVFinder.grid — pyKVFinder 0.6.7 documentation
@@ -129,7 +129,7 @@ Source code for pyKVFinder.grid
probe_out: Union[float, int] = 4.0,
step: Union[float, int] = 0.6,
) -> numpy.ndarray:
- """Gets 3D grid vertices.
+ """Gets 3D grid vertices.
Parameters
----------
@@ -227,7 +227,7 @@ Source code for pyKVFinder.grid
probe_out: Union[float, int] = 4.0,
nthreads: Optional[int] = None,
) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]:
- """Gets 3D grid vertices from box configuration file or parKVFinder
+ """Gets 3D grid vertices from box configuration file or parKVFinder
parameters file, selects atoms inside custom 3D grid, define sine
and cosine of 3D grid angles and define xyz grid units.
@@ -416,7 +416,7 @@ Source code for pyKVFinder.grid
def _get_vertices_from_box(
box: Dict[str, List[float]], probe_out: float = 4.0
) -> numpy.ndarray:
- """Gets 3D grid vertices from box coordinates.
+ """Gets 3D grid vertices from box coordinates.
Parameters
----------
@@ -514,7 +514,7 @@ Source code for pyKVFinder.grid
xyzr: numpy.ndarray,
probe_out: float = 4.0,
) -> numpy.ndarray:
- """Gets 3D grid vertices based on a list of residues (name and chain)
+ """Gets 3D grid vertices based on a list of residues (name and chain)
and a padding value.
Parameters
@@ -564,7 +564,7 @@ Source code for pyKVFinder.grid
def _get_dimensions(
vertices: Union[numpy.ndarray, List[List[float]]], step: Union[float, int] = 0.6
) -> Tuple[int, int, int]:
- """Gets dimensions of 3D grid from vertices.
+ """Gets dimensions of 3D grid from vertices.
Parameters
----------
@@ -627,7 +627,7 @@ Source code for pyKVFinder.grid
def _get_sincos(vertices: Union[numpy.ndarray, List[List[float]]]) -> numpy.ndarray:
- """Gets sine and cossine of the grid rotation angles from a list of vertices
+ """Gets sine and cossine of the grid rotation angles from a list of vertices
coordinates.
Parameters
@@ -695,7 +695,7 @@ Source code for pyKVFinder.grid
nthreads: Optional[int] = None,
verbose: bool = False,
) -> Tuple[int, numpy.ndarray]:
- """Detects biomolecular cavities.
+ """Detects biomolecular cavities.
Cavity points that belongs to the same cavity are assigned with an integer
in the grid.
@@ -1087,7 +1087,7 @@ Source code for pyKVFinder.grid
def _select_cavities(cavities: numpy.ndarray, selection: List[int]) -> numpy.ndarray:
- """Select cavities in the 3D grid by cavity labels.
+ """Select cavities in the 3D grid by cavity labels.
Parameters
----------
@@ -1131,7 +1131,7 @@ Source code for pyKVFinder.grid
def _get_cavity_name(index: int) -> str:
- """Get cavity name, eg KAA, KAB, and so on, based on the index.
+ """Get cavity name, eg KAA, KAB, and so on, based on the index.
Parameters
----------
@@ -1143,12 +1143,12 @@ Source code for pyKVFinder.grid
cavity_name : str
Cavity name
"""
- cavity_name = f"K{chr(65 + int(index / 26) % 26)}{chr(65 + (index % 26))}"
+ cavity_name = f"K{chr(65 + int(index / 26) % 26)}{chr(65 + (index % 26))}"
return cavity_name
def _get_cavity_label(cavity_name: str) -> int:
- """Get cavity label, eg 2, 3, and so on, based on the cavity name.
+ """Get cavity label, eg 2, 3, and so on, based on the cavity name.
Parameters
----------
@@ -1181,7 +1181,7 @@ Source code for pyKVFinder.grid
ncav: int,
selection: Optional[List[int]] = None,
) -> Tuple[Dict[str, float], Dict[str, float]]:
- """Processes arrays of volumes and areas.
+ """Processes arrays of volumes and areas.
Parameters
----------
@@ -1228,7 +1228,7 @@ Source code for pyKVFinder.grid
nthreads: Optional[int] = None,
verbose: bool = False,
) -> Tuple[numpy.ndarray, Dict[str, float], Dict[str, float]]:
- """Spatial characterization (volume and area) of the detected cavities.
+ """Spatial characterization (volume and area) of the detected cavities.
Parameters
----------
@@ -1401,7 +1401,7 @@ Source code for pyKVFinder.grid
ncav: int,
selection: Optional[List[int]] = None,
) -> Tuple[Dict[str, float], Dict[str, float]]:
- """Processes arrays of maximum and average depths.
+ """Processes arrays of maximum and average depths.
Parameters
----------
@@ -1448,7 +1448,7 @@ Source code for pyKVFinder.grid
nthreads: Optional[int] = None,
verbose: bool = False,
) -> Tuple[numpy.ndarray, Dict[str, float], Dict[str, float]]:
- """Characterization of the depth of the detected cavities, including depth
+ """Characterization of the depth of the detected cavities, including depth
per cavity point and maximum and average depths of detected cavities.
Parameters
@@ -1609,7 +1609,7 @@ Source code for pyKVFinder.grid
def _process_residues(
raw: List[str], ncav: int, selection: Optional[List[int]] = None
) -> Dict[str, List[List[str]]]:
- """Processes raw list of residues from _constitutional to a list of
+ """Processes raw list of residues from _constitutional to a list of
residue information per cavity name.
Parameters
@@ -1659,7 +1659,7 @@ Source code for pyKVFinder.grid
nthreads: Optional[int] = None,
verbose: bool = False,
) -> Dict[str, List[List[str]]]:
- """Constitutional characterization (interface residues) of the detected
+ """Constitutional characterization (interface residues) of the detected
cavities.
Parameters
@@ -1897,7 +1897,7 @@ Source code for pyKVFinder.grid
def _process_hydropathy(
raw_avg_hydropathy: numpy.ndarray, ncav: int, selection: Optional[List[int]] = None
) -> Dict[str, float]:
- """Processes array of average hydropathy.
+ """Processes array of average hydropathy.
Parameters
----------
@@ -1942,7 +1942,7 @@ Source code for pyKVFinder.grid
nthreads: Optional[int] = None,
verbose: bool = False,
) -> Tuple[numpy.ndarray, Dict[str, float]]:
- """Hydropathy characterization of the detected cavities.
+ """Hydropathy characterization of the detected cavities.
Map a target hydrophobicity scale per surface point and calculate average hydropathy of detected cavities.
@@ -2283,7 +2283,7 @@ Source code for pyKVFinder.grid
def _get_opening_name(index: int) -> str:
- """Get opening name, eg OAA, OAB, and so on, based on the index.
+ """Get opening name, eg OAA, OAB, and so on, based on the index.
Parameters
----------
@@ -2295,12 +2295,12 @@ Source code for pyKVFinder.grid
opening_name : str
Opening name
"""
- opening_name = f"O{chr(65 + int(index / 26) % 26)}{chr(65 + (index % 26))}"
+ opening_name = f"O{chr(65 + int(index / 26) % 26)}{chr(65 + (index % 26))}"
return opening_name
def _get_opening_label(opening_name: str) -> int:
- """Get opening label, eg 2, 3, and so on, based on the opening name.
+ """Get opening label, eg 2, 3, and so on, based on the opening name.
Parameters
----------
@@ -2331,7 +2331,7 @@ Source code for pyKVFinder.grid
raw_openings: numpy.ndarray,
opening2cavity: numpy.ndarray,
) -> Dict[str, Dict[str, float]]:
- """Processes arrays of openings' areas.
+ """Processes arrays of openings' areas.
Parameters
----------
@@ -2377,7 +2377,7 @@ Source code for pyKVFinder.grid
nthreads: Optional[int] = None,
verbose: bool = False,
) -> Tuple[int, numpy.ndarray, Dict[str, Dict[str, float]]]:
- """[WIP] Identify openings of the detected cavities and calculate their areas.
+ """[WIP] Identify openings of the detected cavities and calculate their areas.
Parameters
----------
@@ -2595,7 +2595,7 @@ Source code for pyKVFinder.grid
append: bool = False,
model: int = 0,
) -> None:
- """Export cavitiy (H) and surface (HA) points to PDB-formatted file with
+ """Export cavitiy (H) and surface (HA) points to PDB-formatted file with
a variable (B; optional) in B-factor column, and hydropathy to
PDB-formatted file in B-factor column at surface points (HA).
@@ -2851,7 +2851,7 @@ Source code for pyKVFinder.grid
append: bool = False,
model: int = 0,
) -> None:
- """Export opening points (H) to a PDB-formatted file.
+ """Export opening points (H) to a PDB-formatted file.
Parameters
----------
diff --git a/docs/_modules/pyKVFinder/main.html b/docs/_modules/pyKVFinder/main.html
index 2132b460..fa354470 100644
--- a/docs/_modules/pyKVFinder/main.html
+++ b/docs/_modules/pyKVFinder/main.html
@@ -3,7 +3,7 @@
- pyKVFinder.main — pyKVFinder 0.6.0 documentation
+ pyKVFinder.main — pyKVFinder 0.6.7 documentation
@@ -142,7 +142,7 @@ Source code for pyKVFinder.main
def cli() -> None:
- """pyKVFinder Command Line Interface (CLI).
+ """pyKVFinder Command Line Interface (CLI).
Parameters
----------
@@ -184,7 +184,7 @@ Source code for pyKVFinder.main
# Start logging
logging.basicConfig(
- filename=f"{os.path.join(args.output_directory, 'KVFinder.log')}",
+ filename=f"{os.path.join(args.output_directory, 'KVFinder.log')}",
level=logging.INFO,
format="%(message)s",
)
@@ -257,7 +257,7 @@ Source code for pyKVFinder.main
logging.info(f"> Step: {args.step} \u00c5")
logging.info(f"> Probe In: {args.probe_in} \u00c5")
logging.info(f"> Probe Out: {args.probe_out} \u00c5")
- logging.info(f"> Voxel volume: {args.step * args.step * args.step} \u00c5\u00b3")
+ logging.info(f"> Voxel volume: {args.step * args.step * args.step} \u00c5\u00b3")
logging.info(f"> p1: {args.vertices[0]}")
logging.info(f"> p2: {args.vertices[1]}")
logging.info(f"> p3: {args.vertices[2]}")
@@ -386,7 +386,7 @@ Source code for pyKVFinder.main
[docs]class pyKVFinderResults(object):
- """A class containing pyKVFinder detection and characterization results.
+ """A class containing pyKVFinder detection and characterization results.
Parameters
----------
@@ -554,7 +554,7 @@ Source code for pyKVFinder.main
output: Union[str, pathlib.Path] = "cavity.pdb",
nthreads: Optional[int] = None,
) -> None:
- """Exports cavitiy (H) and surface (HA) points to PDB-formatted file
+ """Exports cavitiy (H) and surface (HA) points to PDB-formatted file
with a variable (B; optional) in B-factor column, and hydropathy to
PDB-formatted file in B-factor column at surface points (HA).
@@ -575,10 +575,10 @@ Source code for pyKVFinder.main
Example
-------
- >>> from pyKVFinder import pyKVFinder
>>> import os
+ >>> import pyKVFinder
>>> pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb')
- >>> results = pyKVFinder(pdb)
+ >>> results = pyKVFinder.run_workflow(pdb)
>>> results.export()
"""
export(
@@ -598,7 +598,7 @@ Source code for pyKVFinder.main
fn: Union[str, pathlib.Path] = "results.toml",
output: Optional[Union[str, pathlib.Path]] = None
) -> None:
- """
+ """
Writes file paths and cavity characterization to TOML-formatted file
Parameters
@@ -619,10 +619,10 @@ Source code for pyKVFinder.main
Example
-------
- >>> from pyKVFinder import pyKVFinder
>>> import os
+ >>> import pyKVFinder
>>> pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb')
- >>> results = pyKVFinder(pdb)
+ >>> results = pyKVFinder.run_workflow(pdb)
>>> results.write()
"""
write_results(
@@ -641,7 +641,7 @@ Source code for pyKVFinder.main
)
[docs] def plot_frequencies(self, pdf: Union[str, pathlib.Path] = "barplots.pdf"):
- """Plot bar charts of frequencies (residues and classes of residues) in
+ """Plot bar charts of frequencies (residues and classes of residues) in
a PDF file.
Parameters
@@ -674,10 +674,10 @@ Source code for pyKVFinder.main
Example
-------
- >>> from pyKVFinder import pyKVFinder
>>> import os
+ >>> import pyKVFinder
>>> pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb')
- >>> results = pyKVFinder(pdb)
+ >>> results = pyKVFinder.run_workflow(pdb)
>>> results.plot_frequencies()
"""
plot_frequencies(self.frequencies, pdf)
@@ -690,7 +690,7 @@ Source code for pyKVFinder.main
pdf: Union[str, pathlib.Path] = "barplots.pdf",
nthreads: Optional[int] = None,
) -> None:
- """Exports cavities and characterization to PDB-formatted files,
+ """Exports cavities and characterization to PDB-formatted files,
writes file paths and characterization to a TOML-formatted file, and
optionally plot bar charts of frequencies (residues and classes of
residues) in a PDF file.
@@ -737,10 +737,10 @@ Source code for pyKVFinder.main
Example
-------
- >>> from pyKVFinder import pyKVFinder
>>> import os
+ >>> import pyKVFinder
>>> pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb')
- >>> results = pyKVFinder(pdb)
+ >>> results = pyKVFinder.run_workflow(pdb)
>>> results.export_all()
Yet, we can set a ``include_frequencies_pdf`` flag to True to plot the bar charts of the frequencies in a PDF file.
@@ -776,7 +776,7 @@ Source code for pyKVFinder.main
nthreads: Optional[int] = None,
verbose: bool = False,
) -> pyKVFinderResults:
- """Detects and characterizes cavities (volume, area, depth [optional],
+ """Detects and characterizes cavities (volume, area, depth [optional],
hydropathy [optional] and interface residues).
Parameters
@@ -1295,7 +1295,7 @@ Source code for pyKVFinder.main
[docs]class Molecule(object):
- """A class for representing molecular structures.
+ """A class for representing molecular structures.
Parameters
----------
@@ -1393,7 +1393,7 @@ Source code for pyKVFinder.main
nthreads: Optional[int] = None,
verbose: bool = False,
):
- """Initialize the Molecule object with molecule, radii, model, nthreads and verbose.
+ """Initialize the Molecule object with molecule, radii, model, nthreads and verbose.
Parameters
----------
@@ -1472,109 +1472,109 @@ Source code for pyKVFinder.main
@property
def atomic(self) -> numpy.ndarray:
- """Get _atomic attribute."""
+ """Get _atomic attribute."""
return self._atomic
@property
def dim(self) -> Tuple[int, int, int]:
- """Get _dim attribute"""
+ """Get _dim attribute"""
return self._dim
@property
def grid(self) -> numpy.ndarray:
- """Get _grid attribute."""
+ """Get _grid attribute."""
return self._grid
@property
def molecule(self) -> Union[str, pathlib.Path]:
- """Get _molecule attribute."""
+ """Get _molecule attribute."""
return self._molecule
@property
def nx(self) -> int:
- """Get grid units in X-axis."""
+ """Get grid units in X-axis."""
if self._dim is not None:
return self._dim[0]
@property
def ny(self) -> int:
- """Get grid units in Y-axis."""
+ """Get grid units in Y-axis."""
if self._dim is not None:
return self._dim[1]
@property
def nz(self) -> int:
- """Get grid units in Z-axis."""
+ """Get grid units in Z-axis."""
if self._dim is not None:
return self._dim[2]
@property
def p1(self) -> numpy.ndarray:
- """Get origin of the 3D grid."""
+ """Get origin of the 3D grid."""
if self._vertices is not None:
return self._vertices[0]
@property
def p2(self) -> numpy.ndarray:
- """Get X-axis max of the 3D grid."""
+ """Get X-axis max of the 3D grid."""
if self._vertices is not None:
return self._vertices[1]
@property
def p3(self) -> numpy.ndarray:
- """Get Y-axis max of the 3D grid."""
+ """Get Y-axis max of the 3D grid."""
if self._vertices is not None:
return self._vertices[2]
@property
def p4(self) -> numpy.ndarray:
- """Get Z-axis max of the 3D grid."""
+ """Get Z-axis max of the 3D grid."""
if self._vertices is not None:
return self._vertices[3]
@property
def padding(self) -> float:
- """Get _padding attribute."""
+ """Get _padding attribute."""
return self._padding
@property
def probe(self) -> float:
- """Get _probe attribute."""
+ """Get _probe attribute."""
return self._probe
@property
def radii(self) -> Dict[str, Any]:
- """Get _radii attribute."""
+ """Get _radii attribute."""
return self._radii
@property
def representation(self) -> str:
- """Get _representation attribute."""
+ """Get _representation attribute."""
return self._representation
@property
def rotation(self) -> numpy.ndarray:
- """Get _rotation attribute."""
+ """Get _rotation attribute."""
return self._rotation
@property
def step(self) -> float:
- """Get _step attribute."""
+ """Get _step attribute."""
if self._step is not None:
return self._step
@property
def vertices(self) -> numpy.ndarray:
- """Get _vertices attribute."""
+ """Get _vertices attribute."""
return self._vertices
@property
def xyzr(self) -> numpy.ndarray:
- """Get xyz coordinates and radius of molecule atoms."""
+ """Get xyz coordinates and radius of molecule atoms."""
return self._atomic[:, 4:].astype(numpy.float64)
def _set_grid(self, padding: Optional[float] = None) -> None:
- """Define the 3D grid for the target molecule.
+ """Define the 3D grid for the target molecule.
Parameters
----------
@@ -1614,7 +1614,7 @@ Source code for pyKVFinder.main
print("sina: {}, sinb: {}, cosa: {}, cosb: {}".format(*self.rotation))
def _get_padding(self) -> float:
- """Automatically define the padding based on molecule coordinates, probe size, grid spacing and atom radii.
+ """Automatically define the padding based on molecule coordinates, probe size, grid spacing and atom radii.
Returns
-------
@@ -1627,7 +1627,7 @@ Source code for pyKVFinder.main
return float(padding.round(decimals=1))
[docs] def vdw(self, step: float = 0.6, padding: Optional[float] = None) -> None:
- """Fill the 3D grid with the molecule as the van der Waals surface representation.
+ """Fill the 3D grid with the molecule as the van der Waals surface representation.
Parameters
----------
@@ -1709,7 +1709,7 @@ Source code for pyKVFinder.main
surface: str = "SES",
padding: Optional[float] = None,
) -> None:
- """Fill the 3D grid with the molecule as the van der Waals surface representation.
+ """Fill the 3D grid with the molecule as the van der Waals surface representation.
Parameters
----------
@@ -1844,7 +1844,7 @@ Source code for pyKVFinder.main
).reshape(self.nx, self.ny, self.nz)
[docs] def volume(self) -> float:
- """Estimate the volume of the molecule based on the molecular surface representation, ie, vdW, SES or SAS representations.
+ """Estimate the volume of the molecule based on the molecular surface representation, ie, vdW, SES or SAS representations.
Returns
-------
@@ -1864,10 +1864,10 @@ Source code for pyKVFinder.main
volume = _volume(
(self.grid == 0).astype(numpy.int32) * 2, self.step, 1, self.nthreads
)
- return float(volume.round(decimals=2))
+ return volume.round(decimals=2).item()
[docs] def preview(self, **kwargs) -> None:
- """Preview the molecular surface in the 3D grid.
+ """Preview the molecular surface in the 3D grid.
Example
-------
@@ -1891,7 +1891,7 @@ Source code for pyKVFinder.main
self,
fn: Union[str, pathlib.Path] = "molecule.pdb",
) -> None:
- """Export molecule points (H) to a PDB-formatted file.
+ """Export molecule points (H) to a PDB-formatted file.
Parameters
----------
diff --git a/docs/_modules/pyKVFinder/utils.html b/docs/_modules/pyKVFinder/utils.html
index 10db9a46..4a2a9318 100644
--- a/docs/_modules/pyKVFinder/utils.html
+++ b/docs/_modules/pyKVFinder/utils.html
@@ -3,7 +3,7 @@
- pyKVFinder.utils — pyKVFinder 0.6.0 documentation
+ pyKVFinder.utils — pyKVFinder 0.6.7 documentation
@@ -128,7 +128,7 @@ Source code for pyKVFinder.utils