Minimization programs for potential energy calculations in crystals and isolated molecules and macromolecules