I need to calculate a change in distance between the centre of mass of two group of atoms. Now, one can't calculate the distance with numpy.linalg.norm() as there a periodic boundary conditions are applied. I was trying to use MDAnalysis.lib.distances.distance_array(), but is gives error, that dimension of the input (groupofatoums.center_of_mass()) is smaller than 3.

Can anyone recommend another method for distance calculation that takes in count the box dimensions and PBC?

Similar questions and discussions