rdf_input_file_reader

A module containing a class to read input files to setup the RDF class.

Summary

Classes:

RDFInputFileReader

A class to read input files to setup the RDF class.

Reference

class RDFInputFileReader(filename: str)[source]

Bases: PQAnalysisInputFileReader

A class to read input files to setup the RDF class.

For the RDF 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.

reference_selection - The selection string to select the reference atoms. For more details see Selection.

target_selection - The selection string to select the target atoms. For more details see Selection.

out_file - The output file to write the RDF data to.

Optional keys

Key - Value

r_max - The maximum radius to calculate the RDF for.

r_min - The minimum radius to calculate the RDF for.

delta_r - The delta radius to calculate the RDF for.

n_bins - The number of bins to calculate the RDF for.

log_file - The log file to write the log information to.

use_full_atom_info - Whether to use full atom information for the selections.

no_intra_molecular - Whether to exclude intra molecular pairs.

restart_file - The restart file to read the topology from.

moldescriptor_file - The moldescriptor file to read the reference residues from.

Note

Optional keys does not mean that they are optional for the analysis. They are optional in the input file, but they might be required for the analysis. This means that if an optional keyword is specified other keywords might be required. For example:

  • If the no_intra_molecular key is specified,

the restart_file and moldescriptor_file keys are required in order to exclude intra molecular pairs. - If the moldescriptor_file key is specified, the restart_file key is required in order use the reference residues in any meaningful way. - In general, the r_max, n_bins and delta_r are mutual exclusive, meaning that they can’t be specified at the same time. Furthermore, at least one of <property object at 0x7fb2327fab60>' or :code:`<property object at 0x7fb2327faac0> is required (for more information see RDF).

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 the no_intra_molecular key is used without a restart file

  • InputFileError – if the no_intra_molecular key is used without a moldescriptor file

  • InputFileError – if the moldescriptor_file key is used without a restart file

logger = <CustomLogger PQAnalysis.RDFInputFileReader (INFO)>
optional_keys = ['traj_files', 'reference_selection', 'target_selection', 'out_file', 'r_max', 'r_min', 'delta_r', 'n_bins', 'log_file', 'use_full_atom_info', 'no_intra_molecular', 'restart_file', 'moldescriptor_file']

The optional keys of the input file

Type:

List[str]

required_keys = ['traj_files', 'reference_selection', 'target_selection', 'out_file']

The required keys of the input file

Type:

List[str]