I tried to connect 2 aromatic compunds (one is a submolecule). My problem is that LaTex does not connect them at the right atom. I want to connect 4 with B. I know how to set the optional bond argument in simple molecules but fail in this examples. I always tells me that the atom does not exist. So my question is where to I have to put the optional bond argument in aromatic molecules like in Example 1 so that it connects 4 with B and is it possible to connect 4 and B in Example 2 and automatically remove the H atom?
Thanks! Roland
\documentclass{article}
\usepackage{subcaption,graphicx}
\usepackage{chemfig}
%\usepackage[showframe]{geometry}
\begin{document}
%%%%%Example 1
\definesubmol{Y}{*6(A-B-C-D-E-F-)}
\chemfig{*6(1-2-3-4(-!{Y})-5-6-)}
%\chemfig{ABCD-[:90,,3,2]EFG}
%%%%%%Example 2
\definesubmol{Y2}{*6(A-\chembelow{B}{H}-C-D-E-F-)}
\chemfig{*6(1-2-3-4(-!{Y2})-5-6-)}
\end{document}
EDIT: The actual molecules I want to combine. So I want to connect it to the N molecule
\documentclass{article}
\usepackage{subcaption,graphicx}
\usepackage{chemfig}
\usepackage{lipsum}
\newcommand{\decoRule}{\rule{\textwidth}{0.4pt}}
%\usepackage[showframe]{geometry}
\begin{document}
\definesubmol{Cbase}{*6(-\chembelow{N}{H}-(=O)-N=(-NH_2)-=)}
\definesubmol{a}{-P(=[::-90,0.75]O)(-[::90,0.75]OH)-}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%in RNA
\definesubmol{CRbase}{*6(-N-(=O)-N=(-NH_2)-=)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}
\centering
\chemfig{!{Cbase}}
\chemfig{[:-54]*5((--[::42]O([::-24]!a\charge{135:3pt=$\scriptstyle\ominus$}{O}))<(-HO)-[,,,,line width=2pt](-OH)>(-!{CRbase})-O-)}
\end{figure}
\end{document}
[![enter image description here][2]][2]
It should alos be oiriented like that:
\definesubmol{Cbase}{*6(-\chembelow{N}{H}-(=O)-N=(-NH_2)-=)}
\chemfig{!{Cbase}}
[![enter image description here][3]][3]
In the End it should look like this: