Print(store) particle velocity vector and distance from other particles
You can loop through the particles in a particle system and read the location and velocity of each particle.

For the distance you will need to calculate that for each particle. The distance is a pythagorean calculation.

import bpy
from math import sqrt

scn = bpy.context.scene
obj = bpy.context.object
p_system = obj.particle_systems['ParticleSystem']

def distance(p1, p2):
    return sqrt((p1[0]-p2[0])**2+(p1[1]-p2[1])**2+(p1[2]-p2[2])**2)

for f in range(scn.frame_start, scn.frame_end):
    scn.frame_set(f)
    print('At frame {}'.format(f))
    for i1,p1 in enumerate(p_system.particles):
        if p1.alive_state == 'ALIVE':
            print(' particle {} has a velocity of {}'.format(i1,p1.velocity))
            for i2,p2 in enumerate(p_system.particles):
                if p2.alive_state == 'ALIVE' and i1 != i2:
                    d = distance(p1.location,p2.location)
                    print('  particle {} is {:.4f} from particle {}'.format(i1,d,i2))