### Version Option Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Example of using the --version flag to display the pyKVFinder version. ```bash $ pyKVFinder --version ``` -------------------------------- ### Help Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Examples of using the -h or --help flags to display the help message. ```bash $ pyKVFinder -h ``` ```bash $ pyKVFinder --help ``` -------------------------------- ### Output Directory Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Examples of using the -O or --output_directory flags to specify the output directory. ```bash $ pyKVFinder (<.pdb> | <.xyz>) -O ``` ```bash $ pyKVFinder (<.pdb> | <.xyz>) --output_directory ``` -------------------------------- ### Grid Spacing Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Examples of using the -s or --step flags to set the grid spacing in Angstroms. ```bash $ pyKVFinder (<.pdb> | <.xyz>) -s ``` ```bash $ pyKVFinder (<.pdb> | <.xyz>) --step ``` -------------------------------- ### Cavity Detection Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/package/tutorial/index.rst.txt Example of detecting cavities using pyKVFinder.detect and displaying the number of cavities and the cavity grid. ```python >>> ncav_la, cavities_la = pyKVFinder.detect(atomic, vertices, latomic=latomic, ligand_cutoff=ligand_cutoff) >>> ncav_la 2 >>> cavities_la array([[[-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1], ..., [-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1]], ..., [[-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1], ..., [-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1], [-1, -1, -1, ..., -1, -1, -1]]], dtype=int32) ``` -------------------------------- ### Base Name Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Examples of using the -b or --base_name flags to specify a prefix for output files. ```bash $ pyKVFinder (<.pdb> | <.xyz>) -b ``` ```bash $ pyKVFinder (<.pdb> | <.xyz>) --base_name ``` -------------------------------- ### Summary installation commands Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/pymol/index.rst.txt A consolidated set of commands for setting up the environment, installing PyMOL, pyKVFinder, and launching PyMOL. ```bash conda create -n pymol python=3.10 conda activate pymol conda install -c conda-forge -c schrodinger pymol-bundle pip install pyKVFinder pymol ``` -------------------------------- ### Depth Characterization Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Examples of using the -D or --depth flags to characterize the depth of detected cavities. ```bash $ pyKVFinder (<.pdb> | <.xyz>) -D ``` ```bash $ pyKVFinder (<.pdb> | <.xyz>) --depth ``` -------------------------------- ### Probe In Size Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/cli/index.rst.txt Examples of using the -i or --probe_in flags to set the Probe In size in Angstroms. ```bash $ pyKVFinder (<.pdb> | <.xyz>) -i ``` ```bash $ pyKVFinder (<.pdb> | <.xyz>) --probe_in ``` -------------------------------- ### Build Documentation Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/INSTRUCTIONS.rst Command to build the pyKVFinder documentation as a GitHub page. ```bash make html ``` -------------------------------- ### Example Usage Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/package/api_reference/get_vertices_from_file.html Demonstrates how to read a box configuration file and use it with pyKVFinder to get grid vertices and atomic information. ```python >>> import os >>> fn = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', 'custom-box.toml') >>> with open(fn, 'r') as f: ... print(f.read()) [box] p1 = [3.11, 7.34, 1.59] p2 = [11.51, 7.34, 1.59] p3 = [3.11, 10.74, 1.59] p4 = [3.11, 7.34, 6.19] >>> from pyKVFinder import get_vertices_from_file >>> vertices, atomic = pyKVFinder.get_vertices_from_file(fn, atomic) ``` -------------------------------- ### Example Usage Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/source/package/api_reference/get_vertices.md 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): ```python 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]]) ``` -------------------------------- ### Standard and Full Workflows with Box Configuration Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/package/tutorial/index.rst.txt Demonstrates how to run the standard and full pyKVFinder workflows using a custom box configuration file. ```python >>> pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb') >>> # Box configuration filepath >>> fn = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', 'custom-box.toml') >>> # Standard workflow >>> results = pyKVFinder.run_workflow(pdb, box=fn) >>> # Full workflow >>> results = pyKVFinder.run_workflow(pdb, box=fn, include_depth=True, include_hydropathy=True, hydrophobicity_scale='EisenbergWeiss') ``` -------------------------------- ### Get vertices from atomic data Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/package/api_reference/get_vertices.html Example of how to use the get_vertices function with atomic data read from a PDB or XYZ file. ```python from pyKVFinder import get_vertices vertices = get_vertices(atomic) print(vertices) ``` -------------------------------- ### Example Usage Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_modules/pyKVFinder/grid/geometry.html Demonstrates how to define a box configuration file and use it with pyKVFinder to get grid vertices and select atoms within the custom box. ```python import tomlkit from pyKVFinder._pyKVFinder import _filter_pdb # Check arguments types if type(fn) not in [str, pathlib.Path]: raise TypeError("`fn` must be a string or a pathlib.Path.") if type(atomic) not in [numpy.ndarray, list]: raise TypeError("`atomic` must be a list or a numpy.ndarray.") elif len(numpy.asarray(atomic).shape) != 2: raise ValueError("`atomic` has incorrect shape. It must be (n, 8).") elif numpy.asarray(atomic).shape[1] != 8: raise ValueError("`atomic` has incorrect shape. It must be (n, 8).") if type(step) not in [float, int]: raise TypeError("`step` must be a positive real number.") elif step <= 0.0: raise ValueError("`step` must be a positive real number.") if type(probe_in) not in [float, int]: raise TypeError("`probe_in` must be a non-negative real number.") elif probe_in < 0.0: raise ValueError("`probe_in` must be a non-negative real number.") if type(probe_out) not in [float, int]: raise TypeError("`probe_out` must be a non-negative real number.") elif probe_out < 0.0: raise ValueError("`probe_out` must be a non-negative real number.") ``` -------------------------------- ### Standard Workflow Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/source/package/tutorial/index.md This snippet demonstrates a standard workflow for analyzing protein data, likely involving frequency calculations. ```python >>> results.frequencies {'KAA': {'RESIDUES': {'GLU': 1, 'ILE': 1, 'LEU': 2, 'LYS': 1, 'PHE': 2, 'SER': 1, 'TRP': 1, 'TYR': 2, 'VAL': 1}, 'CLASS': {'R1': 4, 'R2': 5, 'R3': 1, 'R4': 1, 'R5': 1, 'RX': 0}}, 'KAB': {'RESIDUES': {'ALA': 2, 'ASN': 1, 'ASP': 1, 'LYS': 1, 'PHE': 2, 'TYR': 1, 'VAL': 1}, 'CLASS': {'R1': 3, 'R2': 3, 'R3': 1, 'R4': 1, 'R5': 1, 'RX': 0}}, 'KAC': {'RESIDUES': {'ALA': 1, 'ARG': 1, 'GLU': 1, 'HIS': 1, 'ILE': 1, 'PHE': 1, 'PRO': 2, 'THR': 2, 'VAL': 1}, 'CLASS': {'R1': 5, 'R2': 1, 'R3': 2, 'R4': 1, 'R5': 2, 'RX': 0}}, 'KAD': {'RESIDUES': {'ALA': 1, 'ASP': 1, 'GLN': 1, 'GLY': 2, 'PHE': 1, 'PRO': 1, 'TYR': 1}, 'CLASS': {'R1': 4, 'R2': 2, 'R3': 1, 'R4': 1, 'R5': 0, 'RX': 0}}, 'KAE': {'RESIDUES': {'ASN': 1, 'LEU': 3, 'LYS': 1, 'PHE': 1, 'VAL': 2}, 'CLASS': {'R1': 5, 'R2': 1, 'R3': 1, 'R4': 0, 'R5': 1, 'RX': 0}}, 'KAF': {'RESIDUES': {'ALA': 1, 'ASP': 1, 'GLN': 2, 'VAL': 1}, 'CLASS': {'R1': 2, 'R2': 0, 'R3': 2, 'R4': 1, 'R5': 0, 'RX': 0}}, 'KAG': {'RESIDUES': {'GLN': 1, 'GLU': 1, 'LEU': 1, 'PHE': 1, 'SER': 2, 'THR': 1}, 'CLASS': {'R1': 1, 'R2': 1, 'R3': 4, 'R4': 1, 'R5': 0, 'RX': 0}}, 'KAH': {'RESIDUES': {'ALA': 1, 'ARG': 1, 'ASN': 1, 'ASP': 2, 'GLN': 1, 'GLU': 4, 'GLY': 4, 'HIS': 1, 'LEU': 3, 'LYS': 2, 'MET': 1, 'PHE': 3, 'SER': 1, 'THR': 4, 'TYR': 1, 'VAL': 3}, 'CLASS': {'R1': 11, 'R2': 4, 'R3': 8, 'R4': 6, 'R5': 4, 'RX': 0}}, 'KAI': {'RESIDUES': {'HIS': 2, 'ILE': 1, 'PHE': 2, 'TYR': 1}, 'CLASS': {'R1': 1, 'R2': 3, 'R3': 0, 'R4': 0, 'R5': 2, 'RX': 0}}, 'KAJ': {'RESIDUES': {'ARG': 1, 'GLN': 1, 'GLU': 1, 'LEU': 1, 'LYS': 1, 'PHE': 1, 'PRO': 1}, 'CLASS': {'R1': 2, 'R2': 1, 'R3': 1, 'R4': 1, 'R5': 2, 'RX': 0}}, 'KAK': {'RESIDUES': {'ALA': 1, 'ILE': 1, 'LEU': 2, 'PHE': 1, 'TYR': 1}, 'CLASS': {'R1': 4, 'R2': 2, 'R3': 0, 'R4': 0, 'R5': 0, 'RX': 0}}, 'KAL': {'RESIDUES': {'ASN': 1, 'ASP': 1, 'GLU': 1, 'LEU': 1, 'PHE': 2, 'SER': 1, 'TYR': 1}, 'CLASS': {'R1': 1, 'R2': 3, 'R3': 2, 'R4': 2, 'R5': 0, 'RX': 0}}, 'KAM': {'RESIDUES': {'ARG': 2, 'ASN': 1, 'ASP': 1, 'GLY': 1, 'ILE': 2, 'LEU': 1, 'THR': 1}, 'CLASS': {'R1': 4, 'R2': 0, 'R3': 2, 'R4': 1, 'R5': 2, 'RX': 0}}, 'KAN': {'RESIDUES': {'ALA': 2, 'ARG': 1, 'ASP': 2, 'CYS': 1, 'GLY': 1, 'ILE': 1, 'LEU': 2, 'THR': 1, 'TYR': 1, 'VAL': 1}, 'CLASS': {'R1': 7, 'R2': 1, 'R3': 2, 'R4': 2, 'R5': 1, 'RX': 0}}, 'KAO': {'RESIDUES': {'ARG': 1, 'GLU': 1, 'THR': 2, 'TYR': 1}, 'CLASS': {'R1': 0, 'R2': 1, 'R3': 2, 'R4': 1, 'R5': 1, 'RX': 0}}, 'KAP': {'RESIDUES': {'GLY': 1, 'LEU': 1, 'LYS': 1, 'PHE': 1, 'TRP': 1, 'VAL': 1}, 'CLASS': {'R1': 3, 'R2': 2, 'R3': 0, 'R4': 0, 'R5': 1, 'RX': 0}}, 'KAQ': {'RESIDUES': {'GLU': 1, 'LEU': 2, 'LYS': 1, 'PRO': 1, 'VAL': 1}, 'CLASS': {'R1': 4, 'R2': 0, 'R3': 0, 'R4': 1, 'R5': 1, 'RX': 0}}, 'KAR': {'RESIDUES': {'ARG': 1, 'LYS': 2, 'PHE': 1, 'PRO': 1, 'VAL': 1}, 'CLASS': {'R1': 2, 'R2': 1, 'R3': 0, 'R4': 0, 'R5': 3, 'RX': 0}}} ``` -------------------------------- ### Full Workflow Execution Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/package/tutorial/index.rst.txt Demonstrates running the full cavity detection workflow with characterizations for depth and hydropathy. ```python >>> results = pyKVFinder.run_workflow(pdb, include_depth=True, include_hydropathy=True, hydrophobicity_scale='EisenbergWeiss') ``` -------------------------------- ### get_vertices function Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_modules/pyKVFinder/grid/geometry.html Gets 3D grid vertices. This function calculates the origin and axes for a 3D grid based on atomic data, probe size, and step size. It includes detailed parameter descriptions, return values, potential exceptions, and a usage example. ```python import os import pathlib import numpy [["docs"]](../../../package/api_reference/get_vertices.html#pyKVFinder.get_vertices) def get_vertices( atomic: numpy.ndarray | list[list[str | float | int]], probe_out: float | int = 4.0, step: float | int = 0.6, ) -> numpy.ndarray: """Gets 3D grid vertices. Parameters ---------- atomic : numpy.ndarray | list[list[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 : float | int, optional Probe Out size (A), by default 4.0. step : float | int, optional Grid spacing (A), by default 0.6. Returns ------- vertices : numpy.ndarray A numpy.ndarray with xyz vertices coordinates (origin, X-axis, Y-axis, Z-axis). 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` 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]]) """ # Check arguments types if type(atomic) not in [numpy.ndarray, list]: raise TypeError("`atomic` must be a list or a numpy.ndarray.") elif len(numpy.asarray(atomic).shape) != 2: raise ValueError("`atomic` has incorrect shape. It must be (n, 8).") elif numpy.asarray(atomic).shape[1] != 8: raise ValueError("`atomic` has incorrect shape. It must be (n, 8).") if type(probe_out) not in [int, float, numpy.float64]: raise TypeError("`probe_out` must be a non-negative real number.") elif probe_out < 0.0: raise ValueError("`probe_out` must be a non-negative real number.") if type(step) not in [int, float, numpy.float64]: raise TypeError("`step` must be a positive real number.") elif step <= 0.0: raise ValueError("`step` must be a positive real number.") # Convert atomic type if isinstance(atomic, list): atomic = numpy.asarray(atomic) # Extract xyzr from atomic xyzr = atomic[:, 4:].astype(numpy.float64) # Prepare vertices P1 = numpy.min(xyzr[:, 0:3], axis=0) - probe_out - step xmax, ymax, zmax = numpy.max(xyzr[:, 0:3], axis=0) + probe_out + step P2 = numpy.array([xmax, P1[1], P1[2]]) P3 = numpy.array([P1[0], ymax, P1[2]]) P4 = numpy.array([P1[0], P1[1], zmax]) # Pack vertices vertices = numpy.array([P1, P2, P3, P4]) return vertices ``` -------------------------------- ### Frequencies Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_modules/pyKVFinder/utils.html An example of the frequencies data structure. ```python frequencies = { 'KAA': [['14', 'E', 'SER'], ['15', 'E', 'VAL'], ['18', 'E', 'PHE'], ['19', 'E', 'LEU'], ['100', 'E', 'PHE'], ['152', 'E', 'LEU'], ['155', 'E', 'GLU'], ['156', 'E', 'TYR'], ['292', 'E', 'LYS'], ['302', 'E', 'TRP'], ['303', 'E', 'ILE'], ['306', 'E', 'TYR']], 'KAB': [['18', 'E', 'PHE'], ['22', 'E', 'ALA'], ['25', 'E', 'ASP'], ['26', 'E', 'PHE'], ['29', 'E', 'LYS'], ['97', 'E', 'ALA'], ['98', 'E', 'VAL'], ['99', 'E', 'ASN'], ['156', 'E', 'TYR']], 'KAC': [['141', 'E', 'PRO'], ['142', 'E', 'HIS'], ['144', 'E', 'ARG'], ['145', 'E', 'PHE'], ['148', 'E', 'ALA'], ['299', 'E', 'THR'], ['300', 'E', 'THR'], ['305', 'E', 'ILE'], ['310', 'E', 'VAL'], ['311', 'E', 'GLU'], ['313', 'E', 'PRO']], 'KAD': [['122', 'E', 'TYR'], ['124', 'E', 'ALA'], ['176', 'E', 'GLN'], ['318', 'E', 'PHE'], ['320', 'E', 'GLY'], ['321', 'E', 'PRO'], ['322', 'E', 'GLY'], ['323', 'E', 'ASP']], 'KAE': [['95', 'E', 'LEU'], ['98', 'E', 'VAL'], ['99', 'E', 'ASN'], ['100', 'E', 'PHE'], ['103', 'E', 'LEU'], ['104', 'E', 'VAL'], ['105', 'E', 'LYS'], ['106', 'E', 'LEU']], 'KAF': [['123', 'E', 'VAL'], ['124', 'E', 'ALA'], ['175', 'E', 'ASP'], ['176', 'E', 'GLN'], ['181', 'E', 'GLN']], 'KAG': [['34', 'E', 'SER'], ['37', 'E', 'THR'], ['96', 'E', 'GLN'], ['106', 'E', 'LEU'], ['107', 'E', 'GLU'], ['108', 'E', 'PHE'], ['109', 'E', 'SER']], 'KAH': [['49', 'E', 'LEU'], ['50', 'E', 'GLY'], ['51', 'E', 'THR'], ['52', 'E', 'GLY'], ['53', 'E', 'SER'], ['54', 'E', 'PHE'], ['55', 'E', 'GLY'], ['56', 'E', 'ARG'], ['57', 'E', 'VAL'], ['70', 'E', 'ALA'], ['72', 'E', 'LYS'], ['74', 'E', 'LEU'], ['84', 'E', 'GLN'], ['87', 'E', 'HIS'], ['88', 'E', 'THR'], ['91', 'E', 'GLU'], ['104', 'E', 'VAL'], ['120', 'E', 'MET'], ['121', 'E', 'GLU'], ['122', 'E', 'TYR'], ['123', 'E', 'VAL'], ['127', 'E', 'GLU'], ['166', 'E', 'ASP'], ['168', 'E', 'LYS'], ['170', 'E', 'GLU'], ['171', 'E', 'ASN'], ['173', 'E', 'LEU'], ['183', 'E', 'THR'], ['184', 'E', 'ASP'], ['186', 'E', 'GLY'], ['187', 'E', 'PHE'], ['201', 'E', 'THR'], ['327', 'E', 'PHE']], 'KAI': [['131', 'E', 'HIS'], ['138', 'E', 'PHE'], ['142', 'E', 'HIS'], ['146', 'E', 'TYR'], ['174', 'E', 'ILE'], ['314', 'E', 'PHE']], 'KAJ': [['33', 'E', 'PRO'], ['89', 'E', 'LEU'], ['92', 'E', 'LYS'], ['93', 'E', 'ARG'], ['96', 'E', 'GLN'], ['349', 'E', 'GLU'], ['350', 'E', 'PHE']], 'KAK': [['157', 'E', 'LEU'], ['162', 'E', 'LEU'], ['163', 'E', 'ILE'], ['164', 'E', 'TYR'], ['185', 'E', 'PHE'], ['188', 'E', 'ALA']], 'KAL': [['49', 'E', 'LEU'], ['127', 'E', 'GLU'], ['129', 'E', 'PHE'], ['130', 'E', 'SER'], ['326', 'E', 'ASN'], ['327', 'E', 'PHE'], ['328', 'E', 'ASP'], ['330', 'E', 'TYR']], 'KAM': [['51', 'E', 'THR'], ['55', 'E', 'GLY'], ['56', 'E', 'ARG'], ['73', 'E', 'ILE'], ['74', 'E', 'LEU'], ['75', 'E', 'ASP'], ['115', 'E', 'ASN'], ['335', 'E', 'ILE'], ['336', 'E', 'ARG']], 'KAN': [['165', 'E', 'ARG'], ['166', 'E', 'ASP'], ['167', 'E', 'LEU'], ['199', 'E', 'CYS'], ['200', 'E', 'GLY'], ['201', 'E', 'THR'], ['204', 'E', 'TYR'], ['205', 'E', 'LEU'], ['206', 'E', 'ALA'], ['209', 'E', 'ILE'], ['219', 'E', 'VAL'], ['220', 'E', 'ASP'], ['223', 'E', 'ALA']], 'KAO': [['48', 'E', 'THR'], ['51', 'E', 'THR'], ['56', 'E', 'ARG'], ['330', 'E', 'TYR'], ['331', 'E', 'GLU']], 'KAP': [['222', 'E', 'TRP'], ['238', 'E', 'PHE'], ['253', 'E', 'GLY'], ['254', 'E', 'LYS'], ['255', 'E', 'VAL'], ['273', 'E', 'LEU']], 'KAQ': [['207', 'E', 'PRO'], ['208', 'E', 'GLU'], ['211', 'E', 'LEU'], ['213', 'E', 'LYS'], ['275', 'E', 'VAL'], ['277', 'E', 'LEU']], 'KAR': [['237', 'E', 'PRO'], ['238', 'E', 'PHE'], ['249', 'E', 'LYS'], ['254', 'E', 'LYS'], ['255', 'E', 'VAL'], ['256', 'E', 'ARG']] } ``` -------------------------------- ### Help Option Examples Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/plugins/cli/index.html Examples of how to display the help message using the -h or --help flags. ```bash $ pyKVFinder \-h $ pyKVFinder \--help ``` -------------------------------- ### Install latest release Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/README.md Installs the latest release of pyKVFinder from PyPI. ```bash pip install pyKVFinder ``` -------------------------------- ### Install Python Modules Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/plugins/PyMOL-pyKVFinder-Tools/INSTALLATION.md Installs the necessary Python modules (pyKVFinder, toml, pyqt5) required for the plugin, specifically for PyMOL v3 which uses Python 3. ```bash # PyMOL v3 (python 3) $ pip3 install pyKVFinder toml pyqt5 ``` -------------------------------- ### Install developmental version Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/README.md Installs the latest developmental version of pyKVFinder from GitHub. ```bash git clone https://github.com/LBC-LNBio/pyKVFinder.git pip install -e pyKVFinder ``` -------------------------------- ### Calculate Frequencies Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_modules/pyKVFinder/utils.html Example of how to calculate residue and class frequencies for detected cavities. ```python from pyKVFinder import calculate_frequencies residues {'KAA': [['49', 'E', 'LEU'], ['50', 'E', 'GLY'], ['51', 'E', 'THR'], ['52', 'E', 'GLY'], ['53', 'E', 'SER'], ['54', 'E', 'PHE'], ['55', 'E', 'GLY'], ['56', 'E', 'ARG'], ['57', 'E', 'VAL'], ['70', 'E', 'ALA'], ['72', 'E', 'LYS'], ['74', 'E', 'LEU'], ['84', 'E', 'GLN'], ['87', 'E', 'HIS'], ['88', 'E', 'THR'], ['91', 'E', 'GLU'], ['104', 'E', 'VAL'], ['120', 'E', 'MET'], ['121', 'E', 'GLU'], ['122', 'E', 'TYR'], ['123', 'E', 'VAL'], ['127', 'E', 'GLU'], ['166', 'E', 'ASP'], ['168', 'E', 'LYS'], ['170', 'E', 'GLU'], ['171', 'E', 'ASN'], ['173', 'E', 'LEU'], ['183', 'E', 'THR'], ['184', 'E', 'ASP'], ['186', 'E', 'GLY'], ['187', 'E', 'PHE'], ['201', 'E', 'THR'], ['327', 'E', 'PHE']]} frequencies = calculate_frequencies(residues) frequencies ``` -------------------------------- ### Standard Workflow Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/package/api_reference/run_workflow.html This example demonstrates the standard workflow for cavity detection using pyKVFinder, including spatial and constitutional characterization. ```python import os import pyKVFinder pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb') results = pyKVFinder.run_workflow(pdb) print(results) print(results.cavities) print(results.surface) print(results.ncav) print(results.volume) print(results.area) print(results.residues) ``` -------------------------------- ### Loading data from target structure Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/source/package/tutorial/index.md Example of loading a PDB file using `pyKVFinder.read_pdb` and the resulting NumPy array. ```python >>> import os >>> pdb = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', '1FMO.pdb') >>> atomic = pyKVFinder.read_pdb(pdb) >>> atomic array([['13', 'E', 'GLU', ..., '-15.642', '-14.858', '1.824'], ['13', 'E', 'GLU', ..., '-14.62', '-15.897', '1.908'], ['13', 'E', 'GLU', ..., '-13.357', '-15.508', '1.908'], ..., ['350', 'E', 'PHE', ..., '18.878', '-9.885', '1.908'], ['350', 'E', 'PHE', ..., '17.624', '-9.558', '1.908'], ['350', 'E', 'PHE', ..., '19.234', '-13.442', '1.69']], dtype='>> ligand = os.path.join(os.path.dirname(pyKVFinder.__file__), 'data', 'tests', 'ADN.pdb') >>> latomic = pyKVFinder.read_pdb(ligand) >>> latomic array([['351', 'E', 'ADN', "C5'", '11.087', '9.79', '2.052', '1.66'], ['351', 'E', 'ADN', "O5'", '11.545', '8.52', '1.545', '1.69'], ['351', 'E', 'ADN', "C4'", '10.688', '9.68', '3.523', '1.66'], ['351', 'E', 'ADN', "O4'", '9.714', '10.725', '3.81', '1.69'], ['351', 'E', 'ADN', "C3'", '9.973', '8.374', '3.903', '1.66'], ['351', 'E', 'ADN', "O3'", '10.879', '7.361', '4.304', '1.69'], ['351', 'E', 'ADN', "C2'", '9.115', '8.82', '5.059', '1.66'], ['351', 'E', 'ADN', "O2'", '9.887', '9.034', '6.232', '1.69'], ['351', 'E', 'ADN', "C1'", '8.625', '10.16', '4.5', '1.66'], ['351', 'E', 'ADN', 'N1', '3.499', '10.104', '4.402', '1.97'], ['351', 'E', 'ADN', 'C2', '4.376', '10.259', '5.387', '1.66'], ['351', 'E', 'ADN', 'N3', '5.705', '10.249', '5.351', '1.97'], ['351', 'E', 'ADN', 'C4', '6.136', '10.087', '4.094', '1.66'], ['351', 'E', 'ADN', 'C5', '5.353', '9.952', '2.974', '1.66'], ['351', 'E', 'ADN', 'C6', '3.957', '9.957', '3.146', '1.66'], ['351', 'E', 'ADN', 'N6', '3.083', '9.826', '2.142', '1.97'], ['351', 'E', 'ADN', 'N7', '6.146', '9.791', '1.843', '1.97'], ['351', 'E', 'ADN', 'C8', '7.374', '9.872', '2.291', '1.66'], ['351', 'E', 'ADN', 'N9', '7.444', '10.056', '3.646', '1.97']], dtype=' | <.xyz>) -L (<.pdb> | <.xyz>) ``` ```bash pyKVFinder (<.pdb> | <.xyz>) --ligand (<.pdb> | <.xyz>) ``` ```bash pyKVFinder (<.pdb> | <.xyz>) -L (<.pdb> | <.xyz>) --ligand_cutoff ``` -------------------------------- ### Install PyMOL v3.0 Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/plugins/pymol/index.rst.txt Command to install PyMOL version 3.0 using conda. ```bash conda install -c conda-forge -c schrodinger pymol-bundle ``` -------------------------------- ### Cavity Detection Parameters Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/package/tutorial/index.html Example of setting default parameters for cavity detection. ```python step = 0.6 probe_in = 1.4 probe_out = 4.0 removal_distance = 2.4 volume_cutoff = 5.0 surface = 'SES' ``` -------------------------------- ### Constitutional Characterization Example Source: https://github.com/lbc-lnbio/pykvfinder/blob/master/docs/_sources/package/tutorial/index.rst.txt Example of performing constitutional characterization using pyKVFinder.constitutional to identify interface residues. ```python >>> # Default ignore backbone contacts flag (ignore_backbone): False >>> ignore_backbone = False >>> residues = pyKVFinder.constitutional(cavities, atomic, vertices, step=step, probe_in=probe_in, ignore_backbone=ignore_backbone) >>> residues ```