moldescriptor_reader

A module for reading moldescriptor files.

Summary

Classes:

MoldescriptorReader

This is a class to read moldescriptor files.

Reference

class MoldescriptorReader(filename: str)[source]

Bases: BaseReader

This is a class to read moldescriptor files. Moldescriptor files are used by the PQ and QMCFC MD engines to store the mol types of a system. The moldescriptor file is a text file that contains the mol types of a system. The mol types are defined by the elements, atom types and partial charges of the atoms of the mol type. For more information of how a moldescriptor file should look like please see the documentation of the PQ code.

Calling the read method returns a list of mol types. Each mol type is a Residue object.

The lines WATER_TYPE n and AMMONIA_TYPE n of the file name the mol type (by its number, i.e. the id of the residue) of the water and the ammonia molecules. They are available after reading as the attributes water_type and ammonia_type (None if the line is missing). They only point to a mol type of the file, the mol type itself still needs its own entry.

Parameters:

filename (str) – The filename of the moldescriptor file.

read() → Residues[source]

The read method reads a moldescriptor file and returns a list of mol types. Each mol type is a Residue object.

Returns:

The residues (mol types) read from the moldescriptor file.

Return type:

Residues

Raises:

Notes

A warning is logged if the water type does not point to a mol type of the file or the mol type is not made of the three atoms O, H and H in this order (as PQ requires), and if the ammonia type does not point to a mol type of the file.

ammonia_type

The mol type number of the ammonia molecules.

Type:

int | None

logger = <CustomLogger PQAnalysis.MoldescriptorReader (INFO)>
water_type

The mol type number of the water molecules.

Type:

int | None