propka.lib

Set-up of a PROPKA calculation

Implements many of the main functions used to call PROPKA.

Functions

build_parser([parser])

Build an argument parser for PROPKA.

configuration_compare(conf)

TODO - figure out what this function does.

generate_combinations(interactions)

Generate combinations of interactions.

get_sorted_configurations(configuration_keys)

Extract and sort configurations.

loadOptions([args])

Load the arguments parser with options.

make_combination(combis, interaction)

Make a specific set of combinations.

make_grid(min_, max_, step)

Make a grid across the specified tange.

make_molecule(atom, atoms)

Make a molecule from atoms.

make_tidy_atom_label(name, element)

Returns a ‘tidier’ atom label for printing to the new PDB file.

parse_res_string(res_str)

Parse a residue string.

protein_precheck(conformations, names)

Check protein for correct number of atoms, etc.

resid_from_atom(atom)

Return string with atom residue information.

split_atoms_into_molecules(atoms)

Maps atoms into molecules.

propka.lib.build_parser(parser=None)[source]

Build an argument parser for PROPKA.

Parameters

parser – existing parser. If this is not None, then the PROPKA parser will be created as a subparser to this existing parser. Otherwise, a new parser will be created.

Returns

ArgumentParser object.

Changed in version 3.4.0: Argument –generate-propka-input has been removed as writing PROPKA input files is no longer supported.

propka.lib.configuration_compare(conf)[source]

TODO - figure out what this function does.

propka.lib.generate_combinations(interactions)[source]

Generate combinations of interactions.

Parameters

interactions – list of interactions

Returns

list of combinations

propka.lib.get_sorted_configurations(configuration_keys)[source]

Extract and sort configurations.

Parameters

configuration_keys – list of configuration keys

Returns

list of configurations

propka.lib.loadOptions(args=None)[source]

Load the arguments parser with options. Note that verbosity is set as soon as this function is invoked.

Parameters

args – list of arguments

Returns

argparse namespace

propka.lib.make_combination(combis, interaction)[source]

Make a specific set of combinations.

Parameters
  • combis – list of combinations

  • interaction – interaction to add to combinations

Returns

list of combinations

propka.lib.make_grid(min_, max_, step)[source]

Make a grid across the specified tange.

TODO - figure out if this duplicates existing generators like range or numpy function.

Parameters
  • min – minimum value of grid

  • max – maximum value of grid

  • step – grid step size

propka.lib.make_molecule(atom, atoms)[source]

Make a molecule from atoms.

Parameters
  • atom – one of the atoms

  • atoms – a list of the remaining atoms

Returns

list of atoms

propka.lib.make_tidy_atom_label(name, element)[source]

Returns a ‘tidier’ atom label for printing to the new PDB file.

Parameters
  • name – atom name

  • element – atom element

Returns

string

propka.lib.parse_res_string(res_str)[source]

Parse a residue string.

Parameters

res_string – residue string in format “chain:resnum[inscode]”

Returns

a tuple of (chain, resnum, inscode).

Raises

ValueError if the input string is invalid.

propka.lib.protein_precheck(conformations, names)[source]

Check protein for correct number of atoms, etc.

Parameters

names – conformation names to check

propka.lib.resid_from_atom(atom)[source]

Return string with atom residue information.

Parameters

atom – atom to generate string for

Returns

string

propka.lib.split_atoms_into_molecules(atoms)[source]

Maps atoms into molecules.

Parameters

atoms – list of atoms

Returns

list of molecules