Coarse-grained models have long been considered indispensable tools in the investigation of biomolecular dynamics and assembly. However, the process of simulating such models is arduous because unconventional force fields and particle attributes are often needed, and some systems are not in thermal equilibrium. Although modern molecular dynamics programs are highly adaptable, software designed for preparing all-atom simulations typically makes restrictive assumptions about the nature of the particles and the forces acting on them. Consequently, the use of coarse-grained models has remained challenging. Moltemplate is a file format for storing coarse-grained molecular models and the forces that act on them, as well as a program that converts moltemplate files into input files for LAMMPS, a popular molecular dynamics engine. Moltemplate has broad scope and an emphasis on generality. It accommodates new kinds of forces as they are developed for LAMMPS, making moltemplate a popular tool with thousands of users in computational chemistry, materials science, and structural biology. To demonstrate its wide functionality, we provide examples of using moltemplate to prepare simulations of fluids using many-body forces, coarse-grained organic semiconductors, and the motor-driven supercoiling and condensation of an entire bacterial chromosome.