We present a new sink particle algorithm developed for the adaptive mesh refinement code RAMSES. Our main addition is the use of a clump finder to identify density peaks and their associated regions (the peak patches). This allows us to unambiguously define a discrete set of dense molecular cores as potential sites for sink particle formation. Furthermore, we develop a new scheme to decide if the gas in which a sink could potentially form, is indeed gravitationally bound and rapidly collapsing. This is achieved using a general integral form of the virial theorem, where we use the curvature in the gravitational potential to correctly account for the background potential. We detail all the necessary steps to follow the evolution of sink particles in turbulent molecular cloud simulations, such as sink production, their trajectory integration, sink merging and finally the gas accretion rate on to an existing sink. We compare our new recipe for sink formation to other popular implementations. Statistical properties such as the sink mass function, the average sink mass and the sink multiplicity function are used to evaluate the impact that our new scheme has on accurately predicting fundamental quantities such as the stellar initial mass function or the stellar multiplicity function.