Hi Axel,
I am working on this project. I had a question based on your reply which
is as follows.
I am modifying the fix_adapt.cpp file as below.
why modify fix adapt? why not simply write a new fix that does *only* what
you want to do?
In FixAdapt::setmask(), I have set the mask to POST_FORCE() because I wish
to extract the values pairwise force calculations. I have declared another
instance of the class FixAdapt::setup_post_force(int vflag) and used the
extract function with two arguments, string and integer. I have declared
setup_post_force in the header file for fix adapt.
I also went to pair_lj_cut.cpp and under the PairLJCut::extract class,
declared another if condition for a string to return a pointer value.
The idea is to call for the fix adapt function from the input file so that
I can check if the value of the pointer from pair_lj_cut is being indeed
extracted. I have some print commands to that effect to check if the code
indeed goes into the required loops.
this sounds confused and as if you still don't have a sufficient
understanding of how LAMMPS works internally.
Will this be an acceptable approach in going ahead with the implementation?
you may be able to make it work, but what you describe is a very ugly and
hackish approach. you may get it to work, but don't expect any love or
support from people like me, that already have to spend too much of their
time cleaning up such hackish and ill-designed code.
i think that, both, steve and i have recommended to rather write a compute
similar to those in the USER-TALLY package, as that would transparently
generate a callback into the pairwise force loop and would automatically
work without modifying any existing pair style codes and be compatible with
most pairwise additive potentials out of the box.
the choice of what is acceptable to you is yours. one of the reasons why
LAMMPS is open source is to give you that choice, but have to accept that
others have the same choice in who to help with modifying such a package.
you still got infinitely more than what you paid for.
axel.