msd

Command Line Tool for MSD Analysis

This command line tool can be used to calculate the mean square displacement (MSD) of given trajectory file(s) using multiple time origins on a sliding window. This is an input file based tool, so that the input file can be used to specify the parameters of the MSD calculation. For more information on the general the MSD analysis and its input file options please visit PQAnalysis.analysis.msd.msd.MSD and PQAnalysis.analysis.msd.msd_input_file_reader

For the MSD analysis input file several keys are available of which some are required and some are optional. For more details on the grammar and syntax of the input file see Input File.

Required keys

Key

Value

traj_files

The trajectory files to read. This can be a single file or a list of files.

target_selection

The selection string to select the atoms for which the MSD is calculated. For more details see Selection.

out_file

The output file to write the MSD data to. It must not exist yet.

Optional keys

Key

Value

window

The correlation window size in frames. Default is 1000. It has to be an integer multiple of the gap.

gap

The gap between two time origins in frames. Default is 10.

first_frame

The first frame (1-based frame counter) at which processing starts. Default is 0. The key start is an alias for this key (legacy Diffcalc naming).

time_step

The time step between two frames in ps. If given, diffusion coefficients are calculated from a linear fit of the MSD tail and written to the log output. It has to be positive.

fit_window

The number of trailing MSD points used for the diffusion fit. Default is the last 20% of the window. It has to be at least 2 and at most window + 1.

log_file

The log file to write the log information to.

use_full_atom_info

Whether to use full atom information for the selections.

Note

The MSD output file follows the legacy Diffcalc format: one row per lag index with the columns lag index, MSD in x, MSD in y and MSD in z (all in Angstrom^2).

Summary

Classes:

MSDCLI

Command Line Tool for MSD Analysis

Functions:

main

The main function of the MSD analysis command line tool, which is basically just a wrapper for the msd function.

Reference

class MSDCLI[source]

Bases: CLIBase

Command Line Tool for MSD Analysis

classmethod add_arguments(
parser: _ArgumentParser,
) None[source]

Adds the arguments to the parser.

Parameters:

parser (_ArgumentParser) – The parser to which the arguments should be added.

classmethod program_name() str[source]

Returns the name of the program.

Returns:

The name of the program.

Return type:

str

classmethod run(args)[source]

Runs the command line tool.

Parameters:

args (argparse.Namespace) – The arguments parsed by the parser.

main()[source]

The main function of the MSD analysis command line tool, which is basically just a wrapper for the msd function. For more information on the msd function please visit PQAnalysis.analysis.msd.api.msd().