Further Hetrocycles by hcycle.sty (v4.01) of XΥMTEX

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

2004/8/30

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 4.01}
3 \typeout{       -- Released August 30, 2004 by Shinsaku Fujita}
4 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 \def\j@urnalname{hcycle}
6 \def\versi@ndate{August 30, 2004}
7 \def\versi@nno{ver4.01}
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
    \@pyranbb
    \@pyranbB
    \@pyranbC
    \@pyranc

<Pyranose and Furanose>
construction:
\pyranose                 \@pyranose
\Pyranose                 \@Pyranose
\furanose                 \@furanose
\Furanose                 \@Furanose
adjustment:
\ylpyranoseposition
\ylfuranoseposition
<Six-membered Sugars>
large dimension:
(construction)
\SixSugarh \@Six@Sugarh \@Six@@Sugarh \@SixSugarh
(adjustment)
\ylSixSugarhposition     \test@vrtx@SixSugarh
\set@skel@Sugarhbond     \set@hetatom@Sugarh
(bond)
\Sugarhskbonda   \Sugarhskbondc   \Sugarhskbondd
\Sugarhskbondb   \Sugarhskbonde   \Sugarhskbondf
\Sugarhbonda     \Sugarhbondf      \Sugarhbondc
\Sugarhbondd     \Sugarhbonde      \Sugarhbondb
normal dimension:
(construction)
\sixsugarh \@six@sugarh \@six@@sugarh \@sixsugarh
(adjustment)
\set@skel@sugarhbond     \set@hetatom@sugarh
(bond)
\sugarhskbonda   \sugarhskbondc   \sugarhskbondd
\sugarhskbondb   \sugarhskbonde   \sugarhskbondf
\sugarhbonda     \sugarhbondf      \sugarhbondc
\sugarhbondd     \sugarhbonde      \sugarhbondb
<Five-membered Sugars>
large dimension:
(construction)
\FiveSugarh \@Five@Sugarh \@Five@@Sugarh \@FiveSugarh
(adjustment)
\ylFiveSugarhposition
\set@hteatom@FiveSugarh
(bond)

\fSugarhskbondd   \fSugarhskbonde
\fSugarhbondd     \fSugarhbonde
normal dimension:
(construction)
\fivefugarh \@five@fugarh \@five@@sugarh \@fivesugarh
(adjustment)
\ylfiveSugarhposition
\set@hteatom@fivesugarh
(bond)
\fsugarhskbondd   \fsugarhskbonde
\fsugarhbondd     \fsugarhbonde
<Applications>
\cyclitol          \@cyclitol
\Cyclitol          \@Cyclitol

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 Pyranoses and Furanoses

4.1 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
\@pyranbC

17 % **************************************************
18 % * setting substituents for pyranose and furanose *
19 % **************************************************
20 % %%%%%%%%%%%%%%%

21 % % subst. on 1 %
22 % %%%%%%%%%%%%%%%
23 \newif\if@clipping \@clippingfalse
24 \def\@pyrana{%
25 \if@clipping%clipping
26 \if\@tmpb S%single bond
27  \ifx\@tmpc\empty%
28  \yl@xdiff=-10
29  \yl@ydiff=30
30  \Put@Line(45,0)(1,0){80}% single bond at 1
31  \putratom{130}{-30}{\@memberb}% right type
32  \else\if\@tmpc a%(a) alpha
33  \yl@xdiff=32
34  \yl@ydiff=72
35  \Put@Line(0,-45)(0,-1){73}% single bond at 1 alpha (down)
36  \putratom{-32}{-190}{\@memberb}% right type
37  \else\if\@tmpc b%(e) beta
38  \yl@xdiff=32
39  \yl@ydiff=-12
40  \Put@Line(0,45)(0,1){73}% single bond at 1 beta (up)
41  \putratom{-32}{130}{\@memberb}% right type
42  \else\if\@tmpc A% alpha
43  \yl@xdiff=-10
44  \yl@ydiff=60
45  \Put@Line(25,-25)(1,-1){100}% single bond at 1
46  \putratom{130}{-180}{\@memberb}% right type
47  \else\if\@tmpc B% beta
48  \yl@xdiff=-10
49  \yl@ydiff=10
50  \Put@Line(25,25)(1,1){100}% single bond at 1
51  \putratom{130}{110}{\@memberb}% right type
52  \fi\fi\fi\fi\fi%
53 \else \if\@tmpb D%double bond
54  \yl@xdiff=-10
55  \yl@ydiff=30
56  \Put@Line(30,-15)(1,0){90}% double bond at 1
57  \Put@Line(30,15)(1,0){90}% double bond at 1
58  \putratom{130}{-30}{\@memberb}% right type
59  \else%
60  \yl@xdiff=-10
61  \yl@ydiff=30
62  \Put@Line(45,0)(1,0){90}% single bond at 1
63  \putratom{130}{-30}{\@memberb}% right type
64 \fi\fi
65 \else
66 \if\@tmpb S%single bond
67  \ifx\@tmpc\empty%
68  \yl@xdiff=-10
69  \yl@ydiff=30
70  \Put@Line(0,0)(1,0){120}% single bond at 1
71  \putratom{130}{-30}{\@memberb}% right type
72  \else\if\@tmpc a%(a) alpha
73  \yl@xdiff=32
74  \yl@ydiff=72

 75  \Put@Line(0,0)(0,-1){118}% single bond at 1 alpha (down)
 76  \putratom{-32}{-190}{\@memberb}% right type
 77  \else\if\@tmpc b%(e) beta
 78  \yl@xdiff=32
 79  \yl@ydiff=-12
 80  \Put@Line(0,0)(0,1){118}% single bond at 1 beta (up)
 81  \putratom{-32}{130}{\@memberb}% right type
 82  \else\if\@tmpc A% alpha
 83  \yl@xdiff=-10
 84  \yl@ydiff=60
 85  \Put@Line(0,0)(1,-1){120}% single bond at 1
 86  \putratom{130}{-180}{\@memberb}% right type
 87  \else\if\@tmpc B% beta
 88  \yl@xdiff=-10
 89  \yl@ydiff=10
 90  \Put@Line(0,0)(1,1){120}% single bond at 1
 91  \putratom{130}{110}{\@memberb}% right type
 92  \fi\fi\fi\fi\fi%
 93 \else \if\@tmpb D%double bond
 94  \yl@xdiff=-10
 95  \yl@ydiff=30
 96  \Put@Line(0,-15)(1,0){120}% double bond at 1
 97  \Put@Line(0,15)(1,0){120}% double bond at 1
 98  \putratom{130}{-30}{\@memberb}% right type
 99  \else%
100  \yl@xdiff=-10
101  \yl@ydiff=30
102  \Put@Line(0,0)(1,0){120}% single bond at 1
103  \putratom{130}{-30}{\@memberb}% right type
104 \fi\fi
105 \fi

106 }%

107 % %%%%%%%%%%%%%%%%%%%
108 % % subst. on 2,3,5 %
109 % %%%%%%%%%%%%%%%%%%%
110 % %%%%%%%%%%%%%%%
111 % % subst. on 2 %
112 % %%%%%%%%%%%%%%%
113 \def\@pyranb{%
114 \if@clipping%clipping
115 \if\@tmpb S%single bond
116  \ifx\@tmpc\empty%
117  \yl@xdiff=-10
118  \yl@ydiff=60
119  \Put@Line(45,-45)(1,-1){100}% single bond at 1
120  \putratom{130}{-180}{\@memberb}% left type
121  \else\if\@tmpc a%(a) alpha
122  \yl@xdiff=32
123  \yl@ydiff=72
124  \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
125  \putlratom{-32}{-190}{\@memberb}% left & right type
126  \else\if\@tmpc b%(b) beta
127  \yl@xdiff=32
128  \yl@ydiff=-12

129  \Put@Line(0,45)(0,1){73}% single bond beta (up)
130  \putlratom{-32}{130}{\@memberb}% left & right type
131  \else\if\@tmpc A%(A) beta
132  \yl@xdiff=10
133  \yl@ydiff=40
134  \Put@Line(40,-40)(1,-1){100}% single bond at 1
135  \putratom{130}{-180}{\@memberb}% left type
136  \else\if\@tmpc B%(B) beta
137  \yl@xdiff=-10
138  \yl@ydiff=40
139  \Put@Line(-40,-40)(-1,-1){100}% single bond at 1
140  \putlatom{-130}{-180}{\@memberb}% left type
141  \fi\fi\fi\fi\fi%
142 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
143  \yl@xdiff=-10
144  \yl@ydiff=60
145  \Put@Line(15,-45)(1,-1){100}% double bond at 1
146  \Put@Line(45,-15)(1,-1){100}% double bond at 1
147  \putratom{130}{-180}{\@memberb}% right type
148  \else%
149  \yl@xdiff=-10
150  \yl@ydiff=10
151  \Put@Line(45,45)(1,1){100}% single bond at 1
152  \putratom{130}{110}{\@memberb}% left type
153 \fi\fi
154 \else
155 \if\@tmpb S%single bond
156  \ifx\@tmpc\empty%
157  \yl@xdiff=-10
158  \yl@ydiff=60
159  \Put@Line(0,0)(1,-1){120}% single bond at 1
160  \putratom{130}{-180}{\@memberb}% left type
161  \else\if\@tmpc a%(a) alpha
162  \yl@xdiff=32
163  \yl@ydiff=72
164  \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
165  \putlratom{-32}{-190}{\@memberb}% left & right type
166  \else\if\@tmpc b%(b) beta
167  \yl@xdiff=32
168  \yl@ydiff=-12
169  \Put@Line(0,0)(0,1){118}% single bond beta (up)
170  \putlratom{-32}{130}{\@memberb}% left & right type
171  \fi\fi\fi%\fi\fi%
172 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
173  \yl@xdiff=-10
174  \yl@ydiff=60
175  \Put@Line(-15,-15)(1,-1){120}% double bond at 1
176  \Put@Line(0,15)(1,-1){120}% double bond at 1
177  \putratom{130}{-180}{\@memberb}% right type
178  \else%
179  \yl@xdiff=-10
180  \yl@ydiff=10
181  \Put@Line(0,0)(1,1){120}% single bond at 1
182  \putratom{130}{110}{\@memberb}% left type

183 \fi\fi
184 \fi

185 }%

186 % %%%%%%%%%%%%%%%
187 % % subst. on 3 %
188 % %%%%%%%%%%%%%%%
189 \def\@pyranbb{%
190 \if@clipping%clipping
191 \if\@tmpb S%single bond
192  \ifx\@tmpc\empty%
193  \yl@xdiff=-10
194  \yl@ydiff=60
195  \Put@Line(45,-45)(1,-1){100}% single bond at 1
196  \putratom{130}{-180}{\@memberb}% right type
197  \else\if\@tmpc a%(a) alpha
198  \yl@xdiff=32
199  \yl@ydiff=72
200  \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
201  \putlratom{-32}{-190}{\@memberb}% left & right type
202  \else\if\@tmpc b%(b) beta
203  \yl@xdiff=32
204  \yl@ydiff=-12
205  \Put@Line(0,45)(0,1){73}% single bond beta (up)
206  \putlratom{-32}{130}{\@memberb}% left & right type
207  \else\if\@tmpc A%(A) beta%
208  \yl@xdiff=-10
209  \yl@ydiff=60
210  \Put@Line(45,-45)(1,-1){100}% single bond at 1
211  \putratom{130}{-180}{\@memberb}% right type
212  \else\if\@tmpc B%(B) beta
213  \yl@xdiff=10
214  \yl@ydiff=60
215  \Put@Line(-45,-45)(-1,-1){100}% single bond at 1
216  \putlatom{-130}{-180}{\@memberb}% left type
217  \fi\fi\fi\fi\fi%
218 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
219  \yl@xdiff=20
220  \yl@ydiff=60
221  \Put@Line(-15,-45)(-1,-1){100}% double bond at 1
222  \Put@Line(-45,-15)(-1,-1){100}% double bond at 1
223  \putlatom{-130}{-180}{\@memberb}%left type
224  \else%
225  \yl@xdiff=10
226  \yl@ydiff=60
227  \Put@Line(-45,-45)(-1,-1){100}% single bond at 1
228  \putlatom{-130}{-180}{\@memberb}% left type
229 \fi\fi
230 \else
231 \if\@tmpb S%single bond
232  \ifx\@tmpc\empty%
233  \yl@xdiff=-10
234  \yl@ydiff=60
235  \Put@Line(0,0)(1,-1){120}% single bond at 1
236  \putratom{130}{-180}{\@memberb}% left type

237  \else\if\@tmpc a%(a) alpha
238  \yl@xdiff=32
239  \yl@ydiff=72
240  \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
241  \putlratom{-32}{-190}{\@memberb}% left & right type
242  \else\if\@tmpc b%(b) beta
243  \yl@xdiff=32
244  \yl@ydiff=-12
245  \Put@Line(0,0)(0,1){118}% single bond beta (up)
246  \putlratom{-32}{130}{\@memberb}% left & right type
247  \fi\fi\fi%\fi\fi%
248 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
249  \yl@xdiff=20
250  \yl@ydiff=60
251  \Put@Line(15,-15)(-1,-1){120}% double bond at 1
252  \Put@Line(0,15)(-1,-1){120}% double bond at 1
253  \putlatom{-130}{-180}{\@memberb}%left type
254  \else%
255  \yl@xdiff=10
256  \yl@ydiff=60
257  \Put@Line(0,0)(-1,-1){120}% single bond at 1
258  \putlatom{-130}{-180}{\@memberb}% left type
259 \fi\fi
260 \fi

261 }%

262 % %%%%%%%%%%%%%%%
263 % % subst. on 5 %
264 % %%%%%%%%%%%%%%%
265 \def\@pyranbB{%
266 \if@clipping%clipping
267 \if\@tmpb S%single bond
268  \ifx\@tmpc\empty%
269  \yl@xdiff=10
270  \yl@ydiff=-60
271  \Put@Line(-45,45)(-1,1){100}% single bond at 5
272  \putlatom{-130}{130}{\@memberb}% left type
273  \else\if\@tmpc a%(a) alpha
274  \yl@xdiff=32
275  \yl@ydiff=72
276  \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
277  \putlratom{-32}{-190}{\@memberb}% left & right type
278  \else\if\@tmpc b%(b) beta
279  \yl@xdiff=32
280  \yl@ydiff=-12
281  \Put@Line(0,45)(0,1){73}% single bond beta (up)
282  \putlratom{-32}{130}{\@memberb}% left & right type
283  \else\if\@tmpc A%(A) beta
284  \yl@xdiff=10
285  \yl@ydiff=-60
286  \Put@Line(-45,45)(-1,1){100}% single bond at 5
287  \putlatom{-130}{130}{\@memberb}% left type
288  \else\if\@tmpc B%(B) beta
289  \yl@xdiff=-10
290  \yl@ydiff=60

291  \Put@Line(45,45)(1,1){100}% single bond at 5
292  \putratom{130}{130}{\@memberb}% left type
293  \fi\fi\fi\fi\fi%
294 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
295  \yl@xdiff=0
296  \yl@ydiff=-20
297  \Put@Line(-15,45)(-1,1){100}% double bond at 5
298  \Put@Line(-45,15)(-1,1){100}% double bond at 5
299  \putlatom{-120}{140}{\@memberb}%left type
300  \else%
301  \yl@xdiff=10
302  \yl@ydiff=-60
303  \Put@Line(-45,45)(-1,1){100}% single bond at 5
304  \putlatom{-130}{130}{\@memberb}% left type
305 \fi\fi
306 \else
307 \if\@tmpb S%single bond
308  \ifx\@tmpc\empty%
309  \yl@xdiff=-10
310  \yl@ydiff=60
311  \Put@Line(0,0)(1,-1){120}% single bond at 5
312  \putratom{130}{-180}{\@memberb}% left type
313  \else\if\@tmpc a%(a) alpha
314  \yl@xdiff=32
315  \yl@ydiff=72
316  \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
317  \putlratom{-32}{-190}{\@memberb}% left & right type
318  \else\if\@tmpc b%(b) beta
319  \yl@xdiff=32
320  \yl@ydiff=-12
321  \Put@Line(0,0)(0,1){118}% single bond beta (up)
322  \putlratom{-32}{130}{\@memberb}% left & right type
323  \fi\fi\fi%\fi\fi%
324 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
325  \yl@xdiff=0
326  \yl@ydiff=-20
327  \Put@Line(15,15)(-1,1){120}% double bond at 5
328  \Put@Line(0,-15)(-1,1){120}% double bond at 5
329  \putlatom{-120}{140}{\@memberb}%left type
330  \else%
331  \yl@xdiff=10
332  \yl@ydiff=-20
333  \Put@Line(0,0)(-1,1){120}% single bond at 1
334  \putlatom{-130}{140}{\@memberb}% left type
335 \fi\fi
336 \fi

337 }%

338 % %%%%%%%%%%%%%%%
339 % % subst. on 4 %
340 % %%%%%%%%%%%%%%%
341 \def\@pyranc{%
342 \if@clipping%clipping
343 \if\@tmpb S%single bond
344  \ifx\@tmpc\empty%

345  \yl@xdiff=10
346  \yl@ydiff=30
347  \Put@Line(-45,0)(-1,0){80}% single bond at 4
348  \putlatom{-130}{-30}{\@memberb}% left type
349  \else\if\@tmpc a%(a) alpha
350  \yl@xdiff=-32
351  \yl@ydiff=72
352  \Put@Line(0,-45)(0,-1){80}% single bond at 4
353  \putlatom{32}{-190}{\@memberb}% left type
354  \else\if\@tmpc b%(e) beta
355  \yl@xdiff=-32
356  \yl@ydiff=-12
357  \Put@Line(0,45)(0,1){80}% single bond at 4 beta (up)
358  \putlatom{32}{130}{\@memberb}% left type
359  \else\if\@tmpc A% alpha
360  \yl@xdiff=10
361  \yl@ydiff=60
362  \Put@Line(-30,-30)(-1,-1){100}% single bond at 4
363  \putlatom{-130}{-180}{\@memberb}% left type
364  \else\if\@tmpc B% beta
365  \yl@xdiff=10
366  \yl@ydiff=10
367  \Put@Line(-30,30)(-1,1){100}% single bond at 4
368  \putlatom{-130}{110}{\@memberb}% left type
369  \fi\fi\fi\fi\fi%
370 \else \if\@tmpb D%double bond
371  \yl@xdiff=10
372  \yl@ydiff=30
373  \Put@Line(-30,-15)(-1,0){100}% double bond at 4
374  \Put@Line(-30,15)(-1,0){100}% double bond at 4
375  \putlatom{-130}{-30}{\@memberb}% left type
376  \else%
377  \yl@xdiff=10
378  \yl@ydiff=30
379  \Put@Line(-45,0)(-1,0){80}% single bond at 4
380  \putlatom{-130}{-30}{\@memberb}% left type
381 \fi\fi
382 \else
383 \if\@tmpb S%single bond
384  \ifx\@tmpc\empty%
385  \yl@xdiff=10
386  \yl@ydiff=30
387  \Put@Line(0,0)(-1,0){120}% single bond at 4
388  \putlatom{-130}{-30}{\@memberb}% left type
389  \else\if\@tmpc a%(a) alpha
390  \yl@xdiff=-32
391  \yl@ydiff=72
392  \Put@Line(0,0)(0,-1){118}% single bond at 4 alpha (down)
393  \putlatom{32}{-190}{\@memberb}% left type
394  \else\if\@tmpc b%(e) beta
395  \yl@xdiff=-32
396  \yl@ydiff=-12
397  \Put@Line(0,0)(0,1){118}% single bond at 4 beta (up)
398  \putlatom{32}{130}{\@memberb}% left type

399  \else\if\@tmpc A% alpha
400  \yl@xdiff=10
401  \yl@ydiff=60
402  \Put@Line(0,0)(-1,-1){120}% single bond at 4
403  \putlatom{-130}{-180}{\@memberb}% left type
404  \else\if\@tmpc B% beta
405  \yl@xdiff=10
406  \yl@ydiff=10
407  \Put@Line(0,0)(-1,1){120}% single bond at 4
408  \putlatom{-130}{110}{\@memberb}% left type
409  \fi\fi\fi\fi\fi%
410 \else \if\@tmpb D%double bond
411  \yl@xdiff=10
412  \yl@ydiff=30
413  \Put@Line(0,-15)(-1,0){120}% double bond at 4
414  \Put@Line(0,15)(-1,0){120}% double bond at 4
415  \putlatom{-130}{-30}{\@memberb}% left type
416  \else%
417  \yl@xdiff=10
418  \yl@ydiff=30
419  \Put@Line(0,0)(-1,0){120}% single bond at 4
420  \putlatom{-130}{-30}{\@memberb}% left type
421 \fi\fi
422 \fi

423 }%

424 % %%%%%%%%%%%%%%%
425 % % subst. on 6 %
426 % %%%%%%%%%%%%%%%
427 \def\@pyranbC{%
428 \if@clipping%clipping
429 \if\@tmpb S%single bond
430  \ifx\@tmpc\empty%
431  \yl@xdiff=5
432  \yl@ydiff=5
433  \Put@Line(45,45)(1,1){100}% single bond at 5
434  \putratom{130}{140}{\@memberb}% left type
435  \else\if\@tmpc a%(a) alpha
436  \yl@xdiff=32
437  \yl@ydiff=72
438  \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
439  \putlratom{-32}{-190}{\@memberb}% left & right type
440  \else\if\@tmpc b%(b) beta
441  \yl@xdiff=32
442  \yl@ydiff=-12
443  \Put@Line(0,45)(0,1){73}% single bond beta (up)
444  \putlratom{-32}{130}{\@memberb}% left & right type
445  \else\if\@tmpc A%(A)
446  \yl@xdiff=5
447  \yl@ydiff=5
448  \Put@Line(45,45)(1,1){100}% single bond at 5
449  \putratom{130}{140}{\@memberb}% right type
450  \else\if\@tmpc B%(B)
451  \yl@xdiff=5
452  \yl@ydiff=-15

453  \Put@Line(-45,45)(-1,1){100}% single bond at 5
454  \putlatom{-130}{140}{\@memberb}% left type
455  \fi\fi\fi\fi\fi%
456 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
457  \yl@xdiff=0
458  \yl@ydiff=-20
459  \Put@Line(45,15)(1,1){100}% double bond at 6
460  \Put@Line(15,45)(1,1){100}% double bond at 6
461  \putratom{130}{140}{\@memberb}%right type
462  \else%
463  \yl@xdiff=5
464  \yl@ydiff=5
465  \Put@Line(45,45)(1,1){100}% single bond at 5
466  \putratom{130}{140}{\@memberb}% left type
467 \fi\fi
468 \else
469 \if\@tmpb S%single bond
470  \ifx\@tmpc\empty%
471  \yl@xdiff=-10
472  \yl@ydiff=60
473  \Put@Line(0,0)(1,-1){120}% single bond at 5
474  \putratom{130}{-180}{\@memberb}% left type
475  \else\if\@tmpc a%(a) alpha
476  \yl@xdiff=32
477  \yl@ydiff=72
478  \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
479  \putlratom{-32}{-190}{\@memberb}% left & right type
480  \else\if\@tmpc b%(b) beta
481  \yl@xdiff=32
482  \yl@ydiff=-12
483  \Put@Line(0,0)(0,1){118}% single bond beta (up)
484  \putlratom{-32}{130}{\@memberb}% left & right type
485  \fi\fi\fi%\fi\fi%
486 \else \if\@tmpb D%double bond: Added by SF 1998/10/25
487  \yl@xdiff=0
488  \yl@ydiff=-20
489  \Put@Line(15,-15)(1,1){120}% double bond at 6
490  \Put@Line(0,15)(1,1){120}% double bond at 6
491  \putratom{130}{140}{\@memberb}%right type
492  \else%
493  \yl@xdiff=10
494  \yl@ydiff=-20
495  \Put@Line(0,0)(1,1){120}% single bond at 1
496  \putratom{130}{140}{\@memberb}% right type
497 \fi\fi
498 \fi

499 }% 500 ⟨/hcycle⟩

4.2 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 argu-

ment 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.

\pyranoseold
\@pyranoseold

501 ⟨∗hcycleold⟩

502 \def\pyranoseold{\@ifnextchar[{\@pyranoseold}{\@pyranoseold[r]}}
503 \def\@pyranoseold[#1]#2{%
504 \@reset@ylsw%
505 \ylpyranoseposition{#2}%
506 \def\@@ylii{0}\def\@@yli{0}%
507 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
508 (880,800)(-240,-400){pyranose}%
509 (240,400)%2002/4/30 by S. Fujita
510 \Put@Line(0,0)(3,5){120}%           %bond 4-5
511 \Put@Line(120,200)(1,0){252}%       %bond 5-6
512 \Put@Line(532,0)(-3,5){96}%         %bond 1-6
513 {\thicklines%
514 \Put@Line(0,0)(3,-5){120}%          %bond 4-3
515 \Put@Line(412,-200)(3,5){120}%      %bond 2-1
516 \Put@Line(120,-200)(1,0){292}}%     %bond 3-2
517 \putratom{382}{160}{O}% left type

518 %

519 \@tfor\member:=#1\do{%
520 \if\member r%no endcyclic double bonds
521 \else \if\member a%
522 \Put@Line(400,-150)(3,5){90}%       %double bond 2-1
523 \else \if\member b%
524 \Put@Line(150,-160)(1,0){232}%      %double bond 3-2
525 \else \if\member c%
526 \Put@Line(50,-12)(3,-5){90}%        %double bond 4-3
527 \else \if\member d%
528 \Put@Line(50,12)(3,5){90}%          %double bond 4-5
529 \else \if\member e%
530 \Put@Line(150,160)(1,0){232}%       %double bond 5-6
531 \else \if\member f%
532 \Put@Line(482,12)(-3,5){70}%        %double bond 1-6
533 \fi\fi\fi\fi\fi\fi\fi}%

534 %

535 \@forsemicol\member:=#2\do{%
536 \ifx\member\empty\else
537 \expandafter\@m@mb@r\member;\relax%
538 \expandafter\threech@r\@membera{}{}%

539 \ifx\@memberb\@yl\else
540 \ifcase\@tmpa%0 omit
541 \or \Put@Direct(532,0){%
542 \if@clip \@clippingtrue \else \@clippingfalse\fi
543 \@pyrana}% subst. on 1
544 \or \Put@Direct(412,-200){%
545 \if@eclip \@clippingtrue \else \@clippingfalse\fi
546 \@pyranb}% subst. on 2
547 \or \Put@Direct(120,-200){%
548 \if@fclip \@clippingtrue \else \@clippingfalse\fi
549 \@pyranbb}% subst. on 3
550 \or \Put@Direct(0,0){%
551 \if@aclip \@clippingtrue \else \@clippingfalse\fi
552 \@pyranc}% subst. on 4
553 \or \Put@Direct(120,200){%
554 \if@bclip \@clippingtrue \else \@clippingfalse\fi
555 \@pyranbB}% subst. on 5
556 \or \Put@Direct(412,200){%
557 \if@cclip \@clippingtrue \else \@clippingfalse\fi
558 \@pyranbC}% subst. on 6%%added 2001/6/20
559 \fi %end of ifcase
560 \fi\fi%

561 }%

562 \end{ShiftPicEnvB}%
563 }%               %end of \pyranose macro

564 ⟨/hcycleold⟩

\pyranose \@pyranose

565 ⟨∗hcycle⟩

566 \def\pyranose{\@ifnextchar[{\@pyranose}{\@pyranose[]}}
567 \def\@pyranose[#1]#2{\sixsugarh[#1]{6==O}{#2}}

Pyranose derivatives of slightly large dimension can be drawn by the \Pyranose macro.

\Pyranose \@Pyranose
568 \def\Pyranose{\@ifnextchar[{\@Pyranose}{\@Pyranose[]}}
569 \def\@Pyranose[#1]#2{\SixSugarh[#1]{6==O}{#2}}

570 ⟨/hcycle⟩

4.3 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 argu-

ment 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.

\furanoseold
\@furanoseold

571 ⟨∗hcycleold⟩

572 \def\furanoseold{\@ifnextchar[{\@furanoseold}{\@furanoseold[r]}}
573 \def\@furanoseold[#1]#2{%
574 \@reset@ylsw%
575 \ylfuranoseposition{#2}%
576 \def\@@ylii{0}\def\@@yli{0}%
577 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
578 (880,800)(-240,-400){furanose}%
579 (240,400)%2002/4/30 by S. Fujita
580 \Put@Line(0,0)(5,3){236}%          %bond 4-5
581 \Put@Line(532,0)(-5,3){236}%       %bond 1-5
582 {\thicklines%
583 \Put@Line(0,0)(3,-5){120}%          %bond 4-3
584 \Put@Line(412,-200)(3,5){120}%      %bond 2-1
585 \Put@Line(120,-200)(1,0){292}}%     %bond 3-2
586 \putratom{236}{130}{O}% left type

587 %

588 \@tfor\member:=#1\do{%
589 \if\member r%no endcyclic double bonds
590 \else \if\member a%
591 \Put@Line(400,-150)(3,5){80}%       %double bond 2-1
592 \else \if\member b%
593 \Put@Line(150,-160)(1,0){232}%      %double bond 3-2
594 \else \if\member c%
595 \Put@Line(50,-12)(3,-5){80}%        %double bond 4-3
596 \else \if\member d%
597 \Put@Line(50,0)(5,3){180}%          %double bond 4-5
598 \else \if\member e%
599 \Put@Line(482,0)(-5,3){180}%        %double bond 1-5
600 \fi\fi\fi\fi\fi\fi}%

601 %

602 \@forsemicol\member:=#2\do{%
603 \ifx\member\empty\else
604 \expandafter\@m@mb@r\member;\relax%
605 \expandafter\threech@r\@membera{}{}%
606 \ifx\@memberb\@yl\else
607 \ifcase\@tmpa%0 omit
608 \or \Put@Direct(532,0){\@pyrana}% subst. on 1
609 \or \Put@Direct(412,-200){\@pyranb}% subst. on 2
610 \or \Put@Direct(120,-200){\@pyranbb}% subst. on 3
611 \or \Put@Direct(0,0){\@pyranc}% subst. on 4
612 \fi%end of ifcase
613 \fi\fi%

614 }%

615 \end{ShiftPicEnvB}%
616 }%               %end of \furanoseold macro

617 ⟨/hcycleold⟩

\furanose \@furanose

618 ⟨∗hcycle⟩

619 \def\furanose{\@ifnextchar[{\@furanose}{\@furanose[]}}
620 \def\@furanose[#1]#2{\fivesugarh[#1]{5==O}{#2}}

Furanose derivatives of slightly large dimension can be drawn by the \Furanose macro.

\Furanose \@Furanose
621 \def\Furanose{\@ifnextchar[{\@Furanose}{\@Furanose[]}}
622 \def\@Furanose[#1]#2{\FiveSugarh[#1]{5==O}{#2}}

5 Six-Membered Sugar Derivatives of Large Dimension

5.1 General Conventions

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

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

The macro \SixSugarh has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST. Two optional arguments SKBONDLIST and OMIT are added to treat stereochemical information or other bond situations.

   \SixSugarh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]

The SKBONDLIST argument contains pairs of two alphabets in parentheses, e.g. ({bA}{fB}). Each pair contains a lowercase character selected from bond specifiers ‘a’ to ‘f’ and a uppercase character ‘A’ or ‘B’.

The BONDLIST argument contains one character selected from a to f, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. The option ‘A’ represents an aromatic circle. The option ‘n+’ (n = 1 to 6) represents a plus charge on a hetero atom at the n-position.

     BONDLIST =
           none or r  :  sixhetero (right-handed)
           l          :  sixhetero (left-handed)
           []         :  fully saturated form
           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
           A          :  aromatic circle
           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 6 atoms)
       for n = 1 to 6
           n          : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

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

The argument OMIT represents one or more bonds to be omitted. The omitted edges may be regarded as both fused and non-fused positions.

     OMIT:  one or more bonds omitted (a, b, c, d, e, or f)

Several examples are shown as follows.

       e.g.
        \SixSugarh{6==O}{1Sa==OH;2Sa==OH}

The definition of \SixSugarh uses a picture environment and consists of the same unit processes as shown in \sixheteroh:

1. treatment of atom list,

2. placing outer skeletons, 3. placing inner double bonds,

4. setting hetero atoms, and

5. placing substituents dirctly (cf. \setsixringh for a \sixheteroh)

\SixSugarh
\@Six@Sugarh
\@Six@@Sugarh
\@SixSugarh

623 \def\SixSugarh{\@ifnextchar({\@Six@Sugarh(@}{\@Six@Sugarh(@)}}
624 \def\@Six@Sugarh(#1){\@ifnextchar[{\@Six@@Sugarh(#1)[@}%
625 {\@Six@@Sugarh(#1)[@]}}
626 \def\@Six@@Sugarh(#1)[#2]#3#4{\@ifnextchar[%
627 {\@SixSugarh(#1)[#2]{#3}{#4}[@}%
628 {\@SixSugarh(#1)[#2]{#3}{#4}[@]}}
629 \def\@SixSugarh(#1)[#2]#3#4[#5]{%
630 % %%%%%%%%%%%%%%%%%%%%%%%%%%
631 % % treatment of atom list %
632 % %%%%%%%%%%%%%%%%%%%%%%%%%%
633 \iniatom\iniflag%initialize
634 \test@vrtx@SixSugarh{#3}%
635 %test for a hetero atom or a spiro substituent on a vertex
636 \@reset@ylsw%
637 \ylSixSugarhposition{#4}%shift values
638 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
639 (880,800)(-240,-400){SixSugarh}%2002/4/30 by S. Fujita
640 % %%%%%%%%%%%%%%%%%%
641 % % outer skeleton %
642 % %%%%%%%%%%%%%%%%%%
643 {\resetbdsw%
644 \@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
645 \molfronttrue
646 \set@skel@Sugarhbond{#1}{a}{a}%
647 %bond between 1 and 2 \@aaa -> \Sugarhskbonda etc
648 \set@skel@Sugarhbond{#1}{b}{b}%
649 %bond between 2 and 3 \@bbb -> \Sugarhskbondb etc
650 \set@skel@Sugarhbond{#1}{c}{c}%
651 %bond between 3 and 4 \@ccc -> \Sugarhskbondc etc
652 \molfrontfalse
653 \set@skel@Sugarhbond{#1}{d}{d}%
654 %bond between 4 and 5 \@ddd -> \Sugarhskbondd etc
655 \set@skel@Sugarhbond{#1}{e}{e}%
656 %bond between 5 and 6 \@eee -> \Sugarhskbonde etc
657 \set@skel@Sugarhbond{#1}{f}{f}%
658 %bond between 6 and 1 \@fff -> \Sugarhskbondf etc

659 }%

660 % %%%%%%%%%%%%%%%%%%%%%
661 % % inner double bond %
662 % %%%%%%%%%%%%%%%%%%%%%
663 \@tfor\member:=#2\do{%
664 \if\member r\relax \Sugarhbondd \Sugarhbondf \Sugarhbondb%
665 \else \if\member l\relax \Sugarhbonda \Sugarhbondc \Sugarhbonde%
666 \else \if\member a\relax \Sugarhbonda%
667 \else \if\member b\relax \Sugarhbondb%
668 \else \if\member c\relax \Sugarhbondc%

669 \else \if\member d\relax \Sugarhbondd%
670 \else \if\member e\relax \Sugarhbonde%
671 \else \if\member f\relax \Sugarhbondf%
672 \else \if\member A% no action: %%left aromatic circle
673 %  \Put@oCircle(203,0){240}%               %circle
674 % %%%%%%%%%%%%%%%%%%%%%%%%%
675 % % inner bond attachment %
676 % %%%%%%%%%%%%%%%%%%%%%%%%%
677 \else
678 \expandafter\twoCH@@R\member//%
679 \set@fusionadd@sixhi
680 \ifx\@@tmpa\empty%
681 \XyMTeXWarning{Fused function is unavailable for SixSugarh.}\fi
682 \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
683 % %%%%%%%%%%%%%%%%%%%%%%%%
684 % % setting hetero atoms %
685 % %%%%%%%%%%%%%%%%%%%%%%%%
686 \iniatom\iniflag%initialize
687 \set@hetatom@Sugarh{#3}{-3}{0}{5}{1}%               %subst 4--6
688 \set@hetatom@Sugarh{#3}{3}{3}{7}{1}%              %subst 1 -- 3
689 % %%%%%%%%%%%%%%%%%%%%%%%%
690 % % setting substituents %
691 % %%%%%%%%%%%%%%%%%%%%%%%%
692 \@forsemicol\member:=#4\do{%
693 \ifx\member\empty\else
694 \expandafter\@m@mb@r\member;\relax%
695 \expandafter\threech@r\@membera{}{}%
696 \ifx\@memberb\@yl\else
697 \ifcase\@tmpa%0 omit
698 \or \Put@Direct(668,0){%
699 \if@clip \@clippingtrue \else \@clippingfalse\fi
700 \@pyrana}% subst. on 1
701 \or \Put@Direct(513,-255){%
702 \if@eclip \@clippingtrue \else \@clippingfalse\fi
703 \@pyranb}% subst. on 2
704 \or \Put@Direct(153,-255){%
705 \if@fclip \@clippingtrue \else \@clippingfalse\fi
706 \@pyranbb}% subst. on 3
707 \or \Put@Direct(0,0){%
708 \if@aclip \@clippingtrue \else \@clippingfalse\fi
709 \@pyranc}% subst. on 4
710 \or \Put@Direct(153,255){%
711 \if@bclip \@clippingtrue \else \@clippingfalse\fi
712 \@pyranbB}% subst. on 5
713 \or \Put@Direct(513,255){%
714 \if@cclip \@clippingtrue \else \@clippingfalse\fi
715 \@pyranbC}% subst. on 6
716 \fi %end of ifcase
717 \fi\fi}%
718 \end{ShiftPicEnv}%
719 \iniatom\iniflag}%     %end of \SixSugarh macro

The macro \test@vrtx@SixSugarh is used to test the presence of a hetero atom or a spiro substituent on a vertex of the sixheteroh nucleus.

\test@vrtx@SixSugarh
720 \def\test@vrtx@SixSugarh#1{%
721 \@forsemicol\member:=#1\do{%
722 \ifx\member\empty\else
723 \expandafter\@m@mb@r\member;\relax%
724 \expandafter\twoch@r\@membera{}%
725 \ifcase\@tmpa%
726 \or \if\@tmpb s\relax\def\aaa{}\else\def\aaa{@}\fi
727 \or \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
728 \or \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
729 \or \if\@tmpb s\relax\def\ddd{}\else\def\ddd{@}\fi
730 \or \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
731 \or \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
732 \fi\fi}%
733 }% end of \test@vrtx@SixSugarh

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

\ylSixSugarhposition
734 \def\ylSixSugarhposition#1{%
735 \@@ylswfalse%%%\@reset@ylsw
736 \@forsemicol\member:=#1\do{%
737 \if@@ylsw\else
738 \ifx\member\empty\else
739 \expandafter\@m@mb@r\member;\relax
740 \expandafter\threech@r\@membera{}{}\relax
741 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
742 \if@@ylsw
743 \ifcase\@tmpa%0 omit
744 \or\gdef\@ylii{-668}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
745 \or\gdef\@ylii{-513}\gdef\@yli{255}\global\@ylswtrue% subst. on 2
746 \or\gdef\@ylii{-153}\gdef\@yli{255}\global\@ylswtrue% subst. on 3
747 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
748 \or\gdef\@ylii{-153}\gdef\@yli{-255}\global\@ylswtrue% subst. on 5
749 \or\gdef\@ylii{-513}\gdef\@yli{-255}\global\@ylswtrue% subst. on 6
750 \fi%end of ifcase
751 \fi\fi\fi}}%

5.2 Skeletal bonds of Sugarhs

The macro \set@skel@Sugarhbond is used in \SixSugarh etc. for setting skeletal bonds (outer bonds), when \@aaa etc. (produced by \csname...\endcsname) are equal to ‘a’ etc. (given as #2). Thinline, thickline and dotted-line skeletal bonds are available.

\set@skel@Sugarhbond
752 \newif\ifmolfront \molfrontfalse
753 \newif\if@fivemembered \@fivememberedfalse
754 \def\set@skel@Sugarhbond#1#2#3{%
755 \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
756  % \if\@aaa #2\relax%OK
757 \@skbondlistfalse

758 \@tfor\member:=#1\do{%
759 \expandafter\twoCH@@R\member//%
760  \if\@@tmpa #2\relax%
761  \if\@@tmpb A\relax%
762  \if@fivemembered
763  \expandafter\csname fdothskbond#3\endcsname% \dothskbonda etc.
764  \else
765  \expandafter\csname dothskbond#3\endcsname% \dothskbonda etc.
766  \fi
767  \@skbondlisttrue
768  \else\if\@@tmpb B\relax%
769  {\thicklines
770  \if@fivemembered
771  \expandafter\csname fSugarhskbond#3\endcsname% \dothskbonda etc.
772  \else
773  \expandafter\csname Sugarhskbond#3\endcsname% \hskbonda etc.
774  \fi

775 }%

776  \@skbondlisttrue
777  \fi\fi
778  \fi%

779 }%

780 \if@skbondlist\else
781  \ifmolfront
782  {\thicklines
783  \if@fivemembered
784  \expandafter\csname fSugarhskbond#3\endcsname% \dothskbonda etc.
785  \else
786  \expandafter\csname Sugarhskbond#3\endcsname% \hskbonda etc.
787  \fi

788 }%

789  \else
790  {\thinlines
791  \if@fivemembered
792  \expandafter\csname fSugarhskbond#3\endcsname% \dothskbonda etc.
793  \else
794  \expandafter\csname Sugarhskbond#3\endcsname% \hskbonda etc.
795  \fi

796 }%

797  \fi
798 \fi%
799 \else
800  \expandafter\ifx\csname @#2#2#2\endcsname \empty\relax%
801  %    \ifx\@aaa\empty\relax
802  \@tfor\member:=#1\do{%
803  \expandafter\twoCH@@R\member//%
804  \if\@@tmpa #2\relax%
805  \XyMTeXWarning{Unavailable bond `#2' in SKBONDLIST}\fi

806 }%

807 \fi\fi
808 }% end of \set@skel@Sugarhbond

The macros \SixSugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \Sugarhskbonda to \Sugarhskbondf are used to set a bond on each edge of a six- or five-membered ring.

  ************************************
  * setting skeletal bonds of Sugarhs *
  ************************************
  The following numbering is adopted in this macro.
                                    e
                           (eee) 5      6  (fff)
                             d    -----    c
                                *       *
    the original point ===> 4 * (ddd)     * 1  (aaa)
           (0,0)                *       *  a
                             c    -----
                           (ccc) 3      2  (bbb)
                                    b

\Sugarhskbonda The macro \Sugarhskbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \bbb) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

809 %bond between 1 and 2
810 \def\Sugarhskbonda{%
811 \ifx\aaa\empty%
812  \ifx\bbb\empty%
813  \Put@Line(668,0)(-3,-5){153}%           %bond 1-2
814  \else%
815  \Put@Line(668,0)(-3,-5){120}%            %bond 1-2
816  \fi%
817 \else%
818  \ifx\bbb\empty%
819  \Put@Line(635,-55)(-3,-5){120}%          %bond 1-2
820  \else%
821  \Put@Line(635,-55)(-3,-5){93}%          %bond 1-2
822  \fi\fi}%

\Sugarhskbondf The macro \Sugarhskbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

823 %bond between 1 and 6
824 \def\Sugarhskbondf{%
825 \ifx\aaa\empty%
826  \ifx\fff\empty%
827  \Put@Line(668,0)(-3,5){153}%           %bond 1-6
828  \else%
829  \Put@Line(668,0)(-3,5){120}%            %bond 1-6
830  \fi%
831 \else%
832  \ifx\fff\empty%
833  \Put@Line(635,55)(-3,5){120}%          %bond 1-6
834  \else%
835  \Put@Line(635,55)(-3,5){93}%          %bond 1-6
836  \fi\fi}%

\Sugarhskbondc The macro \Sugarhskbondc refers to the control sequences representing atoms on both of the terminal vertices (\ccc and \ddd) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

837 %bond between 4 and 3
838 \def\Sugarhskbondc{%
839 \ifx\ddd\empty%
840  \ifx\ccc\empty%
841  \Put@Line(0,0)(3,-5){153}%           %bond 4-3
842  \else%
843  \Put@Line(0,0)(3,-5){120}%            %bond 4-3
844  \fi%
845 \else%
846  \ifx\ccc\empty%
847  \Put@Line(33,-55)(3,-5){120}%          %bond 4-3
848  \else%
849  \Put@Line(33,-55)(3,-5){93}%          %bond 4-3
850  \fi\fi}%

\Sugarhskbondd The macro \Sugarhskbondc refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

851 %bond between 4 and 5
852 \def\Sugarhskbondd{%
853 \ifx\ddd\empty%
854  \ifx\eee\empty%
855  \Put@Line(0,0)(3,5){153}%           %bond 4-5
856  \else%
857  \Put@Line(0,0)(3,5){120}%            %bond 4-5
858  \fi%
859 \else%
860  \ifx\eee\empty%
861  \Put@Line(33,55)(3,5){120}%          %bond 4-5
862  \else%
863  \Put@Line(33,55)(3,5){93}%          %bond 4-5
864  \fi\fi}%

\Sugarhskbondb The macro \Sugarhskbondb refers to the control sequences representing atoms on both of the terminal vertices (\bbb and \ccc) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

865 %bond between 3 and 2
866 \def\Sugarhskbondb{%
867 \ifx\ccc\empty%
868  \ifx\bbb\empty%
869  \Put@Line(153,-255)(1,0){360}%           %bond 3-2
870  \else%
871  \Put@Line(153,-255)(1,0){314}%            %bond 3-2
872  \fi%
873 \else%
874  \ifx\bbb\empty%
875  \Put@Line(199,-255)(1,0){314}%          %bond 3-2
876  \else%
877  \Put@Line(199,-255)(1,0){278}%          %bond 3-2
878  \fi\fi}%

\Sugarhskbonde The macro \Sugarhskbonde refers to the control sequences representing atoms on both of the terminal vertices (\eee and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

879 %bond between 5 and 6
880 \def\Sugarhskbonde{%
881 \ifx\eee\empty%
882  \ifx\fff\empty%
883  \Put@Line(153,255)(1,0){360}%           %bond 5-6
884  \else%
885  \Put@Line(153,255)(1,0){314}%            %bond 5-6
886  \fi%
887 \else%
888  \ifx\fff\empty%
889  \Put@Line(199,255)(1,0){314}%          %bond 5-6
890  \else%
891  \Put@Line(199,255)(1,0){278}%          %bond 5-6
892  \fi\fi}%

5.3 Inner Double Bonds of Sugarhs

The macros \SixSugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \Sugarhbonda to \Sugarhbondf are used to set a bond on each edge of a six- or five-membered ring.

  ********************************************
  * setting skeletal bonds (horizontal type) *
  ********************************************
  The following numbering is adopted in this macro.
                                    e
                           (eee) 5      6  (fff)
                             d    -----    c
                                *       *
    the original point ===> 4 * (ddd)     * 1  (aaa)
           (0,0)                *       *  a
                             c    -----
                           (ccc) 3      2  (bbb)
                                    b

\Sugarhbonda The macro \Sugarhbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \bbb) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

893 %bond between 1 and 2
894 \def\Sugarhbonda{%
895 \ifx\aaa\empty%
896  \ifx\bbb\empty%
897  \Put@Line(605,-22)(-3,-5){100}%           %bond 1-2
898  \else%
899  \Put@Line(604,-15)(-3,-5){93}%            %bond 1-2
900  \fi%
901 \else%

902  \ifx\bbb\empty%
903  \Put@Line(587,-52)(-3,-5){93}%          %bond 1-2
904  \else%
905  \Put@Line(593,-42)(-3,-5){93}%          %bond 1-2
906  \fi\fi}%

\Sugarhbondf The macro \Sugarhbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

907 %bond between 1 and 6
908 \def\Sugarhbondf{%
909 \ifx\aaa\empty%
910  \ifx\fff\empty%
911  \Put@Line(605,22)(-3,5){100}%           %bond 1-6
912  \else%
913  \Put@Line(604,15)(-3,5){97}%            %bond 1-6
914  \fi%
915 \else%
916  \ifx\fff\empty%
917  \Put@Line(587,52)(-3,5){93}%          %bond 1-6
918  \else%
919  \Put@Line(593,42)(-3,5){93}%          %bond 1-6
920  \fi\fi}%

\Sugarhbondc The macro \Sugarhbondc refers to the control sequences representing atoms on both of the terminal vertices (\ccc and \ddd) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

921 %bond between 4 and 3
922 \def\Sugarhbondc{%
923 \ifx\ddd\empty%
924  \ifx\ccc\empty%
925  \Put@Line(63,-22)(3,-5){100}%           %bond 4-3
926  \else%
927  \Put@Line(64,-15)(3,-5){97}%            %bond 4-3
928  \fi%
929 \else%
930  \ifx\ccc\empty%
931  \Put@Line(81,-52)(3,-5){93}%          %bond 4-3
932  \else%
933  \Put@Line(75,-42)(3,-5){93}%          %bond 4-3
934  \fi\fi}%

\Sugarhbondd The macro \Sugarhbondc refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

935 %bond between 4 and 5
936 \def\Sugarhbondd{%
937 \ifx\ddd\empty%
938  \ifx\eee\empty%
939  \Put@Line(63,22)(3,5){100}%           %bond 4-5
940  \else%
941  \Put@Line(64,15)(3,5){97}%            %bond 4-5
942  \fi%

943 \else%
944  \ifx\eee\empty%
945  \Put@Line(81,52)(3,5){93}%          %bond 4-5
946  \else%
947  \Put@Line(75,42)(3,5){93}%          %bond 4-5
948  \fi\fi}%

\Sugarhbondb The macro \Sugarhbondb refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \bbb) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

949 %bond between 3 and 2
950 \def\Sugarhbondb{%
951 \ifx\ccc\empty%
952  \ifx\bbb\empty%
953  \Put@Line(183,-205)(1,0){300}%           %bond 3-2
954  \else%
955  \Put@Line(183,-205)(1,0){275}%            %bond 3-2
956  \fi%
957 \else%
958  \ifx\bbb\empty%
959  \Put@Line(203,-205)(1,0){275}%          %bond 3-2
960  \else%
961  \Put@Line(198,-205)(1,0){270}%          %bond 3-2
962  \fi\fi}%

\Sugarhbonde The macro \Sugarhbonde refers to the control sequences representing atoms on both of the terminal vertices (\eee and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

963 %bond between 5 and 6
964 \def\Sugarhbonde{%
965 \ifx\eee\empty%
966  \ifx\fff\empty%
967  \Put@Line(183,205)(1,0){300}%           %bond 5-6
968  \else%
969  \Put@Line(183,205)(1,0){275}%            %bond 5-6
970  \fi%
971 \else%
972  \ifx\fff\empty%
973  \Put@Line(203,205)(1,0){275}%          %bond 5-6
974  \else%
975  \Put@Line(198,205)(1,0){270}%          %bond 5-6
976  \fi\fi}%

5.4 Hetero Atoms on Sugarh Skeletons

The command \set@hetatom@Sugarh is to set a spiro group (stored as \@memberb) at a vertix designated by \@tmpaa (or originally by \@tmpa). The atom modifier ‘s’ designates that the spiro group contains a carbon atom (a vertix) at a spiro position, while ‘h’ represents the presence of a hetero atom at a spiro position. The absence of such atom modifiers shows the substitution of a usual hetero atom. The command \set@hetatom@Sugarh is used in such commands as \SixSugarh for treating thier ATOMLISTs, e.g. 1==N;1s==\SixSugarh{}{1==(yl)}.

\set@hetatom@Sugarh
 977 \def\set@hetatom@Sugarh#1#2#3#4#5{%
 978 \@forsemicol\member:=#1\do{%
 979 \ifx\member\empty\else%
 980 \expandafter\@m@mb@r\member;\relax%
 981 \expandafter\twoCH@R\@membera//%
 982 \ifnum#5 < 0\relax%
 983 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
 984 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
 985 \ifnum\@tmpaa >#3\relax%
 986 \ifnum\@tmpaa <#4\relax%
 987 \ifcase\@tmpaa%
 988 \or%position 1
 989 \if\@tmpb h\relax
 990  \@acliptrue%
 991  \putlatom{60}{0}{\@memberb}%  % left type
 992 \else\if\@tmpb s\relax
 993  \@aclipfalse%
 994  \putlatom{0}{0}{\@memberb}%              % left type
 995 \else\if\@tmpb a\relax%omit fused position
 996 \else
 997  \@acliptrue%
 998  \putlatom{60}{-36}{\@memberb}%              % left type
 999 \fi\fi\fi
1000 \or%position 2
1001 \if\@tmpb h\relax
1002  \@bcliptrue%
1003  \putlatom{185}{225}{\@memberb}%   % left type
1004 \else\if\@tmpb s\relax
1005  \@bclipfalse%
1006  \putlatom{153}{255}{\@memberb}%   % left type
1007 \else\if\@tmpb a\relax%omit fused position
1008 \else
1009  \@bcliptrue%
1010  \putlatom{185}{225}{\@memberb}%   % left type
1011 \fi\fi\fi
1012 \or%position 3
1013 \if\@tmpb h\relax
1014  \@ccliptrue%
1015  \putratom{483}{225}{\@memberb}%  % right type
1016 \else\if\@tmpb s\relax
1017  \@cclipfalse%
1018  \putratom{513}{255}{\@memberb}%  % right type
1019 \else\if\@tmpb a\relax%omit fused position
1020 \else
1021  \@ccliptrue%
1022  \putratom{483}{225}{\@memberb}%  % right type
1023 \fi\fi\fi
1024 \or%position 4
1025 \if\@tmpb h\relax
1026  \@cliptrue%
1027 \putratom{608}{0}{\@memberb}%  % right type
1028 \else\if\@tmpb s\relax
1029  \@clipfalse%

1030 \putratom{668}{0}{\@memberb}%  % right type
1031 \else\if\@tmpb a\relax%omit fused position
1032 \else
1033  \@cliptrue%
1034 \putratom{608}{-36}{\@memberb}%  % right type
1035 \fi\fi\fi
1036 \or%position 5
1037 \if\@tmpb h\relax
1038  \@ecliptrue%
1039  \putratom{493}{-225}{\@memberb}%  % right type
1040 \else\if\@tmpb s\relax
1041  \@eclipfalse%
1042  \putratom{513}{-255}{\@memberb}%  % right type
1043 \else\if\@tmpb a\relax%omit fused position
1044 \else
1045  \@ecliptrue%
1046  \putratom{483}{-295}{\@memberb}%  % right type
1047 \fi\fi\fi
1048 \or%position 6
1049 \if\@tmpb h\relax
1050  \@fcliptrue%
1051  \putlatom{175}{-215}{\@memberb}%  % left type
1052 \else\if\@tmpb s\relax
1053  \@fclipfalse%
1054  \putlatom{153}{-255}{\@memberb}%  % left type
1055 \else\if\@tmpb a\relax%omit fused position
1056 \else
1057  \@fcliptrue%
1058  \putlatom{185}{-295}{\@memberb}%  % left type
1059 \fi\fi\fi
1060 \fi% end of ifcase
1061 \fi\fi\fi}}% end of the macro \set@hetatom@Sugarh

6 Six-Membered Sugar Derivatives of Normal Dimension

6.1 General Conventions

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

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

The macro \sixsugarh has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST. Two optional arguments SKBONDLIST and OMIT are added to treat stereochemical information or other bond situations.

   \sixsugarh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]

The SKBONDLIST argument contains pairs of two alphabets in parentheses, e.g. ({bA}{fB}). Each pair contains a lowercase character selected from bond specifiers ‘a’ to ‘f’ and a uppercase character ‘A’ or ‘B’.

The BONDLIST argument contains one character selected from a to f, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. The option ‘A’ represents an aromatic circle. The option ‘n+’ (n = 1 to 6) represents a plus charge on a hetero atom at the n-position.

     BONDLIST =
           none or r  :  not supported (right-handed)
           l          :  not supported (left-handed)
           []         :  fully saturated form
           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
           A          :  not supported (aromatic circle)
           {n+}       :  not supproted (+ at the n-nitrogen atom, n = 1 to 4)

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 6 atoms)
       for n = 1 to 6
           n          : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

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 6
             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

The argument OMIT represents one or more bonds to be omitted. The omitted edges may be regarded as both fused and non-fused positions.

       OMIT:  one or more bonds omitted (a, b, c, d, e, or f)

Several examples are shown as follows.

         e.g.
          \sixsugarh{6==O}{1Sa==OH;2Sa==OH}

The definition of \sixsugarh uses a picture environment and consists of the same unit processes as shown in \sixheteroh:

1. treatment of atom list,

2. placing outer skeletons,

3. placing inner double bonds,

4. setting hetero atoms, and

5. placing substituents dirctly (cf. \setsixringh for a \sixheteroh)

\sixsugarh
\@six@sugarh
\@six@@sugarh
\@sixsugarh

1062 \def\sixsugarh{\@ifnextchar({\@six@sugarh(@}{\@six@sugarh(@)}}
1063 \def\@six@sugarh(#1){\@ifnextchar[{\@six@@sugarh(#1)[@}%
1064 {\@six@@sugarh(#1)[@]}}
1065 \def\@six@@sugarh(#1)[#2]#3#4{\@ifnextchar[%
1066 {\@sixsugarh(#1)[#2]{#3}{#4}[@}%
1067 {\@sixsugarh(#1)[#2]{#3}{#4}[@]}}
1068 \def\@sixsugarh(#1)[#2]#3#4[#5]{%
1069 % %%%%%%%%%%%%%%%%%%%%%%%%%%
1070 % % treatment of atom list %
1071 % %%%%%%%%%%%%%%%%%%%%%%%%%%
1072 \iniatom\iniflag%initialize
1073 \test@vrtx@SixSugarh{#3}%
1074 %test for a hetero atom or a spiro substituent on a vertex
1075 \@reset@ylsw%
1076 \ylpyranoseposition{#4}%shift values
1077 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1078 (880,800)(-240,-400){sixsugarh}%2002/4/30 by S. Fujita

1079 % %%%%%%%%%%%%%%%%%%
1080 % % outer skeleton %
1081 % %%%%%%%%%%%%%%%%%%
1082 {\resetbdsw%
1083 \@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
1084 \@fivememberedfalse%not five-membered ring
1085 \molfronttrue%boldfaced lines (thicklines)
1086 \set@skel@sugarhbond{#1}{a}{a}%
1087 %bond between 1 and 2 \@aaa -> \sugarhskbonda etc
1088 \set@skel@sugarhbond{#1}{b}{b}%
1089 %bond between 2 and 3 \@bbb -> \sugarhskbondb etc
1090 \set@skel@sugarhbond{#1}{c}{c}%
1091 %bond between 3 and 4 \@ccc -> \sugarhskbondc etc
1092 \molfrontfalse%normal lines (thinelines)
1093 \set@skel@sugarhbond{#1}{d}{d}%
1094 %bond between 4 and 5 \@ddd -> \sugarhskbondd etc
1095 \set@skel@sugarhbond{#1}{e}{e}%
1096 %bond between 5 and 6 \@eee -> \sugarhskbonde etc
1097 \set@skel@sugarhbond{#1}{f}{f}%
1098 %bond between 6 and 1 \@fff -> \sugarhskbondf etc

1099 }%

1100 % %%%%%%%%%%%%%%%%%%%%%
1101 % % inner double bond %
1102 % %%%%%%%%%%%%%%%%%%%%%
1103 \@tfor\member:=#2\do{%
1104 \if\member r\relax \sugarhbondd \sugarhbondf \sugarhbondb%
1105 \else \if\member l\relax \sugarhbonda \sugarhbondc \sugarhbonde%
1106 \else \if\member a\relax \sugarhbonda%
1107 \else \if\member b\relax \sugarhbondb%
1108 \else \if\member c\relax \sugarhbondc%
1109 \else \if\member d\relax \sugarhbondd%
1110 \else \if\member e\relax \sugarhbonde%
1111 \else \if\member f\relax \sugarhbondf%
1112 \else \if\member A% no action: %%left aromatic circle
1113 %  \Put@oCircle(203,0){240}%               %circle
1114 % %%%%%%%%%%%%%%%%%%%%%%%%%
1115 % % inner bond attachment %
1116 % %%%%%%%%%%%%%%%%%%%%%%%%%
1117 \else
1118 \expandafter\twoCH@@R\member//%
1119 \set@fusionadd@sixhi
1120 \ifx\@@tmpa\empty%
1121 \XyMTeXWarning{Fused function is unavailable for sixsugarh.}\fi
1122 \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
1123 % %%%%%%%%%%%%%%%%%%%%%%%%
1124 % % setting hetero atoms %
1125 % %%%%%%%%%%%%%%%%%%%%%%%%
1126 \iniatom\iniflag%initialize
1127 \set@hetatom@sugarh{#3}{-3}{0}{5}{1}%               %subst 4--6
1128 \set@hetatom@sugarh{#3}{3}{3}{7}{1}%              %subst 1 -- 3
1129 % %%%%%%%%%%%%%%%%%%%%%%%%
1130 % % setting substituents %
1131 % %%%%%%%%%%%%%%%%%%%%%%%%

1132 \@forsemicol\member:=#4\do{%
1133 \ifx\member\empty\else
1134 \expandafter\@m@mb@r\member;\relax%
1135 \expandafter\threech@r\@membera{}{}%
1136 \ifx\@memberb\@yl\else
1137 \ifcase\@tmpa%0 omit
1138 \or \Put@Direct(532,0){%
1139 \if@clip \@clippingtrue \else \@clippingfalse\fi
1140 \@pyrana}% subst. on 1
1141 \or \Put@Direct(412,-200){%
1142 \if@eclip \@clippingtrue \else \@clippingfalse\fi
1143 \@pyranb}% subst. on 2
1144 \or \Put@Direct(120,-200){%
1145 \if@fclip \@clippingtrue \else \@clippingfalse\fi
1146 \@pyranbb}% subst. on 3
1147 \or \Put@Direct(0,0){%
1148 \if@aclip \@clippingtrue \else \@clippingfalse\fi
1149 \@pyranc}% subst. on 4
1150 \or \Put@Direct(120,200){%
1151 \if@bclip \@clippingtrue \else \@clippingfalse\fi
1152 \@pyranbB}% subst. on 5
1153 \or \Put@Direct(412,200){%
1154 \if@cclip \@clippingtrue \else \@clippingfalse\fi
1155 \@pyranbC}% subst. on 6
1156 \fi %end of ifcase
1157 \fi\fi}%
1158 \end{ShiftPicEnv}%
1159 \iniatom\iniflag}%     %end of \sixsugarh 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
1160 \def\ylpyranoseposition#1{%
1161 \@@ylswfalse%%%\@reset@ylsw
1162 \@forsemicol\member:=#1\do{%
1163 \if@@ylsw\else
1164 \ifx\member\empty\else
1165 \expandafter\@m@mb@r\member;\relax
1166 \expandafter\threech@r\@membera{}{}\relax
1167 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1168 \if@@ylsw
1169 \ifcase\@tmpa%0 omit
1170 \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1171 \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
1172 \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
1173 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
1174 \or\gdef\@ylii{-120}\gdef\@yli{-200}\global\@ylswtrue% subst. on 5
1175 \or\gdef\@ylii{-412}\gdef\@yli{-200}\global\@ylswtrue% subst. on 6
1176 \fi%end of ifcase
1177 \fi\fi\fi}}%

6.2 Skeletal bonds of sugarhs

The macro \set@skel@sugarhbond is used in \sixsugarh etc. for setting skeletal bonds (outer bonds), when \@aaa etc. (produced by \csname...\endcsname) are equal to ‘a’ etc. (given as #2). Thinline, thickline and dotted-line skeletal bonds are available.

\set@skel@sugarhbond
1178 \def\set@skel@sugarhbond#1#2#3{%
1179 \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
1180  % \if\@aaa #2\relax%OK
1181 \@skbondlistfalse
1182 \@tfor\member:=#1\do{%
1183 \expandafter\twoCH@@R\member//%
1184  \if\@@tmpa #2\relax%
1185  \if\@@tmpb A\relax%
1186  \if@fivemembered
1187  \expandafter\csname fdothskbond#3\endcsname% \dothskbonda etc.
1188  \else
1189  \expandafter\csname dothskbond#3\endcsname% \dothskbonda etc.

1190 \fi

1191  \@skbondlisttrue
1192  \else\if\@@tmpb B\relax%
1193  {\thicklines
1194  \if@fivemembered
1195  \expandafter\csname fsugarhskbond#3\endcsname% \hskbonda etc.
1196  \else
1197  \expandafter\csname sugarhskbond#3\endcsname% \hskbonda etc.

1198 \fi 1199 }%

1200  \@skbondlisttrue
1201  \fi\fi
1202  \fi%

1203 }%

1204 \if@skbondlist\else
1205  \ifmolfront
1206  {\thicklines
1207  \if@fivemembered
1208  \expandafter\csname fsugarhskbond#3\endcsname% \hskbonda etc.
1209  \else
1210  \expandafter\csname sugarhskbond#3\endcsname% \hskbonda etc.

1211 \fi 1212 }%

1213  \else
1214  {\thinlines
1215  \if@fivemembered
1216  \expandafter\csname fsugarhskbond#3\endcsname% \hskbonda etc
1217  \else
1218  \expandafter\csname sugarhskbond#3\endcsname% \hskbonda etc.

1219 \fi 1220 }% 1221 \fi

1222 \fi%
1223 \else

1224  \expandafter\ifx\csname @#2#2#2\endcsname \empty\relax%
1225  %    \ifx\@aaa\empty\relax
1226  \@tfor\member:=#1\do{%
1227  \expandafter\twoCH@@R\member//%
1228  \if\@@tmpa #2\relax%
1229  \XyMTeXWarning{Unavailable bond `#2' in SKBONDLIST}\fi

1230 }%

1231 \fi\fi
1232 }% end of \set@skel@sugarhbond

The macros \sixsugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \sugarhskbonda to \sugarhskbondf are used to set a bond on each edge of a six- or five-membered ring.

   ************************************
   * setting skeletal bonds of sugarhs *
   ************************************
   The following numbering is adopted in this macro.
                                     e
                            (eee) 5      6  (fff)
                              d    -----    c
                                 *       *
     the original point ===> 4 * (ddd)     * 1  (aaa)
            (0,0)                *       *  a
                              c    -----
                            (ccc) 3      2  (bbb)
                                     b

\sugarhskbonda The macro \sugarhskbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \bbb) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1233 %bond between 1 and 2
1234 \def\sugarhskbonda{%
1235 \ifx\aaa\empty%
1236  \ifx\bbb\empty%
1237  \Put@Line(532,0)(-3,-5){120}%           %bond 1-2
1238  \else%
1239  \Put@Line(532,0)(-3,-5){96}%            %bond 1-2
1240  \fi%
1241 \else%
1242  \ifx\bbb\empty%
1243 %     \Put@Line(635,-55)(-3,-5){120}%          %bond 1-2
1244  \Put@Line(511,-35)(-3,-5){96}%          %bond 1-2
1245  \else%
1246  \Put@Line(511,-35)(-3,-5){80}%          %bond 1-2
1247  \fi\fi}%

\sugarhskbondf The macro \sugarhskbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1248 %bond between 1 and 6
1249 \def\sugarhskbondf{%
1250 \ifx\aaa\empty%
1251  \ifx\fff\empty%
1252  \Put@Line(532,0)(-3,5){120}%           %bond 1-6
1253  \else%
1254  \Put@Line(532,0)(-3,5){96}%            %bond 1-6
1255  \fi%
1256 \else%
1257  \ifx\fff\empty%
1258  \Put@Line(511,35)(-3,5){96}%          %bond 1-6
1259  \else%
1260  \Put@Line(511,35)(-3,5){80}%          %bond 1-6
1261  \fi\fi}%

\sugarhskbondc The macro \sugarhskbondc refers to the control sequences representing atoms on both of the terminal vertices (\ccc and \ddd) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1262 %bond between 4 and 3
1263 \def\sugarhskbondc{%
1264 \ifx\ddd\empty%
1265  \ifx\ccc\empty%
1266  \Put@Line(0,0)(3,-5){120}%           %bond 4-3
1267  \else%
1268  \Put@Line(0,0)(3,-5){96}%            %bond 4-3
1269  \fi%
1270 \else%
1271  \ifx\ccc\empty%
1272  \Put@Line(21,-35)(3,-5){96}%          %bond 4-3
1273  \else%
1274  \Put@Line(21,-35)(3,-5){80}%          %bond 4-3
1275  \fi\fi}%

\sugarhskbondd The macro \sugarhskbondd refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1276 %bond between 4 and 5
1277 \def\sugarhskbondd{%
1278 \ifx\ddd\empty%
1279  \ifx\eee\empty%
1280  \Put@Line(0,0)(3,5){120}%           %bond 4-5
1281  \else%
1282  \Put@Line(0,0)(3,5){97}%            %bond 4-5
1283  \fi%
1284 \else%
1285  \ifx\eee\empty%
1286  \Put@Line(21,35)(3,5){97}%          %bond 4-5
1287  \else%
1288  \Put@Line(21,35)(3,5){80}%          %bond 4-5
1289  \fi\fi}%

\sugarhskbondb The macro \sugarhskbondb refers to the control sequences representing atoms on both of the terminal vertices (\bbb and \ccc) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1290 %bond between 3 and 2
1291 \def\sugarhskbondb{%
1292 \ifx\ccc\empty%
1293  \ifx\bbb\empty%
1294  \Put@Line(120,-200)(1,0){292}%           %bond 3-2
1295  \else%
1296  \Put@Line(120,-200)(1,0){252}%            %bond 3-2
1297  \fi%
1298 \else%
1299  \ifx\bbb\empty%
1300  \Put@Line(160,-200)(1,0){252}%          %bond 3-2
1301  \else%
1302  \Put@Line(160,-200)(1,0){212}%          %bond 3-2
1303  \fi\fi}%

\sugarhskbonde The macro \sugarhskbonde refers to the control sequences representing atoms on both of the terminal vertices (\eee and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1304 %bond between 5 and 6
1305 \def\sugarhskbonde{%
1306 \ifx\eee\empty%
1307  \ifx\fff\empty%
1308  \Put@Line(120,200)(1,0){292}%           %bond 5-6
1309  \else%
1310  \Put@Line(120,200)(1,0){252}%            %bond 5-6
1311  \fi%
1312 \else%
1313  \ifx\fff\empty%
1314  \Put@Line(160,200)(1,0){252}%          %bond 5-6
1315  \else%
1316  \Put@Line(160,200)(1,0){212}%          %bond 5-6
1317  \fi\fi}%

6.3 Hetero Atoms on sugarh Skeletons

The command \set@hetatom@sugarh is to set a spiro group (stored as \@memberb) at a vertix designated by \@tmpaa (or originally by \@tmpa). The atom modifier ‘s’ designates that the spiro group contains a carbon atom (a vertix) at a spiro position, while ‘h’ represents the presence of a hetero atom at a spiro position. The absence of such atom modifiers shows the substitution of a usual hetero atom. The command \set@hetatom@sugarh is used in such commands as \sixsugarh for treating thier ATOMLISTs, e.g. 1==N;1s==\sixsugarh{}{1==(yl)}.

\set@hetatom@sugarh
1318 \def\set@hetatom@sugarh#1#2#3#4#5{%
1319 \@forsemicol\member:=#1\do{%
1320 \ifx\member\empty\else%
1321 \expandafter\@m@mb@r\member;\relax%
1322 \expandafter\twoCH@R\@membera//%
1323 \ifnum#5 < 0\relax%
1324 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
1325 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
1326 \ifnum\@tmpaa >#3\relax%

1327 \ifnum\@tmpaa <#4\relax%
1328 \ifcase\@tmpaa%
1329 \or%position 1
1330 \if\@tmpb h\relax
1331  \@acliptrue%
1332  \putlatom{60}{0}{\@memberb}%  % left type
1333 \else\if\@tmpb s\relax
1334  \@aclipfalse%
1335  \putlatom{0}{0}{\@memberb}%              % left type
1336 \else\if\@tmpb a\relax%omit fused position
1337 \else
1338  \@acliptrue%
1339  \putlatom{60}{-36}{\@memberb}%              % left type
1340 \fi\fi\fi
1341 \or%position 2
1342 \if\@tmpb h\relax
1343  \@bcliptrue%
1344  \putlatom{155}{180}{\@memberb}%   % left type
1345 \else\if\@tmpb s\relax
1346  \@bclipfalse%
1347  \putlatom{120}{200}{\@memberb}%   % left type
1348 \else\if\@tmpb a\relax%omit fused position
1349 \else
1350  \@bcliptrue%
1351  \putlatom{155}{180}{\@memberb}%   % left type
1352 \fi\fi\fi
1353 \or%position 3
1354 \if\@tmpb h\relax
1355  \@ccliptrue%
1356  \putratom{382}{180}{\@memberb}%  % right type
1357 \else\if\@tmpb s\relax
1358  \@cclipfalse%
1359  \putratom{412}{200}{\@memberb}%  % right type
1360 \else\if\@tmpb a\relax%omit fused position
1361 \else
1362  \@ccliptrue%
1363  \putratom{382}{180}{\@memberb}%  % right type
1364 \fi\fi\fi
1365 \or%position 4
1366 \if\@tmpb h\relax
1367  \@cliptrue%
1368 \putratom{472}{0}{\@memberb}%  % right type
1369 \else\if\@tmpb s\relax
1370  \@clipfalse%
1371 \putratom{532}{0}{\@memberb}%  % right type
1372 \else\if\@tmpb a\relax%omit fused position
1373 \else
1374  \@cliptrue%
1375 \putratom{472}{-36}{\@memberb}%  % right type
1376 \fi\fi\fi
1377 \or%position 5
1378 \if\@tmpb h\relax
1379  \@ecliptrue%
1380  \putratom{382}{-240}{\@memberb}%  % right type

1381 \else\if\@tmpb s\relax
1382  \@eclipfalse%
1383  \putratom{412}{-200}{\@memberb}%  % right type
1384 \else\if\@tmpb a\relax%omit fused position
1385 \else
1386  \@ecliptrue%
1387  \putratom{382}{-240}{\@memberb}%  % right type
1388 \fi\fi\fi
1389 \or%position 6
1390 \if\@tmpb h\relax
1391  \@fcliptrue%
1392  \putlatom{155}{-240}{\@memberb}%  % left type
1393 \else\if\@tmpb s\relax
1394  \@fclipfalse%
1395  \putlatom{120}{-200}{\@memberb}%  % left type
1396 \else\if\@tmpb a\relax%omit fused position
1397 \else
1398  \@fcliptrue%
1399  \putlatom{155}{-240}{\@memberb}%  % left type
1400 \fi\fi\fi
1401 \fi% end of ifcase
1402 \fi\fi\fi}}% end of the macro \set@hetatom@sugarh

6.4 Inner Double Bonds of sugarhs

The macros \sixsugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \sugarhbonda to \sugarhbondf are used to set a bond on each edge of a six- or five-membered ring.

   ********************************************
   * setting skeletal bonds (horizontal type) *
   ********************************************
   The following numbering is adopted in this macro.
                                     e
                            (eee) 5      6  (fff)
                              d    -----    c
                                 *       *
     the original point ===> 4 * (ddd)     * 1  (aaa)
            (0,0)                *       *  a
                              c    -----
                            (ccc) 3      2  (bbb)
                                     b

\sugarhbonda The macro \sugarhbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \bbb) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1403 %bond between 1 and 2
1404 %\else \if\member a%
1405 \def\sugarhbonda{%
1406 \ifx\aaa\empty%
1407  \ifx\bbb\empty%

1408  \Put@Line(482,-12)(-3,-5){90}%        %double bond 1-2
1409  \else%
1410  \Put@Line(482,-12)(-3,-5){80}%        %double bond 1-2
1411  \fi%
1412 \else%
1413  \ifx\bbb\empty%
1414  \Put@Line(394,-160)(3,5){70}%       %double bond 2-1
1415  \else%
1416  \Put@Line(394,-160)(3,5){70}%       %double bond 2-1
1417  \fi\fi}%

\sugarhbondf The macro \sugarhbonda refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1418 %bond between 1 and 6
1419 \def\sugarhbondf{%
1420 \ifx\aaa\empty%
1421  \ifx\fff\empty%
1422  \Put@Line(482,12)(-3,5){90}%        %double bond 1-6
1423  \else%
1424  \Put@Line(482,12)(-3,5){80}%        %double bond 1-6
1425  \fi%
1426 \else%
1427  \ifx\fff\empty%
1428  \Put@Line(394,160)(3,-5){70}%       %double bond 6-1
1429  \else%
1430  \Put@Line(394,160)(3,-5){70}%       %double bond 6-1
1431  \fi\fi}%

\sugarhbondc The macro \sugarhbondc refers to the control sequences representing atoms on both of the terminal vertices (\ccc and \ddd) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1432 %bond between 4 and 3
1433 \def\sugarhbondc{%
1434 \ifx\ddd\empty%
1435  \ifx\ccc\empty%
1436  \Put@Line(50,-12)(3,-5){90}%        %double bond 4-3
1437  \else%
1438  \Put@Line(50,-12)(3,-5){80}%        %double bond 4-3
1439  \fi%
1440 \else%
1441  \ifx\ccc\empty%
1442  \Put@Line(138,-160)(-3,5){70}%       %double bond 3-4
1443  \else%
1444  \Put@Line(138,-160)(-3,5){70}%       %double bond 3-4
1445  \fi\fi}%

\sugarhbondd The macro \sugarhbondd refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1446 %bond between 4 and 5
1447 \def\sugarhbondd{%
1448 \ifx\ddd\empty%

1449  \ifx\eee\empty%
1450  \Put@Line(50,12)(3,5){90}%        %double bond 4-5
1451  \else%
1452  \Put@Line(50,12)(3,5){80}%        %double bond 4-5
1453  \fi%
1454 \else%
1455  \ifx\eee\empty%
1456  \Put@Line(138,160)(-3,-5){70}%       %double bond 5-4
1457  \else%
1458  \Put@Line(138,160)(-3,-5){70}%       %double bond 5-4
1459  \fi\fi}%

\sugarhbondb The macro \sugarhbondb refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \bbb) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1460 %bond between 3 and 2
1461 \def\sugarhbondb{%
1462 \ifx\ccc\empty%
1463  \ifx\bbb\empty%
1464  \Put@Line(150,-160)(1,0){232}%      %double bond 3-2
1465  \else%
1466  \Put@Line(160,-160)(1,0){217}%      %double bond 3-2
1467  \fi%
1468 \else%
1469  \ifx\bbb\empty%
1470  \Put@Line(170,-160)(1,0){217}%      %double bond 3-2
1471  \else%
1472  \Put@Line(170,-160)(1,0){197}%      %double bond 3-2
1473  \fi\fi}%

\sugarhbonde The macro \sugarhbonde refers to the control sequences representing atoms on both of the terminal vertices (\eee and \fff) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1474 %bond between 5 and 6
1475 \def\sugarhbonde{%
1476 \ifx\eee\empty%
1477  \ifx\fff\empty%
1478  \Put@Line(150,160)(1,0){232}%      %double bond 5-6
1479  \else%
1480  \Put@Line(160,160)(1,0){217}%      %double bond 5-6
1481  \fi%
1482 \else%
1483  \ifx\fff\empty%
1484  \Put@Line(170,160)(1,0){217}%      %double bond 5-6
1485  \else%
1486  \Put@Line(170,160)(1,0){197}%      %double bond 5-6
1487  \fi\fi}%

7 Cyclitol Derivaives

Cyclitol derivatives can be drawn by the \cyclitol macro.

\cyclitol \@cyclitol
1488 \def\cyclitol{\@ifnextchar[{\@cyclitol}{\@cyclitol[]}}
1489 \def\@cyclitol[#1]#2{\sixsugarh[#1]{}{#2}}

Cyclitol derivatives of slightly large dimension can be drawn by the \Cyclitol macro.

\Cyclitol \@Cyclitol
1490 \def\Cyclitol{\@ifnextchar[{\@Cyclitol}{\@Cyclitol[]}}
1491 \def\@Cyclitol[#1]#2{\SixSugarh[#1]{}{#2}}

8 Five-Membered Sugar Derivatives of Normal Dimension

8.1 General Conventions

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

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

The macro \fivesugarh has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST. Two optional arguments SKBONDLIST and OMIT are added to treat stereochemical information or other bond situations.

   \fivesugarh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]

The SKBONDLIST argument contains pairs of two alphabets in parentheses, e.g. ({bA}{fB}). Each pair contains a lowercase character selected from bond specifiers ‘a’ to ‘e’ and a uppercase character ‘A’ or ‘B’.

The BONDLIST argument contains one character selected from a to f, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. The option ‘A’ represents an aromatic circle. The option ‘n+’ (n = 1 to 5) represents a plus charge on a hetero atom at the n-position.

     BONDLIST =

none or r  :  not supported (right-handed)
l          :  not supported  (left-handed)
[]         :  fully saturated form
a          :  1,2-double bond
b          :  2,3-double bond
c          :  4,3-double bond
d          :  4,5-double bond
e          :  5,1-double bond
A          :  not supported (aromatic circle)
{n+}       :  not supported (+ at the n-nitrogen atom, n = 1 to 4)

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 6 atoms)
for n = 1 to 5
n          : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

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

The argument OMIT represents one or more bonds to be omitted. The omitted edges may be regarded as both fused and non-fused positions.

OMIT:  one or more bonds omitted (a, b, c, d, or e)

Several examples are shown as follows.

e.g.
\fivesugarh{5==O}{1Sa==OH;2Sa==OH}

The definition of \fivesugarh uses a picture environment and consists of the same unit processes as shown in \fiveheteroh:

1. treatment of atom list,

2. placing outer skeletons,

3. placing inner double bonds,

4. setting hetero atoms, and

5. placing substituents dirctly (cf. \setsixringh for a \fiveheteroh)

\fivesugarh
\@five@sugarh
\@five@@sugarh
\@fivesugarh

1492 \def\fivesugarh{\@ifnextchar({\@five@sugarh(@}{\@five@sugarh(@)}}
1493 \def\@five@sugarh(#1){\@ifnextchar[{\@five@@sugarh(#1)[@}%
1494 {\@five@@sugarh(#1)[@]}}
1495 \def\@five@@sugarh(#1)[#2]#3#4{\@ifnextchar[%
1496 {\@fivesugarh(#1)[#2]{#3}{#4}[@}%
1497 {\@fivesugarh(#1)[#2]{#3}{#4}[@]}}
1498 \def\@fivesugarh(#1)[#2]#3#4[#5]{%
1499 % %%%%%%%%%%%%%%%%%%%%%%%%%%
1500 % % treatment of atom list %
1501 % %%%%%%%%%%%%%%%%%%%%%%%%%%
1502 \iniatom\iniflag%initialize
1503 \test@vrtx@SixSugarh{#3}%
1504 %test for a hetero atom or a spiro substituent on a vertex
1505 \@reset@ylsw%
1506 \ylfuranoseposition{#4}%shift values
1507 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1508 (880,800)(-240,-400){fivesugarh}%2002/4/30 by S. Fujita
1509 % %%%%%%%%%%%%%%%%%%
1510 % % outer skeleton %
1511 % %%%%%%%%%%%%%%%%%%
1512 {\resetbdsw%
1513 \@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
1514 \@fivememberedfalse%common bonds to a six-membered ring
1515 \molfronttrue%boldfaced lines (thicklines)
1516 \set@skel@sugarhbond{#1}{a}{a}%
1517 %bond between 1 and 2 \@aaa -> \sugarhskbonda etc
1518 \set@skel@sugarhbond{#1}{b}{b}%
1519 %bond between 2 and 3 \@bbb -> \sugarhskbondb etc
1520 \set@skel@sugarhbond{#1}{c}{c}%
1521 %bond between 3 and 4 \@ccc -> \sugarhskbondc etc
1522 \@fivememberedtrue%bonds for a five-membered ring
1523 \molfrontfalse%normal lines (thinelines)
1524 \set@skel@sugarhbond{#1}{d}{d}%
1525 %bond between 4 and 5 \@ddd -> \fsugarhskbondd etc
1526 \set@skel@sugarhbond{#1}{e}{e}%
1527 %bond between 5 and 1 \@eee -> \fsugarhskbonde etc

1528 }%

1529 % %%%%%%%%%%%%%%%%%%%%%
1530 % % inner double bond %
1531 % %%%%%%%%%%%%%%%%%%%%%

1532 \@tfor\member:=#2\do{%
1533 \if\member r\relax %no action \sugarhbondd \sugarhbondf \sugarhbondb%
1534 \else \if\member l\relax %no action \sugarhbonda \sugarhbondc \sugarhbonde%
1535 \else \if\member a\relax \sugarhbonda%
1536 \else \if\member b\relax \sugarhbondb%
1537 \else \if\member c\relax \sugarhbondc%
1538 \else \if\member d\relax \fsugarhbondd%
1539 \else \if\member e\relax \fsugarhbonde%
1540 \else \if\member A% no action: %%left aromatic circle
1541 %  \Put@oCircle(203,0){240}%               %circle
1542 % %%%%%%%%%%%%%%%%%%%%%%%%%
1543 % % inner bond attachment %
1544 % %%%%%%%%%%%%%%%%%%%%%%%%%
1545 \else%no action
1546 %  \expandafter\twoCH@@R\member//%
1547 %  \set@fusionadd@sixhi
1548 %  \ifx\@@tmpa\empty%
1549 %   \XyMTeXWarning{Fused function is unavailable for fivesugarh.}\fi
1550 \fi\fi\fi\fi\fi\fi\fi\fi}%
1551 % %%%%%%%%%%%%%%%%%%%%%%%%
1552 % % setting hetero atoms %
1553 % %%%%%%%%%%%%%%%%%%%%%%%%
1554 \iniflag%initialize
1555 \set@hetatom@sugarh{#3}{-3}{0}{2}{1}%       %subst 4
1556 \set@hetatom@sugarh{#3}{3}{3}{7}{1}%        %subst 1 -- 3
1557 \set@hteatom@fivesugarh{#3}%                %subsituent 5
1558 % %%%%%%%%%%%%%%%%%%%%%%%%
1559 % % setting substituents %
1560 % %%%%%%%%%%%%%%%%%%%%%%%%
1561 \@forsemicol\member:=#4\do{%
1562 \ifx\member\empty\else
1563 \expandafter\@m@mb@r\member;\relax%
1564 \expandafter\threech@r\@membera{}{}%
1565 \ifx\@memberb\@yl\else
1566 \ifcase\@tmpa%0 omit
1567 \or \Put@Direct(532,0){%
1568 \if@clip \@clippingtrue \else \@clippingfalse\fi
1569 \@pyrana}% subst. on 1
1570 \or \Put@Direct(412,-200){%
1571 \if@eclip \@clippingtrue \else \@clippingfalse\fi
1572 \@pyranb}% subst. on 2
1573 \or \Put@Direct(120,-200){%
1574 \if@fclip \@clippingtrue \else \@clippingfalse\fi
1575 \@pyranbb}% subst. on 3
1576 \or \Put@Direct(0,0){%
1577 \if@aclip \@clippingtrue \else \@clippingfalse\fi
1578 \@pyranc}% subst. on 4
1579 \or \Put@Direct(266,160){%
1580 \if@bclip \@clippingtrue \else \@clippingfalse\fi
1581 \@pyranbB}% subst. on 5
1582 \fi %end of ifcase
1583 \fi\fi}%
1584 \end{ShiftPicEnv}%

1585 \iniatom\iniflag}%     %end of \fivesugarh macro
\resetflags

1586 %

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

\ylfuranoseposition
1587 \def\ylfuranoseposition#1{%
1588 \@@ylswfalse%%%\@reset@ylsw
1589 \@forsemicol\member:=#1\do{%
1590 \if@@ylsw\else
1591 \ifx\member\empty\else
1592 \expandafter\@m@mb@r\member;\relax
1593 \expandafter\threech@r\@membera{}{}\relax
1594 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1595 \if@@ylsw
1596 \ifcase\@tmpa%0 omit
1597 \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1598 \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
1599 \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
1600 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
1601 \or\gdef\@ylii{-266}\gdef\@yli{-160}\global\@ylswtrue% subst. on 5
1602 \fi%end of ifcase
1603 \fi\fi\fi}}%

8.2 Skeletal Bonds of fivesugarh

The macros \fivesugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \sugarhskbonda to \sugarhskbondc (common to

  \sixsugarh) as well as \fsugarhskbondd to \fsugarhskbonde to set a bond on

each edge of a five-membered ring.

\fsugarhskbondd The macro \fsugarhskbondd refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1604 \def\fsugarhskbondd{%
1605 \ifx\ddd\empty%
1606  \ifx\eee\empty%
1607  \Put@Line(0,0)(5,3){266}%           %bond 4-5
1608  \else%
1609  \Put@Line(0,0)(5,3){231}%            %bond 4-5
1610  \fi%
1611 \else%
1612  \ifx\eee\empty%
1613  \Put@Line(35,21)(5,3){231}%          %bond 4-5
1614  \else%
1615  \Put@Line(35,21)(5,3){200}%          %bond 4-5
1616  \fi\fi}%

\fsugarhskbonde The macro \fsugarhskbonde refers to the control sequences representing atoms on both of the terminal vertices (\eee and \aaa) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1617 %bond between 5 and 1
1618 \def\fsugarhskbonde{%
1619 \ifx\aaa\empty%
1620  \ifx\eee\empty%
1621  \Put@Line(532,0)(-5,3){266}%           %bond 5-1
1622  \else%
1623  \Put@Line(532,0)(-5,3){231}%            %bond 5-1
1624  \fi%
1625 \else%
1626  \ifx\eee\empty%
1627  \Put@Line(497,21)(-5,3){231}%          %bond 5-1
1628  \else%
1629  \Put@Line(497,21)(-5,3){200}%          %bond 5-1
1630  \fi\fi}%
\set@hteatom@fivesugarh The macro \set@hteatom@fivesugarh put a hetero atom on vertex no. 5 of
  \fivesugarh.
1631 \def\set@hteatom@fivesugarh#1{%
1632 \@forsemicol\member:=#1\do{%
1633 \ifx\member\empty\else%
1634 \expandafter\@m@mb@r\member;\relax%
1635 \expandafter\twoCH@R\@membera//%
1636 \@tmpaa=\@tmpa\relax
1637 \ifnum\@tmpaa=5\relax
1638 \if\@tmpb h\relax
1639  \@bcliptrue%
1640  \putratom{236}{130}{\@memberb}%  % right type
1641 \else\if\@tmpb s\relax
1642  \@bclipfalse%
1643  \putratom{266}{160}{\@memberb}%  % right type
1644 \else\if\@tmpb a\relax%omit fused position
1645 \else
1646  \@bcliptrue%
1647  \putratom{236}{130}{\@memberb}% left type
1648 \fi\fi\fi
1649 \fi% end of ifnum

1650 \fi

1651 }}% end of the macro \set@hetatom@fivesugarh

8.3 Inner Double Bonds of fivesugarh

The macros \fivesugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \fsugarhbonda to \sugarhbondc (common to

  \sixsugarh) as well as \fsugarhbondd and \sugarhbonde are used to set a bond

on each edge of a five-membered ring.

\fsugarhbondd The macro \fsugarhbondd refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1652 %bond between 4 and 5
1653 \def\fsugarhbondd{%
1654 \ifx\ddd\empty%
1655  \ifx\eee\empty%
1656  \Put@Line(60,-10)(5,3){190}%        %double bond 4-5
1657  \else%
1658  \Put@Line(60,-10)(5,3){170}%        %double bond 4-5
1659  \fi%
1660 \else%
1661  \ifx\eee\empty%
1662  \Put@Line(80,6)(5,3){170}%       %double bond 5-4
1663  \else%
1664  \Put@Line(80,6)(5,3){160}%       %double bond 5-4
1665  \fi\fi}%

\fsugarhbonde The macro \fsugarhbonde refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1666 %bond between 5 and 1
1667 \def\fsugarhbonde{%
1668 \ifx\aaa\empty%
1669  \ifx\eee\empty%
1670  \Put@Line(472,-10)(-5,3){190}%        %double bond 5-1
1671  \else%
1672  \Put@Line(472,-10)(-5,3){170}%        %double bond 5-1
1673  \fi%
1674 \else%
1675  \ifx\eee\empty%
1676  \Put@Line(452,6)(-5,3){170}%       %double bond 5-1
1677  \else%
1678  \Put@Line(452,6)(-5,3){160}%       %double bond 5-1
1679  \fi\fi}%

9 Five-Membered Sugar Derivatives of Large Dimension

9.1 General Conventions

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

   ********************
   * Sugarh derivative *
   ********************
   The following numbering is adopted in this macro.

                                     5
                                     *
                               d  *     * e
     the original point ===> 4 *           * 1
            (0,0)                *       * a

                             c   -----
                                3  b   2

The macro \FiveSugarh has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST. Two optional arguments SKBONDLIST and OMIT are added to treat stereochemical information or other bond situations.

   \FiveSugarh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]

The SKBONDLIST argument contains pairs of two alphabets in parentheses, e.g. ({bA}{fB}). Each pair contains a lowercase character selected from bond specifiers ‘a’ to ‘e’ and a uppercase character ‘A’ or ‘B’.

The BONDLIST argument contains one character selected from a to f, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. The option ‘A’ represents an aromatic circle. The option ‘n+’ (n = 1 to 6) represents a plus charge on a hetero atom at the n-position.

     BONDLIST =
           none or r  :  not suported: sixhetero (right-handed)
           l          :  not suported: sixhetero (left-handed)
           []         :  fully saturated form
           a          :  1,2-double bond
           b          :  2,3-double bond
           c          :  4,3-double bond
           d          :  4,5-double bond
           e          :  5,1-double bond
           A          :  not suported: aromatic circle
           {n+}       :  not suported: plus at n-nitrogen atom (n = 1 to 4)

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 6 atoms)
       for n = 1 to 5
           n          : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

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)

             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

The argument OMIT represents one or more bonds to be omitted. The omitted edges may be regarded as both fused and non-fused positions.

       OMIT:  one or more bonds omitted (a, b, c, d, or e)

Several examples are shown as follows.

         e.g.
          \FiveSugarh{6==O}{1Sa==OH;2Sa==OH}

The definition of \FiveSugarh uses a picture environment and consists of the same unit processes as shown in \sixheteroh:

1. treatment of atom list,

2. placing outer skeletons,

3. placing inner double bonds,

4. setting hetero atoms, and

5. placing substituents dirctly (cf. \setsixringh for a \sixheteroh)

\FiveSugarh
\@Five@Sugarh
\@Five@@Sugarh
\@FiveSugarh

1680 \def\FiveSugarh{\@ifnextchar({\@Five@Sugarh(@}{\@Five@Sugarh(@)}}
1681 \def\@Five@Sugarh(#1){\@ifnextchar[{\@Five@@Sugarh(#1)[@}%
1682 {\@Five@@Sugarh(#1)[@]}}
1683 \def\@Five@@Sugarh(#1)[#2]#3#4{\@ifnextchar[%
1684 {\@FiveSugarh(#1)[#2]{#3}{#4}[@}%
1685 {\@FiveSugarh(#1)[#2]{#3}{#4}[@]}}
1686 \def\@FiveSugarh(#1)[#2]#3#4[#5]{%
1687 % %%%%%%%%%%%%%%%%%%%%%%%%%%
1688 % % treatment of atom list %
1689 % %%%%%%%%%%%%%%%%%%%%%%%%%%
1690 \iniatom\iniflag%initialize
1691 \test@vrtx@SixSugarh{#3}%common to six-membered ring
1692 %test for a hetero atom or a spiro substituent on a vertex
1693 \@reset@ylsw%
1694 \ylFiveSugarhposition{#4}%shift values
1695 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1696 (1100,800)(-240,-400){FiveSugarh}%2002/4/30 by S. Fujita

1697 % %%%%%%%%%%%%%%%%%%
1698 % % outer skeleton %
1699 % %%%%%%%%%%%%%%%%%%
1700 {\resetbdsw%
1701 \@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
1702 \molfronttrue
1703 \@fivememberedfalse%common bonds to a six-membered ring
1704 \set@skel@Sugarhbond{#1}{a}{a}%
1705 %bond between 1 and 2 \@aaa -> \Sugarhskbonda etc
1706 \set@skel@Sugarhbond{#1}{b}{b}%
1707 %bond between 2 and 3 \@bbb -> \Sugarhskbondb etc
1708 \set@skel@Sugarhbond{#1}{c}{c}%
1709 %bond between 3 and 4 \@ccc -> \Sugarhskbondc etc
1710 \molfrontfalse
1711 \@fivememberedtrue%only five-membered ring
1712 \set@skel@Sugarhbond{#1}{d}{d}%
1713 %bond between 4 and 5 \@ddd -> \fSugarhskbondd etc
1714 \set@skel@Sugarhbond{#1}{e}{e}%
1715 %bond between 5 and 1 \@eee -> \fSugarhskbonde etc

1716 }%

1717 % %%%%%%%%%%%%%%%%%%%%%
1718 % % inner double bond %
1719 % %%%%%%%%%%%%%%%%%%%%%
1720 \@tfor\member:=#2\do{%
1721 \if\member r\relax %%% no action \Sugarhbondd \Sugarhbondf \Sugarhbondb%
1722 \else \if\member l\relax %% noaction \Sugarhbonda \Sugarhbondc \Sugarhbonde%
1723 \else \if\member a\relax \Sugarhbonda%
1724 \else \if\member b\relax \Sugarhbondb%
1725 \else \if\member c\relax \Sugarhbondc%
1726 \else \if\member d\relax \fSugarhbondd%
1727 \else \if\member e\relax \fSugarhbonde%
1728 \else \if\member A% no action: %%left aromatic circle
1729 %  \Put@oCircle(203,0){240}%               %circle
1730 % %%%%%%%%%%%%%%%%%%%%%%%%%
1731 % % inner bond attachment %
1732 % %%%%%%%%%%%%%%%%%%%%%%%%%
1733 %\else
1734 %  \expandafter\twoCH@@R\member//%
1735 %  \set@fusionadd@sixhi
1736 %  \ifx\@@tmpa\empty%
1737 %   \XyMTeXWarning{Fused function is unavailable for FiveSugarh.}\fi
1738 \fi\fi\fi\fi\fi\fi\fi\fi}%
1739 % %%%%%%%%%%%%%%%%%%%%%%%%
1740 % % setting hetero atoms %
1741 % %%%%%%%%%%%%%%%%%%%%%%%%
1742 \iniatom\iniflag%initialize
1743 \set@hetatom@Sugarh{#3}{-3}{0}{2}{1}%               %subst 4
1744 \set@hetatom@Sugarh{#3}{3}{3}{7}{1}%              %subst 1 -- 3
1745 \set@hteatom@FiveSugarh{#3}%                      %subst 5
1746 % %%%%%%%%%%%%%%%%%%%%%%%%
1747 % % setting substituents %
1748 % %%%%%%%%%%%%%%%%%%%%%%%%
1749 \@forsemicol\member:=#4\do{%

1750 \ifx\member\empty\else
1751 \expandafter\@m@mb@r\member;\relax%
1752 \expandafter\threech@r\@membera{}{}%
1753 \ifx\@memberb\@yl\else
1754 \ifcase\@tmpa%0 omit
1755 \or \Put@Direct(668,0){%
1756 \if@clip \@clippingtrue \else \@clippingfalse\fi
1757 \@pyrana}% subst. on 1
1758 \or \Put@Direct(513,-255){%
1759 \if@eclip \@clippingtrue \else \@clippingfalse\fi
1760 \@pyranb}% subst. on 2
1761 \or \Put@Direct(153,-255){%
1762 \if@fclip \@clippingtrue \else \@clippingfalse\fi
1763 \@pyranbb}% subst. on 3
1764 \or \Put@Direct(0,0){%
1765 \if@aclip \@clippingtrue \else \@clippingfalse\fi
1766 \@pyranc}% subst. on 4
1767 \or \Put@Direct(333,200){%
1768 \if@bclip \@clippingtrue \else \@clippingfalse\fi
1769 \@pyranbB}% subst. on 5
1770 \fi %end of ifcase
1771 \fi\fi}%
1772 \end{ShiftPicEnv}%
1773 \iniatom\iniflag}%     %end of \FiveSugarh macro

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

\ylFiveSugarhposition
1774 \def\ylFiveSugarhposition#1{%
1775 \@@ylswfalse%%%\@reset@ylsw
1776 \@forsemicol\member:=#1\do{%
1777 \if@@ylsw\else
1778 \ifx\member\empty\else
1779 \expandafter\@m@mb@r\member;\relax
1780 \expandafter\threech@r\@membera{}{}\relax
1781 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1782 \if@@ylsw
1783 \ifcase\@tmpa%0 omit
1784 \or\gdef\@ylii{-668}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1785 \or\gdef\@ylii{-513}\gdef\@yli{255}\global\@ylswtrue% subst. on 2
1786 \or\gdef\@ylii{-153}\gdef\@yli{255}\global\@ylswtrue% subst. on 3
1787 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
1788 \or\gdef\@ylii{-333}\gdef\@yli{-200}\global\@ylswtrue% subst. on 5
1789 \fi%end of ifcase
1790 \fi\fi\fi}}%

9.2 Skeletal Bonds of FiveSugarh

The macros \FiveSugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \sugarhskbonda to \sugarhskbondc (common to

  \sixsugarh) as well as \fSugarhskbondd to \fSugarhskbonde to set a bond on

each edge of a five-membered ring.

\fSugarhskbondd The macro \fSugarhskbondd refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1791 \def\fSugarhskbondd{%
1792 \ifx\ddd\empty%
1793  \ifx\eee\empty%
1794  \Put@Line(0,0)(5,3){333}%           %bond 4-5
1795  \else%
1796  \Put@Line(0,0)(5,3){298}%            %bond 4-5
1797  \fi%
1798 \else%
1799  \ifx\eee\empty%
1800  \Put@Line(35,21)(5,3){298}%          %bond 4-5
1801  \else%
1802  \Put@Line(35,21)(5,3){263}%          %bond 4-5
1803  \fi\fi}%

\fSugarhskbonde The macro \fSugarhskbonde refers to the control sequences representing atoms on both of the terminal vertices (\eee and \aaa) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1804 %bond between 5 and 1
1805 \def\fSugarhskbonde{%
1806 \ifx\aaa\empty%
1807  \ifx\eee\empty%
1808  \Put@Line(668,0)(-5,3){333}%           %bond 5-1
1809  \else%
1810  \Put@Line(668,0)(-5,3){298}%            %bond 5-1
1811  \fi%
1812 \else%
1813  \ifx\eee\empty%
1814  \Put@Line(633,21)(-5,3){298}%          %bond 5-1
1815  \else%
1816  \Put@Line(633,21)(-5,3){263}%          %bond 5-1
1817  \fi\fi}%
\set@hteatom@FiveSugarh The macro \set@hteatom@FiveSugarh put a hetero atom on vertex no. 5 of
  \FiveSugarh.
1818 \def\set@hteatom@FiveSugarh#1{%
1819 \@forsemicol\member:=#1\do{%
1820 \ifx\member\empty\else%
1821 \expandafter\@m@mb@r\member;\relax%
1822 \expandafter\twoCH@R\@membera//%
1823 \@tmpaa=\@tmpa\relax
1824 \ifnum\@tmpaa=5\relax
1825 \if\@tmpb h\relax
1826  \@bcliptrue%
1827  \putratom{303}{170}{\@memberb}%  % right type
1828 \else\if\@tmpb s\relax
1829  \@bclipfalse%
1830  \putratom{333}{200}{\@memberb}%  % right type
1831 \else\if\@tmpb a\relax%omit fused position
1832 \else
1833  \@bcliptrue%

1834  \putratom{303}{170}{\@memberb}% left type
1835 \fi\fi\fi
1836 \fi% end of ifnum

1837 \fi

1838 }}% end of the macro \set@hetatom@FiveSugarh

9.3 Inner Double Bonds of FiveSugarh

The macros \FiveSugarh uses inner macros for setting skeletal bonds in accordance with the presence or the absence of hetero atoms. During the processes of such setting, the inner macros \Sugarhbonda to \Sugarhbondc (common to

  \SixSugarh) as well as \fSugarhbondd and \fSugarhbonde are used to set a

bond on each edge of a five-membered ring.

\fSugarhbondd The macro \fSugarhbondd refers to the control sequences representing atoms on both of the terminal vertices (\ddd and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1839 %bond between 4 and 5
1840 \def\fSugarhbondd{%
1841 \ifx\ddd\empty%
1842  \ifx\eee\empty%
1843  \Put@Line(60,-10)(5,3){257}%        %double bond 4-5
1844  \else%
1845  \Put@Line(60,-10)(5,3){237}%        %double bond 4-5
1846  \fi%
1847 \else%
1848  \ifx\eee\empty%
1849  \Put@Line(80,6)(5,3){237}%       %double bond 5-4
1850  \else%
1851  \Put@Line(80,6)(5,3){227}%       %double bond 5-4
1852  \fi\fi}%

\fSugarhbonde The macro \fSugarhbonde refers to the control sequences representing atoms on both of the terminal vertices (\aaa and \eee) and examine whether these are empty or not. Thereby, it decides the vertices to be truncated.

1853 %bond between 5 and 1
1854 \def\fSugarhbonde{%
1855 \ifx\aaa\empty%
1856  \ifx\eee\empty%
1857  \Put@Line(608,-10)(-5,3){257}%        %double bond 5-1
1858  \else%
1859  \Put@Line(608,-10)(-5,3){237}%        %double bond 5-1
1860  \fi%
1861 \else%
1862  \ifx\eee\empty%
1863  \Put@Line(588,6)(-5,3){237}%       %double bond 5-1
1864  \else%
1865  \Put@Line(588,6)(-5,3){227}%       %double bond 5-1
1866  \fi\fi}%

1867 ⟨/hcycle⟩