Package: rafm
rafmcomputes per-model measures such as expected globalLDDTassociated with atomic-level accuracy for AlphaFold models frompLDDTconfidence scores.InstallationYou can installrafmviapipfromPyPI:$pipinstallrafmUsagerafm –helplists all commands. Current commands are:plddt-statsCalculate stats on bounded pLDDTs from list of AlphaFold model files.
in either PDB or mmCIF format.Options:–criterion FLOATThe cutoff value on truncated pLDDT for possible utility.
[default: 91.2]–min-length INTEGERThe minimum sequence length for which to calculate truncated stats.
[default: 20]–min-count INTEGERThe minimum number of truncatedpLDDTvalues for which to
calculate stats [default: 20]–lower-bound INTEGERThepLDDTvalue below which stats will not be calculated.
[default: 80]–upper-bound INTEGERThepLDDTvalue above which stats will not be calculated.
[default: 100]–file-stem TEXTOutput file name stem. [default: rafm]Output columns (whereNNis the bounds specifier, default: 80):residues_in_pLDDTThe number of residues in the AlphaFold model.pLDDT_meanThe mean value of pLDDT over all residues.pLDDT_medianThe median value of pLDDT over all residues.pLDDTNN_countThe number of residues within bounds.pLDDTNN_fracThe fraction of pLDDT values within bounds, if the
count is greater than the minimum.pLDDTNNN_meanThe mean of pLDDT values within bounds, if the
count is greater than the minimum.pLDDTNN_medianThe median of pLDDT values within bounds, if the
count is greater than the minimum.LDDT_expectThe expectation value of globalLDDTover the
residues withLDDTwithin bounds.  Only
produced if default bounds are used.passingTrue if the model passed the criterion, False
otherwise.  Only produced if default bounds are
used.fileThe path to the model file.plddt-select-residuesWrites a tab-separated file of residues from passing models,
using an input file of values selected byplddt-stats.
Input options are the same asplddt-stats.Output columns:filePath to the model file.residueResidue number, starting from 0 and numbered
sequentially.  Note thatallresidues will be
written, regardless of bounds set.pLDDTpLDDT value for that residue.plddt-plot-distsPlot the distributions on the bounded pLDDT and residues in
models that pass the selection criteria.Input Options:out-file-typePlot file extension of a type thatmatplotlibunderstands,
(e.g., ‘jpg’, ‘pdf’) [default: png]residue-criterionPer-residue cutoff on usability (for plot only).Outputs:When applied to set of “dark” genomes with no previous PDB entries, the
distributions of medianpLDDTscores with a lower bound of 80 and
per-residuepLDDTscores with a minimum of 80 looks like this:statsProduce a set of summary stats on results of runs.  See also the global
stats filerafm_stats.json.Statistical BasisThe default parameters were chosen to select forLDDTvalues of greater
than 80 on a set of crystal structures obtained since AlphaFold was trained.
The distributions ofLDDTscores for the passing and non-passing sets, along
with an (overlapping) set of AlphaFold model files at 100% sequence identity over
at least 80% of the sequence looks like this:The markers on thex-axis refer to the size of conformational changes
observed in conformational changes in various protein crystal structures:CALMBetween calcium-bound and calcium-free calmodulin
(depicted in the logo image above).ERK2Between unphosphorylated and doubly-phosphorylated ERK2 kinase.HBBetween R- and T-state hemoglobinMBBetween carbonmonoxy- and deoxy-myoglobinThe value ofLDDT>= 80 we selected as the minimum value that was likely to
prove useful for virtual screening.  The per-residue value ofpLDDT>= 80
was also chosen as the minimum likely to give the correct side-chain rotamers
for a surface defined by contacts between two residues. A choice of 91.2 as a
criterion leads to the following confusion matrix versus a set of post-training
crystal structures:At a correlation coefficient of 0.71, this correlation isn’t great, but enough
to demonstrate a usable sensitivity.  After we fix a few problems with the
alignments, it may go a bit higher but our feeling is probably not
more than about 0.8.  The support will get better, but the criterion on this
metric seems unlikely to change.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,rafmis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from theUNM Translational Informatics Python Cookiecuttertemplate.rafmwas written by Joel Berendzen and Jessica Binder.