Skip to content

Commit

Permalink
move import of tqdm up
Browse files Browse the repository at this point in the history
  • Loading branch information
SophiaRuan committed Mar 15, 2023
1 parent 917203d commit 2ae90f3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions package/MDAnalysis/analysis/msd.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
from ..due import due, Doi
from .base import AnalysisBase
from ..core import groups
from tqdm import tqdm

logger = logging.getLogger('MDAnalysis.analysis.msd')

Expand Down Expand Up @@ -387,9 +388,6 @@ def _conclude_simple(self):
"""
lagtimes = np.arange(1, self.n_frames)
positions = self._position_array.astype(np.float64)

# progressbar
from tqdm import tqdm
for lag in tqdm(lagtimes):
disp = positions[:-lag, :, :] - positions[lag:, :, :]
sqdist = np.square(disp).sum(axis=-1)
Expand All @@ -414,9 +412,6 @@ def _conclude_fft(self): # with FFT, np.float64 bit prescision required.
or set fft=False""")

positions = self._position_array.astype(np.float64)

# progressbar
from tqdm import tqdm
for n in tqdm(range(self.n_particles)):
self.results.msds_by_particle[:, n] = tidynamics.msd(
positions[:, n, :])
Expand Down

0 comments on commit 2ae90f3

Please sign in to comment.