1515)
1616
1717from CodeEntropy .config .logging_config import LoggingConfig
18- from CodeEntropy .mda_universe_operations import UniverseOperations
1918
2019logger = logging .getLogger (__name__ )
2120console = LoggingConfig .get_console ()
@@ -36,6 +35,7 @@ def __init__(
3635 level_manager ,
3736 group_molecules ,
3837 dihedral_analysis ,
38+ universe_operations ,
3939 ):
4040 """
4141 Initializes the EntropyManager with required components.
@@ -56,6 +56,7 @@ def __init__(
5656 self ._level_manager = level_manager
5757 self ._group_molecules = group_molecules
5858 self ._dihedral_analysis = dihedral_analysis
59+ self ._universe_operations = universe_operations
5960 self ._GAS_CONST = 8.3144598484848
6061
6162 def execute (self ):
@@ -85,6 +86,7 @@ def execute(self):
8586 self ._level_manager ,
8687 self ._group_molecules ,
8788 self ._dihedral_analysis ,
89+ self ._universe_operations ,
8890 )
8991 ce = ConformationalEntropy (
9092 self ._run_manager ,
@@ -94,6 +96,7 @@ def execute(self):
9496 self ._level_manager ,
9597 self ._group_molecules ,
9698 self ._dihedral_analysis ,
99+ self ._universe_operations ,
97100 )
98101
99102 reduced_atom , number_molecules , levels , groups = self ._initialize_molecules ()
@@ -274,7 +277,7 @@ def _compute_entropies(
274277 )
275278
276279 for group_id in groups .keys ():
277- mol = UniverseOperations .get_molecule_container (
280+ mol = self . _universe_operations .get_molecule_container (
278281 reduced_atom , groups [group_id ][0 ]
279282 )
280283
@@ -284,7 +287,7 @@ def _compute_entropies(
284287 group_residue_count = len (groups [group_id ])
285288 group_atom_count = 0
286289 for mol_id in groups [group_id ]:
287- each_mol = UniverseOperations .get_molecule_container (
290+ each_mol = self . _universe_operations .get_molecule_container (
288291 reduced_atom , mol_id
289292 )
290293 group_atom_count += len (each_mol .atoms )
@@ -398,7 +401,7 @@ def _get_reduced_universe(self):
398401 # Otherwise create a new (smaller) universe based on the selection
399402 u = self ._universe
400403 selection_string = self ._args .selection_string
401- reduced = UniverseOperations .new_U_select_atom (u , selection_string )
404+ reduced = self . _universe_operations .new_U_select_atom (u , selection_string )
402405 name = f"{ len (reduced .trajectory )} _frame_dump_atom_selection"
403406 self ._run_manager .write_universe (reduced , name )
404407
@@ -810,6 +813,7 @@ def __init__(
810813 level_manager ,
811814 group_molecules ,
812815 dihedral_analysis ,
816+ universe_operations ,
813817 ):
814818 """
815819 Initializes the VibrationalEntropy manager with all required components and
@@ -823,6 +827,7 @@ def __init__(
823827 level_manager ,
824828 group_molecules ,
825829 dihedral_analysis ,
830+ universe_operations ,
826831 )
827832 self ._PLANCK_CONST = 6.62607004081818e-34
828833
@@ -958,6 +963,7 @@ def __init__(
958963 level_manager ,
959964 group_molecules ,
960965 dihedral_analysis ,
966+ universe_operations ,
961967 ):
962968 """
963969 Initializes the ConformationalEntropy manager with all required components and
@@ -971,6 +977,7 @@ def __init__(
971977 level_manager ,
972978 group_molecules ,
973979 dihedral_analysis ,
980+ universe_operations ,
974981 )
975982
976983 def conformational_entropy_calculation (self , states ):
@@ -1028,6 +1035,7 @@ def __init__(
10281035 level_manager ,
10291036 group_molecules ,
10301037 dihedral_analysis ,
1038+ universe_operations ,
10311039 ):
10321040 """
10331041 Initializes the OrientationalEntropy manager with all required components and
@@ -1041,6 +1049,7 @@ def __init__(
10411049 level_manager ,
10421050 group_molecules ,
10431051 dihedral_analysis ,
1052+ universe_operations ,
10441053 )
10451054
10461055 def orientational_entropy_calculation (self , neighbours_dict ):
0 commit comments