A major challenge for a bacteriophage is to quickly pack lengthy (relative to its size) DNA in newly formed phage heads (capsids). This packaging involves “pressurizing” this DNA in the available space.
A good place to start reading about it is this review by Rao and Feiss: The Bacteriophage DNA Packaging Motor (Annu. Rev. Genet. 2008. 42:647–81).
Once you get the big picture, follow these proteins in phage genomes in the Phage Packaging Machinery subsystem.
An excerpt from the paper:
Phage terminases are DNA packaging enzymes that contain the ATPase activity that powers DNA translocation. Most terminases also contain the endonuclease that, during DNA packaging, cuts concatemeric DNA into genome lengths. Terminases must also recognize viral DNA in a pool that may also include host DNA. Terminases generally are hetero-oligomers of a small protein involved in DNA recognition, and a large protein containing the translocation ATPase, the endonuclease, and a motif for docking at the portal vertex (14) (Table 1; Figure 1). Alignments show that terminase large subunits are descended from a common ancestor (19, 41, 105). Remarkably, a herpes virus DNA packaging ATPase falls into this family (120).