%%
%% This is file `hcycle.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hcycle.dtx  (with options: `hcycle')
%% 
%% This is a generated file.
%% 
%% Copyright 1996,1998,2001,2002,2004,2010,2013 by Shinsaku Fujita
%% all rights reserved.
%% This style file is created for drawing chemical structural formulas
%% This style file is to be contained in the ``xymtex'' directory which
%% is an input directory for TeX.
%% 
%% This file is part of the XyMTeX system.
%% =======================================
%% 
%% Old Versions:
%% Version 1.01 Released on August 16, 1996
%% Version 1.02 Released on October 31, 1996 (private version)
%% Version 2.00 Released on December 25, 1998
%% Version 2.01 Released on June 20, 2001 (private version)
%% Version 3.00 Released on April 30, 2002
%% Version 4.00 Released on May 30, 2002 (private version)
%% Version 4.01 Released on August 30, 2002
%% Version 5.00 Released on October 01, 2010
%% Version 5.01b Released on March 30, 2013
%% 
%% The Present Version:
%% Version 5.01 Released on June 25, 2013
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Shinsaku Fujita.
%% 
%% This work consists of the files hcycle.dtx and hcycle.ins
%% and the derived file hcycle.sty.
%% 
%% =======================================
%% File: hcycle.dtx
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.01}
\typeout{       -- Released June 25, 2013 by Shinsaku Fujita}
\def\j@urnalname{hcycle}
\def\versi@ndate{June 25, 2013}
\def\versi@nno{ver5.01}
\def\copyrighth@lder{SF} % Shinsaku Fujita
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
\space[\copyrighth@lder]}
\@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
\unitlength=0.1pt
\newif\if@clipping \@clippingfalse
\def\@pyrana{%
 \if@clipping%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=30
           \Put@Line(45,0)(1,0){80}% single bond at 1
           \putratom{130}{-30}{\@memberb}% right type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,-45)(0,-1){73}% single bond at 1 alpha (down)
           \putratom{-32}{-190}{\@memberb}% right type
    \else\if\@tmpc b%(e) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,45)(0,1){73}% single bond at 1 beta (up)
           \putratom{-32}{130}{\@memberb}% right type
    \else\if\@tmpc A% alpha
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(25,-25)(1,-1){100}% single bond at 1
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpc B% beta
     \yl@xdiff=-10
     \yl@ydiff=10
           \Put@Line(25,25)(1,1){100}% single bond at 1
           \putratom{130}{110}{\@memberb}% right type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond
     \yl@xdiff=-10
     \yl@ydiff=30
           \Put@Line(30,-15)(1,0){90}% double bond at 1
           \Put@Line(30,15)(1,0){90}% double bond at 1
           \putratom{130}{-30}{\@memberb}% right type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=30\relax
           {%
           \WaveBonds%
           \Put@Line(25,0)(1,0){100}%      % wavy bond at 1
           }%
           \putratom{130}{-30}{\@memberb}% right type
     \else%
     \yl@xdiff=-10
     \yl@ydiff=30
           \Put@Line(45,0)(1,0){90}% single bond at 1
           \putratom{130}{-30}{\@memberb}% right type
   \fi
   \fi\fi
 \else
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=30
           \Put@Line(0,0)(1,0){120}% single bond at 1
           \putratom{130}{-30}{\@memberb}% right type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,0)(0,-1){118}% single bond at 1 alpha (down)
           \putratom{-32}{-190}{\@memberb}% right type
    \else\if\@tmpc b%(e) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,0)(0,1){118}% single bond at 1 beta (up)
           \putratom{-32}{130}{\@memberb}% right type
    \else\if\@tmpc A% alpha
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(0,0)(1,-1){120}% single bond at 1
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpc B% beta
     \yl@xdiff=-10
     \yl@ydiff=10
           \Put@Line(0,0)(1,1){120}% single bond at 1
           \putratom{130}{110}{\@memberb}% right type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond
     \yl@xdiff=-10
     \yl@ydiff=30
           \Put@Line(0,-15)(1,0){120}% double bond at 1
           \Put@Line(0,15)(1,0){120}% double bond at 1
           \putratom{130}{-30}{\@memberb}% right type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=30\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(1,0){120}%      % wavy bond at 1
           }%
           \putratom{130}{-30}{\@memberb}% right type
     \else%
     \yl@xdiff=-10
     \yl@ydiff=30
           \Put@Line(0,0)(1,0){120}% single bond at 1
           \putratom{130}{-30}{\@memberb}% right type
   \fi\fi\fi
 \fi
}%
\def\@pyranb{%
 \if@clipping%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(45,-45)(1,-1){100}% single bond at 2
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,45)(0,1){73}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \else\if\@tmpc A%(A) beta
     \yl@xdiff=10
     \yl@ydiff=40
           \Put@Line(40,-40)(1,-1){100}% single bond at 2
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpc B%(B) beta
     \yl@xdiff=-10
     \yl@ydiff=40
           \Put@Line(-40,-40)(-1,-1){100}% single bond at 2
           \putlatom{-130}{-180}{\@memberb}% left type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(15,-45)(1,-1){100}% double bond at 2
           \Put@Line(45,-15)(1,-1){100}% double bond at 2
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=40\relax
           {%
           \WaveBonds%
           \Put@Line(40,-40)(1,-1){90}%      % wavy bond at 2
           }%
           \putratom{130}{-180}{\@memberb}% right type
     \else%
     \yl@xdiff=-10
     \yl@ydiff=10
           \Put@Line(45,45)(1,1){100}% single bond at 1
           \putratom{130}{110}{\@memberb}% left type
   \fi\fi\fi
 \else
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(0,0)(1,-1){120}% single bond at 1
           \putratom{130}{-180}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,0)(0,1){118}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \fi\fi\fi%\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(-15,-15)(1,-1){120}% double bond at 1
           \Put@Line(0,15)(1,-1){120}% double bond at 1
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=60\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(1,-1){120}%      % wavy bond at 2
           }%
           \putratom{130}{-180}{\@memberb}% right type
     \else%
     \yl@xdiff=-10
     \yl@ydiff=10
           \Put@Line(0,0)(1,1){120}% single bond at 1
           \putratom{130}{110}{\@memberb}% left type
   \fi\fi\fi
 \fi
}%
\def\@pyranbb{%
 \if@clipping%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(45,-45)(1,-1){100}% single bond at 3
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,45)(0,1){73}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \else\if\@tmpc A%(A) beta%
      \yl@xdiff=-10
      \yl@ydiff=60
           \Put@Line(45,-45)(1,-1){100}% single bond at 3
           \putratom{130}{-180}{\@memberb}% right type
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=10
      \yl@ydiff=60
           \Put@Line(-45,-45)(-1,-1){100}% single bond at 3
           \putlatom{-130}{-180}{\@memberb}% left type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=20
     \yl@ydiff=60
           \Put@Line(-15,-45)(-1,-1){100}% double bond at 3
           \Put@Line(-45,-15)(-1,-1){100}% double bond at 3
           \putlatom{-130}{-180}{\@memberb}%left type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=60\relax
           {%
           \WaveBonds%
           \Put@Line(-40,-40)(-1,-1){90}%      % wavy bond at 2
           }%
           \putlatom{-130}{-180}{\@memberb}% left type
     \else%
     \yl@xdiff=10
     \yl@ydiff=60
           \Put@Line(-45,-45)(-1,-1){100}% single bond at 1
           \putlatom{-130}{-180}{\@memberb}% left type
   \fi\fi\fi
 \else
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(0,0)(1,-1){120}% single bond at 1
           \putratom{130}{-180}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,0)(0,1){118}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \fi\fi\fi%\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=20
     \yl@ydiff=60
           \Put@Line(15,-15)(-1,-1){120}% double bond at 1
           \Put@Line(0,15)(-1,-1){120}% double bond at 1
           \putlatom{-130}{-180}{\@memberb}%left type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=60\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,-1){120}%      % wavy bond at 2
           }%
           \putlatom{-130}{-180}{\@memberb}% left type
     \else%
     \yl@xdiff=10
     \yl@ydiff=60
           \Put@Line(0,0)(-1,-1){120}% single bond at 1
           \putlatom{-130}{-180}{\@memberb}% left type
   \fi\fi\fi
 \fi
}%
\def\@pyranbB{%
 \if@clipping%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=10
     \yl@ydiff=-60
           \Put@Line(-45,45)(-1,1){100}% single bond at 5
           \putlatom{-130}{130}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,45)(0,1){73}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \else\if\@tmpc A%(A) beta
     \yl@xdiff=10
     \yl@ydiff=-60
           \Put@Line(-45,45)(-1,1){100}% single bond at 5
           \putlatom{-130}{130}{\@memberb}% left type
    \else\if\@tmpc B%(B) beta
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(45,45)(1,1){100}% single bond at 5
           \putratom{130}{130}{\@memberb}% left type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=0
     \yl@ydiff=-20
           \Put@Line(-15,45)(-1,1){100}% double bond at 5
           \Put@Line(-45,15)(-1,1){100}% double bond at 5
           \putlatom{-120}{140}{\@memberb}%left type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=10\relax
      \yl@ydiff=-60\relax
           {%
           \WaveBonds%
           \Put@Line(-40,40)(-1,1){90}%      % wavy bond at 5
           }%
           \putlatom{-130}{130}{\@memberb}% left type
     \else%
     \yl@xdiff=10
     \yl@ydiff=-60
           \Put@Line(-45,45)(-1,1){100}% single bond at 5
           \putlatom{-130}{130}{\@memberb}% left type
   \fi\fi\fi
 \else
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(0,0)(1,-1){120}% single bond at 5
           \putratom{130}{-180}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,0)(0,1){118}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \fi\fi\fi%\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=0
     \yl@ydiff=-20
           \Put@Line(15,15)(-1,1){120}% double bond at 5
           \Put@Line(0,-15)(-1,1){120}% double bond at 5
           \putlatom{-120}{140}{\@memberb}%left type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=10\relax
      \yl@ydiff=-60\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,1){120}%      % wavy bond at 5
           }%
           \putlatom{-130}{130}{\@memberb}% left type
     \else%
     \yl@xdiff=10
     \yl@ydiff=-20
           \Put@Line(0,0)(-1,1){120}% single bond at 1
           \putlatom{-130}{140}{\@memberb}% left type
   \fi\fi\fi
 \fi
}%
\def\@pyranc{%
 \if@clipping%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=10
     \yl@ydiff=30
           \Put@Line(-45,0)(-1,0){80}% single bond at 4
           \putlatom{-130}{-30}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=-32
     \yl@ydiff=72
           \Put@Line(0,-45)(0,-1){80}% single bond at 4
           \putlatom{32}{-190}{\@memberb}% left type
    \else\if\@tmpc b%(e) beta
     \yl@xdiff=-32
     \yl@ydiff=-12
           \Put@Line(0,45)(0,1){80}% single bond at 4 beta (up)
           \putlatom{32}{130}{\@memberb}% left type
    \else\if\@tmpc A% alpha
     \yl@xdiff=10
     \yl@ydiff=60
           \Put@Line(-30,-30)(-1,-1){100}% single bond at 4
           \putlatom{-130}{-180}{\@memberb}% left type
    \else\if\@tmpc B% beta
     \yl@xdiff=10
     \yl@ydiff=10
           \Put@Line(-30,30)(-1,1){100}% single bond at 4
           \putlatom{-130}{110}{\@memberb}% left type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond
     \yl@xdiff=10
     \yl@ydiff=30
           \Put@Line(-30,-15)(-1,0){100}% double bond at 4
           \Put@Line(-30,15)(-1,0){100}% double bond at 4
           \putlatom{-130}{-30}{\@memberb}% left type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=10\relax
      \yl@ydiff=30\relax
           {%
           \WaveBonds%
           \Put@Line(-30,0)(-1,0){100}%      % wavy bond at 4
           }%
           \putlatom{-130}{-30}{\@memberb}% left type
     \else%
     \yl@xdiff=10
     \yl@ydiff=30
           \Put@Line(-45,0)(-1,0){80}% single bond at 4
           \putlatom{-130}{-30}{\@memberb}% left type
   \fi\fi\fi
 \else
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=10
     \yl@ydiff=30
           \Put@Line(0,0)(-1,0){120}% single bond at 4
           \putlatom{-130}{-30}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=-32
     \yl@ydiff=72
           \Put@Line(0,0)(0,-1){118}% single bond at 4 alpha (down)
           \putlatom{32}{-190}{\@memberb}% left type
    \else\if\@tmpc b%(e) beta
     \yl@xdiff=-32
     \yl@ydiff=-12
           \Put@Line(0,0)(0,1){118}% single bond at 4 beta (up)
           \putlatom{32}{130}{\@memberb}% left type
    \else\if\@tmpc A% alpha
     \yl@xdiff=10
     \yl@ydiff=60
           \Put@Line(0,0)(-1,-1){120}% single bond at 4
           \putlatom{-130}{-180}{\@memberb}% left type
    \else\if\@tmpc B% beta
     \yl@xdiff=10
     \yl@ydiff=10
           \Put@Line(0,0)(-1,1){120}% single bond at 4
           \putlatom{-130}{110}{\@memberb}% left type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond
     \yl@xdiff=10
     \yl@ydiff=30
           \Put@Line(0,-15)(-1,0){120}% double bond at 4
           \Put@Line(0,15)(-1,0){120}% double bond at 4
           \putlatom{-130}{-30}{\@memberb}% left type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=10\relax
      \yl@ydiff=30\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,0){120}%      % wavy bond at 4
           }%
           \putlatom{-130}{-30}{\@memberb}% left type
     \else%
     \yl@xdiff=10
     \yl@ydiff=30
           \Put@Line(0,0)(-1,0){120}% single bond at 4
           \putlatom{-130}{-30}{\@memberb}% left type
   \fi\fi\fi
 \fi
}%
\def\@pyranbC{%
 \if@clipping%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=5
     \yl@ydiff=5
           \Put@Line(45,45)(1,1){100}% single bond at 6
           \putratom{130}{140}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,-45)(0,-1){73}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,45)(0,1){73}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \else\if\@tmpc A%(A)
     \yl@xdiff=5
     \yl@ydiff=5
           \Put@Line(45,45)(1,1){100}% single bond at 6
           \putratom{130}{140}{\@memberb}% right type
    \else\if\@tmpc B%(B)
     \yl@xdiff=5
     \yl@ydiff=-15
           \Put@Line(-45,45)(-1,1){100}% single bond at 6
           \putlatom{-130}{140}{\@memberb}% left type
    \fi\fi\fi\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=0
     \yl@ydiff=-20
           \Put@Line(45,15)(1,1){100}% double bond at 6
           \Put@Line(15,45)(1,1){100}% double bond at 6
           \putratom{130}{140}{\@memberb}%right type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=5\relax
      \yl@ydiff=5\relax
           {%
           \WaveBonds%
           \Put@Line(40,40)(1,1){90}%      % wavy bond at 6
           }%
           \putratom{130}{130}{\@memberb}% right type
     \else%
     \yl@xdiff=5
     \yl@ydiff=5
           \Put@Line(45,45)(1,1){100}% single bond at 6
           \putratom{130}{140}{\@memberb}% left type
   \fi\fi\fi
 \else
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
     \yl@xdiff=-10
     \yl@ydiff=60
           \Put@Line(0,0)(1,-1){120}% single bond at 6
           \putratom{130}{-180}{\@memberb}% left type
    \else\if\@tmpc a%(a) alpha
     \yl@xdiff=32
     \yl@ydiff=72
           \Put@Line(0,0)(0,-1){118}% single bond alpha (down)
           \putlratom{-32}{-190}{\@memberb}% left & right type
    \else\if\@tmpc b%(b) beta
     \yl@xdiff=32
     \yl@ydiff=-12
           \Put@Line(0,0)(0,1){118}% single bond beta (up)
           \putlratom{-32}{130}{\@memberb}% left & right type
    \fi\fi\fi%\fi\fi%
   \else \if\@tmpb D%double bond: Added by SF 1998/10/25
     \yl@xdiff=0
     \yl@ydiff=-20
           \Put@Line(15,-15)(1,1){120}% double bond at 6
           \Put@Line(0,15)(1,1){120}% double bond at 6
           \putratom{130}{140}{\@memberb}%right type
    \else\if\@tmpb U%(U) alpha undefined
      \yl@xdiff=5\relax
      \yl@ydiff=5\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(1,1){120}%      % wavy bond at 6
           }%
           \putratom{130}{130}{\@memberb}% right type
          \else%
     \yl@xdiff=10
     \yl@ydiff=-20
           \Put@Line(0,0)(1,1){120}% single bond at 6
           \putratom{130}{140}{\@memberb}% right type
   \fi\fi\fi
 \fi
}%
\def\pyranose{\@ifnextchar[{\@pyranose}{\@pyranose[]}}
\def\@pyranose[#1]#2{\sixsugarh[#1]{6==O}{#2}}
\def\pyranosew{\@ifnextchar[{\@pyranosew}{\@pyranosew[]}}
\def\@pyranosew[#1]#2{%
\sixsugarh[#1]{6==O;1s==\WedgeAsSubst(0,0)(-3,-5){120};4s==\WedgeAsSubst(0,0)(3,-5){120};%
3s==\PutBondLine(-17,0)(307,0){2.8pt}}{#2}[abc]}
\def\Pyranose{\@ifnextchar[{\@Pyranose}{\@Pyranose[]}}
\def\@Pyranose[#1]#2{\SixSugarh[#1]{6==O}{#2}}
\def\Pyranosew{\@ifnextchar[{\@Pyranosew}{\@Pyranosew[]}}
\def\@Pyranosew[#1]#2{%
\SixSugarh[#1]{6==O;1s==\WedgeAsSubst(0,0)(-3,-5){153};4s==\WedgeAsSubst(0,0)(3,-5){153};%
3s==\PutBondLine(-17,0)(376,0){2.8pt}}{#2}[abc]}
\def\furanose{\@ifnextchar[{\@furanose}{\@furanose[]}}
\def\@furanose[#1]#2{\fivesugarh[#1]{5==O}{#2}}
\def\furanosew{\@ifnextchar[{\@furanosew}{\@furanosew[]}}
\def\@furanosew[#1]#2{%
\fivesugarh[#1]{5==O;1s==\WedgeAsSubst(0,0)(-3,-5){120};%
4s==\WedgeAsSubst(0,0)(3,-5){120};%
3s==\PutBondLine(-17,0)(307,0){2.8pt}}{#2}[abc]}
\def\Furanose{\@ifnextchar[{\@Furanose}{\@Furanose[]}}
\def\@Furanose[#1]#2{\FiveSugarh[#1]{5==O}{#2}}
\def\Furanosew{\@ifnextchar[{\@Furanosew}{\@Furanosew[]}}
\def\@Furanosew[#1]#2{%
\FiveSugarh[#1]{5==O;1s==\WedgeAsSubst(0,0)(-3,-5){153};%
4s==\WedgeAsSubst(0,0)(3,-5){153};%
3s==\PutBondLine(-17,0)(376,0){2.8pt}}{#2}[abc]}
\def\SixSugarh{\@ifnextchar({\@Six@Sugarh(@}{\@Six@Sugarh(@)}}
\def\@Six@Sugarh(#1){\@ifnextchar[{\@Six@@Sugarh(#1)[@}%
{\@Six@@Sugarh(#1)[@]}}
\def\@Six@@Sugarh(#1)[#2]#3#4{\@ifnextchar[%
{\@SixSugarh(#1)[#2]{#3}{#4}[@}%
{\@SixSugarh(#1)[#2]{#3}{#4}[@]}}
\def\@SixSugarh(#1)[#2]#3#4[#5]{%
\iniatom\iniflag%initialize
\test@vrtx@SixSugarh{#3}%
\@reset@ylsw%
\ylSixSugarhposition{#4}%shift values
\begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(880,800)(-240,-400){SixSugarh}%2002/4/30 by S. Fujita
{\resetbdsw%
\@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
\molfronttrue
\set@skel@Sugarhbond{#1}{a}{a}%
  %bond between 1 and 2 \@aaa -> \Sugarhskbonda etc
\set@skel@Sugarhbond{#1}{b}{b}%
 %bond between 2 and 3 \@bbb -> \Sugarhskbondb etc
\set@skel@Sugarhbond{#1}{c}{c}%
 %bond between 3 and 4 \@ccc -> \Sugarhskbondc etc
\molfrontfalse
\set@skel@Sugarhbond{#1}{d}{d}%
 %bond between 4 and 5 \@ddd -> \Sugarhskbondd etc
\set@skel@Sugarhbond{#1}{e}{e}%
 %bond between 5 and 6 \@eee -> \Sugarhskbonde etc
\set@skel@Sugarhbond{#1}{f}{f}%
 %bond between 6 and 1 \@fff -> \Sugarhskbondf etc
}%
\@tfor\member:=#2\do{%
\if\member r\relax \Sugarhbondd \Sugarhbondf \Sugarhbondb%
\else \if\member l\relax \Sugarhbonda \Sugarhbondc \Sugarhbonde%
\else \if\member a\relax \Sugarhbonda%
\else \if\member b\relax \Sugarhbondb%
\else \if\member c\relax \Sugarhbondc%
\else \if\member d\relax \Sugarhbondd%
\else \if\member e\relax \Sugarhbonde%
\else \if\member f\relax \Sugarhbondf%
\else \if\member A% no action: %%left aromatic circle
\else
  \expandafter\twoCH@@R\member//%
  \set@fusionadd@sixhi
  \ifx\@@tmpa\empty%
   \XyMTeXWarning{Fused function is unavailable for SixSugarh.}\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\iniatom\iniflag%initialize
\set@hetatom@Sugarh{#3}{-3}{0}{5}{1}%               %subst 4--6
\set@hetatom@Sugarh{#3}{3}{3}{7}{1}%              %subst 1 -- 3
\@forsemicol\member:=#4\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%0 omit
 \or\setBScolor{\Put@Direct(668,0){%
  \if@clip \@clippingtrue \else \@clippingfalse\fi
  \@pyrana}}% subst. on 1
 \or\setBScolor{\Put@Direct(513,-255){%
  \if@eclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranb}}% subst. on 2
 \or\setBScolor{\Put@Direct(153,-255){%
  \if@fclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbb}}% subst. on 3
 \or\setBScolor{\Put@Direct(0,0){%
  \if@aclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranc}}% subst. on 4
 \or\setBScolor{\Put@Direct(153,255){%
  \if@bclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbB}}% subst. on 5
 \or\setBScolor{\Put@Direct(513,255){%
  \if@cclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbC}}% subst. on 6
\fi %end of ifcase
\fi\fi}%
\end{ShiftPicEnv}%
\iniatom\iniflag}%     %end of \SixSugarh macro
\def\test@vrtx@SixSugarh#1{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoch@r\@membera{}%
\ifcase\@tmpa%
 \or \if\@tmpb s\relax\def\aaa{}\else\def\aaa{@}\fi
 \or \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
 \or \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
 \or \if\@tmpb s\relax\def\ddd{}\else\def\ddd{@}\fi
 \or \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
 \or \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
\fi\fi}%
}% end of \test@vrtx@SixSugarh
\def\ylSixSugarhposition#1{%
\@@ylswfalse%%%\@reset@ylsw
\@forsemicol\member:=#1\do{%
\if@@ylsw\else
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax
\expandafter\threech@r\@membera{}{}\relax
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifcase\@tmpa%0 omit
 \or\gdef\@ylii{-668}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
 \or\gdef\@ylii{-513}\gdef\@yli{255}\global\@ylswtrue% subst. on 2
 \or\gdef\@ylii{-153}\gdef\@yli{255}\global\@ylswtrue% subst. on 3
 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
 \or\gdef\@ylii{-153}\gdef\@yli{-255}\global\@ylswtrue% subst. on 5
 \or\gdef\@ylii{-513}\gdef\@yli{-255}\global\@ylswtrue% subst. on 6
\fi%end of ifcase
\fi\fi\fi}}%
\newif\ifmolfront \molfrontfalse
\newif\if@fivemembered \@fivememberedfalse
\def\set@skel@Sugarhbond#1#2#3{%
 \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
                               % \if\@aaa #2\relax%OK
  \@skbondlistfalse
  \@tfor\member:=#1\do{%
   \expandafter\twoCH@@R\member//%
    \if\@@tmpa #2\relax%
      \if\@@tmpb A\relax%
        \if@fivemembered
         \expandafter\csname fdothskbond#3\endcsname% \dothskbonda etc.
        \else
         \expandafter\csname dothskbond#3\endcsname% \dothskbonda etc.
        \fi
        \@skbondlisttrue
      \else\if\@@tmpb B\relax%
        {\thicklines
         \if@fivemembered
          \expandafter\csname fSugarhskbond#3\endcsname% \dothskbonda etc.
         \else
          \expandafter\csname Sugarhskbond#3\endcsname% \hskbonda etc.
         \fi
        }%
        \@skbondlisttrue
      \fi\fi
     \fi%
    }%
   \if@skbondlist\else
    \ifmolfront
     {\thicklines
       \if@fivemembered
         \expandafter\csname fSugarhskbond#3\endcsname% \dothskbonda etc.
       \else
         \expandafter\csname Sugarhskbond#3\endcsname% \hskbonda etc.
       \fi
     }%
    \else
     {\thinlines
       \if@fivemembered
         \expandafter\csname fSugarhskbond#3\endcsname% \dothskbonda etc.
       \else
        \expandafter\csname Sugarhskbond#3\endcsname% \hskbonda etc.
       \fi
     }%
    \fi
   \fi%
  \else
    \expandafter\ifx\csname @#2#2#2\endcsname \empty\relax%
                                %    \ifx\@aaa\empty\relax
    \@tfor\member:=#1\do{%
     \expandafter\twoCH@@R\member//%
      \if\@@tmpa #2\relax%
       \XyMTeXWarning{Unavailable bond `#2' in SKBONDLIST}\fi
    }%
  \fi\fi
}% end of \set@skel@Sugarhbond
\def\Sugarhskbonda{%
  \ifx\aaa\empty%
    \ifx\bbb\empty%
     \Put@Line(668,0)(-3,-5){153}%           %bond 1-2
    \else%
     \Put@Line(668,0)(-3,-5){120}%            %bond 1-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(635,-55)(-3,-5){120}%          %bond 1-2
    \else%
     \Put@Line(635,-55)(-3,-5){93}%          %bond 1-2
    \fi\fi}%
\def\Sugarhskbondf{%
  \ifx\aaa\empty%
    \ifx\fff\empty%
     \Put@Line(668,0)(-3,5){153}%           %bond 1-6
    \else%
     \Put@Line(668,0)(-3,5){120}%            %bond 1-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(635,55)(-3,5){120}%          %bond 1-6
    \else%
     \Put@Line(635,55)(-3,5){93}%          %bond 1-6
    \fi\fi}%
\def\Sugarhskbondc{%
  \ifx\ddd\empty%
    \ifx\ccc\empty%
     \Put@Line(0,0)(3,-5){153}%           %bond 4-3
    \else%
     \Put@Line(0,0)(3,-5){120}%            %bond 4-3
    \fi%
   \else%
    \ifx\ccc\empty%
     \Put@Line(33,-55)(3,-5){120}%          %bond 4-3
    \else%
     \Put@Line(33,-55)(3,-5){93}%          %bond 4-3
    \fi\fi}%
\def\Sugarhskbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(0,0)(3,5){153}%           %bond 4-5
    \else%
     \Put@Line(0,0)(3,5){120}%            %bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(33,55)(3,5){120}%          %bond 4-5
    \else%
     \Put@Line(33,55)(3,5){93}%          %bond 4-5
    \fi\fi}%
\def\Sugarhskbondb{%
  \ifx\ccc\empty%
    \ifx\bbb\empty%
     \Put@Line(153,-255)(1,0){360}%           %bond 3-2
    \else%
     \Put@Line(153,-255)(1,0){314}%            %bond 3-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(199,-255)(1,0){314}%          %bond 3-2
    \else%
     \Put@Line(199,-255)(1,0){278}%          %bond 3-2
    \fi\fi}%
\def\Sugarhskbonde{%
  \ifx\eee\empty%
    \ifx\fff\empty%
     \Put@Line(153,255)(1,0){360}%           %bond 5-6
    \else%
     \Put@Line(153,255)(1,0){314}%            %bond 5-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(199,255)(1,0){314}%          %bond 5-6
    \else%
     \Put@Line(199,255)(1,0){278}%          %bond 5-6
    \fi\fi}%

\def\Sugarhbonda{%
  \ifx\aaa\empty%
    \ifx\bbb\empty%
     \Put@Line(605,-22)(-3,-5){100}%           %bond 1-2
    \else%
     \Put@Line(604,-15)(-3,-5){93}%            %bond 1-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(587,-52)(-3,-5){93}%          %bond 1-2
    \else%
     \Put@Line(593,-42)(-3,-5){93}%          %bond 1-2
    \fi\fi}%
\def\Sugarhbondf{%
  \ifx\aaa\empty%
    \ifx\fff\empty%
     \Put@Line(605,22)(-3,5){100}%           %bond 1-6
    \else%
     \Put@Line(604,15)(-3,5){97}%            %bond 1-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(587,52)(-3,5){93}%          %bond 1-6
    \else%
     \Put@Line(593,42)(-3,5){93}%          %bond 1-6
    \fi\fi}%
\def\Sugarhbondc{%
  \ifx\ddd\empty%
    \ifx\ccc\empty%
     \Put@Line(63,-22)(3,-5){100}%           %bond 4-3
    \else%
     \Put@Line(64,-15)(3,-5){97}%            %bond 4-3
    \fi%
   \else%
    \ifx\ccc\empty%
     \Put@Line(81,-52)(3,-5){93}%          %bond 4-3
    \else%
     \Put@Line(75,-42)(3,-5){93}%          %bond 4-3
    \fi\fi}%
\def\Sugarhbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(63,22)(3,5){100}%           %bond 4-5
    \else%
     \Put@Line(64,15)(3,5){97}%            %bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(81,52)(3,5){93}%          %bond 4-5
    \else%
     \Put@Line(75,42)(3,5){93}%          %bond 4-5
    \fi\fi}%
\def\Sugarhbondb{%
  \ifx\ccc\empty%
    \ifx\bbb\empty%
     \Put@Line(183,-205)(1,0){300}%           %bond 3-2
    \else%
     \Put@Line(183,-205)(1,0){275}%            %bond 3-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(203,-205)(1,0){275}%          %bond 3-2
    \else%
     \Put@Line(198,-205)(1,0){270}%          %bond 3-2
    \fi\fi}%
\def\Sugarhbonde{%
  \ifx\eee\empty%
    \ifx\fff\empty%
     \Put@Line(183,205)(1,0){300}%           %bond 5-6
    \else%
     \Put@Line(183,205)(1,0){275}%            %bond 5-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(203,205)(1,0){275}%          %bond 5-6
    \else%
     \Put@Line(198,205)(1,0){270}%          %bond 5-6
    \fi\fi}%
\def\set@hetatom@Sugarh#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoCH@R\@membera//%
\ifnum#5 < 0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa%
\or%position 1
  \if\@tmpb h\relax
     \@acliptrue%
     \putlatom{60}{0}{\@memberb}%  % left type
   \else\if\@tmpb s\relax
     \@aclipfalse%
     \putlatom{0}{0}{\@memberb}%              % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@acliptrue%
     \putlatom{60}{-36}{\@memberb}%              % left type
   \fi\fi\fi
\or%position 2
  \if\@tmpb h\relax
     \@bcliptrue%
     \putlatom{185}{225}{\@memberb}%   % left type
   \else\if\@tmpb s\relax
     \@bclipfalse%
     \putlatom{153}{255}{\@memberb}%   % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@bcliptrue%
     \putlatom{185}{225}{\@memberb}%   % left type
   \fi\fi\fi
\or%position 3
  \if\@tmpb h\relax
     \@ccliptrue%
     \putratom{483}{225}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@cclipfalse%
     \putratom{513}{255}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@ccliptrue%
     \putratom{483}{225}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 4
  \if\@tmpb h\relax
     \@cliptrue%
   \putratom{608}{0}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@clipfalse%
   \putratom{668}{0}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@cliptrue%
   \putratom{608}{-36}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 5
  \if\@tmpb h\relax
     \@ecliptrue%
     \putratom{493}{-225}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@eclipfalse%
     \putratom{513}{-255}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@ecliptrue%
     \putratom{483}{-295}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 6
  \if\@tmpb h\relax
     \@fcliptrue%
     \putlatom{175}{-215}{\@memberb}%  % left type
   \else\if\@tmpb s\relax
     \@fclipfalse%
     \putlatom{153}{-255}{\@memberb}%  % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@fcliptrue%
     \putlatom{185}{-295}{\@memberb}%  % left type
   \fi\fi\fi
\fi% end of ifcase
\fi\fi\fi}}% end of the macro \set@hetatom@Sugarh
\def\sixsugarh{\@ifnextchar({\@six@sugarh(@}{\@six@sugarh(@)}}
\def\@six@sugarh(#1){\@ifnextchar[{\@six@@sugarh(#1)[@}%
{\@six@@sugarh(#1)[@]}}
\def\@six@@sugarh(#1)[#2]#3#4{\@ifnextchar[%
{\@sixsugarh(#1)[#2]{#3}{#4}[@}%
{\@sixsugarh(#1)[#2]{#3}{#4}[@]}}
\def\@sixsugarh(#1)[#2]#3#4[#5]{%
\iniatom\iniflag%initialize
\test@vrtx@SixSugarh{#3}%
\@reset@ylsw%
\ylpyranoseposition{#4}%shift values
\begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(880,800)(-240,-400){sixsugarh}%2002/4/30 by S. Fujita
{\resetbdsw%
\@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
\@fivememberedfalse%not five-membered ring
\molfronttrue%boldfaced lines (thicklines)
\set@skel@sugarhbond{#1}{a}{a}%
  %bond between 1 and 2 \@aaa -> \sugarhskbonda etc
\set@skel@sugarhbond{#1}{b}{b}%
 %bond between 2 and 3 \@bbb -> \sugarhskbondb etc
\set@skel@sugarhbond{#1}{c}{c}%
 %bond between 3 and 4 \@ccc -> \sugarhskbondc etc
\molfrontfalse%normal lines (thinelines)
\set@skel@sugarhbond{#1}{d}{d}%
 %bond between 4 and 5 \@ddd -> \sugarhskbondd etc
\set@skel@sugarhbond{#1}{e}{e}%
 %bond between 5 and 6 \@eee -> \sugarhskbonde etc
\set@skel@sugarhbond{#1}{f}{f}%
 %bond between 6 and 1 \@fff -> \sugarhskbondf etc
}%
\@tfor\member:=#2\do{%
\if\member r\relax \sugarhbondd \sugarhbondf \sugarhbondb%
\else \if\member l\relax \sugarhbonda \sugarhbondc \sugarhbonde%
\else \if\member a\relax \sugarhbonda%
\else \if\member b\relax \sugarhbondb%
\else \if\member c\relax \sugarhbondc%
\else \if\member d\relax \sugarhbondd%
\else \if\member e\relax \sugarhbonde%
\else \if\member f\relax \sugarhbondf%
\else \if\member A% no action: %%left aromatic circle
\else
  \expandafter\twoCH@@R\member//%
  \set@fusionadd@sixhi
  \ifx\@@tmpa\empty%
   \XyMTeXWarning{Fused function is unavailable for sixsugarh.}\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\iniatom\iniflag%initialize
\set@hetatom@sugarh{#3}{-3}{0}{5}{1}%               %subst 4--6
\set@hetatom@sugarh{#3}{3}{3}{7}{1}%              %subst 1 -- 3
\@forsemicol\member:=#4\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%0 omit
 \or\setBScolor{\Put@Direct(532,0){%
  \if@clip \@clippingtrue \else \@clippingfalse\fi
  \@pyrana}}% subst. on 1
 \or\setBScolor{\Put@Direct(412,-200){%
  \if@eclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranb}}% subst. on 2
 \or\setBScolor{\Put@Direct(120,-200){%
  \if@fclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbb}}% subst. on 3
 \or\setBScolor{\Put@Direct(0,0){%
  \if@aclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranc}}% subst. on 4
 \or\setBScolor{\Put@Direct(120,200){%
  \if@bclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbB}}% subst. on 5
 \or\setBScolor{\Put@Direct(412,200){%
  \if@cclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbC}}% subst. on 6
\fi %end of ifcase
\fi\fi}%
\end{ShiftPicEnv}%
\iniatom\iniflag}%     %end of \sixsugarh macro
\def\ylpyranoseposition#1{%
\@@ylswfalse%%%\@reset@ylsw
\@forsemicol\member:=#1\do{%
\if@@ylsw\else
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax
\expandafter\threech@r\@membera{}{}\relax
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifcase\@tmpa%0 omit
 \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
 \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
 \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
 \or\gdef\@ylii{-120}\gdef\@yli{-200}\global\@ylswtrue% subst. on 5
 \or\gdef\@ylii{-412}\gdef\@yli{-200}\global\@ylswtrue% subst. on 6
\fi%end of ifcase
\fi\fi\fi}}%
\def\sixsugarhw{\@ifnextchar[{\@sixsugarhw}{\@sixsugarhw[]}}
\def\@sixsugarhw[#1]#2#3{%
\sixsugarh[#1]{6==O;1s==\WedgeAsSubst(0,0)(-3,-5){120};%
4s==\WedgeAsSubst(0,0)(3,-5){120};%
3s==\PutBondLine(-17,0)(307,0){2.8pt};#2}{#3}[abc]}
\def\set@skel@sugarhbond#1#2#3{%
 \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
                               % \if\@aaa #2\relax%OK
  \@skbondlistfalse
  \@tfor\member:=#1\do{%
   \expandafter\twoCH@@R\member//%
    \if\@@tmpa #2\relax%
      \if\@@tmpb A\relax%
       \if@fivemembered
        \expandafter\csname fdothskbond#3\endcsname% \dothskbonda etc.
       \else
        \expandafter\csname dothskbond#3\endcsname% \dothskbonda etc.
       \fi
        \@skbondlisttrue
      \else\if\@@tmpb B\relax%
        {\thicklines
        \if@fivemembered
         \expandafter\csname fsugarhskbond#3\endcsname% \hskbonda etc.
        \else
         \expandafter\csname sugarhskbond#3\endcsname% \hskbonda etc.
        \fi
        }%
        \@skbondlisttrue
      \fi\fi
     \fi%
    }%
   \if@skbondlist\else
    \ifmolfront
     {\thicklines
      \if@fivemembered
        \expandafter\csname fsugarhskbond#3\endcsname% \hskbonda etc.
      \else
        \expandafter\csname sugarhskbond#3\endcsname% \hskbonda etc.
      \fi
     }%
    \else
     {\thinlines
      \if@fivemembered
        \expandafter\csname fsugarhskbond#3\endcsname% \hskbonda etc
      \else
        \expandafter\csname sugarhskbond#3\endcsname% \hskbonda etc.
      \fi
     }%
    \fi
   \fi%
  \else
    \expandafter\ifx\csname @#2#2#2\endcsname \empty\relax%
                                %    \ifx\@aaa\empty\relax
    \@tfor\member:=#1\do{%
     \expandafter\twoCH@@R\member//%
      \if\@@tmpa #2\relax%
       \XyMTeXWarning{Unavailable bond `#2' in SKBONDLIST}\fi
    }%
  \fi\fi
}% end of \set@skel@sugarhbond
\def\sugarhskbonda{%
  \ifx\aaa\empty%
    \ifx\bbb\empty%
     \Put@Line(532,0)(-3,-5){120}%           %bond 1-2
    \else%
     \Put@Line(532,0)(-3,-5){96}%            %bond 1-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(511,-35)(-3,-5){96}%          %bond 1-2
    \else%
     \Put@Line(511,-35)(-3,-5){80}%          %bond 1-2
    \fi\fi}%
\def\sugarhskbondf{%
  \ifx\aaa\empty%
    \ifx\fff\empty%
     \Put@Line(532,0)(-3,5){120}%           %bond 1-6
    \else%
     \Put@Line(532,0)(-3,5){96}%            %bond 1-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(511,35)(-3,5){96}%          %bond 1-6
    \else%
     \Put@Line(511,35)(-3,5){80}%          %bond 1-6
    \fi\fi}%
\def\sugarhskbondc{%
  \ifx\ddd\empty%
    \ifx\ccc\empty%
     \Put@Line(0,0)(3,-5){120}%           %bond 4-3
    \else%
     \Put@Line(0,0)(3,-5){96}%            %bond 4-3
    \fi%
   \else%
    \ifx\ccc\empty%
     \Put@Line(21,-35)(3,-5){96}%          %bond 4-3
    \else%
     \Put@Line(21,-35)(3,-5){80}%          %bond 4-3
    \fi\fi}%
\def\sugarhskbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(0,0)(3,5){120}%           %bond 4-5
    \else%
     \Put@Line(0,0)(3,5){97}%            %bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(21,35)(3,5){97}%          %bond 4-5
    \else%
     \Put@Line(21,35)(3,5){80}%          %bond 4-5
    \fi\fi}%
\def\sugarhskbondb{%
  \ifx\ccc\empty%
    \ifx\bbb\empty%
     \Put@Line(120,-200)(1,0){292}%           %bond 3-2
    \else%
     \Put@Line(120,-200)(1,0){252}%            %bond 3-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(160,-200)(1,0){252}%          %bond 3-2
    \else%
     \Put@Line(160,-200)(1,0){212}%          %bond 3-2
    \fi\fi}%
\def\sugarhskbonde{%
  \ifx\eee\empty%
    \ifx\fff\empty%
     \Put@Line(120,200)(1,0){292}%           %bond 5-6
    \else%
     \Put@Line(120,200)(1,0){252}%            %bond 5-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(160,200)(1,0){252}%          %bond 5-6
    \else%
     \Put@Line(160,200)(1,0){212}%          %bond 5-6
    \fi\fi}%
\def\set@hetatom@sugarh#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoCH@R\@membera//%
\ifnum#5 < 0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa%
\or%position 1
  \if\@tmpb h\relax
     \@acliptrue%
     \putlatom{60}{0}{\@memberb}%  % left type
   \else\if\@tmpb s\relax
     \@aclipfalse%
     \putlatom{0}{0}{\@memberb}%              % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@acliptrue%
     \putlatom{60}{-36}{\@memberb}%              % left type
   \fi\fi\fi
\or%position 2
  \if\@tmpb h\relax
     \@bcliptrue%
     \putlatom{155}{180}{\@memberb}%   % left type
   \else\if\@tmpb s\relax
     \@bclipfalse%
     \putlatom{120}{200}{\@memberb}%   % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@bcliptrue%
     \putlatom{155}{180}{\@memberb}%   % left type
   \fi\fi\fi
\or%position 3
  \if\@tmpb h\relax
     \@ccliptrue%
     \putratom{382}{180}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@cclipfalse%
     \putratom{412}{200}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@ccliptrue%
     \putratom{382}{180}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 4
  \if\@tmpb h\relax
     \@cliptrue%
   \putratom{472}{0}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@clipfalse%
   \putratom{532}{0}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@cliptrue%
   \putratom{472}{-36}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 5
  \if\@tmpb h\relax
     \@ecliptrue%
     \putratom{382}{-240}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@eclipfalse%
     \putratom{412}{-200}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@ecliptrue%
     \putratom{382}{-240}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 6
  \if\@tmpb h\relax
     \@fcliptrue%
     \putlatom{155}{-240}{\@memberb}%  % left type
   \else\if\@tmpb s\relax
     \@fclipfalse%
     \putlatom{120}{-200}{\@memberb}%  % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@fcliptrue%
     \putlatom{155}{-240}{\@memberb}%  % left type
   \fi\fi\fi
\fi% end of ifcase
\fi\fi\fi}}% end of the macro \set@hetatom@sugarh
\def\sugarhbonda{%
  \ifx\aaa\empty%
    \ifx\bbb\empty%
     \Put@Line(482,-12)(-3,-5){90}%        %double bond 1-2
    \else%
     \Put@Line(482,-12)(-3,-5){80}%        %double bond 1-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(394,-160)(3,5){70}%       %double bond 2-1
    \else%
     \Put@Line(394,-160)(3,5){70}%       %double bond 2-1
    \fi\fi}%
\def\sugarhbondf{%
  \ifx\aaa\empty%
    \ifx\fff\empty%
     \Put@Line(482,12)(-3,5){90}%        %double bond 1-6
    \else%
     \Put@Line(482,12)(-3,5){80}%        %double bond 1-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(394,160)(3,-5){70}%       %double bond 6-1
    \else%
     \Put@Line(394,160)(3,-5){70}%       %double bond 6-1
    \fi\fi}%
\def\sugarhbondc{%
  \ifx\ddd\empty%
    \ifx\ccc\empty%
     \Put@Line(50,-12)(3,-5){90}%        %double bond 4-3
    \else%
     \Put@Line(50,-12)(3,-5){80}%        %double bond 4-3
    \fi%
   \else%
    \ifx\ccc\empty%
     \Put@Line(138,-160)(-3,5){70}%       %double bond 3-4
    \else%
     \Put@Line(138,-160)(-3,5){70}%       %double bond 3-4
    \fi\fi}%
\def\sugarhbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(50,12)(3,5){90}%        %double bond 4-5
    \else%
     \Put@Line(50,12)(3,5){80}%        %double bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(138,160)(-3,-5){70}%       %double bond 5-4
    \else%
     \Put@Line(138,160)(-3,-5){70}%       %double bond 5-4
    \fi\fi}%
\def\sugarhbondb{%
  \ifx\ccc\empty%
    \ifx\bbb\empty%
     \Put@Line(150,-160)(1,0){232}%      %double bond 3-2
    \else%
     \Put@Line(160,-160)(1,0){217}%      %double bond 3-2
    \fi%
   \else%
    \ifx\bbb\empty%
     \Put@Line(170,-160)(1,0){217}%      %double bond 3-2
    \else%
     \Put@Line(170,-160)(1,0){197}%      %double bond 3-2
    \fi\fi}%

\def\sugarhbonde{%
  \ifx\eee\empty%
    \ifx\fff\empty%
     \Put@Line(150,160)(1,0){232}%      %double bond 5-6
    \else%
     \Put@Line(160,160)(1,0){217}%      %double bond 5-6
    \fi%
   \else%
    \ifx\fff\empty%
     \Put@Line(170,160)(1,0){217}%      %double bond 5-6
    \else%
     \Put@Line(170,160)(1,0){197}%      %double bond 5-6
    \fi\fi}%
\def\cyclitol{\@ifnextchar[{\@cyclitol}{\@cyclitol[]}}
\def\@cyclitol[#1]#2{\sixsugarh[#1]{}{#2}}
\def\Cyclitol{\@ifnextchar[{\@Cyclitol}{\@Cyclitol[]}}
\def\@Cyclitol[#1]#2{\SixSugarh[#1]{}{#2}}
\def\fivesugarh{\@ifnextchar({\@five@sugarh(@}{\@five@sugarh(@)}}
\def\@five@sugarh(#1){\@ifnextchar[{\@five@@sugarh(#1)[@}%
{\@five@@sugarh(#1)[@]}}
\def\@five@@sugarh(#1)[#2]#3#4{\@ifnextchar[%
{\@fivesugarh(#1)[#2]{#3}{#4}[@}%
{\@fivesugarh(#1)[#2]{#3}{#4}[@]}}
\def\@fivesugarh(#1)[#2]#3#4[#5]{%
\iniatom\iniflag%initialize
\test@vrtx@SixSugarh{#3}%
\@reset@ylsw%
\ylfuranoseposition{#4}%shift values
\begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(880,800)(-240,-400){fivesugarh}%2002/4/30 by S. Fujita
{\resetbdsw%
\@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
\@fivememberedfalse%common bonds to a six-membered ring
\molfronttrue%boldfaced lines (thicklines)
\set@skel@sugarhbond{#1}{a}{a}%
  %bond between 1 and 2 \@aaa -> \sugarhskbonda etc
\set@skel@sugarhbond{#1}{b}{b}%
 %bond between 2 and 3 \@bbb -> \sugarhskbondb etc
\set@skel@sugarhbond{#1}{c}{c}%
 %bond between 3 and 4 \@ccc -> \sugarhskbondc etc
\@fivememberedtrue%bonds for a five-membered ring
\molfrontfalse%normal lines (thinelines)
\set@skel@sugarhbond{#1}{d}{d}%
 %bond between 4 and 5 \@ddd -> \fsugarhskbondd etc
\set@skel@sugarhbond{#1}{e}{e}%
 %bond between 5 and 1 \@eee -> \fsugarhskbonde etc
}%
\@tfor\member:=#2\do{%
\if\member r\relax %no action \sugarhbondd \sugarhbondf \sugarhbondb%
\else \if\member l\relax %no action \sugarhbonda \sugarhbondc \sugarhbonde%
\else \if\member a\relax \sugarhbonda%
\else \if\member b\relax \sugarhbondb%
\else \if\member c\relax \sugarhbondc%
\else \if\member d\relax \fsugarhbondd%
\else \if\member e\relax \fsugarhbonde%
\else \if\member A% no action: %%left aromatic circle
\else%no action
\fi\fi\fi\fi\fi\fi\fi\fi}%
\iniflag%initialize
\set@hetatom@sugarh{#3}{-3}{0}{2}{1}%       %subst 4
\set@hetatom@sugarh{#3}{3}{3}{7}{1}%        %subst 1 -- 3
\set@hteatom@fivesugarh{#3}%                %subsituent 5
\@forsemicol\member:=#4\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%0 omit
\or\setBScolor{\Put@Direct(532,0){%
  \if@clip \@clippingtrue \else \@clippingfalse\fi
  \@pyrana}}% subst. on 1
 \or\setBScolor{\Put@Direct(412,-200){%
  \if@eclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranb}}% subst. on 2
 \or\setBScolor{\Put@Direct(120,-200){%
  \if@fclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbb}}% subst. on 3
 \or\setBScolor{\Put@Direct(0,0){%
  \if@aclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranc}}% subst. on 4
 \or\setBScolor{\Put@Direct(266,160){%
  %\if@bclip \@clippingtrue \else \@clippingfalse\fi
  %\@pyranbB}}% subst. on 5
  {\if@bclip \@acliptrue \put(0,-386){\@substa}%subst. on 5 bug fix 2013/06/25
    \else \@aclipfalse% subst. on 5 bug fix 2013/06/25
    \put(0,-406){\@substa}\fi}\@aclipfalse}}%%%\@pyranbB}}% subst. on 5 bug fix 2013/06/25
\fi %end of ifcase
\fi\fi}%
\end{ShiftPicEnv}%
\iniatom\iniflag}%     %end of \fivesugarh macro
\def\fivesugarhw{\@ifnextchar[{\@fivesugarhw}{\@fivesugarhw[]}}
\def\@fivesugarhw[#1]#2#3{%
\fivesugarh[#1]{5==O;1s==\WedgeAsSubst(0,0)(-3,-5){120};%
4s==\WedgeAsSubst(0,0)(3,-5){120};%
3s==\PutBondLine(-17,0)(307,0){2.8pt};#2}{#3}[abc]}
\def\ylfuranoseposition#1{%
\@@ylswfalse%%%\@reset@ylsw
\@forsemicol\member:=#1\do{%
\if@@ylsw\else
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax
\expandafter\threech@r\@membera{}{}\relax
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifcase\@tmpa%0 omit
 \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
 \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
 \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
 \or\gdef\@ylii{-266}\gdef\@yli{-160}\global\@ylswtrue% subst. on 5
\fi%end of ifcase
\fi\fi\fi}}%
\def\fsugarhskbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(0,0)(5,3){266}%           %bond 4-5
    \else%
     \Put@Line(0,0)(5,3){231}%            %bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(35,21)(5,3){231}%          %bond 4-5
    \else%
     \Put@Line(35,21)(5,3){200}%          %bond 4-5
    \fi\fi}%
\def\fsugarhskbonde{%
  \ifx\aaa\empty%
    \ifx\eee\empty%
     \Put@Line(532,0)(-5,3){266}%           %bond 5-1
    \else%
     \Put@Line(532,0)(-5,3){231}%            %bond 5-1
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(497,21)(-5,3){231}%          %bond 5-1
    \else%
     \Put@Line(497,21)(-5,3){200}%          %bond 5-1
    \fi\fi}%

\def\set@hteatom@fivesugarh#1{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoCH@R\@membera//%
\@tmpaa=\@tmpa\relax
\ifnum\@tmpaa=5\relax
  \if\@tmpb h\relax
     \@bcliptrue%
     \putratom{236}{130}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@bclipfalse%
     \putratom{266}{160}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@bcliptrue%
     \putratom{236}{130}{\@memberb}% left type
   \fi\fi\fi
\fi% end of ifnum
\fi
}}% end of the macro \set@hetatom@fivesugarh
\def\fsugarhbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(60,-10)(5,3){190}%        %double bond 4-5
    \else%
     \Put@Line(60,-10)(5,3){170}%        %double bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(80,6)(5,3){170}%       %double bond 5-4
    \else%
     \Put@Line(80,6)(5,3){160}%       %double bond 5-4
    \fi\fi}%
\def\fsugarhbonde{%
  \ifx\aaa\empty%
    \ifx\eee\empty%
     \Put@Line(472,-10)(-5,3){190}%        %double bond 5-1
    \else%
     \Put@Line(472,-10)(-5,3){170}%        %double bond 5-1
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(452,6)(-5,3){170}%       %double bond 5-1
    \else%
     \Put@Line(452,6)(-5,3){160}%       %double bond 5-1
    \fi\fi}%
\def\FiveSugarh{\@ifnextchar({\@Five@Sugarh(@}{\@Five@Sugarh(@)}}
\def\@Five@Sugarh(#1){\@ifnextchar[{\@Five@@Sugarh(#1)[@}%
{\@Five@@Sugarh(#1)[@]}}
\def\@Five@@Sugarh(#1)[#2]#3#4{\@ifnextchar[%
{\@FiveSugarh(#1)[#2]{#3}{#4}[@}%
{\@FiveSugarh(#1)[#2]{#3}{#4}[@]}}
\def\@FiveSugarh(#1)[#2]#3#4[#5]{%
\iniatom\iniflag%initialize
\test@vrtx@SixSugarh{#3}%common to six-membered ring
\@reset@ylsw%
\ylFiveSugarhposition{#4}%shift values
\begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(1100,800)(-240,-400){FiveSugarh}%2002/4/30 by S. Fujita
{\resetbdsw%
\@bond@@omit{#5}%%%|\@aaa| etc. are empty if they are omitted.
\molfronttrue
\@fivememberedfalse%common bonds to a six-membered ring
\set@skel@Sugarhbond{#1}{a}{a}%
  %bond between 1 and 2 \@aaa -> \Sugarhskbonda etc
\set@skel@Sugarhbond{#1}{b}{b}%
 %bond between 2 and 3 \@bbb -> \Sugarhskbondb etc
\set@skel@Sugarhbond{#1}{c}{c}%
 %bond between 3 and 4 \@ccc -> \Sugarhskbondc etc
\molfrontfalse
\@fivememberedtrue%only five-membered ring
\set@skel@Sugarhbond{#1}{d}{d}%
 %bond between 4 and 5 \@ddd -> \fSugarhskbondd etc
\set@skel@Sugarhbond{#1}{e}{e}%
 %bond between 5 and 1 \@eee -> \fSugarhskbonde etc
}%
\@tfor\member:=#2\do{%
\if\member r\relax %%% no action \Sugarhbondd \Sugarhbondf \Sugarhbondb%
\else \if\member l\relax %% noaction \Sugarhbonda \Sugarhbondc \Sugarhbonde%
\else \if\member a\relax \Sugarhbonda%
\else \if\member b\relax \Sugarhbondb%
\else \if\member c\relax \Sugarhbondc%
\else \if\member d\relax \fSugarhbondd%
\else \if\member e\relax \fSugarhbonde%
\else \if\member A% no action: %%left aromatic circle
\fi\fi\fi\fi\fi\fi\fi\fi}%
\iniatom\iniflag%initialize
\set@hetatom@Sugarh{#3}{-3}{0}{2}{1}%               %subst 4
\set@hetatom@Sugarh{#3}{3}{3}{7}{1}%              %subst 1 -- 3
\set@hteatom@FiveSugarh{#3}%                      %subst 5
\@forsemicol\member:=#4\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%0 omit
 \or\setBScolor{\Put@Direct(668,0){%
  \if@clip \@clippingtrue \else \@clippingfalse\fi
  \@pyrana}}% subst. on 1
 \or\setBScolor{\Put@Direct(513,-255){%
  \if@eclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranb}}% subst. on 2
 \or\setBScolor{\Put@Direct(153,-255){%
  \if@fclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbb}}% subst. on 3
 \or\setBScolor{\Put@Direct(0,0){%
  \if@aclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranc}}% subst. on 4
 \or\setBScolor{\Put@Direct(333,200){%
  \if@bclip \@clippingtrue \else \@clippingfalse\fi
  \@pyranbB}}% subst. on 5
\fi %end of ifcase
\fi\fi}%
\end{ShiftPicEnv}%
\iniatom\iniflag}%     %end of \FiveSugarh macro
\def\ylFiveSugarhposition#1{%
\@@ylswfalse%%%\@reset@ylsw
\@forsemicol\member:=#1\do{%
\if@@ylsw\else
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax
\expandafter\threech@r\@membera{}{}\relax
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifcase\@tmpa%0 omit
 \or\gdef\@ylii{-668}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
 \or\gdef\@ylii{-513}\gdef\@yli{255}\global\@ylswtrue% subst. on 2
 \or\gdef\@ylii{-153}\gdef\@yli{255}\global\@ylswtrue% subst. on 3
 \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
 \or\gdef\@ylii{-333}\gdef\@yli{-200}\global\@ylswtrue% subst. on 5
\fi%end of ifcase
\fi\fi\fi}}%
\def\fSugarhskbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(0,0)(5,3){333}%           %bond 4-5
    \else%
     \Put@Line(0,0)(5,3){298}%            %bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(35,21)(5,3){298}%          %bond 4-5
    \else%
     \Put@Line(35,21)(5,3){263}%          %bond 4-5
    \fi\fi}%
\def\fSugarhskbonde{%
  \ifx\aaa\empty%
    \ifx\eee\empty%
     \Put@Line(668,0)(-5,3){333}%           %bond 5-1
    \else%
     \Put@Line(668,0)(-5,3){298}%            %bond 5-1
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(633,21)(-5,3){298}%          %bond 5-1
    \else%
     \Put@Line(633,21)(-5,3){263}%          %bond 5-1
    \fi\fi}%

\def\set@hteatom@FiveSugarh#1{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoCH@R\@membera//%
\@tmpaa=\@tmpa\relax
\ifnum\@tmpaa=5\relax
  \if\@tmpb h\relax
     \@bcliptrue%
     \putratom{303}{170}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@bclipfalse%
     \putratom{333}{200}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@bcliptrue%
     \putratom{303}{170}{\@memberb}% left type
   \fi\fi\fi
\fi% end of ifnum
\fi
}}% end of the macro \set@hetatom@FiveSugarh
\def\fSugarhbondd{%
  \ifx\ddd\empty%
    \ifx\eee\empty%
     \Put@Line(60,-10)(5,3){257}%        %double bond 4-5
    \else%
     \Put@Line(60,-10)(5,3){237}%        %double bond 4-5
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(80,6)(5,3){237}%       %double bond 5-4
    \else%
     \Put@Line(80,6)(5,3){227}%       %double bond 5-4
    \fi\fi}%
\def\fSugarhbonde{%
  \ifx\aaa\empty%
    \ifx\eee\empty%
     \Put@Line(608,-10)(-5,3){257}%        %double bond 5-1
    \else%
     \Put@Line(608,-10)(-5,3){237}%        %double bond 5-1
    \fi%
   \else%
    \ifx\eee\empty%
     \Put@Line(588,6)(-5,3){237}%       %double bond 5-1
    \else%
     \Put@Line(588,6)(-5,3){227}%       %double bond 5-1
    \fi\fi}%
\endinput
%%
%% End of file `hcycle.sty'.
