fix adapt for pair_style "lj/charmm/coul/long"

please always reply to the mailing list, not only individual people.
we want to have resolutions of problems stored in the mailing list
archives. thanks.

Dear Axel,

     Thank you very much for your reply, actually I have recompiled the
edited one and with that I am getting the error " ERROR: Variable name for
fix adapt does not exist (../fix_adapt.cpp:197)"

I have edited the extract(), which is at the end of
"/scr/pair_lj_charmm_coul_long.cpp"

the original extract() was like this
/* ---------------------------------------------------------------------- */

void *PairLJCharmmCoulLong::extract(const char *str, int &dim)
{
  dim = 2;
  if (strcmp(str,"lj14_1") == 0) return (void *) lj14_1;
  if (strcmp(str,"lj14_2") == 0) return (void *) lj14_2;
  if (strcmp(str,"lj14_3") == 0) return (void *) lj14_3;
  if (strcmp(str,"lj14_4") == 0) return (void *) lj14_4;

  dim = 0;
  if (strcmp(str,"implicit") == 0) return (void *) &implicit;
  if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;

  return NULL;
}

for this original extract() I have added the following two lines in
"dim=2" section
" if (strcmp(str,"epsilon") == 0) return (void *) epsilon;
  if (strcmp(str,"eps14") == 0) return (void *) eps14;"
as "epsilon" and "eps14" are the parameters that one can vary for the lj
of charmm

now my new extract() is like this
/* ---------------------------------------------------------------------- */
void *PairLJCharmmCoulLong::extract(const char *str, int &dim)
{
  dim = 2;
  if (strcmp(str,"lj14_1") == 0) return (void *) lj14_1;
  if (strcmp(str,"lj14_2") == 0) return (void *) lj14_2;
  if (strcmp(str,"lj14_3") == 0) return (void *) lj14_3;
  if (strcmp(str,"lj14_4") == 0) return (void *) lj14_4;
  if (strcmp(str,"epsilon") == 0) return (voon id *) epsilon;

there is a typo here.

  if (strcmp(str,"eps14") == 0) return (void *) eps14;"

  dim = 0;
  if (strcmp(str,"implicit") == 0) return (void *) &implicit;
  if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;

  return NULL;
}

I hope, I am on the correct track, if not please suggest me a away.

if i apply this change to my checkout of LAMMPS and recompile, it works.

thus, either you edited the wrong file, used the wrong binary, have a
typo in either the source or the input deck.

axel.

Dear axel,

Thank you very much for your reply, sorry for late reply as I was away form my work place I couldn’t get back to you immediately.
As per your suggestion I have checked my input deck and recompilation of edited files these seem to be correct. But I am not sure whether I have edited correct files or not. Actually I am using pair_style “lj/charmm/coul/long” and edited the files related to this pair_style in “src” directory i.e., pair_lj_charmm_coul_long.cpp and the one with same name in “KSPACE” folder.

Did I edit correct files ?

Thank you,

Ramesh