Math & Science ⇒ how to draw in chemfig
how to draw in chemfig
Can someone show me how to draw the attached structure in chemfig? Thanks.
- Attachments
-
- chemstructure.png (5.36 KiB) Viewed 8914 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
how to draw in chemfig
This surely isn't a »can you do that for me« forum.
Please have a look at the
chemfig documentation, try it yourself and come back with a compilable minimal example to show your efforts.
Please have a look at the

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
how to draw in chemfig
Sorry for offending with my direct request, Johannes ... I was merely trying to get a lead on understanding where to begin and where to end with drawing the structure as a base for my future configurations. Yesterday was only my second time using chemfig (with documentation at hand) and I spent hours trying to figure out how to draw this bicyclic figure, namely by building the structure in pieces and then make my attempt on figuring how to merge it all together. It seems simple, but just can't yet wrap my head around the bond angles ... I know I'll get there soon, though. Any leads on how to start with it would be most appreciated.
My pieced attempts so far included this:
Best regards,
A
My pieced attempts so far included this:
Code: Select all
\documentclass{book}
\usepackage{chemfig}
\begin{document}
\chemfig{-[::-30]O-(=[::45]O)-[::-30]}
\chemfig{Cl-[::-30]-[::60]Cl}
\chemfig{-[::90]-[::-45]-[::-135]-[::-50]}
\chemfig{-[::30]O-(=[::-45]O)-[::30]}
\end{document}
A
Last edited by cgnieder on Thu Jun 05, 2014 10:15 pm, edited 1 time in total.
how to draw in chemfig
I'll show you how I would proceed if I had to draw it. You need to build it in several steps. Start with the hexagon:
Play with angles and lengths until it looks about right. Then start on the bridge. Use the possibility to give the
Again play with bond lengths if necessary. Now add the missing pieces. First the chlorine:
And finally the esters:
Hope this helps so you'll be able to draw similar molecules yourself next time 
Regards
Code: Select all
\chemfig{
?-[:-150,1.5]
-[:-100]
-[:30,1.5]
-[:-30,1.5]
=^[:80]?
}
?
hooks names:Code: Select all
\chemfig{
?[a](-[:90]?[b])
-[:-150,1.5]
-[:-100]
-[:30,1.5](-[:90]?[b])
-[:-30,1.5]
=^[:80]?[a]
}
Code: Select all
\chemfig{
?[a](-[:90]?[b](-[:30,.7]Cl)-[:150,.7]Cl)
-[:-150,1.5]
-[:-100]
-[:30,1.5](-[:90]?[b])
-[:-30,1.5]
=^[:80]?[a]
}
Code: Select all
\chemfig{
?[a](-[:90]?[b](-[:30,.7]Cl)-[:150,.7]Cl)
-[:-150,1.5](-[:135](=[::-60]O)-[::60]O-[::-60])
-[:-100](-[:-135](=[::60]O)-[::-60]O-[::60])
-[:30,1.5](-[:90]?[b])
-[:-30,1.5]
=^[:80]?[a]
}

Regards
site moderator & package author
Re: how to draw in chemfig
Yes, this is exactly the start I needed. It gives me a good base for doing more of these kind. It appears that because of its diverse flexibility, one can take several approaches on how to build a molecule in chemfig (albeit some use longer methods, like me
), so thanks for taking the time to get me on the right track. chemfig is an awesome package!
All the best,
Audrey

All the best,
Audrey
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: how to draw in chemfig
Thanks for helping out here Clemens.
Audrey, Clemens described his thought process. You can see, that he thought about the structure before coding. One molecule is put in one chemfig.
Maybe starting with some simple molecules and structures is better.
Audrey, Clemens described his thought process. You can see, that he thought about the structure before coding. One molecule is put in one chemfig.
Maybe starting with some simple molecules and structures is better.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: how to draw in chemfig
Yes, thanks, Johannes. I now understand the thought process much better in piecing the structure together and I appreciate the valuable feedback.
Best regards,
Audrey

Best regards,
Audrey