summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-28 21:42:17 +0000
committerKarl Berry <karl@freefriends.org>2016-04-28 21:42:17 +0000
commit421666a3551c85693aa8880d01fa24d9a0ec5dd9 (patch)
tree15d239f92456c0283aa3ed9ce68a754d4834600c
parentf529089ae21bedbfe683bb242c18309d5f4bf034 (diff)
mcf2graph (28apr16)
git-svn-id: svn://tug.org/texlive/trunk@40804 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG9
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README33
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf15
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin247583 -> 247719 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex24
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin419722 -> 419705 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex60
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin123292 -> 123503 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex35
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf74
10 files changed, 123 insertions, 127 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
index 4b8bd40ae1a..122e186f119 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
@@ -1,6 +1,11 @@
*******************************************************************************
- Changelog of mcf2graph software package by Akira Yamaji 2016-04-10
+ Changelog of mcf2graph software package by Akira Yamaji 2016-04-28
*******************************************************************************
+[ver. 3.90 / 2016-04-28]
+ -add parameter 'sw_auxfix'
+ fixed aux information format is added
+ It is easy to use with spreadsheet software
+
[ver. 3.89 / 2016-04-10]
-add new bond type bz (broad dotted)
@@ -8,7 +13,7 @@
-rename variable 'aux_separater' => 'aux_delimiter'
[ver. 3.87 / 2016-04-04]
- -change aux infomation delimiter(, => ;)
+ -change aux information delimiter(, => ;)
a lot of molecular name include ','
[ver. 3.86 / 2016-04-02]
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index 54e8f1ae7b3..33b39bda791 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 : 3.89 2016-04-10
+ version : 3.90 2016-04-28
E-mail : mcf2graph@gmail.com
Located at : http://www.ctan.org/pkg/mcf2graph
********************************************************************************
@@ -37,35 +37,7 @@
( 5) >mpost -s ahlength=1 FILENAME => output first definition only (for test)
( 6) >mpost -s ahlength=2 FILENAME => output checklist.
-4. Molecular definition file example
-
- %-----------------------------------------------------------------------
- input mcf2graph.mf; % input main system
- %-- preamble -----------------------------------------------------------
- sw_auxout:=1; % aux(information) file output on >
- sw_numberA:=0; % numbering atom off >
- sw_numberB:=0; % numbering bond off >
- sw_expand:=0; % substituent expand mode off >
- sw_start_vector:=0; % start vector output off > Gloval setting
- sw_font_frame:=0; % font frame off >
- font_wd#:=60mm#; % font width >
- font_ht#:=40mm#; % font height >
- var3:="calc_weight"; tag3:="MWc"; > AUX file table
- var4:="calc_formula"; tag4:="FMc"; >
- %-- molecular definition -----------------------------------------------
- beginfont("EN:Acetamiprid") % molecular 1
- sw_font_frame:=1; % > Local setting
- MCf(<30,Ph,4\,!,NH,!,!~dr,N,!,CN) % MCF
- endfont %
- beginfont("EN:Imidacloprid") % molecular 2
- sw_start_vector:=1; % > Local setting
- MCf(<30,Ph,1:N,6:/Cl,3\,!, % MCF
- |,?5,1:N,3:NH,2\\,!,NO2) %
- endfont %
- %-----------------------------------------------------------------------
- bye
-
-5. License
+4. License
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, including without limitation the rights
@@ -84,4 +56,3 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-%----------------------------------------------------------------------------
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 387d6e15386..74092f1aaac 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2016.04.2
+% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2016.04.28
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
input mcf2graph.mf;
%-------------------------------------------------------------------------
@@ -12,10 +12,15 @@ sw_frame:=0;
sw_atom_frame:=0;
sw_expand:=0;
sw_start_vector:=0;
-%%%% var3:="len_x"; tag3:="Lx";
-%%%% var4:="len_y"; tag4:="Ly";
-%%%% var5:="calc_weight"; tag5:="MWc";
-%%%% var6:="calc_formula"; tag6:="FMc";
+%%%% sw_auxfix:=1;
+%%%% var3:="len_x"; tag3:="Lx";
+%%%% var4:="len_y"; tag4:="Ly";
+%%%% var5:="cal_MW"; tag5:="cMW";
+%%%% var6:="cal_FM"; tag6:="cFM";
+%%%% var7:="inf_USE"; tag7:="USE";
+%%%% var8:="inf_EXA"; tag8:="EXA";
+%%%% var9:="inf_EXB"; tag9:="EXB";
+%%%% auxtag_out;
%%%% sw_checklist:=1;
%%%% sw_MOLout:=1;
%%%% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="%j-%3c.png";
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index 8898ab0c50c..96197a932a1 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 b0cae3f7541..9a17eac7008 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2016.4.10
+% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2016.4.28
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage{graphicx}
@@ -20,20 +20,20 @@
%-------------------------------------------------------------------------------
\def\mol@sel#1{%
\if#1\empty\relax\else%
- \edef\@fst{\expandafter\@fst@param#1;}%
- \edef\@sec{\expandafter\@sec@param#1;}%
- \ifx\@fst\@F\edef\MOLfile{\@sec}\fi \ifx\@fst\@C\edef\MOLchar{\@sec}\fi%
- \ifx\@fst\@Lx\edef\MOLlenx{\@sec}\fi \ifx\@fst\@Ly\edef\MOLleny{\@sec}\fi%
- \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi \ifx\@fst\@JN\edef\MOLnameJ{\@sec}\fi%
- \ifx\@fst\@CAS\edef\MOLcas{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@sec}\fi%
- \ifx\@fst\@FM\edef\MOLfm{\@sec}\fi \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi%
- \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi \ifx\@fst\@MWc\edef\CALmw{\@sec}\fi%
- \ifx\@fst\@logP\edef\MOLlogP{\@sec}\fi \ifx\@fst\@EXA\edef\MOLextA{\@sec}\fi%
- \ifx\@fst\@EXB\edef\MOLextB{\@sec}\fi \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi\fi}%
+ \edef\@tag{\expandafter\@fst@param#1;}%
+ \edef\@var{\expandafter\@sec@param#1;}%
+ \ifx\@tag\@F\edef\MOLfile{\@var}\fi \ifx\@tag\@C\edef\MOLchar{\@var}\fi%
+ \ifx\@tag\@Lx\edef\MOLlenx{\@var}\fi \ifx\@tag\@Ly\edef\MOLleny{\@var}\fi%
+ \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi \ifx\@tag\@JN\edef\MOLnameJ{\@var}\fi%
+ \ifx\@tag\@CAS\edef\MOLcas{\@var}\fi \ifx\@tag\@USE\edef\MOLuse{\@var}\fi%
+ \ifx\@tag\@FM\edef\MOLfm{\@var}\fi \ifx\@tag\@FMc\edef\CALfm{\@var}\fi%
+ \ifx\@tag\@MW\edef\MOLmw{\@var}\fi \ifx\@tag\@MWc\edef\CALmw{\@var}\fi%
+ \ifx\@tag\@logP\edef\MOLlogP{\@var}\fi \ifx\@tag\@EXA\edef\MOLextA{\@var}\fi%
+ \ifx\@tag\@EXB\edef\MOLextB{\@var}\fi \ifx\@tag\@NO\edef\MOLnum{\@var}\fi\fi}%
%-------------------------------------------------------------------------------
\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}%
\def\@MW{MW}\def\@MWc{MWc}\def\@FM{FM}\def\@FMc{FMc}\def\@Lx{Lx}\def\@Ly{Ly}%
-\def\@NO{NO}\def\@USE@{USE}\def\@logP@{logP}\def\@EXA@{EXA}\def\@EXB@{EXB}%
+\def\@NO{NO}\def\@USE{USE}\def\@logP{logP}\def\@EXA{EXA}\def\@EXB{EXB}%
%-------------------------------------------------------------------------------
\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}%
\def\@stru#1[#2]{\font\@strufont=#1\relax\hbox{\@strufont\char#2}}%
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index e4eeb468c3a..e72faab65e2 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 f8eafbc0c66..19ef435e1c8 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format manual by Akira Yamaji 2016.04.10
+% Molecular Coding Format manual by Akira Yamaji 2016.04.28
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage[dvipdfmx]{graphicx}
@@ -30,18 +30,18 @@
%--------------------------------------------------------------------
\def\mol@sel#1{%
\if#1\empty\relax\else%
- \edef\@fst{\expandafter\@fst@param#1;}%
- \edef\@sec{\expandafter\@sec@param#1;}%
- \ifx\@fst\@F\edef\MOLfile{\@sec}\fi%
- \ifx\@fst\@C\edef\MOLchar{\@sec}\fi%
- \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi%
- \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi
- \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi
- \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi
+ \edef\@tag{\expandafter\@fst#1;}%
+ \edef\@var{\expandafter\@sec#1;}%
+ \ifx\@tag\@F\edef\MOLfile{\@var}\fi%
+ \ifx\@tag\@C\edef\MOLchar{\@var}\fi%
+ \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi%
+ \ifx\@tag\@NO\edef\MOLnum{\@var}\fi
+ \ifx\@tag\@MW\edef\MOLmw{\@var}\fi
+ \ifx\@tag\@cFM\edef\CALfm{\@var}\fi
\fi}%
-\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@MW{MW}\def\@FMc{FMc}%
-\def\@fst@param#1:#2;{#1}%
-\def\@sec@param#1:#2;{#2}%
+\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@MW{MW}\def\@cFM{cFM}%
+\def\@fst#1:#2;{#1}%
+\def\@sec#1:#2;{#2}%
\def\put@char{%
\begin{picture}(120,45)%
\put(10,35){\bf [\MOLnum] \MOLnameE}%
@@ -83,8 +83,8 @@ sw_start_vector:=0; % start vector output off >
sw_font_frame:=0; % font frame off >
font_wd#:=60mm#; % font width >
font_ht#:=40mm#; % font height >
-var3:="calc_weight"; tag3:="MWc"; > AUX file table
-var4:="calc_formula"; tag4:="FMc"; >
+var3:="cal_MW"; tag3:="cMW"; > AUX file table
+var4:="cal_FM"; tag4:="cFM"; >
outputformat:="png"; hppp:=vppp:=0.1; > PNG output
outputtemplate:="%j-%3c.png"; >
%-------------------------------------------------------------------------
@@ -117,11 +117,11 @@ bye
'filename'-info.aux : for use in \TeX, it takes over filename,
char number, molecular information,etc.
\begin{verbatim}
-F:mcf_man_soc;C:0;MWc:893.48962;FMc:C55H72MgN4O5;NO:1;EN:Chlorophyll a;MW:893.49
+F:mcf_man_soc;C:0;cMW:893.48962;cFM:C55H72MgN4O5;NO:1;EN:Chlorophyll a;MW:893.49
\end{verbatim}
( tag : variable )\\
-F:filename C:char number,MWc:molecular weight calculated,
-FMc:molecular formula calculated\\
+F:filename C:char number,cMW:molecular weight calculated,
+cFM:molecular formula calculated\\
NO:serial number, EN:english name,
MW:molecular weight from literature data\vspace{5mm}\\
%----------------------------------------------------------------------------
@@ -136,14 +136,14 @@ MW:molecular weight from literature data\vspace{5mm}\\
%--------------------------------------------------------------------
\def\mol@sel#1{%
\if#1\empty\relax\else%
- \edef\@fst{\expandafter\@fst@param#1;}%
- \edef\@sec{\expandafter\@sec@param#1;}%
- \ifx\@fst\@F\edef\MOLfile{\@sec}\fi%
- \ifx\@fst\@C\edef\MOLchar{\@sec}\fi%
- \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi%
- \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi
- \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi
- \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi
+ \edef\@tag{\expandafter\@fst@param#1;}%
+ \edef\@var{\expandafter\@sec@param#1;}%
+ \ifx\@tag\@F\edef\MOLfile{\@var}\fi%
+ \ifx\@tag\@C\edef\MOLchar{\@var}\fi%
+ \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi%
+ \ifx\@tag\@NO\edef\MOLnum{\@var}\fi
+ \ifx\@tag\@MW\edef\MOLmw{\@var}\fi
+ \ifx\@tag\@FMc\edef\CALfm{\@var}\fi
\fi}%
\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@MW{MW}\def\@FMc{FMc}%
\def\@fst@param#1:#2;{#1}%
@@ -163,13 +163,13 @@ MW:molecular weight from literature data\vspace{5mm}\\
%--------------------------------------------------------------------
\begin{document}
\unitlength=1mm%
-\INFO{F:mcf_man_soc ,C:0 ,MWc:893.48962 ,FMc:C55H72MgN4O5%
+\INFO{F:mcf_man_soc ,C:0 ,cMW:893.48962 ,cFM:C55H72MgN4O5%
,NO:1 ,EN:Chlorophyll a ,MW:893.49}%
\end{document}
%--------------------------------------------------------------------
\end{verbatim}%
%############################################################################
-\INFO{F:mcf_man_soc ,C:0 ,MWc:893.48962 ,FMc:C55H72MgN4O5%
+\INFO{F:mcf_man_soc ,C:0 ,cMW:893.48962 ,cFM:C55H72MgN4O5%
,NO:1 ,EN:Chlorophyll a ,MW:893.49}%
\newpage
%----------------------------------------------------------------------------
@@ -1148,10 +1148,10 @@ beginfont() MCd(1,.4)( 1,.5)(Ph) endfont
\begin{minipage}[t][37mm]{90mm}
\MCFtitle{Output molecular information}
\begin{verbatim}
-var3:="calc_weight"; tag3:="MWc";
-var4:="calc_formula"; tag4:="FMc";
+var3:="calc_weight"; tag3:="cMW";
+var4:="calc_formula"; tag4:="cFM";
%% Output to mcf_man_soc-info.aux %%
-F:mcf_man_soc;C:85;MWc:194.19174;FMc:C8H10N4O2
+F:mcf_man_soc;C:85;cMW:194.19174;cFM:C8H10N4O2
MWc:calculated molecular weight
FMc:calculated molecular formula
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 b75682de6d9..36cfaddf07d 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 69487d81d77..0c47c8960c1 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.4.10
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.4.27
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
%------------------------------------------------------------------------------
@@ -10,9 +10,9 @@
input mcf2graph.mf;
mp_log_name:="temp-info.aux";
sw_auxout:=1;
- var3:="len_x"; tag3:="Lx";
- var4:="calc_weight"; tag4:="MWc";
- var5:="calc_formula"; tag5:="FMc";
+ var3:="len_x"; tag3:="Lx";
+ var4:="cal_MW"; tag4:="cMW";
+ var5:="cal_FM"; tag5:="cFM";
fi}%
\everyendmplib{write EOF to mp_log_name;}%
%------------------------------------------------------------------------------
@@ -21,22 +21,23 @@
\newif\ifCONT@%
\newread\@auxf%
%------------------------------------------------------------------------------
-\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}%
+\def\@fst@param#1:#2;{#1}%
+\def\@sec@param#1:#2;{#2}%
\def\mol@sel#1{%
\if#1\empty\relax\else%
- \edef\@fst{\expandafter\@fst@param#1;}%
- \edef\@sec{\expandafter\@sec@param#1;}%
- \ifx\@fst\@F\edef\MOLfile{\@sec}\fi \ifx\@fst\@C\edef\MOLchar{\@sec}\fi%
- \ifx\@fst\@Lx\edef\MOLlenx{\@sec}\fi \ifx\@fst\@Ly\edef\MOLleny{\@sec}\fi%
- \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi \ifx\@fst\@JN\edef\MOLnameJ{\@sec}\fi%
- \ifx\@fst\@CAS\edef\MOLcas{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@sec}\fi%
- \ifx\@fst\@FM\edef\MOLfm{\@sec}\fi \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi%
- \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi \ifx\@fst\@MWc\edef\CALmw{\@sec}\fi%
- \ifx\@fst\@logP\edef\MOLlogP{\@sec}\fi \ifx\@fst\@EXA\edef\MOLextA{\@sec}\fi%
- \ifx\@fst\@EXB\edef\MOLextB{\@sec}\fi \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi\fi}%
+ \edef\@tag{\expandafter\@fst@param#1;}%
+ \edef\@var{\expandafter\@sec@param#1;}%
+ \ifx\@tag\@F\edef\MOLfile{\@var}\fi \ifx\@tag\@C\edef\MOLchar{\@var}\fi%
+ \ifx\@tag\@Lx\edef\MOLlenx{\@var}\fi \ifx\@tag\@Ly\edef\MOLleny{\@var}\fi%
+ \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi \ifx\@tag\@JN\edef\MOLnameJ{\@var}\fi%
+ \ifx\@tag\@CAS\edef\MOLcas{\@var}\fi \ifx\@tag\@USE\edef\MOLuse{\@var}\fi%
+ \ifx\@tag\@FM\edef\MOLfm{\@var}\fi \ifx\@tag\@cFM\edef\CALfm{\@var}\fi%
+ \ifx\@tag\@MW\edef\MOLmw{\@var}\fi \ifx\@tag\@cMW\edef\CALmw{\@var}\fi%
+ \ifx\@tag\@logP\edef\MOLlogP{\@var}\fi \ifx\@tag\@EXA\edef\MOLextA{\@var}\fi%
+ \ifx\@tag\@EXB\edef\MOLextB{\@var}\fi \ifx\@tag\@NO\edef\MOLnum{\@var}\fi\fi}%
%-------------------------------------------------------------------------------
\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}%
-\def\@MW{MW}\def\@MWc{MWc}\def\@FM{FM}\def\@FMc{FMc}\def\@Lx{Lx}\def\@Ly{Ly}%
+\def\@MW{MW}\def\@cMW{cMW}\def\@FM{FM}\def\@cFM{cFM}\def\@Lx{Lx}\def\@Ly{Ly}%
\def\@NO{NO}\def\@USE@{USE}\def\@logP@{logP}\def\@EXA@{EXA}\def\@EXB@{EXB}%
%-------------------------------------------------------------------------------
% modified latex2e kernel program control (@for delimiter ','=>';')
@@ -205,3 +206,5 @@ endfont;
\MOLcaption{110mm}{70mm}\\%
%----------------------------------------------------------------------------
\end{document}
+ment}
+ment}
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 3bca433c396..af64639b040 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.89 Copyright (c) 2013-2016 Akira Yamaji
+% mcf2graph ver 3.90 Copyright (c) 2013-2016 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,
@@ -30,7 +30,7 @@
% Set output checklist : mpost -s ahlength=2 FILENAME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tracingstats:=1;
-message " This is mcf2graph ver 3.8 2016.4";
+message " This is mcf2graph ver 3.9 2016.4";
%-------------------------------------------------------------------------------------------------
pair posB[],posA[],pairT,Ls,Le,pairA;
numeric angB[],angA[],br_ang[],sB[],eB[],f_FON[],atom_w[],atom_h[],atom_d[],strA[],stkB[],stkA[],
@@ -38,13 +38,13 @@ numeric angB[],angA[],br_ang[],sB[],eB[],f_FON[],atom_w[],atom_h[],atom_d[],strA
comMC[][],parMC[][],stock_p[],cntMC[],colorA[],colorB[],tblN[],tblB[][],wtA[],sumA[],
CH[],NH[],NO[],SO[],CCl[],CF[],CBr[],?[],![],Ph[];
path pA,pB,pC,pT;
-string info[],tblA[],com_str[],var[],tag[],
- calc_formula,mp_log_name,mol_name,mol_formula,calc_weight_str,info_str,aux_delimiter;
+string info[],tblA[],com_str[],var[],tag[],cal_FM,mp_log_name,inf_EN,inf_JN,inf_FM,cal_MW_str,
+ inf_USE,inf_EXA,inf_EXB,inf_str,aux_delimiter;
picture atom_font[],chem_structure,temp_picture;
%-------------------------------------------------------------------------------------------------
sw_numberA:=sw_numberB:=sw_mol_frame:=sw_auxout:=sw_solid:=sw_expand:=sw_start_vector:=0;
char_num:=str_cnt:=proc_end:=sw_font_frame:=sw_atom_frame:=sw_checklist:=sw_MOLout:=0;
-sw_subst_off:=sw_bond_single:=0;
+sw_subst_off:=sw_bond_single:=sw_auxfix:=0;
numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; aux_max:=20;
aux_delimiter:=";"; var1:="jobname"; tag1:="F"; var2:="char_num"; tag2:="C";
for i=3 upto aux_max: var[i]:=tag[i]:=""; endfor
@@ -81,7 +81,7 @@ ratio_zebra_black:=0.4; ratio_wedge_bond:=0.12; ratio_atomgap_atom:=.05
offset_thickness#:=0.2pt#; offset_bond_gap#:=0.3pt#; offset_zebra_gap#:=0.1pt#;
offset_wedge#:=0.4pt#;
par_s=ASCII("{"); par_e=ASCII("}"); score_u=ASCII("_"); hat=ASCII("^");
-max_info_num:=12; for i:=1 upto max_info_num: info[i]:=":"; endfor
+max_inf_num:=12; for i:=1 upto max_inf_num: info[i]:=":"; endfor
def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; endfor enddef;
def_com(-4000)(_term,_jp_atom,_jp_atom_abs,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_chg_line,
_dl,_N,_O,_S,_H,_tmp_line,_chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_set_ang,_adj_ang,_chg_env,
@@ -107,13 +107,19 @@ def restore_par(text t)= nA:=0;
enddef;
%-------------------------------------------------------------------------------------------------
def beginfont(text s)=
- mol_name:=mol_formula:=""; len_x:=len_y:=cntA:=info_num:=mol_weight:=f_beginchar:=0;
+ inf_EN:=inf_JN:=inf_FM:=inf_USE:=inf_EXA:=inf_EXB:="";
+ len_x:=len_y:=cntA:=inf_num:=inf_MW:=f_beginchar:=0;
store_par(parameter_list); stock_wd#:=font_wd#; stock_ht#:=font_ht#;
ratio_bond_width:=1/30;
- for list=s: info_num:=info_num+1; info[info_num]:=list;
- if substring (0,2) of list="EN": mol_name:=substring (3,length(list)) of list; fi
- if substring (0,2) of list="FM": mol_formula:=substring (3,length(list)) of list; fi
- if substring (0,2) of list="MW": mol_weight:=scantokens(substring (3,length(list)) of list); fi
+ for list=s: inf_num:=inf_num+1; info[inf_num]:=list;
+ if substring (0,2) of list="NO": inf_NO:=scantokens(substring (3,length(list)) of list);
+ elseif substring (0,2) of list="MW": inf_MW:=scantokens(substring (3,length(list)) of list);
+ elseif substring (0,2) of list="EN": inf_EN:=substring (3,length(list)) of list;
+ elseif substring (0,2) of list="JN": inf_JN:=substring (3,length(list)) of list;
+ elseif substring (0,2) of list="FM": inf_FM:=substring (3,length(list)) of list;
+ elseif substring (0,3) of list="USE": inf_USE:=substring (4,length(list)) of list;
+ elseif substring (0,3) of list="EXA": inf_EXA:=substring (4,length(list)) of list;
+ elseif substring (0,3) of list="EXB": inf_EXB:=substring (4,length(list)) of list; fi
endfor
enddef;
%-------------------------------------------------------------------------------------------------
@@ -569,13 +575,19 @@ fi
enddef;
%-------------------------------------------------------------------------------------------------
vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi enddef;
+%-------------------------------------------------------------------------------------------------
+def auxtag_out=
+ for i=1 upto aux_max: exitif tag[i]="";
+ if i=1: printf tag[1] else: &aux_delimiter&tag[i] fi
+ endfor
+enddef;
def auxfile_out=
- for i=1 upto aux_max: exitif var[i]="";
- if i=1: printf "" else: &aux_delimiter fi &tag[i]&":"&
- if string scantokens(var[i]): scantokens(var[i])
- elseif numeric scantokens(var[i]): decimal(scantokens(var[i])) fi
- endfor
- for i=1 upto info_num: &aux_delimiter&info[i] endfor;
+ for i=1 upto aux_max: exitif tag[i]="";
+ if i=1: printf "" else: &aux_delimiter fi if sw_auxfix=0: &tag[i]&":" fi &
+ if string scantokens(var[i]): scantokens(var[i])
+ elseif numeric scantokens(var[i]): decimal(scantokens(var[i])) fi
+ endfor
+ if sw_auxfix=0: for i=1 upto inf_num: &aux_delimiter&info[i] endfor; fi
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mc_num:=first_def_number;
@@ -759,7 +771,7 @@ STb("S{O_3_}")("S","O","O","O"); STb("COOH")("C","O","O","H");
STb("C{H_3_}")("C","H","H","H"); STb("C{F_3_}")("C","F","F","F");
%-------------------------------------------------------------------------------------------------
def mol_check=
- hide_H:=warning_cnt:=calc_weight:=calc_weightp:=0; calc_formula:="";
+ hide_H:=warning_cnt:=cal_MW:=cal_MWp:=0; cal_FM:="";
for i=1 upto tbl_max: sumA[i]:=0; endfor
for i=1 upto cntA: knownA:=nA:=0;
for j=1 upto cntB: if (lineB[j]=dl)or(lineB[j]=dr)or(lineB[j]=dm): bondC[j]:=2;
@@ -782,16 +794,16 @@ def mol_check=
for i=1 upto tbl_max:
if sumA[i]>=1:
tmp_wtp:=(wtA[i]/100)*sumA[i];
- if (tmp_wtp<=40)and(calc_weightp<=40): calc_weight:=calc_weight+(wtA[i]*sumA[i]);
- else: calc_weightp:=calc_weightp+tmp_wtp; fi
- calc_formula:=calc_formula&stripP(tblA[i]) if sumA[i]>=2: &decimal(sumA[i]) fi;
+ if (tmp_wtp<=40)and(cal_MWp<=40): cal_MW:=cal_MW+(wtA[i]*sumA[i]);
+ else: cal_MWp:=cal_MWp+tmp_wtp; fi
+ cal_FM:=cal_FM&stripP(tblA[i]) if sumA[i]>=2: &decimal(sumA[i]) fi;
fi
endfor
enddef;
%------------------------------------------------------------------------------------------------
def checklist_out=
- nA:=0; calc_weight_str:="";
- message "% Molecular name = "& mol_name;
+ nA:=0; cal_MW_str:="";
+ message "% Molecular name = "& inf_EN;
message "% There were "&fdr(3)(warning_cnt)&
" warnings / Expanded command count= "&decimal(cntMC[0]);
message "% width * height = " & fdr(8)(max_x-min_x)&" * "&fdr(8)(max_y-min_y);
@@ -806,22 +818,22 @@ def checklist_out=
for i=1 upto cntB: if lineB[i]<>0: message "% "&fdr(3)(incr nA)&" "&fdr(3)(sB[i])&
" -> "&fdr(3)(eB[i])&" ("&fdr(3)(bondC[i]-si+1)&")"; fi endfor
message "%Fomula / Molecular weight ---------------------------------------";
- if calc_weightp<=40: calc_weight_str:=fdr(10)(calc_weight);
- else: calc_weight_str:=fdr(10)(calc_weightp)&" * 100"; fi
+ if cal_MWp<=40: cal_MW_str:=fdr(10)(cal_MW);
+ else: cal_MW_str:=fdr(10)(cal_MWp)&" * 100"; fi
for i=1 upto tbl_max:
if sumA[i]>=1:
message "% "&fixed_l(4)(stripP(tblA[i]))&"("&fdr(9)(wtA[i])&") * "&fdr(6)(sumA[i])&" = "
if tmp_wtp<=40: &fdr(12)(wtA[i]*sumA[i]); else: &fdr(12)(tmp_wtp)&" * 100"; fi fi endfor
- message "% Weight Calc: " &calc_weight_str &" / Input: "
- if mol_weight>0: &decimal(mol_weight) &" / weight gap= " &decimal(calc_weight-mol_weight) fi;
- message "% Fomula Calc: "&calc_formula&" / Input: "
- if mol_formula<>"":&mol_formula&" / "&
- if mol_formula=calc_formula: "MACTCH" else: "NOT MACTCH" fi fi;
+ message "% Weight Calc: " &cal_MW_str &" / Input: "
+ if inf_MW>0: &decimal(inf_MW) &" / weight gap= " &decimal(cal_MW-inf_MW) fi;
+ message "% Fomula Calc: "&cal_FM&" / Input: "
+ if inf_FM<>"":&inf_FM&" / "&
+ if inf_FM=cal_FM: "MACTCH" else: "NOT MACTCH" fi fi;
message "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%";
enddef;
%------------------------------------------------------------------------------------------------
def MOLfileout=
- mp_log_name:=jobname&"-"&fit_zero(char_num)&decimal(char_num)&"-"&mol_name&".mol";
+ mp_log_name:=jobname&"-"&fit_zero(char_num)&decimal(char_num)&"-"&inf_EN&".mol";
printf ""; printf " -MCFtoMOL- "&fixed_l(20)(info[1]); printf "";
printf fdr(3)(cntA)&fdr(3)(cntB)&" 0 0 0 0 0 0 0 0999 V2000";
for i=1 upto cntA: printf fdr(10)(xpart(posA[i])/BL)& fdr(10)(ypart(posA[i])/BL)&