joined get_JJp_list and get_JJm_list (wan_ham.F90)