[lammps-users] Creation of a fix command

Dear all,

I want to create a new fix wall/region command in order to compute an
orientation dependant external potential upon ellipsoidal particules system.

To do this, I have to call in the class created the energy parameter and
shape parameters of ellipsoidal model. If the shape of the differents
atoms can be cast from the atom class with

double **atom = atom->shape;
command. I do not know how to cast the different energetic parameters
precomputed in the pair_gayberne class.

Energetic parameters seems to be stored in the well,epsilon,sigma and
other pointers from the pair_gayberne class however these ones does not
seem to be accessible and callable by the following commands:
double **well = force->pair->gayberne->well;
double **well = force ->pair->well;

They all give a compilation error on these specific casts.

Does anyone know how to call these variables ?

Thanks a lot


The way to get at pair potential params from some other
class is to use the pair->extract() method. Then you just
add that method to the GayBerne class and have it recognize
whatever keywords you want to extract (e.g. well, epsilon, sigma)
and return the desired pointer.