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 apandas.DataFrame
namedPropkaTraj.pkas
.- Parameters:
atomgroup (
MDAnalysis.core.universe.Universe
orMDAnalysis.core.groups.AtomGroup
) – Group of atoms containing the residues for pKa analysis. Please note thatMDAnalysis.core.groups.UpdatingAtomGroup
are not supported and will be automatically converted toMDAnalysis.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 inPropkaTraj.results.failed_frames_log
. IfFalse
raise aRuntimeError
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:
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
andcurrent.propka_input
file. These are the temporary files for the final frame and can be removed safely.Current known issues:
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