Sunteți pe pagina 1din 46

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Chemg Package
Zachary Morseth
Minnesota State University-Moorhead

May 3, 2011

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Outline

1 Introduction 2 Syntax 3 Drawing Molecules 4 Drawing Rings 5 Chemical Reactions

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Chemg is a package written for drawing molecules and other A important aspects of chemistry using the LTEXcode.

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Chemg is a package written for drawing molecules and other A important aspects of chemistry using the LTEXcode.

To add the package, type: \usepackage{chemfig} into the preamble of your document. This will also automatically load the tikz package (a very powerful graphics representation program).

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Outline

1 Introduction 2 Syntax 3 Drawing Molecules 4 Drawing Rings 5 Chemical Reactions

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

The syntax for drawing gures using Chemg is \chemfig{<code>} The code will describe the atoms to draw and their spatial arrangment (angles, distance, bond type, etc.).

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

The syntax for drawing gures using Chemg is \chemfig{<code>} The code will describe the atoms to draw and their spatial arrangment (angles, distance, bond type, etc.). A more detailed example of the code is: \chemfig{<atom1><bond type> [<angle>,<coeff>,<n1>,<n2>,<tikz code>]<atom2>} With this code in hand, it is possible to draw an innite number of dierent molecules.

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Outline

1 Introduction 2 Syntax 3 Drawing Molecules 4 Drawing Rings 5 Chemical Reactions

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Water Molecule
To draw a water molecule, we will use Chemg to specify the arrangement of the atoms. The code is: \chemfig{H-O-H}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Water Molecule
To draw a water molecule, we will use Chemg to specify the arrangement of the atoms. The code is: \chemfig{H-O-H} H O H

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Water Molecule
To draw a water molecule, we will use Chemg to specify the arrangement of the atoms. The code is: \chemfig{H-O-H} H O H We can also change the distance of the bond using the command \setatomsep{2em}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Water Molecule
To draw a water molecule, we will use Chemg to specify the arrangement of the atoms. The code is: \chemfig{H-O-H} H O H We can also change the distance of the bond using the command \setatomsep{2em} H O H

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Specifying Angles
In Chemg, predened angles are specied in multiples of 45 degrees.

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Specifying Angles
In Chemg, predened angles are specied in multiples of 45 degrees. For example, to specify an angle measure of 90 degrees, we input [2] in the optional argument. The default value for no input is 0 degrees.

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Specifying Angles
In Chemg, predened angles are specied in multiples of 45 degrees. For example, to specify an angle measure of 90 degrees, we input [2] in the optional argument. The default value for no input is 0 degrees. There is also a way to introduce absolute angles in the interval [0, 360). The code for this is: [:<absolute angle>]

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Specifying Angles
In Chemg, predened angles are specied in multiples of 45 degrees. For example, to specify an angle measure of 90 degrees, we input [2] in the optional argument. The default value for no input is 0 degrees. There is also a way to introduce absolute angles in the interval [0, 360). The code for this is: [:<absolute angle>] Additionally, angles can be dened relative to the preceding bond. The code for this is: [::<relative angle>]

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Ethane Molecule

To draw the ethane molecule, the code is: \chemfig{C(-[2]H)(-[4]H)(-[6]H)-C(-H)(-[2]H)(-[6]H)}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Ethane Molecule

To draw the ethane molecule, the code is: \chemfig{C(-[2]H)(-[4]H)(-[6]H)-C(-H)(-[2]H)(-[6]H)} H H C H H C H H

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Outline

1 Introduction 2 Syntax 3 Drawing Molecules 4 Drawing Rings 5 Chemical Reactions

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Rings
In addition to drawing linear and branched molecules, Chemg can also construct a variety of dierent molecules containing rings. The code for drawing a ring is: \chemfig{*n(<code for the molecule>)}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Rings
In addition to drawing linear and branched molecules, Chemg can also construct a variety of dierent molecules containing rings. The code for drawing a ring is: \chemfig{*n(<code for the molecule>)} To draw rings composed of 6 carbon atoms, we will use the code: \chemfig{*6(------)}, \chemfig{*6(--(-Cl)-=-=)}

Cl
Zachary Morseth Chemg Package MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Rings
To combine multiple rings together, as in the case of phtalic anhydride, we use the code: \chemfig{*6(=*5(-(=O)-O-(=O)-)-=-=-)}

O O O
Zachary Morseth Chemg Package MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

The code for the benzene ring is \chemfig{*6(=-=-=-)} The code for the oxalane-2,5-dione is \chemfig{*5(-(=O)-O-(=O)--)} O

O
Zachary Morseth Chemg Package MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Caeine
O H3 C N N CH3

N CH3

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Caeine
O H3 C N N CH3

N CH3

The code for caeine is: \chemfig{*6((=O)-N(-CH_3)-*5(-N=N(-CH_3)-=)--(=O)-N(-H_3C)-)}


Zachary Morseth Chemg Package MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Adrenaline
Now, lets take a look at how to construct the chemical structure for adrenaline piece by piece. OH HO

HN HO CH3

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline

Draw the skeleton structure:

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline

Draw the skeleton structure: \chemfig{*6(-=-=-=)}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline

Draw the skeleton structure: \chemfig{*6(-=-=-=)} HO Add hydroxyl substituents to skeleton stucture: HO

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline

Draw the skeleton structure: \chemfig{*6(-=-=-=)} HO Add hydroxyl substituents to skeleton stucture: HO \chemfig{*6((-HO)-=-=-(-HO)=}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline
Next, we must add the branched chain to our structure (using relative angles for ease): HO HN HO CH3

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline
Next, we must add the branched chain to our structure (using relative angles for ease): HO HN HO CH3 The code for this step is: \chemfig{*6((-HO)-=-(--[::-60][::-60]HN-[::+60]CH_3)=-(-HO)=)}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline
Lastly, we must add in the cram bond for the added hydroxyl substituent.

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline
Lastly, we must add in the cram bond for the added hydroxyl substituent. To illustrate the use of cram bonds: The code for A B is \chemfig{A<B}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline
Lastly, we must add in the cram bond for the added hydroxyl substituent. To illustrate the use of cram bonds: The code for A B is \chemfig{A<B} OH HO HO HN CH3

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Adrenaline
Lastly, we must add in the cram bond for the added hydroxyl substituent. To illustrate the use of cram bonds: The code for A B is \chemfig{A<B} OH HO HO Th nal code for the structure is: \chemfig{*6((-HO)-=-(-(<[::60]OH)[::-60]-[::-60]HN-[::+60]CH_3)=-(-HO)=)}
Zachary Morseth Chemg Package MSUM

HN

CH3

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Acetylsalicylic Acid (Aspirin)


OH

O \chemfig{*6(-=-(-O-[::-60](=[::-60]O)[::+60])=(-(=[::+60])-[::-60]OH)-=)}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Camphor

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Camphor

Here is the code for drawing camphor: \quad \setcrambond{3pt}{}{} \chemfig{<[:10](>[:85,1.8]?(-[:160,0.6])-[:20,0.6])>[:-10] -[:60](=[:30,0.6]O)-[:170]?(-[:30,0.6])-[:190]-[:240]} Note: The ? character is used to create a hook between an atom and a distant atom.
Zachary Morseth Chemg Package MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Outline

1 Introduction 2 Syntax 3 Drawing Molecules 4 Drawing Rings 5 Chemical Reactions

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Chemical Reactions

Another important feature of chemg is the ability to write chemical reactions, which show how a set of reactants reaches a nal product.

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Chemical Reactions

Another important feature of chemg is the ability to write chemical reactions, which show how a set of reactants reaches a nal product. As an example, consider the reaction

H3 C

Cl

AlCl3

+ HCl

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

The code for the previous chemical reaction (the alkylation of benzene) is: \setatomsep{2em}\chemfig{**6(------)} \hspace{.2cm} + \hspace{.2cm} \chemfig{H_3C-Cl} \hspace{.2cm} $\xrightarrow{\chemfig{AlCl_3}}$ \hspace{.2cm} \chemfig{**6(-(-)-----)} \hspace{.1cm} + \hspace{.1cm} \chemfig{HCl}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Drawing Viagara
O H N O S N N H3 C O CH3 CH3 N O CH3 N N

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

The code for the drug Viagara is: \setatomsep{2.2em} \chemfig{N*6((-H_3C)---N(-S(=[::+120]O)(=[::+0]O) -[::-60]*6(-=-(-O-[::-60]-[::+60]CH_3)= (-*6(=N-*5(-(--[::-60]-[::+60]CH_3) =N-N(-CH_3)-=)--(=O)-N(-H)-))-=))---)}

Zachary Morseth Chemg Package

MSUM

Introduction

Syntax

Drawing Molecules

Drawing Rings

Chemical Reactions

Thank You!

Zachary Morseth Chemg Package

MSUM

S-ar putea să vă placă și