msd_input_file_reader
A module containing a class to read input files to setup the
MSD class.
Summary
Classes:
A class to read input files to setup the |
Reference
- class MSDInputFileReader(filename: str)[source]
Bases:
PQAnalysisInputFileReaderA class to read input files to setup the
MSDclass.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).
- Parameters:
filename (str) – the filename of the input file
- read()[source]
Reads the input file and parses it. It also sets the raw_input_file and the dictionary. It checks if all required keys are set and if all keys are known.
- Raises:
InputFileError – if not all required keys are set in the input file
InputFileWarning – if unknown keys are set in the input file
InputFileError – if both the first_frame and the start key are set
InputFileError – if the first_frame or start key is negative
InputFileError – if the time_step key is not positive
- first_frame_key = 'first_frame'
- property fit_window: PositiveInt | None
The number of trailing MSD points to fit.
- Type:
PositiveInt | None
- fit_window_key = 'fit_window'
- property gap: PositiveInt | None
The gap between two time origins in frames.
- Type:
PositiveInt | None
- gap_key = 'gap'
- logger = <CustomLogger PQAnalysis.MSDInputFileReader (INFO)>
- property n_start: int | None
The first frame at which processing starts.
- Type:
int | None
- optional_keys = ['traj_files', 'target_selection', 'out_file', 'window', 'gap', 'first_frame', 'start', 'time_step', 'fit_window', 'log_file', 'use_full_atom_info']
The optional keys of the input file
- Type:
List[str]
- required_keys = ['traj_files', 'target_selection', 'out_file']
The required keys of the input file
- Type:
List[str]
- start_key = 'start'
- property time_step: PositiveReal | None
The time step between two frames in ps.
- Type:
PositiveReal | None
- time_step_key = 'time_step'
- property window: PositiveInt | None
The correlation window size in frames.
- Type:
PositiveInt | None
- window_key = 'window'