@@ -60,9 +60,9 @@ class LeafletAnalysisBase(AnalysisBase):
6060 fraction of box length in x and y outside the unit cell considered for Voronoi calculation
6161 p_value: float
6262 p_value for z_score calculation
63- leaflet_frame_rate : Union[None, int]
63+ lipid_leaflet_rate : Union[None, int]
6464 Frame rate for checking lipids leaflet assignments via LeafletFinder
65- sterol_frame_rate : int
65+ sterol_leaflet_rate : int
6666 Frame rate for checking sterols leaflet assignments via LeafletFinder
6767 asymmetric_membrane: bool
6868 Asymmetric membrane option to train models by separated data w.r.t. leaflets
@@ -76,6 +76,8 @@ class LeafletAnalysisBase(AnalysisBase):
7676 User-specific HMM (e.g., pre-trained on another simulation)
7777 do_clustering: bool
7878 Perform the hierarchical clustering for each frame
79+ n_init_hmm: int
80+ Number of repeats for HMM model trainings
7981
8082 Attributes
8183 ----------
@@ -117,15 +119,15 @@ def __init__(
117119 tmd_protein_list : Union [None , "AtomGroup" , str , list ] = None ,
118120 frac : float = 0.5 ,
119121 p_value : float = 0.05 ,
120- leaflet_frame_rate : Union [None , int ] = None ,
121- sterol_frame_rate : int = 1 ,
122+ lipid_leaflet_rate : Union [None , int ] = None ,
123+ sterol_leaflet_rate : int = 1 ,
122124 asymmetric_membrane : bool = False ,
123125 verbose : bool = False ,
124126 result_plots : bool = False ,
125127 trained_hmms : Dict [str , Any ] = {},
126128 n_init_hmm : int = 2 ,
127129 save_plots : bool = False ,
128- do_clustering = True ,
130+ do_clustering : bool = True ,
129131 ** kwargs
130132 ):
131133 # the below line must be kept to initialize the AnalysisBase class!
@@ -145,8 +147,8 @@ def __init__(
145147 self .tails = tails
146148 self .sterol_heads = sterol_heads
147149 self .sterol_tails = sterol_tails
148- self .leaflet_frame_rate = leaflet_frame_rate
149- self .sterol_frame_rate = sterol_frame_rate
150+ self .lipid_leaflet_rate = lipid_leaflet_rate
151+ self .sterol_leaflet_rate = sterol_leaflet_rate
150152 self .frac = frac
151153 self .p_value = p_value
152154 self .asymmetric_membrane = asymmetric_membrane
@@ -244,8 +246,9 @@ def __init__(
244246 "where 0 for lower leaflet and 1 for upper leaflet." )
245247 for leaflet , query in each .items ():
246248 if leaflet not in ["0" , "1" ]:
247- raise ValueError ("Entry for each TDM protein should be a dictionary in the format {'0': ..., '1': ...} "
248- "where 0 for lower leaflet and 1 for upper leaflet." )
249+ raise ValueError (
250+ "Entry for each TDM protein should be a dictionary in the format {'0': ..., '1': ...} "
251+ "where 0 for lower leaflet and 1 for upper leaflet." )
249252 if isinstance (query , AtomGroup ):
250253 # Take center of geometry of three positions
251254 cog = np .mean (query .positions , axis = 0 )
@@ -260,15 +263,17 @@ def __init__(
260263 except Exception as e :
261264 raise ValueError ("Please provide a valid MDAnalysis selection string!" ) from e
262265 else :
263- raise ValueError ("TDM Protein list should contain AtomGroup from MDAnalysis universe or a string "
264- "query for MDAnalysis selection." )
266+ raise ValueError (
267+ "TDM Protein list should contain AtomGroup from MDAnalysis universe or a string "
268+ "query for MDAnalysis selection." )
265269 self .tmd_protein ["0" ] = np .array (self .tmd_protein ["0" ])
266270 self .tmd_protein ["1" ] = np .array (self .tmd_protein ["1" ])
267271 elif tmd_protein_list is not None :
268272 # An unknown argument is provided for tdm_protein_list
269273 raise ValueError (
270274 "Please provide tdm_protein_list in list format such as [{'0': upper leaflet related 3 atom, "
271- "'1': lower leaflet related 3 atom }, {'0': ..., '1': ...}]. Every dictionary stands for an individual transmembrane protein." )
275+ "'1': lower leaflet related 3 atom }, {'0': ..., '1': ...}]. Every dictionary stands for an "
276+ "individual transmembrane protein." )
272277 # -----------------------------------------------------------------HMMs--------------------------------------- #
273278
274279 # Check for user-specified trained HMM
0 commit comments