Hi
I have two questions regarding RMF files
1) What happens if a program that carries an open rmf3 file handle gets killed? Is the rmf file likely to be corrupted? or is this only going to affect the last frame?
2) I use the following code to reprocess trajectories, reading an old rmf file and writing a new one. write_traj is called each time a new frame is to be written in the RMF file. Frames are written sequentially, so I guess the set_current_frame(frameid) is kind of superfluous.
def _write_traj_rmf(self, infile, instep, outfile): import RMF #make sure infile is open if infile not in self.traj_handles_in: src = RMF.open_rmf_file_read_only(infile) self.traj_handles_in[infile] = src src = self.traj_handles_in[infile] #make sure outfile is open if outfile not in self.traj_handles_out: dest = RMF.create_rmf_file(outfile) self.traj_handles_out[outfile] = dest RMF.clone_file_info(src, dest) RMF.clone_hierarchy(src, dest) RMF.clone_static_frame(src, dest) dest = self.traj_handles_out[outfile] #clone frame frameid = src.get_frames()[instep-1] src.set_current_frame(frameid) dest.add_frame(src.get_name(frameid), src.get_type(frameid)) RMF.clone_loaded_frame(src, dest)
Does that sound ok to you? The reason I'm asking, is I get a problem with the written coordinates. They seem to be wrapped when they are too big, e.g. like in a periodic box. Any clues appreciated.
Yannick