From 22d453ff3c4b5ee1fc79f413890705cd55214755 Mon Sep 17 00:00:00 2001 From: Saurabh Mogre Date: Tue, 28 May 2024 15:02:33 -0700 Subject: [PATCH] remove unused attributes from analysis class --- cellpack/autopack/Analysis.py | 23 +---------------------- cellpack/bin/pack.py | 3 --- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/cellpack/autopack/Analysis.py b/cellpack/autopack/Analysis.py index 0b5b22bf..363ddd96 100644 --- a/cellpack/autopack/Analysis.py +++ b/cellpack/autopack/Analysis.py @@ -17,7 +17,6 @@ from mdutils.mdutils import MdUtils import cellpack.autopack as autopack -from cellpack.autopack.GeometryTools import GeometryTools from cellpack.autopack.ldSequence import halton from cellpack.autopack.plotly_result import PlotlyAnalysis from cellpack.autopack.utils import check_paired_key, get_paired_key, get_seed_list @@ -29,29 +28,13 @@ class Analysis: def __init__( self, env=None, - viewer=None, - result_file=None, packing_results_path=None, output_path=None, ): self.env = None - self.smallest = 99999.0 - self.largest = 0.0 if env: self.env = env - self.smallest = env.smallestProteinSize - self.largest = env.largestProteinSize - self.afviewer = viewer - self.helper = None - if viewer: - self.helper = self.afviewer.vi - self.result_file = result_file self.center = [0, 0, 0] - self.bbox = [[0, 0, 0], [1, 1, 1]] - self.g = GeometryTools() - self.g.Resolution = 1.0 # or grid step? - self.current_pos = None - self.current_distance = None self.plotly = PlotlyAnalysis() if packing_results_path is not None: @@ -995,11 +978,7 @@ def pack_one_seed( """ seed = int(seed_list[seed_index]) seed_basename = self.env.add_seed_number_to_base_name(seed) - # Clear - if self.afviewer: - self.afviewer.clearFill("Test_Spheres2D") - else: - self.env.reset() + self.env.reset() self.env.saveResult = True numpy.random.seed(seed) self.build_grid() diff --git a/cellpack/bin/pack.py b/cellpack/bin/pack.py index b1f7423e..80d052c8 100644 --- a/cellpack/bin/pack.py +++ b/cellpack/bin/pack.py @@ -43,15 +43,12 @@ def pack(recipe, config_path=None, analysis_config_path=None): env = Environment(config=packing_config_data, recipe=recipe_data) env.helper = helper - afviewer = None if ( packing_config_data["save_analyze_result"] or packing_config_data["number_of_packings"] > 1 ): analyze = Analysis( env=env, - viewer=afviewer, - result_file=None, ) log.info(f"saving to {env.out_folder}")