Angle Harmonic Gradients question

I have a question about lines 115-120 of angle_harmonic.cpp. I would have thought the gradients would have been a series of cross products of the bond vectors: r12 x (r32 x r12) appropriately normalized multiplied by the force constants etc. . However this is something very different. I tried checking the manual for a reference but there was none. What is going on here?

thanks
matthew

I have a question about lines 115-120 of angle_harmonic.cpp. I would have
thought the gradients would have been a series of cross products of the bond
vectors: r12 x (r32 x r12) appropriately normalized multiplied by the force
constants etc. . However this is something very different. I tried checking
the manual for a reference but there was none. What is going on here?

i didn't have the time to work though the code in detail, so here is
just an educated guess:

it looks to me as if the angle force is decomposed into pairwise force
components in the molecule centered frame with the center of mass
being the origin:
one force component that moves the two outer atoms as if there was a
bond between them, and a second component that moves them up or down
with the central atom moving in the opposite direction of the outer
atoms.
the rest looks like projecting these force components on the real
space distance vectors in a similar fashion as it is done with
pairwise forces.

axel.