API Documentation

class propkatraj.PropkaTraj(atomgroup, select='protein', skip_failure=False, **kwargs)[source]

Per residue pKa analysis of a trajectory.

Runs propka on the titrateable residues of the selected AtomGroup on each frame in the trajectory. Run the analysis with PropkaTraj.run(), and pKa values will be stored in a pandas.DataFrame named PropkaTraj.pkas.

Parameters
  • atomgroup (MDAnalysis.core.universe.Universe or MDAnalysis.core.groups.AtomGroup) – Group of atoms containing the residues for pKa analysis. Please note that MDAnalysis.core.groups.UpdatingAtomGroup are not supported and will be automatically converted to MDAnalysis.core.groups.AtomGroup.

  • select (str) – Selection string to use for selecting a subsection of atoms to use from the input atomgroup. Note: passing non-protein residues to propka may lead to incorrect results (see notes). [protein]

  • skip_failure (bool) – If set to True, skip frames where propka fails. A list of failed frames is made available in PropkaTraj.results.failed_frames_log. If False raise a RuntimeError exception on those frames. [False]

times

times of the successfully analyzed trajectory frames

Type

np.ndarray

results.pkas

computed pKa’s for each residue as a column and each frame as a row; the column names are the residue numbers

Type

pd.DataFrame

results.num_failed_frames

If PROPKA failed for any frames, contains number of failed frames. (Needs skip_failure to be True.)

Type

int

results.failed_frames_log

Frame indices of failed frames, if skip_failure set to True

Type

list

results.failed_times

Times of failed frames.

Type

list

Notes

Currently only the default behaviour supplemented with the –quiet flag of propka is used.

Temporary propka files are written in the current working directory. This will leave a current.pka and current.propka_input file. These are the temporary files for the final frame and can be removed safely.

Current known issues:

  1. Due to the current behaviour of the MDAnalysis PDBWriter, non-protein atoms are written to PDBs using ATOM records instead of HETATM. This is likely to lead to undefined behaviour in propka, which will likely expect HETATM inputs. We recommend users to only pass protein atoms for now. See the following issue for more details: https://github.com/Becksteinlab/propkatraj/issues/24