Graphics, Figures & TablesPhospholipids representation - how can i do it?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
elmariachi
Posts: 9
Joined: Sat Nov 22, 2008 7:00 pm

Phospholipids representation - how can i do it?

Post by elmariachi »

Hello latex friends.
First of all, english isn't my native language so I'm not sure as to what these are called --- please let me know if you do ;)
chemschemes.png
chemschemes.png (383.63 KiB) Viewed 2559 times
Is it possible to replicate this sort of diagram using latex? TikZ maybe? I never anything graphic-related in latex, just text and tables.

Thank you all!


Edit by localghost: No external links! Attachments go onto the forum server (see Board Rules).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Phospholipids representation - how can i do it?

Post by localghost »

elmariachi wrote:[…] Is it possible to replicate this sort of diagram using latex? TikZ maybe? […]
A little bit late comes this solution. To me it seemed to be possible only now with reasonable effort. And the back-end is indeed pgf/tikZ. The quite new and excellent chemfig package is based on that and is used for the chemical structures.

Code: Select all

\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc,positioning}
\usepackage{chemfig}
\usepackage[version=3]{mhchem}

\setatomsep{2em}

\begin{document}
  \begin{tikzpicture}[>=stealth]
    \node (pea) {%
      \chemname{%
        \chemfig{%
          {Alkyl}--[6](-[4]{Acyl})-[6]-
          O-P(=[2]O)(-[4]O)(-[6]O^{-})-O-[:-30]-[:30]-[:-30]{\ce{NH2}}
        }
      }{\hspace{-2em} Phosphatidylethanolamine}
    };
    \node (nape) [node distance=4em and -9em,below right=of pea.south west] {%
      \chemname{%
        \chemfig{%
          {Alkyl}--[6](-[4]{Acyl})-[6]-
          O-P(=[2]O)(-[4]O)(-[6]O^{-})-O-[:-30]-[:30]-[:-30]{\chembelow{N}{H}}-[:30]
          (=[2]O)-[:-30]-[:30]-[:-30]-[:30]=-[:-30]-[:30]=-[:-60]-[:-120]=[4]-[:150]
          -[:210]=[4]-[:150]-[:210]-[:150]-[:210]-[6]
        }
      }{$N$-arachidonoyl-PE}
    };
    \node (aa) [anchor=north east,node distance=4em and 0em,below left=of nape.south east] {%
      \chemname{%
        \chemfig{%
          HO-[:-30]-[:30]-[:-30]{\chembelow{N}{H}}-[:30]
          (=[2]O)-[:-30]-[:30]-[:-30]-[:30]=-[:-30]-[:30]=-[:-60]-[:-120]
         =[4]-[:150]-[:210]=[4]-[:150]-[:210]-[:150]-[:210]-[6]
        }
      }{\hspace{-8em} Anandamide}
    };
    \begin{scope}[on background layer]
      \fill[cyan!10] ($(pea.south west)+(-90pt,-5pt)$) rectangle ($(pea.north east)+(72pt,5pt)$);
      \fill[gray!10] ($(nape.south west)+(0,-5pt)$) rectangle ($(nape.north east)+(0,5pt)$);
      \fill[magenta!10] ($(aa.south west)+(-80pt,-5pt)$) rectangle ($(aa.north east)+(0,5pt)$);
    \end{scope}
    \path[->,ultra thick] ($(pea.south)+(-9.15pt,0)$) edge node[right,midway] {$N$-acyltransferase} (nape.north)
                          (nape.south)                edge node[right,midway] {Phospholipase D} ($(aa.north)+(-40.2pt,0)$);
  \end{tikzpicture}
\end{document}
It is not an exact replication but looks quite good. Study the manuals of the involved packages to learn how to use them. A new package that bundles the two chemistry packages is mychemistry which could also be interesting.


Thorsten
Attachments
The rendered output of the provided code.
The rendered output of the provided code.
phospholipids.png (25.81 KiB) Viewed 2494 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Phospholipids representation - how can i do it?

Post by cgnieder »

Indeed, myChemistry was designed for that purpose and uses ChemFig to draw the formulae.
This is, how you'd solve the problem with myChemistry:

Code: Select all

\documentclass{scrartcl}
\usepackage{mychemistry}
\begin{document}
\setarrowlength{3em}
\begin{rxn}
 \reactant[,,fill=cyan!10,minimum width=.8\textwidth]{
   \chemname{\chemfig{Alky|l--[6](-[4,,,2]Alky|l)-[6]-O-P(=[2]O)(-[6]O-[,.5,,,draw=none]{\scriptstyle\ominus})-O-[:-30]-[:30]-[:-30]NH_2}}{\bfseries Phosphatidylethanolamine}
 }
 \arrow[below]{}{\textit{N}-acyltransferase}
 \reactant[below,,fill=gray!10,minimum width=.8\textwidth]{
   \chemname{\chemfig{Alky|l--[6](-[4,,,2]Alky|l)-[6]-O-P(=[2]O)(-[6]O-[,.5,,,draw=none]{\scriptstyle\ominus})-O-[:-30]-[:30]-[:-30]\chembelow{N}{H}-[:30](=[2]O)-[:-30]-[:30]-[:-30]-[:30]=-[:-30]-[:30]=-[:-60]-[::-60]=[:180]-[::-30]-[::60]=[:180]-[::-30]-[::60]-[::-60]-[::60]-[6]}}{\bfseries\textit{N}-arachidonoyl-PE}
 }
 \arrow[below]{}{Phospholipase D}
 \reactant[below,,fill=magenta!10,minimum width=.8\textwidth]{
   \chemname{\chemfig{HO-[:-30]-[:30]-[:-30]\chembelow{N}{H}-[:30](=[2]O)-[:-30]-[:30]-[:-30]-[:30]=-[:-30]-[:30]=-[:-60]-[::-60]=[:180]-[::-30]-[::60]=[:180]-[::-30]-[::60]-[::-60]-[::60]-[6]}}{\bfseries Anandamide}
 }
\end{rxn}
\end{document}
Regards
Attachments
phospholipids.jpg
phospholipids.jpg (20.03 KiB) Viewed 2481 times
site moderator & package author
Post Reply