64 dist.x = at ->
x - bt ->
x;
87 dist.x = at ->
x - bt ->
x;
93 if (cell -> box[mdstep].
param[1][0] == 90.0 && cell -> box[mdstep].
param[1][1] == 90.0 && cell -> box[mdstep].
param[1][2] == 90.0)
95 dij.x =
dist.x - round((at ->
x-bt ->
x)/cell -> box[mdstep].
param[0][0]) * cell -> box[mdstep].param[0][0];
96 dij.y =
dist.y - round((at ->
y-bt ->
y)/cell -> box[mdstep].
param[0][1]) * cell -> box[mdstep].param[0][1];
97 dij.z =
dist.z - round((at ->
z-bt ->
z)/cell -> box[mdstep].
param[0][2]) * cell -> box[mdstep].param[0][2];
103 vec3_t af = m4_mul_coord (cell -> box[mdstep].cart_to_frac,
a);
104 vec3_t bf = m4_mul_coord (cell -> box[mdstep].cart_to_frac,
b);
105 vec3_t nij = v3_sub(af, bf);
106 nij.
x -= round(nij.
x);
107 nij.
y -= round(nij.
y);
108 nij.
z -= round(nij.
z);
109 dij = m4_mul_coord (cell -> box[mdstep].frac_to_cart, nij);
111 tmp = v3_length(dij);
112 if (
dist.length - tmp > 0.001)
135 return acos(-2.0 -
val) * 180.0 /
pi;
139 return acos(2.0 -
val) * 180.0 /
pi;
143 return acos(
val) * 180.0 /
pi;
163 v = dist_a.
x*dist_b.
x + dist_a.
y*dist_b.
y;
185 if (dist_a.
pbc || dist_b.
pbc) theta.
pbc = TRUE;
187 v = dist_a.
x*dist_b.
x + dist_a.
y*dist_b.
y + dist_a.
z*dist_b.
z;
212 if (dist_a.
pbc || dist_b.
pbc || dist_c.
pbc) phi.pbc = TRUE;
214 u = vec3(dist_a.
y*dist_b.
z - dist_a.
z*dist_b.
y, dist_a.
z*dist_b.
x - dist_a.
x*dist_b.
z, dist_a.
x*dist_b.
y - dist_a.
y*dist_b.
x);
215 v = vec3(dist_b.
y*dist_c.
z - dist_b.
z*dist_c.
y, dist_b.
z*dist_c.
x - dist_b.
x*dist_c.
z, dist_b.
x*dist_c.
y - dist_b.
y*dist_c.
x);
217 if (v3_length(u) == 0.0 || v3_length(v) == 0.0)
223 phi.angle =
arc_cos(v3_dot(u, v)/(v3_length(u)*v3_length(v)));
248 if (dist_a.
pbc || dist_b.
pbc || dist_c.
pbc) inv.
pbc = TRUE;
250 u = vec3(dist_b.
x, dist_b.
y, dist_b.
z);
251 v = vec3(dist_c.
x, dist_c.
y, dist_c.
z);
253 x = vec3(dist_a.
x, dist_a.
y, dist_a.
z);
254 if (v3_length(w) == 0.0 || v3_length(
x) == 0.0)
260 inv.
angle = fabs(90.0 -
arc_cos(v3_dot(w,
x)/(v3_length(w)*v3_length(
x))));
Variable declarations for the creation of the DL_POLY input file(s)
Global variable declarations Global convenience function declarations Global data structure defin...
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
Messaging function declarations.
angle dihedral_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt)
dihedral between atom a, b, c and d in 3D
distance distance_2d(atom *at, atom *bt)
distance between atom a and b in 2D
double arc_cos(double val)
compute arc cosinus
angle angle_2d(atom *at, atom *bt, atom *ct)
angle between atom a, b and c in 2D
ColRGBA init_color(int id, int numid)
initialize color based id number over total number of elements
angle inversion_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt)
inversion angle between atom a, b, c and d in 3D
angle angle_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct)
angle between atom a, b and c in 3D
distance distance_3d(cell_info *cell, int mdstep, atom *at, atom *bt)
distance between atom a and b in 3D