\section{Force Field Parameters}
\label{section:forcefield}

\subsection{Potential energy functions}

Evaluating the force is the most computationally demanding
part of molecular dynamics.
The force is the negative gradient of a scalar potential energy function,
\begin{equation}
\vec{F}(\vec{r}) = -\nabla U(\vec{r}),
\end{equation}
and, for systems of biomolecules,
this potential function involves the summing,
\begin{equation}
U(\vec{r}) = \sum U_{\text{bonded}}(\vec{r})
  + \sum U_{\text{nonbonded}}(\vec{r}),
\end{equation}
over a large number of bonded and nonbonded terms.
The bonded potential terms involve 2--, 3--, and 4--body interactions
of covalently bonded atoms,
with $O(N)$ terms in the summation.
The nonbonded potential terms involve interactions
between all pairs of atoms
(usually excluding pairs of atoms already involved in a bonded term),
with $O(N^2)$ terms in the summation,
although fast evaluation techniques are used to
compute good approximations to their contribution to the potential
with $O(N)$ or $O(N \log N)$ computational cost.

\subsubsection{Bonded potential energy terms}
%\label{sec:bonded}

The bonded potential terms involve 2--, 3--, and 4--body interactions
of covalently bonded atoms.

The 2--body spring bond potential
describes the harmonic vibrational motion
between an $(i,j)$--pair of covalently bonded atoms,
\begin{equation}
U_{\text{bond}} = k (r_{ij} - r_0)^2,
\end{equation}
where $r_{ij} = \|\vec{r}_j - \vec{r}_i\|$ gives the distance
between the atoms,
$r_0$ is the equilibrium distance,
and $k$ is the spring constant.

The 3--body angular bond potential
describes the angular vibrational motion
occurring between an $(i,j,k)$--triple of covalently bonded atoms,
\begin{equation}
U_{\text{angle}} = k_{\theta} (\theta - \theta_0)^2
                 + k_{\text{ub}} (r_{ik} - r_{\text{ub}})^2,
\end{equation}
where, in the first term,
$\theta$ is the angle in radians between vectors
$\vec{r}_{ij} = \vec{r}_j - \vec{r}_i$
and $\vec{r}_{kj} = \vec{r}_j - \vec{r}_k$,
$\theta_0$ is the equilibrium angle,
and $k_{\theta}$ is the angle constant.
The second term is the Urey--Bradley term
used to describe a
(noncovalent) spring between the outer $i$ and $k$ atoms,
active when constant $k_{\text{ub}} \neq 0$,
where, like the spring bond,
$r_{ik} = \|\vec{r}_k - \vec{r}_i\|$ gives the distance between
the pair of atoms and
$r_{\text{ub}}$ is the equilibrium distance.

The 4--body torsion angle (also known as dihedral angle) potential
describes the angular spring between the planes formed
by the first three and last three atoms of
a consecutively bonded $(i,j,k,l)$--quadruple of atoms,
\begin{equation}
U_{\text{tors}} =
  \begin{cases}
  k (1 + \cos(n \psi + \phi)) & \text{if $n > 0$,} \\
  k (\psi - \phi)^2           & \text{if $n = 0$,}
  \end{cases}
\end{equation}
where $\psi$ is the angle in radians between
the $(i,j,k)$--plane and the $(j,k,l)$--plane.
The integer constant $n$ is nonnegative and indicates the periodicity.
For $n > 0$, $\phi$ is the phase shift angle
and $k$ is the multiplicative constant.
For $n = 0$, $\phi$ acts as an equilibrium angle
and the units of $k$ change to $\text{potential}/\text{rad}^2$.
A given $(i,j,k,l)$--quadruple of atoms might contribute
multiple terms to the potential,
each with its own parameterization.
The use of multiple terms for a torsion angle allows for
complex angular variation of the potential,
effectively a truncated Fourier series.

\subsubsection{Nonbonded potential energy terms}
%\label{sec:nonbonded}

The nonbonded potential terms involve interactions
between all $(i,j)$--pairs of atoms,
usually excluding pairs of atoms already involved in a bonded term.
Even using a fast evaluation methods
the cost of computing the nonbonded potentials dominates the work
required for each time step of an MD simulation.

The Lennard--Jones potential
accounts for the weak dipole attraction between distant atoms and
the hard core repulsion as atoms become close,
\begin{equation}
U_{\text{LJ}} = (-E_{\text{min}}) \left[
    \left( \frac{R_{\text{min}}}{r_{ij}} \right)^{12} -
    2 \left( \frac{R_{\text{min}}}{r_{ij}} \right)^{6} \right],
\end{equation}
where $r_{ij} = \|\vec{r}_j - \vec{r}_i\|$ gives the distance
between the pair of atoms.
The parameter $E_{\text{min}} = U_{\text{LJ}}(R_{\text{min}})$ is
the minimum of the potential term
($E_{\text{min}} < 0$, which means that $-E_{\text{min}}$ is the well-depth).
The Lennard--Jones potential approaches 0 rapidly as $r_{ij}$
increases, so it is usually truncated (smoothly shifted) to 0
past a cutoff radius, requiring $O(N)$ computational cost.

The electrostatic potential
is repulsive for atomic charges with the same sign
and attractive for atomic charges with opposite signs,
\begin{equation}
U_{\text{elec}} = \epsilon_{14} \frac{C q_i q_j}{\epsilon_0 r_{ij}},
\end{equation}
where $r_{ij} = \|\vec{r}_j - \vec{r}_i\|$ gives the distance
between the pair of atoms,
and $q_i$ and $q_j$ are the charges on the respective atoms.
Coulomb's constant $C$ and the dielectric constant $\epsilon_0$
are fixed for all electrostatic interactions.
The parameter $\epsilon_{14}$ is a unitless scaling factor
whose value is 1,
except for a modified 1--4 interaction,
where the pair of atoms is separated by a sequence
of three covalent bonds (so that the atoms might
also be involved in a torsion angle interaction),
in which case $\epsilon_{14} = \varepsilon$,
for a fixed constant $0 \leq \varepsilon \leq 1$.
Although the electrostatic potential may be computed with
a cutoff like the Lennard--Jones potential,
the $1/r$ potential approaches 0 much more
slowly than the $1/r^6$ potential,
so neglecting the long range electrostatic terms
can degrade qualitative results,
especially for highly charged systems.
There are other fast evaluation methods that approximate
the contribution to the long range electrostatic terms
that require $O(N)$ or $O(N \log N)$ computational cost,
depending on the method.

\subsection{Non-bonded interactions}
\label{section:electdesc}

\NAMD\ has a number of options that control the way that non-bonded
interactions are calculated.  These options are interrelated and
can be quite confusing, so this section attempts to explain the
behavior of the non-bonded interactions and how to use these
parameters.

\subsubsection{Van der Waals interactions}
The simplest non-bonded
interaction is the van der Waals interaction.  In
\NAMD, van der Waals interactions are always truncated at the
cutoff distance, specified by {\tt cutoff}.
The main option that effects van der Waals interactions
is the {\tt switching} parameter.  With this option set to {\tt on},
a smooth switching function will be used to truncate the
van der Waals potential energy smoothly at the cutoff distance.
A graph of the van der Waals
potential with this switching function is shown in Figure
\ref{fig:switching}.  If {\tt switching} is set to {\tt off}, the
van der Waals energy is just abruptly truncated at the cutoff
distance, so that energy may not be conserved.

\begin{figure}[htb]
  \center{\includegraphics{figures/switching}}
  \caption[Graph of van der Waals potential with and without switching]
  {\small Graph of van der Waals potential with and without the
  application of the switching function.  With the switching function
  active, the potential is smoothly reduced to 0 at the cutoff distance.
  Without the switching function, there is a discontinuity where the
  potential is truncated.}
  \label{fig:switching}
\end{figure}

The switching function used is based on the X-PLOR switching
function.  The parameter {\tt switchdist} specifies the distance
at which the switching function should start taking effect to
bring the van der Waals potential to 0 smoothly at the cutoff distance.
Thus, the value of {\tt switchdist} must always be less than that
of {\tt cutoff}.

\subsubsection{Electrostatic interactions}
The handling of electrostatics is slightly
more complicated due to the incorporation of multiple timestepping for full
electrostatic interactions.  There are two cases to consider, one where
full electrostatics is employed and the other where electrostatics
are truncated at a given distance.
\prettypar
First let us consider the latter case, where electrostatics are truncated at
the cutoff distance.  Using this scheme, all electrostatic interactions
beyond a specified distance are ignored, or assumed to be zero.  If
{\tt switching} is set to {\tt on}, rather than having a discontinuity
in the potential
at the cutoff distance, a shifting function is applied to the electrostatic
potential as shown in Figure \ref{fig:shifting}.  As this figure shows, the
shifting function shifts the entire potential curve so that the curve
intersects the x-axis at the cutoff distance.  This shifting function
is based on the
shifting function used by X-PLOR.

\begin{figure}[htb]
  \center{\includegraphics{figures/shifting}}
  \caption[Graph of electrostatic potential with and without shifting function]
  {\small Graph showing an electrostatic potential with and without the
  application of the shifting function.}
  \label{fig:shifting}
\end{figure}

Next, consider the case where full electrostatics are calculated.  In this
case, the electrostatic interactions are not truncated at any distance.  In
this scheme, the {\tt cutoff} parameter has a slightly different meaning
for the electrostatic interactions --- it represents
the {\it local interaction distance\/}, or distance within which electrostatic
pairs will be directly calculated every timestep.  Outside of this distance,
interactions will be calculated only periodically.  These forces
will be applied using a multiple timestep integration scheme as described in
Section \ref{section:mts}.

\begin{figure}[htb]
  \center{\includegraphics{figures/fmaOn}}
  \caption[Graph of electrostatic split between short and long range forces]
  {\small Graph showing an electrostatic potential
  when full electrostatics are used within \NAMD,
  with one curve portion calculated directly
  and the other calculated using PME.}
  \label{fig:fmaOn}
\end{figure}

\subsubsection{Non-bonded force field parameters}

\begin{itemize}
%\item
%\NAMDCONF{eleccutoff}%
%{local interaction distance for electrostatic calculations (\AA)}%
%{positive decimal}%
%{Specifies the distance at which
%electrostatic interactions are truncated.
%If {\tt eleccutoff} is defined, it supersedes {\tt cutoff}.
%If {\tt eleccutoff} is not defined, then \verb }cutoff} {\em must}
%be defined.
%See Section \ref{section:electdesc} for a further discussion
%of this configuration value.}

%\item
%\NAMDCONF{vdwcutoff}%
%{local interaction distance for van der Waals calculations (\AA)}%
%{positive decimal}%
%{This value specifies the distance at which
%van der Waals interactions are truncated.
%If {\tt vdwcutoff} is defined, it supersedes {\tt cutoff}.
%If {\tt vdwcutoff} is not defined, then \verb }cutoff} {\em must}
%be defined.
%See Section \ref{section:electdesc} for a further discussion
%of this configuration value.}

\item
\NAMDCONF{cutoff}
{local interaction distance common to both electrostatic
and van der Waals calculations (\AA)}
{positive decimal}
{%This value can substitute for either {\tt eleccutoff}
%or {\tt vdwcutoff} if either of those is undefined.
See Section \ref{section:electdesc} for more information.}

\item
\NAMDCONFWDEF{switching}{use switching function?}{{\tt on} or {\tt off}}
{{\tt on}}
{If {\tt switching} is
specified to be {\tt off}, then a truncated cutoff is performed.
If {\tt switching} is turned {\tt on}, then smoothing functions
are applied to both the electrostatics and van der Waals forces.
For a complete description of the non-bonded force parameters see
Section \ref{section:electdesc}.  If {\tt switching} is set to
{\tt on}, then {\tt switchdist} must also be defined.}

\item
\NAMDCONFWDEF{vdwForceSwitching}{use force switching for VDW?}{{\tt on} or {\tt off}}
{{\tt off}}
{If both {\tt switching} and {\tt vdwForceSwitching} are set to {\tt on},
then CHARMM force switching is used for van der Waals forces.
}

%\item
%\NAMDCONF{elecswitchdist}{distance at which to activate switching function for %electrostatic calculations (\AA)}{positive decimal $\leq$ {\tt eleccutoff}}
%{Distance at which the switching function
%used to smooth the truncation of
%electrostatic forces should begin to take effect.
%This parameter only has meaning if {\tt switching} is
%set to {\tt on}.
%The value of {\tt elecswitchdist} must be less than
%or equal to the value of {\tt eleccutoff}, since the switching function
%is only applied on the range from {\tt elecswitchdist} to {\tt eleccutoff}.
%If {\tt elecswitchdist} is defined, it supersedes {\tt switchdist}.
%If {\tt elecswitchdist} is not defined and {\tt switching} is
%{\tt on}, then \verb }switchdist} {\em must} be defined.
%For a complete description of the non-bonded force parameters, see
%Section \ref{section:electdesc}.
%}

%\item
%\NAMDCONF{vdwswitchdist}%
%{distance at which to activate switching function
%for van der Waals calculations (\AA)}%
%{positive decimal $\leq$ {\tt vdwcutoff}}%
%{Distance at which the switching function
%used to smooth the truncation of
%van der Waals forces should begin to take effect.
%This parameter only has meaning if {\tt switching} is
%set to {\tt on}.
%The value of {\tt vdwswitchdist} must be less than
%or equal to the value of {\tt vdwcutoff}, since the switching function
%is only applied on the range from {\tt vdwswitchdist} to {\tt vdwcutoff}.
%If {\tt vdwswitchdist} is defined, it supersedes {\tt switchdist}.
%If {\tt vdwswitchdist} is not defined and {\tt switching} is
%{\tt on}, then \verb }switchdist} {\em must} be defined.
%For a complete description of the non-bonded force parameters, see
%Section \ref{section:electdesc}.
%}

\item
\NAMDCONF{switchdist}
{distance at which to activate switching/splitting function
for electrostatic and van der Waals calculations (\AA)}
{positive decimal $\leq$ {\tt cutoff}}
{Distance at which the switching function
should begin to take effect.
This parameter only has meaning if {\tt switching} is
set to {\tt on}.
The value of {\tt switchdist} must be less than
or equal to the value of {\tt cutoff}, since the switching function
is only applied on the range from {\tt switchdist} to {\tt cutoff}.
For a complete description of the non-bonded force parameters see
Section \ref{section:electdesc}.}

\item
\NAMDCONF{exclude}
{non-bonded exclusion policy to use}
{{\tt none}, {\tt 1-2}, {\tt 1-3}, {\tt 1-4}, or {\tt scaled1-4}}
{\label{param:exclude}
%% This parameter is {\it required\/} for every simulation.
This parameter specifies which pairs of bonded atoms should
be excluded from non-bonded
interactions.  With the value of {\tt none}, no bonded pairs of atoms
will be excluded.  With the value of {\tt 1-2}, all atom pairs that
are directly connected via a linear bond will be excluded.  With the
value of {\tt 1-3}, all {\tt 1-2} pairs will be excluded along with
all pairs of atoms that are bonded to a common
third atom (i.e., if atom A is bonded to atom B and atom B is bonded
to atom C, then the atom pair A-C would be excluded).
With the value of {\tt 1-4}, all {\tt 1-3} pairs will be excluded along
with all pairs connected by a set of two bonds (i.e., if atom A is bonded
to atom B, and atom B is bonded to atom C, and atom C is bonded to
atom D, then the atom pair A-D would be excluded).  With the value
of {\tt scaled1-4}, all {\tt 1-3} pairs are excluded and all pairs
that match the {\tt 1-4} criteria are modified.  The electrostatic
interactions for such pairs are modified by the constant factor
defined by {\tt 1-4scaling}.
The van der Waals interactions are modified
by using the special 1-4 parameters defined in the parameter files.
The value of {\tt scaled1-4} is necessary to enable the modified
1-4 VDW parameters present in the CHARMM parameter files.
}

\item
\NAMDCONFWDEF{1-4scaling}{scaling factor for 1-4 electrostatic interactions}
{0 $\leq$ decimal $\leq$ 1}{1.0}
{Scaling factor for 1-4 electrostatic interactions.
This factor is only used when the
{\tt exclude} parameter is set to {\tt scaled1-4}.  In this case, this
factor is used to modify the electrostatic interactions between 1-4 atom
pairs.  If the {\tt exclude} parameter is set to anything but
{\tt scaled1-4}, this parameter has no effect regardless of its value.}

\item
\NAMDCONFWDEF{dielectric}{dielectric constant for system}
{decimal $\geq$ 1.0}{1.0}
{Dielectric constant for the system.  A value of 1.0 implies no modification
of the electrostatic interactions.  Any larger value will lessen the
electrostatic forces acting in the system.}

\item
\NAMDCONFWDEF{nonbondedScaling}{scaling factor for nonbonded forces}
{decimal $\geq$ 0.0}{1.0}
{Scaling factor for electrostatic and van der Waals forces.
A value of 1.0 implies no modification of the interactions.
Any smaller value will lessen the
nonbonded forces acting in the system.}

\item
\NAMDCONFWDEF{vdwGeometricSigma}{use geometric mean to combine L-J sigmas}
{{\tt yes} or {\tt no}}{{\tt no}}
{Use geometric mean, as required by \index{OPLS} OPLS, rather than
traditional arithmetic mean when combining Lennard-Jones sigma parameters
for different atom types.}

\item
\NAMDCONFWDEF{limitdist}
{maximum distance between pairs for limiting interaction strength(\AA)}
{non-negative decimal}
{{\tt 0.}}
{
The electrostatic and van der Waals potential functions diverge
as the distance between two atoms approaches zero.
The potential for atoms closer than {\tt limitdist} is instead
treated as $a r^2 + c$ with parameters chosen to match the
force and potential at {\tt limitdist}.
This option should primarily be useful for alchemical free energy
perturbation calculations, since it makes the process of creating
and destroying atoms far less drastic energetically.
The larger the value of {\tt limitdist} the more the maximum force
between atoms will be reduced.
In order to not alter the other interactions in the simulation,
{\tt limitdist} should be less than the closest approach
of any non-bonded pair of atoms; 1.3\,\AA\ appears to satisfy this
for typical simulations but the user is encouraged to experiment.
There should be no performance impact from enabling this feature.
}

\item
\NAMDCONFWDEF{LJcorrection}
{Apply long-range corrections to the system energy and virial to
account for neglected vdW forces?}{{\tt yes} or {\tt no}}{{\tt no}}
{Apply an analytical correction to the reported vdW energy and virial
that is equal to the amount lost due to switching and cutoff of the LJ
potential. The correction will use the average of vdW parameters for
all particles in the system and assume a constant, homogeneous
distribution of particles beyond the switching distance. See
\cite{Shirts2007} for details (the equations used in the NAMD
implementation are slightly different due to the use of a different
switching function). Periodic boundary conditions are required to make
use of tail corrections.
}

\end{itemize}

\subsubsection{PME parameters}

PME stands for Particle Mesh Ewald and is an efficient
full electrostatics method for use with periodic boundary conditions.
None of the parameters should affect energy conservation, although they may affect the accuracy of the results and momentum conservation.

\begin{itemize}

\item
\NAMDCONFWDEF{PME}{Use particle mesh Ewald for electrostatics?}{{\tt yes} or {\tt no}}{{\tt no}}
{Turns on particle mesh Ewald.}

\item
\NAMDCONFWDEF{PMETolerance}{PME direct space tolerance}{positive decimal}{$10^{-6}$}
{Affects the value of the Ewald coefficient and the overall accuracy of the results.}

\item
\NAMDCONFWDEF{PMEInterpOrder}{PME interpolation order}{positive integer}{4 (cubic)}
{Charges are interpolated onto the grid and forces are interpolated off using this many points, equal to the order of the interpolation function plus one.}

\item
\NAMDCONF{PMEGridSpacing}{maximum space between grid points}{positive real}
{The grid spacing partially determines the accuracy and efficiency of PME.
If any of the grid sizes below are not set, then PMEGridSpacing must be set
(recommended value is 1.0 \AA ) and will be used to calculate them.
If a grid size is set, then the grid spacing must be
at least PMEGridSpacing (if set, or a very large default of 1.5).}

\item
\NAMDCONF{PMEGridSizeX}{number of grid points in x dimension}{positive integer}
{The grid size partially determines the accuracy and efficiency of PME.
For speed, {\tt PMEGridSizeX} should have only small integer factors (2, 3 and 5).}

\item
\NAMDCONF{PMEGridSizeY}{number of grid points in y dimension}{positive integer}
{The grid size partially determines the accuracy and efficiency of PME.
For speed, {\tt PMEGridSizeY} should have only small integer factors (2, 3 and 5).}

\item
\NAMDCONF{PMEGridSizeZ}{number of grid points in z dimension}{positive integer}
{The grid size partially determines the accuracy and efficiency of PME.
For speed, {\tt PMEGridSizeZ} should have only small integer factors (2, 3 and 5).}

\item
\NAMDCONFWDEF{PMEProcessors}{processors for FFT and reciprocal sum}{positive integer}{larger of x and y grid sizes up to all available processors}
{For best performance on some systems and machines, it may be necessary to
restrict the amount of parallelism used.  Experiment with this parameter if
your parallel performance is poor when PME is used.}

\item
\NAMDCONFWDEF{FFTWEstimate}{Use estimates to optimize FFT?}{{\tt yes} or {\tt no}}{{\tt no}}
{Do not optimize FFT based on measurements, but on FFTW rules of thumb.
This reduces startup time, but may affect performance.}

\item
\NAMDCONFWDEF{FFTWUseWisdom}{Use FFTW wisdom archive file?}{{\tt yes} or {\tt no}}{{\tt yes}}
{Try to reduce startup time when possible by reading FFTW ``wisdom'' from a file, and saving wisdom generated by performance measurements to the same file for future use.
This will reduce startup time when running the same size PME grid on the same number of processors as a previous run using the same file.}

\item
\NAMDCONFWDEF{FFTWWisdomFile}{name of file for FFTW wisdom archive}{file name}{FFTW\_NAMD\_{\em version}\_{\em platform}.txt}
{File where FFTW wisdom is read and saved.
If you only run on one platform this may be useful to reduce startup times for all runs.
The default is likely sufficient, as it is version and platform specific.}

\end{itemize}

\subsubsection{MSM parameters}

The multilevel summation method (MSM)~\cite{HARD2015}
is an alternative to PME for calculating full electrostatic interactions.
The use of the FFT in PME has two drawbacks:
(1) it generally requires the use of periodic boundary conditions,
in which the simulation describes an infinite three-dimensional lattice,
with each lattice cell containing a copy of the simulated system, and
(2) calculation of the FFT becomes a considerable performance bottleneck
to the parallel scalability of MD simulations, due to the many-to-many
communication pattern employed.
MSM avoids the use of the FFT in its calculation,
instead employing the nested interpolation in real space
of softened pair potentials,
which permits in addition to periodic boundary conditions
the use of
semi-periodic boundaries, in which there is periodicity along
just one or two basis vectors,
or non-periodic boundaries, in which the simulation is
performed in a vacuum.
Also, better parallel scaling has been observed with MSM
when scaling a sufficiently large system to a large number of processors.
See the MSM research web page (\url{http://www.ks.uiuc.edu/Research/msm/})
for more information.

In order to use the MSM,
one need only specify ``MSM on'' in the configuration file.
For production use,
we presently recommend using the default
``MSMQuality 0''
($C^1$ cubic interpolation with $C^2$ Taylor splitting),
which has been validated to correctly reproduce
the PME results~\cite{HARD2015}.
At this time, we discourage use of the higher order interpolation schemes
(Hermite, quintic, etc.),
as they are still under development.
With cubic interpolation, MSM now gets roughly half the performance of PME.
Comparable performance and better scaling for MSM
have been observed with the optimizations described
in Ref.~\cite{HARD2015}, which will be available shortly.

For now, \NAMD's implementation of the MSM
does not calculate the long-range electrostatic
contribution to the virial, so use with a barostat for
constant pressure simulation is inappropriate.
(Note that the experiments in Ref.~\cite{HARD2015}
involving constant pressure simulation with MSM
made use of a custom version that is incompatible with
some other \NAMD\ features, so is not yet available.)
The performance of PME is generally still better for smaller systems
with smaller processor counts.
MSM is the only efficient method in \NAMD\ for calculating
full electrostatics for simulations with semi-periodic or
non-periodic boundaries.

The periodicity is defined through setting the cell basis vectors
appropriately, as discussed in Sec.~\ref{section:dynamics}.
The cutoff distance, discussed earlier in this section,
also determines the splitting distance between the
MSM short-range part, calculated exactly, and long-range part,
interpolated from the grid hierarchy;
this splitting distance is the primary control for
accuracy for a given interpolation and splitting,
although most simulations will likely want to keep the
cutoff set to the CHARMM-prescribed value of 12~\AA.

The configuration options specific to MSM are listed below.
A simulation employing non-periodic boundaries in one or more
dimensions might have atoms that attempt to drift beyond
the predetermined extent of the grid.
In the case that an atom does drift beyond the grid,
the simulation will be halted prematurely with an error message.
Several options listed below deal with defining the extent of the
grid along non-periodic dimensions beyond what can be automatically
determined by the initial coordinates.
It is also recommended for non-periodic simulation to
configure boundary restraints to contain the atoms, for instance,
through Tcl boundary forces in Sec.~\ref{section:tclBC}.

\begin{itemize}

\item
\NAMDCONFWDEF{MSM}{Use multilevel summation method for electrostatics?}{{\tt yes} or {\tt no}}{{\tt no}}
{Turns on multilevel summation method.}

\item
\NAMDCONFWDEF{MSMGridSpacing}{spacing between finest level grid points (\AA)}{positive real}{2.5}
{The grid spacing determines in part the accuracy and efficiency of MSM.
An error versus cost analysis shows that the best tradeoff is setting
the grid spacing to a value close to the inter-particle spacing.
The default value works well in practice for atomic scale simulation.
This value will be exact along non-periodic dimensions.
For periodic dimensions, the grid spacing must evenly divide the
basis vector length; the actual spacing for a desired grid spacing $h$
is guaranteed to be within the interval
$\bigl[ \frac{4}{5} h, \frac{6}{5} h \bigr)$.}

\item
\NAMDCONFWDEF{MSMQuality}{select the approximation quality}{$0,1,2,3,4$}{0}
{This parameter offers a simplified way to select higher order
interpolation and splitting for MSM.  The available choices are:
\begin{itemize}
\item 0 sets $C^1$ cubic ($p=3$) interpolation with $C^2$ Taylor splitting,
\item 1 sets $C^1$ Hermite ($p=4$) interpolation with $C^3$ Taylor splitting,
\item 2 sets $C^1$ quintic ($p=5$) interpolation with $C^3$ Taylor splitting,
\item 3 sets $C^1$ septic ($p=7$) interpolation with $C^4$ Taylor splitting,
\item 4 sets $C^1$ nonic ($p=9$) interpolation with $C^5$ Taylor splitting.
\end{itemize}
\emph{We presently recommend using the default selection,
which has been validated to correctly reproduce
the PME results~\cite{HARD2015},
and discourage use of the higher order interpolation schemes,
as they are still under development.}
With cubic interpolation, MSM now gets roughly half the performance of PME.
Comparable performance and better scaling for MSM
have been observed with the optimizations described
in Ref.~\cite{HARD2015}, which will be available shortly.

There is generally a tradeoff between quality and performance.
Empirical results show that the $C^1$ interpolation schemes offer a little
better accuracy than the alternative
interpolation schemes that have greater continuity.
Also, better accuracy has been observed by using
a splitting function with $C^{\lceil (p+1) / 2 \rceil}$ continuity
where $p$ is the order of the interpolant.
}

\item
\NAMDCONFWDEF{MSMApprox}{select the interpolant}{$0,1,\dots,7$}{0}
{Select the interpolation scheme:
\begin{itemize}
\item 0 sets $C^1$ cubic ($p=3$) interpolation,
\item 1 sets $C^1$ quintic ($p=5$) interpolation,
\item 2 sets $C^2$ quintic ($p=5$) interpolation,
\item 3 sets $C^1$ septic ($p=7$) interpolation,
\item 4 sets $C^3$ septic ($p=7$) interpolation,
\item 5 sets $C^1$ nonic ($p=9$) interpolation,
\item 6 sets $C^4$ nonic ($p=9$) interpolation,
\item 7 sets $C^1$ Hermite ($p=4$) interpolation.
\end{itemize}
}

\item
\NAMDCONFWDEF{MSMSplit}{select the splitting}{$0,1,\dots,6$}{0}
{Select the splitting function:
\begin{itemize}
\item 0 sets $C^2$ Taylor splitting,
\item 1 sets $C^3$ Taylor splitting,
\item 2 sets $C^4$ Taylor splitting,
\item 3 sets $C^5$ Taylor splitting,
\item 4 sets $C^6$ Taylor splitting,
\item 5 sets $C^7$ Taylor splitting,
\item 6 sets $C^8$ Taylor splitting.
\end{itemize}
}

\item
\NAMDCONFWDEF{MSMLevels}{maximum number of levels}{non-negative integer}{0}
{Set the maximum number of levels to use in the grid hierarchy.
Although setting slightly lower than the default might (or might not)
improve performance and/or accuracy for non-periodic simulation,
it is generally best to leave this at the default value "0" which will
then automatically adjust the levels to the size of the given system.}

\item
\NAMDCONFWDEF{MSMPadding}{grid padding (\AA)}{non-negative real}{2.5}
{The grid padding applies only to non-periodic dimensions, for which
the extent of the grid is automatically determined by the
maximum and minimum of the initial coordinates plus the padding value.}

\item
\NAMDCONF{MSMxmin, MSMymin, MSMzmin}{minimum x-, y-, z-coordinate (\AA)}{real}
{Set independently the minimum x-, y-, or z-coordinates of
the simulation.  This parameter is applicable only to non-periodic dimensions.
It is useful in conjunction with setting a boundary restraining force
with Tcl boundary forces in Sec.~\ref{section:tclBC}.}

\item
\NAMDCONF{MSMxmax, MSMymax, MSMzmax}{maximum x-, y-, z-coordinate (\AA)}{real}
{Set independently the maximum x-, y-, or z-coordinates of
the simulation.  This parameter is applicable only to non-periodic dimensions.
It is useful in conjunction with setting a boundary restraining force
with Tcl boundary forces in Sec.~\ref{section:tclBC}.}

\item
\NAMDCONFWDEF{MSMBlockSizeX, MSMBlockSizeY, MSMBlockSizeZ}{block size for grid decomposition}{positive integer}{8}
{Tune parallel performance by adjusting the block size used for parallel
domain decomposition of the grid.  Recommended to keep the default.}

\item
\NAMDCONFWDEF{MSMSerial}{Use serial long-range solver?}{{\tt yes} or {\tt no}}{{\tt no}}
{Enable instead the slow serial long-range solver.
Intended to be used only for testing and diagnostic purposes.}

\end{itemize}

\subsubsection{Full direct parameters}

The direct computation of electrostatics
is not intended to be used during
real calculations, but rather as a testing or
comparison measure.  Because of the ${\mathcal O}(N^2)$
computational complexity for performing
direct calculations, this is {\it much}
slower than using PME or MSM to compute full
electrostatics for large systems.
In the case of periodic boundary conditions,
the nearest image convention is used rather than a
full Ewald sum.

\begin{itemize}

\item
\NAMDCONFWDEF{FullDirect}{calculate full electrostatics directly?}{{\tt yes} or {\tt no}}{{\tt no}}
{Specifies whether or not direct computation of
full electrostatics should be performed.}

\end{itemize}

\subsubsection{Tabulated nonbonded interaction parameters}

In order to support coarse grained models and semiconductor force fields,
the tabulated energies feature replaces the normal van der Waals potential
for specified pairs of atom types with one interpolated from user-supplied
energy tables.  The electrostatic potential is not altered.

Pairs of atom types to which the modified interactions apply are specified
in a CHARMM parameter file by an {\tt NBTABLE} section consisting of lines
with two atom types and a corresponding interaction type name.
For example, tabulated interactions for SI-O, O-O, and SI-SI pairs would
be specified in a parameter file as:
\begin{verbatim}
NBTABLE
SI O SIO
O O OO
SI SI SISI
\end{verbatim}

Each interaction type must correspond to an entry in the energy table file.
The table file consists of a header formatted as:
\begin{verbatim}
# multiple comment lines
<number_of_tables> <table_spacing (A)> <maximum_distance (A)>
\end{verbatim}
followed by {\em number\_of\_tables} energy tables formatted as:
\begin{verbatim}
TYPE <interaction type name>
0 <energy (kcal/mol)> <force (kcal/mol/A)>
<table_spacing> <energy (kcal/mol)> <force (kcal/mol/A)>
<2*table_spacing> <energy (kcal/mol)> <force (kcal/mol/A)>
<3*table_spacing> <energy (kcal/mol)> <force (kcal/mol/A)>
...
<maximum_distance - 3*table_spacing> <energy (kcal/mol)> <force (kcal/mol/A)>
<maximum_distance - 2*table_spacing> <energy (kcal/mol)> <force (kcal/mol/A)>
<maximum_distance - table_spacing> <energy (kcal/mol)> <force (kcal/mol/A)>
\end{verbatim}

The table entry at {\em maximum\_distance} will match the energy of the
previous entry but have a force of zero.  The maximum distance must be at
least equal to the nonbonded cutoff distance and entries beyond the cutoff
distance will be ignored.  For the above example with a cutoff of 12 \AA\
the table file could look like:
\begin{verbatim}
# parameters for silicon dioxide
3 0.01 14.0
TYPE SIO
0 5.092449e+26 3.055469e+31
0.01 5.092449e+14 3.055469e+17
0.02 7.956951e+12 2.387085e+15
0.03 6.985526e+11 1.397105e+14
...
13.98 0.000000e+00 -0.000000e+00
13.99 0.000000e+00 -0.000000e+00
TYPE OO
0 1.832907e+27 1.099744e+32
0.01 1.832907e+15 1.099744e+18
0.02 2.863917e+13 8.591751e+15
0.03 2.514276e+12 5.028551e+14
...
13.98 0.000000e+00 -0.000000e+00
13.99 0.000000e+00 -0.000000e+00
TYPE SISI
0 0.000000e+00 -0.000000e+00
0.01 0.000000e+00 -0.000000e+00
...
13.98 0.000000e+00 -0.000000e+00
13.99 0.000000e+00 -0.000000e+00
\end{verbatim}

The following three parameters are required for tabulated energies.

\begin{itemize}

\item
\NAMDCONFWDEF{tabulatedEnergies}{use tabulated energies}{{\tt yes} or {\tt no}}{{\tt no}}
{Specifies whether or not tabulated energies will be used for
van der Waals interactions between specified pairs of atom types.}

\item
\NAMDCONF{tabulatedEnergiesFile}{file containing energy table}{file name}
{Provides one energy table for each interaction type in parameter file.
See format above.}

\item
\NAMDCONF{tableInterpType}{cubic or linear interpolation}{{\tt cubic} or {\tt linear}}
{Specifies the order for interpolating between energy table entries.}

\end{itemize}

\subsection{Water Models}
\label{section:water_models}

\NAMD~currently supports the 3-site TIP3P water model,
the 4-site TIP4P water model,
and the 5-site SWM4-NDP water model
(from the Drude force field)~\cite{Lamoureux-2006a}.
TIP3P is the current default water model.
Usage of alternative water models is described below.

\begin{itemize}

  \item
    \NAMDCONFWDEF{waterModel}{using which water model?}{%
{\tt tip3}, {\tt tip4}, {\tt swm4}}{ {\tt tip3}}
    {Specifies the water model to be used.
When using the TIP3P water model, the ordering of atoms within each
TIP3P water molecule must be oxygen, hydrogen, hydrogen.
When using the TIP4P water model, the ordering of atoms within each
TIP4P water molecule must be oxygen, hydrogen, hydrogen, lone pair.
When using the SWM4-NDP water model,
the ordering of atoms within each SWM4-NDP water molecule
must be oxygen, Drude particle, lone pair, hydrogen, hydrogen.
Alternative orderings will fail. }

\end{itemize}

\subsection{Drude polarizable force field}
\label{section:drude_forcefield}

The Drude oscillator model represents induced electronic polarization by
  introducing an auxiliary particle attached to each polarizable atom via a
  zero-length harmonic spring.
The advantage with the Drude model is that it preserves the simple
  particle-particle Coulomb electrostatic interaction employed in
  nonpolarizable force fields, thus its implementation in \NAMD\ is more
  straightforward than alternative models for polarization.
\NAMD\ performs the integration of Drude oscillators by employing a novel dual
  Langevin thermostat to ``freeze'' the Drude oscillators while maintaining the
  normal ``warm'' degrees of freedom at the desired
  temperature~\cite{JIAN2011}.
Use of the Langevin thermostat enables better parallel scalability than the
  earlier reported implementation which made use of a dual Nos\'e-Hoover
  thermostat acting on, and within, each
  nucleus-Drude pair~\cite{Lamoureux-2003a}.
Performance results show that the \NAMD\ implementation of the Drude model
  maintains good parallel scalability with an increase in computational cost by
  not more than twice that of using a nonpolarizable force
  field~\cite{JIAN2011}.

Excessive ``hyperpolarization'' of Drude oscillators can be prevented by two
  different schemes.
The default ``hard wall'' option reflects elongated springs back towards the
  nucleus using a simple collision model.
Alternatively, the Drude oscillators can be supplemented by a flat-bottom
  quartic restraining potential (usually with a large force constant).

The Drude polarizable force field requires some extensions to the CHARMM force
  field.
An anisotropic spring term is added to account for out-of-plane forces from a
  polarized atom and its covalently bonded neighbor with two more covalently
  bonded neighbors (similar in structure to an improper bond).
The screened Coulomb correction of Thole is calculated between pairs of Drude
  oscillators that would otherwise be excluded from nonbonded interaction and
  optionally between non-excluded, nonbonded pairs of Drude oscillators
  that are within a prescribed cutoff distance~\cite{Thole81,van1998molecular}.
Also included in the Drude force field are the use of off-centered massless
  interaction sites, so called ``lone pairs'' (LPs), to avoid the limitations
  of centrosymmetric-based Coulomb interactions~\cite{Harder2006}.
The coordinate of each LP site is constructed based on three ``host'' atoms.
The calculated forces on the massless LP must be transferred to the host atoms,
  preserving total force and torque.
After an integration step of velocities and positions, the position of the LP
  is updated based on the three host atoms, along with additional geometry
  parameters that give displacement and in-plane and out-of-plane angles.
See our research web page (\url{http://www.ks.uiuc.edu/Research/Drude/}) for
  additional details and parallel performance results.

\subsubsection{Required input files}

No additional files are required by \NAMD\ to use the Drude polarizable force
  field.
However, it is presently beyond the capability of the \PSFGEN{} tool to
  generate the PSF file needed to perform a simulation using the Drude model.
For now, CHARMM is needed to generate correct input files.

The CHARMM force field parameter files specific to the Drude model are
  required.
The PDB file must also include the Drude particles (mass between 0.05 and 1.0)
  and the LPs (mass 0).
The Drude particles always immediately follow their parent atom.
The PSF file augments the ``atom'' section with additional columns that include
  the ``Thole'' and ``alpha'' parameters for the screened Coulomb interactions
  of Thole.
The PSF file also requires additional sections that list the LPs, including
  their host atoms and geometry parameters, and list the anisotropic
  interaction terms, including their parameters.
A Drude-compatible PSF file is denoted by the keyword ``DRUDE'' given along the
  top line.

\subsubsection{Standard output}

The \NAMD\ logging to standard output is extended to provide additional
  temperature data on the cold and warm degrees of freedom.
Four additional quantities are listed on the {\tt ETITLE} and {\tt ENERGY}
  lines:
\begin{description}
\item[{\tt DRUDECOM}] gives the temperature for the warm center-of-mass
  degrees of freedom,
\item[{\tt DRUDEBOND}] gives the temperature for the cold Drude oscillator
  degrees of freedom,
\item[{\tt DRCOMAVG}] gives the average temperature (averaged since the
  previously reported temperature) for the warm center-of-mass degrees of
  freedom,
\item[{\tt DRBONDAVG}] gives the average temperature (averaged since the
  previously reported temperature) for the cold Drude oscillator degrees of
  freedom.
\end{description}
The energies resulting from the Drude oscillators and the anisotropic
  interactions are summed into the {\tt BOND} energy.
The energies resulting from the LPs and the screened Coulomb interactions of
  Thole are summed into the {\tt ELECT} energy.

\subsubsection{Drude force field parameters}

The Drude model should be used with the Langevin thermostat enabled
  ({\tt Langevin=on}).
Doing so permits the use of normal sized time steps (e.g., 1 fs).
The Drude model is also compatible with constant pressure simulation using the
  Langevin piston.
Long-range electrostatics may be calculated using PME.
The nonbonded exclusions should generally be set to use either the 1-3
  exclusion policy ({\tt exclude=1-3}) or the scaled 1-4 exclusion policy
  ({\tt exclude=scaled1-4}).

The Drude water model (SWM4-NDP) is a 5-site model with four charge sites and
  a negatively charged Drude particle~\cite{Lamoureux-2006a}, with the
  particles ordered in the input files as oxygen, Drude particle, LP, hydrogen,
  hydrogen.
The atoms in the water molecules should be constrained
  ({\tt rigidBonds=water}), with use of the SETTLE algorithm recommended
  ({\tt useSettle=on}).
Explicitly setting the water model ({\tt waterModel=swm4}) is optional.

\begin{itemize}

\item\NAMDCONFWDEF{drude}
{Perform integration of Drude oscillators?}
{{\tt on} or {\tt off}}
{{\tt off}}
{
The integration uses a dual Langevin thermostat to freeze the Drude
  oscillators while maintaining the warm degrees of freedom at the desired
  temperature.
Must also enable the Langevin thermostat.
If {\tt drude} is set to {\tt on}, then {\tt drudeTemp} must also be defined.
}

\item\NAMDCONF{drudeTemp}
{temperature for freezing the Drude oscillators (K)}
{non-negative decimal}
{
For stability, the Drude oscillators must be kept at a very cold termpature.
Using a Langevin thermostat, it is possible to set this temperature to 0 K.
}

\item\NAMDCONF{drudeDamping}
{damping coefficient for Drude oscillators (1/ps)}
{positive decimal}
{
The Langevin coupling coefficient to be applied to the Drude oscillators.
If not given, {\tt drudeDamping} is set to the value of {\tt langevinDamping},
  but values of as much as an order of magnitude greater may be appropriate.
}

\item\NAMDCONFWDEF{drudeNbTholeCut}
{nonbonded Thole interaction radius (\AA)}
{positive decimal}
{5.0}
{
If {\tt drudeNbTholeCut} is non-zero, the screened Coulomb correction of Thole
  is also calculated for non-excluded, nonbonded pairs of Drude oscillators
  that are within this radius of interaction.
}

\item\NAMDCONFWDEF{drudeHardWall}
{use collisions to correct hyperpolarization?}
{on or off}
{on}
{
Excessively elongated Drude oscillator bonds are avoided by reflective
  collisions induced at a fixed cutoff, {\tt drudeBondLen}.
A large number of such events is usually indicative of unstable/unphysical
  dynamics and a simulation will stop if double the cutoff is exceeded.
}

\item\NAMDCONFWDEF{drudeBondLen}
{hyperpolarization cutoff (\AA)}
{positive decimal}
{0.25}
{
If using {\tt drudeHardWall on}, this is the distance at which collisions
  occur.
Otherwise, this is the distance at which an additional quartic restraining
  potential is applied to each Drude oscillator.
In this latter case, a value of 0.2~\AA{} (slightly smaller than default) is
  recommended.
}

\item\NAMDCONFWDEF{drudeBondConst}
{Drude oscillator restraining force constant}
{positive decimal}
{40000.0}
{
If {\tt drudeHardWall off} and {\tt drudeBondConst} is non-zero, an additional
  quartic restraining potential is applied to a Drude oscillator if its length
  exceeds {\tt drudeBondLen}.
}

\end{itemize}

\subsection{MARTINI Residue-Based Coarse-Grain Forcefield}
%\label{sec:martini}

The MARTINI forcefield for residue-based coarse-grain models allows simulation of several tens of atoms as only several large coarse-grained particles~\cite{MARR2004, MARR2007, MONT2008}.  In the MARTINI model, each protein residue is represented by a backbone bead and usually one or more sidechain beads.

When preparing MARTINI simulations it is important to include only those
dihedrals specified by the forcefield.  Using the ``auto dihedrals'' or
``regenerate dihedrals'' feature of psfgen will create dihedrals for all
possible sets of four bonded atoms.  This is incorrect for MARTINI and
will result in energy jumps because the dihedral potential function is
degenerate for the angles of 180 degrees allowed by cosine-based angles.

When using MARTINI the following configuration parameters should be set as indicated:

\begin{verbatim}
cosAngles on
martiniSwitching on
dielectric 15.0
PME off
\end{verbatim}

\begin{itemize}

\item
\NAMDCONFWDEF{cosAngles}{enable the MARTINI cosine-based angle potential function}{{\tt on} or {\tt off}}{{\tt off}}
{Specifies whether or not the MARTINI forcefield is being used, specifically cosine-based angle potential function.
The cosine-based potential will only be used for angles in CHARMM parameter files that specify the cos keyword.}

\item
\NAMDCONFWDEF{martiniSwitching}{enable the MARTINI Lennard-Jones switching function?}{{\tt on} or {\tt off}}{{\tt off}}
{Specifies whether or not the MARTINI forcefield is being used, specifically the Lennard-Jones switching function.}

\item
\NAMDCONF{martiniDielAllow}{Allow dielectrics != 15.0 for use with MARTINI}{{\tt on} or {\tt off}}{{\tt off}}
{Allows user to specify a {\tt dielectric} not equal to 15.0, ie a non-standard dielectric for MARTINI.}

\end{itemize}

\subsection{Constraints and Restraints}
%\label{section:config_add}

\subsubsection{Bond constraint parameters}
\label{section:rigidBonds}
\begin{itemize}
\item
\NAMDCONFWDEF{rigidBonds}{controls if and how ShakeH is used}{{\tt none},
{\tt water}, {\tt all}}{{\tt none}}
{When {\tt water} is selected, the hydrogen-oxygen and hydrogen-hydrogen
distances in waters are constrained to the nominal length or angle given
in the parameter file, making the molecules completely rigid.
When {\tt rigidBonds} is {\tt all}, waters are made rigid as described above
and the bond between each hydrogen and the (one) atom to which
it is bonded is similarly constrained.
For the default case {\tt none}, no lengths are constrained.
}

\item
\NAMDCONFWDEF{rigidTolerance}{allowable bond-length error for ShakeH (\AA)}
{positive decimal}{1.0e-8}
{
The ShakeH algorithm is assumed to have converged when all constrained
bonds differ from the nominal bond length by less than this amount.
}

\item
\NAMDCONFWDEF{rigidIterations}{maximum ShakeH iterations}{positive integer}{100}
{
The maximum number of iterations ShakeH will perform before giving up
on constraining the bond lengths.  If the bond lengths do not
converge, a warning message is printed, and the atoms are left at the
final value achieved by ShakeH.
Although the default value is 100,
convergence is usually reached after fewer than 10 iterations.
}

\item
\NAMDCONFWDEF{rigidDieOnError}{maximum ShakeH iterations}{{\tt on} or {\tt off}}
{{\tt on}}
{
Exit and report an error if rigidTolerance is not achieved after rigidIterations.
}

\item
\NAMDCONFWDEF{useSettle}{Use SETTLE for waters.}{{\tt on} or {\tt off}}
{{\tt on}}
{
If rigidBonds are enabled then use the non-iterative SETTLE algorithm to
keep waters rigid rather than the slower SHAKE algorithm.
}
\end{itemize}

\subsubsection{Position restraint parameters}

The following describes the parameters for the position restraints feature of \NAMD.
For historical reasons the term ``constraints'' has been carried over from X-PLOR.
This feature allows a restraining potential to each atom of an arbitrary set during the simulation.

\begin{itemize}

\item
\NAMDCONFWDEF{constraints}{are position restraints active?}{{\tt on} or {\tt off}}{{\tt off}}
{Specifies whether or not position restraints are active.
If it is set to {\tt off}, then no position restraints are computed.
If it is set to {\tt on}, the potential $k\times(\mathbf{x} - \mathbf{x}_0)^p$ is applied to each atom.
Per-atom values for $k$ can be defined by either {\tt conskfile} or {\tt conskcol}, for $\mathbf{x}_0$ by {\tt consref}, and for $p$ by {\tt consexp}.
}

\item
\NAMDCONFWDEF{consexp}{exponent for position restraint energy function}{positive, even integer}{2}
{Exponent to be use in the position restraint energy function.
This value must be a positive integer, and only even values really make
sense.  This parameter is used only if {\tt constraints} is set to
{\tt on}.}

\item
\NAMDCONF{consref}{PDB file containing restraint reference positions}{UNIX file name}
{PDB file to use for reference positions for position restraints.
Each atom that has a positive force constant will be restrained about the position specified in this file.}

\item
\NAMDCONF{conskfile}{PDB file containing force constant values}{UNIX filename}
{PDB file to use for force constants for
position restraints.}

\item
\NAMDCONF{conskcol}{column of PDB file containing force constant}{{\tt X}, {\tt Y}, {\tt Z}, {\tt O}, or {\tt B}}
{Column of the PDB file to use for the position restraint force constant.
This parameter may specify any of the floating point fields of the PDB file,
either X, Y, Z, occupancy, or beta-coupling (temperature-coupling).
Regardless of which column is used, a value of 0 indicates that the atom
qshould not be restrained.
Otherwise, the value specified is used as the force constant for
that atom's restraining potential.}

\item
\NAMDCONFWDEF{constraintScaling}{scaling factor for position restraint energy function}{positive}{1.0}
{The position restraint energy function is multiplied by this parameter,
making it possible to gradually turn off restraints during equilibration.
This parameter is used only if {\tt constraints} is set to
{\tt on}.}

\item
\NAMDCONFWDEF{selectConstraints}{Restrain only selected Cartesian components of the coordinates?}{{\tt on} or {\tt off}}{{\tt off}}
{This option is useful to restrain the positions of atoms to a plane or a line in space. If active,
 this option will ensure that only selected Cartesian components of the coordinates are restrained.
 E.g.: Restraining the positions of atoms to their current z values with no restraints
 in x and y will allow the atoms to move in the x-y plane while retaining their original z-coordinate.
 Restraining the x and y values will lead to free motion only along the z coordinate.}

\item
\NAMDCONFWDEF{selectConstrX}{Restrain X components of coordinates}{{\tt on} or {\tt off}}{{\tt off}}
{Restrain the Cartesian x components of the positions.}
\item
\NAMDCONFWDEF{selectConstrY}{Restrain Y components of coordinates}{{\tt on} or {\tt off}}{{\tt off}}
{Restrain the Cartesian y components of the positions.}
\item
\NAMDCONFWDEF{selectConstrZ}{Restrain Z components of coordinates}{{\tt on} or {\tt off}}{{\tt off}}
{Restrain the Cartesian z components of the positions.}

\end{itemize}

\subsubsection{Fixed atoms parameters}

Atoms may be held fixed during a simulation.  \NAMD\ avoids calculating most interactions in which all affected atoms are fixed unless {\tt fixedAtomsForces} is specified.

\begin{itemize}

\item
\NAMDCONFWDEF{fixedAtoms}{are there fixed atoms?}{{\tt on} or {\tt off}}{{\tt off}}
{Specifies whether or not fixed atoms are present.}

\item
\NAMDCONFWDEF{fixedAtomsForces}{are forces between fixed atoms calculated?}{{\tt on} or {\tt off}}{{\tt off}}
{Specifies whether or not forces between fixed atoms are calculated.  This option is required to turn fixed atoms off in the middle of a simulation.
These forces will affect the pressure calculation, and you should leave this option off when using constant pressure if the coordinates of the fixed atoms have not been minimized.
The use of constant pressure with significant numbers of fixed atoms is not recommended.}

\item
\NAMDCONFWDEF{fixedAtomsFile}{PDB file containing fixed atom parameters}
{UNIX filename}{{\tt coordinates}}
{PDB file to use for the fixed atom flags for each atom.
If this parameter is not specified, then
the PDB file specified by {\tt coordinates} is used.}

\item
\NAMDCONFWDEF{fixedAtomsCol}{column of PDB containing fixed atom parameters}
{{\tt X}, {\tt Y}, {\tt Z}, {\tt O}, or {\tt B}}{{\tt O}}
{Column of the PDB file to use for the containing fixed atom parameters for
each atom.  The coefficients can be read from any
floating point column of the PDB file.
A value of 0 indicates that the atom is not fixed.}

\end{itemize}

\subsubsection{Extra bond, angle, and dihedral restraints}

Additional bond, angle, and dihedral energy terms may be applied to system,
allowing secondary or tertiary structure to be restrained, for example.
Extra bonded terms are not considered part of the molecular structure
and hence do not alter nonbonded exclusions.
The energies from extra bonded terms are included with the normal
bond, angle, and dihedral energies in \NAMD\ output.

All extra bonded terms are harmonic potentials of the form
$U(x) = k (x-x_{ref})^2$ except dihedrals and impropers with
a non-zero periodicity specified, which use
$U(x) = k (1 + cos(n x - x_{ref}))$.
The only difference between dihedrals and
impropers is the output field that their potential energy is added to.

Due to a very old bug all NAMD releases prior to 2.13 have used the
MARTINI cosine-based angle potential function for all extra angles.
Since workflows may unknowingly depend on this undocumented behavior,
cosine-based angles remain the default, but a warning is printed
unless the desired behavior is specified via the new option
extraBondsCosAngles (defaults to ``on'', set to ``off'' to use
the normal harmonic angle potential function for all extra angles).

The extra bonded term implementation shares the parallel implementation
of regular bonded terms in \NAMD, allowing large numbers of extra terms
to be specified with minimal impact on parallel scalability.
Extra bonded terms do not have to duplicate normal bonds/angles/dihedrals,
but each extra bond/angle/dihedral should only involve nearby atoms.
If the atoms involved are too far apart a bad global bond count will be
reported in parallel runs.

Extra bonded terms are enabled via the following options:

\begin{itemize}

\item
\NAMDCONFWDEF{extraBonds}{enable extra bonded terms?}{{\tt on} or {\tt off}}{{\tt off}}
{Specifies whether or not extra bonded terms are present.}

\item
\NAMDCONFWDEF{extraBondsCosAngles}{are extra angles cosine-based?}{{\tt on} or {\tt off}}{{\tt on}}
{Specifies whether or not all extra angles are cosine-based for consistency with previous versions.
Set to {\tt off} to use normal harmonic angle potential for all extra angles.}

\item
\NAMDCONF{extraBondsFile}{file containing extra bonded terms}{file}
{File containing extra bonded terms.  May be repeated for multiple files.}

\end{itemize}

The extra bonds file(s) should contain lines of the following formats:

\begin{itemize}
\item
{\tt bond <atom> <atom> <k> <ref>}
\item
{\tt angle <atom> <atom> <atom> <k> <ref>}
\item
{\tt dihedral <atom> <atom> <atom> <atom> <k> <ref>}
\item
{\tt dihedral <atom> <atom> <atom> <atom> <k> <n> <ref>}
\item
{\tt improper <atom> <atom> <atom> <atom> <k> <ref>}
\item
{\tt improper <atom> <atom> <atom> <atom> <k> <n> <ref>}
\item
{\tt wall <atom> <atom> <k> <lower> <upper>}
\item
{\tt \# <comment ...>}
\end{itemize}

In all cases {\tt <atom>} is a {\bf zero-based} atom index
(the first atom has index 0),
{\tt <ref>} is a reference distance in \AA\ (bond) or angle in degrees (others),
and {\tt <k>} is a spring constant in the potential energy function
$U(x) = k (x-x_{ref})^2$ or, for dihedrals and impropers with
periodicity {\tt <n>} specified and not 0, $U(x) = k (1 + cos(n x - x_{ref}))$.
Note that $x_{ref}$ is only a minimum for the harmonic potential;
the sinusoidal potential has minima at $(x_{ref} + 180)/n + i \times 360/n$.

Use of {\tt wall} implements a harmonic wall potential similar to
the Colvars harmonic wall restraint. The potential function is
$$
U(x) =
\begin{cases}
        k(x-x_{\text{upper}})^2, &\text{if $x > x_{\text{upper}}$} \\
        0, &\text{if $x_{\text{lower}} \leq x \leq x_{\text{upper}}$} \\
        k(x-x_{\text{lower}})^2, &\text{if $x < x_{\text{lower}}$}
\end{cases}.
$$


\documentclass[11pt]{article}

\usepackage{reduce}
\usepackage{fancyhdr}
\usepackage{amsmath}

\title{
A Package to Integrate Rational Functions using the Minimal Algebraic
Extension to the Constant Field
}
\author{Neil Langmead \\
        Konrad-Zuse-Zentrum f\"ur Informationstechnik (ZIB) \\
        Takustrasse 7  \\
        D- 14195 Berlin Dahlem \\
        Berlin
        Germany}
\date{January 1997}

\def\foottitle{Rational Integration in \REDUCE}
\pagestyle{fancy}
\lhead[]{{\footnotesize\leftmark}{}}
\rhead[]{\thepage}
\renewcommand{\headrulewidth}{0.6pt}
\renewcommand{\footrulewidth}{0.6pt}
\addtolength{\oddsidemargin}{-20 mm}
\addtolength{\textwidth}{25 mm}
\setlength{\headheight}{14pt}
\setlength{\topmargin}{1 mm}
\setlength{\footskip}{10 mm}
\setlength{\textheight}{220 mm}
\cfoot{}
\rfoot{\small\foottitle}

\begin{document}
\maketitle

\pagebreak
\tableofcontents
\pagebreak
\section{Rational Integration}

This package implements the Horowitz/ Rothstein/ Trager algorithms ~\cite{Ged92} for the integration of rational functions in \REDUCE. We work within a field $K$ of characteristic $0$ and functions $p,q \in K[x]$. $K$ is normally the field $Q$ of rational numbers, but not always. These procedures return $\int \frac{p}{q} dx.$
 The aim is to be able to integrate any function of the form $p/q$ in $x$, where $p$ and $q$ are polynomials in the field $Q$. The algorithms used avoid algebraic number extensions wherever possible, and in general, express the integral using the minimal algebraic extension field.

\subsection{Syntax of $ratint$}
This function has the following syntax:
\begin{center} \textbf{ratint(p,q,var)} \end{center}
where $ p/q$ is a rational function in $var$. The output of $ratint$ is a list of two elements: the first is the polynomial part of the integral, the second is the logarithmic part. The integral is the sum of these parts.
\subsection{Examples}
consider the following examples in \REDUCE:
\begin{verbatim}
ratint(1,x^2-2,x);

                sqrt(2)*x-2          sqrt(2)*x+2
           log(-------------) - log(-------------)
                  sqrt(2)              sqrt(2)
{ 0,        ---------------------------------------    }
                          2*sqrt(2)

p:=441*x^7+780*x^6-2861*x^5+4085*x^4+7695*x^3+3713*x^2-43253*x
                                                       +24500;

q:=9*x^6+6*x^5-65*x^4+20*x^3+135*x^2-154*x+49;

ratint(p,q,x);

    49   6  226  5   268  4   1332  3   2809  2   752     256
   ---*(x + ---*x  - ---*x  + ----*x  - ----*x  - ---*x + ---)
    2       147      49        49       147       21       9
 {-----------------------------------------------------------      , 0  }
              4    2   3      2          7
             x  - ---*x  - 4*x  + 6*x - ---
                   3                     3

k:=36*x^6+126*x^5+183*x^4+(13807/6)*x^3-407*x^2-(3242/5)*x+(3044/15);
l:=(x^2+(7/6)*x+(1/3))^2*(x-(2/5))^3;

ratint(k,l,x);

   5271    3    39547   2    31018       7142
  ------*(x  + -------*x  - -------*x + -------)
    5           52710        26355       26355
{------------------------------------------------,
       4    11   3    11   2    2        4
      x  + ----*x  - ----*x  - ----*x + ----
            30        25        25       75

  37451            2      91125           2      128000           1
 -------*(log(x - ---) + -------*log(x + ---) - --------*log(x + ---))}
   16              5      37451           3      37451            2

ratint(1,x^2+1,x);

                    2    1
{0,log_sum(beta,beta  + ---,0,log(2*beta*x - 1)*beta)}
                         4

\end{verbatim}

The meaning of the log\_sum function will be explained later.
\pagebreak
\section{The Algorithm}
The following main algorithm is used:

procedure $ratint(p,q,x);$

% p and q are polynomials in $x$, with coefficients in the %constant field Q

    solution\_list $\leftarrow HorowitzReduction(p,q,x)$
 \\
    $c/d \leftarrow$ part(solution\_list,1)\\
    $poly\_part \leftarrow$ part(solution\_list,2)
  \\
    $rat\_part \leftarrow$ part(solution\_list,3)
\\
    $rat\_part \leftarrow LogarithmicPartIntegral(rat\_part,x) $
\\
 return($rat\_part+c/d +poly\_part$)
\\
end

The algorithm contains two subroutines, $HorowitzReduction$ and $rt$. $HorowitzReduction$ is an implementation of Horowitz' method to reduce a given rational function into a polynomial part and a logarithmic part. The integration of the polynomial part is a trivial task, and is done by the $int$ operator in \REDUCE. The integration of the logarithmic part is done by the routine $rt$, which is an impementation of the Rothstein and Trager method. These two answers are outputed in a list, the complete answer being the sum of these two parts.
\\
These two algorithms are as follows:

procedure $how(p,q,x)$

for a given rational function $p/q$ in $x$, this algorithm calculates the
reduction of $ \int(p/q)$ into a polynomial part and logarithmic part. \\[\baselineskip]
$ poly\_part \leftarrow quo(p,q); \hspace{3 mm}  p \leftarrow rem(p,q)$;

$d \leftarrow GCD(q,q') $; \hspace{3 mm}    $b \leftarrow quo(q,d)$; \hspace{3 mm}
$m \leftarrow deg(b)$; \\  $n \leftarrow deg(d)$;

$a \leftarrow  \sum_{i=1}^{m-1} a_{i}x^{i}$; \hspace{3 mm}
   $ c \leftarrow \sum_{i=1}^{n-1} c_{i}x^{i}$; \\[\baselineskip]
%
$r \leftarrow b*c'-quo(b*d',d)+d*a; $
\vspace*{\baselineskip}
\begin{tabbing}
for $i$ from \= $0$ \=  to $m+n-1$ do \\
\> \{ \\
\> \>   $  eqns(i) \leftarrow coeff(p,i)=coeff(r,i)$; \\
\> \};
\end{tabbing}

$solve(eqns,\{a(0),....,a(m-1),c(0),....,c(n-1)\});$

return($c/d+\int poly\_part + \int a/b$);
\\
end;
\newpage
procedure RothsteinTrager($a,b,x$)

\% Given a rational function $a/b$ in $x$ with $deg(a)<deg(b)$, with b monic and square free, we calculate $ \int(a/b)$ \\
$R(z) \leftarrow residue(a-zb',b)$ \\
$(r_{1}(z)...r_{k}(z)) \leftarrow factors(R(z))$ \\
integral $\leftarrow 0 $
\vspace*{\baselineskip}
\begin{tabbing}
for $i$ from $1$ \= to \= $k$  do   \\
\> \{ \\
\> \> $ d  \leftarrow degree(r_{i}(z))$ \\
\> \> if $d=1$ then \= \\
\> \> \> \{ \\
\> \> \> c $\leftarrow solve(r_{i}(z)=0,z)$ \\
\> \> \> v $\leftarrow GCD(a-cb',b)$\\
\> \> \> v $\leftarrow v/lcoeff(v) $\\

\> \> \> $integral \leftarrow integral+c*log(v)$ \\
\> \> \> \}\\

\> \> else \= \{ \\
\> \> \> \%  we need to do a GCD over algebraic number field\\
\> \> \> v $\leftarrow GCD(a-\alpha*b',b)  $ \\
\> \> \> v $\leftarrow v/lcoff(v) $, \hspace{3 mm}
 where $\alpha=roof\_of(r_{i}(z)) $\\
\> \> if d=2 then \= \{ \\
\> \> \> \% give answer in terms of radicals  \\
\> \> \> c $\leftarrow solve(r_{i}(z)=0,z) $ \\
\> \> \> for j from 1 to 2 do \= \{ \\
\> \> \> $v[j] \leftarrow substitute(\alpha=c[j],v) $ \\
\> \> \> $integral \leftarrow integral+c[j]*log(v[j]) $ \\
% \> \> \> \> \> \} \\
\> \> \> \} \\
\> \> \> else \= \{ \\
\> \> \> \% Need answer in terms of root\_of notation \\
\> \> \> for j from 1 to d do \= \{ \\
\> \> \>  v[j] $\leftarrow substitute(\alpha=c[j],v) $ \\
\> \> \> integral $ \leftarrow integral+c[j]*log(v[j]) $ \\
\> \> \> \% where $c[j]=root\_of(r_{i}(z))$ \} \\
% \> \> \> \> \> \> \} \\
\> \> \> \} \\
\> \> \} \\
\> \} \\
return(integral) \\
end
\end{tabbing}
\pagebreak
\section{The log\_sum operator}
The algorithms above returns a sum of terms of the form
\[ \sum_{\alpha \mid R(\alpha)=0} \log(S(\alpha,x)), \]

where $R \in K[z]$ is square free, and $S \in K[z,x]$. In the cases where the degree of $R(\alpha)$ is less than two, this is merely a sum of logarithms. For cases where the degree is two or more, I have chosen to adopt this notation as the answer to the original problem of integrating the rational function. For example,
consider the integral
 \[ \int \frac{a}{b}=\int \frac{2x^5-19x^4+60x^3-159+x^2+50x+11}{x^6-13x^5+58x^4-85x^3-66x^2-17x+1}\, dx \]
Calculating the resultant $R(z)=res_x(a-zb',b)$ and factorising gives
  \[ R(z)=-190107645728000(z^3-z^2+z+1)^{2} \]
Making the result monic, we have
\[ R_2(z)=z^3-z^2+z+1 \]
which does not split over the constant field $Q$.
Continuting with the Rothstein Trager algorithm, we now calculate
\[ gcd(a-\alpha\,b',b)=z^2+(2*\alpha-5)*z+\alpha^2, \] where $\alpha$ is a root of $R_2(z)$. \\
Thus we can write
\[ \int \frac{a}{b}= \sum_{\alpha \mid \alpha^3-\alpha^2+\alpha+1=0} \alpha*\log(x^2+2\alpha x-5x+\alpha^2), \]

and this is the answer now returned by \REDUCE, via a function called $log\_sum$. This has the following syntax:
\begin{center}$ log\_sum(\alpha,eqn(\alpha),0,sum\_term,var)$ \end{center}
where $\alpha$ satisfies $eqn=0$, and $sum\_term$ is the term of the summation in the variable $var$. Thus in the above example, we have
\[ \int \frac{a}{b}\,dx= log\_sum(\alpha,\alpha^3-\alpha^2+\alpha+1,0,\alpha*\log(x^2+2\alpha x-5x+\alpha^2),x) \]

Many rational functions that could not be integrated by \REDUCE previously can now be integrated with this package. The above is one example; some more are given on the next page.
\pagebreak
\subsection{More examples}
\begin{eqnarray*}
 \int \frac{1}{x^5+1} \, dx & = &\frac{1}{5}\log(x + 1) \\
 &  & \mbox{} + 5log\_sum(\beta,\beta^4+\frac{1}{5}\beta^3+\frac{1}{25}\beta^2+\frac{1}{125}\beta+\frac{1}{625},0,\log(5*\beta+x)*\beta)
\end{eqnarray*}

which should be read as
\[
\int \frac{1}{x^5+1}\,dx = \frac{1}{5}\log(x+1)+\sum_{\beta \mid \beta^4+\frac{1}{5}\beta^3+\frac{1}{25}\beta^2+\frac{1}{125}\beta+\frac{1}{625}=0} \log(5*\beta+x)\beta \]
\vspace{5 mm}
\begin{eqnarray*}
\lefteqn{\int \frac{7x^{13}+10x^8+4x^7-7x^6-4x^3 -4x^2+3x+3}{x^{14}-2x^8-2x^7-2x^4-4x^3-x^2+2x+1} \, dx  =}  \\
& &  log\_sum(\alpha,\alpha^2  -\alpha -\frac{1}{4},0,log( - 2\alpha x^2  - 2\alpha x + x^7  + x^2  - 1)*\alpha,x) ,
\end{eqnarray*}
\[ \int \frac{1}{x^3+x+1} \, dx = log\_sum(\beta,\beta^3-\frac{3}{31}\beta^2-\frac{1}{31},0,\beta \log(-\frac{62}{9}\beta^2+\frac{31}{9} \beta +x+\frac{4}{9})). \]

\section{Options}
There are several alternative forms that the answer to the integration problem can take. One output is the $log\_sum$ form shown in the examples above. There is an option with this package to convert this to a "normal" sum of logarithms in the case when the degree of $eqn$ in $\alpha$ is two, and $\alpha$ can be expressed in surds. To do this, use the function $convert$, which has the following syntax:
\begin{center}  convert(exp) \end{center}
If exp is free of $log\_sum$ terms, then $exp$ itself is returned. If $exp$ contains $log\_sum$ terms, then $\alpha$ is represented as surds, and substituted into the $log\_sum$ expression. For example, using the last example, we have in \REDUCE:
\begin{verbatim}

2: ratint(a,b,x);

  {0,

                    2            1
  log_sum(alpha,alpha  - alpha - ---,0,
                                 4

                         2                7    2
         log( - 2*alpha*x  - 2*alpha*x + x  + x  - 1)*alpha,x)}

3: convert(ws);

 1                           2                7
---*(sqrt(2)*log( - sqrt(2)*x  - sqrt(2)*x + x  - x - 1)
 2

                             2                7
      - sqrt(2)*log(sqrt(2)*x  + sqrt(2)*x + x  - x - 1)

                        2                7
      + log( - sqrt(2)*x  - sqrt(2)*x + x  - x - 1)

                     2                7
      + log(sqrt(2)*x  + sqrt(2)*x + x  - x - 1))

\end{verbatim}
\subsection{LogtoAtan function}
The user could then combine these to form a more elegant answer, using the switch combinelogs if one so wished. Another option is to convert complex logarithms to real arctangents ~\cite{Bron97}, which is recommended if definite integration is the goal. This is implemented in \REDUCE via a function $convert\_log$, which has the following syntax:
\begin{center} \bf{convert\_log(exp)}, \end{center}
where $exp$ is any log\_sum expression.\\[\baselineskip]
%
The procedure to convert complex logarithms to real arctangents is based on an algorithm by Rioboo. Here is what it does: \\[\baselineskip]
%
Given a field $K$ of characteristic 0 such that $\sqrt(-1) \not\in K$ and
$A, B \in K[x]$ with $B \not = 0$, return a sum $f$ of arctangents of polynomials in $K[x]$ such that
\[  \frac{df}{dx}=\frac{d}{dx} i \log(\frac{A+ i B}{A- i B}) \]

Example:
\[ \int \frac{x^4-3*x^2+6}{x^6-5*x^4+5*x^2+4} \, dx = \sum_{ \alpha \mid 4\alpha+1=0} \alpha \log(x^3+2\alpha x^2-3 x-4 \alpha) \]

Substituting $\alpha=i/2$ and $\alpha=-i/2$ gives the result

\[ \frac{i}{2} \log(\frac{(x^3-3 x)+i (x^2-2)}{(x^3-3 x)-i (x^2-2)}) \]

Applying logtoAtan now with $A=x^3-3 x$, and $B=x^2-2$ we obtain

\[ \int \frac{x^4-3*x^2+6}{x^6-5*x^4+5*x^2+4} \, dx = \arctan(\frac{x^5-3 x^3+x}{2})+\arctan(x^3)+\arctan(x) , \]

and this is the formula which should be used for definite integration. \\[\baselineskip]
%
Another example in \REDUCE is given below:
\begin{verbatim}

1: ratint(1,x^2+1,x);

*** Domain mode rational changed to arnum

                    2    1
{0,log_sum(beta,beta  + ---,0,log(2*beta*x - 1)*beta)}
                         4

13: part(ws,2);

                 2    1
log_sum(beta,beta  + ---,0,log(2*beta*x - 1)*beta)
                      4

14: on combinelogs;

15: convertlog(ws);

 1        - i*x + 1
---*log(------------)*i
 2         i*x + 1

logtoAtan(-x,1,x);

2*atan(x)

\end{verbatim}
\section{Hermite's method}
The package also implements Hermite's method to reduce the integral into its polynomial and logarithmic parts, but occasionally, \REDUCE returns the incorrect answer when this algorithm is used. This is due to the REDUCE operator pf, which performs a complete partial fraction expansion when given a rational function as input. Work is presently being done to give the pf operator a facility which tells it that the input is already factored. This would then enable REDUCE to perform a partial fraction decomposition with respect to a square free denominator, which may not necessarily be fully factored over Q.
\newline
For a complete explanation of this and the other algorithms used in this package, including the theoretical justification and proofs, please consult ~\cite{Ged92}.

\section{Tracing the $ratint$ program}
The package includes a facility to trace in some detail the inner workings of the $ratint$ program. Messages are given at the key stages of the algorithm, together with the results obtained. These messages are displayed when the switch $traceratint$ is on, which is done in \REDUCE with the command
\begin{verbatim}
on traceratint;
\end{verbatim}
This switch is off by default. Here is an example of the output obtained with this switch on:

\begin{verbatim}
Loading image file: /silo/tony/red/lisp/psl/solaris/red/reduce.img
REDUCE Development Version, 21-May-97 ...

1: load_package ratint;

2: on traceratint;

3: ratint(1+x,x^2-2*x+1,x);

                                     x + 1
performing Howoritz reduction on --------------
                                   2
                                  x  - 2*x + 1

                   - 2        1
Howoritz gives: {-------,0,-------}
                  x - 1     x - 1

                                 1
computing Rothstein Trager on -------
                               x - 1

integral in Rothstein T is log(x - 1)

   - 2
{-------,log(x - 1)}
  x - 1

\end{verbatim}

\section{Bugs, suggestions and comments}
This package was written when the author was working as a placement student at ZIB Berlin. All comments should therefore be reported to Winfried Neun, ZIB, Takustrasse 7, D 14195 Berlin Dahlem, Germany \\ (email: neun@zib.de).

\pagebreak

\begin{thebibliography}{999999}
\normalsize
\bibitem[Bron97]{Bron97} Bronstein, Manuel,
{\it Symbolic Integration I: Transendental Functions},
Springer-Verlag, Heidelberg, 1997.

\bibitem[Dav88]{Dav88} Davenport, James H. et al,
{\it Computer Algebra- Systems and Algorithms for Algebraic Computation},
Academic Press, 1988.

\bibitem[Ged92]{Ged92} Geddes, K.O. et al,
{\it Algorithms for Computer Algebra}, Klewer Academic \mbox{Publishers}, 1992.

\bibitem[Red36]{Red36} Hearn, Anthony C. and Fitch, John F.
{\it REDUCE User's Manual 3.6}, RAND Corporation, 1995
\end{thebibliography}

\end{document}


% Copyright 2018 Melvin Eloy Irizarry-Gelpí
\chapter{A Binions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
An A binion has the form
\begin{equation}
    a_{0} + a_{1} A
\end{equation}
These follow from an elliptic Cayley-Dickson construct on the reals.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Arithmetic Operations}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Multiplication}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conjugate Operations}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Asterisk Conjugation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Quadrance}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Cloak Conjugation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Dagger Conjugation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Hodge Star}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Differential Operators}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{M\"{o}bius Transformations}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Cross-Ratio}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...