[gmx-users] Conversion codes

Nguyen Hoang Phuong phuong at theochem.uni-frankfurt.de
Fri Sep 30 09:18:21 CEST 2005

Hi Gia,

> I was wondering if anyone knows the conversion codes, which converts cartesian
> coordinates to interatomic (not internal) distances. I know this question is
> not related directly to Gromacs, but I would appreciate any answer on this
> question.
this is quite simple, just write your own small program. The code should
be like this:


distance[i][j] = sqrt( (x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]) +
(z[i]-z[j])*(z[i]-z[j]) );

printf("distance %lf\n",distance[i][j]);


where x,y,z are Cartesian coordinates and N the number of atoms.



More information about the gromacs.org_gmx-users mailing list