v2.0.0 - 2023-09-03
[2.0.0] - 2023-09-03
Summary
This is a major refactoring of the ProLIF codebase introducing new features, but also breaking changes:
- Visualisation functions are now available through the
Fingerprintobject:plot_3d,plot_barcode,plot_lignetwork. Aprolif.display_residuesfunction is also available for easier debugging of structure preparation. - Fingerprint objects now store interaction metadata: distances, angles, and atom indices, accessible through
Fingerprint.ifp. - ProLIF can now generate count-vectors if requested to (i.e. enumerate all the occurrences of an interaction instead of stopping at the first one) by specifying
Fingerprint(count=True). - A new
parametersargument in theFingerprintclass allows providing custom parameters for interactions (rather than having to create new interaction classes). - The tutorials have been rewritten and reorganized.
- The multiprocessing backend has been switched to
multiprocessanddillfor better support in notebooks. - Refer to the
Removedsection for a list of breaking changes.
Added
- Added a
display_residuesfunction to quickly visualize the residues in aMolecule
object. - Added a
Complex3Dclass for plotting interactions in 3D. Added the corresponding
Fingerprint.plot_3dmethod to generate the plot directly from an FP object. - Added a
Barcodeclass for plotting interactions. Added the corresponding
Fingerprint.plot_barcodemethod to generate the plot directly from an FP object. - Added a
countargument inFingerprint. Ifcount=True, enumerates all groups of
atoms that satisfy interaction constraints (instead of stopping at the first one),
allowing users to generate a count-fingerprint. TheFingerprint.to_dataframemethod
has been modified accordingly, and aFingerprint.to_countvectorsmethod has been
added to generate a list of RDKit'sUIntSparseIntVectfrom the count-fingerprint.
The visualisation scripts have been updated to display the occurence with the shortest
distance when a count-fingerprint is being used. - Added a
parametersargument inFingerprintto easily update the parameters used
by an interaction, instead of defining a new interaction class (Issue #118). - Added new abstract interaction classes
SingleAngleandDoubleAngleto more easily
create custom interactions. - Added the
vdwradiiparameter to theVdWContactinteraction class to update the
radii it uses. - Added the
Fingerprint.plot_lignetworkmethod to generate aLigNetworkplot directly. - Added
LigNetwork.from_fingerprintto generate the ligplot from aFingerprint
instance. Added adisplay_allparameter for displaying all interactions instead
of only the shortest one for a given pair of residues. Addeduse_coordinatesand
flatten_coordinatesto control how the ligand structure is displayed. - Added support for displaying peptides with the
LigNetwork. - Added
Fingerprint.metadatato generate a dictionary containing metadata about
interactions between two residues. ReplacesFingerprint.bitvector_atoms. - Added a
vicinity_cutoffparameter inFingerprintto control the distance cutoff
used to automatically restrict the IFP calculation to residues within the specified
range of the ligand. - Added a
metadatamethod to the baseInteractionclass to easily generate metadata
for custom interactions. - Added an
Interaction.invert_classclassmethod to easily invert the role of the
ligand and protein residues in an interaction, e.g. to create a donor class from an
acceptor class.
Changed
- The tutorials have been overhauled and should now be much easier to navigate.
- The multiprocessing and pickling backends have been switched to
multiprocessand
dillrespectively, and the parallel implementation has been improved. Users should
now be able to define custom interactions in Jupyter notebooks, IPython and so on
without any issue (Issue #117, Issue #86). - The
LigNetworkplot now displays the distance for each interaction on mouse hover. - Changed the format of the
Fingerprint.ifpattribute to be a dictionary indexed by
frame/structure index. The values are customIFPdictionaries that can be more
easily indexed by using residue identifier strings (e.g.ALA216.A) rather than
ResidueIdobjects. Each entry contains complete interaction metadata instead of just
atom indices. - All interaction classes now return more complete details about the interaction (e.g.
distances, angles, atom indices in the residue and parent molecule). - Changed the default color for
VanDerWaalsinteractions in the builtin plots. - Converting the IFP to a dataframe with atom indices has been optimized and now runs
about 5 times faster (Issue #112, PR #113 by @ReneHamburger1993). Note: discarded
by the subsequent updates to the codebase which removed the ability to have
atom indices in the dataframe. - Various changes related to packaging, code formatting, linting and CI pipelines
(PR #114).
Fixed
- Fixed pickling properties on RDKit molecules for Windows.
Removed
- Removed the
return_atomsargument inFingerprint.to_dataframe. Users should
directly useFingerprint.ifpinstead (the documentation's tutorials have been
updated accordingly). - Removed the
Fingerprint.bitvector_atomsmethod, replaced byFingerprint.metadata. - Removed the
__wrapped__attribute on interaction methods that are available
from theFingerprintobject. These methods now accept ametadataparameter
instead. - Removed
LigNetwork.from_ifpin favor ofLigNetwork.from_fingerprint. - Removed the
match3Dparameter inLigNetwork. Replaced byuse_coordinatesand
flatten_coordinatesto give users more control and allow them to provide their own
2D coordinates.