diff options
Diffstat (limited to 'contrib/chem/examples')
-rw-r--r-- | contrib/chem/examples/README.txt | 65 | ||||
-rw-r--r-- | contrib/chem/examples/atp.chem | 63 | ||||
-rw-r--r-- | contrib/chem/examples/cholesterin.chem | 52 | ||||
-rw-r--r-- | contrib/chem/examples/ethamivan.chem | 48 | ||||
-rw-r--r-- | contrib/chem/examples/lsd.chem | 51 | ||||
-rw-r--r-- | contrib/chem/examples/morphine.chem | 55 | ||||
-rw-r--r-- | contrib/chem/examples/penicillin.chem | 56 | ||||
-rw-r--r-- | contrib/chem/examples/reserpine.chem | 65 |
8 files changed, 455 insertions, 0 deletions
diff --git a/contrib/chem/examples/README.txt b/contrib/chem/examples/README.txt new file mode 100644 index 00000000..da891b87 --- /dev/null +++ b/contrib/chem/examples/README.txt @@ -0,0 +1,65 @@ +This directory contains examples for the `chem' language. + +You can view the graphical display of the examples by calling + + groffer <file> + +`groffer' calls `chem' automatically. + +If you want to transform example files to a different format use the +`roff2*' programs: + +`roff2dvi' prints dvi format to standard output, +`roff2html' generates html output, +`roff2pdf' outputs pdf mode, +`roff2ps' produces PostScript output, +`roff2text' generates text output in the groff device `latin1', +`roff2x' prints the output in the groff device X that is + suitable for programs like `gxditview' or `xditview'. + +To get a suitable `groff' output run + + @g@chem <file> | groff -p ... + +On the displays, you can see rings consisting of several lines and +bonds (lines). All points on rings and bonds that do not have a +notation mean a C atom (carbon) filled with H atoms (hydrogen) such +that the valence of 4 is satisfied. + +For example, suppose you have just a single line without any +characters. That means a bond. It has two points, one at each end of +the line. So each of these points stands for a C atom, the bond +itself connects these 2 C atoms. To fulfill the valence of 4, each +points has to carry additionally 3 H atoms. So the single empty bond +stands for CH3-CH3, though this combination doesn't make much sense +chemically. + + +####### License + +Last update: 5 Jan 2009 + +Copyright (C) 2006, 2009 Free Software Foundation, Inc. +Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +This file is part of `chem', which is part of `groff'. + +`groff' is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +`groff' is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + + +####### Emacs settings + +Local Variables: +mode: text +End: diff --git a/contrib/chem/examples/atp.chem b/contrib/chem/examples/atp.chem new file mode 100644 index 00000000..076f961e --- /dev/null +++ b/contrib/chem/examples/atp.chem @@ -0,0 +1,63 @@ +atp.chem: +.cstart + +# Example file for `chem': +# ATP or C10_H16_N5_O13_P3 or +# [[[5-(6-aminopurin-9-yl)-3,4-dihydroxy-oxolan-2-yl]methoxy-hydroxy- +# phosphoryl]oxy-hydroxy-phosphoryl]oxyphosphonic acid + +# Found at http://www.chemindustry.com/apps/chemicals. + +# Source file position: <groff-source>/contrib/chem/example/atp.chem +# Installed position: <prefix>/share/doc/groff/example/chem/atp.chem + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +R1: ring5 pointing left double 1,2 3,4 put N at 2 put N at 5 +B: benzene put N at 2 with .V6 at R1.V3 with .V5 at R1.V4 + bond up ; NH2 + backbond 170 length .7 from R1.V5 +R2: ring5 pointing down with .V2 put O at 1 + bond down at R2.V2 ; H + bond down length .1 at R2.V3 ; H + bond up length .1 at R2.V3 ; OH + bond down length .1 at R2.V4 ; H + bond up length .1 at R2.V4 ; OH + frontbond 70 at R2.V5 + bond 110 ; O + bond right ; P + doublebond up ; O + bond down from P ; OH + bond right from P ; O + bond right ; P + doublebond up ; O + bond down from P ; OH + bond right from P ; O + bond right ; P + doublebond up ; O + bond down from P ; OH + bond right from P ; OH + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +.cend diff --git a/contrib/chem/examples/cholesterin.chem b/contrib/chem/examples/cholesterin.chem new file mode 100644 index 00000000..d8684a1f --- /dev/null +++ b/contrib/chem/examples/cholesterin.chem @@ -0,0 +1,52 @@ +cholesterin.chem: +.cstart + +# Example file for `chem': +# Cholesterin or C27_H46O or +# 10,13-dimethyl-17-(6-methylheptan-2-yl)-2,3,4,5,6,9,11,12,14,15,16,17- +# dodecahydro-1H-cyclopenta[a]phenanthren-3-ol + +# Source file position: <groff-source>/contrib/chem/example/cholesterin.p +# Installed position: <prefix>/share/doc/groff/example/chem/cholesterin.p + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +R1: ring6 + bond -120 ; HO +R2: ring6 with .V5 at R1.V3 with .V6 at R1.V2 double 4,5 + bond up at R2.V6 +R3: ring6 with .V5 at R2.V1 with .V4 at R2.V2 +R4: flatring5 pointing up with .V4 at R3.V3 with .V5 at R3.V2 + bond up at R4.V5 + bond up at R4.V1 +B1: bond -60 + bond 60 at B1.start + bond 120 + bond 60 + bond 120 +B2: bond 60 + bond down at B2.start + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +.cend diff --git a/contrib/chem/examples/ethamivan.chem b/contrib/chem/examples/ethamivan.chem new file mode 100644 index 00000000..19c720cf --- /dev/null +++ b/contrib/chem/examples/ethamivan.chem @@ -0,0 +1,48 @@ +ethamivan.chem: +.cstart + +# Example file for `chem': +# Ethamivan or Analepticon or C12_H17_N_O3 or +# N,N-diethyl-4-hydroxy-3-methoxy-benzamide + +# Source file position: <groff-source>/contrib/chem/example/ethamivan.chem +# Installed position: <prefix>/share/doc/groff/example/chem/ethamivan.chem + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +R: ring pointing left double 2,3 4,5 6,1 + bond left from R.V1 ; O + bond left ; H + bond -150 from R.V6 ; O + bond left + bond 60 from R.V4 +B1: double bond up ; O + bond 120 from B1.start ; N + bond 45 + bond right + bond 135 from N + bond right + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +.cend diff --git a/contrib/chem/examples/lsd.chem b/contrib/chem/examples/lsd.chem new file mode 100644 index 00000000..f0b7407f --- /dev/null +++ b/contrib/chem/examples/lsd.chem @@ -0,0 +1,51 @@ +lsd.chem: +.cstart + +# Example file for `chem': +# LSD or Lysergic acid dethylamide or C20_H25_N3O or +# 9,10-Didehydro-N,N-diethyl-6-methyl-ergoline-8-beta-carboxamide + +# Source file position: <groff-source>/contrib/chem/example/lsd.p +# Installed position: <prefix>/share/doc/groff/example/chem/lsd.p + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +F: flatring5 pointing left put N at 5 double 3,4 + H below F.N +B: benzene pointing right with .V1 at F.V2 +R1: ring pointing right with .V4 at B.V6 + front bond right from R1.V6 ; H +R2: ring pointing right with .V2 at R1.V6 put N at 1 double 3,4 + bond right from R2.N + back bond -60 from R2.V5 ; H + bond up from R2.V5 +B1: double bond up ; O + bond right from B1.start ; N + bond 45 + bond right + bond 135 from N + bond right + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +.cend diff --git a/contrib/chem/examples/morphine.chem b/contrib/chem/examples/morphine.chem new file mode 100644 index 00000000..eefc68a4 --- /dev/null +++ b/contrib/chem/examples/morphine.chem @@ -0,0 +1,55 @@ +morphine.chem: +.cstart + +# Example file for `chem': +# Morphine or C23_H31_N3O or +# N,N-diethyl-N'-(2-methoxyacridin-9-yl)-pentane-1,4-diamine + +# Found at http://www.chemindustry.com/apps/chemicals. + +# Source file position: <groff-source>/contrib/chem/example/morphine.chem +# Installed position: <prefix>/share/doc/groff/example/chem/morphine.chem + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +R1: benzene +R2: benzene with .V6 at R1.V2 with .V5 at R1.V3 put N at 4 +R3: benzene with .V6 at R2.V2 with .V5 at R2.V3 + bond 60 at R3.V2 ; O + bond 120 + bond up at R2.V1 ; N + bond 60 ; H + bond -60 at N +B1: backbond -120 + bond up at B1.start + bond -60 + bond up + bond -60 ; N + bond up + bond -60 + bond -120 at N + bond -60 + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +.cend diff --git a/contrib/chem/examples/penicillin.chem b/contrib/chem/examples/penicillin.chem new file mode 100644 index 00000000..99ac21d0 --- /dev/null +++ b/contrib/chem/examples/penicillin.chem @@ -0,0 +1,56 @@ +penicillin.chem: +.cstart + +# Example file for `chem': +# Penicillin or C16_H18_N2_O4_S or +# 3,3-dimethyl-6-oxo-7-(2-phenylacetyl)amino-2-thia-5- +# azabicyclo[3.2.0]heptane-4-carboxylic acid + +# Found at http://www.chemindustry.com/apps/chemicals. + +# Source file position: <groff-source>/contrib/chem/example/morphine.chem +# Installed position: <prefix>/share/doc/groff/example/chem/morphine.chem + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +R1: flatring5 pointing up put S at 1 put N at 4 + bond 45 at R1.V2 + bond 135 at R1.V2 + bond 120 at R1.V3 +D1: doublebond 45 ; O + bond 135 at D1.start ; OH + bond left at R1.N + doublebond -135 ; O + bond left at R1.V5 +B1: bond down length .3 + bond -60 at B1.start ; N + bond up ; H + bond -120 at N +D2: doublebond down ; O + bond -60 at D2.start + bond -120 + benzene + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +.cend diff --git a/contrib/chem/examples/reserpine.chem b/contrib/chem/examples/reserpine.chem new file mode 100644 index 00000000..05cd2c97 --- /dev/null +++ b/contrib/chem/examples/reserpine.chem @@ -0,0 +1,65 @@ +reserpine.chem: +.PS +begin chem + +# Example file for `chem': +# Reserpine or C33H40N2O9 + +# Source file position: <groff-source>/contrib/chem/example/reserpine.chem +# Installed position: <prefix>/share/doc/groff/example/chem/reserpine.chem + +# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Written by Bernd Warken <groff-bernd.warken-72@web.de>. + +# Last update: 5 Jan 2009 + +# This file is part of `chem', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# `groff' is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +R1: benzene pointing up + bond -120 from R1.V5 ; O + bond left +R2: flatring5 pointing down double 4,5 with .V2 at R1.V3 with .V3 at R1.V2 put N at 1 + H below R2.V1 +R3: ring put N at 3 with .V5 at R2.V5 +R4: ring put N at 1 with .V1 at R3.V3 + back bond -120 from R4.V4 ; H + back bond 60 from R4.V3 ; H +R5: ring with .V1 at R4.V3 + bond -120 +D1: double bond down ; O + bond left from D1.start ; O + bond left + back bond 60 from R5.V3 ; H + back bond down from R5.V4 ; O + bond down from O + bond 120 from R5.V3 ; O + bond 50 from O +D2: double bond up ; O + bond right length .1 from D2.start +B: benzene pointing right + bond 45 from B.V6 ; O + bond right + bond right from B.V1 ; O + bond right + bond 135 from B.V2 ; O + bond right + +### Emacs settings +# Local Variables: +# mode: Nroff +# End: +end +.PE |