ProLIF uses MDAnalysis to process MD simulations. You typically load a Universe object containing your topology and trajectory, then define AtomGroup selections for your interacting components (e.g., two protein segments or a peptide and a protein).
Important: If your input files (like PDBs) lack explicit bond orders or formal charges, you must call .guess_bonds() on your MDAnalysis selections to ensure compatibility with ProLIF/RDKit.
import MDAnalysis as mda
import prolif as plf
# Load topology and trajectory
u = mda.Universe(plf.datafiles.TOP, plf.datafiles.TRAJ)
# Create selections
small_protein_selection = u.select_atoms("resid 119:152")
large_protein_selection = u.select_atoms(
"protein and not group peptide", peptide=small_protein_selection
)
# Crucial for files without bond information
small_protein_selection.guess_bonds()
large_protein_selection.guess_bonds()