Hello,

I have created a custom EAM style for energy evaluation only. I have duplicated pair_eam.h/cpp to pair_eam_test.h/cpp and deactivated the force addition. Otherwise, pair_eam_test works just like pair_eam.

I am running into an error when trying to implement eam_test on only-dissimilar atom types (in this code 9-11, but not 9-9 or 11-11). The following details how I tried to implement and troubleshoot this, and where I got stuck. I was checking if there is a more straightforward way to go about doing this. Help is greatly appreciated.

There were no errors with the following code, where eam_test was defined on atom types 9-9:

pair_style hybrid/overlay eam eam_test lj/cut/coul/long 10.0 10.0

pair_coeff 11 11 eam Cu_u3.eam

pair_coeff 9 9 eam_test Cu_u3.eam

However, this is my desired input and resulting error:

pair_style hybrid/overlay eam eam_test lj/cut/coul/long 10.0 10.0

pair_coeff 11 11 eam Cu_u3.eam

pair_coeff 9 11 eam_test Cu_u3.eam

…

ERROR: Incorrect args for pair coefficients (…/pair_eam_test.cpp:406)

Last command: pair_coeff 9 11 eam_test Cu_u3.eam

I traced this to the following block in pair_eam_test.cpp and commented out the error:

int count = 0;

for (int i = ilo; i <= ihi; i++) {

for (int j = MAX(jlo,i); j <= jhi; j++) {

if (i == j) {

setflag[i][i] = 1;

map[i] = ifuncfl;

atom->set_mass(FLERR,i,funcfl[ifuncfl].mass);

count++;

}

scale[i][j] = 1.0;

}

}

//if (count == 0) error->all(FLERR,“Incorrect args for pair coefficients”);

I then tried to run the desired block of code again and got a new error:

pair_style hybrid/overlay eam eam_test lj/cut/coul/long 10.0 10.0

pair_coeff 11 11 eam Cu_u3.eam

pair_coeff 9 11 eam_error Cu_u3.eam

…

ERROR: Incorrect args for pair coefficients (…/pair_hybrid_overlay.cpp:102)

Last command: pair_coeff 9 11 eam_ecam Cu_u3.eam

I then commented out the following error from pair_hybrid_overlay.cpp:

int count = 0;

for (int i = ilo; i <= ihi; i++) {

for (int j = MAX(jlo,i); j <= jhi; j++) {

if (none) {

setflag[i][j] = 1;

nmap[i][j] = 0;

count++;

} else if (styles[m]->setflag[i][j]) {

int k;

for (k = 0; k < nmap[i][j]; k++)

if (map[i][j][k] == m) break;

if (k == nmap[i][j]) map[i][j][nmap[i][j]++] = m;

setflag[i][j] = 1;

count++;

}

}

}

//if (count == 0) error->all(FLERR,“Incorrect args for pair coefficients”);

This was the final error, which came after the run command, and where I finally got stuck.

ERROR: Pair hybrid sub-style is not used (…/pair_hybrid.cpp:488)

Last command: run 1000

Again, I was checking if there was a more straightforward way of going about this without messing up the structure of the source code. Thank you for any help,

Anne