Skip to content

Commit ced5ece

Browse files
committed
black-formatting-issue
1 parent 2c69667 commit ced5ece

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

  • package/MDAnalysis/analysis

package/MDAnalysis/analysis/msd.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ def __init__(
336336
**kwargs,
337337
):
338338
if isinstance(u, groups.UpdatingAtomGroup):
339-
raise TypeError("UpdatingAtomGroups are not valid for MSD computation")
339+
raise TypeError(
340+
"UpdatingAtomGroups are not valid for MSD computation"
341+
)
340342

341343
super(EinsteinMSD, self).__init__(u.universe.trajectory, **kwargs)
342344

@@ -360,8 +362,12 @@ def __init__(
360362
def _prepare(self):
361363
# self.n_frames only available here
362364
# these need to be zeroed prior to each run() call
363-
self.results.msds_by_particle = np.zeros((self.n_frames, self.n_particles))
364-
self._position_array = np.zeros((self.n_frames, self.n_particles, self.dim_fac))
365+
self.results.msds_by_particle = np.zeros(
366+
(self.n_frames, self.n_particles)
367+
)
368+
self._position_array = np.zeros(
369+
(self.n_frames, self.n_particles, self.dim_fac)
370+
)
365371
# self.results.timeseries not set here
366372

367373
def _parse_msd_type(self):
@@ -400,7 +406,9 @@ def _single_frame(self):
400406
r"""Constructs array of positions for MSD calculation."""
401407
# shape of position array set here, use span in last dimension
402408
# from this point on
403-
self._position_array[self._frame_index] = self.ag.positions[:, self._dim]
409+
self._position_array[self._frame_index] = self.ag.positions[
410+
:, self._dim
411+
]
404412

405413
def _conclude(self):
406414
if self.non_linear:
@@ -451,7 +459,9 @@ def _conclude_fft(self): # with FFT, np.float64 bit prescision required.
451459
verbose=self._verbose,
452460
desc="Calculating MSD with FFT per particle",
453461
):
454-
self.results.msds_by_particle[:, n] = tidynamics.msd(positions[:, n, :])
462+
self.results.msds_by_particle[:, n] = tidynamics.msd(
463+
positions[:, n, :]
464+
)
455465
self.results.timeseries = self.results.msds_by_particle.mean(axis=1)
456466
self.results.delta_t_values = np.arange(self.n_frames) * (
457467
self.times[1] - self.times[0]

0 commit comments

Comments
 (0)