summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-10-15 22:51:08 +0000
committerKarl Berry <karl@freefriends.org>2016-10-15 22:51:08 +0000
commitbdca005b9c5b680e145fec55ef1186f1092a4639 (patch)
tree3f725fd0198f6c035b5916b15a6cac94726357d7
parent177eef25dd40b669810a53bb5c853ae7473ddbe1 (diff)
mcf2graph (15oct16)
git-svn-id: svn://tug.org/texlive/trunk@42264 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG7
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/README2
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf4
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdfbin246519 -> 246507 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf95
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdfbin426355 -> 423710 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex210
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdfbin121880 -> 122121 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex4
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf186
10 files changed, 326 insertions, 182 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG
index 7017a9dbaca..9c09903a52f 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-10-10
+ Changelog of mcf2graph software package by Akira Yamaji 2016-10-14
*******************************************************************************
+[ver. 3.99 / 2016-10-14]
+ -miner update
+ -update MCF syntax manual
+ fixed page number of contents
+
[ver. 3.98 / 2016-10-10]
-add option parameter sw_clip (clipping font)
-add max_bond_length , delete max_bond_width
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README
index 2428acd155a..8e6448d57bc 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.98 2016-10-10
+ version : 3.99 2016-10-14
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 22599e08a44..95bb5c69b2a 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.10.10
+% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2016.10.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
input mcf2graph.mf; %%% it must be version 3.98 or later
%-------------------------------------------------------------------------
@@ -9,8 +9,8 @@ font_ht#:=24mm#;
sw_auxout:=1;
sw_font_frame:=0;
sw_atom_frame:=0;
-sw_expand:=0;
sw_start_vector:=0;
+%%%% sw_expand:=1;
var3:="cal_FM"; tag3:="cFM";
var4:="cal_MW"; tag4:="cMW";
%%%% outputtemplate:="%3c-%j.png";
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf
index 5a8b1f1bd5a..44b8054eb16 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_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
index be0c4751b1b..c87fb0ac718 100644
--- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
+++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2016.10.10
+% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2016.10.13
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
input mcf2graph.mf; %% it must be version 3.98 or later
%------------------------------------------------------------------------
@@ -11,10 +11,8 @@ sw_start_vector:=0;
%***********************************************************************
font_wd#:=35mm#;
font_ht#:=25mm#;
-margin_left_right:=2mm;
-\max_bond_length#:=10mm#;
-ratio_thickness_bond:=0.04;
-ratio_atom_bond:=0.5;
+bond_len#:=6mm#;
+sw_solid:=1;
%***********************************************************************
beginfont("EN:Glycine")
MCf(<30,NH2,!0,!,COOH)
@@ -98,8 +96,11 @@ endfont
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
font_wd#:=60mm#;
font_ht#:=35mm#;
+bond_len#:=8mm#;
+max_bond_length#:=10mm#;
ratio_thickness_bond:=0.015;
ratio_atom_bond:=0.36;
+sw_solid:=0;
sw_font_frame:=1;
margin_left_right:=2mm;
margin_top_bottom:=1mm;
@@ -158,14 +159,14 @@ beginfont("EN:branch1")
endfont
%***********************************************************************
beginfont("EN:branch2")
- font_ht#:=23mm#;
+ font_ht#:=20mm#;
margin_top_bottom:=2mm;
sw_clip:=1;
sw_numberA:=1;
numberA_end:=7;
ratio_chain_ring:=1;
%----------------------------------------------------------------------
- MCf(<-30,!6,2\~dr,!,4\`1.5,!,6\^15,-60)
+ MCf(<-30,!6,2\~dr,!,4\`1.5,-90,6\^15,-60)
endfont
%***********************************************************************
beginfont("EN:Connect atom")
@@ -197,8 +198,8 @@ beginfont("EN:rotate 1")
endfont
%***********************************************************************
beginfont("EN:change bond 1")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
+ font_ht#:=12mm#;
+ bond_len#:=8mm#;
sw_clip:=1;
ratio_chain_ring:=1;
margin_top_bottom:=3mm;
@@ -206,8 +207,8 @@ beginfont("EN:change bond 1")
endfont
%***********************************************************************
beginfont("EN:change bond 2")
- font_wd#:=70mm#;
- font_ht#:=15mm#;
+ font_ht#:=12mm#;
+ bond_len#:=8mm#;
margin_top_bottom:=3mm;
sw_clip:=1;
ratio_chain_ring:=1;
@@ -216,6 +217,7 @@ endfont
%***********************************************************************
beginfont("EN:change bond 3")
font_ht#:=12mm#;
+ bond_len#:=8mm#;
margin_top_bottom:=3mm;
sw_clip:=1;
ratio_chain_ring:=1;
@@ -223,14 +225,26 @@ beginfont("EN:change bond 3")
endfont
%***********************************************************************
beginfont("EN:change bond 3")
- font_wd#:=70mm#;
+ font_ht#:=12mm#;
+ bond_len#:=8mm#;
sw_clip:=1;
ratio_chain_ring:=1;
margin_top_bottom:=3mm;
- MCf(<30,!7,1=dt,3=wv,5=bd,7=bz)
+ MCf(<30,!3,1=dt,3=wv)
endfont
%***********************************************************************
beginfont("EN:change bond 4")
+ font_ht#:=12mm#;
+ bond_len#:=8mm#;
+ sw_clip:=1;
+ ratio_chain_ring:=1;
+ margin_top_bottom:=3mm;
+ MCf(<30,!3,1=bd,3=bz)
+endfont
+%***********************************************************************
+beginfont("EN:change bond 5")
+ font_ht#:=12mm#;
+ bond_len#:=8mm#;
margin_top_bottom:=3mm;
sw_clip:=1;
ratio_chain_ring:=1;
@@ -245,21 +259,23 @@ beginfont("EN:over line")
endfont
%***********************************************************************
beginfont("EN:change bond length1")
- font_ht#:=15mm#;
+ font_ht#:=12mm#;
sw_numberB:=1;
MCf(<30,!2,!2`1.2,!2)
endfont
%***********************************************************************
beginfont("EN:change bond length2")
- font_ht#:=15mm#;
+ font_ht#:=12mm#;
sw_numberB:=1;
MCf(<30,!2,``1.2,!4)
endfont
%***********************************************************************
beginfont("EN:change ring length")
- font_ht#:=25mm#;
+ margin_top_bottom:=2mm;
+ font_ht#:=15mm#;
sw_clip:=1;
- MCf(?6,4\,?6`1.2,5=?6,11=?6)
+ sw_numberB:=1;
+ MCf(?6,4\,?6`1.2)
endfont
%***********************************************************************
beginfont("EN:Insert atom")
@@ -315,6 +331,14 @@ beginfont("EN:fused ring")
MCf(<30,?6,3=?6,$(3)dt,$(7,8,9,10,11)bd)
endfont
%-----------------------------------------------------------------------
+beginfont("EN:change ring length")
+ margin_top_bottom:=2mm;
+ font_ht#:=25mm#;
+ sw_clip:=1;
+ sw_numberB:=1;
+ MCf(?6,4\,?6`1.2,5=?6,11=?6,$(14,15,16,17,18,19,20,21,22,23)bd,$(5,11)dt)
+endfont
+%-----------------------------------------------------------------------
beginfont("EN:fused large 6 ring")
font_ht#:=18mm#;
margin_top_bottom:=1.5mm;
@@ -373,9 +397,9 @@ beginfont("EN:substituent 1")
endfont
%***********************************************************************
beginfont("EN:substituent 2")
- font_ht#:=20mm#;
+ font_ht#:=15mm#;
sw_clip:=1;
- MCf(<30,!,//O,!,/*H,!,*/H,!,**?3,!)
+ MCf(<-30,!,//O,!2,/*H,!2,*/H,!2,**?3,!)
endfont
%***********************************************************************
beginfont("EN:substituent 3")
@@ -386,12 +410,12 @@ endfont
%***********************************************************************
beginfont("EN:substituent 3")
font_wd#:=70mm#;
- font_ht#:=22mm#;
+ font_ht#:=18mm#;
margin_top_bottom:=2mm;
sw_numberA:=1;
sw_clip:=1;
- numberA_end:=18;
- MCf(<-30,!17,2:/Me,4:/Et,6:/Pr,10:/iPr,14:/tBu,16:/Ph^-30)
+ numberA_end:=17;
+ MCf(<-30,!16,2:/Me,4:/Et,6:/Pr,10:/iPr,14:/tBu,16:/Ph^-60)
endfont
%***********************************************************************
beginfont("EN:substituent 4")
@@ -453,27 +477,36 @@ beginfont("EN:Change color")
endfont
%***********************************************************************
beginfont("EN:Make brock")
- font_ht#:=20mm#;
+ font_ht#:=8mm#;
sw_clip:=1;
sw_numberB:=1;
MCf(<30,!2,{,``1.2,!2,},!2)
endfont
%***********************************************************************
beginfont("EN:Chain start multi characters")
- font_ht#:=20mm#;
- MCd(1,1)( 0,1)(<30,COOH,!0,!5,COOH)
- MCd(.8,1)(.3,0)(<30,COOH,!6,COOH)
+ font_ht#:=9mm#;
+ sw_clip:=1;
+ sw_solid:=1;
+ MCf(<30,COOH,!0,!5,COOH)
+endfont;
+beginfont("EN:not good")
+ font_ht#:=9mm#;
+ margin_left_right:=5mm;
+ sw_solid:=1;
+ sw_clip:=1;
+ MCf(<30,COOH,!6,COOH)
endfont;
%***********************************************************************
beginfont("EN:User definition")
- font_ht#:=18mm#;
+ font_ht#:=15mm#;
+ sw_clip:=1;
iBuOH:='(!,/Me,!,OH);
MCf(<30,?6,@(4,6)/iBuOH)
endfont
%***********************************************************************
beginfont("EN:Inline definition")
- font_ht#:=18mm#;
- margin_left_right:=5mm;
+ font_ht#:=15mm#;
+ margin_left_right:=2mm;
sw_clip:=1;
MCf(<30,!3,/'(!,/Me,!,OH),!3)
endfont
@@ -711,7 +744,7 @@ endfont
beginfont("EN:Switwch atom frame")
font_ht#:=15mm#;
sw_atom_frame:=1;
- MCf(<30,Ph,4:/COOH,3:/OH)
+ MCf(<30,Ph,1:/Cl,4:/COOH,3:/OH)
endfont
%***********************************************************************
beginfont("EN:Switwch clipping")
@@ -761,7 +794,7 @@ endfont
%***********************************************************************
sw_clip:=1;
%% Output molecular infomation
-beginfont()
+beginfont("EN:Caffeine","FM:C8H10N4O2","MW:194.19")
font_ht#:=15mm#;
sw_logout:=sw_info_weight:=sw_info_formula:=1;
MCf(<30,?6,-4=?5,$(3,8)dl,
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf
index 5ee5007340c..d2a37baa124 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 265c66c9d8a..cb9ea163a93 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.10.10
+% Molecular Coding Format manual by Akira Yamaji 2016.10.13
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
%%%%\usepackage{graphicx}
@@ -45,9 +45,9 @@
\ifx\@tag\@cFM\edef\CALfm{\@var}\fi
\fi}%
\def\put@char{%
- \begin{picture}(84,30)%
- \put(0,25){\bf [\MOLnum]\MOLnameE}%
- \put(5,20){\small\tt FM:\CALfm{ }MW:\CALmw}%
+ \begin{picture}(84,28)%
+ \put(0,23){\bf [\MOLnum]\MOLnameE}%
+ \put(5,18){\small\tt FM:\CALfm{ }MW:\CALmw}%
\put(5,0){\font\@strufont=\MOLfile\relax%
\hbox{\@strufont\char\MOLchar}}%
\end{picture}%
@@ -146,7 +146,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
<-30,!6,
2\~dr,!,
- 4\`1.5,!,
+ 4\`1.5,-90,
6\^15,-60
\end{verbatim}
\MCFstructure
@@ -208,15 +208,22 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
-\subsubsection{Dotted,wave,broad}
+\subsubsection{Dotted,wave}
\begin{verbatim}
Bn=bond type : change bond type at Bn
dt : dotted
wv : wave
+
+ <30,!3,1=dt,3=wv
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------------------------------------------
+\subsubsection{Broad}
+\begin{verbatim}
bd : broad
bz : broad dotted
- <30,!7,1=dt,3=wv,5=bd,7=bz
+ <30,!3,1=bd,3=bz
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -225,8 +232,6 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
$(2,4,6)dr : 2=dr,4=dr,6=dr
<30,!7,$(2,4,6)dr
-
- ** <30,!7,2=dr,4=dr,6=dr
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -264,10 +269,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\begin{verbatim}
?n`length : change ring length
- ?6,4\,?6`1.2,5=?6,11=?6
-
- ** fused ring size depend on
- attached bond length
+ ?6,4\,?6`1.2
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -334,6 +336,14 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\MCFstructure
%-----------------------------------------------------------------------------
\begin{verbatim}
+ ** fused ring size depend on
+ attached bond length
+
+ ?6,4\,?6`1.2,5=?6,11=?6
+\end{verbatim}
+\MCFstructure
+%-----------------------------------------------------------------------------
+\begin{verbatim}
?6,3=?6[13] : fuse ?6[13] at B3
?6[13]: 6 membered ring scaled 13/10
** ?m[n] (5<=m<=8,11<=n<=15)
@@ -430,7 +440,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\subsubsection{Add substituent}
\begin{verbatim}
<-30,!17,2:/Me,4:/Et,6:/Pr,
- 10:/iPr,14:/tBu,16:/Ph^-30
+ 10:/iPr,14:/tBu,16:/Ph^-60
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -438,14 +448,16 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\begin{verbatim}
~,^,` : change type,angle,length
- <-30,!6,@(2~wf,4~zf,6^-30)/H
+ <-30,!6,
+ @(2~wf,4~zf,6^-30)/H
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
\begin{verbatim}
^,`,> : change angle,length,environment
- <30,!7`1,@(3)/*Me`2^30,5:*/Pr>lr,7:*/Pr>rl
+ <30,!7`1,
+ 3:/*Me`2^30,5:*/Pr>lr,7:*/Pr>rl
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -497,10 +509,9 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\begin{verbatim}
@(5)green : change color of A5 green
$(3)red : change color of B3 red
+ ** METAFONT ignore color command
<30,Ph,@(2,5)N,2:red,5:blue,3=green
-
- ** METAFONT ignore color command
\end{verbatim}
%%%%\MCFstructure % for Metafont
\includegraphics{mcf_man_soc-060.eps}% for dvipdfmx
@@ -520,9 +531,11 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
if chain start multi charactor string,
use !0 instead of !
- MCd( 1,1)(0 ,0.9)(<30,COOH,!0,!3,COOH)
-
- MCd(.8,1)(0.3,0.1)(<30,COOH,!4,COOH)
+ MCf(<30,COOH,!0,!3,COOH)
+\end{verbatim}
+\MCFstructure
+\begin{verbatim}
+ MCf(<30,COOH,!4,COOH)
\end{verbatim}
\MCFstructure
%-----------------------------------------------------------------------------
@@ -779,7 +792,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\
\subsubsection{Atom frame}
\begin{verbatim}
sw_atom_frame:=1;
- MCf(<30,Ph,4:/COOH,3:/OH)
+ MCf(<30,Ph,1:/Cl,4:/COOH,3:/OH)
** default: sw_atom_frame=0
\end{verbatim}
\MCFstructure
@@ -1016,7 +1029,7 @@ F:mcf_man_soc/C:90/EN:Ampicillin/CAS:69-53-4
%-----------------------------------------------------------------------------
\onecolumn%
\section{Example to use mcf2graph}
-\subsection{Molecular definition file example}
+\subsection{Molecular definition file}
\begin{verbatim}
%-------------------------------------------------------------------------
input mcf2graph.mf; % input macro
@@ -1026,14 +1039,6 @@ font_wd#:=60mm#; % font width >
font_ht#:=40mm#; % font height >
var3:="cal_MW"; tag3:="cMW"; > AUX file table
var4:="cal_FM"; tag4:="cFM"; >
-%%%% 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; > PNG output
outputtemplate:="%j-%3c.png"; >
%-------------------------------------------------------------------------
@@ -1054,15 +1059,18 @@ endfont > end font
bye
\end{verbatim}
%------------------------------------------------------------------------
-\subsection{Molecular structure output example}
-\INFO{F:mcf_man_soc,C:100,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:101,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
-\newpage
-%------------------------------------------------------------------------
\noindent%
-\subsection{Molecular information output example}
-'filename'-info.aux : for use in \TeX, it takes over filename,
-char number, molecular information,etc.
+\subsection{Information auxfile output}
+\paragraph{(Insert option parameter setting)}
+\begin{verbatim}
+ sw_auxout:=1;
+ ** default : sw_auxout=0
+\end{verbatim}
+\paragraph{(Command line)}
+\begin{verbatim}
+ >mpost -s ahangle=0 FILENAME (molecular difinition file)
+\end{verbatim}
+\paragraph{(Output)}
\begin{verbatim}
(sw_auxfix=0)
F:mcf_man_soc;C:109;cMW:349.40462;cFM:C16H19N3O4S;EN:Ampicillin
@@ -1082,8 +1090,122 @@ F : filename C : char number NO : serial number EN : english name
cMW : molecular weight calculated cFM : molecular formula calculated
MW : molecular weight from literature data
\end{verbatim}
+%------------------------------------------------------------------------
+\newpage
+\noindent%
+\subsection{Checklist output}
+\paragraph{(Insert option parameter setting)}
+\begin{verbatim}
+ sw_checklist:=1;
+ ** default : sw_checklist=0
+\end{verbatim}
+\paragraph{(Command line)}
+\begin{verbatim}
+ >mpost -s ahangle=0 -s ahlength=2 FILENAME (molecular difinition file)
+\end{verbatim}
+\paragraph{(Output)}
+\begin{verbatim}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Molecular name = Caffeine
+% There were 0 warnings / Expanded command count= 75
+% width * height = 39.54677 * 36.84769
+% Shift width * height = -9.33592 * -12.77518
+% Bond length = 9.23628 Atom size = 4.12209
+% Atom count= 14 Bond count= 15 Ring count= 2 Hide H = 10
+%-----------------------------------< atom >< bond >-------
+% 1 ( 0 ) ( 0 ) C 4
+% 2 ( 0.86603 ) ( -0.5 ) N 3
+% 3 ( 1.73206 ) ( 0 ) C 4
+% 4 ( 1.73206 ) ( 1 ) C 4
+% 5 ( 0.86603 ) ( 1.5 ) C 4
+% 6 ( 0 ) ( 1 ) N 3
+% 7 ( 2.6831 ) ( -0.30902 ) N 3
+% 8 ( 3.27089 ) ( 0.5 ) C 3
+% 9 ( 2.6831 ) ( 1.30902 ) N 3
+% 10 ( 0.86603 ) ( -1.38315 ) C 1
+% 11 ( -0.78764 ) ( 1.45474 ) C 1
+% 12 ( 2.95923 ) ( 2.15886 ) C 1
+% 13 ( -0.78764 ) ( -0.45474 ) O 2
+% 14 ( 0.86603 ) ( 2.38315 ) O 2
+%Bond list---------------------------------------------------------
+% 1 1 -> 2 ( 1)
+% 2 2 -> 3 ( 1)
+% 3 3 -> 4 ( 2)
+% 4 4 -> 5 ( 1)
+% 5 5 -> 6 ( 1)
+% 6 6 -> 1 ( 1)
+% 7 3 -> 7 ( 1)
+% 8 7 -> 8 ( 2)
+% 9 8 -> 9 ( 1)
+% 10 9 -> 4 ( 1)
+% 11 2 -> 10 ( 1)
+% 12 6 -> 11 ( 1)
+% 13 9 -> 12 ( 1)
+% 14 1 -> 13 ( 2)
+% 15 5 -> 14 ( 2)
+%Fomula / Molecular weight ---------------------------------------
+% C ( 12.0107) * 8 = 96.08557
+% H ( 1.00793) * 10 = 10.07935
+% N ( 14.0067) * 4 = 56.0268
+% O ( 15.9994) * 2 = 31.99881
+% Weight Calc: 194.19052 / Input: 194.19 / weight gap= 0.00052
+% Fomula Calc: C8H10N4O2 / Input: C8H10N4O2 / MACTCH
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\end{verbatim}%
+\newpage
+%------------------------------------------------------------------------
+\noindent%
+\subsection{Molfile output}
+\paragraph{(Insert option parameter setting)}
+\begin{verbatim}
+ sw_MOLout:=1;
+ ** default : sw_MOLout=0
+\end{verbatim}
+\paragraph{(Command line)}
+\begin{verbatim}
+ >mpost -s ahangle=3 FILENAME (molecular difinition file)
+\end{verbatim}
+\paragraph{(Output)}
+\begin{verbatim}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ -MCFtoMOL- EN:Caffeine
+
+ 14 15 0 0 0 0 0 0 0 0999 V2000
+ 0 0 0 C 0 0 0 0
+ 0.86603 -0.5 0 N 0 0 0 0
+ 1.73206 0 0 C 0 0 0 0
+ 1.73206 1 0 C 0 0 0 0
+ 0.86603 1.5 0 C 0 0 0 0
+ 0 1 0 N 0 0 0 0
+ 2.6831 -0.30902 0 N 0 0 0 0
+ 3.27089 0.5 0 C 0 0 0 0
+ 2.6831 1.30902 0 N 0 0 0 0
+ 0.86603 -1.36383 0 C 0 0 0 0
+ -0.76894 1.44394 0 C 0 0 0 0
+ -0.76894 -0.44394 0 O 0 0 0 0
+ 0.86603 2.36383 0 O 0 0 0 0
+ 2.95299 2.1396 0 C 0 0 0 0
+ 1 2 1 0 0 0
+ 2 3 1 0 0 0
+ 3 4 2 0 0 0
+ 4 5 1 0 0 0
+ 5 6 1 0 0 0
+ 6 1 1 0 0 0
+ 3 7 1 0 0 0
+ 7 8 2 0 0 0
+ 8 9 1 0 0 0
+ 9 4 1 0 0 0
+ 2 10 1 0 0 0
+ 6 11 1 0 0 0
+ 1 12 2 0 0 0
+ 5 13 2 0 0 0
+ 9 14 1 0 0 0
+M END
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\end{verbatim}%
+\newpage
%----------------------------------------------------------------------------
-\subsection{LaTeX file example}
+\subsection{\LaTeX file example}
%############################################################################
\begin{verbatim}
%--------------------------------------------------------------------
@@ -1116,10 +1238,14 @@ MW : molecular weight from literature data
%--------------------------------------------------------------------
\begin{document}
\unitlength=1mm%
-\INFO{F:mcf_man_soc,C:100,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
-\INFO{F:mcf_man_soc,C:101,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+\INFO{F:mcf_man_soc,C:103,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:104,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
\end{document}
%--------------------------------------------------------------------
\end{verbatim}%
%############################################################################
+%------------------------------------------------------------------------
+\INFO{F:mcf_man_soc,C:103,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}%
+\INFO{F:mcf_man_soc,C:104,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}%
+%------------------------------------------------------------------------
\end{document}
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 05421a5721f..cac18e1243e 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 c8115e7b59b..c69c8f8077b 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 2016.10.10
+% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2016.10.12
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% mcf2graph.mf it must be version 3.98 or later
+%%% mcf2graph.mf it must be version 3.99 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 bca5145d9b3..10fdeaad35a 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.98 Copyright (c) 2013-2016 Akira Yamaji
+% mcf2graph ver 3.99 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 4.0 2016.10";
+message " This is mcf2graph ver 3.9 2016.10";
%-------------------------------------------------------------------------------------------------
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[],
@@ -60,7 +60,7 @@ if known green: f_MP:=1;
elseif ahangle=3: sw_MOLout:=1; def shipit = enddef; % MDL Molefile on
fi
outputtemplate:="%j-%3c."&outputformat;
- def beginchar(text s)= beginfig(char_num) enddef;
+ def beginchar(expr a,b,c,d)= beginfig(char_num) w:=b*pt; h:=c*pt; enddef;
def endchar = endfig enddef;
def printf expr s= write s to mp_log_name enddef;
def # = enddef;
@@ -97,76 +97,80 @@ def parameter_list=
sw_checklist,sw_numberA,sw_numberB,sw_mol_frame,sw_auxout,sw_solid,sw_expand,sw_MOLout,
sw_start_vector,sw_atom_frame,sw_font_frame,sw_subst_off,sw_bond_single,sw_clip,
margin_left_right,margin_top_bottom,ratio_atom_bond,ratio_thickness_bond,ratio_char_bond,
- ratio_chain_ring,offset_atom#,max_bond_width,ratio_bondgap_bond,ratio_zebra_black,
- ratio_zebragap_bond,ratio_wedge_bond,ratio_atomgap_atom,bond_len#,
- offset_wedge#,max_bond_length#,offset_zebra_gap#,offset_bond_gap#,thickness_font_frame#,
- offset_thickness#,numberA_start,numberA_end,numberB_start,numberB_end
+ ratio_chain_ring,max_bond_width,ratio_bondgap_bond,ratio_zebra_black,ratio_zebragap_bond,
+ ratio_wedge_bond,ratio_atomgap_atom,bond_len#,offset_atom#,offset_wedge#,max_bond_length#,
+ offset_zebra_gap#,offset_bond_gap#,thickness_font_frame#,offset_thickness#,
+ numberA_start,numberA_end,numberB_start,numberB_end
enddef;
%-------------------------------------------------------------------------------------------------
nA:=0; for list=parameter_list: stock_p[incr nA]:=list; endfor
def store_par(text t)=
nA:=0; for list=t: if stock_p[incr nA]<>list: stock_p[nA]:=list; fi endfor enddef;
def restore_par(text t)= nA:=0;
- forsuffixes list=t: if list<>stock_p[incr nA]: list:=stock_p[nA]; fi endfor
-enddef;
+ forsuffixes list=t: if list<>stock_p[incr nA]: list:=stock_p[nA]; fi endfor enddef;
%-------------------------------------------------------------------------------------------------
def beginfont(text s)=
inf_EN:=inf_JN:=inf_FM:=inf_CAS:=inf_USE:=inf_EXA:=inf_EXB:=""; inf_MW:="0";
len_x:=len_y:=cntA:=inf_num:=f_beginchar:=0;
- store_par(parameter_list); save_wd#:=font_wd#; save_ht#:=font_ht#;
- ratio_bond_width:=0.025;
- clearit;
+ store_par(parameter_list);
+ save_wd#:=font_wd#; save_ht#:=font_ht#;
for list=s:
inf_num:=inf_num+1; info[inf_num]:=list;
nA:=0; for i=0 upto length(list): if pic_c(i,list)=":": nA:=i; fi exitif nA>0; endfor
if nA>0:
s_tag:=substring (0,nA) of list; s_var:=substring (nA+1,length(list)) of list;
- if s_tag="NO": inf_NO:=s_var; elseif s_tag="MW": inf_MW:=s_var;
- elseif s_tag="EN": inf_EN:=s_var; elseif s_tag="JN": inf_JN:=s_var;
+ if s_tag="NO": inf_NO:=s_var; elseif s_tag="MW": inf_MW:=s_var;
+ elseif s_tag="EN": inf_EN:=s_var; elseif s_tag="JN": inf_JN:=s_var;
elseif s_tag="FM": inf_FM:=s_var; elseif s_tag="CAS": inf_CAS:=s_var;
elseif s_tag="USE": inf_USE:=s_var; elseif s_tag="EXA": inf_EXA:=s_var;
- elseif s_tag="EXB": inf_EXB:=s_var;
- fi
+ elseif s_tag="EXB": inf_EXB:=s_var; fi
fi
endfor
+ clearit;
enddef;
%-------------------------------------------------------------------------------------------------
def endfont=
- if (sw_font_frame=1)or(sw_font_frame=3):
- AUX(0,0)(draw_frame(font_wd,font_ht,(0,0),thickness_font_frame);) fi
+ if (sw_font_frame=1)or(sw_font_frame=3):
+ AUX(0,0)(draw_frame(w,h,(0,0),thickness_font_frame);) fi
if (sw_font_frame=2)or(sw_font_frame=3):
- AUX(0,0)(draw_frame(font_wd-2margin_left_right,font_ht-2margin_top_bottom,
+ AUX(0,0)(draw_frame(w-2margin_left_right,h-2margin_top_bottom,
(margin_left_right,margin_top_bottom),thickness_font_frame);) fi
- if sw_font_frame=4: AUX(0,0)(draw_corner(font_wd,font_ht,thickness_font_frame);) fi
+ if sw_font_frame=4: AUX(0,0)(draw_corner(w,h,thickness_font_frame);) fi
if (sw_auxout=1)or(sw_checklist=1)or(sw_MOLout=1): mol_check; fi
if sw_auxout=1: auxfile_out; fi
if sw_checklist=1: checklist_out; fi
if sw_MOLout=1: MOLfileout; fi
- if f_beginchar=1:
- char_num:=char_num+1; currentpicture:=chem_structure; chem_structure:=nullpicture;
- endchar; fi
+ char_num:=char_num+1; currentpicture:=chem_structure; chem_structure:=nullpicture; endchar;
restore_par(parameter_list); font_wd#:=save_wd#; font_ht#:=save_ht#;
if proc_end=1: scantokens("bye"); fi
enddef;
%-------------------------------------------------------------------------------------------------
-def size_setup=
- if sw_solid=0: bond_len#:=font_wd#*ratio_bond_width; fi
- wedge_wd# := ratio_wedge_bond*bond_len#+offset_wedge#;
- zebra_gap# := ratio_zebragap_bond*bond_len#+offset_zebra_gap#;
- if (ratio_atom_bond*bond_len#+offset_atom#)<.8bond_len#:
- atom_wd#:=ratio_atom_bond*bond_len#+offset_atom#;
- else:
- atom_wd#:=.8bond_len#; ratio_chain_ring:= .5;
- fi
- gap#:= ratio_bondgap_bond*bond_len#+offset_bond_gap#;
- bond_pen_wd# := ratio_thickness_bond*bond_len#+offset_thickness#;
- char_pen_wd# := ratio_char_bond*bond_pen_wd#;
- define_pixels(bond_len,zebra_gap,wedge_wd,atom_wd,gap,bond_pen_wd,char_pen_wd,
- font_wd,font_ht,thickness_font_frame);
- font_size_setup;
+def char_size_set(expr a)(expr b)(expr c)(expr s)=
+ for j=0 upto length(s)-1: nA:=ASCII(pic_c(j,s));
+ if f_FON[nA]=1: atom_w[nA]#:=atom_wd#*a; atom_h[nA]#:=atom_wd#*b; atom_d[nA]#:=atom_wd#*c;
+ define_pixels(atom_w[nA],atom_h[nA],atom_d[nA]); fi
+ endfor
enddef;
%-------------------------------------------------------------------------------------------------
-def scaling=
+def mol_size_setup=
+ if (bond_len#*ratio_atom_bond+offset_atom#)<.8bond_len#:
+ atom_wd#:=bond_len#*ratio_atom_bond+offset_atom#;
+ else: atom_wd#:=.8bond_len#; ratio_chain_ring:= .5; fi
+ wedge_wd#:= bond_len#*ratio_wedge_bond+offset_wedge#;
+ zebra_gap#:= bond_len#*ratio_zebragap_bond+offset_zebra_gap#;
+ bondgap#:= bond_len#*ratio_bondgap_bond+offset_bond_gap#;
+ bond_pen_wd#:= bond_len#*ratio_thickness_bond+offset_thickness#;
+ char_pen_wd#:= bond_pen_wd#*ratio_char_bond;
+ define_pixels(bond_len,zebra_gap,wedge_wd,atom_wd,bondgap,bond_pen_wd,char_pen_wd);
+ char_size_set( 1)( 1)( 0)("CGHMNOQ");
+ char_size_set(.9)( 1)( 0)("ABDEFIJKLPRSTUVWXYZ-+/><m");
+ char_size_set(.7)( 1)( 0)(" ()0123456789nhj=*bdiltf");
+ char_size_set(.7)( 1)(.15)("pqg");
+ char_size_set(.7)(.8)( 0)("acekosuvxzwry");
+ char_size_set(.4)( 1)( 0)(".,:;'`");
+enddef;
+%-------------------------------------------------------------------------------------------------
+def mol_scaling=
min_x:=min_y:= 4095.999; max_x:=max_y:=-4095.999;
for i=1 upto cntA: xpos:=xpart(posA[i]); ypos:=ypart(posA[i]);
if strA[i]<>0: str_len:=nC:=num_d:=0;
@@ -189,18 +193,13 @@ for i=1 upto cntA: xpos:=xpart(posA[i]); ypos:=ypart(posA[i]);
len_x:=max_x-min_x; len_y:=max_y-min_y;
enddef;
%-------------------------------------------------------------------------------------------------
-def resize(expr WD,HT)=
- if (len_y/len_x)>(font_ht/font_wd):
- factor:=(font_ht*HT-2margin_top_bottom)/len_y;
- else:
- factor:=(font_wd*WD-2margin_left_right)/len_x;
- fi
- ratio_bond_width:=ratio_bond_width*factor;
- len_x:=len_x*factor; len_y:=len_y*factor;
+def mol_resize(expr WD,HT)=
+ if (len_y/len_x)>(font_ht/font_wd): factor:=(font_ht*HT-2margin_top_bottom)/len_y;
+ else: factor:=(font_wd*WD-2margin_left_right)/len_x; fi
enddef;
%-------------------------------------------------------------------------------------------------
for i=1 upto 128: f_FON[i]:=0; endfor asc0:=ASCII("0"); asc9:=ASCII("9");
-def font_use_check=
+def char_use_check=
for i=1 upto 128: if f_FON[i]<>0: f_FON[i]:=0; fi endfor
if (sw_numberA>=1)or(sw_numberB>=1): for j=asc0 upto asc9: f_FON[j]:=1; endfor
else: for i=1 upto cntA: if strA[i]<>0: for j=0 upto length(com_str[strA[i]])-1:
@@ -384,32 +383,25 @@ def MCd(expr RW,RH)(expr FW,FH)(text s)=
if (sw_expand=1)or(sw_MOLout=1): expand_set; fi
''(0)(s,(_term,0)); proc_bond_atom(1); cntA_skeleton:=cntA; cntB_skeleton:=cntB;
if cntP>0: ps_get(1); fi
- font_use_check;
- if sw_solid>=1:
- size_setup; proc_skeleton; scaling;
+ define_pixels(font_wd,font_ht,thickness_font_frame);
+ char_use_check;
+ if sw_solid>=1: mol_size_setup; proc_skeleton; mol_scaling;
else:
- size_setup; proc_skeleton; scaling; resize(RW,RH); size_setup;
+ bond_len#:=0.025font_wd#; mol_size_setup;
+ for i=1 upto 6:
+ proc_skeleton; mol_scaling; mol_resize(RW,RH); exitif factor=1;
+ bond_len#:=bond_len#*factor; mol_size_setup;
+ endfor
if bond_len#>max_bond_length#:
- sw_solid:=1; bond_len#:=max_bond_length#;
- size_setup; proc_skeleton; scaling; sw_solid:=0;
- else:
- for i=1 upto 4: proc_skeleton; scaling; resize(RW,RH); size_setup; endfor
- fi
+ bond_len#:=max_bond_length#; mol_size_setup; proc_skeleton; mol_scaling; fi
fi
- font_setup;
+ char_font_setup;
if sw_subst_off=1: cntA:=cntA_skeleton; cntB:=cntB_skeleton; fi
%----------------------------------------------------------------------------------------
if f_beginchar=0:
- if sw_clip=1:
- f_wd#:=font_wd#*((len_x+2margin_left_right)/font_wd);
- f_ht#:=font_ht#*((len_y+2margin_top_bottom)/font_ht);
- font_wd:=len_x+2margin_left_right; font_ht:=len_y+2margin_top_bottom;
- else:
- f_wd#:=font_wd#; f_ht#:=font_ht#;
- fi
- beginchar(char_num,f_wd#,f_ht#,0);
- f_beginchar:=1;
- fi
+ if sw_clip=1: font_wd#:=font_wd#*((len_x+2margin_left_right)/font_wd);
+ font_ht#:=font_ht#*((len_y+2margin_top_bottom)/font_ht); fi
+ beginchar(char_num,font_wd#,font_ht#,0); f_beginchar:=1; fi
for i=1 upto cntB: if lineB[i]<si_ : draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); fi endfor
for i=1 upto cntB: if lineB[i]>=si_: draw_bond(i,sB[i],eB[i],angB[i],lineB[i]); fi endfor
for i=1 upto cntA:
@@ -418,14 +410,12 @@ def MCd(expr RW,RH)(expr FW,FH)(text s)=
elseif sw_numberA=3: if numberA_end<cntA: nA:=numberA_end-i+1; else: nA:=cntA-i+1; fi
else: nA:=i; fi
if i<10: draw_atom(i,posA[i],0,decimal(nA),1);
- else: draw_atom(i,posA[i]+(-.2atom_wd,0),0,decimal(nA),1);
- fi
+ else: draw_atom(i,posA[i]+(-.2atom_wd,0),0,decimal(nA),1); fi
elseif sw_numberB>=1:
- else: draw_atom(i,posA[i],br_ang[i],com_str[strA[i]],strW[strA[i]]);
- fi
+ else: draw_atom(i,posA[i],br_ang[i],com_str[strA[i]],strW[strA[i]]); fi
endfor
- sft_X:=margin_left_right-min_x+(font_wd-len_x-2margin_left_right)*FW;
- sft_Y:=margin_top_bottom-min_y+(font_ht-len_y-2margin_top_bottom)*FH;
+ sft_X:=margin_left_right-min_x+(w-len_x-2margin_left_right)*FW;
+ sft_Y:=margin_top_bottom-min_y+(h-len_y-2margin_top_bottom)*FH;
if sw_mol_frame=1: AUX(sft_X,sft_Y)(draw_frame(len_x,len_y,(min_x,min_y),0.2pt);) fi
if sw_start_vector=1: AUX(sft_X,sft_Y)(start_vector) fi
addto chem_structure also currentpicture shifted (sft_X,sft_Y);
@@ -631,29 +621,29 @@ if (nC>0)and(LN<>0):
pickup pencircle scaled bond_pen_wd;
if known colorB[n]: nB:=colorB[n]; fi
if (LN=si)or(sw_bond_single=1): draw pA Cp(nB);
- elseif LN=dl:draw pA Cp(nB); draw sfB(pC,gap,ap) Cp(nB);
- elseif LN=dr:draw pA Cp(nB); draw sfB(pC,gap,am) Cp(nB);
- elseif LN=dm:draw sfB(pB,gap/1.75,ap) Cp(nB); draw sfB(pB,gap/1.75,am) Cp(nB);
- elseif LN=tm:draw pA Cp(nB);draw sfB(pA,gap,ap) Cp(nB); draw sfB(pA,gap,am) Cp(nB);
+ elseif LN=dl:draw pA Cp(nB); draw sfB(pC,bondgap,ap) Cp(nB);
+ elseif LN=dr:draw pA Cp(nB); draw sfB(pC,bondgap,am) Cp(nB);
+ elseif LN=dm:draw sfB(pB,bondgap/1.75,ap) Cp(nB); draw sfB(pB,bondgap/1.75,am) Cp(nB);
+ elseif LN=tm:draw pA Cp(nB);draw sfB(pA,bondgap,ap) Cp(nB); draw sfB(pA,bondgap,am) Cp(nB);
elseif LN=wf:fill Ls--sfB(Le,ww,am)--sfB(Le,ww,ap)--cycle;
elseif LN=wb:fill sfB(Ls,ww,am)--Le--sfB(Ls,ww,ap)--cycle;
- elseif LN=bd:draw pA withpen penrazor rotated ap scaled gap Cp(nB);
+ elseif LN=bd:draw pA withpen penrazor rotated ap scaled bondgap Cp(nB);
elseif LN=bz:bz_put(sfB(Ls,ww,ap),sfB(Le,ww,ap),sfB(Ls,ww,am),sfB(Le,ww,am),nB);
elseif LN=zf:wz_put(Ls,sfB(Le,ww,ap),sfB(Le,ww,am),nB);
elseif LN=zb:wz_put(Le,sfB(Ls,ww,am),sfB(Ls,ww,ap),nB);
elseif LN=dt:for i=0 step .75zebra_gap/length(Le-Ls) until 1: drawdot i[Ls,Le]; endfor
elseif LN=wv:draw_wv;
- elseif LN=vf:draw pA Cp(nB);draw sfB(Le,gap,ANG-150)--Le--sfB(Le,gap,ANG+150) Cp(nB);
- elseif LN=vb:draw pA Cp(nB);draw sfB(Ls,gap,ANG-30)--Ls--sfB(Ls,gap,ANG+30) Cp(nB);
- elseif LN=si_:erase draw 0.15[Ls,Le]--0.85[Ls,Le] wpcs .75gap; draw pA Cp(nB);
+ elseif LN=vf:draw pA Cp(nB);draw sfB(Le,bondgap,ANG-150)--Le--sfB(Le,bondgap,ANG+150) Cp(nB);
+ elseif LN=vb:draw pA Cp(nB);draw sfB(Ls,bondgap,ANG-30)--Ls--sfB(Ls,bondgap,ANG+30) Cp(nB);
+ elseif LN=si_:erase draw 0.15[Ls,Le]--0.85[Ls,Le] wpcs .75bondgap; draw pA Cp(nB);
elseif LN=wf_:erase fill sfB(0.15[Ls,Le],.5ww,ap)--sfB(0.15[Ls,Le],.5ww,am)--
sfB(0.85[Ls,Le],1.25ww,am)--sfB(0.85[Ls,Le],1.25ww,ap)--cycle;
fill Ls--sfB(Le,ww,am)--sfB(Le,ww,ap)--cycle;
elseif LN=wb_:erase fill sfB(0.15[Ls,Le],1.25ww,ap)--sfB(0.15[Ls,Le],1.25ww,am)--
sfB(0.85[Ls,Le],.5ww,am)--sfB(0.85[Ls,Le],.5ww,ap)--cycle;
fill sfB(Ls,ww,am)--Le--sfB(Ls,ww,ap)--cycle;
- elseif LN=bd_:erase draw 0.15[Ls,Le]--0.85[Ls,Le] wpcs 1.5gap;
- draw pA withpen penrazor rotated ap scaled gap Cp(nB);
+ elseif LN=bd_:erase draw 0.15[Ls,Le]--0.85[Ls,Le] wpcs 1.5bondgap;
+ draw pA withpen penrazor rotated ap scaled bondgap Cp(nB);
fi
if (sw_numberB>=1)and(n>=numberB_start)and(n<=numberB_end):
if sw_numberB=2: nB:=n-numberB_start+1;
@@ -688,8 +678,8 @@ Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5))
!:='((_mk_bond,_arg_ang)); !0:='(<180,180);
for i=1 upto 20: ![i]:='({{,(_get_len,0),! for j==2 upto i::,! endfor,}}); endfor
Me:='(); Et:=!; Pr:='(!2); Bu:='(!3);
-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
+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
%-------------------------------------------------------------------------------------------------
H :='("H");C:='("C");N:='("N");O:='("O");F:='("F");S:='("S");P:='("P");I:='("I");
Si:='("{Si}");Al:='("{Al}");Mg:='("{Mg}");Zn:='("{Zn}");As:='("{As}");Cu:='("{Cu}");
@@ -715,37 +705,27 @@ def expand_set= save CH,NH,NO,OH,CHO,COOH,CN,SH;
CH3:=C_HHH; NH:=N_H; NH2:=N_HH; NO2:=N_OO; OH:=O_H; CHO:=CO_H; COOH:=CO_OH; CN:=C_N; SH:=S_H;
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-def font_size_set(expr m)(expr n)(expr o)(expr s)=
- for j=0 upto length(s)-1: num_a:=ASCII(pic_c(j,s));
- if f_FON[num_a]=1: atom_w[num_a]:=m*atom_wd; atom_h[num_a]:=n*atom_wd; atom_d[num_a]:=o*atom_wd; fi
- endfor
-enddef;
-def font_size_setup= font_size_set( 1)( 1)(0)("CGHMNOQ");
- font_size_set( .9)( 1)(0)("ABDEFIJKLPRSTUVWXYZ-+/><m");
- font_size_set( .7)( 1)(0)(" ()0123456789nhj=*bdiltf");
- font_size_set( .7)( 1)(.15)("pqg");
- font_size_set( .7)( .8)(0)("acekosuvxzwry");
- font_size_set( .4)( 1)(0)(".,:;'`");
-enddef;
-%------------------------------------------------------------------------------------------------
def SP(expr a,b)expr p=subpath(a*length(p),b*length(p)) of p enddef;
-def vL= withpen penrazor scaled fP enddef; def hL= withpen penrazor rotated 90 scaled fP enddef;
+def vL= withpen penrazor scaled fP enddef;
+def hL= withpen penrazor rotated 90 scaled fP enddef;
def sH expr a= shifted (0,a) enddef;
def PO= z10..(.8aW,fH)..tension 1.5..(.2aW,fH)..z09..(.2aW,hP)..tension 1.5..(.8aW,hP)..cycle
enddef;
def POh= (hP,.25aH)..z19..(fW,.25aH)..(hW,hH)..cycle enddef;
def FD(expr c)(text s)=
if f_FON[ASCII(c)]=1:
- aW:=atom_w[ASCII(c)]*(1-ratio_atomgap_atom*2); aH:=atom_h[ASCII(c)]*(1-ratio_atomgap_atom*2);
+ aW:=atom_w[ASCII(c)]*(1-ratio_atomgap_atom*2);
+ aH:=atom_h[ASCII(c)]*(1-ratio_atomgap_atom*2);
fW:=aW-hP; hW:=.5aW; fH:=aH-hP; hH:=.5aH;
z01=( 0,hP); z02=(hP, 0); z03=(hP,hP); z05=(aW,hP); z07=(fW, 0); z08=( 0,hH); z09=(hP,hH);
z10=(fW,hH); z12=( 0,fH); z13=(hP,fH); z14=(hW,fH); z16=(aW,fH); z18=(hP,aH); z19=(hW,hP);
s;
- atom_font[ASCII(c)]:=currentpicture shifted (ratio_atomgap_atom*atom_wd,ratio_atomgap_atom*atom_wd);
+ atom_font[ASCII(c)]:=
+ currentpicture shifted (ratio_atomgap_atom*atom_wd,ratio_atomgap_atom*atom_wd);
clearxy; save x,y; clearit; fi
enddef;
%-------------------------------------------------------------------------------------------------
-def font_setup=
+def char_font_setup=
pickup pencircle scaled char_pen_wd; fP:=char_pen_wd; hP:=.5char_pen_wd;
FD(" ")();
FD(".")(drawdot z19 wpcs fP);