如何绘制分子

如何绘制分子

如何绘制分子 Coronene,以及放置勾号使用 Tiks? 在刻度末尾带有字母 H 的分子周围画出圆圈

在此处输入图片描述

这是代码` \section{Conclusão} \begin{frame}

               \fontsize{9pt}{10pt}\selectfont
               \frametitle{CONCLUSÃO}
               \framesubtitle{}
               \begin{tikzpicture}
               \draw [opacity=0.2](0,-2)grid(4,2);

\draw[red, dashed] (5,0)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm] at (5,0) {};    

\draw[red, dashed] (1,0)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (1,0) {};

\draw[red, dashed] (2,0)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (2,0) {};

\draw[red, dashed] (3,0)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (3,0) {};

\draw[red, dashed] (1.5,0.9)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (1.5,0.9) {};

\draw[red, dashed] (2.5,0.9)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (2.5,0.9) {};
    
\draw[red, dashed] (1.5,-0.9)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (1.5,-0.9) {};

\draw[red, dashed] (2.5,-0.9)  circle(0.5cm);
\node[regular polygon, regular polygon sides=6, draw,inner sep=0.3535cm,rotate=90] at (2.5,-0.9) {}

                \end{tikzpicture}

                \end{frame}`

这是分子的一个例子,上面有一个勾号在此处输入图片描述

答案1

\documentclass[border=10pt]{standalone}
\usepackage{chemfig}
\begin{document}
\chemfig{*6(=*6(-=(-H)-(-H)=*6(-(-H)=(-H)-*6(=(-H)-(-H)=*6(-(-H)=(-H)-*6(
    =(-H)-(-H)=*6(-(-H)=(-H)----)---)---)---)---)--)-=-=-)}
\end{document}

在此处输入图片描述

编辑

\documentclass[border=12mm]{standalone}
\usepackage{chemfig}
\usetikzlibrary{tikzmark} % for background grid
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
    \coordinate (O) at (pic cs:cyce);
    \pgfmathsetlengthmacro{\mystep}{\fpeval{(6*sqrt(3)*1.6*1.25)}em} % length of an edge of grid
    \foreach \x in {-2,...,2}{\draw[gray,very thin]
        (O) ++(-\x*\mystep/6,-\mystep/2) -- ++(0,\mystep)
        (O) ++(-\mystep/2,-\x*\mystep/6) -- ++(\mystep,0);}
    \draw[gray,very thin] (O) ++(-\mystep/2,-\mystep/2) rectangle ++(\mystep,\mystep);
\end{tikzpicture}
\chemfig[atom sep=1.6em, atom style={scale=1.25}]{% for scale
    *6(=*6(-=(-H)-(-H)=*6(-(-H)=(-H)-*6(=(-H)-(-H)=*6(-(-H)=(-H)-*6(
    =(-H)-(-H)=*6(-(-H)=(-H)----)---)---)---)---)--)-=-=-)}
\begin{tikzpicture}[remember picture,overlay]
    \tikzmark{cyce}{(cyclecenter1)}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容