An efficient approach for the calculation of frequencies in macromolecules