summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-31 21:34:33 +0000
committerKarl Berry <karl@freefriends.org>2021-01-31 21:34:33 +0000
commitdef6b709935cf319c107fa76ee9ba14e12f1e418 (patch)
tree287d7fd6751b496fe176b867325b62f5230ccca0
parent8e4455f3a4f37da421439043d53698d9eeae5df2 (diff)
mcf2graph (31jan21)
git-svn-id: svn://tug.org/texlive/trunk@57575 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG10
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README2
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf65
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin527360 -> 534937 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex12
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf43
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin597299 -> 634517 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex167
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin201986 -> 201163 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex4
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf516
11 files changed, 471 insertions, 348 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
index 919160a9ce1..21f32d1af19 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
@@ -1,6 +1,14 @@
*******************************************************************************
- Changelog of mcf2graph software package by Akira Yamaji 2021-01-03
+ Changelog of mcf2graph software package by Akira Yamaji 2021-01-31
*******************************************************************************
+[ver. 4.56 / 2021-01-31]
+ -fix bug in molecular weight calculation
+ -fix bug in report output
+ -fix bug in MOL file output
+ -improve parts definition
+ -improve global ext() setting
+ -update MCF manual,example
+
[ver. 4.55 / 2021-01-03]
-fix bug in molecular weight calculation
-fix bug in charged atom calculation
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index f44677ee943..741ccc8dcae 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/README
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/README
@@ -1,7 +1,7 @@
********************************************************************************
mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST
Author : Akira Yamaji
- version : 4.55 2021-01-03
+ version : 4.56 2021-01-31
E-mail : mcf2graph@gmail.com
Located at : http://www.ctan.org/pkg/mcf2graph
********************************************************************************
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
index f91483eb728..bb1984b27ad 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
@@ -1,8 +1,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2021.01.03
+% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2021.01.31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph.mf; %%% it must be version 4.55 or later
-message "mcf_exa_soc 2021.01.03";
+input mcf2graph.mf; %%% it must be version 4.56 or later
+message "* mcf_exa_soc 2021.01.31";
message "";
%-------------------------------------------------------------------------
fsize:=(35mm,24mm);
@@ -32,21 +32,22 @@ tag1:="F"; tag2:="C"; tag3:="fm"; tag4:="mw"; tag5:="EN"; tag6:="MW";
%%%%sw_calc:=1;
%%%%ext(defaultfont:="uhvr8r"; defaultscale:=.3;
%%%% label.lrt(decimal(char_num)&":"&inf_EN&" MW="&cal_MW
-%%%% if inf_MW<>"-": &"("& decimal(num_MW-scantokens(inf_MW))&")"
-%%%% else: &"(-)" fi ,(-2bp,1.5bp));)
-%***********************************************************************
+%%%% if (inf_MW<>"-")and(cen_MW<40):
+%%%% &"("& decimal(num_MW-scantokens(inf_MW))&")"
+%%%% else: &"(-)" fi ,(-2bp,1.5bp));)
+%***************************************************************************
beginfont("EN:Adenine","MW:135.13")
MC(<30,?6,3=?5,{1,3,5,9}=dl,{2,6,9}:N,5:/NH2,7:NH)
endfont
-%***********************************************************************
+%***************************************************************************
beginfont("EN:Guanine","MW:151.13")
MC(<30,?6,3=?5,{1,3,9}=dl,{2,9}:N,{6,7}:NH,5://O,1:/NH2)
endfont
-%***********************************************************************
+%***************************************************************************
beginfont("EN:Cytosine","MW:111.10")
MC(<30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2)
endfont
-%***********************************************************************
+%***************************************************************************
beginfont("EN:Thymine","MW:126.11")
MC(<30,?6,3=dl,{2,6}:NH,{1,5}://O,4:/_)
endfont
@@ -148,9 +149,8 @@ beginfont("EN:Hexaphenylbenzene","MW:534.6876")
endfont
%***************************************************************************
beginfont("EN:Kekulene","MW:600.7")
- MC(<30,?6,{2,-3,-2,-3,-2,-3,-2,-3,-2,-3}=?6,|=1,4:\,-1:#,-3:\,5:#,=|,
- {2,15,55}=dr,
- {6,8,10,13,18,20,23,27,29,31,33,37,39,41,43,47,49,51,53,57,60}=dl)
+ MC(<30,Ph,{3,-2,-3,-2,-3,-2,-3,-2,-3,-2}=?6,(-3,6)=?6[3],-4@#6,
+ {8,12,14,16,18,22,24,26,28,32,34,36,38,42,44,46,48,52,54,56,58}=dl)
endfont
%***************************************************************************
beginfont("EN:18-Crown-6","MW:264.32")
@@ -158,6 +158,21 @@ beginfont("EN:18-Crown-6","MW:264.32")
O,-60,60,60,O,-60,60,60,O,-60,60,1:#)
endfont
%***************************************************************************
+beginfont("EN:Porphyrin","MW:310.4")
+MC(<9,|=1,?5,3:\,54,?5,-2:\,54,?5,-2:\,54,?5,-2:\,5:#,=|,
+ {1,4,6,8,10,14,16,18,21,23,27}=dl,{4,17}:N,{11,23}:NH)
+endfont
+%***************************************************************************
+beginfont("EN:Sulflower","MW:448.69")
+ MC(<67.5,?8,{1,3,5,7}=?5,11:@,30`1.15,12:#,14:@,30`1.15,15:#,
+ 17:@,30`1.15,18:#,20:@,30`1.15,9:#,{9,12,13,16,17,20,21,24}=dl,
+ {10,13,16,19,21,22,23,24}:S)
+endfont
+%***************************************************************************
+beginfont("EN:Arsphenamine x5","MW:915.2")
+ MC(<18,?5,{1,2,3,4,5}:As,{1,2,3,4,5}:/'(Ph,3:/NH2,4:/OH))
+endfont
+%***************************************************************************
beginfont("EN:Melamine","MW:126.12")
MC(<30,Ph,{2,4,6}:N,{1,3,5}:/NH2)
endfont
@@ -178,10 +193,6 @@ beginfont("EN:Vat blue 1","MW:262.27")
MC(<30,Ph,3=?5,8:\\,?5,-3=dr,-3=Ph,{7,14}:NH,{9,11}://O)
endfont
%***************************************************************************
-beginfont("EN:Mordant red 11","MW:240.22")
- MC(<30,Ph,3=?6,-3=dr,9=Ph,{7,10}://O,{-1,-2}:/OH)
-endfont
-%***************************************************************************
beginfont("EN:Atrazine","MW:215.7")
MC(<30,Ph,{2,4,6}:N,5:/Cl,1:/NH!2,3:/NH!?!)
endfont
@@ -200,10 +211,6 @@ MC(<30,?6`1.3,3=?6,6=dl,9=?3,-1:O,
{1,2,5,6,12^-210,12^-150}:/Cl)
endfont
%***************************************************************************
-beginfont("EN:Bromacil","MW:261.119")
-MC(<30,?6,6=dl,3:N,1:/Br,{2,4}://O,5:NH,6:/_,3:\,/_,!2)
-endfont
-%***************************************************************************
beginfont("EN:Acrinathrin","MW:541.45")
MC(<-30,?3,2^-35:*/_,2^35:/*Me,
1:\,!~dl,!,//O,!,O,!,/CF3,!,CF3,3:\,//O,!,O,!,/CN,!,Ph,-4:\,O,-60,Ph)
@@ -226,10 +233,6 @@ beginfont("EN:Clomazone","MW:239.7")
MC(<30,Ph,2:/Cl,3:\,!,|,?5,1:N,2:O,-2^-35:/_,-2^35:/_,-1://O)
endfont
%***************************************************************************
-beginfont("EN:Ethofenprox","MW:376.5")
-MC(<30,Ph,5:\,O,!,Ph,10:\,O,!3,??,!,Ph,-3:/O!2)
-endfont
-%***************************************************************************
beginfont("EN:Halfenprox","MW:477.4")
MC(<30,Ph,6:\,O,!,/F^35,/F^-35,!,Br,3:\,!,??,!,O,!,!,Ph,-2:\,O,60,Ph)
endfont
@@ -383,7 +386,7 @@ beginfont("EN:Uniconazole-P","MW:291.779")
endfont
%***************************************************************************
beginfont("EN:Oxadiargyl","MW:341.19")
- MC(<30,Ph,{1,3}:/Cl,6:/'(O,!2,!!!),4:\,|,?5,2=dl,{1,2}:N,4:O,5://O,-3:/??!)
+ MC(<30,Ph,{1,3}:/Cl,6:/'(O,!2,!!!),4:\,|,?5,2=dl,{1,2}:N,4:O,5://O,3:/??!)
endfont
%***************************************************************************
beginfont("EN:Oxaziclomefone","MW:376.277")
@@ -664,12 +667,10 @@ beginfont("EN:Luciferin","MW:280.33")
endfont
%***************************************************************************
beginfont("EN:Chlorophyll a","MW:893.509")
-MC(<54,|=1,?5,{2,5}=dl,4:N,3:\,54~dl,|,?5,{2,4}=dl,5:N,
- -2:\,54~dl,|,?5,2=dl,5:N,-2:\~dl,54,|,?5,5=dl,5:N,-2:\~dl,$5:#,
- -1:@,24,/*COO!^15,72,//O,$1:#,=|,||,
- {2,9,15,20~zf}:/_,8:/!,14:\,!!,
- 4:\`1.45,Mg,17:#,-1:@,11~vb:#,-1:@,23~vb:#,
- 21:@,-6~wf,!2,//O,!,O,!2,!!,|,!13,{1,5,9,13}:/_)
+MC(<-36,|=1,?5,3:\,54,?5,-2:\,54,?5,-2:\,54,?5,-2:\,5:#,6:@,22,70,8:#,=|,
+ {4,6,8,10,14,16,18,21,23,27}=dl,4:\`1.48~vf,Mg,17:#~vb,11@#27,27@#23,
+ {4,11,17,23}:N,{1~zf,9,15,21}:/_,14:/!,20:/!!,25:/*COO!,26://O,
+ 2:*\^-6,!2,//O,!,O,!2,!!,|,!13,{1,5,9,13}:/_)
endfont
%**************************************************************************
beginfont("EN:Quercetin","MW:302.24")
@@ -745,7 +746,7 @@ beginfont("EN:Pyrethrin I","MW:328.452");
endfont;
%***********************************************************************
beginfont("EN:Oseltamivir","MW:312.40")
- MC(<30,?6,3=dl,6:*/NH2,1:\*,NH,!,//O,!,2:*\,!,/!,!2,4:\,//O,!,O,!2)
+ MC(<30,?6,3=dl,6:*/NH2,1:\*,NH,!,//O,!,2:*\,O,!,/!,!2,4:\,//O,!,O,!2)
endfont
%**************************************************************************
beginfont("EN:Paclitaxel","MW:853.918")
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index b0dbe23357c..467d9c47b6f 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
index c09fbd17f2c..1bac0a43d54 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
@@ -8,7 +8,7 @@
%%%%\pdfpkresolution=1200
%---------------------
\pagestyle{empty}
-\topmargin=-20mm
+\topmargin=-24mm
\oddsidemargin=-12mm
\textwidth=190mm
\textheight=280mm
@@ -35,12 +35,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{center}
- {\Huge\sf Molecular Coding Format examples}\vspace{5mm}\\
- Author : Akira Yamaji \quad Date : \today\\
- Located at : http://www.ctan.org/pkg/mcf2graph\vspace{3mm}\\
+ {\Huge\sf Molecular Coding Format examples} \vspace{5mm} \\
+ Author : Akira Yamaji \quad Date : \today \\
+ Located at : http://www.ctan.org/pkg/mcf2graph \vspace{3mm} \\
\end{center}
{\small ** FM:Molecular formula calculated by mcf2graph \quad
- ** MW:Molecular weight calculated by mcf2graph}\vspace{3mm}\\
+ ** MW:Molecular weight calculated by mcf2graph} \vspace{3mm} \\
%------------------------------------------------------------------------
\noindent%
\openin\@auxf=\jobname-info.aux%
@@ -49,7 +49,7 @@
\read\@auxf to \@info%
\ifeof\@auxf\CONT@false\else\@sfor\@info{\tag@var\@list}%
%------------------------------------------------------------
- \begin{picture}(3750,3300)%
+ \begin{picture}(3750,3350)%
\put(20,3000){\footnotesize\bf \the\f@num:\EN}%
\put(20,2750){\labelM MW:\mw { / }FM:\fm}%
\put(20,2530){\labelM MW:\MW(data)}%
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
index aca042c93dc..84b9fc6bee6 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
@@ -1,8 +1,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2021.01.03
+% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2021.01.31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-input mcf2graph.mf; %% it must be version 4.55 or later
-message "mcf_man_soc 2021.01.03"; message "";
+input mcf2graph.mf; %% it must be version 4.56 or later
+message "mcf_man_soc 2021.01.31"; message "";
%------------------------------------------------------------------------
sw_mframe:=0;
sw_expand:=0;
@@ -301,9 +301,11 @@ endfont
%***********************************************************************
beginfont("EN:over line")
sw_trimming:=1;
- fsize:=(60mm,20mm);
+ fsize:=(75mm,20mm);
ratio_chain_ring:=1;
- MC(<30,!8,!,60,90`8,{2~si_,4~wf_,6~wb_,8~bd_}:/_`2)
+ MC(<30,!18,!,60,90`17,
+ {2~si_,4~wf_,6~wb_,8~zf_,10~zb_,
+ 12~bd_,14~dl_,16~dr_,18~dm_}:/_`2)
endfont
%***********************************************************************
beginfont("EN:change bond length1")
@@ -1160,16 +1162,39 @@ beginfont("EN:Quinine","MW:324.42")
)
endfont
%***************************************************************************
+sw_calc:=1;
+ext(defaultfont:="uhvr8r"; defaultscale:=.75;
+ label.urt("NO = "&decimal(char_num),(0.1w,0.60h));
+ label.urt("EN = "&inf_EN ,(0.1w,0.56h));
+ label.urt("MW = "&inf_MW ,(0.1w,0.52h));
+ label.urt("mw = "&cal_MW ,(0.1w,0.48h));
+ label.urt("fm = "&cal_FM ,(0.1w,0.44h));
+ label.urt("w = "&decimal(w) ,(0.1w,0.40h));
+ label.urt("h = "&decimal(h) ,(0.1w,0.36h));
+ label.urt("n = "&decimal(n) ,(0.1w,0.32h));
+ label.urt("ratio_thickness_bond = "&decimal(ratio_thickness_bond),
+ (0.1w,0.28h));
+ label.urt("ratio_atom_bond = "&decimal(ratio_atom_bond),
+ (0.1w,0.24h));
+ label.urt("ratio_bondgap_bond = "&decimal(ratio_bondgap_bond),
+ (0.1w,0.20h));
+ label.urt("ratio_chain_ring = "&decimal(ratio_chain_ring),
+ (0.1w,0.16h));
+ label.urt("sw_fframe = "&decimal(sw_fframe),(0.1w,0.12h));
+ label.urt("sw_aframe = "&decimal(sw_aframe),(0.1w,0.08h));
+ label.urt("sw_trimming = "&decimal(sw_trimming),(0.1w,0.04h));
+)
+%***************************************************************************
beginfont("EN:Ampicillin","MW:349.405")
- fsize:=(60mm,15mm);
- MC(<45,?4,-3=?5,2:N,7:S,
+ fsize:=(60mm,90mm);
+ MCat(0.5,1)(<45,?4,-3=?5,2:N,7:S,
{3^45,4^-45}:/*H,1://O^15,5:/*COOH^-18,6:??,
4:*\^75,NH,!,//O,!,/*NH2,!,Ph)
endfont
%***************************************************************************
beginfont("EN:Cholesterol","CAS:57-88-5","FM:C27H46O","MW:386.65")
- fsize:=(60mm,15mm);
- MC(
+ fsize:=(60mm,90mm);
+ MCat(0.5,1)(
<30,?6,{-4,-2}=?6,-4=?5,7=dl,
1:*/OH,{4,12}:*/_^60,9:*/H^60,
10:/*H^180,11:/*H^-60,17:/*H^-54,
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index 848ca9fe42b..fa14700a110 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
index 2573d33c6d3..f8678eb7167 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
@@ -1,18 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format manual by Akira Yamaji 2021.01.03
+% Molecular Coding Format manual by Akira Yamaji 2021.01.31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
-%%%%\documentclass[a4paper,twoside]{article}
-%%%%\usepackage{graphicx}
\usepackage[pdftex]{graphicx}
-%%%%\usepackage{epstopdf}
-%%%%\usepackage[dvipdfmx]{graphicx}
\usepackage[pdftex]{hyperref}
\usepackage{makeidx}
\makeindex
-%%%%\usepackage[dvipdfmx]{hyperref}
%---------------------
\usepackage{mcf_setup}
+%%%%\pdfpkresolution=1200
%---------------------
\hypersetup{colorlinks=true,linkcolor=blue}
\topmargin=-18mm
@@ -56,9 +52,9 @@
}%
%---------------------------------------------------------------------------
\def\put@char{%
- \begin{picture}(75,28)%
- \put(0,23){\bf [\NO]\EN}%
- \put(5,18){\small\tt FM:\fm{ }MW:\mw}%
+ \begin{picture}(75,110)%
+ \put(0,100){\bf [\NO]\EN}%
+ \put(5,95){\small\tt FM:\fm{ }MW:\mw}%
\put(5,0){\font\@strufont=\File\relax%
\hbox{\@strufont\char\Char}}%
\end{picture}%
@@ -174,6 +170,7 @@ exact mass, molecular formula.
%-----------------------------------------------------------------------------
\subsubsection{Connect atom}
\index{\#}%
+\index{"@\#}%
\begin{verbatim}
n:# : Connect to An
n1@#n2 : n1:@,n2:#
@@ -208,6 +205,7 @@ exact mass, molecular formula.
\index{"!"!"!}%
\index{dm}%
\index{dl}%
+\index{dr}%
\index{db}%
\index{tm}%
\begin{verbatim}
@@ -291,15 +289,26 @@ exact mass, molecular formula.
\index{si\_}%
\index{wf\_}%
\index{wb\_}%
+\index{zf\_}%
+\index{zb\_}%
\index{bd\_}%
+\index{dl\_}%
+\index{dr\_}%
+\index{dm\_}%
\begin{verbatim}
si_ : single over line
wf_ : wedge forward over line
wb_ : wedge backward over line
+ zf_ : wedge dotted forward over line
+ zb_ : wedge dotted backward over line
bd_ : broad over line
+ dl_ : duble left over line
+ dr_ : duble right over line
+ dm_ : duble over line
- <30,!8,!,60,90`8,
- {2~si_,4~wf_,6~wb_,8~bd_}:/_`2
+ <30,!8,!,60,90`18,
+ {2~si_,4~wf_,6~wb_,8~zf_,10~zb_,
+ 12~bd_,14~dl_,16~dr_,18~dm_}:/_`2
\end{verbatim}
\MCFgraph
%-----------------------------------------------------------------------------
@@ -311,7 +320,7 @@ exact mass, molecular formula.
<-30,!2,!2`1.2,!2
- ** !2`1.2 : '`1.2,!2
+ ** !2`1.2 : !`1.2,!`1.2
\end{verbatim}
\MCFgraph
%-----------------------------------------------------------------------------
@@ -483,6 +492,8 @@ exact mass, molecular formula.
%-----------------------------------------------------------------------------
\subsection{Group}
\subsubsection{Insert group}
+\index{/}%
+\index{Ph}%
\begin{verbatim}
/ : single
<-30,!,/_,!,/!,!3,/!2,!,/?!,
@@ -559,6 +570,7 @@ exact mass, molecular formula.
\subsubsection{Horizontal,vertical}
\index{hz}%
\index{vt}%
+\index{"'}%
\begin{verbatim}
>hz : horizontal environment (default)
>vt : vertical environment
@@ -605,7 +617,11 @@ exact mass, molecular formula.
\subsection{Miscellaneous}
%-----------------------------------------------------------------------------
\subsubsection{Abbreviated parts}
-\index{N!}%
+\index{NH}%
+\index{N"!}%
+\index{N"!2}%
+\index{SO}%
+\index{SOO}%
\begin{verbatim}
NH : N,/H~nl
N! : N,/_
@@ -616,8 +632,10 @@ exact mass, molecular formula.
<-30,!2,NH,!2,N!,!2,N!2,SO,!2,SOO,!
\end{verbatim}
\MCFgraph
-\index{?!}%
+\index{?"!}%
\index{??}%
+\index{??"!}%
+\index{N?"!}%
\begin{verbatim}
?! : /_,!
?? : /_^35,/_-35
@@ -631,7 +649,8 @@ exact mass, molecular formula.
\MCFgraph
%-----------------------------------------------------------------------------
\subsubsection{Make block}
-\index{\textbar= =\textbar}% |=
+\index{\textbar=}% |=
+\index{=\textbar}% =|
\begin{verbatim}
|= : start brock / bond length=n
=| : end brock
@@ -1018,6 +1037,8 @@ MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2)
%-----------------------------------------------------------------------------
\subsection{Parameter setting}
\subsubsection{Local parameter setting}
+\index{beginfont()}%
+\index{endfont}%
\begin{verbatim}
beginfont()
MC(Ph)
@@ -1117,12 +1138,37 @@ MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2)
\index{minus}%
\index{lonepair}%
\index{lonepairdiam}%
-\index{lonepairdiam}%
+\index{lonepairspace}%
\index{circlediam}%
\index{circlepen}%
+\index{w}%
+\index{h}%
+\index{aw}%
+\index{em}%
+\index{p0}%
+\index{l}%
\index{/*}%
\index{**}%
\index{\textgreater\textgreater}%
+\index{An}%
+\index{A[]}%
+\index{A[]ang}%
+\index{A[]up}%
+\index{A[]left}%
+\index{A[]right}%
+\index{A[]down}%
+\index{Bn}%
+\index{B[]}%
+\index{B[]s}%
+\index{B[]m}%
+\index{B[]e}%
+\index{B[]ang}%
+\index{B[]up}%
+\index{B[]left}%
+\index{B[]right}%
+\index{B[]down}%
+\index{defaultscale}%
+\index{labeloffset}%
\begin{verbatim}
(Add graphic to molecule)
@@ -1231,6 +1277,13 @@ endfont
\newpage
\subsection{Function ext()}
\index{ext()}%
+\index{w0}%
+\index{h0}%
+\index{aw}%
+\index{em}%
+\index{n}%
+\index{ratio\_thickness\_char}%
+\index{defaultscale}%
\begin{verbatim}
(Extra graphic to font)
@@ -1429,7 +1482,10 @@ endfont
\onecolumn
\section{Example to use mcf2graph}
\subsection{Molecular definition file}
+\index{mcf2graph.mf}%
\index{sw\_aux\_out}%
+\index{tag}%
+\index{var}%
\begin{verbatim}
%-------------------------------------------------------------------------
input mcf2graph.mf; % input macro
@@ -1481,6 +1537,20 @@ bye
\newpage
\subsection{Information auxfile output}
\paragraph{(Insert option parameter setting)}
+\index{F}%
+\index{C}%
+\index{NO}%
+\index{MW}%
+\index{MI}%
+\index{EN}%
+\index{JN}%
+\index{FM}%
+\index{USE}%
+\index{mw}%
+\index{fm}%
+\index{mi}%
+\index{w}%
+\index{h}%
\begin{verbatim}
sw_aux_out=1 : tag1:var1;tag2:var2
sw_aux_out=2 : tag1;tag2 var1;var2
@@ -1533,6 +1603,7 @@ EN : english name
JN : japanese name
FM : formula from literature data
MW : molecular weight from literature data
+MI : monoisotopic mass from literature data
USE : the use
mw : molecular weight calculated
mi : monoisotopic mass calculated
@@ -1558,46 +1629,46 @@ h : font height
\begin{verbatim}
------------------------------------------------------------------
Molecular name = Nicotine
- Warnings = 0 / Command count= 40
+ Warnings = 0 / Command count= 44
Width * Height = 49.57332 * 41.37605
Shift width * height = 0 * -9.07253
Bond length = 12.75589 Atom size = 5.38914
Atom count= 12 Bond count= 13 Ring count= 2 Hide H count= 14
------------------------------------------------------------------
-< NO. >( x axis , y axis )< atom >< bond >< hide_H >
- A1 ( 0 , 0 ) C 3 1
- A2 ( 0.866 , -0.5 ) N 3
- A3 ( 1.732 , 0 ) C 3 1
- A4 ( 1.732 , 1 ) C 4
- A5 ( 0.866 , 1.5 ) C 3 1
- A6 ( 0 , 1 ) C 3 1
- A7 ( 2.304 , 1.33 ) C 3 1
- A8 ( 3.217 , 0.923 ) N 3
- A9 ( 3.886 , 1.666 ) C 2 2
- A10 ( 3.386 , 2.532 ) C 2 2
- A11 ( 2.408 , 2.325 ) C 2 2
- A12 ( 3.399 , 0.067 ) C 1 3
+< NO. ><atom(s) >( x axis , y axis )<bond><hideH><chg>
+ A1 C ( 0 , 0 ) 3 1
+ A2 N ( 0.866 , -0.5 ) 3
+ A3 C ( 1.732 , 0 ) 3 1
+ A4 C ( 1.732 , 1 ) 4
+ A5 C ( 0.866 , 1.5 ) 3 1
+ A6 C ( 0 , 1 ) 3 1
+ A7 C ( 2.304 , 1.33 ) 3 1
+ A8 N ( 3.217 , 0.923 ) 3
+ A9 C ( 3.886 , 1.666 ) 2 2
+ A10 C ( 3.386 , 2.532 ) 2 2
+ A11 C ( 2.408 , 2.325 ) 2 2
+ A12 C ( 3.399 , 0.067 ) 1 3
------------------------------------------------------------------
-< NO. >< bond (sdt)><angle + ( +- )><length ( pt )>
- B1 1 -> 2 ( 2) 330 ( -30) 1 ( 12.76)
- B2 2 -> 3 ( 1) 30 ( 30) 1 ( 12.76)
- B3 3 -> 4 ( 2) 90 ( 90) 1 ( 12.76)
- B4 4 -> 5 ( 1) 150 ( 150) 1 ( 12.76)
- B5 5 -> 6 ( 2) 210 ( -150) 1 ( 12.76)
- B6 6 -> 1 ( 1) 270 ( -90) 1 ( 12.76)
- B7 4 -> 7 ( 1) 30 ( 30) 0.66 ( 8.42)
- B8 7 -> 8 ( 1) 336 ( -24) 1 ( 12.76)
- B9 8 -> 9 ( 1) 48 ( 48) 1 ( 12.76)
- B10 9 -> 10 ( 1) 120 ( 120) 1 ( 12.76)
- B11 10 -> 11 ( 1) 192 ( -168) 1 ( 12.76)
- B12 11 -> 7 ( 1) 264 ( -96) 1 ( 12.76)
- B13 8 -> 12 ( 1) 282 ( -78) 0.66 ( 8.42)
+< NO. >< bond (sdt)><angle +( +- )><length ( pt )>
+ B1 1 -> 2 ( 2) 330 ( -30) 1 ( 12.76)
+ B2 2 -> 3 ( 1) 30 ( 30) 1 ( 12.76)
+ B3 3 -> 4 ( 2) 90 ( 90) 1 ( 12.76)
+ B4 4 -> 5 ( 1) 150 ( 150) 1 ( 12.76)
+ B5 5 -> 6 ( 2) 210 ( -150) 1 ( 12.76)
+ B6 6 -> 1 ( 1) 270 ( -90) 1 ( 12.76)
+ B7 4 -> 7 ( 1) 30 ( 30) 0.66 ( 8.42)
+ B8 7 -> 8 ( 1) 336 ( -24) 1 ( 12.76)
+ B9 8 -> 9 ( 1) 48 ( 48) 1 ( 12.76)
+ B10 9 -> 10 ( 1) 120 ( 120) 1 ( 12.76)
+ B11 10 -> 11 ( 1) 192 ( -168) 1 ( 12.76)
+ B12 11 -> 7 ( 1) 264 ( -96) 1 ( 12.76)
+ B13 8 -> 12 ( 1) 282 ( -78) 0.66 ( 8.42)
------------------------------------------------------------------
<atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ]
- C ( 12.0107)[ 12] * 10 = 120.10696[ 120]
- H ( 1.00793)[ 1.00783] * 14 = 14.11108[ 14.10959]
- N ( 14.0067)[ 14.00307] * 2 = 28.0134[ 28.00613]
- Molecular Weight [Mono Isotopic] = 162.2314[ 162.11572]
+ C ( 12.0107)[ 12] * 10 120.10696[ 120]
+ H ( 1.00793)[ 1.00783] * 14 14.11108[ 14.10959]
+ N ( 14.0067)[ 14.00307] * 2 28.0134[ 28.00613]
+ Molecular Weight [Mono Isotopic] = 162.2314[ 162.11572]
------------------------------------------------------------------
Weight Calc: 162.2314 / Input: 162.23 / weight gap= 0.00145
Fomula Calc: C10H14N2 / Input:
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
index c901af300b6..11b156b318e 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
index 520379ffe16..df8c4bc5eb5 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2021.01.03
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2021.01.31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% mcf2graph.mf it must be version 4.55 or later
+%%% mcf2graph.mf it must be version 4.56 or later
\documentclass{article}
%------------------------------------------------------------------------------
\usepackage{luamplib}%
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 49c50f02635..af136209e34 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.55 Copyright (c) 2013-2021 Akira Yamaji
+% mcf2graph ver 4.56 Copyright (c) 2013-2021 Akira Yamaji
%
% Permission is hereby granted, free of charge, to any person obtaining a copy of this software
% and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -37,9 +37,7 @@
% Set to use plain.mp (label,arrow,atom) : mpost -s labeloffset=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message "---------------------------------------------";
-message "This is mcf2graph ver 4.55 2021.01";
-message "---------------------------------------------";
+message "* This is mcf2graph ver 4.56 2021.01";
%-------------------------------------------------------------------------------------------------
newinternal cntA,cntB,cntM,minX,minY,maxX,maxY,sftX,sftY,com,par,envT,envB,lenT,lineT,angT,rotT,
crR,nA,nB,nC,nD,nE,nF,nN,nP,nU,nP,nL,nR,nS,nW,xpos,ypos,markA,markB,saveA,saveB,bondL;
@@ -47,18 +45,16 @@ numeric save_num[],comD[][],parD[][],adrD[][],cntD[],tbl_atom[],tbl_group[][],f_
tbl_atom_wt[],tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[],andA[],and_rot[],chargeA[],
com_group[][],par_group[][],cnt_group[],colorA[],colorB[],sumA[],bondC[],hideH[],
lineB[],sB[],eB[],angB[],angA[],lenB[],angX[],numS[],wdM[],htM[],wdA[],dxA[];
-string info[],save_str[],tbl_atom_str[],strD[],tag[],mpc_name[],out_file_name,out_file_aux,
- out_file_rep,out_file_mpc,aux_delimiter,atomfont,save_atomfont,save_defaultfont,temp_c,
- s_tag,s_var,cal_FM,cal_MW,cal_MW_str,cal_MI,cal_MI_str,
- inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW;
-pair save_pair[],posA[],posM[][],msize,mposition,fsize,fmargin,save_mposition,posBs,posBe,
- temp_p;
+string info[],save_str[],tbl_atom_str[],strD[],tag[],out_file_name,out_file_aux,
+ out_file_rep,out_file_mpc,aux_delimiter,atomfont,mpfont,s_tag,s_var,
+ cal_FM,cal_MW,cal_MI,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW;
+pair save_pair[],posA[],posM[][],msize,mposition,fsize,fmargin,save_mposition,posBs,posBe;
picture mol_stru[],atom_picture,save_picture,temp_picture;
path arrow_path,dottedline_path,line_path,arrow_head;
%-------------------------------------------------------------------------------------------------
-char_num:=str_cnt:=tbl_cnt:=proc_end:=mangle:=sw_label_emu:=sw_calc:=sw_ext_all:=0;
+char_num:=str_cnt:=tbl_cnt:=proc_end:=mangle:=sw_calc:=sw_ext_all:=0;
sw_numberA:=sw_numberB:=sw_aux_out:=sw_expand:=sw_fframe:=sw_mframe:=sw_aframe:=sw_trimming:=0;
-sw_rep_out:=sw_mol_out:=sw_group_off:=sw_single:=sw_arrow:=0;
+sw_rep_out:=sw_mol_out:=sw_group_off:=sw_single:=sw_arrow_emu:=0;
numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095;
%-------------------------------------------------------------------------------------------------
aux_max:=max_inf_num:=20;
@@ -69,6 +65,7 @@ if (known green)and(known ahlength):
f_MP:=1;
color color_list[];
prologues:=3;
+ mpfont:="uhvr8r";
%-----------------------------------------------------------------------------------------
atomfont:=defaultfont:="";
out_file_aux:=jobname&"-info.aux";
@@ -78,12 +75,13 @@ if (known green)and(known ahlength):
%--default ahangle=45---------------------------------------------------------------------
if ahangle=0: outputformat:="eps"; % eps format(.mps)
elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.12; % png format(600dpi)
- elseif ahangle=2: outputformat:="svg"; % svg format
- elseif ahangle=3: outputformat:="eps"; % eps format(.eps)
- %
elseif ahangle=11: outputformat:="png"; hppp:=vppp:=0.24; % png format(300dpi)
elseif ahangle=12: outputformat:="png"; hppp:=vppp:=0.10; % png format(720dpi)
elseif ahangle=13: outputformat:="png"; hppp:=vppp:=0.06; % png format(1200dpi)
+ elseif ahangle=14: outputformat:="png"; hppp:=vppp:=0.04; % png format(1800dpi)
+ elseif ahangle=15: outputformat:="png"; hppp:=vppp:=0.03; % png format(2400dpi)
+ elseif ahangle=2: outputformat:="svg"; % svg format
+ elseif ahangle=3: outputformat:="eps"; % eps format(.eps)
fi
%--default ahlength=4---------------------------------------------------------------------
if ahlength=1: sw_aux_out:=1; bboxmargin:=0; % output aux file
@@ -98,8 +96,8 @@ if (known green)and(known ahlength):
elseif bboxmargin=3: def shipit = enddef;proc_end:=1; % No image file ,first font only
fi
%--default labeloffset=3------------------------------------------------------------------
- if labeloffset=1: sw_arrow:=1; defaultfont:="uhvr8r"; % plain.mp label
- elseif labeloffset=2: sw_arrow:=1; defaultfont:=atomfont:="uhvr8r"; % plain.mp label,atom
+ if labeloffset=1: defaultfont:=mpfont; % mpost label
+ elseif labeloffset=2: defaultfont:=atomfont:=mpfont; % mpost label,atom
fi
%--default outputtemplate:="%j-%3c."&"mps"------------------------------------------------
if (outputformat="eps")and(ahangle<>3): outputtemplate:="%j-%3c."&"mps";
@@ -114,8 +112,8 @@ if (known green)and(known ahlength):
if atomfont="": atomfont:="draw"; fi % default atom font
if defaultfont="": defaultfont:="draw"; fi % default label font
%-----------------------------------------------------------------------------------------
-else: f_MP:=0;
- %------------------------------------
+else:
+ f_MP:=0;
def image = image_emu enddef;
def llcorner = llcorner_emu enddef;
def lrcorner = lrcorner_emu enddef;
@@ -126,7 +124,6 @@ else: f_MP:=0;
dotlabeldiam:=3bp;
def Cp(expr s) = enddef;
def color = transform enddef;
- sw_arrow:=0;
atomfont:="draw";
defaultfont:="draw";
mode_setup;
@@ -134,28 +131,27 @@ fi
clearit;
%--------------------------------------------------------------------------------------------------
if f_MP=1:
- if bboxmargin=0: message "output no image file";
- elseif bboxmargin=1: message "output first font only";
- elseif bboxmargin=3: message "no image,first only";
+ if bboxmargin=0: message "* output no image file";
+ elseif bboxmargin=1: message "* output first font only";
+ elseif bboxmargin=3: message "* no image,first only";
fi
- message "jobname="&jobname;
- message "numbersystem="&numbersystem;
- if ahlength=1: message "output aux file";
- message "out_file_aux="&out_file_aux;
- message "aux_delimiter="&aux_delimiter;
- elseif ahlength=2: message "output report file";
- message "out_file_rep="&out_file_rep;
- elseif ahlength=5: message "output MOL file(V2000)";
- message jobname&"-nnn-"&"inf_EN"&".mol";
- elseif ahlength=6: message "output MOL file(V3000)";
- message jobname&"-nnn-"&"inf_EN"&".mol";
+ message "* jobname="&jobname;
+ message "* numbersystem="&numbersystem;
+ if ahlength=1: message "* output aux file";
+ message "* out_file_aux="&out_file_aux;
+ message "* aux_delimiter="&aux_delimiter;
+ elseif ahlength=2: message "* output report file";
+ message "* out_file_rep="&out_file_rep;
+ elseif ahlength=5: message "* output MOL file(V2000)";
+ message "* "&jobname&"-nnn-"&"inf_EN"&".mol";
+ elseif ahlength=6: message "* output MOL file(V3000)";
+ message "* "&jobname&"-nnn-"&"inf_EN"&".mol";
fi
- message "outputformat="&outputformat;
- if outputformat="png": message "hppp="&decimal(hppp)&"/vppp="&decimal(vppp); fi
- message "outputtemplate="&outputtemplate;
- message "atomfont="&atomfont;
- message "defaultfont="&defaultfont;
- message "---------------------------------------------";
+ message "* outputformat="&outputformat;
+ if outputformat="png": message "* hppp="&decimal(hppp)&"/vppp="&decimal(vppp); fi
+ message "* outputtemplate="&outputtemplate;
+ message "* atomfont="&atomfont;
+ message "* defaultfont="&defaultfont;
fi
%--------------------------------------------------------------------------------------------------
let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =; let ef=elseif;
@@ -195,20 +191,20 @@ def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; e
def_com(-4090)(_com,_jp_atom,_jp_absA,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_tmp_line,
_chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_adj_ang,_chg_env,_tmp_env,_set_colorA,_set_colorB,
_group_si,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,_size_atom,_numeric,
- _jump_at,_connect_at,_set_and,_chg_charge,_nop,_mark,_moff,_term,_len_s,_len_e,_len_ss,_len_ee,
- _group_s,_group_e,_rest,si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,nb,si_,wf_,wb_,bd_);
+ _jump_at,_connect_at,_set_and,_chg_and,_nop,_mark,_moff,_term,_len_s,_len_e,_len_ss,_len_ee,
+ _group_s,_group_e,_rest,
+ si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,nb,si_,dl_,dr_,dm_,wf_,wb_,zf_,zb_,wv_,bd_);
%--------------------------------------------------------------------------------------------------
def parameter_list=
- sw_rep_out,sw_numberA,sw_numberB,sw_mframe,sw_aux_out,sw_expand,sw_mol_out,sw_calc,sw_single,
- sw_ext_all,sw_aframe,sw_fframe,sw_group_off,sw_trimming,sw_arrow,sw_label_emu,
+ sw_rep_out,sw_numberA,sw_numberB,sw_mframe,sw_aux_out,sw_expand,sw_mol_out,sw_calc,
+ sw_single,sw_ext_all,sw_aframe,sw_fframe,sw_group_off,sw_trimming,sw_arrow_emu,
ratio_atom_bond,ratio_thickness_bond,ratio_char_bond,ratio_chain_ring,ratio_bondgap_bond,
ratio_zebra_black,ratio_zebragap_bond,ratio_thickness_char,ratio_wedge_bond,ratio_atomgap_atom,
lonepairdiam,lonepairspace,blength,offset_atom,offset_wedge,max_blength,offset_zebra_gap,
offset_bond_gap,thickness_fframe,thickness_mframe,thickness_aframe,offset_thickness,
numberA_start,numberA_end,numberB_start,numberB_end,defaultsize,defaultscale,labeloffset,mangle,
fsize,fmargin,msize,mposition,defaultfont,atomfont,dottedline_gap,
- Me,Et,Pr,Bu,iPr,tBu,CH3,NH,NH2,NO2,OH,CHO,COOH,CN,SH,
- !CH3,!NH2,!NO2,!OH,!CHO,!COOH,!CN,!SH
+ Me,Et,CH3,NH,NH2,NO,NO2,OH,CHO,COOH,CN,SH,!CH3,!NH2,!NO2,!OH,!CHO,!COOH,!CN,!SH
enddef;
%--------------------------------------------------------------------------------------------------
def ]]]=] ] ] enddef;
@@ -251,13 +247,14 @@ enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def beginfont(text s)=
begingroup
- save f_beginchar,f_ext,blen,ext,add,ang_br;
+ save ',f_beginchar,f_ext,blen,ext,add,ang_br;
%------------------------------------------------------------------------------------------------
def ext=ext_to_font enddef;
def add=add_to_molecule enddef;
+ vardef '(text TXT)== read_mcf(incr parts_cnt)((_com,_mark),TXT,(_com,_rest)); parts_cnt enddef;
%------------------------------------------------------------------------------------------------
inf_NO:=inf_EN:=inf_JN:=inf_MW:=inf_FM:=inf_CAS:=inf_USE:=inf_EXA:=inf_EXB:="-";
- cal_MW:=cal_MW_str:=cal_MI:=cal_MI_str:=cal_FM:="";
+ cal_MW:=cal_MI:=cal_FM:="";
%------------------------------------------------------------------------------------------------
parts_cnt:=parts_usr_start;
parts_int:=parts_int_start;
@@ -316,8 +313,8 @@ def endfont=
endgroup;
if proc_end=1: scantokens("bye"); fi
%-----------------------------------------------------------------------------------------------
-%% message "parts_cnt (0)="& decimal(parts_cnt) &" "& decimal(parts_usr-parts_usr_start);
-%% message "parts_int (0)="& decimal(parts_int) &" "& decimal(parts_int-parts_int_start);
+%% message "* parts_cnt (0)="& decimal(parts_cnt) &" "& decimal(parts_usr-parts_usr_start);
+%% message "* parts_int (0)="& decimal(parts_int) &" "& decimal(parts_int-parts_int_start);
%-----------------------------------------------------------------------------------------------
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -479,7 +476,7 @@ vardef change_atom(expr a,b)=
ef b==_connect_at:: CP(_cyc,a)
fi
ef pair b::
- if xpart(b)==_set_and:: CP(_set_and,ypart(b)) CP(_chg_charge,a)
+ if xpart(b)==_set_and:: CP(_set_and,ypart(b)) CP(_chg_and,a)
else:: CP(_com,_group_s) CPx(a)(xpart(b),ypart(b)) CP(_com,_group_e)
fi
ef color b:: color_list[incr cntC]:=b; CPe(a)(_set_colorA,cntC)
@@ -502,30 +499,27 @@ def com_par_ex(expr f)(expr c)(expr a,b)=
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def puts(expr POS)(expr STR)=
+ begingroup
+ save temp_c,temp_p;
+ pair temp_p;
+ string temp_c;
temp_p:=POS;
- nB:=defaultscale*defaultsize;
- nC:=0;
- %------------------------------------------------------------------------------------------------
- for i=0 upto length(STR)-1:
- temp_c:=subc(i,STR);
- if sw_label_emu=1:
- if temp_c="_": nC:=iif(nC=-0.5,0,-0.5);
- elseif temp_c="^": nC:=iif(nC= 0.5,0, 0.5);
- else:
- if defaultfont="draw":
- draw_char(temp_c,temp_p+(0,nB*nC),nB,ratio_thickness_char*defaultscale*defaultsize,0);
- temp_p:=temp_p+(nB*tbl_char_wd[ASCII(temp_c)],0);
- else:
- temp_picture:=temp_c infont defaultfont scaled defaultscale;
- addto currentpicture also temp_picture shifted (temp_p+(0,nB*nC));
- temp_p:=temp_p+(lrcorner temp_picture-llcorner temp_picture);
- fi
- fi
- else:
- draw_char(temp_c,temp_p,nB,ratio_thickness_char*defaultscale*defaultsize,0);
- temp_p:=temp_p+(nB*tbl_char_wd[ASCII(temp_c)],0);
- fi
- endfor
+ nC:=defaultscale*defaultsize;
+ if (defaultfont="draw")or(f_MP=0):
+ for i=0 upto length(STR)-1:
+ temp_c:=subc(i,STR);
+ draw_char(temp_c,temp_p,nC,ratio_thickness_char*nC,0);
+ temp_p:=temp_p+(nC*tbl_char_wd[ASCII(temp_c)],0);
+ endfor
+ else:
+ for i=0 upto length(STR)-1:
+ temp_c:=subc(i,STR);
+ temp_picture:=temp_c infont defaultfont scaled defaultscale;
+ addto currentpicture also temp_picture shifted temp_p;
+ temp_p:=temp_p+(lrcorner temp_picture-llcorner temp_picture);
+ endfor
+ fi
+ endgroup
enddef;
%==================================================================================================
def ext_setup=
@@ -534,14 +528,14 @@ def ext_setup=
labeloffset:=3bp;
save em;
em=defaultscale*defaultsize;
- if (f_MP=0)or(sw_label_emu=1):
+ if (defaultfont="draw")or(f_MP=0):
save label,dotlabel;
def label = label_emu enddef;
def dotlabel = dotlabel_emu enddef;
else:
- defaultfont:="uhvr8r";
+ defaultfont:=mpfont;
fi
- if (sw_arrow=0)or(f_MP=0):
+ if (sw_arrow_emu=1)or(f_MP=0):
save drawarrow,drawdblarrow;
def drawarrow = drawarrow_emu enddef;
def drawdblarrow = drawdblarrow_emu enddef;
@@ -587,7 +581,7 @@ enddef;
%--------------------------------------------------------------------------------------------------
def ext_to_font(text TXT)=
begingroup
- save w,h,wd,ht,n,p,am,aw,__,**,<<,=>,/*;
+ save w,h,An,Bn,wd,ht,n,p,am,aw,__,**,<<,=>,/*;
pair __,p[];
let ** = scaled;
let << = rotated;
@@ -598,6 +592,8 @@ def ext_to_font(text TXT)=
ext_setup;
w:=xpart(fsize);
h:=ypart(fsize);
+ An:=cntA;
+ Bn:=cntB;
w0:=w-2margin_lr;
h0:=h-2margin_tb;
p0:=(margin_lr,margin_tb);
@@ -667,23 +663,20 @@ vardef lone_pair_add expr ANG=
enddef;
%--------------------------------------------------------------------------------------------------
vardef label_emu@#(expr OBJ,POS) = %% modified 'thelabel@#(expr s,z)' of plain.mp
- save oft,fx,fy,wds,sC,pA,pB,pC,pD;
+ save oft,fx,fy,wds,pA,pB,pC,pD,sC;
pair oft,oft.lft,oft.rt,oft.top,oft.bot,oft.ulft,oft.llft,oft.urt,oft.lrt,pA,pB,pC,pD;
- string sC;
wds:=0;
+ nC:=defaultscale*defaultsize;
%---------------------------------------------------------------
if string OBJ:
- for i=0 upto length(OBJ)-1:
- sC:=subc(i,OBJ);
- if not((sw_label_emu=1)and((sC="_")or(sC="^"))):
- if (defaultfont="draw")or(f_MP=0):
- wds:=wds+defaultscale*defaultsize*tbl_char_wd[ASCII(sC)];
- else:
- temp_picture:=sC infont defaultfont scaled defaultscale;
- wds:=wds+xpart(lrcorner temp_picture-llcorner temp_picture);
- fi
- fi
- endfor
+ if (defaultfont="draw")or(f_MP=0):
+ for i=0 upto length(OBJ)-1: wds:=wds+nC*tbl_char_wd[ASCII(subc(i,OBJ))]; endfor
+ else:
+ for i=0 upto length(OBJ)-1:
+ temp_picture:=subc(i,OBJ) infont defaultfont scaled defaultscale;
+ wds:=wds+xpart(lrcorner temp_picture-llcorner temp_picture);
+ endfor
+ fi
fi
%---------------------------------------------------------------
oft:= ( 0, 0); fx:=0.5; fy:=0.5;
@@ -697,7 +690,7 @@ vardef label_emu@#(expr OBJ,POS) = %% modified 'thelabel@#(expr s,z)' of plain.m
oft.lrt:= ( .7,-.7); fx.lrt:=0; fy.lrt:=1;
%---------------------------------------------------------------
if string OBJ:
- puts(POS+(labeloffset*oft@#)-(wds*fx@#,defaultscale*defaultsize*fy@#))(OBJ);
+ puts(POS+(labeloffset*oft@#)-(wds*fx@#,nC*fy@#))(OBJ);
elseif picture OBJ:
pA:=llcorner(OBJ);
pB:=urcorner(OBJ);
@@ -748,9 +741,9 @@ enddef;
def MC(text TXT)=
begingroup
save f_bra,strAT,cnt_group,temp_lenE,temp_lenF,temp_cntB,f_end,f_term,f_at,f_lineT,f_rotT,
- f_lenT,f_envT,sA,sC,factor,m_wd,m_ht,defaultsize,defaultscale;
- %-----------------------------------------------------------------------------------------------
- string sA,sC;
+ f_lenT,f_envT,sA,factor,m_wd,m_ht,temp_p,defaultsize,defaultscale;
+ string sA;
+ pair temp_p;
%-----------------------------------------------------------------------------------------------
if (sw_numberA>=1)or(sw_numberB>=1): ratio_atom_bond:=0.25; fi
if (sw_expand=1)or(sw_mol_out>=1): expand_set; fi
@@ -805,10 +798,7 @@ def MC(text TXT)=
draw_char(sA,temp_p,atom_wd,bond_pen_wd*ratio_char_bond,0);
else: sA:="";
fi
- nA:=length(strD[numS[i]]); sC:=substring(nA-3,nA-2) of strD[numS[i]];
- if (sA="+")or(sC="+"): chargeA[i]:=1; ef (sA="-")or(sC="-"): chargeA[i]:=-1;
- else: chargeA[i]:=0;
- fi
+ if sA="+": chargeA[i]:=1; elseif sA="-": chargeA[i]:=-1; else: chargeA[i]:=0; fi
endfor
%-draw bond-------------------------------------------------------------------------------------
for i=1 upto cntB: if lineB[i]<si_ : draw_bond(i); fi endfor
@@ -859,7 +849,7 @@ def MC(text TXT)=
mol_stru[cntM]:=currentpicture;
clearit;
endgroup;
- if ((sw_aux_out>=1)or(sw_rep_out=1)or(sw_mol_out>=1)or(sw_calc=1))and(f_MP=1): proc_calc; fi
+ if ((sw_aux_out>=1)or(sw_rep_out=1)or(sw_mol_out>=1)or(sw_calc=1)): proc_calc; fi
enddef;
%-------------------------------------------------------------------------------------------------
def add_group=
@@ -1000,7 +990,7 @@ def proc_bond_atom(expr a)(expr n)=
ef com=_set_colorA: colorA[getA(adrT)]:=par;
ef com=_set_colorB: colorB[getB(adrT)]:=par;
ef com=_set_and: andAT:=par;
- ef com=_chg_charge: andA[getA(par)]:=andAT; andAT:=0; if rotT<>0: and_rot[getA(par)]:=rotT; fi
+ ef com=_chg_and: andA[getA(par)]:=andAT; andAT:=0; if rotT<>0: and_rot[getA(par)]:=rotT; fi
else:
fi
endfor
@@ -1139,7 +1129,13 @@ def draw_atom(expr NUM)=
if sB="_": pB:=iif(pB=(0,0),(0,-.5atom_wd),(0,0));
elseif sB="^": pB:=iif(pB=(0,0),(0, .5atom_wd),(0,0));
elseif (sB<>"{")and(sB<>"}"):
- if (atomfont<>"draw")and(f_MP=1):
+ if (atomfont="draw")or(f_MP=0):
+ f_wd:=atom_wd*tbl_char_wd[ASCII(sB)];
+ if dx=-1: pA:=pA-(f_wd,0); fi
+ draw_char(sB,pA+pB,atom_wd,bond_pen_wd*ratio_char_bond,NUM);
+ if sw_aframe=1: draw_frame(pA+pB,f_wd,atom_wd,thickness_aframe); fi
+ if dx=1: pA:=pA+(f_wd,0); fi
+ else:
atom_picture:=sB infont atomfont;
f_wd:=(xpart(lrcorner atom_picture)-xpart(llcorner atom_picture))*r_ff;
f_ht:=(ypart(urcorner atom_picture)-ypart(llcorner atom_picture))*r_ff;
@@ -1148,12 +1144,6 @@ def draw_atom(expr NUM)=
shifted (pA+pB+(f_wd*ratio_atomgap_atom,f_ht*ratio_atomgap_atom)) Cp(colorA[NUM]);
if sw_aframe=1: draw_frame(pA+pB,f_wd,f_ht,thickness_aframe); fi
if dx=1: pA:=pA+(f_wd,0); fi
- else:
- f_wd:=atom_wd*tbl_char_wd[ASCII(sB)];
- if dx=-1: pA:=pA-(f_wd,0); fi
- draw_char(sB,pA+pB,atom_wd,bond_pen_wd*ratio_char_bond,NUM);
- if sw_aframe=1: draw_frame(pA+pB,f_wd,atom_wd,thickness_aframe); fi
- if dx=1: pA:=pA+(f_wd,0); fi
fi
wdA[NUM]:=wdA[NUM]+f_wd;
fi
@@ -1201,12 +1191,26 @@ def draw_bond(expr NUM)=
ef nL=vf: draw zA Cp(col);draw sfrt(Le,bondgap,ang-150)--Le--sfrt(Le,bondgap,ang+150) Cp(col);
ef nL=vb: draw zA Cp(col);draw sfrt(Ls,bondgap,ang-30)--Ls--sfrt(Ls,bondgap,ang+30) Cp(col);
ef nL=si_: erase draw subpath (0.15,0.85) of zA wpcs 0.8bondgap; draw zA Cp(col);
+ ef nL=dl_: erase draw subpath (0.15,0.85) of sfrt(subpath pA of zA,.5bondgap,ap) wpcs 1.8bondgap;
+ draw zA Cp(col); draw sfrt(subpath pA of zA,bondgap,ap) Cp(col);
+ ef nL=dr_: erase draw subpath (0.15,0.85) of sfrt(subpath pA of zA,.5bondgap,am) wpcs 1.8bondgap;
+ draw zA Cp(col); draw sfrt(subpath pA of zA,bondgap,am) Cp(col);
+ ef nL=dm_: erase draw subpath(0.15,0.85) of zA wpcs 1.8 bondgap;
+ draw sfrt(zA,bondgap/1.75,ap) Cp(col); draw sfrt(zA,bondgap/1.75,am) Cp(col);
ef nL=wf_: erase draw subpath (0.15,0.85) of (Ls--sfrt(Le,ww,am)) wpcs 0.8bondgap;
erase draw subpath (0.15,0.85) of (Ls--sfrt(Le,ww,ap)) wpcs 0.8bondgap;
fill Ls--sfrt(Le,ww,am)--sfrt(Le,ww,ap)--cycle Cp(col);
ef nL=wb_: erase draw subpath (0.15,0.85) of (sfrt(Ls,ww,am)--Le) wpcs 0.8bondgap;
erase draw subpath (0.15,0.85) of (sfrt(Ls,ww,ap)--Le) wpcs 0.8bondgap;
fill sfrt(Ls,ww,am)--Le--sfrt(Ls,ww,ap)--cycle Cp(col);
+ ef nL=zf_: erase draw subpath (0.15,0.85) of (Ls--sfrt(Le,ww,am)) wpcs 0.8bondgap;
+ erase draw subpath (0.15,0.85) of zA wpcs 0.8bondgap;
+ erase draw subpath (0.15,0.85) of (Ls--sfrt(Le,ww,ap)) wpcs 0.8bondgap;
+ wz_put(Ls,sfrt(Le,ww,ap),sfrt(Le,ww,am));
+ ef nL=zb_: erase draw subpath (0.15,0.85) of (sfrt(Ls,ww,am)--Le) wpcs 0.8bondgap;
+ erase draw subpath (0.15,0.85) of zA wpcs 0.8bondgap;
+ erase draw subpath (0.15,0.85) of (sfrt(Ls,ww,ap)--Le) wpcs 0.8bondgap;
+ wz_put(Le,sfrt(Ls,ww,am),sfrt(Ls,ww,ap));
ef nL=bd_: erase draw subpath(0.15,0.85) of zA wpcs 1.6bondgap;
draw zA withpen penrazor rotated ap scaled bondgap Cp(col);
ef nL=nb:
@@ -1235,114 +1239,6 @@ vardef frame_str(expr NUM)=
(posA[NUM]-(.5nA+iif((dxA[NUM]=-1)and(wdA[NUM]>atom_wd),nB-nA,0),.5nA))
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-vardef STa(expr ATOM,WT,MI)=
- str_cnt:=str_cnt+1; parts_cnt:=parts_cnt+1; tbl_cnt:=tbl_cnt+1;
- comD[parts_cnt][1]:=_set_atom; parD[parts_cnt][1]:=str_cnt; cntD[parts_cnt]:=1;
- strD[str_cnt]:=tbl_atom_str[tbl_cnt]:=ATOM;
- tbl_atom[tbl_cnt]:=0;
- tbl_atom_wt[tbl_cnt]:=WT; tbl_atom_mi[tbl_cnt]:=MI;
- parts_cnt
-enddef;
-%-------------------------------------------------------------------------------------------------
-vardef STb(expr ATOM)(text TXT)=
- str_cnt:=str_cnt+1; parts_cnt:=parts_cnt+1; tbl_cnt:=tbl_cnt+1;
- comD[parts_cnt][1]:=_set_atom; parD[parts_cnt][1]:=str_cnt; cntD[parts_cnt]:=1;
- strD[str_cnt]:=tbl_atom_str[tbl_cnt]:=ATOM;
- tbl_atom[tbl_cnt]:=0;
- for list=TXT:
- tbl_atom[tbl_cnt]:=tbl_atom[tbl_cnt]+1;
- tbl_group[tbl_cnt][tbl_atom[tbl_cnt]]:=list-parts_emb_start;
- endfor
- parts_cnt
-enddef;
-%=================================================================================================
-parts_int:=parts_emi_start;
-parts_cnt:=parts_emb_start;
-%-------------------------------------------------------------------------------------------------
-C:= STa("C" ,12.0107, 12.0000000); H:= STa("H" , 1.00794, 1.00782503223);
-Al:=STa("{Al}",26.9815, 26.98153853); As:=STa("{As}",74.9216, 74.92159457);
-B:= STa("B" ,10.811, 11.00930536); Br:=STa("{Br}",79.904, 78.9183376);
-Ca:=STa("{Ca}",40.078, 39.962590863); Cl:=STa("{Cl}",35.453, 34.968852);
-Co:=STa("{Co}",58.933194, 58.93319429); Cr:=STa("{Cr}",51.9961, 51.94050623);
-Cu:=STa("{Cu}",63.546, 62.92959772); D:= STa("D" ,2.012, 2.01410177812);
-F:= STa("F" ,18.9984, 18.99840316273); Fe:=STa("{Fe}",55.845, 55.93493633);
-Hg:=STa("{Hg}",200.59, 201.97064340); I:= STa("I" ,126.90447,126.9044719);
-K:= STa("K" ,39.0983, 38.9637064864); Li:=STa("{Li}",6.941, 7.0160034366);
-Mg:=STa("{Mg}",24.305, 23.985041697); Mn:=STa("{Mn}",54.938044, 54.93804391);
-Na:=STa("{Na}",22.98977, 22.9897692820); Ni:=STa("{Ni}",58.693, 57.93534241);
-N:= STa("N" ,14.0067, 14.00307400443); O:= STa("O" ,15.9994, 15.99491461957);
-P:= STa("P" ,30.973762, 30.97376199842); S:= STa("S" ,32.065, 31.9720711744);
-Se:=STa("{Se}",78.971, 79.9165218); Si:=STa("{Si}",28.0855, 27.97692653465);
-Sn:=STa("{Sn}",118.71, 119.90220163); Ti:=STa("{Ti}",47.867, 47.94794198);
-U:= STa("U", 238.0289, 238.05079); Zn:=STa("{Zn}",65.409, 63.92914201);
-tbl_atom_end:=tbl_cnt;
-%-------------------------------------------------------------------------------------------------
-CH3:=STb("C{H_3_}")(C,H,H,H); CH2:=STb("C{H_3_}")(C,H,H); CN:=STb("CN")(C,N); OH:=STb("OH")(O,H);
-COOH:=STb("COOH")(C,O,O,H); SH:= STb("SH")(S,H); CHO:=STb("CHO")(C,H,O);
-NO2:=STb("N{O_2_}")(N,O,O); NH2:=STb("N{H_2_}")(N,H,H);
-ONa:=STb("O{Na}")(O,Na); SO3Na:=STb("S{O_3_}{Na}")(S,O,O,O,Na);
-%-------------------------------------------------------------------------------------------------
-str_plus:=str_cnt;
-N[1]:=STb("{N^+^}")(N); H[1]:=STb("{H^+^}")(H); Na[1]:=STb("{Na^+^}")(Na); K[1]:=STb("{K^+^}")(K);
-NH3[1]:= STb("{N^+^}{H_3_}")(N,H,H,H); NH4[1]:= STb("{N^+^}{H_4_}")(N,H,H,H,H);
-S[1]:= STb("{S^+^}")(S);
-str_minus:=str_cnt;
-O[-1]:=STb("{O^-^}")(O); COO[-1]:=STb("COO^-^")(C,O,O); SO3[-1]:=STb("S{O_3_}^-^")(S,O,O,O);
-Cl[-1]:=STb("{Cl^-^}")(Cl); Br[-1]:=STb("{Br^-^}")(Br); I[-1]:=STb("{I^-^}")(I);
-%-------------------------------------------------------------------------------------------------
-str_minus_end:=str_cnt;
-tbl_group_end:=tbl_cnt;
-parts_atom_end:=parts_cnt;
-%=================================================================================================
-for i==3 upto 20: ?[i]:='(|<<,(_get_len,_ring_len),<((-180 DIV i)-90)
- for j==2 upto i:: ,(360 DIV i) endfor,(_cyc_sB,1-i),>>|); endfor
-Ph:=Ph1:='(?6,-2=dl,-4=dl,-6=dl); Ph2:='(?6,-1=dl,-3=dl,-5=dl);
-!:=!1:='((_mk_bond,_arg_ang)); !!:='(!~db); !!!:='(!~tm);
-for i==2 upto 20: ![i]:='(|<<,(_get_len,_tmp_len),! for j==2 upto i::,! endfor ,>>|); endfor
-Me:='(); Et:='(!); Pr:='(!,!); Bu:='(!,!,!); iPr:=?!:='(/_,!); tBu:=??!:='(/_,/_^60,60);
-%-------------------------------------------------------------------------------------------------
-NH:='(N,/H~nl); N!:='(N,/_); N!2:='(N,/!); SO:='(S,//O); SOO:='(S,//O^-35,//O^35);
-O!:='(O,!); O!2:='(O,!,!); O!3:='(O,!,!,!); O!?!:='(O,!,?!); O!??!:='(O,!,??!);
-S!:='(S,!); S!2:='(S,!,!); S!3:='(S,!,!,!); S!?!:='(S,!,?!); S!??!:='(S,!,??!);
-%-------------------------------------------------------------------------------------------------
-COO:='(//O,!,O); COO!:='(COO,!); COO!2:='(COO,!,!); COO!??:='(COO,!,?!); COO!3:='(COO,!,!,!);
-CO!:='(//O,!); CO!2:='(//O,!,!); CO!3:='(//O,!,!,!); OCO!:='(O,!,//O,!);
-N?!:='(N!,!); N?!2:='(N!,!,!); NH!:='(NH,!); NH!2:='(NH,!,!); NH!3:='(NH,!,!,!);
-NH!?!:='(NH,!,?!); NHCO!:='(NH,!,//O,!); CONH2:='(//O,!,NH2); ??:='(/_^35,/_^-35);
-%-------------------------------------------------------------------------------------------------
-!OH:='(!,OH); !SH:='(!,SH); !NH2:='(!,NH2); !CO!:='(!,//O,!); !CO!2:='(!,CO!2); !CO!3:='(!,CO!3);
-!O!:='(!,O!); !O!2:='(!,O!2); !O!3:='(!,O!3);
-!S!:='(!,S!); !S!2:='(!,S!2); !S!3:='(!,S!3);
-!NH!:='(!,NH!); !NH!2:='(!,NH!2); !NH!3:='(!,NH!3);
-!COOH:='(!,COOH); !COO!:='(!,COO!); !COO!2:='(!,COO!2);
-!CH3:='(!,CH3); !CN:='(!,CN); !?!:='(!,?!); !??!:='(!,??!);
-!CHO:='(!,CHO); !NO2:='(!,NO2); !Cl:='(!,Cl); !Br:='(!,Br); !F:='(!,F);
-!?3:='(!,?3); !?4:='(!,?4); !?5:='(!,?5); !?6:='(!,?6); !?7:='(!,?7); !?8:='(!,?8); !Ph:='(!,Ph);
-%-------------------------------------------------------------------------------------------------
-CF2:='(/F,60,F); CCl2:='(/Cl,60,Cl); CBr2:='(/Br,60,Br);
-CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/Br,/Br^60,60,Br);
-%-------------------------------------------------------------------------------------------------
-lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr);
-for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
-for i=5,6,7,8: for j=11 upto 15: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
-%-------------------------------------------------------------------------------------------------
-R:='("R"); R1:='("{R^1^}"); R2:='("{R^2^}"); R3:='("{R^3^}"); R4:='("R^4^"); R5:='("{R^5^}");
-R6:='("R6"); R7:='("{R^7^}"); R8:='("{R^8^}"); R9:='("{R^9^}"); R10:='("R^10^"); R11:='("{R^11^}");
-%-------------------------------------------------------------------------------------------------
-xCH3:='(/H,/H^60,60,H); xNH:='(N,/H); xNH2:='(N,/H,60,H); xNO2:='(N,//O,60~dm,O); xOH:='(O,!,H);
-xCHO:='(//O,!,H); xCOOH:='(//O,!,O,!,H); xCN:='(!~tm,N); xSH:='(S,!,H);
-%=================================================================================================
-init_par(parameter_list);
-%-------------------------------------------------------------------------------------------------
-%%%%message "parts_emb =" & decimal(parts_emb_start) &" => " & decimal(parts_cnt);
-%%%%message "parts_emi =" & decimal(parts_emi_start) &" => " & decimal(parts_int);
-%-------------------------------------------------------------------------------------------------
-def expand_set=
- CH3:=xCH3; NH:=xNH; NH2:=xNH2; NO2:=xNO2; OH:=xOH; CHO:=xCHO; COOH:=xCOOH; CN:=xCN; SH:=xSH;
- !CH3:='(!,CH3); !OH:='(!,OH); !NH2:='(!,NH2); !CHO:='(!,CHO); !COOH:='(!,COOH); !CN:='(!,CN);
- !SH:='(!,SH); !NO2:='(!,NO2);
-enddef;
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def char_size_set(expr WD)(expr HT)(expr STR)=
for j=0 upto length(STR)-1:
nA:=ASCII(subc(j,STR)); tbl_char_wd[nA]:=WD; tbl_char_ht[nA]:=HT;
@@ -1352,9 +1248,9 @@ enddef;
char_size_set( 1)( 1)("CGHMNOQW");
char_size_set( .9)( 1)("ABDFIJKPRSTUVXY/><#\%@");
char_size_set( .8)( 1)("ELZ&");
-char_size_set( .7)( 1)(" ()[]0123456789nh=tfg?~");
+char_size_set( .7)( 1)(" ()[]0123456789nh=tfg?~^");
char_size_set( .7)( .9)("$");
-char_size_set( .7)( .7)("-+*");
+char_size_set( .7)( .7)("-+*_");
char_size_set(.45)(.95)("l");
char_size_set(.75)( .8)("opq");
char_size_set( .8)( .8)("e");
@@ -1363,7 +1259,7 @@ char_size_set( .7)( .8)("abdcksuvrxyz");
char_size_set(.35)( .9)("i");
char_size_set( .5)( .9)("j");
char_size_set(.35)( 1)("!|");
-char_size_set( .4)( 1)(".,:;'`^");
+char_size_set( .4)( 1)(".,:;'`");
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def draw_char(expr CHR,POS,WD,PEN,NUM)=
begingroup
@@ -1496,6 +1392,8 @@ ef sC="~": dw (hP,.8aH)..(.3aW,.9aH)..(.6aW,.7aH)..(fW,.8aH);
ef sC="&": cdw Z21..(hW,.35aH)..(.25aW,.75aH)..(hW,.fH)..(.75aW,.75fH)..(hP,.3aH)..(hW,.hP)..Z10;
ef sC="@": cdw sbp(0,.7)zO; dwv (fW,hH)--(fW,0);
dw (fW,.45aH)..(.7aW,.75aH)..(.3aW,.45aH)..(.7aW,.15aH)..cycle;
+ef sC="_": dwh Z01--Z04;
+ef sC="^": dwv (hP,.6aH)..(.5aW,.7aH)..(fW,.6aH);
else:
fi
endgroup
@@ -1515,16 +1413,23 @@ def warning_bond(expr a)=
enddef;
%-------------------------------------------------------------------------------------------------
vardef cut_paren(expr ATOM)=
- if length(ATOM)=4: substring (1,3) of ATOM
- elseif length(ATOM)=6: substring (1,2) of ATOM
- else: ATOM
- fi
+ save temp_c,temp_s;
+ string temp_c,temp_s;
+ temp_s:="";
+ if (length(ATOM)>=4)and(ATOM<>"COOH"):
+ for i=0 upto length(ATOM)-1:
+ temp_c:=subc(i,ATOM);
+ if (temp_c<>"{")and(temp_c<>"}")and(temp_c<>"_")and(temp_c<>"^"): temp_s:=temp_s&temp_c; fi
+ endfor
+ temp_s
+ else: ATOM
+ fi
enddef;
%=================================================================================================
def proc_calc=
begingroup
- save warning_cnt,MWp,knownA,bondC,tmp_wtp,bond_cnt,hideH_cnt;
- hideH_cnt:=warning_cnt:=num_MW:=num_MI:=MWp:=tbl_atom_max:=0;
+ save warning_cnt,knownA,bondC,tmp_wtp,bond_cnt,hideH_cnt;
+ hideH_cnt:=warning_cnt:=num_MW:=num_MI:=cen_MW:=cen_MI:=tbl_atom_max:=0;
nE:=parts_emb_start;
for i=1 upto tbl_atom_end: sumA[i]:=0; endfor
for i=1 upto cntA:
@@ -1582,8 +1487,10 @@ def proc_calc=
for i=1 upto tbl_atom_max:
if sumA[i]>=1:
nA:=tbl_atom_wt[i]/100*sumA[i];
- MWp:=MWp+nA;
- if (MWp<40)and(nA<40):
+ nB:=tbl_atom_mi[i]/100*sumA[i];
+ cen_MW:=cen_MW+nA;
+ cen_MI:=cen_MI+nB;
+ if (cen_MW<40)and(cen_MI<40):
num_MW:= num_MW+tbl_atom_wt[i]*sumA[i];
num_MI:= num_MI+tbl_atom_mi[i]*sumA[i];
fi
@@ -1591,8 +1498,10 @@ def proc_calc=
fi
endfor
%-------------------------------------------------------------------------------------
- cal_MI:=substring (0,10) of decimal(num_MI);
- cal_MW:=substring (0,8) of decimal(num_MW);
+ if cen_MW<40: cal_MW:=substring (0,8) of decimal(num_MW);
+ else: num_MW:=cen_MW; cal_MW:=fdr(6)(cen_MW)&"*100"; fi
+ if cen_MI<40: cal_MI:=substring (0,10) of decimal(num_MI);
+ else: num_MI:=cen_MI; cal_MI:=fdr(8)(cen_MI)&"*100"; fi
if sw_aux_out>=1: proc_auxfile_out; fi
if sw_rep_out=1: proc_report_out; fi
if sw_mol_out>=1: proc_mol_out; fi
@@ -1655,49 +1564,44 @@ def proc_report_out=
printf " Atom count="&fdr(3)(cntA)&" Bond count="&fdr(3)(cntB)&
" Ring count="&fdr(3)(cntB-cntA+1)&" Hide H count="&fdr(3)(hideH_cnt);
printf "------------------------------------------------------------------";
- printf "< NO. >( x axis , y axis )< atom(s) ><bond><hideH><chg>";
+ printf "< NO. ><atom(s) >( x axis , y axis )<bond><hideH><chg>";
for i=1 upto cntA:
- printf " A"&fdl(4)(i)&" ("&fdr(10)(round_auto(xpart(posA[i])/blen))&" , "&
- fdr(10)(round_auto(ypart(posA[i])/blen))&" ) "&
- fixed_l(12)(strD[numS[i]])&" "&fdr(3)(Bcnt[i])
- &iif(hideH[i]>0,fdr(6)(hideH[i])," ")
+ printf " A"&fdl(6)(i)&fixed_l(8)(cut_paren(strD[numS[i]]))&
+ " ("&fdr(10)(round_auto(xpart(posA[i])/blen))&" , "&
+ fdr(10)(round_auto(ypart(posA[i])/blen))&" ) "&fdr(4)(Bcnt[i])&
+ iif(hideH[i]>0,fdr(6)(hideH[i])," ")
if chargeA[i]<>0: &fdr(4)(chargeA[i]) fi;
endfor
printf "------------------------------------------------------------------";
- printf "< NO. >< bond (sdt)><angle + ( +- )><length ( pt )>";
+ printf "< NO. >< bond (sdt)><angle +( +- )><length ( pt )>";
for i=1 upto cntB:
nC:=lenB[i]; if nC=_size_atom: nC:=ratio_atom_bond; elseif nC<0: nC:=-nC; fi
if lineB[i]<>0:
nB:=angB[i]; if nB>180: nB:=nB-360; fi
printf " B"&fdl(4)(i)&fdr(3)(sB[i])&" -> "&fdr(3)(eB[i])&
- " ("&fdr(3)(bondC[i]-si+1)&")"&fdr(9)(round_auto(angB[i]))&
+ " ("&fdr(3)(bondC[i])&")"&fdr(8)(round_auto(angB[i]))&
" ("&fdr(6)(round_auto(nB))&")"&fdr(8)(nC)&" ("&fdr(8)(round_auto(nC*blen))&")";
fi
endfor
printf "------------------------------------------------------------------";
printf "<atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ]";
- if MWp<=40: cal_MW_str:=cal_MW; cal_MI_str:=cal_MI;
- else: cal_MW_str:=fdr(10)(MWp)&" * 100"; cal_MI_str:=fdr(10)(MIp)&" * 100";
- fi
for i=1 upto tbl_atom_max:
if sumA[i]>=1:
nA:=tbl_atom_wt[i]/100*sumA[i]; nB:=tbl_atom_mi[i]/100*sumA[i];
printf " "&
fixed_l(5)(cut_paren(tbl_atom_str[i]))&
- "("&fdr(9)(tbl_atom_wt[i])&")"&"["&fdr(9)(tbl_atom_mi[i])&"]"&
- " * "&fdr(4)(sumA[i])&" = "
- if nA<40: &fdr(12)(tbl_atom_wt[i]*sumA[i])&"["&fdr(12)(tbl_atom_mi[i]*sumA[i])&"]";
- else: &fdr(12)(nA)&" * 100"&"["&fdr(12)(nA)&" * 100"&"]";
+ "("&fdr(9)(tbl_atom_wt[i])&")"&"["&fdr(9)(tbl_atom_mi[i])&"]"&" * "&fdr(4)(sumA[i])
+ if nA<40: &fdr(15)(tbl_atom_wt[i]*sumA[i])&"["&fdr(12)(tbl_atom_mi[i]*sumA[i])&"]";
+ else: &fdr(11)(nA)&"*100"&"["&fdr(9)(nB)&"*100"&"]";
fi
fi
endfor
- printf " Molecular Weight [Mono Isotopic] = "&
- fixed_r(12)(cal_MW_str)&"["&fixed_r(12)(cal_MI_str)&"]";
+ printf " Molecular Weight [Mono Isotopic] = "&fixed_r(12)(cal_MW)&"["&fixed_r(12)(cal_MI)&"]";
printf "------------------------------------------------------------------";
- printf " Weight Calc: " &cal_MW_str &" / Input: "
- if inf_MW<>"": &inf_MW &" / weight gap= " &decimal(num_MW-scantokens(inf_MW)) fi;
+ printf " Weight Calc: " &cal_MW &" / Input: "
+ if inf_MW<>"-": &inf_MW &" / weight gap= " &decimal(num_MW-scantokens(inf_MW)) fi;
printf " Fomula Calc: "&cal_FM&" / Input: "
- if inf_FM<>"": &inf_FM&" / "& iif(inf_FM=cal_FM,"MACTCH","NOT MACTCH") fi;
+ if inf_FM<>"-": &inf_FM&" / "& iif(inf_FM=cal_FM,"MACTCH","NOT MACTCH") fi;
printf "==================================================================";
enddef;
%=================================================================================================
@@ -1761,7 +1665,7 @@ def proc_vtk=
printf "M END";
enddef;
%-------------------------------------------------------------------------------------------------
-vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi &decimal(n) enddef;
+vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" else: "" fi &decimal(n) enddef;
%-------------------------------------------------------------------------------------------------
def proc_bond_class(expr n)=
if (n=dl)or(n=dr)or(n=dm): nA:=2;
@@ -1772,4 +1676,118 @@ def proc_bond_class(expr n)=
else: nA:=1; nB:=0;
fi
enddef;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+vardef STa(expr ATOM,WT,MI)=
+ str_cnt:=str_cnt+1; tbl_cnt:=tbl_cnt+1; parts_cnt:=parts_cnt+1;
+ comD[parts_cnt][1]:=_set_atom; parD[parts_cnt][1]:=str_cnt; cntD[parts_cnt]:=1;
+ strD[str_cnt]:=tbl_atom_str[tbl_cnt]:=ATOM;
+ tbl_atom[tbl_cnt]:=0;
+ tbl_atom_wt[tbl_cnt]:=WT; tbl_atom_mi[tbl_cnt]:=MI;
+ parts_cnt
+enddef;
+%-------------------------------------------------------------------------------------------------
+vardef STb(expr ATOM)(text TXT)=
+ str_cnt:=str_cnt+1; tbl_cnt:=tbl_cnt+1; parts_cnt:=parts_cnt+1;
+ comD[parts_cnt][1]:=_set_atom; parD[parts_cnt][1]:=str_cnt; cntD[parts_cnt]:=1;
+ strD[str_cnt]:=tbl_atom_str[tbl_cnt]:=ATOM;
+ tbl_atom[tbl_cnt]:=0;
+ for list=TXT:
+ tbl_atom[tbl_cnt]:=tbl_atom[tbl_cnt]+1;
+ tbl_group[tbl_cnt][tbl_atom[tbl_cnt]]:=list-parts_emb_start;
+ endfor
+ parts_cnt
+enddef;
+%=================================================================================================
+parts_int:=parts_emi_start;
+parts_cnt:=parts_emb_start;
+%-------------------------------------------------------------------------------------------------
+C:= STa("C" ,12.0107, 12.0000000); H:= STa("H" , 1.00794, 1.00782503223);
+D:= STa("D" ,2.012, 2.01410177812); Ag:=STa("{Ag}",107.868, 106.905095);
+Al:=STa("{Al}",26.9815, 26.98153853); As:=STa("{As}",74.9216, 74.92159457);
+B:= STa("B" ,10.811, 11.00930536); Ba:=STa("{Ba}",137.33, 136.905816);
+Bi:=STa("{Bi}",208.9804, 208.980338); Br:=STa("{Br}",79.904, 78.9183376);
+Ca:=STa("{Ca}",40.078, 39.962590863); Cd:=STa("{Cd}",112.41, 110.904182);
+Cl:=STa("{Cl}",35.453, 34.968852); Co:=STa("{Co}",58.933194, 58.93319429);
+Cr:=STa("{Cr}",51.9961, 51.94050623); Cu:=STa("{Cu}",63.546, 62.92959772);
+F:= STa("F" ,18.9984, 18.99840316273); Fe:=STa("{Fe}",55.845, 55.93493633);
+Hg:=STa("{Hg}",200.59, 201.97064340); I:= STa("I" ,126.90447,126.9044719);
+K:= STa("K" ,39.0983, 38.9637064864); Li:=STa("{Li}",6.941, 7.0160034366);
+Mg:=STa("{Mg}",24.305, 23.985041697); Mn:=STa("{Mn}",54.938044, 54.93804391);
+N:= STa("N" ,14.0067, 14.00307400443); Na:=STa("{Na}",22.98977, 22.9897692820);
+Ni:=STa("{Ni}",58.693, 57.93534241); O:= STa("O" ,15.9994, 15.99491461957);
+P:= STa("P" ,30.973762, 30.97376199842); Pb:= STa("Pb" ,207.2, 205.974455);
+Pd:=STa("Pd" ,106.4, 107.905075);
+S:= STa("S" ,32.065, 31.9720711744); Sb:= STa("Sb" ,121.75, 0.0);
+Se:=STa("{Se}",78.971, 79.9165218); Si:=STa("{Si}",28.0855, 27.97692653465);
+Sn:=STa("{Sn}",118.71, 119.90220163); Ti:=STa("{Ti}",47.867, 47.94794198);
+U:= STa("U", 238.0289, 238.05079); V:= STa("V", 50.9415, 0.0);
+W:= STa("W", 183.85, 181.948225); Zn:=STa("{Zn}",65.409, 63.92914201);
+tbl_atom_end:=tbl_cnt;
+%-------------------------------------------------------------------------------------------------
+CH3:=STb("C{H_3_}")(C,H,H,H); CH2:=STb("C{H_3_}")(C,H,H); CN:=STb("CN")(C,N); OH:=STb("OH")(O,H);
+COOH:=STb("COOH")(C,O,O,H); SH:= STb("SH")(S,H); CHO:=STb("CHO")(C,H,O);
+NO:=STb("NO")(N,O); NO2:=STb("N{O_2_}")(N,O,O); NH2:=STb("N{H_2_}")(N,H,H);
+SO2H:=STb("S{O_2_}H")(S,O,O,H); SO3H:=STb("S{O_3_}H")(S,O,O,O,H);
+ONa:=STb("O{Na}")(O,Na); SO3Na:=STb("S{O_3_}{Na}")(S,O,O,O,Na);
+%-------------------------------------------------------------------------------------------------
+str_plus:=str_cnt;
+N[1]:=STb("{N^+^}")(N); H[1]:=STb("{H^+^}")(H); Na[1]:=STb("{Na^+^}")(Na); K[1]:=STb("{K^+^}")(K);
+NH3[1]:= STb("{N^+^}{H_3_}")(N,H,H,H); NH4[1]:= STb("{N^+^}{H_4_}")(N,H,H,H,H);
+S[1]:= STb("{S^+^}")(S);
+str_minus:=str_cnt;
+O[-1]:=STb("{O^-^}")(O); COO[-1]:=STb("COO^-^")(C,O,O); SO3[-1]:=STb("S{O_3_}^-^")(S,O,O,O);
+Cl[-1]:=STb("{Cl^-^}")(Cl); Br[-1]:=STb("{Br^-^}")(Br); I[-1]:=STb("{I^-^}")(I);
+%-------------------------------------------------------------------------------------------------
+str_minus_end:=str_cnt;
+tbl_group_end:=tbl_cnt;
+parts_atom_end:=parts_cnt;
+%=================================================================================================
+for i==3 upto 20: ?[i]:='(|<<,(_get_len,_ring_len),<((-180 DIV i)-90)
+ for j==2 upto i:: ,(360 DIV i) endfor,(_cyc_sB,1-i),>>|); endfor
+Ph:=Ph1:='(?6,-2=dl,-4=dl,-6=dl); Ph2:='(?6,-1=dl,-3=dl,-5=dl);
+!:=!1:='((_mk_bond,_arg_ang)); !!:='(!~db); !!!:='(!~tm);
+for i==2 upto 20: ![i]:='(|<<,(_get_len,_tmp_len),! for j==2 upto i::,! endfor ,>>|); endfor
+Me:='(); Et:='(!); iPr:=?!:='(/_,!); tBu:=??!:='(/_,/_^60,60); !?!:='(!,?!); !??!:='(!,??!);
+%-------------------------------------------------------------------------------------------------
+NH:='(N,/H~nl); N!:='(N,/_); N!2:='(N,/!); SO:='(S,//O); SOO:='(S,//O^-35,//O^35);
+O!:='(O,!); O!2:='(O,!,!); O!3:='(O,!,!,!); O!?!:='(O,!,?!); O!??!:='(O,!,??!);
+S!:='(S,!); S!2:='(S,!,!); S!3:='(S,!,!,!); S!?!:='(S,!,?!); S!??!:='(S,!,??!);
+%-------------------------------------------------------------------------------------------------
+COO:='(//O,!,O); COO!:='(COO,!); COO!2:='(COO,!,!); COO!??:='(COO,!,?!); COO!3:='(COO,!,!,!);
+CO!:='(//O,!); CO!2:='(//O,!,!); CO!3:='(//O,!,!,!); OCO!:='(O,!,//O,!);
+N?!:='(N!,!); N?!2:='(N!,!,!); NH!:='(NH,!); NH!2:='(NH,!,!); NH!3:='(NH,!,!,!);
+NH!?!:='(NH,!,?!); NHCO!:='(NH,!,//O,!); CONH2:='(//O,!,NH2); ??:='(/_^35,/_^-35);
+%-------------------------------------------------------------------------------------------------
+!OH:='(!,OH); !SH:='(!,SH); !NH2:='(!,NH2); !CO!:='(!,//O,!); !CO!2:='(!,CO!2); !CO!3:='(!,CO!3);
+!O!:='(!,O!); !O!2:='(!,O!2); !O!3:='(!,O!3); !S!:='(!,S!); !S!2:='(!,S!2); !S!3:='(!,S!3);
+!NH!:='(!,NH!); !NH!2:='(!,NH!2); !NH!3:='(!,NH!3);
+!COOH:='(!,COOH); !COO!:='(!,COO!); !COO!2:='(!,COO!2); !CH3:='(!,CH3); !CN:='(!,CN);
+!CHO:='(!,CHO); !NO2:='(!,NO2); !Cl:='(!,Cl); !Br:='(!,Br); !F:='(!,F);
+!?3:='(!,?3); !?4:='(!,?4); !?5:='(!,?5); !?6:='(!,?6); !?7:='(!,?7); !?8:='(!,?8); !Ph:='(!,Ph);
+%-------------------------------------------------------------------------------------------------
+CF2:='(/F,60,F); CCl2:='(/Cl,60,Cl); CBr2:='(/Br,60,Br);
+CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/Br,/Br^60,60,Br);
+%-------------------------------------------------------------------------------------------------
+lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr);
+for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
+for i=5,6,7,8: for j=11 upto 15: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
+%-------------------------------------------------------------------------------------------------
+R:='("R"); R1:='("{R^1^}"); R2:='("{R^2^}"); R3:='("{R^3^}"); R4:='("R^4^"); R5:='("{R^5^}");
+R6:='("R6"); R7:='("{R^7^}"); R8:='("{R^8^}"); R9:='("{R^9^}"); R10:='("R^10^"); R11:='("{R^11^}");
+%-------------------------------------------------------------------------------------------------
+xCH3:='(/H,/H^60,60,H); xNH:='(N,/H); xNH2:='(N,/H,60,H); xNO2:='(N,//O,60~dm,O); xNO:='(N,!~dm,O);
+xSO2H:='(S,//O,!,O,!,H); xSO3H:='(S,//O^35,//O^-35,!,O,!,H); xCOO:='(//O,!,O);
+xOH:='(O,!,H); xCHO:='(//O,!,H); xCOOH:='(//O,!,O,!,H); xCN:='(!~tm,N); xSH:='(S,!,H);
+%=================================================================================================
+init_par(parameter_list);
+%-------------------------------------------------------------------------------------------------
+%%%%message "parts_emb =" & decimal(parts_emb_start) &" => " & decimal(parts_cnt);
+%%%%message "parts_emi =" & decimal(parts_emi_start) &" => " & decimal(parts_int);
+%-------------------------------------------------------------------------------------------------
+def expand_set=
+ CH3:=xCH3; NH:=xNH; NH2:=xNH2; NO:=xNO; NO2:=xNO2; OH:=xOH; CHO:=xCHO; COOH:=xCOOH; CN:=xCN;
+ SH:=xSH; SO2H:=xSO2H; SO3H:=xSO3H; COO[-1]:=xCOO;
+ !CH3:='(!,CH3); !OH:='(!,OH); !NH2:='(!,NH2); !CHO:='(!,CHO); !COOH:='(!,COOH); !CN:='(!,CN);
+ !SH:='(!,SH); !NO2:='(!,NO2);
+enddef;
%-------------------------------------------------------------------------------------------------