script_template_dtrj
Script template for scripts that process discrete trajectories.
Deprecated since version 1.6.0: Example deprecation warning.
scripts.script_template_dtrj
will be removed in MDTools
2.0.0. It is replaced by scripts.script_template_dtrj_new
,
because the latter has additional functionality xyz.
Todo
Example todo list.
Implement feature xyz.
Discrete trajectories must be stored in arrays. Arrays that serve as
discrete trajectory must meet the requirements listed in
mdtools.check.dtrj()
.
The following is a guide/template on how to write a docstring for a MDTools script. For more information see the Developer’s guide and the NumPy docstring convention.
The first part of the docstring should contain the following paragraphs (all separated by a blank line):
One-sentence summary (preferably one line only).
Potential deprecation warning.
Potential todo list.
Extended summary clarifying functionality, not implementation details or background theory (this goes in the Notes section).
Note that you will have to repeat parts of the docstring (especially
the summary and a potentially abbreviated version of the Options
section) when implementing the command-line interface with
argparse
.
Options
An reStructuredText option list listing all options with which the script can/must be called and their meaning.
- -f
Name of the file containing the discrete trajectory. The discrete trajectory must be stored as
numpy.ndarray
either in a binary NumPy .npy file or in a (compressed) NumPy .npz archive. Seemdtools.file_handler.load_dtrj()
for more information about the requirements for the input file.- -o
Output filename.
- -b
First frame to read from the discrete trajectory. Frame numbering starts at zero. Default:
0
.- -e
Last frame to read from the discrete trajectory. This is exclusive, i.e. the last frame read is actually
END - 1
. A value of-1
means to read the very last frame. Default:-1
.- --every
Read every n-th frame from the discrete trajectory. Default:
1
.- --intermittency
Maximum number of frames a compound is allowed to leave its state whilst still being considered to be in this state provided that it returns to this state after the given number of frames. In other words, a compound is only considered to have left its state if it has left it for at least the given number of frames. Default:
0
.- --debug
Run in debug mode.
Output
Optional section containing for example a list of files which are created by the script.
- Outfile1 (-o).txt
A text file containing abc.
- Outfile2 (--dtrj-out): .npy
A compressed .npz archive containing a binary NumPy .npy file called
dtrj.npy
that holds the discrete trajectory. The discrete trajectory is stored asnumpy.ndarray
of dtypenumpy.uint32
and shape(n, f)
, wheren
is the number of reference compounds andf
is the number of frames. The elements of the discrete trajectory are the states in which a given compound resides at a given frame.
See also
scripts.templates.script_template
Script template for scripts that process MD trajectories
scripts.templates.script_template_plot
Script template for scripts that create plots
some_function()
A function that is not defined in this script, but which helps understanding the script’s output or what the script does
Notes
Implementation details and background theory, i.e. a detailed description of the scientific problem which is solved by the script and particularly how it is solved.[1]
References
Examples
At least one particular use case of the script, optimally with a graph demonstrating how the generated data can be visualized.