Hi all,
I am trying to incorporate a new potential into Lammps which is a local-density dependent potential and is constructed on the same lines as the pair_style eam.
The very first thing I did was to modify this section of pair_eam.cpp :
int count = 0;
for (int i = ilo; i <= ihi; i++) {
for (int j = MAX(jlo,i); j <= jhi; j++) {
//if (i == j) {
setflag[i][j] = 1;
map[i] = ifuncfl;
printf("\n Map [%d] = %d\n", i, map[i]);
atom->set_mass(i,funcfl[ifuncfl].mass);
count++;
//}
}
}
As you can see, I commented out the check for i==j types so that (I believe) this can now be used for a general case of i != j. However, my work runs into scenarios where the potentials for 1,2 and 2,1 are different.
So, my question is this:
a ) Consider 2 atom types 1 and 2 and 4 different potential files P11.eam, P12.eam, P21.eam, P22.eam. I wish to achieve the following:
central atom type neighbour atom type potential file to be used
1 1 P11.eam
1 2 P12.eam
2 1 P21.eam
2 2 P22.eam
can I do this by writing the following:
pair_coeff 1 * P12.eam
pair_coeff 1 1 P11.eam
pair_coeff 2 * P21.eam
pair_coeff 2 2 P22.eam
because, from what I understand, when I set coeffs for (1,2) it automatically sets the same for (2,1) and vice-versa. So, in line 3 above both (2,1) and (1,2) are now set to read values from P21.eam and the original assignment for P12.eam is lost.
This brings me to :
b) Is there any way to get around this, not only for this specific potential that I am trying to design but for any other pair potential present in Lammps. In other words, if I want (1,2) and (2,1) to have different pair_coeffs, how do I do that ?
Thanks