In this study we present the coarse-graining of one polymer chain in a melt to a single dimer. By using the projector operator formalism we derive the equation of motions for the dimer. The different forces that occur in this equation of motion are calculated from molecular dynamics simulations of the microscopic model, using constraint forces to fix the dimer configuration. The mean constraint force serves as the conserved part of the interaction, whereas the time correlation of the constraint force fluctuation leads to the nonconserved interactions: the dissipative and fluctuating forces. Using the configurational dependent coarse-grained interactions we have performed stochastic dynamics simulations of the dimer. Dimer properties of the microscopic and the coarse-grained model are shown to be in reasonable agreement. We also discuss the application of the framework to coarse-graining polymer melts into more detail, i.e., beyond the dimer.