Distance is defined by points
and
:
| (5.14) |
| (5.15) |
The first derivatives of
with respect to Cartesian coordinates are:
| (5.16) | |||
| (5.17) |
Angle is defined by points
,
, and
, and spanned by vectors
and
:
| (5.18) |
The first derivatives of
with respect to Cartesian coordinates are:
![]() |
(5.19) | ||
![]() |
(5.20) | ||
![]() |
(5.21) |
These equations for the derivatives have a numerical instability when
the angle goes to 0 or to 180
.
Presently, the problem is `solved' by testing for the size
of the angle; if it is too small, the derivatives are set to 0
in the hope that other restraints will eventually pull the angle
towards well behaved regions. Thus, angle restraints of 0 or
180
should not be used in the conjugate gradients or molecular dynamics
optimizations.
Dihedral angle is defined by points
,
,
, and
(
):
| (5.22) |
| (5.23) |
The first derivatives of
with respect to Cartesian coordinates are:
| (5.24) |
| (5.25) |
![]() |
(5.26) | ||
![]() |
(5.27) | ||
![]() |
(5.28) | ||
![]() |
(5.29) | ||
![]() |
(5.30) | ||
![]() |
(5.31) |
These equations for the derivatives have a numerical instability when the angle goes to 0. Thus, the following set of equations is used instead [van Schaik et al., 1993]:
| (5.32) | |||
| (5.33) | |||
| (5.34) | |||
| (5.35) | |||
![]() |
(5.36) | ||
![]() |
(5.37) |
The only possible instability in these equations is when the length of
the central bond of the dihedral,
, goes to 0. In such a case,
which should not happen, the derivatives are set to 0. The expressions for
an improper dihedral angle, as opposed to a dihedral or dihedral angle,
are the same, except that indices
are permuted to
.
In both cases, covalent bonds
,
, and
are defining
the angle.
xx
Atomic density for a given atom is simply calculated as the number of atoms within a distance CONTACT_SHELL of that atom. First derivatives are not calculated, and are always returned as 0.
The absolute atomic coordinates
,
and
are available
for every point
, primarily for use in anchoring points to planes, lines
or points. Their first derivatives with respect to Cartesian coordinates
are of course simply 0 or 1.