def add_trajectory(self, name, overwrite=False, shape=(<NUM_LIT:0>,), title='<STR_LIT>',<EOL>chunksize=<NUM_LIT:2>**<NUM_LIT>, comp_filter=default_compression,<EOL>atom=tables.Float64Atom(), params=dict(),<EOL>chunkslice='<STR_LIT>'):
group = self.h5file.root.trajectories<EOL>if name in group:<EOL><INDENT>print("<STR_LIT>" % name, end='<STR_LIT>')<EOL>if overwrite:<EOL><INDENT>self.h5file.remove_node(group, name)<EOL>print("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>return group.get_node(name)<EOL><DEDENT><DEDENT>nparams = self.numeric_params<EOL>num_t_steps = nparams['<STR_LIT>'] / nparams['<STR_LIT>']<EOL>chunkshape = self.calc_chunkshape(chunksize, shape, kind=chunkslice)<EOL>store_array = self.h5file.create_earray(<EOL>group, name, atom=atom,<EOL>shape = shape,<EOL>chunkshape = chunkshape,<EOL>expectedrows = num_t_steps,<EOL>filters = comp_filter,<EOL>title = title)<EOL>for key, value in params.items():<EOL><INDENT>store_array.set_attr(key, value)<EOL><DEDENT>store_array.set_attr('<STR_LIT>', __version__)<EOL>store_array.set_attr('<STR_LIT>', current_time())<EOL>return store_array<EOL>
Add an trajectory array in '/trajectories'.