The quasicontinuum method is a way of reducing the number of degrees of freedom in an atomistic simulation by removing the majority of the atoms in regions of slowly varying strain fields. Due to the different ways the energy of the atoms is calculated in the coarse-grained regions and the regions where all the atoms are present, unphysical forces called "ghost forces" arise at the interfaces. Corrections may be used to almost remove the ghost forces, but the correction forces are nonconservative, ruining energy conservation in dynamic simulations. We show that it is possible to formulate the quasicontinuum method without these problems by introducing a buffer layer between the two regions of space. The method is applicable to short-ranged potentials in the face-centered cubic, body-centered cubic, and hexagonal close-packed crystal structures.