\HeaderA{addMolecules}{Add/subtract sum formulae}{addMolecules}
\aliasA{subMolecules}{addMolecules}{subMolecules}
\keyword{methods}{addMolecules}
\begin{Description}\relax
Simple arithmetic modifications of sum formulae.
\end{Description}
\begin{Usage}
\begin{verbatim}
addMolecules(formula1, formula2, elements = NULL)
subMolecules(formula1, formula2, elements = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{formula1}] Sum formula
\item[\code{formula2}] Sum formula
\item[\code{elements}] list of allowed chemical elements, defaults to full
periodic system of elements
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
addMolecules() adds the second argument to the first.
subMolecules() subtracts the second argument from the first.

This can be useful to revert
e.g. adduct/fragment formation found in ESI mass spectrometry,
or to mimick simple chemical reactions. No chemical checks are
performed.
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{}] A list with the elements
\item[formula] repeated sum formula

\item[mass] exact mass of molecule
      
\item[score] dummy value, always 1.0
      
\item[isotopes] a list of isotopes 


\end{ldescription}
\end{Value}
\begin{Author}\relax
Steffen Neumann <sneumann@IPB-Halle.DE>
\end{Author}
\begin{Examples}
\begin{ExampleCode}
# For proton-Adduct of Ethanol:
subMolecules("C2H7O", "H")
\end{ExampleCode}
\end{Examples}

