Skip to content

Commit

Permalink
Address small reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclark5 committed Jun 21, 2023
1 parent e948b86 commit fbc491b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 6 additions & 6 deletions package/MDAnalysis/coordinates/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def __init__(self, filenames, skip=1, dt=None, continuous=False,
times = []
for r in self.readers:
r[0]
start = r.ts.time
start = r.ts.time
r[-1]
end = r.ts.time
times.append((start, end))
Expand All @@ -341,21 +341,21 @@ def __init__(self, filenames, skip=1, dt=None, continuous=False,
n_frames = 0
for r1, r2 in zip(self.readers[:-1], self.readers[1:]):
r2[0], r1[0]
r1_start_time = r1.ts.time
start_time = r2.ts.time
r1_start_time = r1.time
start_time = r2.time
r1[-1]
if r1.ts.time < start_time:
if r1.time < start_time:
warnings.warn("Missing frame in continuous chain", UserWarning)

# check for interleaving
r1[1]
if r1_start_time < start_time < r1.ts.time:
if r1_start_time < start_time < r1.time:
raise RuntimeError("ChainReader: Interleaving not supported "
"with continuous=True.")

# find end where trajectory was restarted from
for ts in r1[::-1]:
if r1.ts.time < start_time:
if ts.time < start_time:
break
sf.append(sf[-1] + ts.frame + 1)
n_frames += ts.frame + 1
Expand Down
3 changes: 0 additions & 3 deletions testsuite/MDAnalysisTests/datafiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@
"LAMMPSDUMP_long", # lammpsdump file with a few zeros sprinkled in the first column first frame
"LAMMPSDUMP_allcoords", # lammpsdump file with all coordinate conventions (x,xs,xu,xsu) present, from LAMMPS rdf example
"LAMMPSDUMP_nocoords", # lammpsdump file with no coordinates
"LAMMPSDUMP_chain1", # Lammps dump file with chain reader
"LAMMPSDUMP_chain2", # Lammps dump file with chain reader
"LAMMPS_chain", # Lammps data file with chain reader
"LAMMPSDUMP_triclinic", # lammpsdump file to test triclinic dimension parsing, albite with most atoms deleted
"LAMMPSDUMP_image_vf", # Lammps dump file with image flags, velocities, and forces.
"LAMMPS_image_vf", # Lammps data file to go with LAMMPSDUMP_image_vf
Expand Down

0 comments on commit fbc491b

Please sign in to comment.