diff options
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 425 |
1 files changed, 199 insertions, 226 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index 4747e63571f..92631563f66 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.23 Copyright (c) 2013-2017 Akira Yamaji +% mcf2graph ver 4.24 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, @@ -31,19 +31,19 @@ % Set to use plain.mp label,arrow : mpost -s ahlength=3 FILENAME %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% tracingstats:=1; -message " This is mcf2graph ver 4.2 2017.6"; +message " This is mcf2graph ver 4.2 2017.7"; %------------------------------------------------------------------------------------------------- newinternal nA,nB,nC,nD,nE,nF,char_num,str_cnt,sub_usr,sub_int,tbl_cnt; numeric save_para[],comD[][],parD[][],cntD[],tbl_str_wd[],tbl_atom[],tbl_subst[][],tbl_atom_wt[], - tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[],tbl_char_dp[]; -string tbl_atom_str[],strD[],var[],tag[],mp_log_name,aux_delimiter; -picture atom_font[],str_font[],mol_stru[],save_pict; -pen save_pen; + tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[]; +string tbl_atom_str[],strD[],var[],tag[],mp_log_name,aux_delimiter,atomfont, + save_atomfont,save_defaultfont; +picture mol_stru[]; path arrow_path,arrow_head; %------------------------------------------------------------------------------------------------- char_num:=str_cnt:=proc_end:=0; sw_numberA:=sw_numberB:=sw_mol_frame:=sw_auxout:=sw_solid:=sw_expand:=sw_font_frame:=sw_clip:=0; -sw_atom_frame:=sw_report:=sw_MOLout:=sw_subst_off:=sw_bond_single:=sw_auxfix:=0; +sw_atom_frame:=sw_report:=sw_MOLout:=sw_subst_off:=sw_bond_single:=sw_auxfix:=sw_arrow:=0; numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; aux_max:=max_inf_num:=20; aux_delimiter:=";"; var1:="jobname"; tag1:="F"; var2:="char_num"; tag2:="C"; for i=3 upto aux_max: var[i]:=tag[i]:=""; endfor @@ -51,14 +51,17 @@ for i=3 upto aux_max: var[i]:=tag[i]:=""; endfor if (known green)and(known ahlength): f_MP:=1; color color_list[]; + atomfont:=defaultfont:=""; mp_log_name:=jobname&"-info.aux"; - if ahlength=1: proc_end:=1; fi % first molecular only - if ahlength=2: sw_report:=1; def shipit = enddef; fi % report on - if ahlength=3: sw_label:=1; sw_arrow:=1; fi % use metapost label - if ahangle=0: def shipit = enddef; % No image file - elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.1; % PNG format - elseif ahangle=2: outputformat:="svg"; % SVG format - elseif ahangle=3: sw_MOLout:=1; def shipit = enddef; % MDL Molefile on + if ahlength=1: proc_end:=1; % first molecular only + elseif ahlength=2: sw_report:=1; def shipit = enddef; % report on + elseif ahlength=3: sw_arrow:=1; defaultfont:="uhvr8r"; % use mp label + elseif ahlength=5: sw_arrow:=1; defaultfont:=atomfont:="uhvr8r"; % use mp atom,label + fi + if ahangle=0: def shipit = enddef; % No image file + elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.1; % PNG format + elseif ahangle=2: outputformat:="svg"; % SVG format + elseif ahangle=3: sw_MOLout:=1; def shipit = enddef; % MDL Molefile on fi outputtemplate:="%j-%3c."&outputformat; def beginchar(expr a,b,c,d)= beginfig(a) w:=b*pt; h:=c*pt; enddef; @@ -66,8 +69,8 @@ if (known green)and(known ahlength): def printf expr s= write s to mp_log_name enddef; def # = enddef; def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef; - if unknown sw_label: sw_label:=0; fi - if unknown sw_arrow: sw_arrow:=0; fi + if atomfont="": atomfont:="draw"; fi % default atom font + if defaultfont="": defaultfont:="draw"; fi % default label font else: f_MP:=0; string defaultfont; dotlabeldiam:=3bp; @@ -75,9 +78,11 @@ else: f_MP:=0; def color = transform enddef; def printf expr s= message s enddef; %----------------------------------------------------------------------- - sw_label:=sw_arrow:=0; + sw_arrow:=0; dotlabeldiam:=3bp; %----------------------------------------------------------------------- + atomfont:="draw"; + defaultfont:="draw"; mode_setup; fi clearit; @@ -95,16 +100,17 @@ 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:="uhvr8r"; % Helvetica %%%%defaultfont:="ucrr8r"; % Courier %%%%defaultfont:="ucrb8r"; % Courier bold %%%%defaultfont:="utmr8r"; % Times ahangle:=45; ahlength:=4bp; defaultsize:=8bp; -ext_defaultline:=0.5bp; -ext_defaultscale:=defaultscale:=1; +atomfontsize:=8bp; +defaultscale:=1; labeloffset:=3bp; +ext_defaultline:=0.5bp; %================================================================================================== sub_emb_start:=500; % 500 => 2499 for embedded sub structure (max 2000) sub_usr_start:=2500; % 2500 => 2999 for user sub structure (max 500) @@ -120,12 +126,13 @@ def_com(1)(si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,si_,wf_,wb_,bd_); %-------------------------------------------------------------------------------------------------- def parameter_list= sw_report,sw_numberA,sw_numberB,sw_mol_frame,sw_auxout,sw_solid,sw_expand,sw_MOLout, - sw_atom_frame,sw_font_frame,sw_subst_off,sw_bond_single,sw_clip,sw_label,sw_arrow, + 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, 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 + thickness_font_frame,offset_thickness,numberA_start,numberA_end,numberB_start,numberB_end, + atomfontsize,defaultsize,defaultscale,labeloffset enddef; %-------------------------------------------------------------------------------------------------- vardef pic_c(expr i,s)= substring(i,i+1) of s enddef; @@ -139,6 +146,8 @@ def restore_par(text t)= nA:=0; def beginfont(text s)= char_num:=char_num+1; store_par(parameter_list); + save_atomfont:=atomfont; + save_defaultfont:=defaultfont; begingroup save cntA,cntB,cntM,minX,minY,f_beginchar,numS,sftX,sftY,f_ext, posBs,posBe,posA,posM,lineB,sB,eB,angB,angA,lenB,ang_br,info,pT; @@ -174,7 +183,7 @@ def endfont= pT:=(margin_left_right,margin_top_bottom); draw_frame(pT,nA,nB,thickness_font_frame); fi if sw_font_frame=4: draw_corner(w,h,thickness_font_frame); fi - if (sw_auxout=1)or(sw_report=1)or(sw_MOLout=1): proc_calc_out; fi + if ((sw_auxout=1)or(sw_report=1)or(sw_MOLout=1))and(f_MP=1): proc_calc_out; fi for i=1 upto cntM: addto currentpicture also mol_stru[i] shifted posM[0][i]; mol_stru[i]:=nullpicture; endfor @@ -183,6 +192,8 @@ def endfont= clearit; endgroup; restore_par(parameter_list); + atomfont:=save_atomfont; + defaultfont:=save_defaultfont; if proc_end=1: scantokens("bye"); fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -269,18 +280,11 @@ enddef; %------------------------------------------------------------------------------------------------- def FRR(expr a)(expr b)(expr c) = PA(_jp_bond,a) PA(_rot_ang,180) PA(_push,0) PA(_chg_len,c DIV 10) - if b==5:: - PA(_mk_bond,72-((c-9) MUL 1.5)) PA(_mk_bond,72+(c-9)) PA(_mk_bond,72+(c-9)) - elseif b==6:: - PA(_mk_bond,60-(c-8)) - PA(_mk_bond,60+((c-8) DIV 2)) PA(_mk_bond,60+((c-8) DIV 2)) PA(_mk_bond,60+((c-8) DIV 2)) - elseif b==7:: - PA(_mk_bond,(360 DIV 7)-(c-8)) - PA(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) PA(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) - PA(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) PA(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) - elseif b==8:: - PA(_mk_bond,45-(c-8)) PA(_mk_bond,45+((c-8) DIV 3)) PA(_mk_bond,45+((c-8) DIV 3)) - PA(_mk_bond,45+((c-8) DIV 3)) PA(_mk_bond,45+((c-8) DIV 3)) PA(_mk_bond,45+((c-8) DIV 3)) + if b==5:: PA(_mk_bond,72-((c-9) MUL 1.5)) PA(_mk_bond,72+(c-9)) PA(_mk_bond,72+(c-9)) + elseif b==6:: PA(_mk_bond,60-(c-8)) for i==1 upto 3:: PA(_mk_bond,60+((c-8) DIV 2)) endfor + elseif b==7:: PA(_mk_bond,360 DIV 7-(c-8)) + for i==1 upto 4:: PA(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) endfor + elseif b==8:: PA(_mk_bond,45-(c-8)) for i==1 upto 5:: PA(_mk_bond,45+((c-8) DIV 3)) endfor fi PA(_pop,0) if a>=1:: PA(_cyc_eB,0) else:: PA(_cyc_eB,list) fi enddef; @@ -313,13 +317,10 @@ vardef change_atom(text t)(expr e)= sub_int:=sub_int+1; cntD[sub_int]:=0; if known e:: if numeric e:: - if (e>=H)and(e<=U):: - if e==N:: PP(t)(_N) - elseif e==O:: PP(t)(_O) - elseif e==S:: PP(t)(_S) - else:: PX(t)(_chg_atom,e) - fi - elseif e==NH:: PA(_set_clr,1) PP(t)(_N) PX(t)(_postH,H) PA(_set_clr,0) + if (e>=H)and(e<=U):: if e==N:: PP(t)(_N) elseif e==O:: PP(t)(_O) elseif e==S:: PP(t)(_S) + else:: PX(t)(_chg_atom,e) + fi + elseif e==NH:: PA(_set_clr,1) PP(t)(_N) PX(t)(_postH,H) PA(_set_clr,0) elseif e==JP_AT:: PA(_jp_atom,t) fi elseif pair e:: PA(_set_clr,1) PX(t)(xpart(e),ypart(e)) PA(_set_clr,0) @@ -333,11 +334,9 @@ def ext_setup= dotlabeldiam:=3bp; labeloffset:=3bp; em=defaultscale*defaultsize; - currentscale:=defaultscale:=ext_defaultscale; - if sw_label=0: + if (defaultfont="draw")or(f_MP=0): def label = label_emu enddef; def dotlabel = dotlabel_emu enddef; - ext_use_font(defaultscale*defaultsize)(0.12defaultscale*defaultsize); fi if sw_arrow=0: def drawarrow = drawarrow_emu enddef; @@ -347,7 +346,7 @@ enddef; %-------------------------------------------------------------------------------------------------- def EXT(text s)= begingroup - save w,h,wd,ht,n,p,am,em,aw,currentscale; + save w,h,wd,ht,n,p,am,em,aw; pair p[]; ext_setup; w:=font_wd; @@ -364,7 +363,7 @@ enddef; %-------------------------------------------------------------------------------------------------- def ext(text s)= begingroup - save wd,ht,n,l,p,am,em,aw,A,B,Bs,Be,currentscale; + save wd,ht,n,l,p,am,em,aw,A,B,Bs,Be; numeric A[]bra,B[]ang; pair p[],A[],B[],Bs[],Be[]; ext_setup; @@ -385,31 +384,19 @@ def ext(text s)= endgroup; enddef; %================================================================================================== -def ext_use_font(expr WD)(expr PEN)= - save_pict:=currentpicture; clearit; - save_pen:=currentpen; - for i=1 upto 128: f_char[i]:=1; endfor - proc_char_setup(str_font)(WD)(PEN); - currentpicture:=save_pict; - currentpen:=save_pen; -enddef; -%-------------------------------------------------------------------------------------------------- def ext_puts(expr PA)(expr STR)= begingroup - save cp; + save cp,sA; pair cp; + string sA; cp:=PA; - nB:=0; - %---------------------------------------------------------------------------------- + %------------------------------------------------------------------------------------------------ for i=0 upto length(STR)-1: - nA:=ASCII(pic_c(i,STR)); - if nA=ASCII("_"): if nB=0: nB:=-.5; else: nB:=0; fi - elseif nA=ASCII("^"): if nB=0: nB:= .5; else: nB:=0; fi - else: - addto currentpicture also str_font[nA] - shifted (cp+(0,defaultscale*defaultsize*(nB-tbl_char_dp[nA]))); - cp:=cp+(defaultscale*defaultsize*tbl_char_wd[nA],0); - fi + sA:=pic_c(i,STR); + nA:=ASCII(sA); + nB:=defaultscale*defaultsize; + draw_char(sA,cp,nB,0.35*ratio_char_bond*bp,0); + cp:=cp+(nB*tbl_char_wd[nA],0); endfor endgroup; enddef; @@ -418,10 +405,6 @@ vardef label_emu@#(expr STR,POS) = %% modified 'thelabel@#(expr s,z)' of plain.m save oft,fx,fy,wds; pair oft,oft.lft,oft.rt,oft.top,oft.bot,oft.ulft,oft.llft,oft.urt,oft.lrt; wds:=0; - if currentscale<>defaultscale: - ext_use_font(defaultscale*defaultsize)(0.12defaultscale*defaultsize); - currentscale:=defaultscale; - fi for i=0 upto length(STR)-1: wds:=wds+defaultscale*defaultsize*tbl_char_wd[ASCII(pic_c(i,STR))]; endfor @@ -533,7 +516,6 @@ def MCd(expr RW,RH)(expr FW,FH)(text TX)= if bond_len>max_bond_length: bond_len:=max_bond_length; proc_size_setup; proc_skeleton; proc_scaling; fi fi - proc_char_setup(atom_font)(atom_wd)(bond_pen_wd*ratio_char_bond); %----------------------------------------------------------------------------------------------- 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 @@ -558,10 +540,10 @@ def MCd(expr RW,RH)(expr FW,FH)(text TX)= addto mol_stru[cntM] also currentpicture; clearit; endgroup; - %-------------------------------------------------------------------------------------------------- + %----------------------------------------------------------------------------------------------- %%%% message "count of usr ="& decimal(sub_usr) &" "& decimal(sub_usr-sub_usr_start); %%%% message "count of int ="& decimal(sub_int) &" "& decimal(sub_int-sub_int_start); - %-------------------------------------------------------------------------------------------------- + %----------------------------------------------------------------------------------------------- enddef; %------------------------------------------------------------------------------------------------- def ps_put(expr n,p)= @@ -799,15 +781,16 @@ enddef; def draw_atom(expr NUM,POS,ANG,STR,WD)= begingroup save pA,pT,dx; + string sB; pair pA,pT; %---------------------------------------------------------------------------------------------- if ((ANG mod 360)<=90+1)or((ANG mod 360)>=270-1): dx:=1; else: dx:=-1; fi pT:=POS-(0.5atom_wd*dx*WD,0.5atom_wd); nE:=nC:=0; for i=0 upto length(STR)-1: - nB:=ASCII(pic_c(i,STR)); - if dx<0: if nB=par_s:k:=i+1; nC:=1; forever:exitif pic_c(i+(incr nC),STR)="}";endfor fi - if nC>0: nB:=ASCII(pic_c(k+(decr nC),STR)); fi + sB:=pic_c(i,STR); nB:=ASCII(sB); + if dx<0: if nB=par_s: k:=i+1; nC:=1; forever: exitif pic_c(i+(incr nC),STR)="}";endfor fi + if nC>0: sB:=pic_c(k+(decr nC),STR); nB:=ASCII(sB); fi fi if nB=score_u: if nE=0: nE:=-.5; else: nE:=0; fi; elseif nB=hat: if nE=0: nE:= .5; else: nE:=0; fi; @@ -816,9 +799,14 @@ def draw_atom(expr NUM,POS,ANG,STR,WD)= pA:=pT+(0.5*((dx-1)*nA),nE*atom_wd); if sw_atom_frame=1: draw_frame(pA,nA,atom_wd,0.1pt); fi if (sw_numberA>=1)or(sw_numberB>=1): - erase fill unitsquare xscaled nA yscaled atom_wd shifted pA wpcs 0.01pt; fi - addto currentpicture also atom_font[nB] - shifted (pA-(0,atom_wd*tbl_char_dp[nB])) Cp(colorA[NUM]); + erase fill unitsquare xscaled nA yscaled atom_wd shifted pA wpcs 0.01pt; + fi + if (atomfont<>"draw")and(f_MP=1): + addto currentpicture also char(nB) infont atomfont + scaled (atom_wd/atomfontsize) shifted pA Cp(colorA[NUM]); + else: + draw_char(sB,pA,atom_wd,bond_pen_wd*ratio_char_bond,NUM); + fi pT:=pT+(nA*dx,0); fi endfor @@ -915,13 +903,8 @@ def ring expr n= <((-180 DIV n)-90),(_chg_len,0), 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)); -!:=!1:='((_mk_bond,_arg_ang)); -for i=2 upto 20: - ![i]:='(|:,(_get_len,0),! for j==2 upto i::,! endfor,:|); -endfor -!!:='(!,(_mb,db)); -!!!:='(!,(_mb,tm)); -!0:='(<180,180); +!:=!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; 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 @@ -962,135 +945,134 @@ def expand_set= 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 char_size_set(expr a)(expr b)(expr c)(expr s)= +def char_size_set(expr a)(expr b)(expr s)= for j=0 upto length(s)-1: nA:=ASCII(pic_c(j,s)); - tbl_char_wd[nA]:=a; tbl_char_ht[nA]:=b; tbl_char_dp[nA]:=c; + tbl_char_wd[nA]:=a; tbl_char_ht[nA]:=b; endfor enddef; %--------------------------------------------------------------- -char_size_set( 1)( 1)( 0)("CGHMNOQ"); -char_size_set(.9)( 1)( 0)("ABDEFIJKLPRSTUVWXYZ-+/><m"); -char_size_set(.7)( 1)( 0)(" ()0123456789nhj=*bdtf"); -char_size_set(.5)( 1)( 0)("il"); -char_size_set(.7)( 1)(.24)("pqg"); -char_size_set(.7)(.8)( 0)("acekosuvxzwry"); -char_size_set(.4)( 1)( 0)(".,:;'`"); -char_size_set( 0)( 0)( 0)("^_"); +char_size_set( 1)( 1)("CGHMNOQ"); +char_size_set(.9)( 1)("ABDEFIJKLPRSTUVWXYZ-+/><m"); +char_size_set(.7)( 1)(" ()[]0123456789nhj=_bdtfgpq"); +char_size_set(.7)(.7)("*"); +char_size_set(.5)( 1)("il"); +char_size_set(.7)(.8)("acekosuvxzwry"); +char_size_set(.4)( 1)(".,:;'`"); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -def proc_char_setup(suffix FONT)(expr SIZE)(expr PEN_WD)= -begingroup -save Z,aW,aH,fW,hW,hW,hH,fP,hP,vL,hL,PO,POh,sH,FD; -pair Z[]; -%--------------------------------------------------------------- -def FD(expr c)(text s)= - if f_char[ASCII(c)]=1: - fP:=PEN_WD; - hP:=0.5PEN_WD; - aW:=SIZE*tbl_char_wd[ASCII(c)]*(1-ratio_atomgap_atom*2); - aH:=SIZE*tbl_char_ht[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); Z04:=(aW,hP); Z05:=(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); Z20:=(hW,hH); Z06:=(hW,aH); Z07:=(hW, 0); Z11:=(hW,aW); - Z15:=(fW,aH); Z17:=(aW,hH); - pickup pencircle scaled fP; - s; - FONT[ASCII(c)]:= - currentpicture shifted (ratio_atomgap_atom*atom_wd,ratio_atomgap_atom*atom_wd); - clearit; - fi -enddef; -%----------------------------------------------------------------------------------------- -def vL= withpen penrazor scaled fP enddef; -def hL= withpen penrazor rotated 90 scaled fP 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)..Z20..cycle enddef; -def sH expr n= shifted (0,n) enddef; -def SP(expr m,n)expr p=subpath(m*length(p),n*length(p)) of p enddef; -%================================================================================================== -FD(" ")(); -FD(".")(drawdot Z19 wpcs fP); -FD(",")(drawdot Z19 wpcs fP; draw (hW+.5fP,hP)..(hW+.3fP,-fP)..(hW-.5fP,hP-2fP)); -FD("'")(drawdot Z14 wpcs fP; draw (hW+.5fP,fH)..(hW+.3fP,fH-fP)..(hW-.5fP,fH-2fP)); -FD("`")(drawdot (hW,fH-2fP) wpcs fP;draw (hW-.5fP,fH-2fP)..(hW-.3fP,fH-fP)..(hW+.5fP,fH)); -FD(":")(drawdot (hW,.2aH) wpcs fP; drawdot (hW,.8aH) wpcs fP); -FD(";")(drawdot (hW,.2aH) wpcs fP; drawdot (hW,.8aH) wpcs fP;draw (hW+hP,.2aH)..(hW-hP,.2aH-2fP)); -FD("(")(draw Z19...Z09...Z14); -FD(")")(draw Z19...Z10...Z14); -FD(">")(cutdraw Z01--Z17--Z12); -FD("<")(cutdraw Z16--Z08--Z04); -FD("0")(draw Z09...Z14...Z10...Z19...cycle); -FD("1")(draw Z07--Z06--(hW-hP,fH)--(hW-hP,aH-2.5hP) vL); -FD("2")(cutdraw SP(0,.71)(hP,1.3hP)--(fW,.55aH)..Z14..(hP,.5aH)..(hW,.27aH); draw Z04--Z01 hL); -FD("3")(cutdraw SP(0,.77)POh; cutdraw SP(.23,.95)POh sH .5aH-hP; draw (.3aW,hH)--Z20 hL); -FD("4")(draw (0,.3aH)--(aW,.3aH) hL; draw (.7aW,0)--(.7aW,aH)--(1.2hP,.3aH+hP) vL); -FD("5")(draw Z12--Z16 hL; draw Z13--(hP,.49aH) vL; - cutdraw (.5hP,.15aH)..(.65aW,1.3hP)..(fW,.3aH)..(hW,.6aH)..(.6hP,.53aH)); -FD("6")(draw Z19..(fW,.5fW)..(hW,fW)..(hP,.5fW)..cycle; cutdraw (hP,.4aH)--Z06); -FD("7")(draw (0,.fH)--Z16 hL; draw (aW-1.2hP,aH-fP)--(.4aW,0) vL scaled 1.2); -FD("8")(draw POh; draw (hP,.75aH)...Z14...(fW,.75aH)...Z20...cycle;); -FD("9")(draw (Z19..(fW,.5fW)..(hW,fW)..(hP,.5fW)..cycle) sH .32aH; cutdraw (fW,.6aH)--Z07); -FD("A")(draw Z02--Z06--Z05 vL scaled 1.14; draw .33[Z02,Z06]--.33[Z05,Z06]); -FD("B")(draw Z13--Z14{right}..(.9fH,.75aH)..{left}(.5aW,hH)--Z09--(.5aW,hH){right}.. - (.9fH,.25aH)..{left}Z19--Z03; draw Z02--Z18 vL); -FD("C")(cutdraw SP(.05,.95)PO); -FD("D")(draw Z13--Z14..Z10..Z19--Z03; draw Z02--Z18 vL); -FD("E")(draw Z04--Z01 hL;draw Z12--Z16 hL;draw Z08--Z17 hL;draw Z02--Z18 vL); -FD("F")(draw Z12--Z16 hL; draw (0,.45aH)--(fW,.45aH) hL; draw Z02--Z13 vL); -FD("G")(cutdraw SP(.06,.97)PO; draw bot Z20-- bot Z17 hL); -FD("H")(draw Z02--Z18 vL; draw Z09--Z10; draw Z05--Z15 vL); -FD("I")(draw Z19--Z14 vL; draw (hW-fP,hP)--(hW+fP,hP) hL; draw (hW-fP,fH)--(hW+fP,fH) hL); -FD("J")(cutdraw Z09..(hP,.4aH){down}..{right}Z19{right}..{up}(fW,.4aH)..Z15); -FD("K")(cutdraw Z02--Z18; cutdraw .5[.45[Z02,Z18],Z16]--Z05; cutdraw .45[Z02,Z18]--Z16); -FD("L")(draw Z04--Z01 hL; draw Z02--Z18 vL); -FD("M")(draw Z02--Z18 vL; draw Z18--Z19--Z15 vL scaled 1.14; draw Z15--Z05 vL); -FD("N")(draw Z02--Z18 vL; draw Z05--Z15 vL;draw (1.4hP,aH)--(aW-1.4hP,0) vL scaled 1.4); -FD("O")(draw PO); -FD("P")(draw Z02--Z18 vL; draw Z13--(.3aW,fH){right}..(fW,.7aH)..{left}(.3aW,.44aH)..(hP,.44aH)) -FD("Q")(draw PO; draw (.6aW,.4aH)--Z05); -FD("R")(draw Z02--Z18 vL; draw Z13--(.3aW,fH){right}..(fW,.7aH)..{left}(.3aW,.44aH)..(hP,.44aH); - cutdraw Z05{up}..{left}(hW,.44aH)); -FD("S")(cutdraw SP(.05,.45)PO; cutdraw SP(.55,.95)PO; draw (fW,.3aH){up}..{up}(hP,.7aH)); -FD("T")(draw Z12--Z16 hL;draw .5[Z12,Z16]--Z07 vL); -FD("U")(cutdraw Z18..Z09{down}..{right}Z19{right}..{up}Z10..Z15); -FD("V")(draw Z18--Z07--Z15 vL scaled 1.2); -FD("W")(draw Z18--(.25aW,0)--Z06--(.75aW,0)--Z15 vL scaled 1.08); -FD("X")(draw Z18..Z05 vL scaled 1.4; draw Z02..Z15 vL scaled 1.4); -FD("Y")(draw Z18--Z20--Z15 vL scaled 1.2; draw Z20--Z07 vL); -FD("Z")(draw Z12--Z16 hL;draw (1.4hP,fP)--(aW-1.4hP,aH-fP) vL scaled 1.4;draw Z01--Z04 hL); -FD("-")(draw Z09--Z10 hL); -FD("=")(draw (hP,.3aH)--(fW,.3aH) hL;draw (hP,.6aH)--(fW,.6aH) hL); -FD("/")(draw (fW,fH)..Z01); -FD("+")(draw Z19--Z14 vL; draw Z09--Z10 hL); -FD("a")(draw Z19..Z10..Z14..Z09..cycle; draw Z05--Z15 vL); -FD("b")(draw Z19..Z10..Z11..Z09..cycle; draw Z02--(hP,1.2aH) vL); -FD("c")(cutdraw SP(.06,.94)Z10..Z14..Z09..Z19..cycle); -FD("d")(draw Z19..Z10..Z11..Z09..cycle; draw Z05--(fW,1.2aH) vL); -FD("e")(cutdraw SP(0,.92)Z10..Z14..Z09..Z19..cycle; draw Z10--Z09); -FD("f")(cutdraw (.5aW,0)--(.5aW,.75aH){up}..(.75aW,fH)..{down}(fW,.8aH); draw Z08--Z17 hL); -FD("g")(draw (Z19..Z10..Z11..Z09..cycle) sH .3aH; cutdraw Z15--(fW,hP)..(hW,0)..(.1aW,fP)); -FD("h")(draw Z02..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z05; draw (hP,.3aH)--Z18 vL); -FD("i")(draw Z07--(hW,.63aH) vL; draw Z14 wpcs 1.4fP); -FD("j")(draw Z19--(hW,.63aH) vL; draw Z19..(.25aW,-hP)..Z01; draw Z14 wpcs 1.4fP); -FD("k")(draw Z02--Z18 vL; cutdraw .5[.45[Z02,Z18],Z16]--Z05; cutdraw .45[Z02,Z18]--Z16); -FD("l")(draw Z07--Z06 vL; draw Z14--Z13 hL; draw Z19--(fW,hP) hL); -FD("m")(cutdraw Z02..(hP,.3aH){up}..(.28aW,.7fH)..{down}(hW,.3aH)..Z07; - cutdraw (hW,.3aH){up}..(.7aW,.7aH-hP)..{down}(fW,.3aH)..Z05; draw (hP,.3aH)--(hP,.7aH) vL); -FD("n")(cutdraw Z02..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z05; draw (hP,.3aH)--(hP,.7aH) vL); -FD("o")(draw Z19..Z10..Z14..Z09..cycle); -FD("p")(draw (Z19..Z10..Z11..Z09..cycle) sH .3aH; draw (hP,0)--Z18 vL); -FD("q")(draw (Z19..Z10..Z11..Z09..cycle) sH .3aH; draw (fW,0)--Z15 vL); -FD("r")(cutdraw (SP(.35,.72)Z19..Z10..Z14..Z09..cycle) sH -fP; draw Z02--Z18 vL); -FD("s")(cutdraw SP(.05,.45)PO; cutdraw SP(.55,.95)PO; draw (fW,.3aH){up}..{up}(hP,.7aH)); -FD("t")(draw Z07--Z06 vL; draw (0,.66aH)--(aW,.66aH) hL); -FD("u")(cutdraw Z18..(hP,.55aH){down}..Z19..(fW,.55aH){up}..Z15; draw Z15--Z05 vL); -FD("v")(draw Z18--Z07--Z15 vL); -FD("w")(draw Z18--(.25aW,0)--Z06--(.75aW,0)--Z15 vL); -FD("x")(draw Z18--Z05 vL scaled 1.4; draw Z15--Z02 vL scaled 1.4); -FD("y")(draw Z18--Z20 vL scaled 1.4; draw Z15--Z02 vL scaled 1.4); -FD("z")(draw Z12--Z16 hL;draw (1.4hP,fP)--(aW-1.4hP,aH-fP) vL scaled 1.4; draw Z01--Z04 hL); -endgroup +def draw_char(expr c,POS,WD,PEN,NUM)= +save Z,aW,aH,fW,fH,hW,hW,hH,fP,hP,pathO,pathOh,ef,pos,ppcs,sbp,dw,dwh,dwv,cdw; +path pathO,pathOh; +pair Z[],pos; +%------------------------------------------------------------------------------------------------- +let ef=elseif; +def ppcs expr n= pickup pencircle scaled n enddef; +def sbp(expr m,n)expr p=subpath(m*length(p),n*length(p)) of p enddef; +def dw expr p = draw (p) shifted pos Cp(colorA[NUM]) enddef; +def dwv expr p = draw (p) withpen penrazor scaled fP shifted pos Cp(colorA[NUM]) enddef; +def dwvs (expr n)expr p= + draw (p) withpen penrazor scaled fP scaled n shifted pos Cp(colorA[NUM]) enddef; +def dwh expr p=draw (p) withpen penrazor rotated 90 scaled fP shifted pos Cp(colorA[NUM]) enddef; +def cdw expr p=cutdraw (p) shifted pos Cp(colorA[NUM]) enddef; +%------------------------------------------------------------------------------------------------- +fP:=PEN; hP:=0.5fP; +aW:=WD*tbl_char_wd[ASCII(c)]*(1-2ratio_atomgap_atom); +aH:=WD*tbl_char_ht[ASCII(c)]*(1-2ratio_atomgap_atom); +pos:=POS+(WD*ratio_atomgap_atom,WD*ratio_atomgap_atom); +fW:=aW-hP; hW:=.5aW; fH:=aH-hP; hH:=.5aH; +Z01:=( 0,hP); Z02:=(hP, 0); Z03:=(hP,hP); Z04:=(aW,hP); Z05:=(fW, 0); Z06:=(hW,aH); Z07:=(hW, 0); +Z08:=( 0,hH); Z09:=(hP,hH); Z10:=(fW,hH); Z11:=(hW,aW); Z12:=( 0,fH); Z13:=(hP,fH); Z14:=(hW,fH); +Z15:=(fW,aH); Z16:=(aW,fH); Z17:=(aW,hH); Z18:=(hP,aH); Z19:=(hW,hP); Z20:=(hW,hH); Z21:=(fW,hP); +pathO:=Z10..(.8aW,fH)..tension 1.5..(.2aW,fH)..Z09..(.2aW,hP)..tension 1.5..(.8aW,hP)..cycle; +pathOh:=(hP,.25aH)..Z19..(fW,.25aH)..Z20..cycle; +%------------------------------------------------------------------------------------------------- +ppcs fP; +if c="A": dwvs(1.14) Z02--Z06--Z05; dw .33[Z02,Z06]--.33[Z05,Z06]; +ef c="B": dw Z13--Z14{right}..(.9fH,.75aH)..{left}Z20--Z09--Z20{right}..(.9fH,.25aH).. + {left}Z19--Z03; dwv Z02--Z18; +ef c="C": cdw sbp(.05,.95)pathO; +ef c="D": dw Z13--Z14..Z10..Z19--Z03; dwv Z02--Z18; +ef c="E": pickup pensquare scaled fP; dw Z21--Z03--Z13--(fW,fH); dw Z09--Z10; +ef c="F": dwh Z12--Z16; dwh (0,.45aH)--(fW,.45aH); dw Z02--Z13; +ef c="G": cdw sbp(.06,.97)pathO; dwh bot Z20-- bot Z17; +ef c="H": dwv Z02--Z18; dw Z09--Z10; dwv Z05--Z15; +ef c="I": dwv Z19--Z14; dwh (hW-fP,hP)--(hW+fP,hP); dwh (hW-fP,fH)--(hW+fP,fH); +ef c="J": cdw Z09..(hP,.4aH){down}..{right}Z19{right}..{up}(fW,.4aH)..Z15; +ef c="K": cdw Z02--Z18; cdw .5[.45[Z02,Z18],Z16]--Z05; cdw .45[Z02,Z18]--Z16; +ef c="L": dwh Z04--Z01; dwv Z02--Z18; +ef c="M": dwv Z02--Z18; dwvs(1.14) Z18--Z19--Z15; dwv Z15--Z05; +ef c="N": dwv Z02--Z18; dwv Z05--Z15; dwvs(1.4) (1.4hP,aH)--(aW-1.4hP,0); +ef c="O": dw pathO; +ef c="P": dwv Z02--Z18; dw Z13--(.3aW,fH){right}..(fW,.7aH)..{left}(.3aW,.44aH)..(hP,.44aH); +ef c="Q": dw pathO; dw (.6aW,.4aH)--Z05; +ef c="R": dwv Z02--Z18; dw Z13--(.3aW,fH){right}..(fW,.7aH)..{left}(.3aW,.44aH)..(hP,.44aH); + cdw Z05{up}..{left}(hW,.44aH); +ef c="S": cdw sbp(.05,.45)pathO; cdw sbp(.55,.95)pathO; dw (fW,.3aH){up}..{up}(hP,.7aH); +ef c="T": dwh Z12--Z16; dwv .5[Z12,Z16]--Z07; +ef c="U": cdw Z18..Z09{down}..{right}Z19{right}..{up}Z10..Z15; +ef c="V": dwvs(1.2) Z18--Z07--Z15; +ef c="W": dwvs(1.08) Z18--(.25aW,0)--Z06--(.75aW,0)--Z15; +ef c="X": dwvs(1.4) Z18..Z05; dwvs(1.4) Z02..Z15; +ef c="Y": dwvs(1.2) Z18--Z20--Z15; dwv Z20--Z07; +ef c="Z": dwh Z12--Z16; dwvs(1.4) (1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z01--Z04; +ef c="a": dw Z19..Z10..Z14..Z09..cycle; dwv Z05--Z15; +ef c="b": dw Z19..Z10..Z11..Z09..cycle; dwv Z02--(hP,1.2aH) +ef c="c": cdw sbp(.06,.94)Z10..Z14..Z09..Z19..cycle; +ef c="d": dw Z19..Z10..Z11..Z09..cycle; dwv Z05--(fW,1.2aH); +ef c="e": cdw sbp(0,.92)Z10..Z14..Z09..Z19..cycle; dw Z10--Z09; +ef c="f": cdw (hW,0)--(hW,.75aH){up}..(.75aW,fH)..{down}(fW,.8aH); dwh Z08--Z17; +ef c="g": dw Z19..Z10..Z11..Z09..cycle; cdw (Z15--Z21..(hW,0)..(.1aW,fP)) shifted (0,-.3aH); +ef c="h": dw Z02..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z05; dwv (hP,.3aH)--Z18; +ef c="i": dwv Z07--(hW,.63aH); ppcs 1.4fP; dw Z14; +ef c="j": dwv Z19--(hW,.63aH); dw Z19..(.25aW,-hP)..Z01; ppcs 1.4fP; dw Z14; +ef c="k": dwv Z02--Z18; cdw .5[.45[Z02,Z18],Z16]--Z05; cdw .45[Z02,Z18]--Z16; +ef c="l": dwv Z07--Z06; dwh Z14--Z13; dwh Z19--Z21; +ef c="m": cdw Z02..(hP,.3aH){up}..(.28aW,.7fH)..{down}(hW,.3aH)..Z07; + cdw (hW,.3aH){up}..(.7aW,.7aH-hP)..{down}(fW,.3aH)..Z05; dwv (hP,.3aH)--(hP,.7aH); +ef c="n": cdw Z02..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z05; dwv (hP,.3aH)--(hP,.7aH); +ef c="o": dw Z19..Z10..Z14..Z09..cycle; +ef c="p": dw Z19..Z10..Z11..Z09..cycle; dwv (hP,.7aH)--(hP,-.3aH); +ef c="q": dw Z19..Z10..Z11..Z09..cycle; dwv (fW,.7aH)--(fW,-.3aH); +ef c="r": cdw (sbp(.35,.72)Z19..Z10..Z14..Z09..cycle) shifted(0,-fP); dwv Z02--Z18; +ef c="s": cdw sbp(.05,.45)pathO; cdw sbp(.55,.95)pathO; dw (fW,.3aH){up}..{up}(hP,.7aH); +ef c="t": dwv Z07--Z06; dwh (0,.66aH)--(aW,.66aH); +ef c="u": cdw Z18..(hP,.55aH){down}..Z19..(fW,.55aH){up}..Z15; dwv Z15--Z05; +ef c="v": dwv Z18--Z07--Z15; +ef c="w": dwv Z18--(.25aW,0)--Z06--(.75aW,0)--Z15; +ef c="x": dwvs(1.4) Z18--Z05; dwvs(1.4) Z15--Z02; +ef c="y": dwvs(1.4) (Z18--Z20) shifted (0,-.3aH); dwvs(1.4) (Z15--Z02) shifted (0,-.3aH); +ef c="z": dwh Z12--Z16; dwvs(1.4) (1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z01--Z04; +ef c="0": dw Z09...Z14...Z10...Z19...cycle; +ef c="1": dwv Z07--Z06--(hW-hP,fH)--(hW-hP,aH-2.5hP); +ef c="2": cdw sbp(0,.71)(hP,1.3hP)--(fW,.55aH)..Z14..(hP,.5aH)..(hW,.27aH); dwh Z04--Z01; +ef c="3": cdw sbp(0,.77)pathOh; cdw sbp(.23,.95)pathOh shifted (0,.5aH-hP); dwh (.3aW,hH)--Z20; +ef c="4": dwh (0,.3aH)--(aW,.3aH); dwv (.7aW,0)--(.7aW,aH)--(1.2hP,.3aH+hP); +ef c="5": dwh Z12--Z16; dwv Z13--(hP,.49aH); + cdw (.5hP,.15aH)..(.65aW,1.3hP)..(fW,.3aH)..(hW,.6aH)..(.6hP,.53aH); +ef c="6": dw Z19..(fW,.5fW)..(hW,fW)..(hP,.5fW)..cycle; cdw (hP,.4aH)--Z06; +ef c="7": dwh (0,.fH)--Z16; dwvs(1.2) (aW-1.2hP,aH-fP)--(.4aW,0); +ef c="8": dw pathOh; dw (hP,.75aH)...Z14...(fW,.75aH)...Z20...cycle; +ef c="9": dw (Z19..(fW,.5fW)..(hW,fW)..(hP,.5fW)..cycle) shifted (0,.32aH); cdw (fW,.6aH)--Z07; +ef c=" ": +ef c=".": ppcs 1.4fP; dw Z19; +ef c=",": dw (hW+.5fP,hP)..(hW+.3fP,-fP)..(hW-.5fP,hP-2fP); ppcs 1.4fP; dw Z19; +ef c="'": dw (hW+.5fP,fH)..(hW+.3fP,fH-fP)..(hW-.5fP,fH-2fP); ppcs 1.4fP; dw Z14; +ef c="`": dw (hW-.5fP,fH-2fP)..(hW-.3fP,fH-fP)..(hW+.5fP,fH); ppcs 1.4fP; dw (hW,fH-2fP); +ef c=":": ppcs 1.4fP; dw (hW,.2aH); dw (hW,.8aH); +ef c=";": dw (hW+hP,.2aH)..(hW-hP,.2aH-2fP); ppcs 1.4fP; dw (hW,.2aH); dw (hW,.8aH); +ef c="(": dw Z19...Z09...Z14; +ef c=")": dw Z19...Z10...Z14; +ef c="[": dwv Z07--Z06; dwh Z14--(fW,fH); dwh Z19--Z21; +ef c="]": dwv Z07--Z06; dwh Z14--Z13; dwh Z03--Z19; +ef c="<": cdw Z01--Z17--Z12; +ef c=">": cdw Z16--Z08--Z04; +ef c="-": dwh Z09--Z10; +ef c="_": dwh Z03--Z21; +ef c="=": dwh (hP,.3aH)--(fW,.3aH); dwh (hP,.6aH)--(fW,.6aH); +ef c="/": dw (fW,fH)..Z01; +ef c="+": dwv Z19--Z14; dwh Z09--Z10; +ef c="*": dw Z19--Z14; dw Z09--Z10; dw (fW,fH)--Z01; dw Z13--Z21; +else: +fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def blank_str:= " " enddef; @@ -1270,27 +1252,18 @@ def proc_report_out= endfor message "------------------------------------------------------------------"; message "<atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ]"; - if MWp<=40: - cal_MW_str:=cal_MW; - cal_MI_str:=cal_MI; - else: - cal_MW_str:=fdr(10)(MWp)&" * 100"; - cal_MI_str:=fdr(10)(MIp)&" * 100"; + if MWp<=40: cal_MW_str:=cal_MW; cal_MI_str:=cal_MI; + else: cal_MW_str:=fdr(10)(MWp)&" * 100"; cal_MI_str:=fdr(10)(MIp)&" * 100"; fi for i=1 upto tbl_cnt: if sumA[i]>=1: - nA:=tbl_atom_wt[i]/100*sumA[i]; - nB:=tbl_atom_mi[i]/100*sumA[i]; + nA:=tbl_atom_wt[i]/100*sumA[i]; nB:=tbl_atom_mi[i]/100*sumA[i]; message " "& fixed_l(5)(stripP(tbl_atom_str[i]))& - "("&fdr(9)(tbl_atom_wt[i])&")"& - "["&fdr(9)(tbl_atom_mi[i])&"]"& + "("&fdr(9)(tbl_atom_wt[i])&")"&"["&fdr(9)(tbl_atom_mi[i])&"]"& " * "&fdr(4)(sumA[i])&" = " - if nA<40: - &fdr(12)(tbl_atom_wt[i]*sumA[i]) - &"["&fdr(12)(tbl_atom_mi[i]*sumA[i])&"]"; - else: - &fdr(12)(nA)&" * 100"&"["&fdr(12)(nA)&" * 100"&"]"; + if nA<40: &fdr(12)(tbl_atom_wt[i]*sumA[i])&"["&fdr(12)(tbl_atom_mi[i]*sumA[i])&"]"; + else: &fdr(12)(nA)&" * 100"&"["&fdr(12)(nA)&" * 100"&"]"; fi fi endfor |