Pharmacophore models are widely used in computational drug discovery (e.g., in the virtual screening of drug molecules) to capture essential information about interactions between ligands and a target protein. Generating pharmacophore models from protein structures is typically a manual process, but there has been growing interest in automated pharmacophore generation methods. Automation makes feasible the processing of large numbers of protein conformations, such as those generated by molecular dynamics (MD) simulations, and thus may help achieve the longstanding goal of incorporating protein flexibility into virtual screening workflows. Here, we present AutoPH4, a new automated method for generating pharmacophore models based on protein structures; we show that a virtual screening workflow incorporating AutoPH4 ranks compounds more accurately than any other pharmacophore-based virtual screening workflow for which results on a public benchmark have been reported. The strong performance of the virtual screening workflow indicates that the AutoPH4 component of the workflow generates high-quality pharmacophores, making AutoPH4 promising for use in future virtual screening workflows as well, such as ones that use conformations generated by MD simulations.