% carom.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
\typeout{       -- Released December 1, 1993 by Shinsaku Fujita}
\typeout{}
% Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
%
% This file is a part of the macro package ``XyMTeX'' which has been 
% designed for typesetting chemical structural formulas.
%
% This file is to be contained in the ``xymtex'' directory which is 
% an input directory for TeX. It is a LaTeX optional style file and 
% should be used only within LaTeX, because several macros of the file 
% are based on LaTeX commands. 
%
% For the review of XyMTeX, see
%  (1)  Shinsaku Fujita, ``Typesetting structural formulas with the text
%    formatter TeX/LaTeX'', Computers and Chemistry, in press.    
% The following book deals with an application of TeX/LaTeX to 
% preparation of manuscripts of chemical fields:
%  (2)  Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' 
%    Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].  
%
% Copying of this file is authorized only if either
%  (1) you make absolutely no changes to your copy, including name and 
%     directory name; or
%  (2) if you do make changes, 
%     (a) you name it something other than the names included in the 
%         ``xymtex'' directory and 
%     (b) you are requested to leave this notice intact.
% This restriction ensures that all standard styles are identical.
%
% Please report any bugs, comments, suggestions, etc. to:
%   Shinsaku Fujita, 
%   Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., 
%   Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{carom}
\def\versi@ndate{December 01, 1993}
\def\versi@nno{ver1.00}
\def\copyrighth@lder{SF} % Shinsaku Fujita
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>\space%
 [\copyrighth@lder]}
%
% *******************************
% * carom.sty: list of commands *
% *******************************
%
%   <VERTICAL TYPE>
%
%     \cyclohexanev               \@cyclohexanev
%     \bzdrv                      \@bzdrv
%     \decalinev                  \@decalinev
%     \naphdrv                    \@naphdrv
%     \tetralinev                 \@tetralinev
%     \hanthracenev               \@hanthracenev
%     \anthracenev                \@anthracenev
%     \hphenanthrenev             \@hphenanthrenev
%     \phenanthrenev              \@phenanthrenev
%     \steroid                    \@steroid
%     \steroidchain               \@steroidchain
%
%   <HORIZONTAL TYPE>
%
%     \cyclohexaneh               \@cyclohexaneh
%     \bzdrh                      \@bzdrh
%     \decalineh                  \@decalineh
%     \naphdrh                    \@naphdrh
%     \tetralineh                 \@tetralineh
%
% *************************
% * input of basic macros *
% *************************
\@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
\unitlength=0.1pt
% ***************************
% * cyclohexane derivatives *
% *  (vertical type)        *
% ***************************
% The following numbering is adopted in this macro. 
%
%          1
%          * 
%     6  *   *  2
%       |     |
%       |     |
%     5  *   *  3
%          *
%          4 <===== the original point
%
%   \cyclohexanev[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none       :  cyclohexane
%           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 
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specifed) single bond at n-atom
%
%       e.g. 
%        
%        \cyclohexanev{1==Cl;2==F}
%        \cyclohexanev[c]{1==Cl;4==F;2==CH$_{3}$}
%        \cyclohexanev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\cyclohexanev{\@ifnextchar[{\@cyclohexanev}{\@cyclohexanev[r]}}
\def\@cyclohexanev[#1]#2{%
 \begin{picture}(800,880)(-\shiftii,-\shifti)
  \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
           \put(-\noshift,-\noshift){\circle{50}}% 
   \typeout{command `cyclohexanev' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  \put(0,406){\line(-5,-3){171}}%       %bond 1-6     8-7
  \put(0,406){\line(5,-3){171}}%        %bond 1-2     8-8a
  \put(0,0){\line(-5,3){171}}%          %bond 4-5     5-6
  \put(0,0){\line(5,3){171}}%           %bond 4-3     5-4a
  \put(171,103){\line(0,1){200}}%       %bond 3-2     4a-8a
  \put(-171,103){\line(0,1){200}}%      %bond 5-6     6-7
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \put(6,364){\line(5,-3){126}}%        %double bond 1-2    8-8a 
\else\if\member b%
  \put(138,129){\line(0,1){148}}%       %double bond 3-2    4a-8a
\else\if\member c%
  \put(6,42){\line(5,3){126}}%          %double bond 4-3    5-4a
\else\if\member d%
  \put(-6,42){\line(-5,3){126}}%        %double bond 4-5    5-6
\else\if\member e%
  \put(-138,129){\line(0,1){148}}%      %double bond 5-6    6-7
\else\if\member f%
  \put(-6,364){\line(-5,-3){126}}%      %double bond 1-6    8-7
\else\if\member A%left aromatic circle 
  \put(0,203){\circle{240}}            %circle
\fi\fi\fi\fi\fi\fi\fi\fi}
%%
\setsixringv{#2}{0}{0}{7}{0}
\end{picture}}               %end of \cyclohexanev macro
%
% ***************************
% * cyclohexane derivatives *
% *  (horizontal type)      *
% ***************************
% The following numbering is adopted in this macro. 
%
%                                2      3
%                                 -----
%                               *       *
%   the original point ===> 1 *           * 4
%          (0,0)                *       *
%                                 -----
%                                6      5
%
%   \cyclohexaneh[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none       :  cyclohexane
%           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 
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specifed) single bond at n-atom
%
%       e.g. 
%        
%        \cyclohexaneh{1==Cl;2==F}
%        \cyclohexaneh[c]{1==Cl;4==F;2==CH$_{3}$}
%        \cyclohexaneh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\cyclohexaneh{\@ifnextchar[{\@cyclohexaneh}{\@cyclohexaneh[r]}}
\def\@cyclohexaneh[#1]#2{%
 \begin{picture}(880,800)(-\shifti,-\shiftii)
  \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
           \put(-\noshift,-\noshift){\circle{50}}% 
   \typeout{command `cyclohexaneh' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  \put(0,0){\line(3,5){103}}%           %bond 1-2
  \put(0,0){\line(3,-5){103}}%          %bond 1-6
  \put(406,0){\line(-3,5){103}}%        %bond 4-3
  \put(406,0){\line(-3,-5){103}}%       %bond 4-3
  \put(103,171){\line(1,0){200}}%       %bond 2-3
  \put(103,-171){\line(1,0){200}}%      %bond 6-5
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \put(42,6){\line(3,5){78}}%           %double bond 1-2
\else\if\member b%
  \put(129,138){\line(1,0){148}}%       %double bond 2-3
\else\if\member c%
  \put(364,6){\line(-3,5){78}}%         %double bond 4-3
\else\if\member d%
  \put(364,-6){\line(-3,-5){78}}%       %double bond 4-5
\else\if\member e%
  \put(129,-138){\line(1,0){148}}%      %double bond 6-5
\else\if\member f%
  \put(42,-6){\line(3,-5){78}}%         %double bond 1-6
\else\if\member A%left aromatic circle 
  \put(203,0){\circle{240}}%            %circle
\fi\fi\fi\fi\fi\fi\fi\fi}%
%%
\setsixringh{#2}{0}{0}{7}{0}%
\end{picture}}%               %end of \cyclohexaneh macro
%
% ****************************************
% * benzene and benzoquinone derivatives *
% *  (vertical type)                     *
% ****************************************
%
%   \bzdrv[OPT]{SUBSLIST}          
%
%     OPT: (bond pattern)
%
%           none  or r :  right-handed set of double bonds 
%           l          :  left-handed set of double bonds 
%           c          :  aromatic circle
%
%           p or pa    :  p-quinone (A)
%           pb         :  p-quinone (B)
%           pc         :  p-quinone (C)
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
%
%     SUBSLIST: list of substituents (max 6 substituents)
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%       e.g. 
%        \bzdrv{1==Cl;2==F}
%        \bzdrv[c]{1==Cl;4==F;2==CH$_{3}$}
%        \bzdrv[pa]{1D==O;4D==O;2==CH$_{3}$}
%
\def\bzdrv{\@ifnextchar[{\@bzdrv}{\@bzdrv[r]}}
\def\@bzdrv[#1]#2{%
\iforigpt \typeout{command `bzdrv' is based on `cyclohexanev'.}\fi%
\expandafter\twoch@r#1{}%
%\begin{picture}(800,880)(-\noshift,-\noshift)
\if\@tmpa r% right-handed set of double bonds
  \cyclohexanev[bdf]{#2}%
\else\if\@tmpa l%left-handed set of double bonds
  \cyclohexanev[ace]{#2}%
\else\if\@tmpa c%aromatic circle
  \cyclohexanev[A]{#2}%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \cyclohexanev[be]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \cyclohexanev[be]{#2}%
 \else\if\@tmpb b% (B)
  \cyclohexanev[cf]{#2}%
 \else\if\@tmpb c% (C)
  \cyclohexanev[ad]{#2}%
 \fi\fi\fi\fi%
\else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
   \cyclohexanev[ce]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \cyclohexanev[ce]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \cyclohexanev[df]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \cyclohexanev[ae]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \cyclohexanev[bf]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \cyclohexanev[ac]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \cyclohexanev[bd]{#2}%
  \fi\fi\fi\fi\fi\fi\fi%
\fi\fi\fi\fi\fi%
%\end{picture}
}               %end of \bzdrv macro
%
% ****************************************
% * benzene and benzoquinone derivatives *
% *  (horizontal type)                   *
% ****************************************
%
%   \bzdrh[OPT]{SUBSLIST}          
%
%     OPT: (bond pattern)
%
%           none  or r :  right-handed set of double bonds 
%           l          :  left-handed set of double bonds 
%           c          :  aromatic circle
%
%           p or pa    :  p-quinone (A)
%           pb         :  p-quinone (B)
%           pc         :  p-quinone (C)
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
%
%     SUBSLIST: list of substituents (max 6 substituents)
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%       e.g. 
%        \bzdrh{1==Cl;2==F}
%        \bzdrh[c]{1==Cl;4==F;2==CH$_{3}$}
%        \bzdrh[pa]{1D==O;4D==O;2==CH$_{3}$}
%
\def\bzdrh{\@ifnextchar[{\@bzdrh}{\@bzdrh[r]}}
\def\@bzdrh[#1]#2{%
\iforigpt \typeout{command `bzdrh' is based on `cyclohexaneh'.}\fi%
\expandafter\twoch@r#1{}%
%\begin{picture}(800,880)(-\noshift,-\noshift)
\if\@tmpa r% right-handed set of double bonds
  \cyclohexaneh[bdf]{#2}%
\else\if\@tmpa l%left-handed set of double bonds
  \cyclohexaneh[ace]{#2}%
\else\if\@tmpa c%aromatic circle
  \cyclohexaneh[A]{#2}%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \cyclohexaneh[be]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \cyclohexaneh[be]{#2}%
 \else\if\@tmpb b% (B)
  \cyclohexaneh[cf]{#2}%
 \else\if\@tmpb c% (C)
  \cyclohexaneh[ad]{#2}%
 \fi\fi\fi\fi%
\else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
   \cyclohexaneh[ce]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \cyclohexaneh[ce]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \cyclohexaneh[df]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \cyclohexaneh[ae]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \cyclohexaneh[bf]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \cyclohexaneh[ac]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \cyclohexaneh[bd]{#2}%
  \fi\fi\fi\fi\fi\fi\fi%
\fi\fi\fi\fi\fi%
%\end{picture}
}               %end of \bzdrh macro
%
% ************************
% * decaline derivatives *
% *  (vertical type)     *
% ************************
% The following numbering is adopted in this macro. 
%
%          8 (0G)1
%          *  8a *
%     7  *   * *   *  2
%       |     |     |
%       |     |     |
%     6  *   * *   *  3
%          *  4a *
%          5 (0F)4
%          ^
%          |
%          the original point
%
%   \decalinev[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none       :  decaline
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  5,4a-double bond
%           f          :  5,6-double bond
%           g          :  6,7-double bond
%           h          :  8,7-double bond
%           i          :  8,8a-double bond
%           j          :  1,8a-double bond
%           k          :  4a,8a-double bond
%           A          :  left aromatic circle 
%           B          :  right aromatic circle 
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%        for 0 (fused positions)
%
%           0FA        :  alpha single bond at 8a 
%           0FB        :  beta single bond at 8a
%           0FU        :  unspecified single bond at 8a
%           0GA        :  alpha single bond at 4a 
%           0GB        :  beta single bond at 4a
%           0GU        :  unspecified single bond at 4a
%
%       e.g. 
%        
%        \decalinev{1==Cl;2==F;0FA==;0GA==}
%        \decalinev[c]{1==Cl;4==F;2==CH$_{3}$}
%        \decalinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\decalinev{\@ifnextchar[{\@decalinev}{\@decalinev[r]}}
\def\@decalinev[#1]#2{%
 \begin{picture}(1200,880)(-\shiftii,-\shifti)
  \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
           \put(-\noshift,-\noshift){\circle{50}}% 
   \typeout{command `decalinev' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  \put(0,406){\line(-5,-3){171}}%       %bond 8-7     1-6
  \put(0,406){\line(5,-3){171}}%        %bond 8-8a    1-2
  \put(0,0){\line(-5,3){171}}%          %bond 5-6     4-5
  \put(0,0){\line(5,3){171}}%           %bond 5-4a    4-3
  \put(171,103){\line(0,1){200}}%       %bond 4a-8a   3-2
  \put(-171,103){\line(0,1){200}}%      %bond 5-7     5-6
  \put(342,406){\line(-5,-3){171}}%     %bond 1-8a    1-6
  \put(342,406){\line(5,-3){171}}%      %bond 1-2     1-2
  \put(342,0){\line(-5,3){171}}%        %bond 4-4a    4-5
  \put(342,0){\line(5,3){171}}%         %bond 4-3     4-3
  \put(513,103){\line(0,1){200}}%       %bond 3-2     3-2
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \put(348,364){\line(5,-3){126}}%      %double bond 1-2
\else\if\member b%
  \put(482,129){\line(0,1){148}}%       %double bond 3-2
\else\if\member c%
  \put(348,42){\line(5,3){126}}%        %double bond 4-3
\else\if\member d%
  \put(348,42){\line(-5,3){126}}%       %double bond 4-4a
\else\if\member e%
  \put(6,42){\line(5,3){126}}%          %double bond 5-4a
\else\if\member f%
  \put(-6,42){\line(-5,3){126}}%        %double bond 5-6   4-5
\else\if\member g%
  \put(-138,129){\line(0,1){148}}%      %double bond 6-7
\else\if\member h%
  \put(-6,364){\line(-5,-3){126}}%      %double bond 8-7   1-6
\else\if\member i%
  \put(6,364){\line(5,-3){126}}%        %double bond 8-8a   
\else\if\member j%
  \put(348,364){\line(-5,-3){126}}%     %double bond 1-8a
\else\if\member k%
  \put(138,129){\line(0,1){148}}%       %double bond 4a-8a 3-2
\else\if\member A%left aromatic circle 
  \put(0,203){\circle{240}}%            %circle
\else\if\member B%right aromatic circle 
  \put(342,203){\circle{240}}%          %circle
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
%%
\setdecaringv{#2}{0}{-1}{9}{0}%
\end{picture}}%               %end of \decalinev macro
%
% ************************
% * decaline derivatives *
% *  (horizontal type)   *
% ************************
% The following numbering is adopted in this macro. 
%
%                                2      3
%                                 -----
%                               *       *
%                           1  *          * 4
%                               *       *
%                        8a (0G)  -----  4a (0F)
%                               *       *
%   the original point ===> 8 *           * 5
%          (0,0)                *       *
%                                 -----
%                                7      6
%
%   \decalineh[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none       :  decaline
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  5,4a-double bond
%           f          :  5,6-double bond
%           g          :  6,7-double bond
%           h          :  8,7-double bond
%           i          :  8,8a-double bond
%           j          :  1,8a-double bond
%           k          :  4a,8a-double bond
%           A          :  left aromatic circle 
%           B          :  right aromatic circle 
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%        for 0 (fused positions)
%
%           0FA        :  alpha single bond at 8a 
%           0FB        :  beta single bond at 8a
%           0FU        :  unspecified single bond at 8a
%           0GA        :  alpha single bond at 4a 
%           0GB        :  beta single bond at 4a
%           0GU        :  unspecified single bond at 4a
%
%       e.g. 
%        
%        \decalineh{1==Cl;2==F;0FA==;0GA==}
%        \decalineh[c]{1==Cl;4==F;2==CH$_{3}$}
%        \decalineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\decalineh{\@ifnextchar[{\@decalineh}{\@decalineh[r]}}
\def\@decalineh[#1]#2{%
 \begin{picture}(880,1200)(-\shifti,-\shiftii)
  \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
           \put(\noshift,\noshift){\circle{50}}% 
   \typeout{command `decalineh' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  \put(0,0){\line(3,5){103}}%            %bond 8-8a
  \put(0,0){\line(3,-5){103}}%          %bond 8-7
  \put(406,0){\line(-3,5){103}}%        %bond 4a-5
  \put(406,0){\line(-3,-5){103}}%       %bond 5-6
  \put(103,171){\line(1,0){200}}%       %bond 4a-8a
  \put(103,-171){\line(1,0){200}}%      %bond 7-8
  \put(0,342){\line(3,5){103}}%         %bond 1-2
  \put(0,342){\line(3,-5){103}}%        %bond 1-6
  \put(406,342){\line(-3,5){103}}%      %bond 4-3
  \put(406,342){\line(-3,-5){103}}%     %bond 4-4a
  \put(103,513){\line(1,0){200}}%       %bond 2-3
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \put(42,348){\line(3,5){78}}%         %double bond 1-2
\else\if\member b%
  \put(129,480){\line(1,0){148}}%       %double bond 2-3
\else\if\member c%
  \put(364,348){\line(-3,5){78}}%       %double bond 4-3
\else\if\member d%
  \put(364,348){\line(-3,-5){78}}%      %double bond 4-4a
\else\if\member e%
  \put(364,6){\line(-3,5){78}}%         %double bond 4a-5
\else\if\member f%
  \put(364,-6){\line(-3,-5){78}}%       %double bond 5-6
\else\if\member g%
  \put(129,-138){\line(1,0){148}}%      %double bond 6-7
\else\if\member h%
  \put(42,-6){\line(3,-5){78}}%         %double bond 7-8
\else\if\member i%
  \put(42,6){\line(3,5){78}}%           %double bond 8-9a
\else\if\member j%
  \put(42,348){\line(3,-5){78}}%        %double bond 1-8a
\else\if\member k%
  \put(129,138){\line(1,0){148}}%       %double bond 8a-4a
\else\if\member A%left aromatic circle 
  \put(203,0){\circle{240}}%            %circle
\else\if\member B%right aromatic circle 
  \put(203,342){\circle{240}}%          %circle
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
%%
\put(0,0){\setsixringh{#2}{-7}{0}{2}{0}}% for 8
\put(0,0){\setsixringh{#2}{-1}{3}{7}{0}}% for 5 to 7
\put(0,342){\setsixringh{#2}{0}{0}{5}{0}}% for 1 to 4
\put(0,0){\setfusedbond{#2}{3}{2}{4}{0}}% for 4a and 8a
\end{picture}}%               %end of \decalineh macro
%
% **********************************************
% * naphthalene and naphthoquinone derivatives *
% *  (vertical type)                           *
% **********************************************
%
%   \naphdrv[OPT]{SUBSLIST}          
%
%     OPT (bond pattern)
%
%           none       :  naphthalene
%           A          :  aromatic circle
%
%           p or pa    :  1,4-quinone (A) left aromatic, right quinone
%           pb         :  1,4-quinone (B) right aromatic, left quinone
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
%
%           q or qa    :  2,6-quinone (A)
%           qb         :  2,6-quinone (B)  3,7
%           qc         :  1,5-quinone (C)
%           qd         :  1,5-quinone (D)  4,8
%           qe         :  1,7-quinone (E)
%           qf         :  1,7-quinone (F)  2,8
%           qg         :  1,7-quinone (G)  4,6
%           qh         :  1,7-quinone (H)  3,5
%
%           P or Pa    :  1,4,5,8-quinone (A)
%           Pb         :  1,2,5,8-quinone (B)
%
%           Q          :  1,2,3,4-quinone
%
%           O or Oa    :  1,2,5,6-quinone (A)
%           Ob         :  1,2,7,8-quinone (B)
%           Oc         :  1,2,3,5-quinone (C)
%           Od         :  1,2,3,7-quinone (D)
%
%     SUBSLIST: list of substituents (max 8 substituents)
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%       e.g. 
%        \naphdrv{1==Cl;2==F}
%        \naphdrv[A]{1==Cl;4==F;2==CH$_{3}$}
%
\def\naphdrv{\@ifnextchar[{\@naphdrv}{\@naphdrv[r]}}
\def\@naphdrv[#1]#2{%
\iforigpt \typeout{command `naphdrv' is based on `decalinev'.}\fi%
 \expandafter\threech@r#1{}{}%
\if\@tmpa r% right-handed set of double bonds
  \decalinev[acfhk]{#2}%
\else\if\@tmpa A%aromatic circle
  \decalinev[AB]{#2}%
%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \decalinev[bfhk]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \decalinev[bfhk]{#2}%
 \else\if\@tmpb b% (B)
  \decalinev[acgk]{#2}%
 \fi\fi\fi%
\else%
 \if\@tmpa o%o-quinone
  \if\@tmpb a% (A)
   \decalinev[cfhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \decalinev[cfhk]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \decalinev[dfhj]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \decalinev[afhk]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \decalinev[achk]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \decalinev[acei]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \decalinev[acfk]{#2}%
  \fi\fi\fi\fi\fi\fi%
  \fi%
%%%
\else\if\@tmpa q%various quinone
  \if\@tmpb a% (A)2,6-type
   \decalinev[cehj]{#2}%
  \else\ifx\@tmpb\empty% (A)2,6-type
   \decalinev[cehj]{#2}%
  \else\if\@tmpb b%2,6-quinone (B)
   \decalinev[adfi]{#2}%
  \else\if\@tmpb c%1,5-quinone (C)
   \decalinev[bdgi]{#2}%
  \else\if\@tmpb d%1,5-quinone (D)
   \decalinev[begj]{#2}%
  \else\if\@tmpb e%1,7-quinone (E)
   \decalinev[bdfi]{#2}%
  \else\if\@tmpb f%1,7-quinone (F)
   \decalinev[cegj]{#2}%
  \else\if\@tmpb g%1,7-quinone (G)
   \decalinev[behj]{#2}%
  \else\if\@tmpb h%1,7-quinone (H)
   \decalinev[adgi]{#2}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if\@tmpa P%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,4,5,8-type
   \decalinev[bgk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,4,5,8-type
   \decalinev[bgk]{#2}%
  \else\if\@tmpb b% (B)1,2,5,8-type
   \decalinev[cgk]{#2}%
  \fi\fi\fi%
\else\if\@tmpa Q%1,2,3,4
   \decalinev[fhk]{#2}%
\else\if\@tmpa O%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,2,5,6-type
   \decalinev[chk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,2,5,6-type
   \decalinev[chk]{#2}%
  \else\if\@tmpb b% (B)1,2,7,8-type
   \decalinev[cfk]{#2}%
  \else\if\@tmpb c% (C)1,2,3,5-type
   \decalinev[dgi]{#2}%
  \else\if\@tmpb d% (D)1,2,3,7-type
   \decalinev[dfi]{#2}%
  \fi\fi\fi\fi\fi%
\fi\fi\fi\fi\fi\fi\fi\fi%
}%               %end of \naphdrv macro
%
% **********************************************
% * naphthalene and naphthoquinone derivatives *
% *  (horizontal type)                         *
% **********************************************
%
%   \naphdrh[OPT]{SUBSLIST}          
%
%     OPT (bond pattern)
%
%           none       :  naphthalene
%           A          :  aromatic circle
%
%           p or pa    :  1,4-quinone (A) left aromatic, right quinone
%           pb         :  1,4-quinone (B) right aromatic, left quinone
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
%
%           q or qa    :  2,6-quinone (A)
%           qb         :  2,6-quinone (B)  3,7
%           qc         :  1,5-quinone (C)
%           qd         :  1,5-quinone (D)  4,8
%           qe         :  1,7-quinone (E)
%           qf         :  1,7-quinone (F)  2,8
%           qg         :  1,7-quinone (G)  4,6
%           qh         :  1,7-quinone (H)  3,5
%
%           P or Pa    :  1,4,5,8-quinone (A)
%           Pb         :  1,2,5,8-quinone (B)
%
%           Q          :  1,2,3,4-quinone
%
%           O or Oa    :  1,2,5,6-quinone (A)
%           Ob         :  1,2,7,8-quinone (B)
%           Oc         :  1,2,3,5-quinone (C)
%           Od         :  1,2,3,7-quinone (D)
%
%     SUBSLIST: list of substituents (max 8 substituents)
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%       e.g. 
%        \naphdrh{1==Cl;2==F}
%        \naphdrh[A]{1==Cl;4==F;2==CH$_{3}$}
%
\def\naphdrh{\@ifnextchar[{\@naphdrh}{\@naphdrh[r]}}
\def\@naphdrh[#1]#2{%
\iforigpt \typeout{command `nathdrh' is based on `decalineh'.}\fi%
 \expandafter\threech@r#1{}{}%
\if\@tmpa r% right-handed set of double bonds
  \decalineh[acfhk]{#2}%
\else\if\@tmpa A%aromatic circle
  \decalineh[AB]{#2}%
%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \decalineh[bfhk]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \decalineh[bfhk]{#2}%
 \else\if\@tmpb b% (B)
  \decalineh[acgk]{#2}%
 \fi\fi\fi%
\else%
 \if\@tmpa o%o-quinone
  \if\@tmpb a% (A)
   \decalineh[cfhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \decalineh[cfhk]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \decalineh[dfhj]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \decalineh[afhk]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \decalineh[achk]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \decalineh[acei]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \decalineh[acfk]{#2}%
  \fi\fi\fi\fi\fi\fi%
  \fi%
%%%
\else\if\@tmpa q%various quinone
  \if\@tmpb a% (A)2,6-type
   \decalineh[cehj]{#2}%
  \else\ifx\@tmpb\empty% (A)2,6-type
   \decalineh[cehj]{#2}%
  \else\if\@tmpb b%2,6-quinone (B)
   \decalineh[adfi]{#2}%
  \else\if\@tmpb c%1,5-quinone (C)
   \decalineh[bdgi]{#2}%
  \else\if\@tmpb d%1,5-quinone (D)
   \decalineh[begj]{#2}%
  \else\if\@tmpb e%1,7-quinone (E)
   \decalineh[bdfi]{#2}%
  \else\if\@tmpb f%1,7-quinone (F)
   \decalineh[cegj]{#2}%
  \else\if\@tmpb g%1,7-quinone (G)
   \decalineh[behj]{#2}%
  \else\if\@tmpb h%1,7-quinone (H)
   \decalineh[adgi]{#2}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if\@tmpa P%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,4,5,8-type
   \decalineh[bgk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,4,5,8-type
   \decalineh[bgk]{#2}%
  \else\if\@tmpb b% (B)1,2,5,8-type
   \decalineh[cgk]{#2}%
  \fi\fi\fi%
\else\if\@tmpa Q%1,2,3,4
   \decalineh[fhk]{#2}%
\else\if\@tmpa O%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,2,5,6-type
   \decalineh[chk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,2,5,6-type
   \decalineh[chk]{#2}%
  \else\if\@tmpb b% (B)1,2,7,8-type
   \decalineh[cfk]{#2}%
  \else\if\@tmpb c% (C)1,2,3,5-type
   \decalineh[dgi]{#2}%
  \else\if\@tmpb d% (D)1,2,3,7-type
   \decalineh[dfi]{#2}%
  \fi\fi\fi\fi\fi%
\fi\fi\fi\fi\fi\fi\fi\fi%
}%               %end of \naphdrh macro
%
% *************************
% * tetraline derivatives *
% *  (vertical type)      *
% *************************
%
%   \tetralinev[OPT]{SUBSLIST}          
%
%     OPT = none       :  tetraline
%           A          :  aromatic circle
%
%           e or ea    :  1,2-double bond
%           eb         :  2,3-double bond
%           ec         :  3,4-double bond
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 4 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%        for n=5 or 8 
%
%           nSa        :  bias bond
%                        This option can be used to avoid over-crowding 
%                        betweem 1 and 8 or between 4 and 5. 
%
%       e.g. 
%        
%        \tetralinev{1==Cl;2==F}
%        \tetralinev[A]{1==Cl;4==F;2==CH$_{3}$}
%        \tetralinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\tetralinev{\@ifnextchar[{\@tetralinev}{\@tetralinev[r]}}
\def\@tetralinev[#1]#2{%
 \iforigpt \typeout{command `tetralinev' is based on `decalinev'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \decalinev[fhk]{#2}%
 \else\if\@tmpa A%aromatic circle
    \decalinev[A]{#2}%
 \else\if\@tmpa e%inner double bond
  \if\@tmpb a% (A)%
    \decalinev[afhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
    \decalinev[afhk]{#2}%
  \else\if\@tmpb b% (B)
    \decalinev[bfhk]{#2}%
  \else\if\@tmpb c% (C)
    \decalinev[cfhk]{#2}%
  \fi\fi\fi\fi%
 \fi\fi\fi%
}%               %end of \tetralinev macro
%
% *************************
% * tetraline derivatives *
% *  (horizontal type)    *
% *************************
%
%   \tetralineh[OPT]{SUBSLIST}          
%
%     OPT = none       :  tetraline
%           A          :  aromatic circle
%
%           e or ea    :  1,2-double bond
%           eb         :  2,3-double bond
%           ec         :  3,4-double bond
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 4 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%        for n=5 or 8 
%
%           nSa        :  bias bond
%                        This option can be used to avoid over-crowding 
%                        betweem 1 and 8 or between 4 and 5. 
%
%       e.g. 
%        
%        \tetralineh{1==Cl;2==F}
%        \tetralineh[A]{1==Cl;4==F;2==CH$_{3}$}
%        \tetralineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\tetralineh{\@ifnextchar[{\@tetralineh}{\@tetralineh[r]}}
\def\@tetralineh[#1]#2{%
 \iforigpt \typeout{command `tetralineh' is based on `decalineh'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \decalineh[fhk]{#2}%
 \else\if\@tmpa A%aromatic circle
    \decalineh[A]{#2}%
 \else\if\@tmpa e%inner double bond
  \if\@tmpb a% (A)%
    \decalineh[afhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
    \decalineh[afhk]{#2}%
  \else\if\@tmpb b% (B)
    \decalineh[bfhk]{#2}%
  \else\if\@tmpb c% (C)
    \decalineh[cfhk]{#2}%
  \fi\fi\fi\fi%
 \fi\fi\fi%
}%               %end of \tetralineh macro
%
% ***********************************
% * perhydro anthracene derivatives *
% *  (vertical type)                *
% ***********************************
%
%   \hanthracenev[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none       :  hanthracene
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  10,4a-double bond
%           f          :  10,10a-double bond
%           g          :  5,10a-double bond
%           h          :  5,6-double bond
%           i          :  6,7-double bond
%           j          :  8,7-double bond
%           k          :  8,8a-double bond
%           l          :  9,8a-double bond
%           m          :  9,9a-double bond
%           n          :  1,9a-double bond
%           o          :  4a,9a-double bond
%           p          :  10a,8a-double bond
%           A          :  right aromatic circle 
%           B          :  central aromatic circle 
%           C          :  left aromatic circle 
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%        for 11 (fused positions, 9a and 4a) 
%
%           11FA       :  alpha single bond at 9a 
%           11FB       :  beta single bond at 9a
%           11FU       :  unspecified single bond at 9a
%           11GA       :  alpha single bond at 4a 
%           11GB       :  beta single bond at 4a
%           11GU       :  unspecified single bond at 4a
%
%        for 12 (fused positions, 8a and 10a) 
%
%           12FA       :  alpha single bond at 8a 
%           12FB       :  beta single bond at 8a
%           12FU       :  unspecified single bond at 8a
%           12GA       :  alpha single bond at 10a 
%           12GB       :  beta single bond at 10a
%           12GU       :  unspecified single bond at 10a
%
%       e.g. 
%        
%        \hanthracenev{1==Cl;2==F;{{10}}==OH}
%        \hanthracenev[c]{1==Cl;4==F;2==CH$_{3}$;
%            {{11}FA}==OH;{{11}FB}==OH}
%        \hanthracenev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\hanthracenev{\@ifnextchar[{\@hanthracenev}{\@hanthracenev[r]}}
\def\@hanthracenev[#1]#2{%
% bonds for outer skeleton
 \begin{picture}(1200,880)(-\shiftii,-\shifti)
  \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
           \put(-\noshift,-\noshift){\circle{50}}% 
   \typeout{command `hanthracenev' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  \put(0,406){\line(-5,-3){171}}%       %bond 8-7
  \put(0,406){\line(5,-3){171}}%        %bond 8-8a
  \put(0,0){\line(-5,3){171}}%          %bond 5-6
  \put(0,0){\line(5,3){171}}%           %bond 5-10a
  \put(171,103){\line(0,1){200}}%       %bond 10a-8a
  \put(-171,103){\line(0,1){200}}%      %bond 6-7
  \put(342,406){\line(-5,-3){171}}%     %bond 9-8a
  \put(342,406){\line(5,-3){171}}%      %bond 9-9a
  \put(342,0){\line(-5,3){171}}%        %bond 10-10a
  \put(342,0){\line(5,3){171}}%         %bond 10-4a
  \put(513,103){\line(0,1){200}}%       %bond 4a-9a
  %%%%
  \put(684,406){\line(-5,-3){171}}%     %bond 1-9a    1-6
  \put(684,406){\line(5,-3){171}}%      %bond 1-2     1-2
  \put(855,103){\line(0,1){200}}%       %bond 3-2     3-2
  \put(684,0){\line(5,3){171}}%         %bond 4-3     4-3
  \put(684,0){\line(-5,3){171}}%        %bond 4-4a    4-5
% inner double bonds
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \put(690,364){\line(5,-3){126}}%      %double bond 1-2
\else\if\member b%
  \put(822,129){\line(0,1){148}}%       %double bond 3-2
\else\if\member c%
  \put(690,42){\line(5,3){126}}%        %double bond 4-3
\else\if\member d%
  \put(690,42){\line(-5,3){126}}%       %double bond 4-4a
\else\if\member e%
  \put(348,42){\line(5,3){126}}%        %double bond 10-4a
\else\if\member f%
  \put(348,42){\line(-5,3){126}}%       %double bond 10-10a
\else\if\member g%
  \put(6,42){\line(5,3){126}}%          %double bond 5-10a
\else\if\member h%
  \put(-6,42){\line(-5,3){126}}%        %double bond 5-6
\else\if\member i%
  \put(-138,129){\line(0,1){148}}%      %double bond 6-7
\else\if\member j%
  \put(-6,364){\line(-5,-3){126}}%      %double bond 8-7
\else\if\member k%
  \put(6,364){\line(5,-3){126}}%        %double bond 8-8a   
\else\if\member l%
  \put(348,364){\line(-5,-3){126}}%     %double bond 9-8a
\else\if\member m%
  \put(348,364){\line(5,-3){126}}%      %double bond 9-9a
\else\if\member n%
  \put(690,364){\line(-5,-3){126}}%     %double bond 1-9a
\else\if\member o%
  \put(544,129){\line(0,1){148}}%       %double bond 4a-9a
%  \put(482,129){\line(0,1){148}}%       %double bond 4a-9a
\else\if\member p%
  \put(138,129){\line(0,1){148}}%       %double bond 10a-8a
\else\if\member C%left aromatic circle 
  \put(0,203){\circle{240}}            %circle
\else\if\member B%right aromatic circle 
  \put(342,203){\circle{240}}%          %circle
\else\if\member A%right aromatic circle 
  \put(684,203){\circle{240}}%          %circle
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
%exocyclic bonds and substituents
\put(0,0){\setdecaringv{#2}{0}{4}{9}{0}}%  %for 1 to 4 positions
\put(684,0){\setsixringv{#2}{0}{0}{5}{0}}% %for 5 to 8 positions
\put(342,0){\setsixringv{#2}{-8}{0}{2}{0}}%for 9-position
\put(342,0){\setsixringv{#2}{-6}{3}{5}{0}}%for 10-position
%bonds and substituents for fused positions
%\put(0,0){\setdecaringv{#2}{-12}{-1}{1}{0}}% for 8a and 10a
%\put(342,0){\setdecaringv{#2}{-11}{-1}{1}{0}}% for 9a and 4a
\put(0,0){\setfusedbond{#2}{-12}{-1}{1}{0}}% for 8a and 10a
\put(342,0){\setfusedbond{#2}{-11}{-1}{1}{0}}% for 9a and 4a
\end{picture}}%               %end of \hanthracenev macro%
%
% ********************************************
% * anthracene and anthraquinone derivatives *
% *  (vertical type)                         *
% ********************************************
%
%   \anthracenev[OPT]{SUBSLIST}
%
%     OPT (bond pattern) 
%
%           none or r  :  right-handed double bonds
%           l          :  left-handed double bonds
%           A          :  aromatic circle
%
%           p or pa    :  9,10-anthraquinone (A) 
%           pA         :  9,10-anthraquinone (circle type)
%
%           o          :  1,2-anthraquinone (A)
%           oa         :  1,2-anthraquinone (A')
%           oA         :  1,2-anthraquinone (circle type)
%           ob         :  2,3-antharquinone (B)
%           oc         :  1,2-anthraquinone (C)
%
%           q          :  1,4-anthraquinone (A)
%           qa         :  1,4-anthraquinone (A')
%           qA         :  1,4-anthraquinone (circle type)
%
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%       e.g. 
%        
%        \anthracenev{1==Cl;2==F;0FA==;0GA==}
%        \anthracenev[A]{1==Cl;4==F;2==CH$_{3}$}
%        \anthracenev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\anthracenev{\@ifnextchar[{\@anthracenev}{\@anthracenev[r]}}
\def\@anthracenev[#1]#2{%
 \iforigpt \typeout{command `anthracenev' is based on `hanthracenev'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \hanthracenev[acflhjo]{#2}%
 \else\if\@tmpa l% left-handed set of double bonds
    \hanthracenev[acehjmp]{#2}%
 \else\if\@tmpa A%aromatic circle
    \hanthracenev[ABC]{#2}%
 \else\if\@tmpa p%9,10-quinone
  \if\@tmpb a% (A)%
    \hanthracenev[achjop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hanthracenev[achjop]{#2}%
   \else\if\@tmpb A% circle type
    \hanthracenev[AC]{#2}%
   \else 
    \hanthracenev[achjop]{#2}%
  \fi\fi\fi%
 \else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
    \hanthracenev[cfjhlo]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hanthracenev[cehjmp]{#2}%
   \else\if\@tmpb b% (B)
    \hanthracenev[dfhjln]{#2}%
   \else\if\@tmpb c% (C)
    \hanthracenev[aehjmp]{#2}%
   \else\if\@tmpb A% cicle type
    \hanthracenev[cBC]{#2}%
  \fi\fi\fi\fi\fi%
 \else\if\@tmpa q%1,4-quinone
  \if\@tmpb a% (A)%
    \hanthracenev[bfhjlo]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hanthracenev[behjmp]{#2}%
   \else\if\@tmpb A% circle type
    \hanthracenev[AB]{#2}%
   \else% 
    \hanthracenev[behjmp]{#2}%
  \fi\fi\fi%
 \fi\fi\fi\fi\fi\fi%
}%               %end of \anthracenev macro%
%
% *************************************
% * perhydro phenanthrene derivatives *
% *  (vertical type)                  *
% *************************************
%
%   \hphenanthrenev[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none       :  hphenanthrene
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  4a,4b-double bond
%           f          :  4b,5-double bond
%           g          :  5,6-double bond
%           h          :  6,7-double bond
%           i          :  7,8-double bond
%           j          :  8,8a-double bond
%           k          :  8a,9-double bond
%           l          :  9,10-double bond
%           m          :  10,10a-double bond
%           n          :  1,10a-double bond
%           o          :  4a,10a-double bond
%           p          :  4b,8a-double bond
%           A          :  right aromatic circle 
%           B          :  central aromatic circle 
%           C          :  left aromatic circle 
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%        for 11 (fused positions, 4a and 10a) 
%
%           11FA       :  alpha single bond at 4a 
%           11FB       :  beta single bond at 4a
%           11FC       :  alpha single bond (downward) at 4a 
%           11FD       :  beta single bond (downward) at 4a
%           11FU       :  unspecified single bond at 4a
%           11GA       :  alpha single bond at 10a 
%           11GB       :  beta single bond at 10a
%           11FC       :  alpha single bond (upward) at 10a
%           11FD       :  beta single bond (upward) at 10a
%           11GU       :  unspecified single bond at 10a
%
%        for 12 (fused positions, 4b and 8a) 
%
%           12FA       :  alpha single bond at 4b 
%           12FB       :  beta single bond at 4b
%           12FU       :  unspecified single bond at 4b
%           12GA       :  alpha single bond at 8a 
%           12GB       :  beta single bond at 8a
%           12GU       :  unspecified single bond at 8a
%
%       e.g. 
%        
%        \hphenanthrenev{1==Cl;2==F;{{10}}==OH}
%        \hphenanthrenev[c]{1==Cl;4==F;2==CH$_{3}$;
%            {{11}FA}==OH;{{11}FB}==OH}
%        \hphenanthrenev[eb]{1D==O;4SA==MeO;4SB==OMe;
%                   5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\hphenanthrenev{\@ifnextchar[{\@hphenanthrenev}{\@hphenanthrenev[r]}}
\def\@hphenanthrenev[#1]#2{%
% bonds for outer skeleton
 \begin{picture}(1200,1200)(-\shiftii,-\shifti)
  \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
           \put(-\noshift,-\noshift){\circle{50}}% 
   \typeout{command `hphenanthrenev' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  \put(0,406){\line(-5,-3){171}}%       %bond 6-5
  \put(0,406){\line(5,-3){171}}%        %bond 5-4a
  \put(0,0){\line(-5,3){171}}%          %bond 8-7
  \put(0,0){\line(5,3){171}}%            %bond 8-8a
  \put(171,103){\line(0,1){200}}%       %bond 8a-4b
  \put(-171,103){\line(0,1){200}}%      %bond 7-6
  \put(342,406){\line(-5,-3){171}}%     %bond 4a-4b
  \put(342,406){\line(5,-3){171}}%      %bond 4a-10a
  \put(342,0){\line(-5,3){171}}%        %bond 9-8a
  \put(342,0){\line(5,3){171}}%         %bond 9-10
  \put(513,103){\line(0,1){200}}%       %bond 10-10a
  %%%%
  \put(342,406){\line(0,1){200}}%       %bond 4a-4
  \put(513,709){\line(-5,-3){171}}%     %bond 3-4
  \put(513,709){\line(5,-3){171}}%      %bond 3-2
  \put(684,406){\line(0,1){200}}%       %bond 1-2
  \put(513,303){\line(5,3){171}}%       %bond 10a-1
% inner double bonds
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \put(651,432){\line(0,1){148}}%       %double bond 1-2
\else\if\member b%
  \put(519,667){\line(5,-3){126}}%      %double bond 3-2
\else\if\member c%
  \put(519,667){\line(-5,-3){126}}%     %double bond 3-4
\else\if\member d%
  \put(375,432){\line(0,1){148}}%       %double bond 4a-4
\else\if\member e%
  \put(348,364){\line(-5,-3){126}}%     %double bond 4a-4b
\else\if\member f%
  \put(6,364){\line(5,-3){126}}%        %double bond 5-4b
\else\if\member g%
  \put(-6,364){\line(-5,-3){126}}%      %double bond 5-6
\else\if\member h%
  \put(-138,129){\line(0,1){148}}%      %double bond 6-7
\else\if\member i%
  \put(-6,42){\line(-5,3){126}}%        %double bond 8-7
\else\if\member j%
  \put(6,42){\line(5,3){126}}%          %double bond 8-8a
\else\if\member k%
  \put(348,42){\line(-5,3){126}}%       %double bond 9-8a
\else\if\member l%
  \put(348,42){\line(5,3){126}}%        %double bond 9-10
\else\if\member m%
  \put(482,129){\line(0,1){148}}%       %double bond 10-10a
\else\if\member n%
  \put(519,345){\line(5,3){126}}%       %double bond 10a-1
\else\if\member o%
  \put(507,345){\line(-5,3){126}}%      %double bond 10a-4a
%  \put(348,364){\line(5,-3){126}}%     %double bond 4a-10a
\else\if\member p%
  \put(138,129){\line(0,1){148}}%       %double bond 8a-4b
\else\if\member C%left aromatic circle 
  \put(0,203){\circle{240}}            %circle
\else\if\member B%right aromatic circle 
  \put(342,203){\circle{240}}%          %circle
\else\if\member A%right aromatic circle 
  \put(513,506){\circle{240}}%          %circle
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
%exocyclic bonds and substituents
\put(0,0){\setdecaringv{#2}{13}{2}{9}{-1}}%   %for 5 to 10 positions
\put(513,303){\setsixringv{#2}{4}{0}{4}{-1}}% %for 1 to 3 positions
\put(513,303){\setsixringv{#2}{2}{5}{7}{0}}%  %for 4-position
%bonds and substituents for fused positions
\put(0,0){\setfusedbond{#2}{-12}{-1}{1}{0}}%  % for 4b and 8a
\put(342,0){\setfusedbond{#2}{-10}{0}{2}{0}}% % for 4a and 10a
\end{picture}}%               %end of \hphenanthrenev macro%
%
% *********************************
% * phenanthrene and  derivatives *
% *  (vertical type)              *
% *********************************
%
%   \phenanthrenev[OPT]{SUBSLIST}
%
%     OPT (bond pattern) 
%
%           none or r  :  right-handed double bonds
%           A          :  aromatic circle
%
%           p or pa    :  1,4-quinone (A) 
%           pA         :  1,4-quinone (circle type)
%
%           o or oa    :  1,2-quinone (A)
%           oA         :  1,2-quinone (circle type)
%           ob         :  2,3-quinone (B)
%           oc         :  3,4-anthraquinone (C)
%
%           q or qa    :  9,10-quinone
%           qA         :  9,10-quinone (circle type)
%
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%       e.g. 
%        
%        \phenanthrenev{1==Cl;2==F}
%        \phenanthrenev[A]{1==Cl;4==F;2==CH$_{3}$}
%        \phenanthrenev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
\def\phenanthrenev{\@ifnextchar[{\@phenanthrenev}{\@phenanthrenev[r]}}
\def\@phenanthrenev[#1]#2{%
 \iforigpt \typeout{command `phenanthrenev' is based on `hphenantherenv'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \hphenanthrenev[acgilop]{#2}%
 \else\if\@tmpa A%aromatic circle
    \hphenanthrenev[ABC]{#2}%
 \else\if\@tmpa p%1,4-quinone
  \if\@tmpb a% (A)%
    \hphenanthrenev[bgilop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hphenanthrenev[bgilop]{#2}%
   \else\if\@tmpb A% circle type
    \hphenanthrenev[BCb]{#2}%
   \else 
    \hphenanthrenev[bgilop]{#2}%
  \fi\fi\fi%
 \else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
    \hphenanthrenev[cgilop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hphenanthrenev[cgilop]{#2}%
   \else\if\@tmpb b% (B)
    \hphenanthrenev[dgilnp]{#2}%
   \else\if\@tmpb c% (C)
    \hphenanthrenev[agilop]{#2}%
   \else\if\@tmpb A% cicle type
    \hphenanthrenev[cBC]{#2}%
  \fi\fi\fi\fi\fi%
 \else\if\@tmpa q%9,10-quinone
  \if\@tmpb a% (A)%
    \hphenanthrenev[acgiop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hphenanthrenev[acgiop]{#2}%
   \else\if\@tmpb A% circle type
    \hphenanthrenev[AC]{#2}%
   \else 
    \hphenanthrenev[acgiop]{#2}%
  \fi\fi\fi%
 \fi\fi\fi\fi\fi%
}%               %end of \phenanthrenev macro%
%
% ***********************
% * steroid derivatives *
% ***********************
%  
%   \steroid[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%           none:  steroid skeleton
%           a   :  1,2-double bond        b   :  2,3-double bond
%           c   :  3,4-double bond        d   :  4,5-double bond
%           e   :  6,5-double bond        f   :  6,7-double bond
%           g   :  7,8-double bond        h   :  9,8-double bond
%           i   :  9,10-double bond       j   :  1,10-double bond
%           k   :  5,10-double bond       l   :  9,11-double bond
%           m   :  12,11-double bond      n   :  12,13-double bond
%           o   :  14,13-double bond      p   :  8,14-double bond
%           q   :  14,15-double bond      r   :  15,16-double bond
%           s   :  17,16-double bond      t   :  17,13-double bond
%           A   :  aromatic A ring        B   :  aromatic B ring
%           C   :  aromatic C ring
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 17 (execpt fused positions)
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%          For numbers larger than 9 (two digits), you should designate
%          the SUBSLIST as 
%
%             {{11}A}==Cl;{{12}SA}==H;{{12}SB}==Cl;
%
%       for n = 5,8,9,10,13 and 14 (fused positions)
%
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           nU         :  unspecified single bond at n-atom
%
%       e.g. 
%        
%        \steroid{1==Cl;2==F;{{10}}==OH}
%        \steroid[c]{1==Cl;4==F;2==CH$_{3}$;
%            {{11}SA}==OH;{{11}SB}==OH}
%        \steroid[eb]{1D==O;4SA==MeO;4SB==OMe;
%                   5==Cl;6==Cl;7==Cl;8==Cl}
%
\def\steroid{\@ifnextchar[{\@steroid}{\@steroid[Z]}}
\def\@steroid[#1]#2{%
% bonds for outer skeleton
 \begin{picture}(1200,1300)(-\shiftii,-\shifti)
  \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
           \put(-\noshift,-\noshift){\circle{50}}% 
   \typeout{command `steroid' origin: %
    (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  \put(0,406){\line(-5,-3){171}}%       %bond 1-2
  \put(0,406){\line(5,-3){171}}%        %bond 1-10
  \put(0,0){\line(-5,3){171}}%          %bond 4-3
  \put(0,0){\line(5,3){171}}%           %bond 4-5
  \put(171,103){\line(0,1){200}}%       %bond 5-10
  \put(-171,103){\line(0,1){200}}%      %bond 3-2
  \put(342,406){\line(-5,-3){171}}%     %bond 9-10
  \put(342,406){\line(5,-3){171}}%      %bond 9-8
  \put(342,0){\line(-5,3){171}}%        %bond 6-5
  \put(342,0){\line(5,3){171}}%         %bond 6-7
  \put(513,103){\line(0,1){200}}%       %bond 7-8
  %%%%
  \put(342,406){\line(0,1){200}}%       %bond 9-11
  \put(513,709){\line(-5,-3){171}}%     %bond 12-11
  \put(513,709){\line(5,-3){171}}%      %bond 12-13
  \put(684,406){\line(0,1){200}}%       %bond 14-13
  \put(513,303){\line(5,3){171}}%       %bond 8-14
  %%%%
  \put(855,709){\line(-5,-3){171}}%     %bond 17-13
  \put(855,709){\line(5,-3){171}}%      %bond 17-16
  \put(1026,406){\line(0,1){200}}%      %bond 15-16
  \put(684,406){\line(1,0){342}}%       %bond 14-15
% inner double bonds
\@tfor\member:=#1\do{%
\if\member Z%no endcyclic double bonds
\else\if\member a%
  \put(-6,364){\line(-5,-3){126}}%      %double bond 1-2 5-6
\else\if\member b%
  \put(-138,129){\line(0,1){148}}%      %double bond 3-2 6-7
\else\if\member c%
  \put(-6,42){\line(-5,3){126}}%        %double bond 4-3 8-7
\else\if\member d%
  \put(6,42){\line(5,3){126}}%          %double bond 4-5 8-8a
\else\if\member e%
  \put(348,42){\line(-5,3){126}}%       %double bond 6-5 9-8a
\else\if\member f%
  \put(348,42){\line(5,3){126}}%        %double bond 6-7 9-10
\else\if\member g%
  \put(482,129){\line(0,1){148}}%       %double bond 7-8 10-10a
\else\if\member h%
  \put(507,345){\line(-5,3){126}}%      %double bond 8-9  10a-4a
%  \put(348,364){\line(5,-3){126}}%     %double bond 9-8  4a-10a
\else\if\member i%
  \put(348,364){\line(-5,-3){126}}%     %double bond 9-10  4a-4b
\else\if\member j%
  \put(6,364){\line(5,-3){126}}%        %double bond 1-10 5-4b
\else\if\member k%
  \put(138,129){\line(0,1){148}}%       %double bond 5-10 8a-4b
\else\if\member l%
  \put(375,432){\line(0,1){148}}%       %double bond 9-11    4-5
\else\if\member m%
  \put(519,667){\line(-5,-3){126}}%     %double bond 12-11   3-4
\else\if\member n%
  \put(519,667){\line(5,-3){126}}%      %double bond 12-13   3-2
\else\if\member o%
  \put(651,432){\line(0,1){148}}%       %double bond 13-14  1-2
\else\if\member p%
  \put(519,345){\line(5,3){126}}%       %double bond 8-14 10a-1
\else\if\member q%
  \put(720,439){\line(1,0){260}}%       %double bond 14-15
\else\if\member r%
  \put(993,432){\line(0,1){148}}%       %double bond 15-16  1-2
\else\if\member s%
  \put(861,667){\line(5,-3){126}}%      %double bond 17-16   3-2
\else\if\member t%
  \put(861,667){\line(-5,-3){126}}%     %double bond 17-13   3-4
\else\if\member A%left aromatic circle 
  \put(0,203){\circle{240}}%            %circle
\else\if\member B%right aromatic circle 
  \put(342,203){\circle{240}}%          %circle
\else\if\member C%right aromatic circle 
  \put(513,506){\circle{240}}%          %circle
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
%exocyclic bonds and substituents
\put(0,0){\setdecaringv{#2}{9}{4}{9}{-1}}%    %for 1 to 4 positions
\put(0,0){\setdecaringv{#2}{10}{2}{5}{-1}}%   %for 6 to 7 positions
\put(513,303){\setsixringv{#2}{-11}{0}{2}{0}}%for 12 position
\put(513,303){\setsixringv{#2}{-5}{5}{7}{0}}% %for 11 position
\put(855,303){\setsixringv{#2}{18}{0}{4}{-1}}%for 15 to 17 positions
%bonds and substituents for fused positions
\put(171,103){\setatombond{#2}{-4}{7}}%       % for 5
\put(171,303){\setatombond{#2}{-9}{1}}%       % for 10
\put(513,303){\setatombond{#2}{-7}{1}}%       % for 8
\put(342,406){\setatombond{#2}{-8}{7}}%       % for 9
\put(684,406){\setatombond{#2}{-13}{7}}%      % for 14
\put(684,606){\setatombond{#2}{-12}{1}}%      % for 13
\end{picture}}%               %end of \steroid macro%
%
% **************************************
% * steroid derivatives having a chain *
% **************************************
%  
%   \steroidchain[BONDLIST]{SUBSLIST}          
%
%     BONDLIST = 
%
%       (double bonds for the steroid skeleton)
%           none:  no action on the steroid skeleton
%           a   :  1,2-double bond        b   :  2,3-double bond
%           c   :  3,4-double bond        d   :  4,5-double bond
%           e   :  6,5-double bond        f   :  6,7-double bond
%           g   :  7,8-double bond        h   :  9,8-double bond
%           i   :  9,10-double bond       j   :  1,10-double bond
%           k   :  5,10-double bond       l   :  9,11-double bond
%           m   :  12,11-double bond      n   :  12,13-double bond
%           o   :  14,13-double bond      p   :  8,14-double bond
%           q   :  14,15-double bond      r   :  15,16-double bond
%           s   :  17,16-double bond      t   :  17,13-double bond
%           A   :  aromatic A ring        B   :  aromatic B ring
%           C   :  aromatic C ring
%       (double bonds for the side chain)
%           Z   :  no action
%          Za   :  17,20-double bond     Zb   :  20,22-double bond
%          Zc   :  22,23-double bond     Zd   :  23,24-double bond
%          Ze   :  24,25-double bond     Zf   :  25,26-double bond
%          Zg   :  25,27-double bond
%
%          For a two-character indicator, you should write the BONDLIST 
%          as, e.g.
%
%              [b{Za}{Zc}...]
%
%     SUBSLIST: list of substituents (max 8 substitution positions)
%
%       for n = 1 to 24 (execpt fused positions)
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%          For numbers larger than 9 (two digits), you should designate
%          the SUBSLIST as, e.g. 
%
%             {{11}A}==Cl;{{12}SA}==H;{{12}SB}==Cl; ...
%
%       for n = 5,8,9,10,13,14,and 25 (fused positions etc.)
%
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           nU         :  unspecified single bond at n-atom
%
%       e.g. 
%        
%        \steroidchain{1==Cl;2==F;{{10}}==OH}
%        \steroidchain[c]{1==Cl;4==F;2==CH$_{3}$;%
%            {{11}SA}==OH;{{11}SB}==OH}
%        \steroidchain[b]{1D==O;4SA==MeO;4SB==OMe;%
%                   ;6==Cl;7==Cl;11==Cl}
%
\def\steroidchain{\@ifnextchar[{\@steroidchain}{\@steroidchain[Z]}}
\def\@steroidchain[#1]#2{%
\begin{picture}(1800,1500)(-\shiftii,-\shifti)
%\put(0,0){\circle{50}}
  \iforigpt \typeout{command `steroidchain' is based on `steroid'.}\fi%
% steroid skeleton
  \put(-400,-240){\steroid[#1]{#2}}
% bonds for the side chain (carbons 20 to 27 (except 21))
  \put(855,709){\line(0,1){200}}%       %bond 17-20
  \put(1026,1012){\line(-5,-3){171}}%   %bond 22-20
  \put(1026,1012){\line(5,-3){171}}%    %bond 22-23
  \put(1197,709){\line(0,1){200}}%      %bond 24-23
  \put(1197,709){\line(1,0){200}}%      %bond 24-25
  \put(1397,709){\line(3,5){103}}%      %bond 25-26
  \put(1397,709){\line(3,-5){103}}%     %bond 25-27
% double bonds along the side chain
\@tfor\member:=#1\do{%
\expandafter\twoch@r\member{}\relax%
\if\@tmpa Z\relax%
 \ifx\@tmpb\empty%no action
 \else\if\@tmpb a%
  \put(888,735){\line(0,1){148}}%       %double bond 17-20
 \else\if\@tmpb b%
  \put(1020,970){\line(-5,-3){126}}%    %double bond 22-20
 \else\if\@tmpb c%
  \put(1032,970){\line(5,-3){126}}%     %double bond 22-23
 \else\if\@tmpb d%
  \put(1164,735){\line(0,1){148}}%      %double bond 24-23
 \else\if\@tmpb e%
  \put(1233,742){\line(1,0){140}}%      %double bond 24-25
 \else\if\@tmpb f%
  \put(1433,715){\line(3,5){72}}%       %double bond 25-26
 \else\if\@tmpb g%
  \put(1433,697){\line(3,-5){72}}%      %double bond 25-27
 \fi\fi\fi\fi\fi\fi\fi\fi\fi}
% substitution on the side chain
\put(1026,606){\setsixringv{#2}{-21}{0}{3}{0}}%for 22 and 23 positions
\put(1026,606){\setsixringv{#2}{-14}{5}{7}{0}}%for 20 position
\put(1197,709){\setsixringv{#2}{-20}{3}{5}{0}}%for 24 position
\put(1397,709){\setatombond{#2}{-24}{4}}%      % for 5
\end{picture}}%               %end of \steroidchain macro%

