The following example illustrates how to define a simple objective function. By
deriving the objective function from `OEFunc2`, we can find the
roots of the simple quadratic equation using `OENewtonOpt` optimizer.
A class derived from `OEFunc2` must contain analytical gradients
and Hessians. This examples expects a number as input for the initial guess to solve
the simple function.

The following example illustrates how to define checkpoints and use then along with
optimizers to monitor progress during optimization. For simplicity, a simple quadratic
equation is defined as objective function and derived from `OEFunc1`.
The quadratic equation is solved using the `OEBFGSOpt` optimizer.
A class derived from `OEFunc1` must contain analytical gradients. This
examples expects a number as input for the initial guess to solve the simple function.

The following example illustrates how to define an objective function within the context
of a molecule. Generally speaking, a molecule function (`OEMolFunc`) defines
some sort of interaction involving a part or all of a molecule. For simplicity, a simple
energy function is defined that consists sum of square of distance of all the atoms in the molecule.
The molecule function is optimized using the `OEBFGSOpt` optimizer.
A class derived from `OEMolFunc1` must contain analytical gradients.

The following example illustrates how to calculate energy and optimize a single
ligand in vacuum. The `OEMMFF` force field is used as is for
this example. The molecule needs to be prepared (`OEForceField.PrepMol`),
followed by a call to `OEMolFunc.Setup` to create the interactions. Optimization is carried out using the `OEBFGSOpt` optimizer.

The following example illustrates how to setup a ligand optimization within the context of
a protein using the `OEMMFF` force field. Besides setting up the ligand
MMFF interactions, protein preparation (`OEForceField.PrepMol`) followed
by creation of the intermolecular interactions and addition of those to the force field
are required to perform.

The following example illustrates how to setup a ligand optimization within the context of
a protein using the `OEMMFFAmber` force field. Using an intermolecular
forcefield like OEMMFFAmber for protein-ligand complexes is simpler compared to using
OEMMFF, as the forcefield is already equipped to combine a ligand with a protein.

The following example illustrates how to fix a subset of atoms using the `OESubsetAdaptor` during a single ligand optimization in vacuum. The adaptor is initialized with
the OEMMFF interactions of the ligand, and passed as the objective function to be optimized.
Methods of the adaptor are used to convert between the Cartesian coordinates of the ligand and the
adaptor variables.

The following example illustrates how to optimize a set of torsion angles using the `OETorAdaptor`
for a single ligand in vacuum. The adaptor is initialized with
the OEMMFF interactions of the ligand, and passed as the objective function to be optimized.
Methods of the adaptor are used to convert between the Cartesian coordinates of the ligand and the
adaptor variables.

The following example illustrates how to perform rigid optimization of a ligand in the context of a protein using the `OEQuatAdaptor`. The adaptor is initialized with
the protein-ligand interactions, and passed as the objective function to be optimized.
Methods of the adaptor are used to convert between the Cartesian coordinates of the ligand and the
adaptor variables.