A new implementation of the adaptive biasing force (ABF) method is described. This implementation supports a wide range of collective variables and can be applied to the computation of multidimensional energy profiles. It is provided to the community as part of a code that implements several analogous methods, including metadynamics. ABF and metadynamics have not previously been tested side by side on identical systems. Here, numerical tests are carried out on processes including conformational changes in model peptides and translocation of a halide ion across a lipid membrane through a peptide nanotube. On the basis of these examples, we discuss similarities and differences between the ABF and metadynamics schemes. Both approaches provide enhanced sampling and free energy profiles in quantitative agreement with each other in different applications. The method of choice depends on the dimension of the reaction coordinate space, the height of the barriers, and the relaxation times of degrees of freedom in the orthogonal space, which are not explicitly described by the chosen collective variables.