pqanalysis_input_file_reader
A module for reading the input file for the PQAnalysis.
Summary
Classes:
A class to read the input file for the PQAnalysis. |
Reference
- class PQAnalysisInputFileReader(filename: str)[source]
Bases:
_FileMixin
,_SelectionMixin
,_PositionsMixin
A class to read the input file for the PQAnalysis. It inherits from _FileMixin, _SelectionMixin and _PositionsMixin.
The main idea of this class is work as a super class for all command line tools of PQAnalysis, but it can also be used as a standalone class. But if for example an analysis tool needs only few input file keywords, it is recommended to inherit from this class.
Attention
As this class is not intended to be used as a standalone class, it does not check if all required keys are set in the input file, thus also no information/documentation of the values of the keywords is given, so that they can be used accordingly in the implementing subclasses.
It sets the format to InputFileFormat.PQANALYSIS and the filename to the given filename. It also creates a InputFileParser with the given filename.
- Parameters:
filename (str) – the filename of the input file
- check_known_keys(
- known_keys: list[str] | None = None,
Checks if all keys in the input file are known.
- Parameters:
known_keys (List[str] | None, optional) – the known keys, by default None
- Warns:
InputFileWarning – if unknown keys were set in the input file
- check_required_keys(
- required_keys: list[str],
Checks if all required keys are set in the input file.
- Parameters:
required_keys (List[str]) – the required keys
- Raises:
InputFileError – if not all required keys are set in the input file
- read()[source]
Reads the input file and parses it. It also sets the raw_input_file and the dictionary.
- property delta_r: PositiveReal | None
The radius step size of the PQAnalysis.
- Type:
PositiveReal | None
- delta_r_key = 'delta_r'
- known_keys = ['r_max', 'r_min', 'delta_r', 'n_bins', 'traj_files', 'selection', 'reference_selection', 'target_selection', 'use_full_atom_info', 'out_file', 'log_file', 'no_intra_molecular', 'moldescriptor_file', 'restart_file']
- property log_file: str | None
The log file of the simulation.
- Type:
str | None
- log_file_key = 'log_file'
- logger = <CustomLogger PQAnalysis.PQAnalysisInputFileReader (INFO)>
- property moldescriptor_file: str | None
The moldescriptor file of the simulation.
- Type:
str | None
- moldescriptor_file_key = 'moldescriptor_file'
- property n_bins: PositiveInt | None
The number of bins of the PQAnalysis.
- Type:
PositiveInt | None
- n_bins_key = 'n_bins'
- property no_intra_molecular: bool | None
Whether intra molecular interactions should be excluded.
- Type:
bool | None
- no_intra_molecular_key = 'no_intra_molecular'
- property out_file: str | None
The out file of the simulation.
- Type:
str | None
- out_file_key = 'out_file'
- property r_max: PositiveReal | None
The maximum radius of the PQAnalysis.
- Type:
PositiveReal | None
- r_max_key = 'r_max'
- property r_min: PositiveReal | None
The minimum radius of the PQAnalysis.
- Type:
PositiveReal | None
- r_min_key = 'r_min'
- property reference_selection: str | None
The reference selection of the simulation.
- Type:
str | None
- reference_selection_key = 'reference_selection'
- property restart_file: str | None
The restart file of the simulation.
- Type:
str | None
- restart_file_key = 'restart_file'
- property selection: str | None
The selection of the simulation.
- Type:
str | None
- selection_key = 'selection'
- property target_selection: str | None
The target selection of the simulation.
- Type:
str | None
- target_selection_key = 'target_selection'
- property traj_files: list[str] | None
The trajectory files of the simulation.
- Type:
List[str] | None
- traj_files_key = 'traj_files'
- property use_full_atom_info: bool | None
Whether the full atom information should be used.
- Type:
bool | None
- use_full_atom_info_key = 'use_full_atom_info'