Further Hetrocycles by hcycle.sty (v2.00) of XΥMTEX

Shinsaku Fujita Department of Chemistry and Materials Technology, Kyoto Institute of Technology, Matsugasaki, Sakyoku, Kyoto, 606 Japan

1996/12/25

1 Introduction

1.1 Options for docstrip

option function
hcycle hcycle.sty
driver driver for this dtx file

1.2 Version Information

1 ⟨∗hcycle⟩

2 \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
3 \typeout{       -- Released December 25, 1998 by Shinsaku Fujita}
4 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 \def\j@urnalname{hcycle}
6 \def\versi@ndate{December 25, 1998}
7 \def\versi@nno{ver2.00}
8 \def\copyrighth@lder{SF} % Shinsaku Fujita
9 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10 \typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
11 \space[\copyrighth@lder]}

2 List of commands for hcycle.sty

********************************
* hcycle.sty: list of commands *
********************************
<Convention for bond-setting>
    \@pyrana

     \@pyranb
     \@pyranc
 <Pyranose and Furanose>
     \pyranose                 \@pyranose
     \furanose                 \@furanose
 <Adustment as substituents>
     \ylpyranoseposition
     \ylfuranoseposition

3 Input of basic macros

To assure the compatibility to L^{A}TEX2.09 (the native mode), the commands added by L^{A}TEX 2ε have not been used in the resulting sty files (hcycle.sty for the present case). Hence, the combination of \input and \@ifundefined is used to crossload sty files (chemstr.sty for the present case) in place of the \RequirePackage command of L^{A}TEX 2ε.

12 % *************************
13 % * input of basic macros *
14 % *************************
15 \@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
16 \unitlength=0.1pt

4 Macros for setting substituents

Macros \@pyrana to \@pyranc are used to set substituents on each position of a pyranose and furanose. Note that comments (conerning locant numbers) on the end of each row have lost the exact meaning, since such a command moiety is used in many macros after copying.

\@pyrana \@pyranb \@pyranbb \@pyranbB \@pyranc
17 % **************************************************
18 % * setting substituents for pyranose and furanose *
19 % **************************************************
20 % %%%%%%%%%%%%%%%
21 % % subst. on 1 %
22 % %%%%%%%%%%%%%%%
23 \def\@pyrana{%
24 \if\@tmpb S%single bond
25  \ifx\@tmpc\empty%
26  \yl@xdiff=-10
27  \yl@ydiff=30
28  \put(0,0){\line(1,0){120}}% single bond at 1

29  \putratom{130}{-30}{\@memberb}% right type
30  \else\if\@tmpc a%(a) alpha
31  \yl@xdiff=32
32  \yl@ydiff=72
33  \put(0,0){\line(0,-1){118}}% single bond at 1 alpha (down)
34  \putratom{-32}{-190}{\@memberb}% right type
35  \else\if\@tmpc b%(e) beta
36  \yl@xdiff=32
37  \yl@ydiff=-12
38  \put(0,0){\line(0,1){118}}% single bond at 1 beta (up)
39  \putratom{-32}{130}{\@memberb}% right type
40  \else\if\@tmpc A% alpha
41  \yl@xdiff=-10
42  \yl@ydiff=60
43  \put(0,0){\line(1,-1){120}}% single bond at 1
44  \putratom{130}{-180}{\@memberb}% right type
45  \else\if\@tmpc B% beta
46  \yl@xdiff=-10
47  \yl@ydiff=10
48  \put(0,0){\line(1,1){120}}% single bond at 1
49  \putratom{130}{110}{\@memberb}% right type
50  \fi\fi\fi\fi\fi%
51 \else \if\@tmpb D%double bond
52  \yl@xdiff=-10
53  \yl@ydiff=30
54  \put(0,-15){\line(1,0){120}}% double bond at 1
55  \put(0,15){\line(1,0){120}}% double bond at 1
56  \putratom{130}{-30}{\@memberb}% right type
57  \else%
58  \yl@xdiff=-10
59  \yl@ydiff=30
60  \put(0,0){\line(1,0){120}}% single bond at 1
61  \putratom{130}{-30}{\@memberb}% right type
62 \fi\fi}%
63 % %%%%%%%%%%%%%%%%%%%
64 % % subst. on 2,3,5 %
65 % %%%%%%%%%%%%%%%%%%%
66 % %%%%%%%%%%%%%%%
67 % % subst. on 2 %
68 % %%%%%%%%%%%%%%%
69 \def\@pyranb{%
70 \if\@tmpb S%single bond
71  \ifx\@tmpc\empty%
72  \yl@xdiff=-10
73  \yl@ydiff=60
74  \put(0,0){\line(1,-1){120}}% single bond at 1
75  \putratom{130}{-180}{\@memberb}% left type
76  \else\if\@tmpc a%(a) alpha
77  \yl@xdiff=32

 78  \yl@ydiff=72
 79  \put(0,0){\line(0,-1){118}}% single bond alpha (down)
 80  \putlratom{-32}{-190}{\@memberb}% left & right type
 81  \else\if\@tmpc b%(b) beta
 82  \yl@xdiff=32
 83  \yl@ydiff=-12
 84  \put(0,0){\line(0,1){118}}% single bond beta (up)
 85  \putlratom{-32}{130}{\@memberb}% left & right type
 86  \fi\fi\fi%\fi\fi%
 87 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
 88  \yl@xdiff=-10
 89  \yl@ydiff=60
 90  \put(-15,-15){\line(1,-1){120}}% double bond at 1
 91  \put(0,15){\line(1,-1){120}}% double bond at 1
 92  \putratom{130}{-180}{\@memberb}% right type
 93  \else%
 94  \yl@xdiff=-10
 95  \yl@ydiff=10
 96  \put(0,0){\line(1,1){120}}% single bond at 1
 97  \putratom{130}{110}{\@memberb}% left type
 98 \fi\fi}%
 99 % %%%%%%%%%%%%%%%
100 % % subst. on 3 %
101 % %%%%%%%%%%%%%%%
102 \def\@pyranbb{%
103 \if\@tmpb S%single bond
104  \ifx\@tmpc\empty%
105  \yl@xdiff=-10
106  \yl@ydiff=60
107  \put(0,0){\line(1,-1){120}}% single bond at 1
108  \putratom{130}{-180}{\@memberb}% left type
109  \else\if\@tmpc a%(a) alpha
110  \yl@xdiff=32
111  \yl@ydiff=72
112  \put(0,0){\line(0,-1){118}}% single bond alpha (down)
113  \putlratom{-32}{-190}{\@memberb}% left & right type
114  \else\if\@tmpc b%(b) beta
115  \yl@xdiff=32
116  \yl@ydiff=-12
117  \put(0,0){\line(0,1){118}}% single bond beta (up)
118  \putlratom{-32}{130}{\@memberb}% left & right type
119  \fi\fi\fi%\fi\fi%
120 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
121  \yl@xdiff=20
122  \yl@ydiff=60
123  \put(15,-15){\line(-1,-1){120}}% double bond at 1
124  \put(0,15){\line(-1,-1){120}}% double bond at 1
125  \putlatom{-130}{-180}{\@memberb}%left type
126  \else%

127  \yl@xdiff=10
128  \yl@ydiff=60
129  \put(0,0){\line(-1,-1){120}}% single bond at 1
130  \putlatom{-130}{-180}{\@memberb}% left type
131 \fi\fi}%
132 % %%%%%%%%%%%%%%%
133 % % subst. on 5 %
134 % %%%%%%%%%%%%%%%
135 \def\@pyranbB{%
136 \if\@tmpb S%single bond
137  \ifx\@tmpc\empty%
138  \yl@xdiff=-10
139  \yl@ydiff=60
140  \put(0,0){\line(1,-1){120}}% single bond at 5
141  \putratom{130}{-180}{\@memberb}% left type
142  \else\if\@tmpc a%(a) alpha
143  \yl@xdiff=32
144  \yl@ydiff=72
145  \put(0,0){\line(0,-1){118}}% single bond alpha (down)
146  \putlratom{-32}{-190}{\@memberb}% left & right type
147  \else\if\@tmpc b%(b) beta
148  \yl@xdiff=32
149  \yl@ydiff=-12
150  \put(0,0){\line(0,1){118}}% single bond beta (up)
151  \putlratom{-32}{130}{\@memberb}% left & right type
152  \fi\fi\fi%\fi\fi%
153 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
154  \yl@xdiff=0
155  \yl@ydiff=-20
156  \put(15,15){\line(-1,1){120}}% double bond at 5
157  \put(0,-15){\line(-1,1){120}}% double bond at 5
158  \putlatom{-120}{140}{\@memberb}%left type
159  \else%
160  \yl@xdiff=10
161  \yl@ydiff=-20
162  \put(0,0){\line(-1,1){120}}% single bond at 1
163  \putlatom{-130}{140}{\@memberb}% left type
164 \fi\fi}%
165 % %%%%%%%%%%%%%%%
166 % % subst. on 4 %
167 % %%%%%%%%%%%%%%%
168 \def\@pyranc{%
169 \if\@tmpb S%single bond
170  \ifx\@tmpc\empty%
171  \yl@xdiff=10
172  \yl@ydiff=30
173  \put(0,0){\line(-1,0){120}}% single bond at 4
174  \putlatom{-130}{-30}{\@memberb}% left type
175  \else\if\@tmpc a%(a) alpha

176  \yl@xdiff=-32
177  \yl@ydiff=72
178  \put(0,0){\line(0,-1){118}}% single bond at 4 alpha (down)
179  \putlatom{32}{-190}{\@memberb}% left type
180  \else\if\@tmpc b%(e) beta
181  \yl@xdiff=-32
182  \yl@ydiff=-12
183  \put(0,0){\line(0,1){118}}% single bond at 4 beta (up)
184  \putlatom{32}{130}{\@memberb}% left type
185  \else\if\@tmpc A% alpha
186  \yl@xdiff=10
187  \yl@ydiff=60
188  \put(0,0){\line(-1,-1){120}}% single bond at 4
189  \putlatom{-130}{-180}{\@memberb}% left type
190  \else\if\@tmpc B% beta
191  \yl@xdiff=10
192  \yl@ydiff=10
193  \put(0,0){\line(-1,1){120}}% single bond at 4
194  \putlatom{-130}{110}{\@memberb}% left type
195  \fi\fi\fi\fi\fi%
196 \else \if\@tmpb D%double bond
197  \yl@xdiff=10
198  \yl@ydiff=30
199  \put(0,-15){\line(-1,0){120}}% double bond at 4
200  \put(0,15){\line(-1,0){120}}% double bond at 4
201  \putlatom{-130}{-30}{\@memberb}% left type
202  \else%
203  \yl@xdiff=10
204  \yl@ydiff=30
205  \put(0,0){\line(-1,0){120}}% single bond at 4
206  \putlatom{-130}{-30}{\@memberb}% left type
207 \fi\fi}%

5 Pyranose derivatives

The standard skeleton of pyranose is selected to have the following locant numbers.

  ***********************
  * pyranose derivative *
  ***********************
  The following numbering is adopted in this macro.
                                 5  e  6
                                  ----O
                              d *       * f
    the original point ===> 4 *           * 1
           (0,0)                *       * a
                              c   -----

                                3  b   2

The macro \pyranose has an argument SUBSLIST as well as an optional argument BONDLIST.

   \pyranose[BONDLIST]{SUBSLIST}

The BONDLIST argument contains one or more characters selected from a to f, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position.

     BONDLIST =
           none       :  mother skeleton
           a          :  1,2-double bond
           b          :  2,3-double bond
           c          :  4,3-double bond
           d          :  4,5-double bond
           e          :  5,6-double bond
           f          :  6,1-double bond

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

     SUBSLIST: list of substituents (max 5 substitution positions)
       for n = 1 to 5
           nD         :  exocyclic double bond at n-atom
           n or nS    :  exocyclic single bond at n-atom
           nSA        :  single bond (down) at n-atom (for n=1)
           nSB        :  single bond (up) at n-atom (for n=1)
           nSa        :  alpha single bond at n-atom
           nSb        :  beta single bond at n-atom

Several examples are shown as follows.

       e.g.

         \pyranose{1Sb==Cl;2Sa==F}
         \pyranose{1Sb==Cl;4Sa==F;2Sa==CH$_{3}$}
         \pyranose[a]{3Sb==OAc;4Sb==\lmoiety{MeO};5Sb==CH$_{2}$OAc}

The definition of \@pyranose uses a picture environment, in which bonds are put directly, while subsituents are typset by using the macros \@pyrana to \@pyranc described above.

\pyranose \@pyranose
208 \def\pyranose{\@ifnextchar[{\@pyranose}{\@pyranose[r]}}
209 \def\@pyranose[#1]#2{%
210 \@reset@ylsw%
211 \ylpyranoseposition{#2}%
212 \def\@@ylii{0}\def\@@yli{0}%
213 \if@ylsw
214 \yl@shiftii=\@ylii
215 \yl@shifti=\@yli
216 \advance\yl@shiftii\@@ylii
217 \advance\yl@shifti\@@yli
218 \advance\yl@shiftii\yl@xdiff
219 \advance\yl@shifti\yl@ydiff
220 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
221 \reset@yl@xydiff%1999/1/6 by S. Fujita
222 \else
223 \begin{picture}(880,800)(-240,-400)
224 \iforigpt \put(-240,-400){\circle*{50}}%
225  \put(0,0){\circle{50}}%
226 \typeout{command `pyranose' origin: (0,0) ---> (240,400)}
227 \fi%
228 \fi
229 \put(0,0){\line(3,5){120}}%           %bond 4-5
230 \put(120,200){\line(1,0){252}}%       %bond 5-6
231 \put(532,0){\line(-3,5){96}}%         %bond 1-6
232 {\thicklines%
233 \put(0,0){\line(3,-5){120}}%          %bond 4-3
234 \put(412,-200){\line(3,5){120}}%      %bond 2-1
235 \put(120,-200){\line(1,0){292}}}%     %bond 3-2
236 \putratom{382}{160}{O}% left type

237 %

238 \@tfor\member:=#1\do{%
239 \if\member r%no endcyclic double bonds
240 \else \if\member a%
241 \put(400,-150){\line(3,5){90}}%       %double bond 2-1
242 \else \if\member b%
243 \put(150,-160){\line(1,0){232}}%      %double bond 3-2
244 \else \if\member c%
245 \put(50,-12){\line(3,-5){90}}%        %double bond 4-3
246 \else \if\member d%
247 \put(50,12){\line(3,5){90}}%          %double bond 4-5

248 \else \if\member e%
249 \put(150,160){\line(1,0){232}}%       %double bond 5-6
250 \else \if\member f%
251 \put(482,12){\line(-3,5){70}}%        %double bond 1-6
252 \fi\fi\fi\fi\fi\fi\fi}%

253 %

254 \@forsemicol\member:=#2\do{%
255 \ifx\member\empty\else
256 \expandafter\@m@mb@r\member;\relax%
257 \expandafter\threech@r\@membera{}{}%
258 \ifx\@memberb\@yl\else
259 \ifcase\@tmpa%0 omit
260 \or \put(532,0){\@pyrana}% subst. on 1
261 \or \put(412,-200){\@pyranb}% subst. on 2
262 \or \put(120,-200){\@pyranbb}% subst. on 3
263 \or \put(0,0){\@pyranc}% subst. on 4
264 \or \put(120,200){\@pyranbB}% subst. on 5
265 \fi %end of ifcase
266 \fi\fi%
267 }\end{picture}}%               %end of \pyranose macro

The command \ylpyranoseposition is to obtain the shift values \@ylii and \@yli which are used for shifting the standard point of a substituent.

\ylpyranoseposition
268 \def\ylpyranoseposition#1{%
269 \@@ylswfalse%%%\@reset@ylsw
270 \@forsemicol\member:=#1\do{%
271 \if@@ylsw\else
272 \ifx\member\empty\else
273 \expandafter\@m@mb@r\member;\relax
274 \expandafter\threech@r\@membera{}{}\relax
275 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
276 \if@@ylsw
277 \ifcase\@tmpa%0 omit
278 \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
279 \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
280 \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
281 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
282 \or\gdef\@ylii{-120}\gdef\@yli{-200}\global\@ylswtrue% subst. on 5
283 \fi%end of ifcase
284 \fi\fi\fi}}%

6 Furanose derivatives

The standard skeleton of furanose is selected to have the following locant numbers.

  ***********************
  * furanose derivative *

***********************
The following numbering is adopted in this macro.
                        5
                        O
                  d  *     * e
the original point ===> 4 *           * 1
(0,0)                *       * a
                  c   -----
                     3  b   2

The macro \furanose has an argument SUBSLIST as well as an optional argument BONDLIST.

\furanose[BONDLIST]{SUBSLIST}

The BONDLIST argument contains one or more characters selected from a to e, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position.

BONDLIST =
none       :  mother skeleton
a          :  1,2-double bond
b          :  2,3-double bond
c          :  4,3-double bond
d          :  4,5-double bond
e          :  5,6-double bond

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents (max 4 substitution positions)
for n = 1 to 4
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nSA        :  single bond (down) at n-atom (for n=1)
nSB        :  single bond (up) at n-atom (for n=1)
nSa        :  alpha single bond at n-atom
nSb        :  beta single bond at n-atom

Several examples are shown as follows.

        e.g.
         \furanose{1Sa==Cl;2Sb==F}

The definition of \@furanose uses a picture environment, in which bonds are put directly, while subsituents are typset by using the macros \@pyrana to \@pyranc described above.

\furanose \@furanose
285 \def\furanose{\@ifnextchar[{\@furanose}{\@furanose[r]}}
286 \def\@furanose[#1]#2{%
287 \@reset@ylsw%
288 \ylfuranoseposition{#2}%
289 \def\@@ylii{0}\def\@@yli{0}%
290 \if@ylsw
291 \yl@shiftii=\@ylii
292 \yl@shifti=\@yli
293 \advance\yl@shiftii\@@ylii
294 \advance\yl@shifti\@@yli
295 \advance\yl@shiftii\yl@xdiff
296 \advance\yl@shifti\yl@ydiff
297 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
298 \reset@yl@xydiff%1999/1/6 by S. Fujita
299 \else
300 \begin{picture}(880,800)(-240,-400)
301 \iforigpt \put(-240,-400){\circle*{50}}%
302  \put(0,0){\circle{50}}%
303 \typeout{command `furanose' origin: (0,0) ---> (240,400)}
304 \fi
305 \fi%
306 \put(0,0){\line(5,3){236}}%          %bond 4-5
307 \put(532,0){\line(-5,3){236}}%       %bond 1-5
308 {\thicklines%
309 \put(0,0){\line(3,-5){120}}%          %bond 4-3
310 \put(412,-200){\line(3,5){120}}%      %bond 2-1
311 \put(120,-200){\line(1,0){292}}}%     %bond 3-2
312 \putratom{236}{130}{O}% left type

313 %

314 \@tfor\member:=#1\do{%
315 \if\member r%no endcyclic double bonds
316 \else \if\member a%
317 \put(400,-150){\line(3,5){80}}%       %double bond 2-1
318 \else \if\member b%
319 \put(150,-160){\line(1,0){232}}%      %double bond 3-2
320 \else \if\member c%
321 \put(50,-12){\line(3,-5){80}}%        %double bond 4-3
322 \else \if\member d%
323 \put(50,0){\line(5,3){180}}%          %double bond 4-5

324 \else \if\member e%
325 \put(482,0){\line(-5,3){180}}%        %double bond 1-5
326 \fi\fi\fi\fi\fi\fi}%

327 %

328 \@forsemicol\member:=#2\do{%
329 \ifx\member\empty\else
330 \expandafter\@m@mb@r\member;\relax%
331 \expandafter\threech@r\@membera{}{}%
332 \ifx\@memberb\@yl\else
333 \ifcase\@tmpa%0 omit
334 \or \put(532,0){\@pyrana}% subst. on 1
335 \or \put(412,-200){\@pyranb}% subst. on 2
336 \or \put(120,-200){\@pyranbb}% subst. on 3
337 \or \put(0,0){\@pyranc}% subst. on 4
338 \fi%end of ifcase
339 \fi\fi%
340 }\end{picture}}%               %end of \furanose macro

The command \ylfuranoseposition is to obtain the shift values \@ylii and \@yli which are used for shifting the standard point of a substituent.

\ylfuranoseposition
341 \def\ylfuranoseposition#1{%
342 \@@ylswfalse%%%\@reset@ylsw
343 \@forsemicol\member:=#1\do{%
344 \if@@ylsw\else
345 \ifx\member\empty\else
346 \expandafter\@m@mb@r\member;\relax
347 \expandafter\threech@r\@membera{}{}\relax
348 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
349 \if@@ylsw
350 \ifcase\@tmpa%0 omit
351 \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
352 \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
353 \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
354 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
355 \fi%end of ifcase
356 \fi\fi\fi}}%

357 ⟨/hcycle⟩