From a465233d917f05cc9dce0f9fb1acd04a60df0c05 Mon Sep 17 00:00:00 2001 From: clami66 Date: Wed, 15 May 2024 18:29:01 +0200 Subject: [PATCH] lazy loading --- src/DockQ/DockQ.py | 5 ++--- src/DockQ/parsers.py | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/DockQ/DockQ.py b/src/DockQ/DockQ.py index 71a8aba..5bfa62b 100755 --- a/src/DockQ/DockQ.py +++ b/src/DockQ/DockQ.py @@ -11,10 +11,8 @@ import numpy as np from Bio import Align -from Bio.SeqUtils import seq1 from Bio.SVDSuperimposer import SVDSuperimposer from parallelbar import progress_map -import networkx as nx # fallback in case the cython version doesn't work, though it will be slower try: @@ -172,7 +170,7 @@ def calc_sym_corrected_lrmsd( alignments, low_memory=False, ): - + import networkx as nx is_het_sample_0 = bool(sample_chains[0].is_het) is_het_sample_1 = bool(sample_chains[1].is_het) @@ -596,6 +594,7 @@ def run_on_chains( def create_graph(atom_list, threshold=2.0): + import networkx as nx G = nx.Graph() for i, atom_i in enumerate(atom_list): for j, atom_j in enumerate(atom_list): diff --git a/src/DockQ/parsers.py b/src/DockQ/parsers.py index 874cb6d..6afa607 100644 --- a/src/DockQ/parsers.py +++ b/src/DockQ/parsers.py @@ -2,7 +2,6 @@ import numpy as np import Bio from Bio.PDB.MMCIF2Dict import MMCIF2Dict -from Bio.PDB.StructureBuilder import StructureBuilder from Bio.PDB.PDBExceptions import PDBConstructionWarning from Bio.PDB.PDBExceptions import PDBConstructionException from Bio.PDB.PDBParser import as_handle