Gekürzte Bindungen als decoration darzustellen ist etwas knifflig. Ich hatte ja ein Muster verwendet, das sich alle 0.5pt wiederholt. Wenn ich es richtig verstehe, muss so eine decoration auf jeden Fall kürzer sein, als der Pfad, auf dem man sie zeichnet.
Meine Lösung also (siehe Code unten):
Die erste Variante (outer half red colored bond) nimmt jetzt eine Muster, das um 0.1pt kürzer als der mit \setatomsep eingestellte Abstand.
Die als Bindung zu verwenden geht aber schief, wenn man die Bindung mit einem Atom (hier das O) enden lässt. Dafür dann die zweite Variante (outer half red colored bond to end at atom ), bei der die zweite Bindung nur am Anfang gekürzt ist.
Ich will nicht versprechen, dass das unter allen Umständen funktioniert...
\documentclass{article}
\usepackage{chemfig}
\usetikzlibrary{decorations}
\makeatletter
\def\sethclinewidth{\def\hc@line@width}
% default line width:
\sethclinewidth{0.4pt}
% outer half red colored bond:
\pgfdeclaredecoration{hc}{initial}
{
\def\hc@length{\CF@atom@sep-.1pt}
\state{initial}[width=\hc@length]
{
\pgfsetlinewidth{\hc@line@width}
\pgfpathlineto{\pgfpoint{\hc@length}{0pt}}
\color{black}\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{2pt}{\CF@double@sep}}
\pgfpathlineto{\pgfpoint{\CF@atom@sep-2.05pt}{\CF@double@sep}}
% choose color you want:
\color{red}\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{\hc@length}{0pt}}
}
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
}
}
% outer half red colored bond to end at atom
\pgfdeclaredecoration{hca}{initial}
{
\state{initial}[width=2.5pt,next state=middle]
{
\pgfsetlinewidth{\hc@line@width}
\pgfpathlineto{\pgfpoint{2.5pt}{0pt}}
\color{black}\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{2.05pt}{\CF@double@sep}}
\pgfpathlineto{\pgfpoint{2.5pt}{\CF@double@sep}}
% choose color you want:
\color{red}\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{2.5pt}{0pt}}
}
\state{middle}[width=.5pt]
{
\pgfsetlinewidth{\hc@line@width}
\pgfpathlineto{\pgfpoint{.5pt}{0pt}}
\color{black}\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{0pt}{\CF@double@sep}}
\pgfpathlineto{\pgfpoint{.5pt}{\CF@double@sep}}
% choose color you want:
\color{red}\pgfusepath{stroke}
\pgfpathmoveto{\pgfpoint{.5pt}{0pt}}
}
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
}
}
% use decorations as styles:
\tikzset{
lc/.style={decorate,decoration={hc}},
rc/.style={decorate,decoration={hc,mirror}},
lca/.style={decorate,decoration={hca}},
rca/.style={decorate,decoration={hca,mirror}},
}
\makeatother
\begin{document}
\setatomsep{2em}\setbondstyle{line width=1pt}\sethclinewidth{1pt}
\chemfig{*6(---[,,,,lc](--[::-60,,,,rc]-[::60](-[2])-[::-60,,,,rc]-[::60]-[::-60,,,,rc]-[::60](-[2])-[::-60,,,,rc]-[::60]-[::-60,,,,rca]O)-(-[:60])(-[:120])--)}
\end{document}
Gruß