summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-18 23:06:31 +0000
committerKarl Berry <karl@freefriends.org>2015-08-18 23:06:31 +0000
commita34df050b05410fa49eae6987d7102c8276de4d0 (patch)
tree5ba35e0e5abd650bb39a5b07ea130bb81498fca5
parentdad921b94089fef4e0951ae3b3b319795a63d34b (diff)
mcf2graph (18aug15)
git-svn-id: svn://tug.org/texlive/trunk@38148 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README3
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf36
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin255269 -> 255135 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex14
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf4
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin218677 -> 218519 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex6
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin107401 -> 121013 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex70
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf68
10 files changed, 114 insertions, 87 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index c326baf4c98..baee7bb54ab 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.57 / 2015-08-14
+ version : 3.58 / 2015-08-18
E-mail : akira.yamaji5@gmail.com
Located at : http://mirror.ctan.org/pkg/graphics/mcf2graph
Home page : http://molecoding.cocolog-nifty.com/blog/
@@ -111,3 +111,4 @@
ver. 3.54 / 2015-08-03 maximum item number of MOLinfo can be changed
ver. 3.55 / 2015-08-04 support luamplib(v2.11), renew mcf_mplib_exa.tex
ver. 3.57 / 2015-08-14 improve AUX file format
+ ver. 3.58 / 2015-08-18 improve calculation of molecular formula and weight
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 106785ec022..8487a05ac79 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf
@@ -13,12 +13,12 @@ sw_atom_frame:=0;
sw_numberB:=0;
sw_expand:=0;
sw_start_vector:=0;
+%%%%sw_info_formula:=1;
+%%%%sw_info_weight:=1;
%%%%sw_checklist:=1;
-%%%%sw_info_fm:=1;
-%%%%sw_info_mw:=1;
%%%%sw_MOLfile:=1;
%**********************************************************************
-beginfont("EN:Acetamiprid")
+beginfont("EN:Acetamiprid","FM:C5H9","MW:89")
MCf(^^30,
Ph,4\,!,NH,!,!~dr,N,!,CN
)
@@ -94,7 +94,7 @@ endfont
%***********************************************************************
beginfont("EN:Etridiazole")
MCf(^^18,
- ?5,$(1,3)dl,@(2,4)N,5:S,1:/OEt,3:/CCl3,1:/Me
+ ?5,$(1,3)dl,@(2,4)N,5:S,1:/OEt,3:/CCl3
)
endfont
%***********************************************************************
@@ -321,12 +321,13 @@ MCf(^^54,
)
endfont
%**********************************************************************
-beginfont("EN:Gibberellin");
+beginfont("EN:Gibberellin A3");
MCf(^^12,
?6`1.3,3=??5,9=??7,12\^160`1.6,&8,
- 4\^155~zf`-1.2,O,55,//O^180`1,&(#2)~zb,
- 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
- @(3^-60,9^60)*/H)
+ 4\^155~zf`-1.2,O,55,//O^180`1,&2~zb,
+ 5=dl,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
+ @(3^-60,9^60)*/H
+ )
endfont;
%**********************************************************************
beginfont("EN:Cholesterol")
@@ -354,9 +355,9 @@ endfont
%***********************************************************************
beginfont("EN:beta-Carotene")
MCf(^^30,
- ?6,3=d,@(3,5^35,5^-35)/Me,
- 4\,,!18,$(1,3,5,7,9,11,13,15,17)dr,@(3,7,12,16)/Me,
- ?6,6=d,@(6,2^35,2^-35)/Me
+ ?6,3=dl,@(3,5^35,5^-35)/Me,
+ 4\,!18,$(1,3,5,7,9,11,13,15,17)dr,@(3,7,12,16)/Me,
+ ?6,6=dl,@(6,2^35,2^-35)/Me
)
endfont
%**********************************************************************
@@ -374,11 +375,12 @@ beginfont("EN:Qercetin")
endfont
%***********************************************************************
beginfont("EN:Limonin")
-MCf(^^30,
- {,?6,-3=?6,-4=?6,3:O,-5=?3,1:O,1=wf,2=wb,#6=?5,2:O,-4=?6,2:O,-5=wf,
- #14\*,?5,$(1,4)dl,3:O,},@(3,12,21)//O,
- @(4~wf^60,8~zf^60,18^35,18^-35)/Me,@(1^60,5^180,16^60)/*H
-)
+ MCf(^^30,
+ ?6,$(-3,-4)??6,-5=??3,-2=wf,-1=wb,6=??5,-4=??6,-5=wf,
+ @(13,15,17,20)O,@(3,12,21)//O,
+ @(4~wf^60,8~zf^60,18^35,18^-35)/Me,@(1^60,5^180,16^60)/*H,
+ 14\*,?5,$(1,4)dl,3:O
+ )
endfont
%**********************************************************************
beginfont("EN:Cromolyn")
@@ -442,7 +444,7 @@ endfont
%***********************************************************************
beginfont("EN:Podophyllotoxin");
MCf(^^0,
- {,?5,@(2,5)O,-3=Ph2,-3=Ph1,-3=?5,2:O,},-1=wb,-3://O,
+ ?5,@(2,5)O,-3=ph2,-3=??6,-3=??5,-2:O,-1=wb,-3://O,
10\*,Ph,@(-2,-3,-4)/OMe,#13:/*OH,@(#11~wf^-60,#12~zf^60)/H
)
endfont;
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index 1d401e46f4a..9d831190ce9 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 71403126466..fc6d451f06d 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex
@@ -23,14 +23,15 @@
\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\@MW\edef\MOLmw{\@sec}\fi%
- \ifx\@fst\@FM\edef\MOLfomura{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@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}%
%-------------------------------------------------------------------------------
-\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}\def\@MW{MW}%
-\def\@FM{FM}\def\@Lx{Lx}\def\@Ly{Ly}\def\@NO{NO}%
-\def\@USE@{USE}\def\@logP@{logP}\def\@EXA@{EXA}\def\@EXB@{EXB}%
+\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\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}%
\def\@stru#1[#2]{\font\@strufont=#1\relax\hbox{\@strufont\char#2}}%
@@ -56,10 +57,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
{\hspace{20mm} \LARGE\bf Molecular Coding Format examples \hspace{10mm} }%
-{\footnotesize\bf by Akira Yamaji 2015.8.14} \vspace{5mm}\\
+{\footnotesize\bf by Akira Yamaji 2015.8.18} \vspace{5mm}\\
\fontnum=1%
\noindent%
-%%% \input 'filename'-info.log
%------------------------------------------------------------------------
\input mcf_exa_soc-info.aux
%------------------------------------------------------------------------
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 0d1e07b8bb6..73c56ca6c5f 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
@@ -7,7 +7,7 @@ font_wd#:=60mm#;% font width
font_ht#:=30mm#;% font height
max_bond_width:=0.18;
%-----------------------------------------------------------------------
-sw_logout:=1;
+sw_logout:=0;
sw_frame:=0;
sw_expand:=0;
sw_start_vector:=0;
@@ -295,7 +295,7 @@ beginfont("EN:Gibberellin");
MCf(
^^12,?6`1.3,3=??5,9=??7,12\^160`1.6,&8,
4\^155~zf`-1.2,O,55,//O^180`1,&2~zb,
- 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
+ 11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
@(3^-60,9^60)*/H
)
endfont;
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index 825bb62d07c..001fc33fdb9 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 11b737bafa6..cbb6bd21c4f 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 2015.8.7
+% Molecular Coding Format manual by Akira Yamaji 2015.8.16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage[dvipdfmx]{graphicx}
@@ -32,7 +32,7 @@
\noindent%
\begin{picture}(180,0)
\put(35,12){{\LARGE Molecular Coding Format manual}\hspace{10mm}
- by Akira Yamaji 2015.7.25}
+ by Akira Yamaji 2015.8.16}
\end{picture}\vspace{-6mm}\\
%----------------------------------------------------------------------------
\begin{minipage}[t][38mm]{100mm}
@@ -639,7 +639,7 @@ Insert user defined substructure
^^12,
?6`1.3,3=??5,9=??7,12\^160`1.6,&8,
4\^155~zf`-1.2,O,55,//O^180`1,&2~zb,
- 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,
+ 11=wf,13=wb,7:/COOH,11://Me,1:*/OH,
12:/*OH,2:*/Me,@(3^-60,9^60)*/H
\end{verbatim}
\end{minipage}
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 2247082795e..9b15d30275a 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 fdcc5d97980..63286aa6549 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex
@@ -1,13 +1,13 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.14
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2015.8.18
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
%-------------------------------------------------------------------------------
\usepackage{luamplib}%
\mplibcodeinherit{enable}%
\mplibverbatim{enable}%
-\everymplib{if unknown Ph1: input mcf2graph.mf; sw_logout:=1; sw_info_lenx:=1;%
- mp_log_name:="temp-info.aux"; fi}%
+\everymplib{if unknown Ph1: input mcf2graph.mf; mp_log_name:="temp-info.aux";
+ sw_logout:=sw_info_lenx:=sw_info_weight:=sw_info_formula:=1; fi}%
\everyendmplib{write EOF to mp_log_name;}%
%-------------------------------------------------------------------------------
\makeatletter%
@@ -21,26 +21,35 @@
\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\@MW\edef\MOLmw{\@sec}\fi%
- \ifx\@fst\@FM\edef\MOLfomura{\@sec}\fi \ifx\@fst\@USE\edef\MOLuse{\@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}%
%-------------------------------------------------------------------------------
-\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}\def\@MW{MW}%
-\def\@FM{FM}\def\@Lx{Lx}\def\@Ly{Ly}\def\@NO{NO}\def\@USE@{USE}\def\@logP@{logP}%
-\def\@EXA@{EXA}\def\@EXB@{EXB}%
+\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}%
%-------------------------------------------------------------------------------
-\newdimen\MOLwidth%
\def\INFO#1{%
\edef\MOLnum{}\edef\MOLnameE{}\edef\MOLlenx{}\edef\MOLmw{}%
\@tfor\@temp:=#1\do{\mol@sel{\@temp}}
}%
%--------------------------------------------------------------------------------
+\newdimen\MOLwidth%
+\newdimen\heightCap%
\def\MOLcaption#1#2{\input temp-info.aux\relax %
\MOLwidth=\MOLlenx pt%
\advance\MOLwidth -#1\relax%
-\llap{\makebox[\MOLwidth][l]{\raisebox{#2}%
-{\sf NO.\MOLnum{ }\MOLnameE{ }\tiny (MW:\MOLmw)}}}}%
+\heightCap=#2%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\sf NO.\MOLnum{ }\MOLnameE{ }}}}%
+\advance\heightCap -5mm\relax%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\small\tt FM(C):\CALfm}}}%
+\advance\heightCap -4mm\relax%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\small\tt MW(C):\CALmw}}}%
+\advance\heightCap -4mm\relax%
+\llap{\makebox[\MOLwidth][l]{\raisebox{\heightCap}{\small\tt MW(D):\MOLmw}}}%
+}%
\makeatother%
%------------------------------------------------------------------------------------
\pagestyle{empty}
@@ -52,8 +61,11 @@
%------------------------------------------------------------------------------------
\begin{document}
{\LARGE MCF example for luamplib(LuaLaTeX) }%
- \hspace{20mm}by Akira Yamaji 2015.8.14\vspace{8mm}\\
+ \hspace{20mm}by Akira Yamaji 2015.8.18\vspace{6mm}\\
%------------------------------------------------------------------------------------
+{{\small {\tt FM(C) :} molecular formula calculated by mcf2graph}\\
+{{\small {\tt MW(C) :} molecular weight calculated by mcf2graph}\\
+{{\small {\tt MW(D) :} molecular weight from literature data}\\
\begin{mplibcode}
font_wd:=100mm; font_ht:=50mm;
beginfont("NO:1","EN:Chlorophyll a","MW:893.49")
@@ -68,48 +80,48 @@
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{35mm}\hspace{8mm}%
+\MOLcaption{0mm}{40mm}\hspace{8mm}%
%----------------------------------------------------------------------------
\begin{mplibcode}
- font_wd:=60mm; font_ht:=40mm;
+ font_wd:=60mm; font_ht:=35mm;
beginfont("NO:2","EN:Limonin","MW:470.51")
MCf(^^30,
?6,$(-3,-4)??6,-5=??3,-2=wf,-1=wb,6=??5,-4=??6,-5=wf,
- @(13,15,17,20,25)O,@(3,12,21)//O,
+ @(13,15,17,20)O,@(3,12,21)//O,
@(4~wf^60,8~zf^60,18^35,18^-35)/Me,@(1^60,5^180,16^60)/*H,
- 14\*,?5,$(1,4)dl
+ 14\*,?5,$(1,4)dl,3:O
)
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{43mm}\vspace{8mm}\\%
+\MOLcaption{0mm}{48mm}\vspace{6mm}\\%
%----------------------------------------------------------------------------
\begin{mplibcode}
font_wd:=90mm; font_ht:=30mm;
- beginfont("NO:3","EN:beta-Carotene","MW:536.87")
+ beginfont("NO:3","EN:beta-carotene","MW:536.87")
MCf(^^30,
- ?6,3:d,@(3,5^35,5^-35)/Me,
+ ?6,3=dl,@(3,5^35,5^-35)/Me,
4\,!18,$(1,3,5,7,9,11,13,15,17)dr,@(3,7,12,16)/Me,
- ?6,6:d,@(6,2^35,2^-35)/Me
+ ?6,6=dl,@(6,2^35,2^-35)/Me
)
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{25mm}\hspace{8mm}%
+\MOLcaption{0mm}{35mm}\hspace{8mm}%
%----------------------------------------------------------------------------
\begin{mplibcode}
font_wd:=50mm; font_ht:=40mm;
-beginfont("NO:4","EN:Gibberellin","MW:346.37");
+beginfont("NO:4","EN:Gibberellin A3","MW:346.37");
MCf(^^12,
?6`1.3,3=??5,9=??7,12\^160`1.6,&8,
4\^155~zf`-1.2,O,55,//O^180`1,&2~zb,
- 3=dr,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
+ 5=dl,11=wf,13=wb,7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me,
@(3^-60,9^60)*/H
)
endfont;
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{25mm}\vspace{10mm}\\%
+\MOLcaption{0mm}{38mm}\vspace{5mm}\\%
%----------------------------------------------------------------------------
\begin{mplibcode}
font_wd:=60mm; font_ht:=70mm;
@@ -124,10 +136,10 @@ beginfont("NO:5","EN:Erythromycin","MW:733.93");
endfont;
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{55mm}\hspace{8mm}%
+\MOLcaption{20mm}{56mm}\hspace{8mm}%
%----------------------------------------------------------------------------
\begin{mplibcode}
-font_wd:=100mm; font_ht:=70mm;
+font_wd:=90mm; font_ht:=55mm;
beginfont("NO:6","EN:Vancomycin","MW:1449.25");
MCf(^^30,
{,``1,!12,$(1,3,12)zf,7=wf,/H^-60,60,*/OH,60,
@@ -144,10 +156,10 @@ beginfont("NO:6","EN:Vancomycin","MW:1449.25");
endfont;
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{70mm}\vspace{8mm}\\%
+\MOLcaption{52mm}{58mm}\vspace{6mm}\\%
%----------------------------------------------------------------------------
\begin{mplibcode}
- font_wd:=160mm; font_ht:=90mm;
+ font_wd:=150mm; font_ht:=80mm;
beginfont("NO:7","EN:Maitotoxin","MW:3425.86")
MCf(^^55.8,
?6,-4=??7 ,$(-4,-3,-3,-3)??6,-3\,!!3,??6,$(-4,-3,-3,-3)??6,
@@ -171,6 +183,6 @@ endfont;
endfont
\end{mplibcode}
\input{temp-info.aux}%
-\MOLcaption{0mm}{50mm}\\%
+\MOLcaption{0mm}{53mm}\\%
%----------------------------------------------------------------------------
\end{document}
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index b7a841c9ca2..0263485267c 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.57 Copyright (c) 2013-2015 Akira Yamaji
+% mcf2graph ver 3.58 Copyright (c) 2013-2015 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,
@@ -39,12 +39,12 @@ numeric angB[],angA[],br_ang[],sB[],eB[],f_FON[],atom_w[],atom_h[],atom_d[],strA
ps_env[],comMC[][],parMC[][],stock_p[],cntMC[],colorA[],colorB[],tblN[],tblB[][],
wtA[],sumA[],CH[],NH[],NO[],SO[],CCl[],CF[],CBr[],?[],??[],![],!![],Ph[],ph[];
path pA,pB,pC,pT;
-string info[],tblA[],com_str[],fomula_str,mp_log_name,mol_name;
+string info[],tblA[],com_str[],calc_formula,mp_log_name,mol_name,mol_formula,calc_weight_str;
picture atom_font[],chem_structure,temp_picture;
%-------------------------------------------------------------------------------------------------
sw_numberA:=sw_numberB:=sw_frame:=sw_logout:=sw_solid:=sw_expand:=sw_start_vector:=0;
sw_atom_frame:=sw_checklist:=sw_MOLfile:=char_num:=str_cnt:=size_changed:=proc_end:=0;
-sw_info_file:=sw_info_char:=1; sw_info_lenx:=sw_info_leny:=sw_info_mw:=sw_info_fm:=0;
+sw_info_file:=sw_info_char:=1; sw_info_lenx:=sw_info_leny:=sw_info_weight:=sw_info_formula:=0;
if known green: f_MP:=1;
mp_log_name:=jobname&"-info.aux";
if ahlength=1: proc_end:=1; fi % first molecular only
@@ -93,18 +93,22 @@ def store_par(text t)= nA:=0; for list=t: if st_p[incr nA]<>list: st_p[nA]:=list
def restore_par(text t)= nA:=0;
forsuffixes list=t: if list<>st_p[incr nA]: list:=st_p[nA]; fi endfor enddef;
%-------------------------------------------------------------------------------------------------
-def beginfont(text s)= mol_name:=""; len_x:=len_y:=cntA:=info_num:=0;
+def beginfont(text s)= mol_name:=mol_formula:=""; len_x:=len_y:=cntA:=info_num:=mol_weight:=0;
store_par(parameter_list); ratio_bond_width:=1mm#/font_wd#;
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 endfor
+ 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
+ endfor
beginchar(char_num,font_wd#,font_ht#,0); clearit; enddef;
%-------------------------------------------------------------------------------------------------
def endfont=
if sw_frame=1: AUX(draw_frame(len_x,len_y,(min_x,min_y),0.2pt);) fi
if sw_start_vector=1: AUX(start_vector) fi
- if sw_checklist=1: mol_check; checklist_out; fi
- if sw_MOLfile=1: mol_check; MOL_out; fi
- if sw_logout=1: logfile_out; fi
+ if (sw_logout=1)or(sw_checklist=1)or(sw_MOLfile=1): mol_check; fi
+ if sw_logout=1: logfile_out; fi
+ if sw_checklist=1: checklist_out; fi
+ if sw_MOLfile=1: MOL_out; fi
char_num:=char_num+1; currentpicture:=chem_structure; chem_structure:=nullpicture;
restore_par(parameter_list);
if size_changed=1: font_wd#:=stock_wd#; font_ht#:=stock_ht#; size_changed:=0; fi
@@ -484,12 +488,12 @@ enddef;
%-------------------------------------------------------------------------------------------------
vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi enddef;
def info_c(expr sw,c,cc)= if sw=1: &"{"&c&":"&cc&"}" fi enddef;
-def info_n(expr sw,c,n)= if sw=1: &"{"&c&":"&decimal(n)&"}" fi enddef;
+def info_n(expr sw,c,n)= if sw=1: &"{"&c&":"&decimal(n)&"}" fi enddef;
def logfile_out=
printf "\INFO{"
info_c(sw_info_file,"F",jobname) info_n(sw_info_char,"C",char_num)
info_n(sw_info_lenx,"Lx",len_x) info_n(sw_info_leny,"Ly",len_y)
- info_n(sw_info_mw,"Mw",Mol_wt) info_c(sw_info_fm,"Fm",fomula_str)
+ info_n(sw_info_weight,"MWc",calc_weight) info_c(sw_info_formula,"FMc",calc_formula)
for i=1 upto info_num: &"{"&info[i]&"}" endfor &"}%";
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -647,10 +651,10 @@ def blank_str:= " " enddef;
def fixed_r(expr n)(expr s)= (substring(0,n-length(s)) of blank_str)&s enddef;
def fixed_l(expr n)(expr s)= s&(substring(0,n-length(s)) of blank_str) enddef;
def fdr(expr n)(expr s)=fixed_r(n)(decimal(s)) enddef;
-def warning(expr s)= message "%"&fdr(3)(incr warning_cnt)&")"&s&" !!!"; enddef;
+def warning(expr s)= message "% "&decimal(char_num)&fdr(3)(incr warning_cnt)&")"&s&" !!!"; enddef;
def B_check(expr s)(expr t)(expr n)=
if com_str[strA[s]]=t: if nA>n:
- warning(fdr(4)(s)&" ["&com_str[strA[s]]&"] has "&fdr(3)(nA)&" bonds"); fi fi enddef;
+ warning(fdr(4)(s)&" ["&com_str[strA[s]]&"] has "&fdr(3)(nA)&" bonds"); fi fi enddef;
vardef stripP(expr a)=if length(a)=4: substring (1,3) of a else: a fi enddef;
def STa(expr a,b)= tblA[incr tbl_cnt]:=a; tblN[tbl_cnt]:=0; wtA[tbl_cnt]:=b; enddef;
def STb(expr a)(text s)= tblA[incr tbl_cnt]:=a; tblN[tbl_cnt]:=0;
@@ -671,7 +675,8 @@ STb("CHO")("C","H","O"); STb("N{O_2_}")("N","O","O"); STb("N{H_2_}")("N","H","H
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:=0; for i=1 upto tbl_max: sumA[i]:=0; endfor
+def mol_check= hide_H:=warning_cnt:=calc_weight:=calc_weightp:=0; calc_formula:="";
+ 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): nB:=2;
elseif (lineB[j]=tm): nB:=3; elseif lineB[j]=nl: nB:=0;
@@ -690,34 +695,41 @@ def mol_check= hide_H:=warning_cnt:=0; for i=1 upto tbl_max: sumA[i]:=0; endfor
if knownA=0: warning(" Unknown Str("&com_str[strA[i]]&") is used "&decimal(i)); fi
endfor
sumA[2]:=sumA[2]+hide_H;
+ 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;
+ fi
+ endfor
enddef;
%-------------------------------------------------------------------------------------------------
-def checklist_out= Mol_wt:=Mol_wtp:=nA:=0; fomula_str:="";
+def checklist_out= nA:=0; calc_weight_str:="";
+ message "% Molecular name = "& mol_name;
message "% There were "&fdr(3)(warning_cnt)&" warnings";
message "% width * height = " & fdr(8)(max_x-min_x)&" * "&fdr(8)(max_y-min_y);
message "% Shift width * height = "& fdr(8)(min_x)&" * "&fdr(8)(min_y);
message "% Bond length = "&fdr(3)(BL)&" Atom size = "&fdr(3)(AL);
- message "% Atom count="&fdr(3)(cntA)&" Bond count="&fdr(3)(cntB)&
- " Ring count = "&fdr(3)(cntB-cntA+1);
+ message "% Atom count="&fdr(3)(cntA)&" Bond count="&fdr(3)(cntB)&" Ring count="&fdr(3)(cntB-cntA+1);
+ message "% Hide H = "&fdr(3)(hide_H);
message "%-----------------------------------< atom >< bond >-------";
for i=1 upto cntA: message "% "&fdr(3)(i)&" ("&fdr(10)(xpart(posA[i])/BL)&" ) ("&
fdr(10)(ypart(posA[i])/BL)&" ) "&fixed_l(8)(com_str[strA[i]])&" "&fdr(3)(Bcnt[i]); endfor
message "%Bond list---------------------------------------------------------";
for i=1 upto cntB: if lineB[i]<>0: message "% "&fdr(3)(incr nA)&" "&fdr(3)(sB[i])&
" -> "&fdr(3)(eB[i])&" ("&fdr(3)(lineB[i]-si+1)&")"; fi endfor
- message "%Fomula -----------------------------------------------------------";
+ 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
for i=1 upto tbl_max:
- if sumA[i]>=1: tmp_wtp:=(wtA[i]/100)*sumA[i];
- if (tmp_wtp<=40)and(Mol_wtp<=40): Mol_wt:=Mol_wt+(wtA[i]*sumA[i]);
- else: Mol_wtp:=Mol_wtp+tmp_wtp; fi
- fomula_str:=fomula_str&stripP(tblA[i])&decimal(sumA[i]);
- 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 "% Hide H = "&fdr(3)(hide_H);
- message "% Molecular Weight: "
- if Mol_wtp<=40: &fdr(10)(Mol_wt); else: &fdr(10)(Mol_wtp)&" * 100"; fi
- message "% --------------------------------------";
- message "% Molecular Fomula: "&fomula_str;
+ 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 "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%";
enddef;
%------------------------------------------------------------------------------------------------