[lammps-users] modifiying SW potential

Dear all

      I tried to modify SW potential by adding an extra loop for
calculating effective charge on each
atom (for each timestep), in the compute function.The loop does
something like this:
           1. for an ith atom , span for j atoms within cutoff and
calculate the effective charge.
            2. the effective charge for ith atom is then stored in
the array q[i] (after dividing by two)
           3. the additional terms that use this eff charge are put in
appropriate places in
                the two body and three body interactions.
    The code was able to compile but shows an error as : "p0_11933:
p4_error: interrupt SIGSEGV: 11"
i am using hybrid/overlay pair style with the combination of the above
SW and buck/coul/cut.
I have added the same loop in buck/coul/cut file.
  The calculation of effec charge is done according to the jiang &
brown paper chem. engg. sci. 49 , 2991-3000.

Does anyone know what am I missing? how can I debug this?
Thanks in advance.

Vinay

I'd use a debugger or a tool like valgrind to see where
your code is croaking.

Steve