Math & ScienceXymTeX Structure problem

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
swiper
Posts: 4
Joined: Thu Apr 22, 2010 11:48 pm

XymTeX Structure problem

Post by swiper »

I am trying to draw the chemical structure of Triethyl Phosphate. Trying to draw the structure with the picture environment and put line proved to be too tedious and time consuming.

I read about Xymtex and I like the somewhat easier format. I am close to drawing the structure but not quite there.
Does anyone know how I can draw the structure closer to what the compound should actually look like?
I'm also open to a different method if there is something better than Xymtex for what I want to do.

So far I have:

Code: Select all

\documentclass{article}
% \usepackage{xymtexps}   % enables PS-mode
\usepackage{xymtex}       % if using pdflatex
\begin{document}
1. basic structure \\
\tetrahedral{0==P;1D==O;2==CH$_3$CH$_2$O;3==OCH$_2$CH$_3$;4==OCH$_2$CH$_3$}\\
2. A little more advanced but the bottom bond of P does not look correct \\
\tetrahedral{0==P;1D==O;2==\trimethylenei{3==O}{3==(yl)};3==\trimethylenei{1==O}{1==(yl)};4==\trimethylene{1==O}{1==(yl)}}\\
3. Even better but I don't know how to make the bottom bond on P. Here is my best effort which creates both bonds on the top of P \\
~\\
\heptamethylene{3==O;4==P;5==O}{4D==O;4Sa==\trimethylene{1==O}{1==(yl)}}\\
\end{document}
Thanks for any advice.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

fbf
Posts: 2
Joined: Thu Jul 23, 2009 12:03 am

XymTeX Structure problem

Post by fbf »

You can use \put(x,y){object} to adjust the position of chemical bonds and atoms:

Code: Select all

\documentclass{article}
% \usepackage{xymtexps}   % enables PS-mode
\usepackage{xymtex}       % if using pdflatex
\begin{document}
1. basic structure \\
\tetrahedral{0==P;1D==O;2==CH$_3$CH$_2$O;3==OCH$_2$CH$_3$;4==OCH$_2$CH$_3$}\\
2. A little more advanced but the bottom bond of P does not look correct \\
\tetrahedral{0==P;1D==O;2==\trimethylenei{3==O}{3==(yl)};3==\put(10,10){O}\put(5,-100){\trimethylenei{}{1==(yl)}};4==\trimethylene{1==O}{1==(yl)}}
\vspace{1cm}\\
3. Even better but I don't know how to make the bottom bond on P. Here is my best effort which creates both bonds on the top of P \\
~\\
\heptamethylene{3==O;4==P;5==O}{4D==O;4Sa==\put(5,40){\trimethylene{1==O}{1==(yl)}}}\\

4. Other methods:\\

\htetrahedralS{0==P;1==\trimethylene{3==O}{3==(yl)};2==\put(5,-35){\trimethylenei{1==O}{1==(yl)}};3D==O;4==\put(10,40){\trimethylene{3==O}{3==(yl)}}}\\

\Utrigonal{1N==\put(10,10){O}\put(5,-100){\trimethylenei{}{1==(yl)}};0==P;2==\trimethylenei{1==O}{1==(yl)};3==\put(-68,-10){O}\put(-85,20){\trimethylene{}{3==(yl)}}}
\put(-605,15){\ethylenev{2==O}{}}\\

\utrigpyramid{0==P;1==\put(0,10){O}\put(5,-95){\trimethylenei{}{1==(yl)}};2D==O;3==\put(5,40){\trimethylene{3==O}{3==(yl)}};5==\trimethylenei{1==O}{1==(yl)}}
\end{document}
I hope that helps.
c-top
Posts: 3
Joined: Mon Jun 28, 2010 12:27 pm

XymTeX Structure problem

Post by c-top »

A possible solution with chemfig.

Code: Select all

\chemfig{P(=[::90]O)(-[::210]O-[::-60]-[::60])(-[::30]O-[::-60]-[::60])(-[::-30]O-[::-90]-[::60])}
Post Reply