src.serena.utilities.local_minima_variation

File to hold the local minima variation code

 1"""
 2File to hold the local minima variation code
 3"""
 4import attrs
 5from typing import List
 6from dataclasses import dataclass
 7
 8from serena.utilities.ensemble_groups import MultipleEnsembleGroups, SingleEnsembleGroup
 9from serena.utilities.ensemble_structures import Sara2SecondaryStructure
10from serena.utilities.ensemble_variation import EVToken, EV, EVResult
11from serena.utilities.thread_manager import EV_ThreadProcessor
12
13@dataclass
14class ComparisonLMV():
15    """
16    Holds the LMV's for the comparison structure
17    algorithm
18    """
19    lmv_comp:EV = EV()
20    lmv_mfe:EV = EV()
21    lmv_rel:EV = EV()
22
23@attrs.define
24class ComparisonLMVResponse():
25    """
26    Holds the LMV's responses for the comparison structure
27    algorithm
28    """
29    lmv_comps:List[ComparisonLMV] = []
30
31class LocalMinimaVariation():
32    """
33    Local Minima Variation main algorithm access point. 
34    This is teh base for finding the many flavors of LMV
35    """
36    def __init__(self) -> None:
37        pass
38
39    def get_multi_group_lmv_single_ref(self, ensemble: MultipleEnsembleGroups, reference_structure:Sara2SecondaryStructure):#pylint: disable=line-too-long
40        """
41        Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference
42        """
43        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=ensemble.raw_groups,
44                                                            comp_structure=reference_structure)
45        result_thread_lmv:EVToken = lmv_thread.run_EV()
46        lmv_results: EVResult = result_thread_lmv.ev_results
47        return lmv_results
48
49    def get_single_group_lmv_single_ref(self, ensemble_group: SingleEnsembleGroup, reference_structure:Sara2SecondaryStructure):#pylint: disable=line-too-long
50        """
51        Return the lmv for a provided SingleEnsembleGroup with seconfary structure as reference
52        """
53        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=[ensemble_group.group],
54                                                              comp_structure=reference_structure)
55        result_thread_lmv:EVToken = lmv_thread.run_EV()
56        lmv_results: EVResult = result_thread_lmv.ev_results
57        return lmv_results
58    
59    def get_multi_group_lmv_list_ref(self, ensemble: MultipleEnsembleGroups, reference_list:List[Sara2SecondaryStructure]):#pylint: disable=line-too-long
60        """
61        Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference
62        """
63        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=ensemble.raw_groups,
64                                                            comp_struct_list_option=reference_list)
65        result_thread_lmv:EVToken = lmv_thread.run_EV()
66        lmv_results: EVResult = result_thread_lmv.ev_results
67        return lmv_results
@dataclass
class ComparisonLMV:
14@dataclass
15class ComparisonLMV():
16    """
17    Holds the LMV's for the comparison structure
18    algorithm
19    """
20    lmv_comp:EV = EV()
21    lmv_mfe:EV = EV()
22    lmv_rel:EV = EV()

Holds the LMV's for the comparison structure algorithm

ComparisonLMV( lmv_comp: serena.utilities.ensemble_variation.EV = EV(ev_normalized=-1, ev_threshold_norm=-1, ev_structure=-1), lmv_mfe: serena.utilities.ensemble_variation.EV = EV(ev_normalized=-1, ev_threshold_norm=-1, ev_structure=-1), lmv_rel: serena.utilities.ensemble_variation.EV = EV(ev_normalized=-1, ev_threshold_norm=-1, ev_structure=-1))
lmv_comp: serena.utilities.ensemble_variation.EV = EV(ev_normalized=-1, ev_threshold_norm=-1, ev_structure=-1)
lmv_mfe: serena.utilities.ensemble_variation.EV = EV(ev_normalized=-1, ev_threshold_norm=-1, ev_structure=-1)
lmv_rel: serena.utilities.ensemble_variation.EV = EV(ev_normalized=-1, ev_threshold_norm=-1, ev_structure=-1)
@attrs.define
class ComparisonLMVResponse:
24@attrs.define
25class ComparisonLMVResponse():
26    """
27    Holds the LMV's responses for the comparison structure
28    algorithm
29    """
30    lmv_comps:List[ComparisonLMV] = []

Holds the LMV's responses for the comparison structure algorithm

ComparisonLMVResponse( lmv_comps: List[src.serena.utilities.local_minima_variation.ComparisonLMV] = [])
2def __init__(self, lmv_comps=attr_dict['lmv_comps'].default):
3    self.lmv_comps = lmv_comps

Method generated by attrs for class ComparisonLMVResponse.

class LocalMinimaVariation:
32class LocalMinimaVariation():
33    """
34    Local Minima Variation main algorithm access point. 
35    This is teh base for finding the many flavors of LMV
36    """
37    def __init__(self) -> None:
38        pass
39
40    def get_multi_group_lmv_single_ref(self, ensemble: MultipleEnsembleGroups, reference_structure:Sara2SecondaryStructure):#pylint: disable=line-too-long
41        """
42        Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference
43        """
44        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=ensemble.raw_groups,
45                                                            comp_structure=reference_structure)
46        result_thread_lmv:EVToken = lmv_thread.run_EV()
47        lmv_results: EVResult = result_thread_lmv.ev_results
48        return lmv_results
49
50    def get_single_group_lmv_single_ref(self, ensemble_group: SingleEnsembleGroup, reference_structure:Sara2SecondaryStructure):#pylint: disable=line-too-long
51        """
52        Return the lmv for a provided SingleEnsembleGroup with seconfary structure as reference
53        """
54        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=[ensemble_group.group],
55                                                              comp_structure=reference_structure)
56        result_thread_lmv:EVToken = lmv_thread.run_EV()
57        lmv_results: EVResult = result_thread_lmv.ev_results
58        return lmv_results
59    
60    def get_multi_group_lmv_list_ref(self, ensemble: MultipleEnsembleGroups, reference_list:List[Sara2SecondaryStructure]):#pylint: disable=line-too-long
61        """
62        Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference
63        """
64        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=ensemble.raw_groups,
65                                                            comp_struct_list_option=reference_list)
66        result_thread_lmv:EVToken = lmv_thread.run_EV()
67        lmv_results: EVResult = result_thread_lmv.ev_results
68        return lmv_results

Local Minima Variation main algorithm access point. This is teh base for finding the many flavors of LMV

def get_multi_group_lmv_single_ref( self, ensemble: serena.utilities.ensemble_groups.MultipleEnsembleGroups, reference_structure: serena.utilities.ensemble_structures.Sara2SecondaryStructure):
40    def get_multi_group_lmv_single_ref(self, ensemble: MultipleEnsembleGroups, reference_structure:Sara2SecondaryStructure):#pylint: disable=line-too-long
41        """
42        Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference
43        """
44        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=ensemble.raw_groups,
45                                                            comp_structure=reference_structure)
46        result_thread_lmv:EVToken = lmv_thread.run_EV()
47        lmv_results: EVResult = result_thread_lmv.ev_results
48        return lmv_results

Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference

def get_single_group_lmv_single_ref( self, ensemble_group: serena.utilities.ensemble_groups.SingleEnsembleGroup, reference_structure: serena.utilities.ensemble_structures.Sara2SecondaryStructure):
50    def get_single_group_lmv_single_ref(self, ensemble_group: SingleEnsembleGroup, reference_structure:Sara2SecondaryStructure):#pylint: disable=line-too-long
51        """
52        Return the lmv for a provided SingleEnsembleGroup with seconfary structure as reference
53        """
54        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=[ensemble_group.group],
55                                                              comp_structure=reference_structure)
56        result_thread_lmv:EVToken = lmv_thread.run_EV()
57        lmv_results: EVResult = result_thread_lmv.ev_results
58        return lmv_results

Return the lmv for a provided SingleEnsembleGroup with seconfary structure as reference

def get_multi_group_lmv_list_ref( self, ensemble: serena.utilities.ensemble_groups.MultipleEnsembleGroups, reference_list: List[serena.utilities.ensemble_structures.Sara2SecondaryStructure]):
60    def get_multi_group_lmv_list_ref(self, ensemble: MultipleEnsembleGroups, reference_list:List[Sara2SecondaryStructure]):#pylint: disable=line-too-long
61        """
62        Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference
63        """
64        lmv_thread: EV_ThreadProcessor = EV_ThreadProcessor(stuctures=ensemble.raw_groups,
65                                                            comp_struct_list_option=reference_list)
66        result_thread_lmv:EVToken = lmv_thread.run_EV()
67        lmv_results: EVResult = result_thread_lmv.ev_results
68        return lmv_results

Return the lmv for a provided MultipleEnsemble Groups with seconfary structure as reference