propka.lib¶
Set-up of a PROPKA calculation¶
Implements many of the main functions used to call PROPKA.
Functions
|
Build an argument parser for PROPKA. |
|
TODO - figure out what this function does. |
|
Generate combinations of interactions. |
|
Extract and sort configurations. |
|
Load the arguments parser with options. |
|
Make a specific set of combinations. |
|
Make a grid across the specified tange. |
|
Make a molecule from atoms. |
|
Returns a 'tidier' atom label for printing to the new PDB file. |
|
Parse a residue string. |
|
Check protein for correct number of atoms, etc. |
|
Return string with atom residue information. |
|
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.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