4.2.1. propka.input¶
4.2.1.1. Input handling¶
Input routines.
Functions
|
TODO - figure out what this function does. |
|
Get atom lines from a PROPKA input file. |
|
Get atom lines from PDB file. |
|
Open file or file-like stream for reading. |
|
Read input file (PDB or PROPKA) for a molecular container |
|
Read a parameter file. |
|
Parse a PDB file. |
|
Read PROPKA input file for molecular container. |
-
propka.input.
get_atom_lines_from_input
(input_file, tags=['ATOM ', 'HETATM'])[source]¶ Get atom lines from a PROPKA input file.
- Parameters
input_file – input file
tags – tags defining atom lines
- Yields
conformation container, list of atoms
-
propka.input.
get_atom_lines_from_pdb
(pdb_file, ignore_residues=[], keep_protons=False, tags=['ATOM ', 'HETATM'], chains=None)[source]¶ Get atom lines from PDB file.
- Parameters
pdb_file – PDB file to parse
ignore_residues – list of residues to ignore
keep_protons – bool to keep/ignore protons
tags – tags of lines that include atoms
chains – list of chains
-
propka.input.
open_file_for_reading
(input_file)[source]¶ Open file or file-like stream for reading.
TODO - convert this to a context manager
- Parameters
input_file – path to file or file-like object. If file-like object,
will attempt fseek (then) –
-
propka.input.
read_molecule_file
(input_file, mol_container)[source]¶ Read input file (PDB or PROPKA) for a molecular container
- Args
input_file: input file to read mol_container: MolecularContainer object
- Returns
updated MolecularContainer object
- Raises
ValuError if invalid input given
-
propka.input.
read_parameter_file
(input_file, parameters)[source]¶ Read a parameter file.
- Parameters
input_file – input file to read
parameters – Parameters object
- Returns
updated Parameters object