added bookkeeping for RPA, changed routine calculate_matels_full, added namelist input