2

I'm trying to build a MO diagram for the HF molecule, since the MO's in question are not formed by s-s or p-p combination I must use AO command to build both the AO's and the MO's, or at least was the solution I found.

That said I've come up with the following code:

\documentclass{article}
\usepackage{modiagram}
\usepackage{chemmacros}
\begin{document}
\begin{modiagram}[style=fancy, names=true, labels=true, labels-fs=\footnotesize]
    %%% Hydrogen %%%
        \AO[1s](1cm){s}[label={$1s$}]{-1.361; up}
    %%% Fluorine %%%
        \AO[2s](5cm){s}[label={$2s$}]{-4.017; pair}
        \AO[2p](5cm){p}[label[x]={$2p_x$},label[y]={$2p_y$},label[z]={$2p_z$}]{-1.865; pair, pair, up}
    %%% Molecule %%%%
        %%% Non Bonding %%%
        \AO[2sMO](3cm){s}[label={$2s$}]{-4.017; pair}
        \AO[2px](3cm-10pt){s}[label={$2p_x$}]{-1.865; pair}
        \AO[2py](3cm+10pt){s}[label={$2p_y$}]{-1.865; pair}
        %%% Bonding %%%
        \AO[2sig](3cm){s}[label={\chemsigma}]{-2.865; pair}
        \AO[2sig*](3cm){s}[label={\chemsigma$^*$}]{-0.361; 0}
    %%% Conections %%%
        \connect{1s & 2sig, 1s & 2sig*} % Hydrogen 1s
        \connect{2p & 2sig, 2p & 2sig*, 2p & 2py} % Fluorine 2p
        \connect{2s & 2sMO} % Fluorine 2s
    %%% Labels %%%
\EnergyAxis[title=E]

\end{modiagram} \end{document}

The problem I'm facing is that the modiagram package is not recognizing the AO named 2p and thus will not connect it to anything.

What should I do to solve this?

More of the project can be seen at https://www.overleaf.com/read/qtjhqjyryphb#a004eb

liuzp
  • 47

1 Answers1

4

For one orbital of type p, three shapes are created: <name>x, <name>y and <name>z. In particular:

\AO[2p](5cm){p}[label[x]={$2p_x$},label[y]={$2p_y$},label[z]={$2p_z$}]{-1.865; pair, pair, up}

does not define the shape 2p, but three shapes named 2px, 2py and 2pz.

Try:

\documentclass{article}
\usepackage{modiagram}
\usepackage{chemmacros}
\begin{document}
\begin{modiagram}[style=fancy, names=true, labels=true, labels-fs=\footnotesize]
    %%% Hydrogen %%%
        \AO[1s](1cm){s}[label={$1s$}]{-1.361; up}
    %%% Fluorine %%%
        \AO[2s](5cm){s}[label={$2s$}]{-4.017; pair}
        \AO[2p](5cm){p}[label[x]={$2p_x$},label[y]={$2p_y$},label[z]={$2p_z$}]{-1.865; pair, pair, up}
    %%% Molecule %%%%
        %%% Non Bonding %%%
        \AO[2sMO](3cm){s}[label={$2s$}]{-4.017; pair}
        \AO[2pxMO](3cm-10pt){s}[label={$2p_x$}]{-1.865; pair}
        \AO[2pyMO](3cm+10pt){s}[label={$2p_y$}]{-1.865; pair}
        %%% Bonding %%%
        \AO[2sig](3cm){s}[label={\chemsigma}]{-2.865; pair}
        \AO[2sig*](3cm){s}[label={\chemsigma$^*$}]{-0.361; 0}
    %%% Conections %%%
        \connect{1s & 2sig, 1s & 2sig*} % Hydrogen 1s
        \connect{2sig & 2px, 2sig* & 2px, 2pyMO &  2px } % Fluorine 2p
        \connect{2s & 2sMO} % Fluorine 2s
    %%% Labels %%%
\EnergyAxis[title=E]

\end{modiagram} \end{document}

molecular diagram

jlab
  • 1,834
  • 1
  • 13