@@ -146,9 +146,9 @@ def get(self, struct: PeriodicStructure, site_class: str = None) -> Neighborhood
146146 site_ids = np .array ([s [SITE_ID ] for s in all_sites ])
147147
148148 # Convert to fractional coordinates for periodic KD-tree
149- frac_coords = np .array ([
150- struct .lattice .get_fractional_coords (loc ) for loc in locations
151- ] )
149+ frac_coords = np .array (
150+ [ struct .lattice .get_fractional_coords (loc ) for loc in locations ]
151+ )
152152
153153 # Compute the maximum fractional radius that could correspond to
154154 # the Cartesian cutoff. For non-orthogonal lattices, we need to use
@@ -163,9 +163,7 @@ def get(self, struct: PeriodicStructure, site_class: str = None) -> Neighborhood
163163 dim = struct .lattice .dim
164164
165165 # Build boxsize array: 1.0 for periodic dimensions, large value for non-periodic
166- boxsize = np .array ([
167- 1.0 if periodic [i ] else 1e10 for i in range (dim )
168- ])
166+ boxsize = np .array ([1.0 if periodic [i ] else 1e10 for i in range (dim )])
169167
170168 # Wrap fractional coordinates to [0, 1) for periodic dimensions
171169 frac_coords_wrapped = frac_coords .copy ()
@@ -296,9 +294,9 @@ def get(self, struct: PeriodicStructure, site_class: str = None) -> Neighborhood
296294 site_ids = np .array ([s [SITE_ID ] for s in all_sites ])
297295
298296 # Convert to fractional coordinates for periodic KD-tree
299- frac_coords = np .array ([
300- struct .lattice .get_fractional_coords (loc ) for loc in locations
301- ] )
297+ frac_coords = np .array (
298+ [ struct .lattice .get_fractional_coords (loc ) for loc in locations ]
299+ )
302300
303301 # Compute the maximum fractional radius for the outer cutoff.
304302 # Use the maximum stretch factor of the inverse matrix for non-orthogonal lattices.
@@ -311,9 +309,7 @@ def get(self, struct: PeriodicStructure, site_class: str = None) -> Neighborhood
311309 dim = struct .lattice .dim
312310
313311 # Build boxsize array
314- boxsize = np .array ([
315- 1.0 if periodic [i ] else 1e10 for i in range (dim )
316- ])
312+ boxsize = np .array ([1.0 if periodic [i ] else 1e10 for i in range (dim )])
317313
318314 # Wrap fractional coordinates to [0, 1) for periodic dimensions
319315 frac_coords_wrapped = frac_coords .copy ()
0 commit comments