A molecular assay based on polymerase chain reaction (PCR) for the qualitative and differential detection of herpes simplex virus type 1 (HSV-1) and type 2 (HSV-2) DNA in clinical specimens. This technique is the most sensitive for diagnosing active infection, as it can detect very small amounts of the virus in vesicular fluid, body fluids, or lesion smears.