$affinity is function to assign the affinity of each material. The total number of the affinities set here should be as same as the total region number and they should be set up in one column. For examples:
$affinity 4.05 1.25 2.35
This means there are three materials in total. the affinity of the first material is 4.05 eV
The affinity of the second material is 1.25 eV, and the last one is 2.35 eV.