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. |
|
Generate combinations of interactions. |
|
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. |
Classes
|
- 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: Iterable[T]) List[List[T]] [source]
Generate combinations of interactions.
- Parameters:
interactions – list of interactions
- Returns:
list of combinations
- propka.lib.loadOptions(args=None) Options [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: List[List[T]], interaction: T) List[List[T]] [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_: Number, max_: Number, step: Number) Iterator[Number] [source]
Make a grid across the specified tange.
Like range() for integers or numpy.arange() for floats, except that max_ is not excluded from the range.
- Parameters:
min – minimum value of grid
max – maximum value of grid
step – grid step size
- propka.lib.make_molecule(atom: Atom, atoms: List[Atom])[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: str) Tuple[str, int, 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: Dict[str, ConformationContainer], names: Iterable[str])[source]
Check protein for correct number of atoms, etc.
- Parameters:
names – conformation names to check