file_handler¶

Functions for file input/output handling

This module can be called from mdtools via the shortcut fh:

import mdtools as mdt
mdt.fh  # insetad of mdt.file_handler

Functions

backup

Backup a file by renaming it.

cd_up

Move n steps upwards in the directory tree.

header_str

Create a standard header string for text files.

indent

Indent a text by a given amount.

load_dtrj

Load a discrete trajectory stored as numpy.ndarray from a binary .npy file.

savetxt

Save an array to a text file.

savetxt_matrix

Save a data matrix to a text file.

write_header

Create a file and write the standard MDTools header to it.

write_matrix_block

Save a data matrix to a text file.