@@ -165,7 +165,7 @@ def compute_vaf(
165165 use_velocities : bool = False ,
166166 fft : bool = False ,
167167 index : SliceLike = (0 , None , 1 ),
168- filter_atoms : MaybeSequence [MaybeSequence [int | str | None ]] = ((None ,),),
168+ atoms_filter : MaybeSequence [MaybeSequence [int | str | None ]] = ((None ,),),
169169 time_step : float = 1.0 ,
170170) -> tuple [NDArray [float64 ], list [NDArray [float64 ]]]:
171171 """
@@ -186,7 +186,7 @@ def compute_vaf(
186186 index
187187 Images to analyze as `start`, `stop`, `step`.
188188 Default is all images.
189- filter_atoms
189+ atoms_filter
190190 Compute the VAF averaged over subsets of the system.
191191 Default is all atoms.
192192 time_step
@@ -202,7 +202,7 @@ def compute_vaf(
202202
203203 Notes
204204 -----
205- `filter_atoms ` is given as a series of sequences of atoms or elements,
205+ `atoms_filter ` is given as a series of sequences of atoms or elements,
206206 where each value in the series denotes a VAF subset to calculate and
207207 each sequence determines the atoms (by index or element)
208208 to be included in that VAF.
@@ -216,24 +216,24 @@ def compute_vaf(
216216 # Species by name
217217 cl = ('Cl')
218218
219- compute_vaf(..., filter_atoms =(na, cl))
219+ compute_vaf(..., atoms_filter =(na, cl))
220220
221221 Would compute separate VAFs for each species.
222222
223223 By default, one VAF will be computed for all atoms in the structure.
224224 """
225225 # Ensure if passed scalars they are turned into correct dimensionality
226- if isinstance (filter_atoms , str ) or not isinstance (filter_atoms , Sequence ):
227- filter_atoms = (filter_atoms ,)
228- if isinstance (filter_atoms [0 ], str ) or not isinstance (filter_atoms [0 ], Sequence ):
229- filter_atoms = (filter_atoms ,)
226+ if isinstance (atoms_filter , str ) or not isinstance (atoms_filter , Sequence ):
227+ atoms_filter = (atoms_filter ,)
228+ if isinstance (atoms_filter [0 ], str ) or not isinstance (atoms_filter [0 ], Sequence ):
229+ atoms_filter = (atoms_filter ,)
230230 if filenames and not isinstance (filenames , Sequence ):
231231 filenames = (filenames ,)
232232
233- if len (filenames ) != len (filter_atoms ):
233+ if len (filenames ) != len (atoms_filter ):
234234 raise ValueError (
235235 f"Different number of file names ({ len (filenames )} ) "
236- f"to number of samples ({ len (filter_atoms )} )"
236+ f"to number of samples ({ len (atoms_filter )} )"
237237 )
238238
239239 # Extract requested data
@@ -250,9 +250,9 @@ def compute_vaf(
250250
251251 filtered_atoms = []
252252 symbols = data [0 ].get_chemical_symbols ()
253- for atoms in filter_atoms :
253+ for atoms in atoms_filter :
254254 if any (atom is None for atom in atoms ):
255- # If filter_atoms not specified use all atoms.
255+ # If atoms_filter not specified use all atoms.
256256 filtered_atoms .append (range (n_atoms ))
257257 elif all (isinstance (a , str ) for a in atoms ):
258258 # If all symbols, get the matching indices.
@@ -263,7 +263,7 @@ def compute_vaf(
263263 filtered_atoms .append (atoms )
264264 else :
265265 raise ValueError (
266- "Cannot mix element symbols and indices in vaf filter_atoms "
266+ "Cannot mix element symbols and indices in vaf atoms_filter "
267267 )
268268
269269 used_atoms = {atom for atoms in filtered_atoms for atom in atoms }
0 commit comments