3

I have build a molecular orbital based on LaRiFaRi's code example from Mar 2 at 15:26, with the package modiagram.

Everything looks correct and is perfect - but the labels are totally wrong. It not only looks odd, but it is also totally misleading! Here is how it looks:

HCHO/Formaldehyde/Methanal - Molecular Orbital Diagram.

Is their any possibility to place the labels correctly - and of course, how? Or any ideas what I can do about it? Maybe LaRiFaRi or clemens could help me again again - or anyone else? But thank you very much for what you already helped me with. And thank you very much in advance.

Yours faithfully!

NB! Here "my" source code

\documentclass{article}
\usepackage{modiagram}
\usepackage[version=3]{mhchem}

\begin{document}
\pagestyle{empty}
    \begin{MOdiagram}[labels-fs=\scriptsize]
        \AO(1cm){s}[label={$\mathrm{1a_1}$}]{0;} % AO1
        \AO(1cm){s}[label={$\mathrm{2a_1}$}]{0.5;} % AO2
        \AO(1cm){s}[label={$\mathrm{3a_1}$}]{2.5;} % AO3
        \AO(1cm){s}[label={$\mathrm{4a_1}$}]{4;} % AO4
        \AO(1cm){s}[label={$\mathrm{1b_1}$}]{5;} % AO5
        \AO(1cm){s}[label={$\mathrm{1b_2}$}]{6;} % AO6
        \AO(1cm){s}[label={$\mathrm{5a_1}$}]{7;} % AO7
        \AO(1cm){s}[label={$\mathrm{2b_1}$}]{9;} % AO8
        \AO(1cm){s}[label={$\mathrm{6a_1}$}]{10;} % AO9
        \AO(1cm){s}[label={$\mathrm{2b_2}$}]{11;} % AO10
        \node at (1cm, -1.5){CO};
        %%%%%%%%%%%%%%%%%%%%%%%
        \AO(5cm){s}[label={$\mathrm{1a_1}$}]{0;} % AO11
        \AO(5cm){s}[label={$\mathrm{2a_1}$}]{0.5;} % AO12
        \AO(5cm){s}[label={$\mathrm{3a_1}$}]{2.5;} % AO13
        \AO(5cm){s}[label={$\mathrm{4a_1}$}]{4;} % AO14
        \AO(5cm){s}[label={$\mathrm{1b_2}$}]{4.33;} % AO15
        \AO(5cm){s}[label={$\mathrm{5a_1}$}]{4.66;} % AO16
        \AO(5cm){s}[label={$\mathrm{1b_1}$}]{5;} % AO17
        \AO(5cm){s}[label={$\mathrm{2b_2}$}]{8.5;} % AO18
        \AO(5cm){s}[label={}]{8.56;} % AO19
        \AO(5cm){s}[label={$\mathrm{2b_1}$}]{9;} % AO20
        \AO(5cm){s}[label={$\mathrm{6a_1}$}]{9.5;} % AO21
        \AO(5cm){s}[label={$\mathrm{7a_1}$}]{10;} % AO22
        \AO(5cm){s}[label={$\mathrm{3b_2}$}]{11;} % AO23
        \node at (5cm, -1.5){\ce{HCHO}};
        \connect{AO1 & AO11, AO2 & AO12, AO3 & AO13, AO4 & AO14, AO5 & AO17, AO5 & AO19, AO6 & AO19, AO6 & AO15, AO7 & AO16, AO7 & AO21, AO8 & AO20, AO9 & AO22, AO10 & AO23}
        %%%%%%%%%%%%%%%%%%%%%%%
        \AO(9cm){s}[label={$\mathrm{1a_1}$}]{7;} % AO24
        \AO(9cm){s}[label={$\mathrm{1b_2}$}]{8.5;} % AO25
        \node at (9cm, -1.5){2H};
        \connect{AO16 & AO24, AO21 & AO24, AO19 & AO25}
        \EnergyAxis[title=$E$]
    \end{MOdiagram} 
\end{document}
5
  • The @-notifier does not work this way, only if the relevant user has already edited/commented here ;-)
    – user31729
    Mar 9, 2015 at 12:53
  • @SoundsOfSilence all right, thank you! PS! I posted the source code (forgot it in first place). Mar 9, 2015 at 12:55
  • 1
    Is \begin{MOdiagram}[labels-fs=\scriptsize, labels-style={yshift=6pt}] what you want? Or for single cases: Do not use a label= but a custom node like in my first revision on the earlier post.
    – LaRiFaRi
    Mar 9, 2015 at 13:04
  • 1
    @LaRiFaRi Thank you very much! That solved my problem! But how do I close this question? I can't give you the check mark, so I can't close the question - because you answered in the commends. What shall I do now? Let it stay open? Kind regards! Mar 9, 2015 at 13:12
  • 1
    Also take a look on tex.stackexchange.com/a/153569. Joseph is in chemistry as well and he did a nice diagram with 3d-orbitals.
    – LaRiFaRi
    Mar 9, 2015 at 13:14

1 Answer 1

3

I recommend one of the following ways. You can shift all labels up a bit, or you set the labels manually as I have done for AO13 and AO14. I would use the TikZ library positioning for this.

% arara: pdflatex

\documentclass{article}
\usepackage{modiagram}
\usepackage[version=3]{mhchem}
\usetikzlibrary{positioning}

\begin{document}
\pagestyle{empty}
\begin{MOdiagram}[labels-fs=\scriptsize, labels-style={yshift=6pt}]
    \AO(1cm){s}[label={$\mathrm{1a_1}$}]{0;} % AO1
    \AO(1cm){s}[label={$\mathrm{2a_1}$}]{0.5;} % AO2
    \AO(1cm){s}[label={$\mathrm{3a_1}$}]{2.5;} % AO3
    \AO(1cm){s}[label={$\mathrm{4a_1}$}]{4;} % AO4
    \AO(1cm){s}[label={$\mathrm{1b_1}$}]{5;} % AO5
    \AO(1cm){s}[label={$\mathrm{1b_2}$}]{6;} % AO6
    \AO(1cm){s}[label={$\mathrm{5a_1}$}]{7;} % AO7
    \AO(1cm){s}[label={$\mathrm{2b_1}$}]{9;} % AO8
    \AO(1cm){s}[label={$\mathrm{6a_1}$}]{10;} % AO9
    \AO(1cm){s}[label={$\mathrm{2b_2}$}]{11;} % AO10
    \node at (1cm, -1.5){\ce{CO}};
    %%%%%%%%%%%%%%%%%%%%%%%
    \AO(5cm){s}[label={$\mathrm{1a_1}$}]{0;} % AO11
    \AO(5cm){s}[label={$\mathrm{2a_1}$}]{0.5;} % AO12
    \AO(5cm){s}{2.5;} % AO13
    \node[right= 1mm of AO13]{\scriptsize$\mathrm{3a_1}$};
    \AO(5cm){s}{4;} % AO14
    \node[right= 1mm of AO14]{\scriptsize$\mathrm{4a_1}$};
    \AO(5cm){s}[label={$\mathrm{1b_2}$}]{4.33;} % AO15
    \AO(5cm){s}[label={$\mathrm{5a_1}$}]{4.66;} % AO16
    \AO(5cm){s}[label={$\mathrm{1b_1}$}]{5;} % AO17
    \AO(5cm){s}[label={$\mathrm{2b_2}$}]{8.5;} % AO18
    \AO(5cm){s}{8.56;} % AO19
    \AO(5cm){s}[label={$\mathrm{2b_1}$}]{9;} % AO20
    \AO(5cm){s}[label={$\mathrm{6a_1}$}]{9.5;} % AO21
    \AO(5cm){s}[label={$\mathrm{7a_1}$}]{10;} % AO22
    \AO(5cm){s}[label={$\mathrm{3b_2}$}]{11;} % AO23
    \node at (5cm, -1.5){\ce{HCHO}};
    \connect{AO1 & AO11, AO2 & AO12, AO3 & AO13, AO4 & AO14, AO5 & AO17, AO5 & AO19, AO6 & AO19, AO6 & AO15, AO7 & AO16, AO7 & AO21, AO8 & AO20, AO9 & AO22, AO10 & AO23}
    %%%%%%%%%%%%%%%%%%%%%%%
    \AO(9cm){s}[label={$\mathrm{1a_1}$}]{7;} % AO24
    \AO(9cm){s}[label={$\mathrm{1b_2}$}]{8.5;} % AO25
    \node at (9cm, -1.5){\ce{2H}};
    \connect{AO16 & AO24, AO21 & AO24, AO19 & AO25}
    \EnergyAxis[title=$E$]
\end{MOdiagram} 
\end{document}

enter image description here

Another possible syntax would be \node[right] at (AO14.east){\scriptsize$\mathrm{4a_1}$};

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .