def rkm_fact(ielm):
    """
    Following the Wien2K scheme for the muffin-tin radius adjustment.
    These factors are used to compute the relative size of two atoms.
    I.e. for a pair of atoms of ielm and jelm separated by a distance
    D (and Radius(ielm)+Radius(jelm) > D) then the new radii are 
    computed as

      Radius(ielm) = 0.5*(1+(rkm_fact(ielm)-rkm_fact(jelm))*0.005)*D
      Radius(jelm) = 0.5*(1-(rkm_fact(ielm)-rkm_fact(jelm))*0.005)*D

    This function returns the rkm_fact factors that Wien2K uses.
    See Wien2K setrmt_lapw for details.
    """
    if ielm == 3 or ielm == 13 or ielm == 14:
      # Li, Al, Si
      return 45.0
    elif ielm == 4 or ielm == 5:
      # Be, B
      return 50.0
    elif ielm == 6 or ielm == 15:
      # C, P
      return 55.0
    elif ielm == 7 or ielm == 16:
      # N, S
      return 60.0
    elif (ielm == 8 or (ielm >= 11 and ielm <= 13) or ielm == 17 or 
          ielm == 19 or ielm == 20 or ielm == 37 or ielm == 38 or
          ielm == 55 or ielm == 56):
      # O, Na, Mg, Cl, K, Ca, Rb, Sr, Cs, Ba
      return 65.0
    elif ielm == 9:
      # F
      return 70.0
    elif ((ielm >= 21 and ielm <= 24) or (ielm >= 39 and ielm <= 42) or
          (ielm >= 31 and ielm <= 35)):
      # Sc-Cr, Ga-Br, Y-Mo
      return 75.0
    elif ((ielm >= 25 and ielm <= 30) or (ielm >= 44 and ielm <= 53) or 
          ielm == 57 or ielm == 58 or (ielm >= 72 and ielm <= 75)):
      # Mn-Zn, Ru-I, La, Ce, Hf-Re
      return 80.0
    elif ((ielm >= 59 and ielm <= 71) or (ielm >= 76 and ielm <= 85) or
          (ielm >= 87 and ielm <= 118)):
      # Pr-Lu, Os-At, Fr-Og
      return 85.0
    else:
      return 60.0