pywindow.Input

class pywindow.Input[source]

Bases: object

Class used to load and process input files.

Methods

load_file

This function opens any type of a readable file.

load_rdkit_mol

Return molecular data from rdkit.Chem.Mol object.

load_file(filepath)[source]

This function opens any type of a readable file.

It decomposes the file object into a list, for each line, of lists containing splitted line strings using space as a spacer.

Parameters:

filepath (Path | str) – The full path or a relative path to any type of file.

Returns:

dict

Returns a dictionary containing the molecular information extracted from the input files. This information will vary with file type and information stored in it. The data is sorted into lists that contain one feature for example key atom_id: [atom_id_1, atom_id_2] Over the process of analysis this dictionary will be updated with new data.

Return type:

dict

load_rdkit_mol(mol)[source]

Return molecular data from rdkit.Chem.Mol object.

Parameters:

mol (rdkit.Chem.Mol) – A molecule object from RDKit.

Returns:

dict

A dictionary with elements and coordinates as keys containing molecular data extracted from rdkit.Chem.Mol object.

Return type:

dict