% \iffalse meta-comment
%% File: aliphat.dtx
%
%  Copyright 1993,1996,1998,2001,2002,2004,2005,2009,2010,2013 by Shinsaku Fujita
%
%  This file is part of XyMTeX system.
%  -------------------------------------
%
% This file is a successor to:
%
% aliphat.sty
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
% \typeout{       -- Released December 1, 1993 by Shinsaku Fujita}
% 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].  
%
% 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 aliphat.dtx and aliphat.ins
% and the derived file aliphat.sty.
%
% Please report any bugs, comments, suggestions, etc. to:
% (Old Address)  Shinsaku Fujita, 
%   Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., 
%   Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
% (Present Address) Shinsaku Fujita
%   Shonan Institute of Chemoinformatics and 
%   Mathematical Chemistry
%   fujita-sicimc@nifmail.jp
%   
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{December 01, 1993}
% \def\versi@nno{ver1.00}
% \def\copyrighth@lder{SF}% Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{August 16, 1996}
% \def\versi@nno{ver1.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{October 31, 1998}
% \def\versi@nno{ver1.02}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{December 25, 1998}
% \def\versi@nno{ver2.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{June 20, 2001}
% \def\versi@nno{ver2.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{April 30, 2002}
% \def\versi@nno{ver3.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{May 30, 2002}
% \def\versi@nno{ver4.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{August 30, 2004}
% \def\versi@nno{ver4.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{December 20, 2004}
% \def\versi@nno{ver4.02}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{July 20, 2005}
% \def\versi@nno{ver4.03}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{November 07, 2009}
% \def\versi@nno{ver4.05}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{October 01, 2010}
% \def\versi@nno{ver5.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{aliphat}
% \def\versi@ndate{April 02, 2013}
% \def\versi@nno{ver5.01b}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \fi
%
% \CheckSum{6477}
%% \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         \~}
%
% \setcounter{StandardModuleDepth}{1}
%
% \StopEventually{}
% \MakeShortVerb{\|}
%
% \iffalse
% \changes{v1.01}{1996/06/26}{first edition for LaTeX2e}
% \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e}
% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
% \changes{v2.01}{2001/06/20}{Size reduction and clipping information}
% \changes{v2.01}{2001/06/21}{The command \cs{dotorline} is added.}
% \changes{v3.00}{2002/04/30}{sfpicture environment, etc.}
% \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv}
% \changes{v4.01}{2004/08/30}{Variable size of a central atom}
% \changes{v4.02}{2004/12/20}{Tetrhedral units with wedges bonds}
% \changes{v4.02a}{2004/12/27}{Bug fix: \cs{square} to \cs{squarecomplex}}
% \changes{v4.03}{2004/07/20}{Wave bonds}
% \changes{v4.05}{2009/11/07}{Bug fix: \cs{@tetrahedral} to \cs{@@tetrahedral}} 
% \changes{v5.00}{2010/10/01}{Bond Coloring and the LaTeX Project Public License; 
% \cs{square} renamed into \cs{squareplanar}}
% \changes{v5.01b}{2013/04/02}{Bug fix: \cs{Nothbond}, \cs{Southbond}, etc} 
% \changes{v5.01}{2013/07/30}{Bug fix: \cs{yltetrahedralposition}, etc} 
% \fi
%
% \iffalse
%<*driver>
\NeedsTeXFormat{pLaTeX2e}
% \fi
\ProvidesFile{aliphat.dtx}[2013/07/30 v5.01 XyMTeX{} package file]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{aliphat.dtx}
%
% %%XyMTeX Logo: Definition 2%%%
\def\UPSILON{\char'7}
\def\XyM{X\kern-.30em\smash{%
\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}}
\def\XyMTeX{\XyM\kern-.1em\TeX}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Aliphatic compounds by {\sffamily aliphat.sty} 
(\fileversion) of \XyMTeX{}}
\author{Shinsaku Fujita \\ 
Shonan Institute of Chemoinformatics and Mathematical Chemistry, \\
Kanagawa, 258-0019, Japan
% Department of Chemistry and Materials Technology, \\
% Kyoto Institute of Technology, \\
% Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
% % (old address)
% % Ashigara Research Laboratories, 
% % Fuji Photo Film Co., Ltd., \\ 
% % Minami-Ashigara, Kanagawa, 250-01 Japan
}
\date{\filedate}
%
\begin{document}
   \maketitle
   \DocInput{aliphat.dtx}
\end{document}
%</driver>
% \fi
%
% \section{Introduction}\label{aliphat:intro}
%
% \subsection{Options for {\sffamily docstrip}}
%
% \DeleteShortVerb{\|}
% \begin{center}
% \begin{tabular}{|l|l|}
% \hline
% \emph{option} & \emph{function}\\ \hline
% aliphat & aliphat.sty \\
% driver & driver for this dtx file \\
% \hline
% \end{tabular}
% \end{center}
% \MakeShortVerb{\|}
%
% \subsection{Version Information}
%
%    \begin{macrocode}
%<*aliphat>
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.01}
\typeout{       -- Released July 20, 2013 by Shinsaku Fujita}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{aliphat}
\def\versi@ndate{July 20, 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]}
%    \end{macrocode}
%
% \section{List of commands for aliphat.sty}
%
% \begin{verbatim}
% *********************************
% * aliphat.sty: list of commands *
% *********************************
%
% <Conventions for bond-setting>
%
%     \Northbond
%     \Eastbond
%     \Southbond
%     \Westbond
%     \NEBond
%     \NEbond
%     \SEBond
%     \SEbond
%     \NWBond
%     \NWbond
%     \SWBond
%     \SWbond
%
%     \NEBOND
%     \NWBOND
%     \SEBOND
%     \SWBOND
%  
%  <Macros for position adjustment>
%     \ylrtrigonalposition 
%     \ylRtrigonalposition 
%     \ylltrigonalposition 
%     \ylLtrigonalposition 
%     \ylutrigonalposition 
%     \ylUtrigonalposition 
%     \yldtrigonalposition 
%     \ylDtrigonalposition 
%
%     \yltethedralposition
%     \ylsquareposition
%
%     \ylethylenepositiona
%     \ylethylenepositionb
%     \ylethylenevpositiona
%     \ylethylenevpositionb
%
%  <Macros for tetravalent atoms>
%
%     \tetrahedral                       \@tetrahedral
%     \square ---> \squarplanar          \@square ---> \@squareplanar
%
%  <Macros for trivalent atoms>
%
%     \rtrigonal                         \@rtrigonal
%     \Rtrigonal                         \@Rtrigonal
%     \ltrigonal                         \@ltrigonal
%     \Ltrigonal                         \@Ltrigonal
%     \utrigonal                         \@utrigonal
%     \Utrigonal                         \@Utrigonal
%     \dtrigonal                         \@dtrigonal
%     \Dtrigonal                         \@Dtrigonal
%
%  <Macros for two-carbon compounds>
%
%     \ethylene                          \@ethylene
%     \ethyleneh                         
%     \Ethylene                          \@Ethylene
%     \Ethyleneh                         
%     \ethylenev                         \@ethylenev
%     \Ethylenev                         \@Ethylenev
%
%  <Macros for stereo-projection>
%
%     \tetrastereo                       \@tetrastereo
%     \dtetrastereo                      \@dtetrastereo
%     \ethanestereo                      \@ethanestereo
% 
%  <Macros for tetrahedral units with wedged bonds>
% 
%     \rtetrahedralS                     \RtetrahedralS
%     \ltetrahedralS                     \LtetrahedralS
%     \utetrahedralS                     \UtetrahedralS
%     \dtetrahedralS                     \DtetrahedralS
%     \htetrahedralS
%
%  <Macros for trigonal bipyramidal intermediates>
%
%      \utrigpyramid                     \dtrigpyramid
% \end{verbatim}
%
% \section{Input of basic macros}
%
% To assure the compatibility to \LaTeX{}2.09 (the native mode), 
% the commands added by \LaTeXe{} have not been used in the resulting sty 
% files ({\sf aliphat.sty} for the present case).  Hence, the combination 
% of |\input| and |\@ifundefined| is used to crossload sty 
% files ({\sf chemstr.sty} for the present case) in place of the 
% |\RequirePackage| command of \LaTeXe{}. 
%
% \changes{v4.01}{2004/8/30}{Adding \cs{ifno@centeratom}}
%    \begin{macrocode}
% *************************
% * input of basic macros *
% *************************
\@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
\unitlength=0.1pt
\newif\ifno@centeratom \no@centeratomfalse
%    \end{macrocode}
%
% \section{Macros for bond-setting}
%
% Single, double and triple bonds of aliphatic compounds are represented 
% by horizontal, vertical or sloped lines, 
% which can be drawn by such commands as |\Eastbond|, 
% |\Northbond| and |\SEbond|. 
% \changes{v1.02}{1998/10/20}{Adding \cs{NEBOND}, \cs{SEBOND}, \cs{NWBOND}, 
% and \cs{SWBOND}}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.01}{2001/06/21}{The command \cs{dotorline} is added.}
% \changes{v4.00}{2002/06/13}{Bug fix: Northbond etc. A and B inversed}
% \changes{v4.01}{2004/8/30}{Variable bond length.}
% \changes{v5.01}{2013/04/02}{Bug fix}
%
% \begin{macro}{\Northbond}
%    \begin{macrocode}
% ********************************
% * Conventions for bond-setting *
% ********************************
\def\Northbond{%
\@ifnextchar[{\N@rthbond}{\N@rthbond[]}}
\def\N@rthbond[#1]{%
\yl@xdiff=40
\yl@ydiff=-15
\def\@tempXX{#1}%
\ifx\@tempXX\empty
\@tempcnta=100\relax
\@tempcntb=100\relax
\else
\@tempcnta=#1\relax
\@tempcntb=#1\relax
\fi
\ifno@centeratom
\advance\@tempcnta by52\relax
\advance\@tempcntb by52\relax
\fi
\edef\@tempcntavaluea{\the\@tempcnta}%
\@tempcnta=\@tempcntb
\ifno@centeratom\else%%added2013/4/2
\advance\@tempcnta by52\relax
\fi
\edef\@tempcntavalueb{\the\@tempcnta}%
\@tempcnta=\@tempcntb
\ifno@centeratom
\advance\@tempcnta by15\relax%%67-52=15added2013/4/2
\else
\advance\@tempcnta by67\relax
\fi
\edef\@tempcntavaluec{\the\@tempcnta}%
%\begin{sfpicture}(100,200)(0,0)
\begin{sfpicture}(0,0)(0,0)
\ifno@centeratom%
  \if\@tmpb D\relax%
%    \Multiput@Direct(-13,0)(26,0){2}{\line(0,1){\@tempcntavaluea}}% double bond up
    \Multiput@Direct(-13,0)(26,0){2}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%    \Multiput@Direct(-20,0)(20,0){3}{\line(0,1){\@tempcntavaluea}}% triple bond up
    \Multiput@Direct(-20,0)(20,0){3}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(-8,0)(0,1){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13 
       \dotorline(0,0)(0,1){\@tempcntavaluea}/(0,0)(0,\@tempcntavalueb)%
  \else\if\@tmpb S%
       \Put@Line(0,0)(0,1){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
        \WaveBonds%
       \Put@Line(0,0)(0,1){\@tempcntavaluea}%
       }%
  \else \Put@Line(0,0)(0,1){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \else%
  \if\@tmpb D\relax%
%    \Multiput@Direct(-13,52)(26,0){2}{\line(0,1){\@tempcntavaluea}}% double bond up
    \Multiput@Direct(-13,52)(26,0){2}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%    \Multiput@Direct(-20,52)(20,0){3}{\line(0,1){\@tempcntavaluea}}% triple bond up
    \Multiput@Direct(-20,52)(20,0){3}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(-8,52)(0,1){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13 
       \dotorline(0,52)(0,1){\@tempcntavaluea}/(0,52)(0,\@tempcntavalueb)%
  \else\if\@tmpb S%
       \Put@Line(0,52)(0,1){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(0,52)(0,1){\@tempcntavaluea}%
        }%
  \else \Put@Line(0,52)(0,1){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \fi%
  \putlratom{-40}{\@tempcntavaluec}{\@memberb}%==1 upper substituent
\end{sfpicture}}%End of Northbond
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.01}{2004/8/30}{Variable bond length.}
% \changes{v5.01}{2013/04/02}{Bug fix}
%
% \begin{macro}{\Eastbond}
%    \begin{macrocode}
\def\Eastbond{%
\@ifnextchar[{\E@stbond}{\E@stbond[]}}
\def\E@stbond[#1]{%
\yl@xdiff=-10
\yl@ydiff=33
\edef\@tempXX{#1}%
\ifx\@tempXX\empty
\@tempcnta=140\relax
\@tempcntb=140\relax
\else
\@tempcnta=#1\relax
\@tempcntb=#1\relax
\fi
\ifno@centeratom%
\advance\@tempcnta by50\relax
\advance\@tempcntb by50\relax
\fi
\edef\@tempcntavaluea{\the\@tempcnta}%
\@tempcnta=\@tempcntb
\ifno@centeratom\else%%added 2013/4/2
\advance\@tempcnta by63\relax
\fi
\edef\@tempcntavalueb{\the\@tempcnta}%
\@tempcnta=\@tempcntb
\ifno@centeratom
\advance\@tempcnta by13\relax%%63-50=13added 2013/4/2
\else
\advance\@tempcnta by50\relax
\fi
\edef\@tempcntavaluec{\the\@tempcnta}%
%\begin{sfpicture}(200,200)(0,0)
\begin{sfpicture}(0,0)(0,0)
 \ifno@centeratom%
  \if\@tmpb D\relax%
%     \Multiput@Direct(0,-13)(0,26){2}{\line(1,0){\@tempcntavaluea}}% double bond right
     \Multiput@Direct(0,-13)(0,26){2}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%     \Multiput@Direct(0,-20)(0,20){3}{\line(1,0){\@tempcntavaluea}}% double bond right
     \Multiput@Direct(0,-20)(0,20){3}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(0,0)(1,0){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
       \dotorline(0,0)(1,0){\@tempcntavaluea}/(0,0)(\@tempcntavaluec,0)%
  \else\if\@tmpb S%
       \Put@Line(0,0)(1,0){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(0,0)(1,0){\@tempcntavaluea}%
       }%
    \else \Put@Line(0,0)(1,0){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \else%
  \if\@tmpb D\relax%
%     \Multiput@Direct(50,-13)(0,26){2}{\line(1,0){\@tempcntavaluea}}% double bond right
     \Multiput@Direct(50,-13)(0,26){2}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%     \Multiput@Direct(50,-20)(0,20){3}{\line(1,0){\@tempcntavaluea}}% double bond right
     \Multiput@Direct(50,-20)(0,20){3}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(50,0)(1,0){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
       \dotorline(50,0)(1,0){\@tempcntavaluea}/(50,0)(\@tempcntavaluec,0)%
  \else\if\@tmpb S%
       \Put@Line(50,0)(1,0){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(50,0)(1,0){\@tempcntavaluea}%
       }%
    \else \Put@Line(50,0)(1,0){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \fi%
  \putratom{\@tempcntavalueb}{-33}{\@memberb}%==2 right substituent
\end{sfpicture}}%End of Eastbond
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.01}{2004/8/30}{Variable bond length.}
% \changes{v5.01}{2013/04/02}{Bug fix}
%
% \begin{macro}{\Southbond}
%    \begin{macrocode}
\def\Southbond{%
\@ifnextchar[{\S@uthbond}{\S@uthbond[]}}
\def\S@uthbond[#1]{%
\yl@xdiff=40
\yl@ydiff=95
\def\@tempXX{#1}%
\ifx\@tempXX\empty
\@tempcnta=100\relax
\@tempcntb=100\relax
\else
\@tempcnta=#1\relax
\@tempcntb=#1\relax
\fi
\ifno@centeratom
\advance\@tempcnta by48\relax
\advance\@tempcntb by48\relax
\fi
\edef\@tempcntavaluea{\the\@tempcnta}%
\@tempcnta=-\@tempcntb
\ifno@centeratom\else%%added2013/4/2
\advance\@tempcnta by-48\relax
\fi
\edef\@tempcntavalueb{\the\@tempcnta}%
\@tempcnta=-\@tempcntb
\ifno@centeratom
\advance\@tempcnta by-90\relax%%143-48=98 (-8) added2013/4/2
\else
\advance\@tempcnta by-143\relax
\fi
\edef\@tempcntavaluec{\the\@tempcnta}%
%\begin{sfpicture}(100,300)(0,0)
\begin{sfpicture}(0,0)(0,0)
 \ifno@centeratom%
  \if\@tmpb D\relax%
%     \Multiput@Direct(-13,0)(26,0){2}{\line(0,-1){\@tempcntavaluea}}% double bond down
     \Multiput@Direct(-13,0)(26,0){2}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%     \Multiput@Direct(-20,0)(20,0){3}{\line(0,-1){\@tempcntavaluea}}% double bond down
     \Multiput@Direct(-20,0)(20,0){3}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(-8,0)(0,-1){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
       \dotorline(0,0)(0,-1){\@tempcntavaluea}/(0,0)(0,\@tempcntavalueb)%
  \else\if\@tmpb S%
       \Put@Line(0,-0)(0,-1){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(0,-0)(0,-1){\@tempcntavaluea}%
       }%
    \else \Put@Line(0,0)(0,-1){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \else%
  \if\@tmpb D\relax%
%     \Multiput@Direct(-13,-48)(26,0){2}{\line(0,-1){\@tempcntavaluea}}% double bond down
     \Multiput@Direct(-13,-48)(26,0){2}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%     \Multiput@Direct(-20,-48)(20,0){3}{\line(0,-1){\@tempcntavaluea}}% double bond down
     \Multiput@Direct(-20,-48)(20,0){3}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(-8,-48)(0,-1){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
       \dotorline(0,-48)(0,-1){\@tempcntavaluea}/(0,-48)(0,\@tempcntavalueb)%
  \else\if\@tmpb S%
       \Put@Line(0,-48)(0,-1){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(0,-48)(0,-1){\@tempcntavaluea}%
       }%
    \else \Put@Line(0,-48)(0,-1){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \fi%
  \putlratom{-40}{\@tempcntavaluec}{\@memberb}%==3 down substituent
\end{sfpicture}}%End of Southbond
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.01}{2004/8/30}{Variable bond length.}
% \changes{v5.01}{2013/04/02}{Bug fix}
%

% \begin{macro}{\Westbond}
%    \begin{macrocode}
\def\Westbond{%
\@ifnextchar[{\W@stbond}{\W@stbond[]}}
\def\W@stbond[#1]{%
\yl@xdiff=10
\yl@ydiff=33
\def\@tempXX{#1}%
\ifx\@tempXX\empty
\@tempcnta=140\relax
\@tempcntb=140\relax
\else
\@tempcnta=#1\relax
\@tempcntb=#1\relax
\fi
\ifno@centeratom
\advance\@tempcnta by50\relax
\advance\@tempcntb by50\relax
\fi
\edef\@tempcntavaluea{\the\@tempcnta}%
\@tempcnta=-\@tempcntb
\ifno@centeratom\else%%added 2013/4/2
\advance\@tempcnta by-63\relax
\fi
\edef\@tempcntavalueb{\the\@tempcnta}%
\@tempcnta=\@tempcntb
\ifno@centeratom
\advance\@tempcnta by-13\relax%%63-50=13 added 2013/4/2
\else%
\advance\@tempcnta by50\relax
\fi
\edef\@tempcntavaluec{\the\@tempcnta}%
%\begin{sfpicture}(100,300)(0,0)
\begin{sfpicture}(0,0)(0,0)
 \ifno@centeratom%
  \if\@tmpb D\relax%
%     \Multiput@Direct(0,-13)(0,26){2}{\line(-1,0){\@tempcntavaluea}}% double bond left
     \Multiput@Direct(0,-13)(0,26){2}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%     \Multiput@Direct(0,-20)(0,20){3}{\line(-1,0){\@tempcntavaluea}}% double bond left
     \Multiput@Direct(0,-20)(0,20){3}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(0,0)(-1,0){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
%%       \dotorline(0,0)(-1,0){\@tempcntavaluea}/(\@tempcntavalueb,0)(-40,0)%
       \dotorline(0,0)(-1,0){\@tempcntavaluea}/(0,0)(\@tempcntavalueb,0)%2013/04/02
  \else\if\@tmpb S%
       \Put@Line(0,0)(-1,0){\@tempcntavaluea}%
  \else\if\@tmpb U% undefine
       {%
       \WaveBonds%
       \Put@Line(0,0)(-1,0){\@tempcntavaluea}%
       }%
  \else \Put@Line(0,0)(-1,0){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \else%
  \if\@tmpb D\relax%
%     \Multiput@Direct(-50,-13)(0,26){2}{\line(-1,0){\@tempcntavaluea}}% double bond left
     \Multiput@Direct(-50,-13)(0,26){2}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb T\relax%
%     \Multiput@Direct(-50,-20)(0,20){3}{\line(-1,0){\@tempcntavaluea}}% double bond left
     \Multiput@Direct(-50,-20)(0,20){3}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
  \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
    {\thicklines\Put@Line(-50,0)(-1,0){\@tempcntavaluea}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
%%       \dotorline(-50,0)(-1,0){\@tempcntavaluea}/(\@tempcntavalueb,0)(-40,0)%
%       \dotorline(-50,0)(-1,0){\@tempcntavaluea}/(0,0)(\@tempcntavalueb,0)%%2013/04/02
       \dotorline(-50,0)(-1,0){\@tempcntavaluea}/(-40,0)(\@tempcntavalueb,0)%%2013/06/16
  \else\if\@tmpb S%
       \Put@Line(-50,0)(-1,0){\@tempcntavaluea}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(-50,0)(-1,0){\@tempcntavaluea}%
       }%
  \else \Put@Line(-50,0)(-1,0){\@tempcntavaluea}%
  \fi\fi\fi\fi\fi\fi%
 \fi%
  \putlatom{\@tempcntavalueb}{-33}{\@memberb}%==4 left substituent
\end{sfpicture}}%End of Westbond
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\NEBond}
%    \begin{macrocode}
\def\NEBond{%degree 120
\yl@xdiff=-9
\yl@ydiff=13
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(33,48)(5,3){121}%
    \Put@Line(47,26)(5,3){121}%northeast double bond
  \else\if\@tmpb T\relax%
    \Put@Line(31,52)(5,3){121}%
    \Put@Line(40,37)(5,3){121}%
    \Put@Line(49,22)(5,3){121}%northeast triple bond
%  \else\if\@tmpb A%(A) alpha
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(40,47)(5,3){121}}% single bond (alpha)
%  \else\if\@tmpb B%(B) beta
  \else\if\@tmpb A%(A) alpha
       \dotorline(40,47)(5,3){121}/(40,47)(161,120)%
  \else\if\@tmpb S%
       \Put@Line(40,47)(5,3){121}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(40,47)(5,3){121}%
       }%
  \else \Put@Line(40,47)(5,3){121}%
  \fi\fi\fi\fi\fi\fi%
  \putratom{170}{107}{\@memberb}%==2 (northeast substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\NEbond}
%    \begin{macrocode}
\def\NEbond{%degree 90
\yl@xdiff=-5
\yl@ydiff=10
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
     \Put@Line(31,46)(1,1){100}%
     \Put@Line(49,28)(1,1){100}%northeast double bond
  \else\if\@tmpb T\relax%
     \Put@Line(27,50)(1,1){100}%
     \Put@Line(40,37)(1,1){100}%
     \Put@Line(53,24)(1,1){100}%northeast triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(40,47)(1,1){100}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(40,47)(1,1){100}/(40,47)(140,147)%
  \else\if\@tmpb S%
       \Put@Line(40,47)(1,1){100}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(40,47)(1,1){100}%
       }%
  \else \Put@Line(40,47)(1,1){100}%
  \fi\fi\fi\fi\fi\fi%
  \putratom{145}{137}{\@memberb}%==2 (northeast substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\SEBond}
%    \begin{macrocode}
\def\SEBond{%degree 120
\yl@xdiff=-9
\yl@ydiff=67
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(33,-48)(5,-3){121}%
    \Put@Line(47,-26)(5,-3){121}%southeast double bond
  \else\if\@tmpb T\relax%
    \Put@Line(31,-52)(5,-3){121}%
    \Put@Line(40,-37)(5,-3){121}%
    \Put@Line(49,-22)(5,-3){121}%southeast triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(40,-47)(5,-3){121}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(40,-47)(5,-3){121}/(40,-47)(161,-120)%
  \else\if\@tmpb S%
       \Put@Line(40,-47)(5,-3){121}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(40,-47)(5,-3){121}%
       }%
  \else \Put@Line(40,-47)(5,-3){121}%
  \fi\fi\fi\fi\fi\fi%
  \putratom{170}{-187}{\@memberb}%==2 (southeast substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\SEbond}
%    \begin{macrocode}
\def\SEbond{%degree 90
\yl@xdiff=-5
\yl@ydiff=56
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
     \Put@Line(31,-46)(1,-1){100}%
     \Put@Line(49,-28)(1,-1){100}%southeast double bond
  \else\if\@tmpb T\relax%
     \Put@Line(27,-50)(1,-1){100}%
     \Put@Line(40,-37)(1,-1){100}%
     \Put@Line(53,-24)(1,-1){100}%southeast triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(53,-47)(1,-1){100}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(40,-47)(1,-1){100}/(40,-47)(140,-147)%
  \else\if\@tmpb S%
       \Put@Line(40,-47)(1,-1){100}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(40,-47)(1,-1){100}%
       }%
  \else \Put@Line(40,-47)(1,-1){100}%
  \fi\fi\fi\fi\fi\fi%
 \putratom{145}{-203}{\@memberb}%==3 (southeast substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\NWBbond}
%    \begin{macrocode}
\def\NWBond{%
\begin{sfpicture}(100,300)(0,0)
\yl@xdiff=9
\yl@ydiff=13
  \if\@tmpb D\relax%
    \Put@Line(-59,48)(-5,3){121}%
    \Put@Line(-73,26)(-5,3){121}%northwest double bond
  \else\if\@tmpb T\relax%
    \Put@Line(-57,52)(-5,3){121}%
    \Put@Line(-66,37)(-5,3){121}%
    \Put@Line(-75,22)(-5,3){121}%northwest triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(-66,47)(-5,3){121}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(-66,47)(-5,3){121}/(-66,47)(-187,120)%
  \else\if\@tmpb S%
       \Put@Line(-66,47)(-5,3){121}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(-66,47)(-5,3){121}%
       }%
  \else \Put@Line(-66,47)(-5,3){121}%
  \fi\fi\fi\fi\fi\fi%
  \putlatom{-196}{107}{\@memberb}%==2 (northwest substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\NWbond}
%    \begin{macrocode}
\def\NWbond{%
\begin{sfpicture}(100,300)(0,0)
\yl@xdiff=13
\yl@ydiff=10
  \if\@tmpb D\relax%
     \Put@Line(-41,46)(-1,1){100}%
     \Put@Line(-59,28)(-1,1){100}%northwest double bond
  \else\if\@tmpb T\relax%
     \Put@Line(-37,50)(-1,1){100}%
     \Put@Line(-50,37)(-1,1){100}%
     \Put@Line(-63,24)(-1,1){100}%northwest triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(-50,47)(-1,1){100}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(-50,47)(-1,1){100}/(-50,47)(-137,147)%
  \else\if\@tmpb S%
       \Put@Line(-50,47)(-1,1){100}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(-50,47)(-1,1){100}%
       }%
  \else \Put@Line(-50,47)(-1,1){100}%
  \fi\fi\fi\fi\fi\fi%
  \putlatom{-163}{137}{\@memberb}%==2 (northwest substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\SWBond}
%    \begin{macrocode}
\def\SWBond{%
\yl@xdiff=9
\yl@ydiff=67
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(-59,-48)(-5,-3){121}%
    \Put@Line(-73,-26)(-5,-3){121}%southwest double bond
  \else\if\@tmpb T\relax%
    \Put@Line(-57,-52)(-5,-3){121}%
    \Put@Line(-66,-37)(-5,-3){121}%
  \else\if\@tmpb B%(B) beta
    \Put@Line(-75,-22)(-5,-3){121}%southwest triple bond
    {\thicklines\Put@Line(-66,-47)(-5,-3){121}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(-66,-47)(-5,-3){121}/(-66,-47)(-187,-120)%
  \else\if\@tmpb S%
       \Put@Line(-66,-47)(-5,-3){121}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
         \Put@Line(-66,-47)(-5,-3){121}%
       }%
  \else \Put@Line(-66,-47)(-5,-3){121}%
  \fi\fi\fi\fi\fi\fi%
  \putlatom{-196}{-187}{\@memberb}%==2 (southwest substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\SWbond}
%    \begin{macrocode}
\def\SWbond{%
\yl@xdiff=13
\yl@ydiff=56
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
     \Put@Line(-41,-46)(-1,-1){100}%
     \Put@Line(-59,-28)(-1,-1){100}%southwest double bond
  \else\if\@tmpb T\relax%
     \Put@Line(-37,-50)(-1,-1){100}%
     \Put@Line(-50,-37)(-1,-1){100}%
     \Put@Line(-63,-24)(-1,-1){100}%southwest triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(-50,-47)(-1,-1){100}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(-50,-47)(-1,-1){100}/(-50,-47)(-137,-147)%
  \else\if\@tmpb S%
       \Put@Line(-50,-47)(-1,-1){100}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(-50,-47)(-1,-1){100}%
       }%
  \else \Put@Line(-50,-47)(-1,-1){100}%
  \fi\fi\fi\fi\fi\fi%
 \putlatom{-163}{-203}{\@memberb}%==3 (southwest substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{New command: \cs{NEBOND}}
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\NEBOND}
%    \begin{macrocode}
\def\NEBOND{%degree 120
\yl@xdiff=-1
\yl@ydiff=-10
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(48,33)(3,5){72}%
    \Put@Line(26,47)(3,5){72}%northeast double bond
  \else\if\@tmpb T\relax%
    \Put@Line(52,31)(3,5){72}%
    \Put@Line(37,40)(3,5){72}%
    \Put@Line(22,49)(3,5){72}%northeast triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(40,47)(3,5){72}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(47,40)(3,5){72}/(47,40)(120,161)%
  \else\if\@tmpb S%
       \Put@Line(47,40)(3,5){72}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(47,40)(3,5){72}%
       }%
  \else \Put@Line(47,40)(3,5){72}%
  \fi\fi\fi\fi\fi\fi%
  \putratom{120}{170}{\@memberb}%==2 (northeast substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{New command: \cs{SEBOND}}
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\SEBOND}
%    \begin{macrocode}
\def\SEBOND{%degree 120
\yl@xdiff=-1
\yl@ydiff=70
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(48,-33)(3,-5){72}%
    \Put@Line(26,-47)(3,-5){72}%southeast double bond
  \else\if\@tmpb T\relax%
    \Put@Line(52,-31)(3,-5){72}%
    \Put@Line(37,-40)(3,-5){72}%
    \Put@Line(22,-49)(3,-5){72}%southeast triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(47,-40)(3,-5){72}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(47,-40)(3,-5){72}/(47,-40)(120,-161)%
  \else\if\@tmpb S%
       \Put@Line(47,-40)(3,-5){72}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(47,-40)(3,-5){72}%
       }%
  \else \Put@Line(47,-40)(3,-5){72}%
  \fi\fi\fi\fi\fi\fi%
  \putratom{120}{-230}{\@memberb}%==2 (southeast substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{New command: \cs{NWBOND}}
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\NWBOND}
%    \begin{macrocode}
\def\NWBOND{%
\yl@xdiff=1
\yl@ydiff=-10
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(-48,33)(-3,5){72}%
    \Put@Line(-26,47)(-3,5){72}%northwest double bond
  \else\if\@tmpb T\relax%
    \Put@Line(-52,31)(-3,5){72}%
    \Put@Line(-37,40)(-3,5){72}%
    \Put@Line(-22,49)(-3,5){72}%northwest triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(-40,47)(-3,5){72}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(-47,40)(-3,5){72}/(-47,40)(-120,161)%
  \else\if\@tmpb S%
       \Put@Line(-47,40)(-3,5){72}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(-47,40)(-3,5){72}%
       }%
  \else \Put@Line(-47,40)(-3,5){72}%
  \fi\fi\fi\fi\fi\fi%
  \putlatom{-120}{170}{\@memberb}%==2 (northwest substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{New command: \cs{SWBOND}}
% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\SWBOND}
%    \begin{macrocode}
\def\SWBOND{%
\yl@xdiff=1
\yl@ydiff=70
\begin{sfpicture}(100,300)(0,0)
  \if\@tmpb D\relax%
    \Put@Line(-48,-33)(-3,-5){72}%
    \Put@Line(-26,-47)(-3,-5){72}%southwest double bond
  \else\if\@tmpb T\relax%
    \Put@Line(-52,-31)(-3,-5){72}%
    \Put@Line(-37,-40)(-3,-5){72}%
    \Put@Line(-22,-49)(-3,-5){72}%southwest triple bond
  \else\if\@tmpb B%(B) beta
    {\thicklines\Put@Line(-47,-40)(-3,-5){72}}% single bond (alpha)
  \else\if\@tmpb A%(A) alpha
       \dotorline(-47,-40)(-3,-5){72}/(-47,-40)(-120,-161)%
  \else\if\@tmpb S%
       \Put@Line(-47,-40)(-3,-5){72}%
  \else\if\@tmpb U% undefined
       {%
       \WaveBonds%
       \Put@Line(-47,-40)(-3,-5){72}%
       }%
  \else \Put@Line(-47,-40)(-3,-5){72}%
  \fi\fi\fi\fi\fi\fi%
  \putlatom{-120}{-230}{\@memberb}%==2 (southwest substituent)
\end{sfpicture}}%
%    \end{macrocode}
% \end{macro}
%
% \section{Tetrahedral unit}
%
% The macro |\tetrahedral| typesets a compound of tetravalency. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% ********************
% * tetrahedral unit *
% ********************
%
%                1
%
%                |
%          2  -- 0 --  4       0 <== the original point
%                |
%
%                3
% \end{verbatim}
% 
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \tetrahedral[AUXLIST]{SUBSLIST}<L1,L2,L3,L4>
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%        {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
% 
% 
% The arguments |Ln| (n = 1, 2, 3, 4) represents the bond length 
% of the bond 0--n (n = 1, 2, 3, 4). This is used to realize variable 
% bond lengths. The vacant for the |Ln| depicts a bond of the standard  
% bond length. 
% \changes{v4.01}{2004/8/30}{Variable bond length.}
% 
%
% \begin{verbatim}
%       e.g. 
%        
%        \tetrahedral{1==Cl;2==F}
%        \tetrahedral{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{yltetrahedralposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \changes{v4.01}{2004/8/30}{Variable sized central atoms} 
% \changes{v4.05}{2009/11/07}{bug fix: @tetrahedral to @@tetrahedral} 
% \changes{v5.00}{2010/10/01}{for bond coloring} 
%
% \begin{macro}{\tetrahedral}
% \begin{macro}{\@tetrahedral}
%    \begin{macrocode}
\def\tetrahedral{\@ifnextchar[{\@tetrahedral[r}{\@tetrahedral[r]}}
\def\@tetrahedral#1]#2{%
\@ifnextchar<{\@@tetrahedral#1]{#2}}{\@@tetrahedral#1]{#2}<,,,>}}%bug @ added 2009/11/07
\def\@@tetrahedral#1]#2<#3,#4,#5,#6>{%
\@reset@ylsw%
\West@bondfalse
\East@bondfalse
\centralatomcheck{#2}%
\yltetrahedralposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){tetrahedral}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{47}{50}{\scriptsize\@@tmpb}}\fi}%
%%%%%%%%%%%%%%%%%%%%%%
%setting central atom%
%%%%%%%%%%%%%%%%%%%%%%
\@tempdima=0pt
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%central atom
\setbox9=\hbox{\@memberb}%
\ifdim\wd9<0.72em
\@tempdima=0.72em
{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%
\else
\ifWest@bond
\@tempdima=\wd9
{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb}}}%central atom
%%%\global\West@bondfalse
\else
\@tempdima=\wd9
{\putlratom{-40}{-33}{\hbox to.72em{\@memberb\hss}}}%central atom
\fi\fi
\else%%no action
\fi%end of ifcase%
\fi\fi}%
%%%%%%%%%%%%%%%%%%%%%%
%%setting four bonds%%
%%%%%%%%%%%%%%%%%%%%%%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
\or
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Northbond[#3]}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Northbond[#3]}%
\else
\setBScolor{\Put@Direct(0,0){\Northbond[#3]}}%
%\Put@Direct(0,0){\Northbond[#3]}%
\fi
\or{%
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Westbond[#4]}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Westbond[#4]}%
\else
\setBScolor{\Put@Direct(0,0){\Westbond[#4]}}%
%\Put@Direct(0,0){\Westbond[#4]}%
\fi
}%
\or
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Southbond[#5]}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Southbond[#5]}%
\else
\setBScolor{\Put@Direct(0,0){\Southbond[#5]}}%
%\Put@Direct(0,0){\Southbond[#5]}%
\fi
\or{%
\ifno@centeratom%
\setBScolor{\Put@Direct(0,0){\Eastbond[#6]}}%
%\Put@Direct(0,0){\Eastbond[#6]}%
\else%
%\advance\@tempdima by-0.72em
%\Put@Direct(0,0){\kern\@tempdima\Eastbond[#6]}%
\setBScolor{\Put@Direct(0,0){\kern\@tempdima\kern-0.72em\Eastbond[#6]}}%
%\Put@Direct(0,0){\kern\@tempdima\kern-0.72em\Eastbond[#6]}%
\fi}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\West@bondfalse
\East@bondfalse
}%end of macro tetrahedral
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \changes{v4.01}{2004/8/30}{Newly added macro: 
% \cs{centralatomcheck}}
%
% \begin{macro}{\centralatomcheck}
%    \begin{macrocode}
\def\centralatomcheck#1{%
\no@centeratomtrue%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax
\expandafter\threech@r\@membera{}{}\relax
\ifcase\@tmpa\relax%
\no@centeratomfalse%
\else%no action
\fi\fi%
}}
%    \end{macrocode}
% \end{macro}
%
% The command |\yltetrahedralposition| is used in 
% |\tetrahedral| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{yltetrahedralposition}}
% \changes{v4.01}{2004/8/30}{Newly added switches: 
% \cs{ifEast@bond} and \cs{ifWest@bond}}
% \changes{v5.01}{2013/7/30}{Bug fix}
%
% \begin{macro}{\yltetrahedralposition}
%    \begin{macrocode}
\newif\ifEast@bond
\newif\ifWest@bond
\def\yltetrahedralposition#1{%
\@@ylswfalse%%%\@reset@ylsw
\reset@@yl%%2013/07/30bug fix
\West@bondfalse
\East@bondfalse
\@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%
 \or%
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 1
  \else%
   \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
  \fi%
 \or%
  \ifno@centeratom%
    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \else%
    \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%
  \fi%
  \East@bondtrue%W subst. on 1
 \or% 
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%S subst. on 1
  \else%
   \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
  \fi%
 \or% 
  \ifno@centeratom%
%   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%??????
   \gdef\@ylii{-72}\gdef\@yli{0}\global\@ylswtrue%??????
  \else%
   \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%
  \fi%
     \West@bondtrue%E subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \section{Divalenth unit}
%
% The command |\divalenth| produces a length-variable divalent unit.
% \changes{v2.00}{1998/12/14}{New command: \cs{divalenth}} 
% \changes{v5.00}{2010/10/01}{for bond coloring} 
%
% \begin{verbatim}
% ******************
% * Divalenth unit *
% ******************
%
%               
%
%          1  -- (group) --  2       0 <== the original point
%
% \end{verbatim}
% 
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |GROUP|. 
%
% \begin{verbatim}
%   \divalenth{GROUP}{SUBSLIST}
% \end{verbatim}
%
% The arugument |GROUP| designates a character strings representing 
% a divalent group.  The locant number is fixed to be zero. 
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
%
% \begin{macro}{\divalenth}
%    \begin{macrocode}
\def\divalenth#1#2{%
\@reset@ylsw%
\yldivalenthposition{#1}{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,400)(-300,-200){\divalenth}%2002/4/30 by S. Fujita
(300,200)%
{\expandafter\@m@mb@r#1;\relax
   \putratom{-30}{-33}{\@memberb}}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
\or\setBScolor{\Put@Direct(0,0){\Westbond}}%
%\Put@Direct(0,0){\Westbond}%
\or\setBScolor{\Put@Direct(\the\@tempcnta,0){\Eastbond}}%
%\Put@Direct(\the\@tempcnta,0){\Eastbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
}%end of macro tetrahedral
%    \end{macrocode}
% \end{macro}
%
% The command |\yldivalenthposition| is used in 
% |\tetrahedral| to adjust a substitution position. 
% \changes{v2.00}{1998/12/14}{Newly added command: 
% \cs{yldivalenthposition}}
%
% \begin{macro}{\yldivalenthposition}
%    \begin{macrocode}
\def\yldivalenthposition#1#2{%
{\expandafter\@m@mb@r#1;\relax
   \setbox0=\hbox{\@memberb}%
   \@tempcnta=\wd0
   \@tempcntb=\unitlength
   \divide\@tempcnta by\@tempcntb
   \global\advance\@tempcnta by-62%
   \@tempcntb=\@tempcnta \global\advance\@tempcntb by50\relax
   }%
\@@ylswfalse%
\@forsemicol\member:=#2\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
 \or \gdef\@ylii{50}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
 \or \edef\@ylii{-\the\@tempcntb}\gdef\@yli{0}\global\@ylswtrue%E subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \section{Trigonal unit}
% \subsection{Right-hand trigonal unit (narrow type)}
%
% The macro |\rtrigonal| typesets a compound of trivalency. 
% The following numbering is adopted in this macro. 
% The two right-hand bonds form an angle of 90$^{\circ}$ (narrow type), 
% while the left-hand bond is typeset horizontally.  
%
% \begin{verbatim}
% *************************
% * trigonal unit (right) *
% *************************
%
%                      3
%                    /
%                  /
%         1  --- 0  90      0 <== the original point
%                 `
%                   `
%                     2
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \rtrigonal[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%       {0+}:  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \rtrigonal{1==Cl;2==F}
%        \rtrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
%
% \changes{v1.02}{1998/10/31}{Adding \cs{ylrtrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring} 
%
% \begin{macro}{\rtrigonal}
% \begin{macro}{\@rtrigonal}
%    \begin{macrocode}
\def\rtrigonal{\@ifnextchar[{\@rtrigonal[r}{\@rtrigonal[r]}}
\def\@rtrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\West@bondfalse
\East@bondfalse
\ylrtrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){rtrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\Westbond}}%
%\Put@Direct(0,0){\Westbond}%
\or\setBScolor{\Put@Direct(0,0){\SEbond}}%
%\Put@Direct(0,0){\SEbond}%
\or\setBScolor{\Put@Direct(0,0){\NEbond}}%
%\Put@Direct(0,0){\NEbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\endgroup}%end of macro rtrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylrtrigonalposition| is used in 
% |\rtrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylrtrigonalposition}}
%
% \begin{macro}{\ylrtrigonalposition}
%    \begin{macrocode}
\def\ylrtrigonalposition#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
 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Right-hand trigonal unit (broad type)}
%
% The macro |\Rtrigonal| typesets a compound of trivalency. 
% The following numbering is adopted in this macro. 
% The two right-hand bonds form an angle of 120$^{\circ}$ (broad type), 
% while the left-hand bond is typeset horizontally.  
% \changes{v1.02}{1998/10/20}{New command: \cs{Rtrigonal}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{verbatim}
% *************************
% * trigonal unit (right) *
% *************************
%
%                      3
%                    /
%                  /
%         1  --- 0  120      0 <== the original point
%                 `
%                   `
%                     2
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \rtrigonal[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%       {0+}:  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \rtrigonal{1==Cl;2==F}
%        \rtrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
%
% \changes{v1.02}{1998/10/31}{Adding \cs{ylRtrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
%
% \begin{macro}{\Rtrigonal}
% \begin{macro}{\@Rtrigonal}
%    \begin{macrocode}
\def\Rtrigonal{\@ifnextchar[{\@Rtrigonal[r}{\@Rtrigonal[r]}}
\def\@Rtrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\West@bondfalse
\East@bondfalse
\ylRtrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){Rtrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\Westbond}}%
%\Put@Direct(0,0){\Westbond}%
\or\setBScolor{\Put@Direct(0,0){\SEBOND}}%
%\Put@Direct(0,0){\SEBOND}%
\or\setBScolor{\Put@Direct(0,0){\NEBOND}}%
%\Put@Direct(0,0){\NEBOND}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\endgroup}%end of macro Rtrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylRtrigonalposition| is used in 
% |\Rtrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylRtrigonalposition}}
%
% \begin{macro}{\ylRtrigonalposition}
%    \begin{macrocode}
\def\ylRtrigonalposition#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
 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
 \or \gdef\@ylii{-47}\gdef\@yli{40}\global\@ylswtrue% SE subst. on 1
 \or \gdef\@ylii{-47}\gdef\@yli{-40}\global\@ylswtrue% NE subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Left-hand trigonal unit (narrow type)}
%
% The macro |\ltrigonal| typesets a compound of trivalency. 
% The following numbering is adopted in this macro. 
% The two left-hand bonds form an angle of 90$^{\circ}$ (narrow type), 
% while the right-hand bond is typeset horizontally.  
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{verbatim}
% ************************
% * trigonal unit (left) *
% ************************
%
%         2
%           ` 
%             `
%          90   0 --- 1       0 <== the original point
%             /
%           /
%         3
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \ltrigonal[AUXLIST]{SUBSLIST}          
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%      {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \ltrigonal{1==Cl;2==F}
%        \ltrigonal{0==C;1==Cl;2==F;3==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylltrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.01}{2004/8/30}{Variable sized central atoms} 
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\ltrigonal}
% \begin{macro}{\@ltrigonal}
%    \begin{macrocode}
\def\ltrigonal{\@ifnextchar[{\@ltrigonal[r}{\@ltrigonal[r]}}
\def\@ltrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\West@bondfalse
\East@bondfalse
\ylltrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){ltrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
\@tempdima=0pt
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
\setbox9=\hbox{\@memberb}%
\ifdim\wd9<0.72em
\@tempdima=0.72em
{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%central atom
\else
\ifWest@bond
\@tempdima=\wd9
{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb}}}%central atom
\else
\@tempdima=\wd9
{\putlratom{-40}{-33}{\hbox to.72em{\@memberb\hss}}}%central atom
\fi\fi
\else%%no action
\fi%end of ifcase
\fi\fi}%
%%%%%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
\or{%
\advance\@tempdima by-0.72em
\setBScolor{\Put@Direct(0,0){\kern\@tempdima\Eastbond}}}%
%\Put@Direct(0,0){\kern\@tempdima\Eastbond}}%
\or{%
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWbond}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWbond}%
\else
\setBScolor{\Put@Direct(0,0){\NWbond}}%
%\Put@Direct(0,0){\NWbond}%
\fi
}%
\or{%
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWbond}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWbond}%
\else
\setBScolor{\Put@Direct(0,0){\SWbond}}%
%\Put@Direct(0,0){\SWbond}%
\fi
}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\West@bondfalse
\East@bondfalse
\endgroup}%end of macro ltrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylltrigonalposition| is used in 
% |\ltrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylltrigonalposition}}
% \changes{v4.01}{2004/8/30}{Newly added switch: 
% \cs{ifWest@bond}}
%
% \begin{macro}{\ylltrigonalposition}
%    \begin{macrocode}
\def\ylltrigonalposition#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
 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% E subst. on 1
      \West@bondtrue%
 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Left-hand trigonal unit (broad type)}
%
% The macro |\Ltrigonal| typesets a compound of trivalency. 
% The following numbering is adopted in this macro. 
% The two left-hand bonds form an angle of 120$^{\circ}$ (broad type), 
% while the right-hand bond is typeset horizontally.  
% \changes{v1.02}{1998/10/20}{New command: \cs{Ltrigonal}}
%
% \begin{verbatim}
% ************************
% * trigonal unit (left) *
% ************************
%
%         2
%           ` 
%             `
%         120   0 --- 1       0 <== the original point
%             /
%           /
%         3
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \Ltrigonal[AUXLIST]{SUBSLIST}          
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%      {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \Ltrigonal{1==Cl;2==F}
%        \Ltrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylLtrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.01}{2004/8/30}{Variable sized central atoms} 
% \changes{v4.01}{2004/8/30}{Newly added switch: 
% \cs{ifWest@bond}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\Ltrigonal}
% \begin{macro}{\@Ltrigonal}
%    \begin{macrocode}
\def\Ltrigonal{\@ifnextchar[{\@Ltrigonal[r}{\@Ltrigonal[r]}}
\def\@Ltrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\West@bondfalse
\East@bondfalse
\ylLtrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){Ltrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
\@tempdima=0pt
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
\setbox9=\hbox{\@memberb}%
\ifdim\wd9<0.72em
\@tempdima=0.72em
{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%central atom
\else
\ifWest@bond
\@tempdima=\wd9
{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb}}}%central atom
%%%%\global\West@bondfalse
\else
\@tempdima=\wd9
{\putlratom{-40}{-33}{\hbox to.72em{\@memberb\hss}}}%central atom
\fi\fi
\else%%no action
\fi%end of ifcase
\fi\fi}%
%%%%%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
\or{%
\advance\@tempdima by-0.72em
\setBScolor{\Put@Direct(0,0){\kern\@tempdima\Eastbond}}}%
%\Put@Direct(0,0){\kern\@tempdima\Eastbond}}%
\or{%
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWBOND}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWBOND}%
\else
\setBScolor{\Put@Direct(0,0){\NWBOND}}%
%\Put@Direct(0,0){\NWBOND}%
\fi
}%
\or{%
\ifWest@bond
\setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWBOND}}%
%\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWBOND}%
\else
\setBScolor{\Put@Direct(0,0){\SWBOND}}%
%\Put@Direct(0,0){\SWBOND}%
\fi
}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\West@bondfalse
\East@bondfalse
\endgroup}%end of macro Ltrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylLtrigonalposition| is used in 
% |\Ltrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylLtrigonalposition}}
%
% \begin{macro}{\ylLtrigonalposition}
%    \begin{macrocode}
\def\ylLtrigonalposition#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
 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% E subst. on 1
     \West@bondtrue%
 \or \gdef\@ylii{47}\gdef\@yli{-40}\global\@ylswtrue% NWB subst. on 1
 \or \gdef\@ylii{47}\gdef\@yli{40}\global\@ylswtrue% SWB subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Upward trigonal unit (narrow type)}
%
% The macro |\utrigonal| typesets a compound of trivalency. 
% The two upward bonds form an angle of 90$^{\circ}$ (narrow type), 
% while the downward bond is typeset vertically.  
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% **********************
% * trigonal unit (up) *
% **********************
%
% The following numbering is adopted in this macro. 
%
%         3       .   2
%           `   90  /
%             `   /
%               0        0 <== the original point
%               |
%               |
%               1
%
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \utrigonal[AUXLIST]{SUBSLIST}          
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%      {0+}:  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \utrigonal{1==Cl;2==F}
%        \utrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylutrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring} 
%
% \begin{macro}{\utrigonal}
% \begin{macro}{\@utrigonal}
%    \begin{macrocode}
\def\utrigonal{\@ifnextchar[{\@utrigonal[r}{\@utrigonal[r]}}
\def\@utrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%2013/04/01 added 
\ylutrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){utrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
{\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\Southbond}}%
%\Put@Direct(0,0){\Southbond}%
\or\setBScolor{\Put@Direct(0,0){\NEbond}}%
%\Put@Direct(0,0){\NEbond}%
\or\setBScolor{\Put@Direct(0,0){\NWbond}}%
%\Put@Direct(0,0){\NWbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\endgroup}%end of macro utrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylutrigonalposition| is used in 
% |\utrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylutrigonalposition}}
%
% \begin{macro}{\ylutrigonalposition}
%    \begin{macrocode}
\def\ylutrigonalposition#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
 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Upward trigonal unit (broad type)}
%
% The macro |\Utrigonal| typesets a compound of trivalency. 
% The two upward bonds form an angle of 120$^{\circ}$ (broad type), 
% while the downward bond is typeset vertically.  
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% **********************
% * trigonal unit (up) *
% **********************
%
%         3           2
%           `  120  /
%             `   /
%               0        0 <== the original point
%               |
%               |
%               1
%
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \Utrigonal[AUXLIST]{SUBSLIST}          
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+}:  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \Utrigonal{1==Cl;2==F}
%        \Utrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylutrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\Utrigonal}
% \begin{macro}{\@Utrigonal}
%    \begin{macrocode}
\def\Utrigonal{\@ifnextchar[{\@Utrigonal[r}{\@Utrigonal[r]}}
\def\@Utrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\ylUtrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){Utrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
{\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\Southbond}}%
%\Put@Direct(0,0){\Southbond}%
\or\setBScolor{\Put@Direct(0,0){\NEBond}}%
%\Put@Direct(0,0){\NEBond}%
\or\setBScolor{\Put@Direct(0,0){\NWBond}}%
%\Put@Direct(0,0){\NWBond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\endgroup}%end of macro Utrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylUtrigonalposition| is used in 
% |\Utrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylUtrigonalposition}}
%
% \begin{macro}{\ylUtrigonalposition}
%    \begin{macrocode}
\def\ylUtrigonalposition#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
 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NEB subst. on 1
 \or \gdef\@ylii{66}\gdef\@yli{-47}\global\@ylswtrue% NWB subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Downward trigonal unit (narrow type)}
%
% The macro |\dtrigonal| typesets a compound of trivalency. 
% The upward bond is typeset vertically.  
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% ************************
% * trigonal unit (down) *
% ************************
%
% The following numbering is adopted in this macro. 
%
%                1
%                |
%                |
%                0       0 <== the original point
%              /  `
%            /  90  `
%          2          3
%
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \dtrigonal[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \dtrigonal{1==Cl;2==F}
%        \dtrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{yldtrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\dtrigonal}
% \begin{macro}{\@dtrigonal}
%    \begin{macrocode}
\def\dtrigonal{\@ifnextchar[{\@dtrigonal[r}{\@dtrigonal[r]}}
\def\@dtrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\yldtrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){dtrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
{\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\Northbond}}%
%\Put@Direct(0,0){\Northbond}%
\or\setBScolor{\Put@Direct(0,0){\SEbond}}%
%\Put@Direct(0,0){\SEbond}%
\or\setBScolor{\Put@Direct(0,0){\SWbond}}%
%\Put@Direct(0,0){\SWbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\endgroup}%end of macro dtrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\yldtrigonalposition| is used in 
% |\dtrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{yldtrigonalposition}}
%
% \begin{macro}{\yldtrigonalposition}
%    \begin{macrocode}
\def\yldtrigonalposition#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
 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Downward trigonal unit (broad type)}
%
% The macro |\Dtrigonal| typesets a compound of trivalency. 
% The upward bond is typeset vertically.  
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% ************************
% * trigonal unit (down) *
% ************************
%
% The following numbering is adopted in this macro. 
%
%                1
%                |
%                |
%                0       0 <== the original point
%              /  `
%            /  120 `
%          2          3
%
% \end{verbatim}
%
% This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \Dtrigonal[AUXLIST]{SUBSLIST}          
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+}:  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 3 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \Dtrigonal{1==Cl;2==F}
%        \Dtrigonal{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylDtrigonalposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\Dtrigonal}
% \begin{macro}{\@Dtrigonal}
%    \begin{macrocode}
\def\Dtrigonal{\@ifnextchar[{\@Dtrigonal[r}{\@Dtrigonal[r]}}
\def\@Dtrigonal#1]#2{%
\begingroup
\@reset@ylsw%
\ylDtrigonalposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){Dtrigonal}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa
{\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\Northbond}}%
%\Put@Direct(0,0){\Northbond}%
\or\setBScolor{\Put@Direct(0,0){\SEBond}}%
%\Put@Direct(0,0){\SEBond}%
\or\setBScolor{\Put@Direct(0,0){\SWBond}}%
%\Put@Direct(0,0){\SWBond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
\endgroup}%end of macro Dtrigonal
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylDtrigonalposition| is used in 
% |\Dtrigonal| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylDtrigonalposition}}
%
% \begin{macro}{\ylDtrigonalposition}
%    \begin{macrocode}
\def\ylDtrigonalposition#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
 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SEB subst. on 1
 \or \gdef\@ylii{66}\gdef\@yli{47}\global\@ylswtrue% SWB subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \section{Ethylene derivative}
% \subsection{Horizontal ethylene unit (narrow type)}
%
% The macro |\ethylene| typesets ethylene derivatives. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% *****************
% * ethylene unit *
% *****************
%
%         1                4
%           `            /
%             `        /
%          90  (1)===(2) 90     (1) <== the original point
%             /        `
%           /            `
%         2                3
% \end{verbatim}
%
% \begin{verbatim}
%   \ethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
% \end{verbatim}
%
% The arugument |BONDLIST| designates the bond between atom (1) and 
% atom (2) as well as charges on these centeral atoms.
%
% \begin{verbatim}
%     BONDLIST: list of inner bonds and charges
%
%           {n+}       :  + charge (or another one chararacter) on n-atom
%             d        :  inner double bond (between (1) and (2))
%             t        :  inner triple bond (between (1) and (2))
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
% \end{verbatim}
%
% The arugument |ATOMLIST| designates the list of central atoms. 
%
% \begin{verbatim}
%     ATOMLIST: list of central atoms
%           n          :  atom for n-position (e.g. 1==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \ethylene{}{1==Cl;2==F}
%        \ethylene{}{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenepositiona}, 
% \cs{ylethylenepositionb}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\ethylene}
% \begin{macro}{\@ethylene}
%    \begin{macrocode}
\def\ethylene{\@ifnextchar[{\@ethylene}{\@ethylene[]}}
\def\@ethylene[#1]#2#3{%
\@reset@ylsw%
\ylethylenepositiona{#3}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else
\ylethylenepositionb{#3}%
\fi
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{-230}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(800,600)(-300,-300){ethylene}%2002/4/30 by S. Fujita
(300,300)%
{\def\aaa{#1}\ifx\aaa\empty%
% \Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond
 \Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}\fi%2010/10/01
}%
\@tfor\member:=#1\do{%
 \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}%
   \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}%
   \else\if\@@tmpa d\relax%
%       {\Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}}% double bond
       {\Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
   \else\if\@@tmpa t\relax%
%     {\Multiput@Direct(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right
     {\Multiput@Direct(42,-20)(0,20){3}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
   \fi\fi\fi\fi}%
{\def\aaa{#2}%
\ifx\aaa\empty%
\putratom{-40}{-33}{C}%central atom
\putratom{190}{-33}{C}%central atom
\else%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa%
\or\putratom{-40}{-33}{\@memberb}%central atom
\or\putratom{190}{-33}{\@memberb}%central atom
\fi\fi}%end of ifcase
\fi%
}%
\@forsemicol\member:=#3\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%
\or\setBScolor{\Put@Direct(0,0){\NWbond}}%
%\Put@Direct(0,0){\NWbond}%
\or\setBScolor{\Put@Direct(0,0){\SWbond}}%
%\Put@Direct(0,0){\SWbond}%
\or\setBScolor{\Put@Direct(230,0){\SEbond}}%
%\Put@Direct(230,0){\SEbond}%
\or\setBScolor{\Put@Direct(230,0){\NEbond}}%
%\Put@Direct(230,0){\NEbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
}%end of macro ethylene
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ethyleneh}
%    \begin{macrocode}
\let\ethyleneh=\ethylene
%    \end{macrocode}
% \end{macro}
%
% The commands |\ylethylenepositiona| and |\ylethylenepositiona| 
% are  used in |\ethylene| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylethylenepositiona} and \cs{ylethylenepositionb}}
%
% \begin{macro}{\ylethylenepositiona}
% \begin{macro}{\ylethylenepositionb}
%    \begin{macrocode}
\def\ylethylenepositiona#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
 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
\def\ylethylenepositionb#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
 \or%omit 
 \or%omit
 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Horizontal ethylene unit (broad type)}
%
% The macro |\Ethylene| typesets ethylene derivatives. 
% The following numbering is adopted in this macro. 
% \changes{v1.02}{1998/10/20}{New command: \cs{Ethylene}}
%
% \begin{verbatim}
% *****************
% * ethylene unit *
% *****************
%
%         1                4
%           `            /
%             `        /
%         120  (1)===(2) 120     (1) <== the original point
%             /        `
%           /            `
%         2                3
% \end{verbatim}
%
% \begin{verbatim}
%   \Ethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
% \end{verbatim}
%
% The arugument |BONDLIST| designates the bond between atom (1) and 
% atom (2) as well as charges on these centeral atoms.
%
% \begin{verbatim}
%     BONDLIST: list of inner bonds and charges
%
%           {n+}       :  + charge (or another one chararacter) on n-atom
%             d        :  inner double bond (between (1) and (2))
%             t        :  inner triple bond (between (1) and (2))
% \end{verbatim}
%
% The arugument |SUBLIST| designates a set of substitutients. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
% \end{verbatim}
%
% The arugument |ATOMLIST| designates the list of central atoms. 
%
% \begin{verbatim}
%     ATOMLIST: list of central atoms
%           n          :  atom for n-position (e.g. 1==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \Ethylene{}{1==Cl;2==F}
%        \Ethylene{}{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenepositiona}, 
% \cs{ylethylenepositionb}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\Ethylene}
% \begin{macro}{\@Ethylene}
%    \begin{macrocode}
\def\Ethylene{\@ifnextchar[{\@Ethylene}{\@Ethylene[]}}%bug \@ethylene --> \@Ethylene
\def\@Ethylene[#1]#2#3{%
\@reset@ylsw%
\ylethylenepositiona{#3}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else
\ylethylenepositionb{#3}%
\fi
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{-230}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(800,600)(-300,-300){Ethylene}%2002/4/30 by S. Fujita
(300,300)%
{\def\aaa{#1}\ifx\aaa\empty%
% \Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond
 \Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}\fi%2010/10/01
}%
\@tfor\member:=#1\do{%
 \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}%
   \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}%
   \else\if\@@tmpa d\relax%
%       {\Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}}% double bond
       {\Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
   \else\if\@@tmpa t\relax%
%     {\Multiput@Direct(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right
     {\Multiput@Direct(42,-20)(0,20){3}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
   \fi\fi\fi\fi}%
{\def\aaa{#2}%
\ifx\aaa\empty%
\putratom{-40}{-33}{C}%central atom
\putratom{190}{-33}{C}%central atom
\else%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa%
\or\putratom{-40}{-33}{\@memberb}%central atom
\or\putratom{190}{-33}{\@memberb}%central atom
\fi\fi}%end of ifcase
\fi%
}%
\@forsemicol\member:=#3\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%
\or\setBScolor{\Put@Direct(0,0){\NWBOND}}%
%\Put@Direct(0,0){\NWBOND}%
\or\setBScolor{\Put@Direct(0,0){\SWBOND}}%
%\Put@Direct(0,0){\SWBOND}%
\or\setBScolor{\Put@Direct(230,0){\SEBOND}}%
%\Put@Direct(230,0){\SEBOND}%
\or\Put@Direct(230,0){\NEBOND}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
}%end of macro Ethylene
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\Ethyleneh}
%    \begin{macrocode}
\let\Ethyleneh=\Ethylene
%    \end{macrocode}
% \end{macro}
%
% \subsection{Vertical ethylene unit (narrow type)}
%
% The macro |\ethylenev| typesets ethylene derivatives in a 
% vatical manner. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% ****************************
% * ethylene unit (vertical) *
% ****************************
%
% The following numbering is adopted in this macro. 
%
%         4          3
%           `  90  /
%             `  /
%              (2)
%               ||
%               ||
%              (1)  <== the original point
%             /  `
%           /  90 `
%         1         2
%
% \end{verbatim}
%
% \begin{verbatim}
%   \ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST}
% \end{verbatim}
%
% \begin{verbatim}
%     BONDLIST: list of inner bonds and charges
%
%           {n+}  :  + charge (or another one chararacter) on n-atom
%             d   :  inner double bond (between (1) and (2))
%             t   :  inner triple bond (between (1) and (2))
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
% \end{verbatim}
%
% \begin{verbatim}
%     ATOMLIST: list of central atoms
%           n          :  atom for n-position (e.g. 1==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \ethylenev{1==Cl;2==F}
%        \ethylenev{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenevpositiona}, 
% \cs{ylethylenevpositionb}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\ethylenev}
% \begin{macro}{\@ethylenev}
%    \begin{macrocode}
\def\ethylenev{\@ifnextchar[{\@ethylenev}{\@ethylenev[]}}
\def\@ethylenev[#1]#2#3{%
\@reset@ylsw%
\ylethylenevpositiona{#3}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else
\ylethylenevpositionb{#3}%
\fi
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{-230}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,800)(-300,-300){ethylenev}%2002/4/30 by S. Fujita
(300,300)%
\def\aaa{#1}\ifx\aaa\empty%
    \Put@Line(-20,47)(0,1){140}% vertical
    \Put@Line(6,47)(0,1){140}\fi%  double bond
\@tfor\member:=#1\do{%
 \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb}
   \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb}
   \else\if\@@tmpa d\relax%
      \Put@Line(-13,47)(0,1){140}% vertical
      \Put@Line(13,47)(0,1){140}%  double bond
   \else\if\@@tmpa t\relax%
      \Put@Line(-20,47)(0,1){140}% vertical
      \Put@Line(-0,47)(0,1){140}%   triple bond
      \Put@Line(20,47)(0,1){140}%
   \fi\fi\fi\fi}%
\def\aaa{#2}%
\ifx\aaa\empty%
\putratom{-40}{-33}{C}%central atom
\putratom{-40}{197}{C}%central atom
\else%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa%
\or\putratom{-40}{-33}{\@memberb}%central atom
\or\putratom{-40}{197}{\@memberb}%central atom
\fi\fi}%end of ifcase
\fi% 
\@forsemicol\member:=#3\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%
\or\setBScolor{\Put@Direct(0,0){\SWbond}}%
%\Put@Direct(0,0){\SWbond}%
\or\setBScolor{\Put@Direct(0,0){\SEbond}}%
%\Put@Direct(0,0){\SEbond}%
\or\setBScolor{\Put@Direct(0,230){\NEbond}}%
%\Put@Direct(0,230){\NEbond}%
\or\setBScolor{\Put@Direct(0,230){\NWbond}}%
%\Put@Direct(0,230){\NWbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
}%end of macro ethylenev
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The commands |\ylethylenevpositiona| and |\ylethylenevpositiona| 
% are  used in |\ethylenev| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: 
% \cs{ylethylenevpositiona} and \cs{ylethylenevpositionb}}
%
% \begin{macro}{\ylethylenepositiona}
% \begin{macro}{\ylethylenepositionb}
%    \begin{macrocode}
\def\ylethylenevpositiona#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
 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
\def\ylethylenevpositionb#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
 \or%omit 
 \or%omit
 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Vertical ethylene unit (broad type)}
%
% The macro |\Ethylenev| typesets ethylene derivatives in a 
% vatical manner. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% ****************************
% * ethylene unit (vertical) *
% ****************************
%
%         4          3
%           `  120 /
%             `  /
%              (2)
%               ||
%               ||
%              (1)  <== the original point
%             /  `
%           /  120 `
%         1          2
% \end{verbatim}
%
% \begin{verbatim}
%   \Ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST}
% \end{verbatim}
%
% \begin{verbatim}
%     BONDLIST: list of inner bonds and charges
%
%           {n+} :  + charge (or another one chararacter) on n-atom
%             d  :  inner double bond (between (1) and (2))
%             t  :  inner triple bond (between (1) and (2))
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
% \end{verbatim}
%
% \begin{verbatim}
%     ATOMLIST: list of central atoms
%           n          :  atom for n-position (e.g. 1==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \Ethylenev{1==Cl;2==F}
%        \Ethylenev{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenevpositiona}, 
% \cs{ylethylenevpositionb}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\Ethylenev}
% \begin{macro}{\@Ethylenev}
%    \begin{macrocode}
\def\Ethylenev{\@ifnextchar[{\@Ethylenev}{\@Ethylenev[]}}
\def\@Ethylenev[#1]#2#3{%
\@reset@ylsw%
\ylethylenevpositiona{#3}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else
\ylethylenevpositionb{#3}%
\fi
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{-230}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,800)(-300,-300){Ethylenev}%2002/4/30 by S. Fujita
(300,300)%
\def\aaa{#1}\ifx\aaa\empty%
    \Put@Line(-20,47)(0,1){140}% vertical
    \Put@Line(6,47)(0,1){140}\fi%  double bond
\@tfor\member:=#1\do{%
 \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb}
   \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb}
   \else\if\@@tmpa d\relax%
      \Put@Line(-13,47)(0,1){140}% vertical
      \Put@Line(13,47)(0,1){140}%   double bond
   \else\if\@@tmpa t\relax%
      \Put@Line(-20,47)(0,1){140}% vertical
      \Put@Line(-0,47)(0,1){140}%   triple bond
      \Put@Line(20,47)(0,1){140}%
   \fi\fi\fi\fi}%
\def\aaa{#2}%
\ifx\aaa\empty%
\putratom{-40}{-33}{C}%central atom
\putratom{-40}{197}{C}%central atom
\else%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa%
\or\putratom{-40}{-33}{\@memberb}%central atom
\or\putratom{-40}{197}{\@memberb}%central atom
\fi\fi}%end of ifcase
\fi% 
\@forsemicol\member:=#3\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa%
\or\setBScolor{\Put@Direct(0,0){\SWBond}}%
%\Put@Direct(0,0){\SWBond}%
\or\setBScolor{\Put@Direct(0,0){\SEBond}}%
%\Put@Direct(0,0){\SEBond}%
\or\setBScolor{\Put@Direct(0,230){\NEBond}}%
%\Put@Direct(0,230){\NEBond}%
\or\setBScolor{\Put@Direct(0,230){\NWBond}}%
%\Put@Direct(0,230){\NWBond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
}%end of macro Ethylenev
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \section{Square unit}
%
% The macro |\square| typesets a compound of tetravalency. 
% The following numbering is adopted in this macro. 
%
% Because |\square| is defined in the present LaTeX2e, 
% the command |\squarecomplex| is newly defined. 
%
% \changes{v4.02a}{2004/12/27}{Bug fix: \cs{square} to \cs{squarecomplex}}
% 
% The command |\square| is renamed to be |\squareplanar|. The code is entirely replaced. 
%
% \changes{v4.05}{2009/11/08}{Bug fix: \cs{square} to \cs{squareplanar}}
%
% \begin{verbatim}
% ***************
% * square unit *
% ***************
%
% The following numbering is adopted in this macro. 
%
%         4          1
%           `      /
%             `  /
%              (0)  <== the original point
%             /  `
%           /     `
%         3         2
%
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \squareplanar[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+}:  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nT         :  triple bond at n-atom 
%           nD         :  double bond at n-atom 
%           n or nS    :  single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \squareplanar{0==C;1==Cl;2==F}
%        \squareplanar{0==C;1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylsquareposition}, 
% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\squareplanar}
% \begin{macro}{\@squareplanar}
%    \begin{macrocode}
\def\squareplanar{\@ifnextchar[{\@squareplanar[r}{\@squareplanar[r]}}
\def\@squareplanar#1]#2{%
\@reset@ylsw%
\ylsquareposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){square}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{37}{0}{\scriptsize\@@tmpb}}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\Put@Direct(0,0){\NEbond}}%
%\Put@Direct(0,0){\NEbond}%
\or\setBScolor{\Put@Direct(0,0){\SEbond}}%
%\Put@Direct(0,0){\SEbond}%
\or\setBScolor{\Put@Direct(0,0){\SWbond}}%
%\Put@Direct(0,0){\SWbond}%
\or\setBScolor{\Put@Direct(0,0){\NWbond}}%
%\Put@Direct(0,0){\NWbond}%
\fi%end of ifcase
\fi\fi}%
\end{ShiftPicEnvB}%
}%end of macro squareplanar
\let\squarecomplex=\squareplanar
\let\square=\squarplanar%combatible to the old version (<4.04)
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The commands |\ylsquarepositiona| and |\ylsquarepositiona| 
% are  used in |\square| to adjust a substitution position. 
% \changes{v1.02}{1998/10/20}{Newly added command: \cs{ylsquareposition}}
% \changes{v5.01}{2013/07/30}{Bug fix}
%
% \begin{macro}{\ylsquareposition}
%    \begin{macrocode}
\def\ylsquareposition#1{%
\@@ylswfalse%%%\@reset@ylsw
\reset@@yl%%2013/07/30bug fix
\@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
 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \section{Ball-stick models}
% \subsection{Tetrahedral unit of stereo type}
%
% The macro |\tetrastereo| typesets a tetrahedral unit in a 
% ball-stick fashion. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% *****************************
% * tetrahedral unit (stereo) *
% *****************************
%
% The following numbering is adopted in this macro. 
%
%                1
%
%                |
%          2  -- 0 --  4       0 <== the original point
%                |
%
%                3
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \tetrastereo[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           n          :  single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \tetrastereo{1==Cl;2==F}
%        \tetrastereo{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\tetrastereo}
% \begin{macro}{\@tetrastero}
%    \begin{macrocode}
\def\tetrastereo{\@ifnextchar[{\@tetrastereo[r}{\@tetrastereo[r]}}
\def\@tetrastereo#1]#2{%
\begin{sfpicture}(600,600)(-300,-300)
  \OrigptOutput(300,300){tetrastereo}
\Put@oCircle(0,0){200}%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
\or%
   \setBScolor{\Put@Line(0,100)(0,1){70}}% behind 
%   \Put@Line(0,100)(0,1){70}% behind 
   \putlratom{-30}{180}{\@memberb}%   and up
\or%
  {\thicklines%
   \setBScolor{\Put@Line(-60,10)(-5,2){140}}%   in front
%   \Put@Line(-60,10)(-5,2){140}%   in front
   \putlatom{-205}{30}{\@memberb}}%  and left
\or%
   \setBScolor{\Put@Line(0,-100)(0,-1){90}}%     behind and
%   \Put@Line(0,-100)(0,-1){90}%     behind and
   \putlratom{-30}{-260}{\@memberb}% down
\or%
  {\thicklines%
   \setBScolor{\Put@Line(60,10)(5,2){140}}%     in front
%   \Put@Line(60,10)(5,2){140}%     in front
   \putratom{210}{30}{\@memberb}}%   and right
\fi\fi}%end of ifcase
\end{sfpicture}}%end of macro tetrastereo
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Tetrahedral unit of inverse stereo type}
%
% The macro |\dtetrastereo| typesets another tetrahedral unit in a 
% ball-stick fashion. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% *****************************
% * tetrahedral unit (stereo) *
% *****************************
%
% The following numbering is adopted in this macro. 
%
%                1
%
%                |
%          2  -- 0 --  4       0 <== the original point
%                |
%
%                3
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \dtetrastereo[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           n          :  single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \dtetrastereo{1==Cl;2==F}
%        \dtetrastereo{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\dtetrastereo}
% \begin{macro}{\@dtetrastereo}
%    \begin{macrocode}
\def\dtetrastereo{\@ifnextchar[{\@dtetrastereo[r}{\@dtetrastereo[r]}}
\def\@dtetrastereo#1]#2{%
\begin{sfpicture}(600,600)(-300,-300)
  \OrigptOutput(300,300){dtetrastereo}
\Put@oCircle(0,0){200}%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
\or%
   \setBScolor{\Put@Line(0,100)(0,1){70}}% behind 
%   \Put@Line(0,100)(0,1){70}% behind 
   \putlratom{-30}{180}{\@memberb}%   and up
\or%
   \setBScolor{\Put@Line(-94,-10)(-5,-2){108}}%   in back
%   \Put@Line(-94,-10)(-5,-2){108}%   in back
   \putlatom{-205}{-110}{\@memberb}%  and left
\or%
  {\thicklines%
   \setBScolor{\Put@Line(0,-50)(0,-1){150}}%     behind and
%   \Put@Line(0,-50)(0,-1){150}%     behind and
   \putlratom{-30}{-260}{\@memberb}}% down
\or%
   \setBScolor{\Put@Line(94,-10)(5,-2){108}}%     in back
%   \Put@Line(94,-10)(5,-2){108}%     in back
   \putratom{210}{-110}{\@memberb}%   and right
\fi\fi}%end of ifcase
\end{sfpicture}}%end of macro dtetrastereo
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Ethane unit of stereo type}
%
% The macro |\ethanestereo| typesets an ethane molecule in a 
% ball-stick fashion. 
% The following numbering is adopted in this macro. 
%
% \begin{verbatim}
% **************************
% * ethane unit (vertical) *
% **************************
%
%               5
%               |
%        6 --  (2) -- 4
%               |
%               |
%        1 --  (1) -- 3 <== the original point
%               |
%               2
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \ethanestereo[AUXLIST]{ATOMLIST}{SUBSLIST}          
% \end{verbatim}
%
% \begin{verbatim}
%     AUXLIST: list of charges
%
%     {n+}   :  + charge (or another one chararacter) on n-atom
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 6
%
%           n          :  single bond at n-atom
%
% \end{verbatim}
%
% \begin{verbatim}
%     ATOMLIST: list of central atoms
%
%           n          :  atom for n-position (e.g. 1==C)
%
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \ethanestereo{1==Cl;2==F}
%        \ethanestereo{1==C;2==C}{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\ethanestereo}
% \begin{macro}{\@ethanestereo}
%    \begin{macrocode}
\def\ethanestereo{\@ifnextchar[{\@ethanestereo}{\@ethanestereo[]}}
\def\@ethanestereo[#1]#2#3{%
\begin{sfpicture}(600,800)(-300,-300)
  \OrigptOutput(300,300){ethanestereo}
\Put@oCircle(0,0){200}%
\Put@oCircle(0,270){200}%
\Put@Line(0,100)(0,1){70}% central bond
\@tfor\member:=#1\do{%
 \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 1\relax \putratom{87}{90}{\scriptsize\@@tmpb}
   \else\if\@@tmpa 2\relax \putratom{87}{360}{\scriptsize\@@tmpb}
   \fi\fi}%
\def\aaa{#2}%
\ifx\aaa\empty\else%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa%
\or\putratom{-40}{-33}{\@memberb}%central atom
\or\putratom{-40}{237}{\@memberb}%central atom
\fi\fi}%end of ifcase
\fi% 
\@forsemicol\member:=#3\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
\or%
   \setBScolor{\Put@Line(-94,-10)(-5,-2){108}}%   in back
%   \Put@Line(-94,-10)(-5,-2){108}%   in back
   \putlatom{-205}{-110}{\@memberb}%  and left
\or%
  {\thicklines%
   \setBScolor{\Put@Line(0,-50)(0,-1){150}}%     behind and
%   \Put@Line(0,-50)(0,-1){150}%     behind and
   \putlratom{-30}{-260}{\@memberb}}% down
\or%
   \setBScolor{\Put@Line(94,-10)(5,-2){108}}%     in back
%   \Put@Line(94,-10)(5,-2){108}%     in back
   \putratom{210}{-110}{\@memberb}%   and right
% %%%%%%%%
\or%
  {\thicklines%
   \setBScolor{\Put@Line(60,280)(5,2){140}}%     in front
%   \Put@Line(60,280)(5,2){140}%     in front
   \putratom{210}{300}{\@memberb}}%   and right
\or%
   \setBScolor{\Put@Line(0,370)(0,1){70}}% behind 
%   \Put@Line(0,370)(0,1){70}% behind 
   \putlratom{-30}{450}{\@memberb}%   and up
\or%
  {\thicklines%
   \setBScolor{\Put@Line(-60,280)(-5,2){140}}%   in front
%   \Put@Line(-60,280)(-5,2){140}%   in front
   \putlatom{-205}{300}{\@memberb}}%  and left
\fi\fi}%end of ifcase
\end{sfpicture}}%end of macro ethanestereo
%</aliphat>
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
%<*aliphat>
% \section{Wedged bonds for stereochemistry}
% \subsection{Various tetrahedral units with wedged bonds}
%
% The macros |\rtetrahedralS| etc. typesets tetrahedral units weith bold wedged
% bonds.  The following modes of numbering are adopted in these macro. 
%
% \begin{verbatim}
% **************************************
% * tetrahedral units with wedged bonds *
% **************************************
%
%
%                2
%
%                /
%          1 -- 0        0 <== the original point
%                | |
%                3 4
%                        1,2,3,4 <== substituents 
% \end{verbatim}
%
%  This macro has an argument |SUBSLIST| as well as an optional 
% argument |AUXLIST|. 
%
% \begin{verbatim}
%   \rtetrahedralS[AUXLIST]{SUBSLIST}
%   \RtetrahedralS[AUXLIST]{SUBSLIST}
%   \ltetrahedralS[AUXLIST]{SUBSLIST}
%   \LtetrahedralS[AUXLIST]{SUBSLIST}
%   \utetrahedralS[AUXLIST]{SUBSLIST}
%   \UtetrahedralS[AUXLIST]{SUBSLIST}
%   \dtetrahedralS[AUXLIST]{SUBSLIST}
%   \DtetrahedralS[AUXLIST]{SUBSLIST}
%   \htetrahedralS[AUXLIST]{SUBSLIST}
% \end{verbatim}
%
% The arugument |AUXLIST| designates an character on the central 
% atom of the formula drawn by this macro.  It can be used a plus 
% or minus charge on the center.
%
% \begin{verbatim}
%     AUXLIST = 
%
%     {0+} :  + charge (or another one chararacter) on the center
% \end{verbatim}
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           n          :  single bond at n-atom
%
%       for 0          :  cetral atom (e.g. 0==C)
% \end{verbatim}
% \changes{v5.00}{2010/10/01}{for bond coloring}
%
% \begin{macro}{\rtetrahedralS}
% \begin{macro}{\@rtetrahedralS}
%    \begin{macrocode}
\def\rtetrahedralS{\@ifnextchar[{\@rtetrahedralS[r}{\@rtetrahedralS[r]}}
\def\@rtetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylrtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){rtetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombondh}%1 (-1,0)
%\setatombondh%1 (-1,0)
\or\setBScolor{\setatombondF}%2 (3,5)
%\setatombondF%2 (3,5)
\or\setBScolor{\setatombonde}%3  (5,-3)
%\setatombonde%3  (5,-3)
\or\setBScolor{\setatombondE}%4 (3,-5)
%\setatombondE%4 (3,-5)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro rtetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\ylrtetrahedralSposition| is used in 
% |\rtetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylrtetrahedralSposition}}
%
% \begin{macro}{\ylrtetrahedralSposition}
%    \begin{macrocode}
\def\ylrtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
  \fi%
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\ltetrahedralS}
% \begin{macro}{\@ltetrahedralS}
%    \begin{macrocode}
\def\ltetrahedralS{\@ifnextchar[{\@ltetrahedralS[r}{\@ltetrahedralS[r]}}
\def\@ltetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylltetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){ltetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombondb}%1 (1,0)
%\setatombondb%1 (1,0)
\or\setBScolor{\setatombondD}%2 (-3,5)
%\setatombondD%2 (-3,5)
\or\setBScolor{\setatombondg}%3 (-5,-3)
%\setatombondg%3 (-5,-3)
\or\setBScolor{\setatombondG}%4 (-3,-5)
%\setatombondG%4 (-3,-5)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro ltetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\ylltetrahedralSposition| is used in 
% |\ltetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylltetrahedralSposition}}
%
% \begin{macro}{\ylltetrahedralSposition}
%    \begin{macrocode}
\def\ylltetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{40}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
  \fi%
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\dtetrahedralS}
% \begin{macro}{\@dtetrahedralS}
%    \begin{macrocode}
\def\dtetrahedralS{\@ifnextchar[{\@dtetrahedralS[r}{\@dtetrahedralS[r]}}
\def\@dtetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\yldtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){dtetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombonda}%1 (0,1)
%\setatombonda%1 (0,1)
\or\setBScolor{\setatombonde}%5 (5,-3)
%\setatombonde%5 (5,-3)
\or\setBScolor{\setatombondg}%3 (-5,-3)
%\setatombondg%3 (-5,-3)
\or\setBScolor{\setatombondG}%4 (-3,-5)
%\setatombondG%4 (-3,-5)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro dtetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\yldtetrahedralSposition| is used in 
% |\dtetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{yldtetrahedralSposition}}
%
% \begin{macro}{\yldtetrahedralSposition}
%    \begin{macrocode}
\def\yldtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 1
  \else
   \gdef\@ylii{0}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 2
  \else
%   \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 2
   \gdef\@ylii{-42}\gdef\@yli{20}\global\@ylswtrue%W subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
  \fi%
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\DtetrahedralS}
% \begin{macro}{\@DtetrahedralS}
%    \begin{macrocode}
\def\DtetrahedralS{\@ifnextchar[{\@DtetrahedralS[r}{\@DtetrahedralS[r]}}
\def\@DtetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylDtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){DtetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombonda}%1 (0,1)
%\setatombonda%1 (0,1)
\or\setBScolor{\setatombondg}%5 (-5,-3)
%\setatombondg%5 (-5,-3)
\or\setBScolor{\setatombonde}%3  (5,-3)
%\setatombonde%3  (5,-3)
\or\setBScolor{\setatombondE}%4 (3,-5)
%\setatombondE%4 (3,-5)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro DtetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylDtetrahedralSposition| is used in 
% |\DtetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylDtetrahedralSposition}}
%
% \begin{macro}{\ylDtetrahedralSposition}
%    \begin{macrocode}
\def\ylDtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{0}\gdef\@yli{-47}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{40}\gdef\@yli{20}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
  \fi%
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\utetrahedralS}
% \begin{macro}{\@utetrahedralS}
%    \begin{macrocode}
\def\utetrahedralS{\@ifnextchar[{\@utetrahedralS[r}{\@utetrahedralS[r]}}
\def\@utetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylutetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){utetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombondc}%8 (0,-1)
%\setatombondc%8 (0,-1)
\or\setBScolor{\setatombondf}%3 (5,3)
%\setatombondf%3 (5,3)
\or\setBScolor{\setatombondD}%1 (-3,5)
%\setatombondD%1 (-3,5)
\or\setBScolor{\setatombondd}%3 (-5,3)
%\setatombondd%3 (-5,3)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro utetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylutetrahedralSposition| is used in 
% |\utetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylutetrahedralSposition}}
%
% \begin{macro}{\ylutetrahedralSposition}
%    \begin{macrocode}
\def\ylutetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 1
  \else
   \gdef\@ylii{0}\gdef\@yli{47}\global\@ylswtrue%N subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 2
  \else
   \gdef\@ylii{-42}\gdef\@yli{-20}\global\@ylswtrue%W subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi%
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
  \fi
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\UtetrahedralS}
% \begin{macro}{\@UtetrahedralS}
%    \begin{macrocode}
\def\UtetrahedralS{\@ifnextchar[{\@UtetrahedralS[r}{\@UtetrahedralS[r]}}
\def\@UtetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylUtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){UtetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombondc}%1 (0,-1)
%\setatombondc%1 (0,-1)
\or\setBScolor{\setatombondd}%2 (-5,3)
%\setatombondd%2 (-5,3)
\or\setBScolor{\setatombondF}%3 (3,5)
%\setatombondF%3 (3,5)
\or\setBScolor{\setatombondf}%4 (5,3)
%\setatombondf%4 (5,3)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro UtetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\ylUtetrahedralSposition| is used in 
% |\UtetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylUtetrahedralSposition}}
%
% \begin{macro}{\ylUtetrahedralSposition}
%    \begin{macrocode}
\def\ylUtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{0}\gdef\@yli{47}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{40}\gdef\@yli{-20}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi%
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-40}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
  \fi
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\htetrahedralS}
% \begin{macro}{\@htetrahedralS}
%    \begin{macrocode}
\def\htetrahedralS{\@ifnextchar[{\@htetrahedralS[r}{\@htetrahedralS[r]}}
\def\@htetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylhtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){htetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombondg}%5 (-5,-3)
%\setatombondg%5 (-5,-3)
\or\setBScolor{\setatombonde}%5 (5,-3)
%\setatombonde%5 (5,-3)
\or\setBScolor{\setatombondF}%1 (3,5)
%\setatombondF%1 (3,5)
\or\setBScolor{\setatombondD}%1 (-3,5)
%\setatombondD%1 (-3,5)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro htetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\ylhtetrahedralSposition| is used in 
% |\htetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylhtetrahedralSposition}}
%
% \begin{macro}{\ylhtetrahedralSposition}
%    \begin{macrocode}
\def\ylhtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{40}\gdef\@yli{30}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{-40}\gdef\@yli{30}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi%
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\RtetrahedralS}
% \begin{macro}{\@RtetrahedralS}
%    \begin{macrocode}
\def\RtetrahedralS{\@ifnextchar[{\@RtetrahedralS[r}{\@RtetrahedralS[r]}}
\def\@RtetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylRtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){RtetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or
\setBScolor{\setatombondh}%1 (-1,0)
%\setatombondh%1 (-1,0)
\or\setBScolor{\setatombondE}%7 (3,-5)
%\setatombondE%7 (3,-5)
\or\setBScolor{\setatombondF}%2 (3,5)
%\setatombondF%2 (3,5)
\or\setBScolor{\setatombondf}%3 (5,3)
%\setatombondf%3 (5,3)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro RtetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\ylRtetrahedralSposition| is used in 
% |\RtetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylRtetrahedralSposition}}
%
% \begin{macro}{\ylRtetrahedralSposition}
%    \begin{macrocode}
\def\ylRtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-20}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
  \fi%
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\LtetrahedralS}
% \begin{macro}{\@LtetrahedralS}
%    \begin{macrocode}
\def\LtetrahedralS{\@ifnextchar[{\@LtetrahedralS[r}{\@LtetrahedralS[r]}}
\def\@LtetrahedralS#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylLtetrahedralSposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){LtetrahedralS}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or
\setBScolor{\setatombondb}%1 (1,0)
%\setatombondb%1 (1,0)
\or\setBScolor{\setatombondG}%2 (-3,-5)
%\setatombondG%2 (-3,-5)
\or\setBScolor{\setatombondD}%3 (-3,5)
%\setatombondD%3 (-3,5)
\or\setBScolor{\setatombondd}%4 (-5,3)
%\setatombondd%4 (-5,3)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro LtetrahedralS
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\ylLtetrahedralSposition| is used in 
% |\LtetrahedralS| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylLtetrahedralSposition}}
%
% \begin{macro}{\ylLtetrahedralSposition}
%    \begin{macrocode}
\def\ylLtetrahedralSposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{40}\gdef\@yli{47}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{20}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
  \fi%
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Trigonal bipyramidal uits for transition states}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\utrigpyramid}
% \begin{macro}{\@utrigpyramid}
%    \begin{macrocode}
\def\utrigpyramid{\@ifnextchar[{\@utrigpyramid[r}{\@utrigpyramid[r]}}
\def\@utrigpyramid#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\ylutrigpyramidposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){utrigpyramid}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombondc}%1 (0,-1)
%\setatombondc%1 (0,-1)
\or\setBScolor{\setatombondF}%2 (3,5)
%\setatombondF%2 (3,5)
\or\setBScolor{\setatombondD}%3 (-3,5)
%\setatombondD%3 (-3,5)
\or{\let\dotorline=\d@t@rline \setBScolor{\setatombondh}}%4 (-1,0)
%{\let\dotorline=\d@t@rline \setatombondh}%4 (-1,0)
\or{\let\dotorline=\d@t@rline \setBScolor{\setatombondb}}%5 (1,0)
%{\let\dotorline=\d@t@rline \setatombondb}%5 (1,0)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro utrigpyramid
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\ylutrigpyramidposition| is used in 
% |\utrigpyramid| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{ylutrigpyramidposition}}
%
% \begin{macro}{\ylutrigpyramidposition}
%    \begin{macrocode}
\def\ylutrigpyramidposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{0}\gdef\@yli{47}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{-20}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
  \fi%
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \fi
\fi%end of ifcase
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \changes{v5.00}{2010/10/01}{for bond coloring}
% \begin{macro}{\dtrigpyramid}
% \begin{macro}{\@dtrigpyramid}
%    \begin{macrocode}
\def\dtrigpyramid{\@ifnextchar[{\@dtrigpyramid[r}{\@dtrigpyramid[r]}}
\def\@dtrigpyramid#1]#2{%
\begingroup
\@reset@ylsw%
\centralatomcheck{#2}%
\ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
\yldtrigpyramidposition{#2}%
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\fi
\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
(600,600)(-300,-300){dtrigpyramid}%2002/4/30 by S. Fujita
(300,300)%
\@tfor\member:=#1\do{%
   \expandafter\twoch@@r\member{}{}%
   \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
%set of bond and atoms
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
\or\setBScolor{\setatombonda}%1 (0,1)
%\setatombonda%1 (0,1)
\or\setBScolor{\setatombondE}%2 (3,-5)
%\setatombondE%2 (3,-5)
\or\setBScolor{\setatombondG}%3 (-3,-5)
%\setatombondG%3 (-3,-5)
\or{\let\dotorline=\d@t@rline \setBScolor{\setatombondh}}%4 (-1,0)
%{\let\dotorline=\d@t@rline \setatombondh}%4 (-1,0)
\or{\let\dotorline=\d@t@rline \setBScolor{\setatombondb}}%5 (1,0)
%{\let\dotorline=\d@t@rline \setatombondb}%5 (1,0)
\fi%end of ifcase
\fi\fi}%
%\@clipfusefalse%
\end{ShiftPicEnvB}%
\endgroup}%end of macro dtrigpyramid
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% The command |\yldtrigpyramidposition| is used in 
% |\dtrigpyramid| to adjust a substitution position. 
% \changes{v4.02}{2004/12/20}{Newly added command: 
% \cs{yldtrigpyramidposition}}
%
% \begin{macro}{\yldtrigpyramidposition}
%    \begin{macrocode}
\def\yldtrigpyramidposition#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\relax
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
  \else
   \gdef\@ylii{0}\gdef\@yli{-47}\global\@ylswtrue%W subst. on 1
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
  \else
   \gdef\@ylii{-20}\gdef\@yli{47}\global\@ylswtrue%N subst. on 2
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
  \fi%
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \fi
 \or
  \ifno@centeratom%
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \else
   \gdef\@ylii{-40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
  \fi
\fi%end of ifcase
\fi\fi\fi}}%
%</aliphat>
%    \end{macrocode}
% \end{macro}
%
% \Finale
%
\endinput