1

I have some smaller submolecules (which I also need for my graph) and I want to assmble them to a bigger one. Unfortunetly if I try to connect them like in the example, LaTex makes the bond anywhere. Is it possible to specifically connect the X with the Y molecule without changing the submols? Thanks Roland

MWE:

\documentclass{article}

\usepackage{subcaption,graphicx} \usepackage{chemfig} %\usepackage[showframe]{geometry}

\begin{document}

\definesubmol{Y1}{[:90]5((-OH)--O--(-Y)-)} \definesubmol{Y2}{[:90]5((-OH)--O-(-[:90]X)-(-OH)-)}

\chemfig{!{Y1}} \chemfig{!{Y2}}

\chemfig{(!{Y1})-,3}

This is how I wanted it to look like:\

\chemfig{[:90]5((-OH)--O-(-[:90]X)-(-[:-90]Y(-[:0]X(-[:-90]-[:-18]5(-(-HO)-(-OH)--O-))))-)}

\end{document}

enter image description here

Roland
  • 6,655
  • What's your expected output? – muzimuzhi Z Nov 20 '20 at 23:24
  • Hello. I basically wanted to draw an RNA backbone consisting of the same submolecule. – Roland Nov 21 '20 at 01:43
  • Looks like some bonds are connected in a different angle when submolecules are connected. – muzimuzhi Z Nov 21 '20 at 07:06
  • Probably related/interesting: https://tex.stackexchange.com/a/388071/134144 – leandriis Nov 21 '20 at 09:10
  • Entirely unrelated to the issue: Does it really make sense to abbreviate part of the phosphate group with "Y" while one of the oxygen atoms of the very same phosphate group is abbreviated with "X"? Wouldn't it be easier/clearer to explicitly draw the phospate backbone of the RNA? Also, the "X" seems to be used inconsistently. In the lower submolecule, there is a CH2-group between the ribose ring and the "X", in the upper sobmolecule, there isn't. – leandriis Nov 21 '20 at 09:22
  • I just used the X and Y for easier explanation. Can I connect any atom of one submolecule with any atom in another? I was in a hurry that's why there is an additional CH2 group. My bad. I already draw the figure but it's a long code and I just wanted to know if there is a way I can made it more readable. – Roland Nov 21 '20 at 11:09
  • 1
    Guessing from your previous question, I assume you want to be able to easily draw the RNA, but also be able to draw a single ribose with its base as well as just the ribos and just the base while definig the corresponding submolecules just once. If that's correct, chemfig and lego-style molecule construction might definitely be interesting. – leandriis Nov 21 '20 at 11:15

0 Answers0