4.2.1. propka.input

4.2.1.1. Input handling

Input routines.

Functions

conformation_sorter(conf)

TODO - figure out what this function does.

get_atom_lines_from_input(input_file[, tags])

Get atom lines from a PROPKA input file.

get_atom_lines_from_pdb(pdb_file[, …])

Get atom lines from PDB file.

open_file_for_reading(input_file)

Open file or file-like stream for reading.

read_molecule_file(input_file, mol_container)

Read input file (PDB or PROPKA) for a molecular container

read_parameter_file(input_file, parameters)

Read a parameter file.

read_pdb(pdb_file, parameters, molecule)

Parse a PDB file.

read_propka(input_file, parameters, molecule)

Read PROPKA input file for molecular container.

propka.input.conformation_sorter(conf)[source]

TODO - figure out what this function does.

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

propka.input.read_pdb(pdb_file, parameters, molecule)[source]

Parse a PDB file.

Parameters
  • pdb_file – file to read

  • parameters – parameters to guide parsing

  • molecule – molecular container

Returns

  1. list of conformations

  2. list of names

Return type

list with elements

propka.input.read_propka(input_file, parameters, molecule)[source]

Read PROPKA input file for molecular container.

Parameters
  • input_file – input file

  • parameters – parameters for parsing/setup

  • molecule – molecular container

Returns

list with [conformations, names of conformations]