diff options
Diffstat (limited to 'Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex')
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex index 01d25e170ce..71ac080b102 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 2022.03.13 +% Molecular Coding Format manual by Akira Yamaji 2022.03.27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[pdftex]{graphicx} @@ -1093,8 +1093,8 @@ endfor \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsection{Function check()} -\index{check()}% +\subsection{Function mc\_check()} +\index{mc\_check()}% \begin{verbatim} (immediately compile) @@ -1104,17 +1104,17 @@ endfigm (check mcf and compile) -** check(mc) : error count +** mc_check(mc) : error count beginfigm("EN:Pyridine", ":<30,Ph,}2:N") % ** extra '}' - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{verbatim} \MCFgraph\hspace{22mm}\MCFgraph \begin{verbatim} -check(mc)=0 check(mc)>=1 +mc_check(mc)=0 mc_check(mc)>=1 \end{verbatim} %=============================================================================== \newpage @@ -1382,13 +1382,13 @@ endfigm \section{MCF example} %----------------------------------------------------------------------------- \subsection{Luciferin} -\index{check()}% +\index{mc\_check()}% \begin{verbatim} (use library file 'mcf_library') beginfigm("f:mcf_library", "t:EN","v:Luciferin") fsize:=(50mm,15mm); - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{verbatim} \MCFgraph @@ -1402,7 +1402,7 @@ beginfigm("EN:Colchicine","MW:385.41", ": @9,\,NH,!,//O,! ") %------------------------------------- fsize:=(50mm,20mm); - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{verbatim} \MCFgraph @@ -1424,7 +1424,7 @@ beginfigm("EN:Paclitaxel","MW:853.91", ": @12,\*^-15,O,60,//O,-60 ") %------------------------------------ fsize:=(50mm,25mm); - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{verbatim} \MCFgraph @@ -1450,7 +1450,7 @@ beginfigm("EN:Maltose","MW:342.3", ": 6^$90:/!OH ") %----------------------------------------- fsize:=(50mm,20mm); - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{verbatim} \MCFgraph @@ -1476,7 +1476,7 @@ beginfigm("EN:Cellobiose","MW:342.3", ": 6^$90:/!OH ") %----------------------------------------- fsize:=(50mm,20mm); - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{verbatim} \MCFgraph @@ -1516,29 +1516,29 @@ beginfigm("EN:Cholesterol","MW:386.65", >information ": {4,12}:*/_^60, ", > mc3 ": @-1,18,/*_,-60,!3,?! ") > mc4 %---------------------------------------- > - if check(mc)=0: MC(scantokens(mc)) fi > mc=mc1 - mc4 + if mc_check(mc)=0: MC(scantokens(mc)) fi > mc=mc1 - mc4 endfigm > %------------------------------------------------------------------------------ beginfigm("f:mcf_library.mcf","t:EN","v:Adenine") > from mcf_library.mcf - if check(mc)=0: MC(scantokens(mc)) fi > select EN="Adenine" + if mc_check(mc)=0: MC(scantokens(mc)) fi > select EN="Adenine" endfigm > %------------------------------------------------------------------------------ beginfigm("t:EN","v:Guanine") > select EN="Guanine" - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm %------------------------------------------------------------------------------ beginfigm("t:EN","v:Cytosine") > select EN="Cytosine" - if check(mc)=0: MC(scantokens(mc)) fi > + if mc_check(mc)=0: MC(scantokens(mc)) fi > endfigm > %------------------------------------------------------------------------------ beginfigm("t:n","v+:4") > v+:4 = select No.4 - if check(mc)=0: MC(scantokens(mc)) fi > keep file open + if mc_check(mc)=0: MC(scantokens(mc)) fi > keep file open endfigm > %------------------------------------------------------------------------------ forever: %%%%%%%%%% beginfigm("f:mcf_library","v+:*") > select all beginfigm("f:mcf_library","t:EXA","v+:1") > 'v+:1'= select EXA=1 - if f_EOF=0: if check(mc)=0: MC(scantokens(mc)) fi fi > keep file open + if f_EOF=0: if mc_check(mc)=0: MC(scantokens(mc)) fi fi > keep file open endfigm > exitif f_EOF=1; > exit if file end endfor @@ -1609,12 +1609,12 @@ Cat:biological;EN:Stearic acid;MW:284.48 %------------------------------------------------------------------------------ \noindent% \newpage -\subsection{Function query()} -\index{query()}% +\subsection{Function mc\_query()} +\index{mc\_query()}% \paragraph{(Example)} \begin{verbatim} %-------------------------------------------------------------- -% query() +% mc_query() % % "f:filename" : input file name (default "mcf_library.mcf") % "o:filename" : output file name (default "temp.mcf") @@ -1626,13 +1626,11 @@ Cat:biological;EN:Stearic acid;MW:284.48 % filter 2 : MW>=285 % filter 3 : MW<=295 %-------------------------------------------------------------- -query("s:EN", -%%%%% "f:mcf_library.mcf","o:temp.mcf","s:EN", - "Cat=biological","MW>=285","MW<=295"); +mc_query("s:EN","Cat=biological","MW>=285","MW<=295"); %-------------------------------------------------------------- forever: beginfigm("f:temp","v+:*") % use file temp.mcf / select all - if f_EOF=0: if check(mc)=0: MC(scantokens(mc)) fi fi + if f_EOF=0: if mc_check(mc)=0: MC(scantokens(mc)) fi fi endfigm exitif f_EOF=1; endfor @@ -1952,7 +1950,7 @@ M END ": {1^60,5^180,16^60}:/*H, ", ": @14,\*,|,?5,{1,4}=dl,3:O ") %---------------------------------------- - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{mplibcode}\\ %-------------------------------------------------------------------- @@ -1965,7 +1963,7 @@ M END ": {3,7,12,16}:/_, ", ": |,?6,6=dl,{6,2^35,2^-35}:/_ ") %------------------------------------------ - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm \end{mplibcode}\\ %-------------------------------------------------------------------- @@ -1979,7 +1977,7 @@ M END ": 2:/COOH,7://_,13:*/OH,8:/*OH, ", ": 14:*/_,{1^60,4^60}:*/H ") %------------------------------------ - if check(mc)=0: MC(scantokens(mc)) fi + if mc_check(mc)=0: MC(scantokens(mc)) fi endfigm; %-------------------------------------------------------------------- \end{mplibcode}\\ |