Skip to content

Commit

Permalink
Update contacts.py
Browse files Browse the repository at this point in the history
intdent
  • Loading branch information
talagayev authored Dec 14, 2024
1 parent 7c2affc commit e1ee672
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions package/MDAnalysis/analysis/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,27 +490,27 @@ def _get_atomgroup(u, sel):
else:
raise TypeError(select_error_message)

def _get_box_func(ts, pbc):
"""Retrieve the dimensions of the simulation box based on PBC.
def _get_box_func(ts, pbc):
"""Retrieve the dimensions of the simulation box based on PBC.
Parameters
----------
ts : Timestep
The current timestep of the simulation, which contains the
box dimensions.
pbc : bool
A flag indicating whether periodic boundary conditions (PBC)
are enabled. If `True`, the box dimensions are returned,
else returns `None`.
Returns
-------
box_dimensions : ndarray or None
The dimensions of the simulation box as a NumPy array if PBC
is True, else returns `None`.
"""
return ts.dimensions if pbc else None
Parameters
----------
ts : Timestep
The current timestep of the simulation, which contains the
box dimensions.
pbc : bool
A flag indicating whether periodic boundary conditions (PBC)
are enabled. If `True`, the box dimensions are returned,
else returns `None`.
Returns
-------
box_dimensions : ndarray or None
The dimensions of the simulation box as a NumPy array if PBC
is True, else returns `None`.
"""
return ts.dimensions if pbc else None

def _prepare(self):
self.results.timeseries = np.empty((self.n_frames, len(self.r0)+1))

Expand Down

0 comments on commit e1ee672

Please sign in to comment.