I am using the version of Lammps from 6 Oct 2012 , as a library mostly for calculating interatomic potentials' properties. Let me explain what information I need to extract from Lammps.

Given a system of atoms, the interatomic potential depends on the positions of all the atoms (q1, ..., qn). While we can split the total interatomic potential V of the system into an interatomic potential contribution from each atom Vj, every one of those per atom contributions depends on the position of all the atoms in the lattice. Or at least it depends on the position of its neighboring atoms:
V(q1, q1, ..., qn) = V1(q1, ..., qn) + V2(q1, ..., qn) + ... + Vn(q1, ..., qn), where qk is the position of atom k

I would need the derivative of one interatomic potential contributions Vj with respect to only one atomic position qk, that is:
dVj(q1, ...qn) / dqk

Actually instead of the regular force at a given atom calculated by:
Fj = dVj/dq1 + dVj/dq2 + ... + dVj/dqn,

I evaluate in my program a somehow non physical force by weighting each partial derivative:
Fj = W1 dVj/dq1 + W2 dVj/dq2 + ... + Wn dVj/dqn.

That is why I need to extract each partial derivative from Lammps.

Is it then possible to obtain the partial derivative of the interatomic potential of a given atom j with respect to the position of atom k?

If you are using a pair style that caculates pairwise interaction
(not many-body interactions like Tersoff or MEAM), then the pair style
will have a single() function. It computes the interaction of atoms I,J,
and returns an energy and force. The force is between the pair of atoms.

You could write a library function that loops over atoms and their neighbors
and invokes the single() function, and returns the values to your caller.

thank you for your reply. The solution you explain is very useful and I can do it for Lennard Jones and EAM potentials. In the future I will need to use the MEAM potential, though. Is there a solution that will allow me to calculate dVj(q1, ...qn) / dqk with the MEAM potential?

No there is not. LAMMPS contains no such code,
much less tallies it on a per-pair basis.

While we can split the total interatomic potential V of the system into an interatomic potential contribution from each atom Vj, >every one of those per atom contributions depends on the position of all the atoms in the lattice. Or at least it depends on the >position of its neighboring atoms:

V(q1, q1, ..., qn) = V1(q1, ..., qn) + V2(q1, ..., qn) + ... + Vn(q1, ..., qn), where qk is the position of atom k

I don't think this formula makes sense for a many-body potential, and there
is no such analytic expression encoded in LAMMPS.