pair_tersoff code question

Hi Lammps users,

I am trying to modify the pair_tersoff code. I want to be able to tell if
atom i is a carbon.

In pair_tersoff.cpp the atom types atom i and j are given like this:
itype = map[type[i]];

The elements read from the coeff statement are stored in the elements
array which is a string array.

How do you get from the integer value of itype to the string value in
elements? Does itype give the index of elements? (e.g. itype=x and
element[x]="C")

Thanks for your help,
John

How do you get from the integer value of itype to the string value in
elements? Does itype give the index of elements? (e.g. itype=x and
element="C")

yes, this is correct. It is the element string you specified
in the pair_coeff command (at the end).

Steve