Philipp Pavlov demonstrates a method for creating particles that attract neighboring particles by way of the Xpresso P Pass AB Node. Philipp notes that a PRepulse&Bounce node will also create a similar effect, however, it will inevitably have less control than the setup he shows off here.

Not so quick tips with some basic theory and simple xpresso using P Pass AB node

By creating particles in Xpresso in the volume of a cube, and by using a P Pass AB node to connect two particles local coordinate system creating a situation where you are able to find the simple sum of two vectors which will act as a simple distance calculation for the particles.

There is a bit of algebraic math involved here which may seem pretty nerdy, but Philipp does a great job of explaining exactly what is going on on by simple diagram examples. In fact there are times when the screen looks similar to a cluttered math class chalkboard, but not to worry as Philipp eventually gets back to showing how to set up the needed Xpresso connections in Cinema.