56 |
|
} |
57 |
|
|
58 |
|
double LegendreCorrFunc::calcCorrVal(int frame1, int frame2, StuntDouble* sd1, StuntDouble* sd2) { |
59 |
< |
Vector3d v1 =sd1->getElectroFrame().getColumn(2); |
60 |
< |
Vector3d v2 = sd2->getElectroFrame().getColumn(2); |
59 |
> |
Vector3d v1 =sd1->getA(frame1).getColumn(2); |
60 |
> |
Vector3d v2 = sd2->getA(frame2).getColumn(2); |
61 |
|
|
62 |
< |
return legendre_.evaluate(dot(v1, v2)); |
62 |
> |
return legendre_.evaluate(dot(v1, v2)/(v1.length()*v2.length())); |
63 |
|
} |
64 |
|
|
65 |
|
|
69 |
|
for (sd = seleMan1_.beginSelected(i); sd != NULL; sd = seleMan1_.nextSelected(i)) { |
70 |
|
if (!sd->isDirectionalAtom()) { |
71 |
|
sprintf(painCave.errMsg, |
72 |
< |
"LegendreCorrFunc::validateSelection Error: selected atoms do not have dipole moment\n"); |
72 |
> |
"LegendreCorrFunc::validateSelection Error: selected atoms do not Directional\n"); |
73 |
|
painCave.isFatal = 1; |
74 |
|
simError(); |
75 |
|
} |