diff --git a/deeprank2/query.py b/deeprank2/query.py index 03d2c48b2..341d348a0 100644 --- a/deeprank2/query.py +++ b/deeprank2/query.py @@ -49,9 +49,9 @@ class Query: Note that this does not limit the structure to residues from this/these chain(s). pssm_paths (dict[str, str]): the name of the chain(s) (key) and path to the pssm file(s) (value). targets (dict[str, float]) = Name(s) (key) and target value(s) (value) associated with this query. - interaction_radius (float | None): all residues within this radius from the variant residue or interacting interfaces + influence_radius (float | None): all residues within this radius from the variant residue or interacting interfaces will be included in the graph, irrespective of the chain they are on. - max_edge_distance (float | None): the maximum distance between two nodes to generate an edge connecting them. + max_edge_length (float | None): the maximum distance between two nodes to generate an edge connecting them. suppress_pssm_errors (bool): Whether or not to suppress the error raised if the .pssm files do not match the .pdb files. If True, a warning is returned instead. """ @@ -61,8 +61,8 @@ class Query: chain_ids: list[str] | str pssm_paths: dict[str, str] = field(default_factory=dict) targets: dict[str, float] = field(default_factory=dict) - interaction_radius: float | None = None - max_edge_distance: float | None = None + influence_radius: float | None = None + max_edge_length: float | None = None suppress_pssm_errors: bool = False def __post_init__(self): @@ -70,11 +70,11 @@ def __post_init__(self): self.variant = None # not used for PPI, overwritten for SRV if self.resolution == 'residue': - self.max_edge_distance = 10 if not self.max_edge_distance else self.max_edge_distance - self.interaction_radius = 10 if not self.interaction_radius else self.interaction_radius + self.max_edge_length = 10 if not self.max_edge_length else self.max_edge_length + self.influence_radius = 10 if not self.influence_radius else self.influence_radius elif self.resolution == 'atom': - self.max_edge_distance = 4.5 if not self.max_edge_distance else self.max_edge_distance - self.interaction_radius = 4.5 if not self.interaction_radius else self.interaction_radius + self.max_edge_length = 4.5 if not self.max_edge_length else self.max_edge_length + self.influence_radius = 4.5 if not self.influence_radius else self.influence_radius else: raise ValueError(f"Invalid resolution given ({self.resolution}). Must be one of {VALID_RESOLUTIONS}") @@ -228,9 +228,9 @@ class SingleResidueVariantQuery(Query): Note that this does not limit the structure to residues from this chain. pssm_paths (dict[str, str]): the name of the chain(s) (key) and path to the pssm file(s) (value). targets (dict[str, float]) = Name(s) (key) and target value(s) (value) associated with this query. - interaction_radius (float | None): all residues within this radius from the variant residue + influence_radius (float | None): all residues within this radius from the variant residue will be included in the graph, irrespective of the chain they are on. - max_edge_distance (float | None): the maximum distance between two nodes to generate an edge connecting them. + max_edge_length (float | None): the maximum distance between two nodes to generate an edge connecting them. suppress_pssm_errors (bool): Whether or not to suppress the error raised if the .pssm files do not match the .pdb files. If True, a warning is returned instead. @@ -294,11 +294,11 @@ def _build_helper(self) -> Graph: f"Residue not found in {self.pdb_path}: {self.variant_chain_id} {self.residue_id}" ) self.variant = SingleResidueVariant(variant_residue, self.variant_amino_acid) - residues = get_surrounding_residues(structure, variant_residue, self.interaction_radius) + residues = get_surrounding_residues(structure, variant_residue, self.influence_radius) # build the graph if self.resolution == 'residue': - graph = build_residue_graph(residues, self.get_query_id(), self.max_edge_distance) + graph = build_residue_graph(residues, self.get_query_id(), self.max_edge_length) elif self.resolution == 'atom': residues.append(variant_residue) atoms = set([]) @@ -308,7 +308,7 @@ def _build_helper(self) -> Graph: atoms.add(atom) atoms = list(atoms) - graph = build_atomic_graph(atoms, self.get_query_id(), self.max_edge_distance) + graph = build_atomic_graph(atoms, self.get_query_id(), self.max_edge_length) else: raise NotImplementedError(f"No function exists to build graphs with resolution of {self.resolution}.") @@ -328,9 +328,9 @@ class ProteinProteinInterfaceQuery(Query): Note that this does not limit the structure to residues from these chains. pssm_paths (dict[str, str]): the name of the chain(s) (key) and path to the pssm file(s) (value). targets (dict[str, float]) = Name(s) (key) and target value(s) (value) associated with this query. - interaction_radius (float | None): all residues within this radius from the interacting interfaces + influence_radius (float | None): all residues within this radius from the interacting interface will be included in the graph, irrespective of the chain they are on. - max_edge_distance (float | None): the maximum distance between two nodes to generate an edge connecting them. + max_edge_length (float | None): the maximum distance between two nodes to generate an edge connecting them. suppress_pssm_errors (bool): Whether or not to suppress the error raised if the .pssm files do not match the .pdb files. If True, a warning is returned instead. """ @@ -360,17 +360,17 @@ def _build_helper(self) -> Graph: contact_atoms = get_contact_atoms( self.pdb_path, self.chain_ids, - self.interaction_radius + self.influence_radius ) if len(contact_atoms) == 0: raise ValueError("no contact atoms found") # build the graph if self.resolution == 'atom': - graph = build_atomic_graph(contact_atoms, self.get_query_id(), self.max_edge_distance) + graph = build_atomic_graph(contact_atoms, self.get_query_id(), self.max_edge_length) elif self.resolution == 'residue': residues_selected = list({atom.residue for atom in contact_atoms}) - graph = build_residue_graph(residues_selected, self.get_query_id(), self.max_edge_distance) + graph = build_residue_graph(residues_selected, self.get_query_id(), self.max_edge_length) graph.center = np.mean([atom.position for atom in contact_atoms], axis=0) structure = contact_atoms[0].residue.chain.model diff --git a/deeprank2/utils/buildgraph.py b/deeprank2/utils/buildgraph.py index 88f4f7124..56d873e38 100644 --- a/deeprank2/utils/buildgraph.py +++ b/deeprank2/utils/buildgraph.py @@ -155,14 +155,14 @@ def get_structure(pdb, id_: str) -> PDBStructure: def get_contact_atoms( # pylint: disable=too-many-locals pdb_path: str, chain_ids: list[str], - interaction_radius: float + influence_radius: float ) -> list[Atom]: """Gets the contact atoms from pdb2sql and wraps them in python objects.""" interface = get_interface(pdb_path) try: atom_indexes = interface.get_contact_atoms( - cutoff=interaction_radius, + cutoff=influence_radius, chain1=chain_ids[0], chain2=chain_ids[1], ) @@ -208,7 +208,7 @@ def get_residue_contact_pairs( # pylint: disable=too-many-locals structure: PDBStructure, chain_id1: str, chain_id2: str, - interaction_radius: float, + influence_radius: float, ) -> list[Pair]: """Find all residue pairs that may influence each other. @@ -217,7 +217,7 @@ def get_residue_contact_pairs( # pylint: disable=too-many-locals structure (:class:`PDBStructure`): From which to take the residues. chain_id1 (str): First protein chain identifier. chain_id2 (str): Second protein chain identifier. - interaction_radius (float): Maximum distance between residues to consider them as interacting. + influence_radius (float): Maximum distance between residues to consider them as interacting. Returns: list[Pair]: The pairs of contacting residues. @@ -227,7 +227,7 @@ def get_residue_contact_pairs( # pylint: disable=too-many-locals interface = get_interface(pdb_path) try: contact_residues = interface.get_contact_residues( - cutoff=interaction_radius, + cutoff=influence_radius, chain1=chain_id1, chain2=chain_id2, return_contact_pairs=True, diff --git a/deeprank2/utils/graph.py b/deeprank2/utils/graph.py index 174eeb41c..4ab0546e1 100644 --- a/deeprank2/utils/graph.py +++ b/deeprank2/utils/graph.py @@ -320,7 +320,7 @@ def get_all_chains(self) -> list[str]: def build_atomic_graph( # pylint: disable=too-many-locals - atoms: list[Atom], graph_id: str, max_edge_distance: float + atoms: list[Atom], graph_id: str, max_edge_length: float ) -> Graph: """Builds a graph, using the atoms as nodes. @@ -332,7 +332,7 @@ def build_atomic_graph( # pylint: disable=too-many-locals positions[atom_index] = atom.position distances = distance_matrix(positions, positions, p=2) - neighbours = distances < max_edge_distance + neighbours = distances < max_edge_length graph = Graph(graph_id) for atom1_index, atom2_index in np.transpose(np.nonzero(neighbours)): @@ -355,7 +355,7 @@ def build_atomic_graph( # pylint: disable=too-many-locals def build_residue_graph( # pylint: disable=too-many-locals - residues: list[Residue], graph_id: str, max_edge_distance: float + residues: list[Residue], graph_id: str, max_edge_length: float ) -> Graph: """Builds a graph, using the residues as nodes. @@ -381,7 +381,7 @@ def build_residue_graph( # pylint: disable=too-many-locals distances = distance_matrix(positions, positions, p=2) # determine which atoms are close enough - neighbours = distances < max_edge_distance + neighbours = distances < max_edge_length atom_index_pairs = np.transpose(np.nonzero(neighbours)) diff --git a/tests/data/hdf5/_generate_testdata.ipynb b/tests/data/hdf5/_generate_testdata.ipynb index 50e07f156..617b4a8f1 100644 --- a/tests/data/hdf5/_generate_testdata.ipynb +++ b/tests/data/hdf5/_generate_testdata.ipynb @@ -102,8 +102,8 @@ "models_folder_name = 'exp_nmers_all_HLA_quantitative'\n", "data = 'pMHCI'\n", "resolution = 'residue' # either 'residue' or 'atom'\n", - "interaction_radius = 15 # max distance in Å between two interacting residues/atoms of two proteins\n", - "max_edge_distance = 15 # max distance in Å between to create an edge\n", + "influence_radius = 15 # max distance in Å between two interacting residues/atoms of two proteins\n", + "max_edge_length = 15 # max distance in Å between to create an edge\n", "\n", "csv_file_path = f'{project_folder}data/external/processed/I/{csv_file_name}'\n", "models_folder_path = f'{project_folder}data/{data}/features_input_folder/{models_folder_name}'\n", @@ -131,8 +131,8 @@ " pdb_path = pdb_files[i],\n", " resolution = \"residue\",\n", " chain_ids = [\"M\", \"P\"],\n", - " interaction_radius = interaction_radius,\n", - " max_edge_distance = max_edge_distance,\n", + " influence_radius = influence_radius,\n", + " max_edge_length = max_edge_length,\n", " targets = {\n", " 'binary': int(float(bas[i]) <= 500), # binary target value\n", " 'BA': bas[i], # continuous target value\n", diff --git a/tests/features/__init__.py b/tests/features/__init__.py index ea7cab7a6..eace0fbaf 100644 --- a/tests/features/__init__.py +++ b/tests/features/__init__.py @@ -26,8 +26,8 @@ def _get_residue(chain: Chain, number: int) -> Residue: def build_testgraph( # pylint: disable=too-many-locals, too-many-arguments # noqa:MC0001 pdb_path: str, detail: Literal['atomic', 'residue'], - interaction_radius: float, - max_edge_distance: float, + influence_radius: float, + max_edge_length: float, central_res: int | None = None, variant: AminoAcid |None = None, chain_ids: str | tuple[str, str] | None = None, @@ -38,8 +38,8 @@ def build_testgraph( # pylint: disable=too-many-locals, too-many-arguments # noq Args: pdb_path (str): Path of pdb file. detail (Literal['atomic', 'residue']): Level of detail. - interaction_radius (float): max distance to include in graph. - max_edge_distance (float): max distance to create an edge. + influence_radius (float): max distance to include in graph. + max_edge_length (float): max distance to create an edge. central_res (int | None, optional): Residue to center a single-chain graph around. Use None to create a 2-chain graph, or any value for a single-chain graph Defaults to None. @@ -71,7 +71,7 @@ def build_testgraph( # pylint: disable=too-many-locals, too-many-arguments # noq for residue1, residue2 in get_residue_contact_pairs( pdb_path, structure, chains[0], chains[1], - interaction_radius + influence_radius ): if detail == 'residue': nodes.add(residue1) @@ -84,9 +84,9 @@ def build_testgraph( # pylint: disable=too-many-locals, too-many-arguments # noq nodes.add(atom) if detail == 'residue': - return build_residue_graph(list(nodes), structure.id, max_edge_distance), None + return build_residue_graph(list(nodes), structure.id, max_edge_length), None if detail == 'atom': - return build_atomic_graph(list(nodes), structure.id, max_edge_distance), None + return build_atomic_graph(list(nodes), structure.id, max_edge_length), None raise TypeError('detail must be "atom" or "residue"') else: @@ -95,7 +95,7 @@ def build_testgraph( # pylint: disable=too-many-locals, too-many-arguments # noq else: chain = structure.get_chain(chain_ids) residue = _get_residue(chain, central_res) - surrounding_residues = list(get_surrounding_residues(structure, residue, interaction_radius)) + surrounding_residues = list(get_surrounding_residues(structure, residue, influence_radius)) try: with open(f"tests/data/pssm/{structure.id}/{structure.id}.{chain.id}.pdb.pssm", "rt", encoding="utf-8") as f: @@ -104,8 +104,8 @@ def build_testgraph( # pylint: disable=too-many-locals, too-many-arguments # noq pass if detail == 'residue': - return build_residue_graph(surrounding_residues, structure.id, max_edge_distance), SingleResidueVariant(residue, variant) + return build_residue_graph(surrounding_residues, structure.id, max_edge_length), SingleResidueVariant(residue, variant) if detail == 'atom': atoms = set(atom for residue in surrounding_residues for atom in residue.atoms) - return build_atomic_graph(list(atoms), structure.id, max_edge_distance), SingleResidueVariant(residue, variant) + return build_atomic_graph(list(atoms), structure.id, max_edge_length), SingleResidueVariant(residue, variant) raise TypeError('detail must be "atom" or "residue"') diff --git a/tests/features/test_components.py b/tests/features/test_components.py index c18f192e0..07c1c7009 100644 --- a/tests/features/test_components.py +++ b/tests/features/test_components.py @@ -12,8 +12,8 @@ def test_atom_features(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='atom', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=25, ) add_features(pdb_path, graph) @@ -26,8 +26,8 @@ def test_aminoacid_features(): graph, variant = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=25, variant=serine, ) diff --git a/tests/features/test_conservation.py b/tests/features/test_conservation.py index 9086d95ef..30923716a 100644 --- a/tests/features/test_conservation.py +++ b/tests/features/test_conservation.py @@ -13,8 +13,8 @@ def test_conservation_residue(): graph, variant = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=25, variant=alanine, ) @@ -34,8 +34,8 @@ def test_conservation_atom(): graph, variant = build_testgraph( pdb_path=pdb_path, detail='atom', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=25, variant=alanine, ) @@ -55,8 +55,8 @@ def test_no_pssm_file_error(): graph, variant = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=17, variant=alanine, ) diff --git a/tests/features/test_exposure.py b/tests/features/test_exposure.py index 56675c0ad..3807f2f30 100644 --- a/tests/features/test_exposure.py +++ b/tests/features/test_exposure.py @@ -22,8 +22,8 @@ def test_exposure_residue(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=8.5, - max_edge_distance=8.5, + influence_radius=8.5, + max_edge_length=8.5, ) add_features(pdb_path, graph) _run_assertions(graph) @@ -34,8 +34,8 @@ def test_exposure_atom(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='atom', - interaction_radius=4.5, - max_edge_distance=4.5, + influence_radius=4.5, + max_edge_length=4.5, ) add_features(pdb_path, graph) _run_assertions(graph) diff --git a/tests/features/test_irc.py b/tests/features/test_irc.py index de153b076..d1fd204f9 100644 --- a/tests/features/test_irc.py +++ b/tests/features/test_irc.py @@ -28,8 +28,8 @@ def test_irc_residue(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=8.5, - max_edge_distance=8.5, + influence_radius=8.5, + max_edge_length=8.5, ) add_features(pdb_path, graph) _run_assertions(graph) @@ -40,8 +40,8 @@ def test_irc_atom(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=4.5, - max_edge_distance=4.5, + influence_radius=4.5, + max_edge_length=4.5, ) add_features(pdb_path, graph) _run_assertions(graph) diff --git a/tests/features/test_secondary_structure.py b/tests/features/test_secondary_structure.py index a88a5e267..8dfc6cf13 100644 --- a/tests/features/test_secondary_structure.py +++ b/tests/features/test_secondary_structure.py @@ -14,8 +14,8 @@ def test_secondary_structure_residue(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, ) add_features(pdb_path, graph) @@ -61,8 +61,8 @@ def test_secondary_structure_atom(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='atom', - interaction_radius=4.5, - max_edge_distance=4.5, + influence_radius=4.5, + max_edge_length=4.5, ) add_features(pdb_path, graph) diff --git a/tests/features/test_surfacearea.py b/tests/features/test_surfacearea.py index 2b711049b..a82ef4d33 100644 --- a/tests/features/test_surfacearea.py +++ b/tests/features/test_surfacearea.py @@ -31,8 +31,8 @@ def test_bsa_residue(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=8.5, - max_edge_distance=8.5, + influence_radius=8.5, + max_edge_length=8.5, ) add_features(pdb_path, graph) @@ -46,8 +46,8 @@ def test_bsa_atom(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='atom', - interaction_radius=4.5, - max_edge_distance=4.5, + influence_radius=4.5, + max_edge_length=4.5, ) add_features(pdb_path, graph) @@ -61,8 +61,8 @@ def test_sasa_residue(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='residue', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=108, ) add_features(pdb_path, graph) @@ -86,8 +86,8 @@ def test_sasa_atom(): graph, _ = build_testgraph( pdb_path=pdb_path, detail='atom', - interaction_radius=10, - max_edge_distance=10, + influence_radius=10, + max_edge_length=10, central_res=108, ) add_features(pdb_path, graph) diff --git a/tests/test_query.py b/tests/test_query.py index b117153a1..c50fc558b 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -122,8 +122,8 @@ def test_interface_graph_atomic(): "A": "tests/data/pssm/3C8P/3C8P.A.pdb.pssm", "B": "tests/data/pssm/3C8P/3C8P.B.pdb.pssm", }, - interaction_radius=4.5, - max_edge_distance=4.5, + influence_radius=4.5, + max_edge_length=4.5, ) g = query.build([surfacearea, components, conservation, contact]) @@ -150,8 +150,8 @@ def test_variant_graph_101M(): variant_amino_acid=phenylalanine, pssm_paths={"A": "tests/data/pssm/101M/101M.A.pdb.pssm"}, targets={targets.BINARY: 0}, - interaction_radius=5.0, - max_edge_distance=5.0, + influence_radius=5.0, + max_edge_length=5.0, ) g = query.build([surfacearea, components, conservation, contact]) @@ -188,8 +188,8 @@ def test_variant_graph_1A0Z(): "D": "tests/data/pssm/1A0Z/1A0Z.B.pdb.pssm", }, targets={targets.BINARY: 1}, - interaction_radius=5.0, - max_edge_distance=5.0, + influence_radius=5.0, + max_edge_length=5.0, ) g = query.build([surfacearea, components, conservation, contact]) @@ -224,8 +224,8 @@ def test_variant_graph_9API(): "B": "tests/data/pssm/9api/9api.B.pdb.pssm", }, targets={targets.BINARY: 0}, - interaction_radius=5.0, - max_edge_distance=5.0, + influence_radius=5.0, + max_edge_length=5.0, ) g = query.build([surfacearea, components, conservation, contact]) @@ -331,7 +331,7 @@ def test_augmentation(): variant_amino_acid=phenylalanine, pssm_paths={"A": "tests/data/pssm/101M/101M.A.pdb.pssm"}, targets={targets.BINARY: 0}, - interaction_radius=3.0, + influence_radius=3.0, )) augmentation_count = 3 @@ -474,8 +474,8 @@ def test_variant_query_multiple_chains(): variant_amino_acid = cysteine, pssm_paths = {"A": "tests/data/pssm/2g98/2g98.A.pdb.pssm"}, targets = {targets.BINARY: 1}, - interaction_radius = 10.0, - max_edge_distance = 4.5, + influence_radius = 10.0, + max_edge_length = 4.5, ) # at radius 10, chain B is included in graph @@ -487,6 +487,6 @@ def test_variant_query_multiple_chains(): _ = q.build(conservation) # at radius 7, chain B is not included in graph - q.interaction_radius = 7.0 + q.influence_radius = 7.0 graph = q.build(conservation) assert 'B' not in graph.get_all_chains() diff --git a/tests/utils/test_grid.py b/tests/utils/test_grid.py index 4a75983c9..5e666f3e5 100644 --- a/tests/utils/test_grid.py +++ b/tests/utils/test_grid.py @@ -24,8 +24,8 @@ def test_grid_orientation(): pdb_path="tests/data/pdb/1ak4/1ak4.pdb", resolution=resolution, chain_ids=['C', 'D'], - interaction_radius=8.5, - max_edge_distance=8.5, + influence_radius=8.5, + max_edge_length=8.5, ) graph = query.build([]) diff --git a/tutorials/data_generation_ppi.ipynb b/tutorials/data_generation_ppi.ipynb index f73800d57..1dcc41972 100644 --- a/tutorials/data_generation_ppi.ipynb +++ b/tutorials/data_generation_ppi.ipynb @@ -184,8 +184,8 @@ "source": [ "queries = QueryCollection()\n", "\n", - "interaction_radius = 8 # max distance in Å between two interacting residues/atoms of two proteins\n", - "max_edge_distance = 8\n", + "influence_radius = 8 # max distance in Å between two interacting residues/atoms of two proteins\n", + "max_edge_length = 8\n", "\n", "print(f'Adding {len(pdb_files)} queries to the query collection ...')\n", "count = 0\n", @@ -195,8 +195,8 @@ "\t\t\tpdb_path = pdb_files[i],\n", "\t\t\tresolution = \"residue\",\n", "\t\t\tchain_ids = [\"M\", \"P\"],\n", - "\t\t\tinteraction_radius = interaction_radius,\n", - "\t\t\tmax_edge_distance = max_edge_distance,\n", + "\t\t\tinfluence_radius = influence_radius,\n", + "\t\t\tmax_edge_length = max_edge_length,\n", "\t\t\ttargets = {\n", "\t\t\t\t'binary': int(float(bas[i]) <= 500), # binary target value\n", "\t\t\t\t'BA': bas[i], # continuous target value\n", @@ -419,8 +419,8 @@ "source": [ "queries = QueryCollection()\n", "\n", - "interaction_radius = 5 # max distance in Å between two interacting residues/atoms of two proteins\n", - "max_edge_distance = 5\n", + "influence_radius = 5 # max distance in Å between two interacting residues/atoms of two proteins\n", + "max_edge_length = 5\n", "\n", "print(f'Adding {len(pdb_files)} queries to the query collection ...')\n", "count = 0\n", @@ -430,8 +430,8 @@ "\t\t\tpdb_path = pdb_files[i],\n", "\t\t\tresolution = \"atom\",\n", "\t\t\tchain_ids = [\"M\",\"P\"],\n", - "\t\t\tinteraction_radius = interaction_radius,\n", - "\t\t\tmax_edge_distance = max_edge_distance,\n", + "\t\t\tinfluence_radius = influence_radius,\n", + "\t\t\tmax_edge_length = max_edge_length,\n", "\t\t\ttargets = {\n", "\t\t\t\t'binary': int(float(bas[i]) <= 500), # binary target value\n", "\t\t\t\t'BA': bas[i], # continuous target value\n", diff --git a/tutorials/data_generation_srv.ipynb b/tutorials/data_generation_srv.ipynb index 423e8a0c4..2e7be5c8d 100644 --- a/tutorials/data_generation_srv.ipynb +++ b/tutorials/data_generation_srv.ipynb @@ -208,8 +208,8 @@ "source": [ "queries = QueryCollection()\n", "\n", - "interaction_radius = 10.0 # radius to select the local neighborhood around the SRV\n", - "max_edge_distance = 4.5 # ??\n", + "influence_radius = 10.0 # radius to select the local neighborhood around the SRV\n", + "max_edge_length = 4.5 # ??\n", "\n", "print(f'Adding {len(pdb_files)} queries to the query collection ...')\n", "count = 0\n", @@ -223,8 +223,8 @@ "\t\twildtype_amino_acid = aa_dict[res_wildtypes[i]],\n", "\t\tvariant_amino_acid = aa_dict[res_variants[i]],\n", "\t\ttargets = {'binary': targets[i]},\n", - "\t\tinteraction_radius = interaction_radius,\n", - "\t\tmax_edge_distance = max_edge_distance,\n", + "\t\tinfluence_radius = influence_radius,\n", + "\t\tmax_edge_length = max_edge_length,\n", "\t\t))\n", "\tcount +=1\n", "\tif count % 20 == 0:\n", @@ -452,8 +452,8 @@ "source": [ "queries = QueryCollection()\n", "\n", - "interaction_radius = 10.0 # radius to select the local neighborhood around the SRV\n", - "max_edge_distance = 4.5 # ??\n", + "influence_radius = 10.0 # radius to select the local neighborhood around the SRV\n", + "max_edge_length = 4.5 # ??\n", "\n", "print(f'Adding {len(pdb_files)} queries to the query collection ...')\n", "count = 0\n", @@ -467,8 +467,8 @@ "\t\twildtype_amino_acid = aa_dict[res_wildtypes[i]],\n", "\t\tvariant_amino_acid = aa_dict[res_variants[i]],\n", "\t\ttargets = {'binary': targets[i]},\n", - "\t\tinteraction_radius = interaction_radius,\n", - "\t\tmax_edge_distance = max_edge_distance,\n", + "\t\tinfluence_radius = influence_radius,\n", + "\t\tmax_edge_length = max_edge_length,\n", "\t\t))\n", "\tcount +=1\n", "\tif count % 20 == 0:\n",