6 real(8) function rfinpc(ld,rfmt1,rfir1,rfmt2,rfir2)
real(8), dimension(:), allocatable cfunir
real(8), dimension(:,:), allocatable wr2cmt
integer, dimension(maxatoms *maxspecies) idxis
integer, dimension(maxspecies) nrcmt
integer, dimension(maxspecies) nrcmti