\subsection{Adding and deleting hydrogens}

The next example renders an SDF file for doxorubicin, downloaded from PubChem%
%
\footnote{We could also just have used the \texttt{-i pubchem} option, but since we are going to reuse the file, a local copy is handy.}

\lstinputlisting{doxo-from-sdf.sh}

This gives us

\cfpic{doxo-raw.tex}

Yikes. Let's remove the explicit hydrogens with option \lstinline!--hydrogens=delete! or \lstinline!-y delete!:

\lstinputlisting{doxo-strip-h.sh}

This gives

\cfpic{doxo-stripped.tex}

It is also possible to \emph{add} hydrogens to a structure that does not supply them; for example:

\lstinputlisting{phenol-add-h.sh}

produces

\cfpic{phenol-with-hydrogens.tex}

By default, \mcf neither removes nor adds hydrogens. Note also that adding hydrogens will trigger coordinate recalculation (see section \ref{sec:recalc}).