diff --git a/mdciao/contacts/contacts.py b/mdciao/contacts/contacts.py index 2a900633..642d96bc 100644 --- a/mdciao/contacts/contacts.py +++ b/mdciao/contacts/contacts.py @@ -6396,14 +6396,15 @@ def repframes(self, scheme="mode", print("Returning frame %u of traj nr. %u: %s"%(frame_idx, traj_idx, reptraj)) if isinstance(reptraj, str): if _path.exists(reptraj): - if len(geoms) == 0: - geoms = _md.load(reptraj, top=self.top,frame=frame_idx) - else: - geoms = geoms.join(_md.load(reptraj, top=self.top, frame=frame_idx)) + geom = _md.load(reptraj, top=self.top,frame=frame_idx) else: raise FileNotFoundError(f"The file '{reptraj}' can't be found anymore. Is this an `mdciao.examples` object?") else: - geoms.append(reptraj[frame_idx]) + geom = reptraj[frame_idx] + if len(geoms)==0: + geoms = geom + else: + geoms = geoms.join(geom) return_tuple = tuple([*return_tuple, geoms]) return return_tuple