celllist_scan_atoms implemented to avoid code duplication while forces and energy computing