@@ -264,9 +264,7 @@ def save_state_data(self, state: msibi.state.State, file_path: str) -> None:
264264 state_data = {
265265 "target_distribution" : state_dict ["target_distribution" ],
266266 "current_distribution" : state_dict ["current_distribution" ],
267- "distribution_history" : np .asarray (
268- state_dict ["distribution_history" ]
269- ),
267+ "distribution_history" : np .asarray (state_dict ["distribution_history" ]),
270268 "f_fit" : np .asarray (state_dict ["f_fit" ]),
271269 }
272270 np .savez (file_path , ** state_data )
@@ -321,9 +319,7 @@ def plot_target_distribution(
321319 if file_path :
322320 plt .savefig (file_path )
323321
324- def plot_fit_scores (
325- self , state : msibi .state .State , file_path : str = None
326- ) -> None :
322+ def plot_fit_scores (self , state : msibi .state .State , file_path : str = None ) -> None :
327323 """Plot the evolution of the distribution matching fit scores.
328324
329325 Parameters
@@ -563,9 +559,7 @@ def _add_state(self, state: msibi.state.State) -> None:
563559 Instance of a State object previously created.
564560 """
565561 if self .optimize :
566- target_distribution = self ._get_state_distribution (
567- state = state , query = False
568- )
562+ target_distribution = self ._get_state_distribution (state = state , query = False )
569563 if self .smoothing_window and self .smoothing_order :
570564 target_distribution [:, 1 ] = savitzky_golay (
571565 y = target_distribution [:, 1 ],
@@ -669,9 +663,7 @@ def _update_potential(self) -> None:
669663 self .x_range , self .potential , self .correction_form
670664 )
671665 self .potential_history .append (np .copy (self .potential ))
672- self ._head_correction_history .append (
673- np .copy (self .potential [0 :head_cut ])
674- )
666+ self ._head_correction_history .append (np .copy (self .potential [0 :head_cut ]))
675667 self ._tail_correction_history .append (np .copy (self .potential [tail_cut :]))
676668 self ._learned_potential_history .append (np .copy (self .potential [real ]))
677669
@@ -767,9 +759,7 @@ def _table_entry(self) -> dict:
767759 }
768760 return table_entry
769761
770- def _get_distribution (
771- self , state : msibi .state .State , gsd_file : str
772- ) -> np .ndarray :
762+ def _get_distribution (self , state : msibi .state .State , gsd_file : str ) -> np .ndarray :
773763 """Calculate a bond length distribution.
774764
775765 Parameters
@@ -881,9 +871,7 @@ def _table_entry(self) -> dict:
881871 table_entry = {"U" : self .potential , "tau" : self .force }
882872 return table_entry
883873
884- def _get_distribution (
885- self , state : msibi .state .State , gsd_file : str
886- ) -> np .ndarray :
874+ def _get_distribution (self , state : msibi .state .State , gsd_file : str ) -> np .ndarray :
887875 """Calculate a bond angle distribution.
888876
889877 Parameters
@@ -996,9 +984,7 @@ def set_lj(
996984 self .x_range = np .arange (r_min , r_cut + self .dx , self .dx )
997985 self .x_min = self .x_range [0 ]
998986 self .r_cut = self .x_range [- 1 ]
999- self .potential = lennard_jones (
1000- r = self .x_range , epsilon = epsilon , sigma = sigma
1001- )
987+ self .potential = lennard_jones (r = self .x_range , epsilon = epsilon , sigma = sigma )
1002988 self .force_init = "Table"
1003989
1004990 def _table_entry (self ) -> dict :
@@ -1010,9 +996,7 @@ def _table_entry(self) -> dict:
1010996 }
1011997 return table_entry
1012998
1013- def _get_distribution (
1014- self , state : msibi .state .State , gsd_file : str
1015- ) -> np .ndarray :
999+ def _get_distribution (self , state : msibi .state .State , gsd_file : str ) -> np .ndarray :
10161000 """Calculate a pair distribution (RDF).
10171001
10181002 Parameters
@@ -1142,9 +1126,7 @@ def _table_entry(self) -> dict:
11421126 table_entry = {"U" : self .potential , "tau" : self .force }
11431127 return table_entry
11441128
1145- def _get_distribution (
1146- self , state : msibi .state .State , gsd_file : str
1147- ) -> np .ndarray :
1129+ def _get_distribution (self , state : msibi .state .State , gsd_file : str ) -> np .ndarray :
11481130 """Calculate a dihedral angle distribution.
11491131
11501132 Parameters
0 commit comments