-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi,
In file internalcoordinates.cpp, It seems that the 2nd function should be multiplied by DegreesToRadians rather than RadiansToDegress. Also, the bond length r should not be multiplied by RadiansToDegrees, the same is true for ::coordinatesRidians().
// --- Coordinates --------------------------------------------------------- //
/// Sets the distance, angle, and torsion at \p row to \p r,
/// \p theta and \p phi respectively. The angles are in degrees.
void InternalCoordinates::setCoordinates(size_t row, Real r, Real theta, Real phi)
{
assert(row < d->size);
d->coordinates[row * 3 + 0] = r;
d->coordinates[row * 3 + 1] = theta;
d->coordinates[row * 3 + 2] = phi;
}
/// Sets the distance, angle, and torsion at \p row to \p r,
/// \p theta and \p phi respectively. The angles are in radians.
void InternalCoordinates::setCoordinatesRadians(size_t row, Real r, Real theta, Real phi)
{
assert(row < d->size);
d->coordinates[row * 3 + 0] = r * chemkit::constants::RadiansToDegrees;
d->coordinates[row * 3 + 1] = theta * chemkit::constants::RadiansToDegrees;
d->coordinates[row * 3 + 2] = phi * chemkit::constants::RadiansToDegrees;
}