带电分子排列

带电分子排列

我一直在尝试让氢和氯之间的键与箭头和 + 符号对齐。但是,每当我为偶极子添加 delta + 和 delta - 时,分子就会向下偏移。任何解决方案都非常感谢。

\documentclass{article}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{geometry}
\usepackage{tabu}
\usepackage{textgreek}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{siunitx}
\usepackage{chemmacros}
\usetikzlibrary{arrows}

\newcommand{\minus}{\scriptstyle\color{black}\delta-}
\newcommand{\circleminus}{\scriptstyle\hspace{4.5mm}\ominus}
\newcommand{\plus}{\scriptstyle\color{black}\delta+}
\newcommand{\leftminus}{\scriptstyle\hspace{-4.5mm}{-}}
\newcommand\arcbetweennodes[3]{%
    \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}%
    \let#3\pgfmathresult}
\newcommand\arclabel[6][red,-stealth,shorten <=4pt,shorten >=2pt]{%
    \chemmove{%
        \arcbetweennodes{#4}{#3}\anglestart
        \arcbetweennodes{#4}{#5}\angleend
        \ifdim\anglestart pt>\angleend pt \pgfmathsetmacro\anglestart{\anglestart-360}\fi
        \draw[#1]([shift=(\anglestart:#2)]#4)arc[start angle=\anglestart,end angle=\angleend,radius=#2];%
        \pgfmathsetmacro\anglestart{(\anglestart+\angleend)/2}%
        \node[shift=(\anglestart:#2+1pt)#4,anchor=\anglestart+180,inner sep=-10pt,outer sep=10pt]at(#4){#6};%
    }%
}

\begin{document}

\vspace{2mm}
\begin{center}
\tabulinesep = ^ 4mm _ 4mm % border gap
\begin{tabu} to 13cm {|X[cm]|}
    \hline
    \schemestart
    \chemfig{\charge{90:3pt=\:}{N}(-[:200]R)(<[:290]H(-[:-90,0.5,,,draw=none]))(-[:90,,,,draw=none])<:[:340]H}
    \arrow{0}[,0]
    \+
    \arrow{0}[,0]
    \chemfig{H(-[:30,0.35,,,draw=none]\plus)-Cl(-[:30,0.4,,,draw=none]\minus)}
    \arrow[,1.5,thick]
    \chemfig{N(-[:30,0.4,,,draw=none]\scriptsize\oplus)(-[:200]R)(<[:290]H(-[:-90,0.5,,,draw=none]))(-[:90,0.9,,,->]H)<:[:340]H}
    \arrow{0}[,0]
    \+ 
    \hspace{1mm}
    \arrow{0}[,0]
    \chemfig{\charge{180=\:}{Cl}|^{\ominus}}
    \schemestop
    \\
    \hline
\end{tabu}
\end{center}

\end{document}

答案1

你不需要新的命令

\begin{center}
    \tabulinesep = ^ 4mm _ 4mm % border gap
    \begin{tabu} to 13cm {|X[cm]|}
        \hline
        \schemestart
%
\chemfig{\charge{90:1pt=\:}{N}(-[:210]H)(<:[:330]H)(<[:300]H)}
%
\+
%
\chemfig{\chemabove{H}{\scriptstyle\delta+}-\chemabove{Cl}{\scriptstyle\delta-}@{z}}
%
\arrow(@{z}--[yshift=5pt]){->[][][2pt]}
%
\chemfig{N(-[:210]H)(<:[:330]H)(<[:300]H)(-[2,,,,->]H)(-[:30,.3,,,,draw=none]\scriptstyle\fplus)}
%
\+
%
\chemfig{\charge{180=\:}{Cl}(-[:30,.35,,,,draw=none]\scriptstyle\fminus)}
%
\schemestop
\\
\hline
\end{tabu}
\end{center}

在此处输入图片描述

要添加反应机制箭头,必须将 @{} 标签放在箭头起源或到达的原子之前(例如 @{a1}C )

\begin{center}
    \tabulinesep = ^ 4mm _ 4mm % border gap
    \begin{tabu} to 13cm {|X[cm]|}
        \hline
        \schemestart
%
\chemfig{@{a1}\charge{90:1pt=\:}{N}(-[:210]H)(<:[:330]H)(<[:300]H)}
%
\+
%
\chemfig{@{a2}\chemabove{H}{\scriptstyle\delta+}-[@{b1}]@{b2}\chemabove{Cl}{\scriptstyle\delta-}@{z}}
%
\arrow(@{z}--[yshift=5pt]){->[][][2pt]}
%
\chemfig{N(-[:210]H)(<:[:330]H)(<[:300]H)(-[2,,,,->]H)(-[:30,.3,,,,draw=none]\scriptstyle\fplus)}
%
\+
%
\chemfig{\charge{180=\:}{Cl}(-[:30,.35,,,,draw=none]\scriptstyle\fminus)}
%
%===================================================
\chemmove{
    \draw[red,shorten <=3pt,shorten >=1pt](a1).. controls +(90:8mm) and +(150:8mm)..(a2);
    \draw[red,shorten <=1pt,shorten >=1pt](b1).. controls +(270:6mm) and +(270:6mm)..(b2);
}
\schemestop
\\
\hline
\end{tabu}
\end{center}

在此处输入图片描述

相关内容