@@ -321,16 +321,20 @@ def __init__(
321321
322322 if exclusions is not None :
323323 if len (exclusions [0 ]) != len (exclusions [1 ]):
324- raise ValueError ("'exclusion' must be two arrays of identical length" )
325- self .exclusions = np .column_stack ((exclusions [0 ], exclusions [1 ])).astype (
326- np .intp
327- )
324+ raise ValueError (
325+ "'exclusion' must be two arrays of identical length"
326+ )
327+ self .exclusions = np .column_stack (
328+ (exclusions [0 ], exclusions [1 ])
329+ ).astype (np .intp )
328330 else :
329331 self .exclusions = None
330332
331333 self .bond_type = bond_type
332334 if self .bond_type not in ["continuous" , "intermittent" ]:
333- raise ValueError ("bond_type must be either 'continuous' or 'intermittent'" )
335+ raise ValueError (
336+ "bond_type must be either 'continuous' or 'intermittent'"
337+ )
334338
335339 self .a_crit = np .deg2rad (angle_crit )
336340 self .d_crit = dist_crit
@@ -366,7 +370,9 @@ def _slice_traj(self, sample_time):
366370 if req_frames > n_frames :
367371 warnings .warn (
368372 "Number of required frames ({}) greater than the"
369- " number of frames in trajectory ({})" .format (req_frames , n_frames ),
373+ " number of frames in trajectory ({})" .format (
374+ req_frames , n_frames
375+ ),
370376 RuntimeWarning ,
371377 )
372378
@@ -477,7 +483,9 @@ def _single_run(self, start, stop):
477483 aidx = aidx [idx2 ]
478484
479485 nbonds = len (hidx ) # number of hbonds at t=0
480- results = np .zeros_like (np .arange (start , stop , self ._skip ), dtype = np .float32 )
486+ results = np .zeros_like (
487+ np .arange (start , stop , self ._skip ), dtype = np .float32
488+ )
481489
482490 if self .time_cut :
483491 # counter for time criteria
@@ -486,7 +494,9 @@ def _single_run(self, start, stop):
486494 for i , ts in enumerate (self .u .trajectory [start : stop : self ._skip ]):
487495 box = self .u .dimensions if self .pbc else None
488496
489- d = calc_bonds (self .h .positions [hidx ], self .a .positions [aidx ], box = box )
497+ d = calc_bonds (
498+ self .h .positions [hidx ], self .a .positions [aidx ], box = box
499+ )
490500 a = calc_angles (
491501 self .d .positions [hidx ],
492502 self .h .positions [hidx ],
@@ -611,7 +621,9 @@ def triple(x, A1, A2, tau1, tau2, tau3):
611621 """Sum of three exponential functions"""
612622 A3 = 1 - (A1 + A2 )
613623 return (
614- A1 * np .exp (- x / tau1 ) + A2 * np .exp (- x / tau2 ) + A3 * np .exp (- x / tau3 )
624+ A1 * np .exp (- x / tau1 )
625+ + A2 * np .exp (- x / tau2 )
626+ + A3 * np .exp (- x / tau3 )
615627 )
616628
617629 if self .bond_type == "continuous" :
@@ -652,7 +664,9 @@ def triple(x, A1, A2, tau1, tau2, tau3):
652664 self .solution ["ier" ] = ier
653665
654666 if ier in [1 , 2 , 3 , 4 ]: # solution found if ier is one of these values
655- self .solution ["estimate" ] = self ._my_solve (self .solution ["time" ], * p )
667+ self .solution ["estimate" ] = self ._my_solve (
668+ self .solution ["time" ], * p
669+ )
656670 else :
657671 warnings .warn ("Solution to results not found" , RuntimeWarning )
658672
0 commit comments