script_template_dtrj¶
Script template for scripts that process discrete trajectories stored as
numpy.ndarray
.
Deprecated since version 1.6.0: Example deprication warning. scripts.script_template_dtrj
will be removed in MDTools 2.0.0. It is replaced by
scripts.cript_template_dtrj_new
, because the latter has
additional functionality xyz.
Todo
Example todo list.
Implement feature xyz.
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 deprication 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¶
A reStructuredText option list listing all options with which the script can/must be called and their meaning.
- -f
Trajectory file. File containing the discrete trajectory stored as
numpy.ndarray
in the binary.npy
format. The array must be of shape(n, f)
, wheren
is the number of compounds andf
is the number of frames. The shape can also be(f,)
, in which case the array is expanded to shape(1, f)
. All elements of the array must be integers or floats whose fractional part is zero, because they are interpreted as the indices of the states in which a given compound is at a given frame.- -o
Output filename.
- -b
First frame to read from the trajectory. Frame numbering starts at zero. Default:
0
.- -e
Last frame to read from the 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 trajectory. Default:
1
.- --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 binary NumPy
.npy
containing the discrete trajectory 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.script_template
Script template for scripts that process MD trajectories
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.
References
Cited references.
Examples
At least one particular use case of the script, optimally with a graph demonstrating how the generated data can be visualized.