diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-23 20:41:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-23 20:41:09 +0000 |
commit | ec67d4a883fa66eed59c390c8d893603f2e5bfaa (patch) | |
tree | f82edb844879fb1b32c4c2338d2428ed5cbab24f | |
parent | 601fb902d34846ca8f52ba74851787c8e90ec58c (diff) |
mcf2graph (23jul17)
git-svn-id: svn://tug.org/texlive/trunk@44875 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 236199 -> 236356 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.eps | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf | 59 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 469776 -> 474345 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 23 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 174306 -> 174509 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 94 |
11 files changed, 119 insertions, 80 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG index ace374f67a4..4de23e53dfc 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG +++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG @@ -1,6 +1,15 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2017-07-17 + Changelog of mcf2graph software package by Akira Yamaji 2017-07-23 ******************************************************************************* +[ver. 4.25 / 2017-07-23] + -improve label,arrow emulation + -change variable name + Bs[] => B[]s + Be[] => B[]e + B[]ang => B[]dir + A[]bra => B[]dir + -update MCF syntax manual + [ver. 4.24 / 2017-07-17] -atom font can be changed -update MCF syntax manual diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index 2a6f9d3f4cc..ea893d97259 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/README +++ b/Master/texmf-dist/doc/metapost/mcf2graph/README @@ -1,7 +1,7 @@ ******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST Author : Akira Yamaji - version : 4.24 2017-07-17 + version : 4.25 2017-07-23 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 da7547e107d..b0b17391ec1 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2017.07.17 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2017.07.23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %%% it must be version 4.24 or later +input mcf2graph.mf; %%% it must be version 4.25 or later %------------------------------------------------------------------------- font_wd:=33mm; font_ht:=24mm; diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf Binary files differindex 3faa6d937b8..124f7f52095 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.eps b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.eps index 9856d53f03e..18cc3933692 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.eps +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc-064.eps @@ -2,7 +2,7 @@ %%BoundingBox: -1 -1 212 60 %%HiResBoundingBox: -0.09962 -0.09962 211.90288 59.64348 %%Creator: MetaPost 2.000 -%%CreationDate: 2017.07.10:1950 +%%CreationDate: 2017.07.23:0937 %%Pages: 1 %%DocumentResources: procset mpost-minimal %%+ font NJFVSO-NimbusSanL-Regu ICXWUR-CMR8 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 21e5c047ba9..61053eec416 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf @@ -111,9 +111,25 @@ beginfont("EN:Chain 1") numberB_end:=6; ratio_chain_ring:=1; %---------------------------------------------------------------------- - MCf(<30,-60,60,-90,120,-90,60, - {1^-60,2^60,3^-45,4^30,5^-45,6^60}:/_~dt`.4 + MCf(<15,-30,45,-45,30,-30,60, + {1^-75,2^67.5,3^-60,4^75,5^-75,6^60}:/_~dt ) + ext( + defaultsize:=4bp; + labeloffset:=2bp; + drawarrow .7[B7s,B7e]{dir(B7dir-90)}..{dir(B1dir-90)}.7[B1s,B1e]; + label.ulft("-30",.7[B7s,B7e]); + drawarrow .7[B8s,B8e]{dir(B8dir+90)}..{dir(B2dir+90)}.7[B2s,B2e]; + label.llft("45",.7[B8s,B8e]); + drawarrow .7[B9s,B9e]{dir(B9dir-90)}..{dir(B3dir-90)}.7[B3s,B3e]; + label.ulft("-45",.7[B9s,B9e]); + drawarrow .7[B10s,B10e]{dir(B10dir+90)}..{dir(B4dir+90)}.7[B4s,B4e]; + label.llft("30",.7[B10s,B10e]); + drawarrow .7[B11s,B11e]{dir(B11dir-90)}..{dir(B5dir-90)}.7[B5s,B5e]; + label.ulft("-30",.7[B11s,B11e]); + drawarrow .7[B12s,B12e]{dir(B12dir+90)}..{dir(B6dir+90)}.7[B6s,B6e]; + label.llft("60",.7[B12s,B12e]); + ) endfont %*********************************************************************** beginfont("EN:Chain 2") @@ -123,8 +139,24 @@ beginfont("EN:Chain 2") ratio_chain_ring:=1; %---------------------------------------------------------------------- MCf(<30,!6, - {1^-60,2^60,3^-60,4^60,5^-60,6^60}:/_~dt`.6 + {1^-60,2^60,3^-60,4^60,5^-60,6^60}:/_~dt ) + ext( + defaultsize:=4bp; + labeloffset:=2bp; + drawarrow .7[B7s,B7e]{dir(B7dir-90)}..{dir(B1dir-90)}.7[B1s,B1e]; + label.ulft("-60",.7[B7s,B7e]); + drawarrow .7[B8s,B8e]{dir(B8dir+90)}..{dir(B2dir+90)}.7[B2s,B2e]; + label.llft("60",.7[B8s,B8e]); + drawarrow .7[B9s,B9e]{dir(B7dir-90)}..{dir(B3dir-90)}.7[B3s,B3e]; + label.ulft("-60",.7[B9s,B9e]); + drawarrow .7[B10s,B10e]{dir(B10dir+90)}..{dir(B4dir+90)}.7[B4s,B4e]; + label.llft("60",.7[B10s,B10e]); + drawarrow .7[B11s,B11e]{dir(B11dir-90)}..{dir(B5dir-90)}.7[B5s,B5e]; + label.ulft("-60",.7[B11s,B11e]); + drawarrow .7[B12s,B12e]{dir(B12dir+90)}..{dir(B6dir+90)}.7[B6s,B6e]; + label.llft("60",.7[B12s,B12e]); + ) endfont %*********************************************************************** beginfont("EN:Jump and Branch") @@ -176,7 +208,7 @@ beginfont("EN:Connect atom") sw_numberA:=1; ratio_chain_ring:=1; %---------------------------------------------------------------------- - MCf(<30,!6,3:\,!,&5) + MCf(<30,!6,3:\,!,&5~bd) endfont %*********************************************************************** beginfont("EN:ring") @@ -193,8 +225,18 @@ beginfont("EN:rotate 1") margin_top_bottom:=3mm; sw_clip:=1; sw_numberB:=1; + ratio_chain_ring:=1; numberB_end:=5; - MCf(``1,0,0,<90,0,<-90,0,0,{1,2,3,4,5}=vf,{3,4^180}:/_~dt`.5) + defaultsize:=4bp; + labeloffset:=2bp; + MCf(``1,0,0,<90,0,<-90,0,0,{1,2,3,4,5}=vf, + {3,4^180}:/_~dt) + ext( + drawarrow .7[B6s,B6e]{dir(B6dir+90)}..{dir(B3dir+90)}.7[B3s,B3e]; + label.urt("90",.7[B6s,B6e]); + drawarrow .7[B7s,B7e]{dir(B7dir-90)}..{dir(B4dir-90)}.7[B4s,B4e]; + label.urt("-90",.7[B7s,B7e]); + ) endfont %*********************************************************************** beginfont("EN:change bond 1") @@ -935,9 +977,9 @@ beginfont("EN:ext()") font_ht:=20mm; MCd(1,0.7)(0,0.5)(<30,?6,3=dl,4:/CH3) ext( - B7:=0.37[Bs7,Be7]; label.top("+",A7); - drawarrow B3{dir 0}..{dir 150}B7; + drawarrow B3{dir(B3dir-90)}.. + {dir(B7dir+90)}0.4[B7s,B7e]; ) MCd(1,0.7)(1,0.5)(<30,?6,4://CH3) ext( @@ -1090,3 +1132,6 @@ bye %%%% bye ye + +ye + diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf Binary files differindex e3118dfadd2..8ae541b17f1 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex index fa6407cebaf..fc91c42fec3 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex @@ -1,7 +1,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2017.07.17 +% Molecular Coding Format manual by Akira Yamaji 2017.07.23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} +%%%%\documentclass[a4paper,twoside]{article} %%%%\usepackage{graphicx} \usepackage[dvipdfm]{graphicx} %%%%\usepackage[pdftex]{graphicx} @@ -13,6 +14,8 @@ \textheight=254mm \textwidth=168mm \oddsidemargin=0mm +%%%%\oddsidemargin=7mm +%%%%\evensidemargin=-7mm \unitlength=1mm% \makeatletter %---------------------------------------------------------------------------- @@ -95,7 +98,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\ real number plus (+): anticlockwize real number minus(-): clockwize - <30,-60,60,-90,120,-90,60 + <15,-30,45,-45,30,-30,60 \end{verbatim} \MCFstructure %----------------------------------------------------------------------------- @@ -152,7 +155,7 @@ pk font,PNG,SVG,EPS or MDL MOL file(V2000).\\ \begin{verbatim} &n : Connect to An - <30,!6,3:\,!,&5 + <30,!6,3:\,!,&5~bd \end{verbatim} \MCFstructure %----------------------------------------------------------------------------- @@ -1092,12 +1095,12 @@ endfont l: bond length An: atom number A[m]: atom position - A[m]bra: branch angle of A[m] + A[m]dir: branch direction of A[m] Bn: bond number - B[m]: bond position(0.5[Bs[m],Be[m]]) - Bs[m]: bond start position - Be[m]: bond end position - B[m]ang: bond angle + B[m]s: bond start position + B[m]e: bond end position + B[m]: bond position(0.5[B[m]s,B[m]e]) + B[m]dir: bond direction %---------------------------------------- beginfont() @@ -1107,8 +1110,8 @@ beginfont() MCd(1,0.7)(0,0.5)(<30,?6,3=dl,4:/CH3) ext( label.top("+",A7); - B7:=0.37[Bs7,Be7]; - drawarrow B3{dir 0}..{dir 150}B7; + drawarrow B3{dir(B3dir-90)}.. + {dir(B7dir+90)}0.4[B7s,B7e]; ) %--------------------------------------- MCd(1,0.7)(1,0.5)(<30,?6,4://CH3) diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf Binary files differindex 4ad2bfe7c90..c7194b93da4 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf 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 5888f7073a0..108a88466ae 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 2017.07.17 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2017.07.23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% mcf2graph.mf it must be version 4.24 or later +%%% mcf2graph.mf it must be version 4.25 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 92631563f66..48c2b301b3a 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.24 Copyright (c) 2013-2017 Akira Yamaji +% mcf2graph ver 4.25 Copyright (c) 2013-2017 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, @@ -100,10 +100,6 @@ offset_atom:=0.8pt; offset_wedge:=0.4pt; thickness_font_frame:=0 max_bond_length:=10mm; bond_len:=8mm; font_wd:=30mm; font_ht:=20mm; %================================================================================================== -%%%%defaultfont:="uhvr8r"; % Helvetica -%%%%defaultfont:="ucrr8r"; % Courier -%%%%defaultfont:="ucrb8r"; % Courier bold -%%%%defaultfont:="utmr8r"; % Times ahangle:=45; ahlength:=4bp; defaultsize:=8bp; @@ -129,7 +125,7 @@ def parameter_list= sw_atom_frame,sw_font_frame,sw_subst_off,sw_bond_single,sw_clip,sw_arrow, margin_left_right,margin_top_bottom,ratio_atom_bond,ratio_thickness_bond,ratio_char_bond, ratio_chain_ring,ratio_bondgap_bond,ratio_zebra_black,ratio_zebragap_bond, - ratio_wedge_bond,ratio_atomgap_atom,ratio_bond_width,font_wd,font_ht,labeloffset, + ratio_wedge_bond,ratio_atomgap_atom,ratio_bond_width,font_wd,font_ht, 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, atomfontsize,defaultsize,defaultscale,labeloffset @@ -335,52 +331,45 @@ def ext_setup= labeloffset:=3bp; em=defaultscale*defaultsize; if (defaultfont="draw")or(f_MP=0): + save label,dotlabel; def label = label_emu enddef; def dotlabel = dotlabel_emu enddef; fi - if sw_arrow=0: + if (sw_arrow=0)or(f_MP=0): + save drawarrow,drawdblarrow; def drawarrow = drawarrow_emu enddef; def drawdblarrow = drawdblarrow_emu enddef; fi enddef; %-------------------------------------------------------------------------------------------------- -def EXT(text s)= +def EXT(text TXT)= begingroup save w,h,wd,ht,n,p,am,em,aw; pair p[]; ext_setup; - w:=font_wd; - h:=font_ht; - wd:=w-2margin_left_right; - ht:=h-2margin_top_bottom; + w:=font_wd; h:=font_ht; + wd:=w-2margin_left_right; ht:=h-2margin_top_bottom; p0:=(margin_left_right,margin_top_bottom); aw:=atom_wd; n:=cntM; for i=1 upto n: p[i]:=posM[1][i]; endfor - s addto mol_stru[0] also currentpicture; clearit; f_ext:=1; + TXT addto mol_stru[0] also currentpicture; clearit; f_ext:=1; endgroup; enddef; %-------------------------------------------------------------------------------------------------- -def ext(text s)= +def ext(text TXT)= begingroup - save wd,ht,n,l,p,am,em,aw,A,B,Bs,Be; - numeric A[]bra,B[]ang; - pair p[],A[],B[],Bs[],Be[]; + save wd,ht,n,l,p,am,em,aw,A,B; + numeric A[]dir,B[]dir; + pair p[],A[],B[],B[]s,B[]e; ext_setup; - wd:=mol_wd; - ht:=mol_ht; - l:=bond_len; - aw:=atom_wd; - p0:=(minX,minY); - An:=cntA; - Bn:=cntB; - for i=1 upto An: A[i]:=posA[i]; A[i]bra:=ang_br[i]; endfor + wd:=mol_wd; ht:=mol_ht; l:=bond_len; aw:=atom_wd; + p0:=(minX,minY); An:=cntA; Bn:=cntB; + for i=1 upto An: A[i]:=posA[i]; A[i]dir:=ang_br[i]; endfor for i=1 upto Bn: - Bs[i]:=posA[sB[i]]; Be[i]:=posA[eB[i]]; - B[i]:=0.5[Bs[i],Be[i]]; - B[i]ang:=angB[i]; + B[i]s:=posA[sB[i]]; B[i]e:=posA[eB[i]]; B[i]:=0.5[B[i]s,B[i]e]; B[i]dir:=angB[i]; endfor - s addto mol_stru[cntM] also currentpicture; clearit; + TXT addto mol_stru[cntM] also currentpicture; clearit; endgroup; enddef; %================================================================================================== @@ -747,7 +736,7 @@ def add_bond(expr m)= if f_end=0: if lenB[cntB+1]=_size_a: posBe:=sfB(posBs,atom_wd,angT); else: - nA:=lenB[cntB+1];glu:=0; if nA<0: nA:=-nA; glu_c(adrT); glu_c(cntA+1); fi + nA:=lenB[cntB+1]; glu:=0; if nA<0: nA:=-nA; glu_c(adrT); glu_c(cntA+1); fi posBe:=sfB(posBs,nA*bond_len+glu,angT); fi posA[cntA+1]:=posBe; f_term:=0; @@ -841,7 +830,11 @@ def draw_bond(expr NN,BP,EP,ANG,LN)= 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=wv:nB:=3bond_pen_wd; nA:=nB/length(Le-Ls); + draw Le for i=1 upto 1/nA: + if odd(i): ..controls(((i-.5)*nA)[sfB(Le,nB,ap),sfB(Ls,nB,ap)]) + else: ..controls(((i-.5)*nA)[sfB(Le,nB,am),sfB(Ls,nB,am)]) fi + ..(i*nA)[Le,Ls] endfor ..Ls; 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 0.8bondgap; draw pA Cp(nB); @@ -862,11 +855,6 @@ def draw_bond(expr NN,BP,EP,ANG,LN)= fi endgroup enddef; -%------------------------------------------------------------------------------------------------- -def draw_wv= nB:=3bond_pen_wd; nA:=nB/length(Le-Ls); - draw Le for i=1 upto 1/nA: if odd(i): ..controls(((i-.5)*nA)[sfB(Le,nB,ap),sfB(Ls,nB,ap)]) - else: ..controls(((i-.5)*nA)[sfB(Le,nB,am),sfB(Ls,nB,am)]) fi ..(i*nA)[Le,Ls] endfor ..Ls; -enddef; %------------------------------------------------------------------------------------------------ def wpcs expr n= withpen pencircle scaled n enddef; def wpss expr n= withpen pensquare scaled n enddef; @@ -901,8 +889,7 @@ lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr); def ring expr n= <((-180 DIV n)-90),(_chg_len,0), for i==2 upto n:: ,(360 DIV n) endfor,(_cyc_sB,1-n) enddef; for i=3 upto 20: ?[i]:='(|:,ring i,:|); endfor -Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6)); -Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5)); +Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5)); !:=!1:='((_mk_bond,_arg_ang)); !!:='(!,(_mb,db)); !!!:='(!,(_mb,tm)); !0:='(<180,180); for i=2 upto 20: ![i]:='(|:,(_get_len,0),! for j==2 upto i::,! endfor,:|); endfor Me:='(); Et:=!; Pr:=!2; Bu:=!3; @@ -1114,30 +1101,18 @@ STa("F" ,18.9984, 18.99840316273); STa("{Fe}",55.845, 55.93493633); STa("{Hg}",200.59, 201.97064340); STa("I" ,126.90447,126.9044719); STa("K" ,39.0983, 38.9637064864); STa("{Li}",6.941, 7.0160034366); STa("{Mg}",24.305, 23.985041697); STa("{Mn}",54.938044, 54.93804391); -STa("N" ,14.0067, 14.00307400443); STa("{Na}",22.98977, 22.9897692820); -STa("{Ni}",58.693, 57.93534241); STa("O" ,15.9994, 15.99491461957); -STa("P" ,30.973762, 30.97376199842); STa("S" ,32.065, 31.9720711744); -STa("{Se}",78.971, 79.9165218); STa("{Si}",28.0855, 27.97692653465); +STa("N" ,14.0067, 14.00307400443); STa("{Na}",22.98977, 22.9897692820); +STa("{Ni}",58.693, 57.93534241); STa("O" ,15.9994, 15.99491461957); +STa("P" ,30.973762, 30.97376199842); STa("S" ,32.065, 31.9720711744); +STa("{Se}",78.971, 79.9165218); STa("{Si}",28.0855, 27.97692653465); STa("{Sn}",118.71, 119.90220163); STa("{Ti}",47.867, 47.94794198); STa("{Zn}",65.409, 63.92914201); %-------------------------------------------------------------------------------------------------- STb("{H_2_}")("H","H"); STb("OH")("O","H"); STb("O{Na}")("O","{Na}"); STb("CN")("C","N"); STb("SH")("S","H"); 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("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 proc_get_info= - for j=1 upto inf_num: - nA:=0; for i=0 upto length(info[j]): if pic_c(i,info[j])=":": nA:=i; fi exitif nA>0; endfor - if nA>0: - s_tag:=substring (0,nA) of info[j]; - s_var:=substring (nA+1,length(info[j])) of info[j]; - if known scantokens("inf_"&s_tag): scantokens("inf_"&s_tag):=s_var; fi - fi - endfor -enddef; -%================================================================================================== def proc_calc_out= begingroup save warning_cnt,cal_MW,MWp,knownA,cal_FM,bondC,tmp_wtp,bond_cnt,cnt_hide_H, @@ -1148,7 +1123,14 @@ def proc_calc_out= inf_NO:=inf_EN:=inf_JN:=inf_FM:=inf_CAS:=inf_USE:=inf_EXA:=inf_EXB:=inf_MW:=""; cal_MW:=cal_MW_str:=cal_FM:=""; cnt_hide_H:=warning_cnt:=MW_num:=MI_num:=MWp:=0; %------------------------------------------------------------------------------------------ - proc_get_info; + for j=1 upto inf_num: + nA:=0; for i=0 upto length(info[j]): if pic_c(i,info[j])=":": nA:=i; fi exitif nA>0; endfor + if nA>0: + s_tag:=substring (0,nA) of info[j]; + s_var:=substring (nA+1,length(info[j])) of info[j]; + if known scantokens("inf_"&s_tag): scantokens("inf_"&s_tag):=s_var; fi + fi + endfor for i=1 upto tbl_cnt: sumA[i]:=0; endfor for i=1 upto cntA: knownA:=bond_cnt:=0; |