README: propkatraj
propkatraj.py can be used to computationally estimate pKa values for
protein residues. We use an ensemble approach where many different
conformations are sampled with equilibrium molecular dynamics
simulations. We then apply the fast heuristic pKa predictor
PROPKA 3 to individual
frames of the trajectory. By analysing the statistics of the pKa
predictions a more consistent picture emerges than from a pKa
prediction of a single static conformation.
Required software
- PROPKA 3 (used as a Python package)
- MDAnalysis
- pandas
See INSTALL.md for how to install everything.
Usage
The propkatraj.PropkaTraj class contains all
functionality. Import it with
from propkatraj import PropkaTraj
It takes a MDAnalysis.AtomGroup or MDAnalysis.Universe instance as an
argument to initialize and runs PROPKA on each frame of the trajectory when
calling the run() method. See help(PropkaTraj) for more details.
pkatraj = PropkaTraj(atomgroup, select='protein', skip_failure=False)
Runs :program:`propka` on the titrateable residues of the selected AtomGroup
on each frame in the trajectory.
Parameters
----------
atomgroup : :class:`MDAnalysis.Universe` or :class:`MDAnalysis.AtomGroup`
Group of atoms containing the residues for pKa analysis. Please note
that :class:`MDAnalysis.UpdatingAtomGroup` are not supported and will
be automatically converted to :class:`MDAnalysis.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
:program:`propka` may lead to incorrect results (see notes). [`protein`]
skip_failure : bool
If set to ``True``, skip frames where :program:`propka` fails. A list
of failed frames is made available in
:attr:`PropkaTraj.failed_frames_log`. If ``False`` raise a
RuntimeError exception on those frames. [`False`]
Notes
-----
Currently only the default behaviour supplemented with the `--quiet` flag
of :program:`propka` is used.
Temporary :program:`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 :program:`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
pkatraj.run()
Perform the calculation
Parameters
----------
start : int, optional
start frame of analysis
stop : int, optional
stop frame of analysis
step : int, optional
number of frames to skip between each analysed frame
verbose : bool, optional
Turn on verbosity
Calling the run() method creates a pandas.DataFrame,
accessed through results.pkas, which contains the time as the first column
and the residue numbers as subsequent columns. For each time step, the
predicted pKa value for this residue is stored. Process the DataFrame to
obtain statistics as shown in the Documentation. For example,
you can get a summary of the statistics of the timeseries in the following
manner:
pkatraj.results.pkas.describe()
Documentation
See the Jupyter notebook
docs/propkatraj-example.ipynb
for how to use propkatraj.PropkaTraj on an example trajectory and
how to plot the data with seaborn.
Citation
If you use propkatraj in published work please cite Reference 1 for
PROPKA 3.1 and Reference 2 for the ensemble method itself. Reference 3
is for the software if you need a specific software citation.
-
C. R. Søndergaard, M. H. M. Olsson, M. Rostkowski, and J. H. Jensen. Improved treatment of ligands and coupling effects in empirical calculation and rationalization of pKa values. J Chemical Theory and Computation, 7(7):2284–2295, 2011. doi: 10.1021/ct200133y.
-
C. Lee, S. Yashiro, D. L. Dotson, P. Uzdavinys, S. Iwata, M. S. P. Sansom, C. von Ballmoos, O. Beckstein, D. Drew, and A. D. Cameron. Crystal structure of the sodium-proton antiporter NhaA dimer and new mechanistic insights. J Gen Physiol, 144(6):529–544, 2014. doi: 10.1085/jgp.201411219.
-
David Dotson, Irfan Alibay, Rick Sexton, Shujie Fan, Armin Zijajo, Oliver Beckstein. (2020). Becksteinlab/propkatraj: 1.1.x. Zenodo. https://doi.org/10.5281/zenodo.3228425
Contact
Please raise issues in the issue tracker.
Metadata
Release files for propkatraj 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| propkatraj-2.0.2.tar.gz | 400.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| propkatraj-2.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 792.2 kB
Release files / propkatraj-2.0.2.tar.gz
| Download URL | propkatraj-2.0.2.tar.gz |
|---|---|
| Size | 400.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64bde8973f4f1c0d6d5c209a2074b60349380430932738bb960a002df8ceaf13
|
|
BLAKE2b-256 checksum How to use checksums |
9120d5f7fece056ba0bccf610f7a9bbca1595a199977ea7ae8b3a2a30081d1ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logRelease files / propkatraj-2.0.2-py3-none-any.whl
| Download URL | propkatraj-2.0.2-py3-none-any.whl |
|---|---|
| Size | 391.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a77e123a0110fb51c3a547e59904c15ce6040af4bf8b59662804c79ea87f66d0
|
|
BLAKE2b-256 checksum How to use checksums |
4975fe47f55a66615ff9ed73b8123d7f830c4e606a8c2b1e7ca38833e5aced50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency log