can you forward this to mr. lammps?

Hello,
I and some colleagues are creating a USER package for lammps to perform Parinello metadynamics, based on gaussian penalty functions applied to a system configuration.

Pretty much like a series of fix_spring_self, with a negative spring constant (repulsion from the original configuration).

Looking at fig_spring_self.cpp, the whole thing is clear for orthogonal boxes. Still, I can not see how the periodic boundary conditions are taken into account in the case of a triclinic box.
So I have two questions:
(1) Does fix_spring_self actually work for triclinic boxes?
(2) Is atom->x expressed in a projected orthogonal box (through an h matrix, I guess)?

If (2) is is the case, is the projection conserving the distances? Otherwise the spring constant should be modified accordingly. The same holds for fix_spring with tether.

I tried to figured this out myself but I got a bit lost.

Thanks,

PS: if, in addition, you could spend a couple of words or indicate me a reference to understand how lammps treats triclinic boxes in general (mainly the projection to the orthogonal box and the pbcs), that would be helpful too.