diff options
Diffstat (limited to 'graphics/mcf2graph')
-rw-r--r-- | graphics/mcf2graph/CHANGELOG | 7 | ||||
-rw-r--r-- | graphics/mcf2graph/README | 26 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf2graph.mp | 336 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_exa_code.pdf | bin | 79140 -> 78730 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_exa_code.tex | 6 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_exa_soc.mp | 6 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_example.pdf | bin | 431296 -> 434560 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_example.tex | 4 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_library.mcf | 29 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_man_soc.mp | 6 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_manual.pdf | bin | 289251 -> 289201 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_manual.tex | 54 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_mplib_exa.pdf | bin | 196130 -> 195721 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_mplib_exa.tex | 4 |
14 files changed, 211 insertions, 267 deletions
diff --git a/graphics/mcf2graph/CHANGELOG b/graphics/mcf2graph/CHANGELOG index aefa94b116..00015d74f5 100644 --- a/graphics/mcf2graph/CHANGELOG +++ b/graphics/mcf2graph/CHANGELOG @@ -1,6 +1,11 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2022-03-27 + Changelog of mcf2graph software package by Akira Yamaji 2022-05-08 ******************************************************************************* +[ver. 4.84 / 2022-05-08] + -fix bug in atom drawing + -improve report output + -update mcf_library.mcf + [ver. 4.83 / 2022-03-27] -fix bug in bond check -change fuction name diff --git a/graphics/mcf2graph/README b/graphics/mcf2graph/README index 61465c30aa..d14681dc17 100644 --- a/graphics/mcf2graph/README +++ b/graphics/mcf2graph/README @@ -1,7 +1,7 @@ ******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with MetaPost Author : Akira Yamaji - version : 4.83 2022-03-27 + version : 4.84 2022-05-08 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** @@ -34,21 +34,21 @@ 3. How to use mcf2graph with MetaPost Minimum requirement to use mcf2graph : mpost.exe,mpost.dll,mpost.mp,plain.mp - ( 1) >mpost FILENAME => output eps(.mps) file - ( 2) >mpost -s ahangle=1 FILENAME => output png file (600dpi) - ( 3) >mpost -s ahangle=11 FILENAME => output png file (1200dpi) - ( 4) >mpost -s ahangle=2 FILENAME => output svg file - ( 5) >mpost -s ahangle=3 FILENAME => output eps(.eps) file - ( 6) >mpost -s ahlength=1 FILENAME => output information-aux file(for tex) - ( 7) >mpost -s ahlength=2 FILENAME => output information-aux file + ( 1) >mpost filename => output eps(.mps) file + ( 2) >mpost -s ahangle=1 filename => output png file (600dpi) + ( 3) >mpost -s ahangle=11 filename => output png file (1200dpi) + ( 4) >mpost -s ahangle=2 filename => output svg file + ( 5) >mpost -s ahangle=3 filename => output eps(.eps) file + ( 6) >mpost -s ahlength=1 filename => output information-aux file(for tex) + ( 7) >mpost -s ahlength=2 filename => output information-aux file (for spread sheet) - ( 8) >mpost -s ahlength=3 FILENAME => output library-aux file - ( 9) >mpost -s ahlength=5 FILENAME => output mol file(V2000) - (10) >mpost -s ahlength=6 FILENAME => output mol file(V3000) - (11) >mpost -s ahlength=7 FILENAME => output report file + ( 8) >mpost -s ahlength=3 filename => output library-aux file + ( 9) >mpost -s ahlength=5 filename => output mol file(V2000) + (10) >mpost -s ahlength=6 filename => output mol file(V3000) + (11) >mpost -s ahlength=7 filename => output report file 4. License - mcf2graph ver 4.83 Copyright (c) 2013-2022 Akira Yamaji + mcf2graph ver 4.84 Copyright (c) 2013-2022 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 diff --git a/graphics/mcf2graph/mcf2graph.mp b/graphics/mcf2graph/mcf2graph.mp index 10c14d4cec..75ae74cf07 100644 --- a/graphics/mcf2graph/mcf2graph.mp +++ b/graphics/mcf2graph/mcf2graph.mp @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.83 Copyright (c) 2013-2022 Akira Yamaji +% mcf2graph ver 4.84 Copyright (c) 2013-2022 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, @@ -33,7 +33,7 @@ % Set output MOL file (V3000) : mpost -s ahlength=6 FILENAME % Set output report : mpost -s ahlength=7 FILENAME %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -message "* This is mcf2graph ver 4.83 2022.03.27"; +message "* This is mcf2graph ver 4.84 2022.05.08"; tracingstats:=1; prologues:=3; warningcheck:=0; %------------------------------------------------------------------------------------------------- numeric save_num[],parts_com[][],parts_par[][],parts_cnt[],tbl_atom[],tbl_group[][],tbl_atom_wt[], @@ -157,23 +157,19 @@ def parameter_list= lonepairspace,offset_atom,offset_wedge,max_blength,offset_hash_gap,offset_bond_gap, thickness_frame,offset_thickness,numbering_start,numbering_end,defaultsize,defaultscale, labeloffset,mangle,blength,fsize,fmargin,msize,mposition,defaultfont,atomfont,dottedline_gap, - Me,Et,CH3,NH,NH2,NO,NO2,OH,CHO,COOH,CN,SH,!CH3,!NH2,!NO2,!OH,!CHO,!COOH,!CN,!SH -enddef; + Me,Et,CH3,NH,NH2,NO,NO2,OH,CHO,COOH,CN,SH,!CH3,!NH2,!NO2,!OH,!CHO,!COOH,!CN,!SH enddef; %-------------------------------------------------------------------------------------------------- def init_par(text t)= nA:=nB:=nC:=0; for list=t: if numeric list: save_num[incr nA]:=list; ef pair list: save_pair[incr nB]:=list; - ef string list: save_str[incr nC]:=list; fi - endfor -enddef; + ef string list: save_str[incr nC]:=list; fi endfor enddef; %-------------------------------------------------------------------------------------------------- def store_par(text t)= nA:=nB:=nC:=0; for list=t: if numeric list: if save_num[incr nA]<>list: save_num[nA]:=list; fi ef pair list: if save_pair[incr nB]<>list: save_pair[nB]:=list; fi - ef string list: if save_str[incr nC]<>list: save_str[nC]:=list; fi fi - endfor + ef string list: if save_str[incr nC]<>list: save_str[nC]:=list; fi fi endfor enddef; %-------------------------------------------------------------------------------------------------- def restore_par(text t)= @@ -191,12 +187,12 @@ def beginfigm(text s)= hideH,lineB,sB,eB,angB,angA,lenB,angX,numS,sumA,bond_num,wdM,htM,chargeA,addA,add_rot, file_input,file_output,cal_FM,cal_MW,cal_MI,inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS, inf_USE,inf_EXA,inf_EXB,inf_MW,mol_pic,sC,sI,sS,sT,sV,color_list,unit_cnt,f_end,semic_cnt, - f_match,var_n,tag_a,var_a,at_semic,at_comma; + f_match,var_n,tag_a,var_a,at_char,arg_s; numeric mc_indent[],hideH[],lineB[],sB[],eB[],angB[],angA[],lenB[],angX[],strA[],sumA[], - bond_num[],wdM[],htM[],chargeA[],addA[],add_rot[],at_semic[],at_comma[]; + bond_num[],wdM[],htM[],chargeA[],addA[],add_rot[],at_char[]; pair posA[],posM[][]; - string info_s[],mc[],tag_a[],var_a[],mc,filter_s,file_input,file_output,cal_FM,cal_MW,cal_MI, - inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW, + string info_s[],mc[],tag_a[],var_a[],arg_s[],mc,filter_s,file_input,file_output,cal_FM,cal_MW, + cal_MI,inf_Cat,inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW, sC,sI,sS,sT,sV; picture mol_pic[]; color color_list[]; @@ -209,7 +205,7 @@ def beginfigm(text s)= mc:=temps:=cal_MW:=cal_MI:=cal_FM:=filter_s:=""; file_input:=default_library; %------------------------------------------------------------------------------------------------ parts_num:=parts_usr_start; parts_int:=parts_int_start; - fig_num:=fig_num+1; f_ext:=cntM:=mc_row:=info_cnt:=f_EOF:=0; + fig_num:=fig_num+1; f_ext:=cntM:=mc_row:=info_cnt:=f_EOF:=at_char[0]:=0; %------------------------------------------------------------------------------------------------ for list=s: at_colon:=scan_char(":",list,0,1); @@ -254,7 +250,7 @@ def endfigm= fi %---------------------------------------------------------------------------------------- if scan_bit(sw_frame,Outside): draw_frame((0,0),fig_wd,fig_ht,thickness_frame); - else: draw_corner((0,0),fig_wd,fig_ht,0.05); + else: draw_corner((0,0),fig_wd,fig_ht,0.01); fi if scan_bit(sw_frame,Inside): draw_frame((margin_lr,margin_tb),fig_wd-2margin_lr,fig_ht-2margin_tb,thickness_frame); @@ -320,11 +316,9 @@ def pickup_data_unit(expr t,v,f)= endfor fi else: - semic_cnt:=split_semic(sS); inf_num:=semic_cnt+1; + inf_num:=split_char(sS,";")+1; for i=1 upto inf_num: - if i<=semic_cnt: sI:=substring(at_semic[i-1],at_semic[i]-1) of sS; - else: sI:=substring(at_semic[semic_cnt],length(sS)) of sS; fi - nA:=scan_char(":",sI,0,1); + sI:=arg_s[i]; nA:=scan_char(":",sI,0,1); tag_a[i]:=substring(0,nA-1) of sI; var_a[i]:=substring(nA,length(sI)) of sI; if t=tag_a[i]: if v=var_a[i]: f_match:=1; fi fi endfor @@ -333,14 +327,6 @@ def pickup_data_unit(expr t,v,f)= endfor if f=1: closefrom file_input; fi enddef; -%-------------------------------------------------------------------------------------------------- -vardef scan_bit(expr n,b)= if b>=1: odd(floor(n/b)) else: odd(floor((frac n)/b)) fi enddef; -vardef scan_char(expr c,s,d,n)= - nN:=0; - if d=0: for i=n upto length(s): if subc(i,s)=c: nN:=i; fi exitif nN>0; endfor - ef d=1: for i=n upto length(s): if subc(i,s)<>c: nN:=i; fi exitif nN>0; endfor - ef d=-1: for i=length(s) downto n: if subc(i,s)<>c: nN:=i; fi exitif nN>0; endfor fi nN -enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% vardef '(text t)= parts_num:=parts_num+1; read_mcf(parts_num)(t); parts_num enddef; vardef read_id(text t)= parts_num:=parts_num+1; @@ -357,11 +343,9 @@ tertiarydef a op_lth b = if known b:: (_tmp_env,b),a else:: _nop,a fi enddef; tertiarydef a op_bqu b = if known b:: (_tmp_len,b),a else:: _nop,a fi enddef; def rot_angle primary n = (_rot_ang,n) enddef; def cyc_atom primary n = (_cyc,n) enddef; def jump_atom_abs primary a = - if numeric a:: (_jp_atom,$a) ef pair a:: (_jp_atom,$1),<$0,angle(a)~0`length(a),<$0 fi -enddef; + if numeric a:: (_jp_atom,$a) ef pair a:: (_jp_atom,$1),<$0,angle(a)~0`length(a),<$0 fi enddef; def jump_atom primary a = - if numeric a:: (_jp_atom,a) ef pair a:: <$0,angle(a)~0`length(a),<$0 fi -enddef; + if numeric a:: (_jp_atom,a) ef pair a:: <$0,angle(a)~0`length(a),<$0 fi enddef; def chg_length primary n = (_com,_len_s),(_chg_len,n) enddef; def group_si secondary n = if known n:: (_group_si,n) else:: _nop fi enddef; def group_dm secondary n = if known n:: (_group_dm,n) else:: _nop fi enddef; @@ -433,8 +417,7 @@ enddef; def fuse_ring(expr a,b) = CP(_jp_bond,a) CP(_rot_ang,180) CP(_get_len,a) CP(_com,_len_s) CP(_chg_len,_ring_len) for i==1 upto b-2:: CP(_mk_bond,360 DIV b) endfor - CP(_com,_len_e) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi -enddef; + CP(_com,_len_e) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi enddef; %------------------------------------------------------------------------------------------------- def fuse_ring_bonds(expr a,b,c) = CP(_jp_bond,xpart(a)) CP(_rot_ang,180) CP(_com,_len_s) @@ -452,8 +435,7 @@ def fuse_ring_size(expr a,b,c) = ef b==7:: CP(_mk_bond,360 DIV 7-(c-8)) for i==1 upto 4:: CP(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) endfor ef b==8:: CP(_mk_bond,45-(c-8)) for i==1 upto 5:: CP(_mk_bond,45+((c-8) DIV 3)) endfor fi - CP(_com,_len_e) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi -enddef; + CP(_com,_len_e) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi enddef; %================================================================================================= vardef change_bond(expr a,b) = if known b:: parts_int:=parts_int+1; nC:=0; @@ -465,12 +447,9 @@ vardef change_bond(expr a,b) = if frac parts_par[a][i]==0:: CA(_set_line,b,parts_par[a][i]) ef b==dl:: CA(_set_line,dr,floor parts_par[a][i]) ef b==dr:: CA(_set_line,dl,floor parts_par[a][i]) - else:: CA(_set_line,b,floor parts_par[a][i]) - fi - fi + else:: CA(_set_line,b,floor parts_par[a][i]) fi fi endfor - else:: CP(_set_adr,a) CP(_set_line,b) - fi + else:: CP(_set_adr,a) CP(_set_line,b) fi elseif (b>=?3)and(b<=?8[15]):: if numeric a:: if a>=parts_int_start:: @@ -507,10 +486,7 @@ vardef change_bond(expr a,b) = ef b==Ph1:: fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),6,4) CA(_set_line,dl,-1) CA(_set_line,dl,-3) ef b==Ph2:: fuse_ring_bonds((parts_com[a][i],parts_par[a][i]),6,4) - CA(_set_line,dl,-2) CA(_set_line,dl,-4) - fi - fi - endfor + CA(_set_line,dl,-2) CA(_set_line,dl,-4) fi fi endfor else:: if b==Ph1:: fuse_ring(a,6) CA(_set_line,dl,-2) CA(_set_line,dl,-4) ef b==Ph2:: fuse_ring(a,6) CA(_set_line,dl,-1) CA(_set_line,dl,-3) CA(_set_line,dl,-5) @@ -527,13 +503,9 @@ vardef change_bond(expr a,b) = ef b==?6[2]:: fuse_ring_bonds(a,6,2) ef b==?5[2]:: fuse_ring_bonds(a,5,2) ef b==Ph1:: fuse_ring_bonds(a,6,4) CA(_set_line,dl,-1) CA(_set_line,dl,-3) - ef b==Ph2:: fuse_ring_bonds(a,6,4) CA(_set_line,dl,-2) CA(_set_line,dl,-4) - fi - fi - fi + ef b==Ph2:: fuse_ring_bonds(a,6,4) CA(_set_line,dl,-2) CA(_set_line,dl,-4) fi fi fi elseif color b:: color_list[incr cntC]:=b; CA(_set_colorB,cntC,a) fi - parts_cnt[parts_int]:=nC; parts_int - fi + parts_cnt[parts_int]:=nC; parts_int fi enddef; %------------------------------------------------------------------------------------------------- vardef change_atom(expr a,b)= @@ -550,8 +522,7 @@ vardef change_atom(expr a,b)= CP(_tmp_rot,-35) CA(_group_dm,O,a) CP(_com,_group_e) ef b==SO:: CA(_chg_atom,S,a) CP(_com,_group_s) CA(_group_dm,O,a) CP(_com,_group_e) ef b==n_:: CP(_com,_group_s) CP(_set_add,a_minus) CP(_chg_add,a) CP(_com,_group_e) - ef b==p_:: CP(_com,_group_s) CP(_set_add,a_plus) CP(_chg_add,a) CP(_com,_group_e) - fi + ef b==p_:: CP(_com,_group_s) CP(_set_add,a_plus) CP(_chg_add,a) CP(_com,_group_e) fi ef pair b:: CP(_com,_group_s) if a>=parts_emb_start:: @@ -566,20 +537,16 @@ vardef change_atom(expr a,b)= else:: CA(xpart(b),ypart(b),a) fi CP(_com,_group_e) ef color b:: color_list[incr cntC]:=b; CA(_set_colorA,cntC,a) fi - parts_cnt[parts_int]:=nC; parts_int - fi + parts_cnt[parts_int]:=nC; parts_int fi enddef; %------------------------------------------------------------------------------------------------- def com_par(expr c,p)= parts_com[parts_int][incr nC]:=c; parts_par[parts_int][nC]:=p; enddef; def com_par_adr(expr c,p,a)= if a>=parts_emb_start:: for i==1 upto parts_cnt[a]:: - if parts_com[a][i]==_numeric:: com_par(_set_adr,parts_par[a][i]) com_par(c,p) - else:: com_par(parts_com[a][i],parts_par[a][i]) fi - endfor - else:: com_par(_set_adr,a) com_par(c,p) - fi -enddef; + if parts_com[a][i]==_numeric:: com_par(_set_adr,parts_par[a][i]) com_par(c,p) + else:: com_par(parts_com[a][i],parts_par[a][i]) fi endfor + else:: com_par(_set_adr,a) com_par(c,p) fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def ext_setup= pickup pencircle scaled ext_defaultline; @@ -601,13 +568,11 @@ def add_to_molecule(text t)= lonepairdiam:=0.3aw; lonepairspace:=.7aw; circlediam:=.6aw; circlepen:=.2; for i=1 upto cntA: A[i]:=posA[i]; A[i]ang:=angX[i]; A[i]up:=dir(angX[i]); - A[i]left:=dir(angX[i]+90); A[i]right:=dir(angX[i]-90); A[i]down:=dir(angX[i]+180); - endfor + A[i]left:=dir(angX[i]+90); A[i]right:=dir(angX[i]-90); A[i]down:=dir(angX[i]+180); endfor for i=1 upto cntB: B[i]s:=posA[sB[i]]; B[i]e:=posA[eB[i]]; B[i]m:=0.5[B[i]s,B[i]e]; B[i]:=B[i]s--B[i]e; B[i]ang:=angB[i]; B[i]up:=dir(angB[i]); - B[i]down:=dir(angB[i]+180); B[i]left:=dir(angB[i]+90); B[i]right:=dir(angB[i]-90); - endfor + B[i]down:=dir(angB[i]+180); B[i]left:=dir(angB[i]+90); B[i]right:=dir(angB[i]-90); endfor t addto mol_pic[cntM] also currentpicture; clearit; endgroup; enddef; @@ -624,24 +589,19 @@ def ext_to_fig(text t)= endgroup; enddef; %------------------------------------------------------------------------------------------------- -vardef circled_plus_add= - nA:=circlediam; nB:=circlepen; +vardef circled_plus_add= nA:=circlediam; nB:=circlepen; image(draw fullcircle scaled nA wpcs nB; - draw (-.5nA,0)--(.5nA,0) wpcs nB; draw (0,-.5nA)--(0,.5nA) wpcs nB;) -enddef; + draw (-.5nA,0)--(.5nA,0) wpcs nB; draw (0,-.5nA)--(0,.5nA) wpcs nB;) enddef; %------------------------------------------------------------------------------------------------- -vardef circled_minus_add= - nA:=circlediam; nB:=circlepen; - image(draw fullcircle scaled nA wpcs nB; draw (-.5nA,0)--(.5nA,0) wpcs nB;) -enddef; +vardef circled_minus_add= nA:=circlediam; nB:=circlepen; + image(draw fullcircle scaled nA wpcs nB; draw (-.5nA,0)--(.5nA,0) wpcs nB;) enddef; %------------------------------------------------------------------------------------------------- vardef lone_pair_add expr n= image(draw (0,0) wpcs lonepairdiam; draw ((0,lonepairspace) rotated n) wpcs lonepairdiam;) enddef; %================================================================================================= def MCat(expr w,h)(text t)= - save_mposition:=mposition; mposition:=(w,h); MC(t) mposition:=save_mposition; -enddef; + save_mposition:=mposition; mposition:=(w,h); MC(t) mposition:=save_mposition; enddef; %------------------------------------------------------------------------------------------------- def MC(text t)= begingroup @@ -681,8 +641,7 @@ def MC(text t)= else: factor:=((fig_ht-2margin_tb)*ypart(msize))/mol_ht; fi else: if xpart(msize)>1: factor:=xpart(msize)/mol_wd; - else: factor:=((fig_wd-2margin_lr)*xpart(msize))/mol_wd; fi - fi + else: factor:=((fig_wd-2margin_lr)*xpart(msize))/mol_wd; fi fi exitif (factor>=1-eps)and(factor<=1+eps); blen:=blen*factor; proc_size_setup; endfor if blen>max_blength: blen:=max_blength; proc_size_setup; proc_skeleton(0); proc_scaling; fi @@ -692,9 +651,7 @@ def MC(text t)= if addA[i]<>0: tempc:=char(addA[i]); if tempc="+": chargeA[i]:=1; ef tempc="-": chargeA[i]:=-1; else: chargeA[i]:=0; fi - else: chargeA[i]:=0; - fi - endfor + else: chargeA[i]:=0; fi endfor %=============================================================================================== if scan_bit(sw_output,Fig): %-draw atom----------------------------------------------------------------------------------- @@ -702,10 +659,7 @@ def MC(text t)= %-draw add to atom---------------------------------------------------------------------------- if (not scan_bit(sw_numbering,Atom))and(not scan_bit(sw_numbering,Bond)): for i=1 upto cntA: - if addA[i]<>0: - nA:=angX[i]+add_rot[i]; nC:=nA mod 90; - if strA[i]=0: nB:=.5atom_wd; else: nB:=atom_wd; fi - draw_char(char(addA[i]),sfrt(posA[i],nB,nA)); fi + if addA[i]<>0: draw_char(char(addA[i]),sfrt(posA[i],atom_wd,angX[i]+add_rot[i])); fi endfor fi %-draw bond----------------------------------------------------------------------------------- @@ -772,9 +726,8 @@ def add_group= enddef; %------------------------------------------------------------------------------------------------- def store_group(expr a,b)= - group_com[group_num][incr group_cnt[group_num]]:=a; - group_par[group_num][group_cnt[group_num]]:=b; -enddef; + group_com[group_num][incr group_cnt[group_num]]:=a; + group_par[group_num][group_cnt[group_num]]:=b; enddef; %================================================================================================= def read_group(expr a)(expr n)= save_group_cnt:=group_num; save_cntD:=parts_cnt[a]; @@ -785,25 +738,21 @@ def read_group(expr a)(expr n)= endfor endfor proc_bond_atom(a)(save_cntD+1); - if group_num>save_group_cnt: read_group(a)(save_group_cnt+1); fi -enddef; + if group_num>save_group_cnt: read_group(a)(save_group_cnt+1); fi enddef; %================================================================================================= def draw_frame(expr p,x,y,n)= - draw ((0,0)--(x,0)--(x,y)--(0,y)--cycle) shifted p withpen pensquare scaled n; -enddef; + draw ((0,0)--(x,0)--(x,y)--(0,y)--cycle) shifted p withpen pensquare scaled n; enddef; %------------------------------------------------------------------------------------------------- def draw_corner(expr p,x,y,n)= draw(0,0) shifted p wpcs n; draw(x,0) shifted p wpcs n; - draw(x,y) shifted p wpcs n; draw(0,y) shifted p wpcs n; -enddef; + draw(x,y) shifted p wpcs n; draw(0,y) shifted p wpcs n; enddef; %------------------------------------------------------------------------------------------------- def proc_size_setup= atom_wd:= blen*ratio_atom_bond+offset_atom; wedge_wd:= blen*ratio_wedge_bond+offset_wedge; hash_gap:= blen*ratio_hashgap_bond+offset_hash_gap; bondgap:= blen*ratio_bondgap_bond+offset_bond_gap; - bond_pen_wd:= blen*ratio_thickness_bond+offset_thickness; -enddef; + bond_pen_wd:= blen*ratio_thickness_bond+offset_thickness; enddef; %------------------------------------------------------------------------------------------------- def proc_scaling= minX:=minY:=4095; maxX:=maxY:=-4095; @@ -858,7 +807,7 @@ def proc_bond_atom(expr a)(expr n)= ef nC=_chg_atom: strA[getA(adrT)]:=parts_par[nP][1]; ef nC=_chg_len: if nP=_ring_len: bondL:=ringL; else: bondL:=nP; fi ef nC=_get_len: if nP=_tmp_len: if bondL=rate_cr: bondL:=lenT; fi - ef nP=_ring_len: + ef nP=_ring_len: if lenT<>rate_cr: bondL:=lenT; else: if bondL<0: bondL:=1; fi fi else: ringL:=lenB[getB(nP)]; fi ef nC=_tmp_len: lenT:=nP; @@ -886,12 +835,10 @@ def add_atom(expr n)= addA[cntA]:=addAT; addAT:=temp_strA:=add_rot[cntA]:=0; if rotT<>0: add_rot[cntA]:=rotT; rotT:=0; fi else: f_bra:=0; fi - if n=0: eB[cntB]:=cntA+1; f_term:=0; else: eB[cntB]:=n; f_term:=1; fi -enddef; + if n=0: eB[cntB]:=cntA+1; f_term:=0; else: eB[cntB]:=n; f_term:=1; fi enddef; %------------------------------------------------------------------------------------------------- def check_adrA(expr n)= - if (n>iif(f_term=0,cntA+1,cntA))or(n<=0): errmessage("cntA=[ "&decimal(n)&" ]"); fi -enddef; + if (n>iif(f_term=0,cntA+1,cntA))or(n<=0): errmessage("cntA=[ "&decimal(n)&" ]"); fi enddef; def check_adrB(expr n)= if (n>cntB)or(n<=0): errmessage("cntB=[ "&decimal(n)&" ]"); fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def proc_skeleton(expr n)= @@ -927,7 +874,7 @@ enddef; def add_bond(expr n,f)= if n=_arrange_ang: nA:=arrange_ang(angT mod 360); else: nA:=n; fi if f_bra=0: - adrT:=cntA:=cntA+1; posA[cntA]:=posBs; angA[cntA]:=angT; + adrT:=incr cntA; posA[cntA]:=posBs; angA[cntA]:=angT; angX[cntA]:=(angT+nA/2+iif(nA>=0,-90,90)) mod 360; else: f_bra:=0; fi cntB:=cntB+1; @@ -957,16 +904,13 @@ vardef getB(expr n)= if n>=0: markB+n ef n>=-999: cntB+n+1 else: n+4095 fi endde %------------------------------------------------------------------------------------------------- def termA= if f_term=0: - if f_bra=0: - strA[incr cntA]:=temp_strA; addA[cntA]:=addAT; add_rot[cntA]:=rotT; - addAT:=temp_strA:=rotT:=0; + if f_bra=0: strA[incr cntA]:=temp_strA; addA[cntA]:=addAT; add_rot[cntA]:=rotT; + addAT:=temp_strA:=rotT:=0; else: f_bra:=0; fi f_term:=1; fi enddef; %------------------------------------------------------------------------------------------------- -def termB= - if f_term=0: if f_bra=0: angX[incr cntA]:=angT mod 360; else:f_bra:=0; fi f_term:=1; fi -enddef; +def termB= if f_term=0: if f_bra=0: angX[incr cntA]:=angT; else:f_bra:=0; fi f_term:=1; fi enddef; %------------------------------------------------------------------------------------------------- vardef glu_atom(expr n)= if strA[n]<>0: nE:=angT mod 90; nF:=0.5atom_wd; (iif(nE<45,sind nE,cosd nE)*nF)++nF else: 0 fi @@ -977,17 +921,16 @@ def draw_atom(expr n)= temps:=str_tbl[strA[n]]; slen:=length(temps); nC:=nS:=0; raise_pos:=(0,0); tpos:=posA[n]; if (angX[n]<=90)or(angX[n]>=270): sdir:=1; else: sdir:=-1; fi for i=1 upto slen: - if nC=0: - tempc:=subc(i,temps); + if nC=0: tempc:=subc(i,temps); if (sdir=-1)and(tempc="{"): - nD:=i; nC:=0; for j=nD upto slen: nC:=nC+1; exitif subc(j,temps)="}"; endfor fi - else: nC:=nC-1; tempc:=subc(nD+nC,temps); fi + nD:=i; nC:=0; for j=nD upto slen: nC:=nC+1; exitif subc(j+1,temps)="}"; endfor fi + else: nC:=nC-1; tempc:=subc(nD+nC,temps); fi if tempc="_": raise_pos:=iif(raise_pos=(0,0),(0,-.5atom_wd),(0,0)); ef tempc="^": raise_pos:=iif(raise_pos=(0,0),(0, .5atom_wd),(0,0)); ef (tempc<>"{")and(tempc<>"}"): nS:=nS+1; char_wd:=atom_wd*tbl_char_wd[ASCII(tempc)]; char_ht:=atom_wd; if nS=1: if (sdir=-1)and(char_wd<atom_wd): tpos:=tpos+((atom_wd-char_wd)/2,0); fi - else: tpos:=tpos+(.5char_wd*sdir,0); fi + else: tpos:=tpos+(.5char_wd*sdir,0); fi tcol:=colorA[n]; f_col:=0; if known tcol: if tcol<>0: drawoptions(withcolor color_list[tcol]); f_col:=1; fi fi if atomfont="draw": draw_char(tempc,tpos+raise_pos); else: label(tempc,tpos+raise_pos); fi @@ -1078,16 +1021,12 @@ def wz_put(expr a,b,c)= for i=0 upto lenL/hash_gap: nA:=hash_gap*i/lenL; nD:=(hash_gap*i+ratio_hash_black*hash_gap)/lenL; if nD>((lenL-hash_gap)/lenL): nD:=1; fi - fill nA[b,a]--nA[c,a]--nD[c,a]--nD[b,a]--cycle; - endfor -enddef; + fill nA[b,a]--nA[c,a]--nD[c,a]--nD[b,a]--cycle; endfor enddef; %------------------------------------------------------------------------------------------------ def bz_put(expr a,b,c,d)= - for i=0 upto lenL/hash_gap: + for i=0 upto lenL/hash_gap: nA:=hash_gap*i/lenL; nD:=(hash_gap*i+ratio_hash_black*hash_gap)/lenL; - fill nA[b,a]--nA[d,c]--nD[d,c]--nD[b,a]--cycle; - endfor -enddef; + fill nA[b,a]--nA[d,c]--nD[d,c]--nD[b,a]--cycle; endfor enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def char_size_set(expr w,h)(expr s)= for j=1 upto length(s): nN:=ASCII(subc(j,s)); tbl_char_wd[nN]:=w; tbl_char_ht[nN]:=h; endfor @@ -1148,9 +1087,8 @@ def draw_char(expr s,p)= ef s="-": dwh Z_m--Z_o; ef s="+": dwv Z_x--Z_s; dwh Z_m--Z_o; ef s="A": dwvs(1.14)Z_b--Z_f--Z_e; dw .33[Z_b,Z_f]--.33[Z_e,Z_f]; - ef s="B": dw Z_r--Z_s{right}..(.9fH,.75aH)..{left}Z_y--Z_m--Z_y{right}.. - (.9fH,qH)..{left}Z_x--Z_c; - dwv Z_b--Z_w; + ef s="B": dw Z_r--Z_s{right}..(.9fH,.75aH)..{left}Z_y--Z_m--Z_y{right}..(.9fH,qH).. + {left}Z_x--Z_c; dwv Z_b--Z_w; ef s="D": dw Z_r--Z_s..Z_o..Z_x--Z_c; dwv Z_b--Z_w; ef s="E": pickup pensquare scaled fP; dw Z_z--Z_c--Z_r--Z_n; dw Z_m--Z_o; ef s="G": cdw sbp(.06,.97)circ_O; dwh bot Z_y-- bot Z_v; @@ -1211,8 +1149,7 @@ def warning_bond(expr a)= warning("A"&decimal(a)&" ( "&fsl(8)(str_tbl[strA[a]])&") has"&fdr(2)(bond_cntA)&" bonds"); fi enddef; %------------------------------------------------------------------------------------------------- -vardef erase_brace(expr s)= - sS:=""; +vardef erase_brace(expr s)= sS:=""; if (length(s)>=4)and(s<>"COOH"): for i=1 upto length(s): sC:=subc(i,s); @@ -1221,17 +1158,15 @@ vardef erase_brace(expr s)= else: s fi enddef; %------------------------------------------------------------------------------------------------- -vardef erase_space(expr t)= - sS:=""; for i=1 upto length(t): sC:=subc(i,t); if sC=" ": sS:=sS&"_"; else: sS:=sS&sC; fi endfor - sS +vardef erase_space(expr t)= sS:=""; + for i=1 upto length(t): sC:=subc(i,t); if sC=" ": sS:=sS&"_"; else: sS:=sS&sC; fi endfor sS enddef; %================================================================================================= def proc_calc(expr n)= num_MW:=num_MI:=tbl_atom_max:=warning_cnt:=hideH_cnt:=0; nE:=parts_emb_start; for i=1 upto tbl_atom_end: sumA[i]:=0; endfor for i=1 upto cntA: - knownA:=bond_cntA:=0; - nS:=strA[i]; + knownA:=bond_cntA:=0; nS:=strA[i]; for j=1 upto cntB: bond_num[j]:=bond_type(lineB[j]); if (sB[j]=i)or(eB[j]=i): bond_cntA:=bond_cntA+bond_num[j]; fi @@ -1266,8 +1201,7 @@ def proc_calc(expr n)= knownA:=1; fi exitif knownA=1; endfor - if knownA=0: warning(" Unknown Str("&str_tbl[strA[i]]&") is used "&decimal(i)); fi - endfor + if knownA=0: warning(" Unknown Str("&str_tbl[strA[i]]&") is used "&decimal(i)); fi endfor %------------------------------------------------------------------------------------- sumA[2]:=sumA[2]+hideH_cnt; if (tbl_atom_max=1)and(sumA[2]>0): tbl_atom_max:=2; fi @@ -1312,35 +1246,35 @@ def proc_report_out(expr f)= message "["&decimal(fig_num)&"]:"&inf_EN; if f=1: file_output:="temp-report.aux"; else: file_output:=jobname&"-report.txt"; fi printf "==========================================================================="; - printf " No."&fdr(4)(fig_num)&" / Name = "& inf_EN&" / file = "& file_input; + printf " No["&decimal(fig_num)&"],Name<"& inf_EN&">,Category<"&inf_Cat&">,File<"&file_input&">"; if mc_row>=1: printf "---------------------------------------------------------------------------"; for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blanks)&mc[i]; endfor printf "---------------------------------------------------------------------------"; - printf " row="&fdr(3)(mc_row)&" , length="&fdr(4)(length(mc))& - " , commands="&fdr(3)(cnt_cmm); - printf " {}=X["&decimal(cnt_chgB)&"],{}:X["&decimal(cnt_chgA)& - "],'()["&decimal(cnt_inline_def)&"],@["&decimal(cnt_at)& - "],&["&decimal(cnt_and)&"],<["&decimal(cnt_gtn)&"],=["&decimal(cnt_equ)& + printf " Row["&decimal(mc_row)&"],Length["&decimal(length(mc))&"],Commands["&decimal(cnt_cmm)& + "],&Code["&decimal(parts_cnt[0])&"],Warning["&decimal(warning_cnt)&"]"; + printf "---------------------------------------------------------------------------"; + printf " =["&decimal(cnt_equ)&"]({}=["&decimal(cnt_chgB)&"]), :["&decimal(cnt_cln)& + "]({}:["&decimal(cnt_chgA)&"]), '()["&decimal(cnt_inline_def)&"]"; + printf " @["&decimal(cnt_at)&"],&["&decimal(cnt_and)&"],<["&decimal(cnt_gtn)& + "],~["&decimal(cnt_tld)&"],^["&decimal(cnt_hat)&"],`["&decimal(cnt_bqt)& + "],>["&decimal(cnt_ltn)& "],|["&decimal(cnt_bar-cnt_bars)&"],||["&decimal(cnt_bars)& - "],#["&decimal(cnt_hsh-cnt_hshs)&"],##["&decimal(cnt_hshs)&"]"; - fi + "],#["&decimal(cnt_hsh-cnt_hshs)&"],##["&decimal(cnt_hshs)&"]"; fi printf "---------------------------------------------------------------------------"; - printf " Warnings = "&fdr(3)(warning_cnt)&" / Code= "&decimal(parts_cnt[0]); - printf " Width * Height = " & fdr(10)(mol_wd)&" * "&fdr(10)(mol_ht); - printf " Shift width * height = "& fdr(10)(minX)&" * "&fdr(10)(minY); - printf " Bond length = "&fdr(3)(blen)&" Atom size = "&fdr(3)(atom_wd); - printf " Atom count="&fdr(3)(cntA)&" Bond count="&fdr(3)(cntB)& - " Ring count="&fdr(3)(cntB-cntA+1)&" Hide H count="&fdr(3)(hideH_cnt); + printf " Width["&decimal(mol_wd)&"],Height["&decimal(mol_ht)&"],"& + " Shift x["& decimal(minX)&"],Shift y["&decimal(minY)&"]"; + printf " Bond length["&decimal(blen)&"],Atom size["&decimal(atom_wd)&"]"; printf "---------------------------------------------------------------------------"; + printf " Atom["&decimal(cntA)&"],Bond["&decimal(cntB)& + "],Ring["&decimal(cntB-cntA+1)&"],Hide H["&decimal(hideH_cnt)&"]"; printf "< NO. ><atom(s) >( x axis , y axis )<bond><hideH><chg>"; for i=1 upto cntA: printf " A"&fdl(6)(i)&fsl(8)(erase_brace(str_tbl[strA[i]]))& " ("&fdr(10)(round(xpart(posA[i])/blen))&" , "& fdr(10)(round(ypart(posA[i])/blen))&" ) "&fdr(4)(Bcnt[i])& iif(hideH[i]>0,fdr(6)(hideH[i])," ") - if chargeA[i]<>0: &fdr(4)(chargeA[i]) fi; - endfor + if chargeA[i]<>0: &fdr(4)(chargeA[i]) fi; endfor printf "---------------------------------------------------------------------------"; printf "< NO. >< bond (sdt)><angle +( +- )><length ( pt )>"; for i=1 upto cntB: @@ -1348,8 +1282,7 @@ def proc_report_out(expr f)= nB:=angB[i]; if nB>180: nB:=nB-360; fi printf " B"&fdl(4)(i)&fdr(3)(sB[i])&" -> "&fdr(3)(eB[i])& " ("&fdr(3)(bond_num[i])&")"&fdr(8)(round(angB[i]))& - " ("&fdr(6)(round(nB))&")"&fdr(8)(nC)&" ("&fdr(8)(round(nC*blen))&")"; - endfor + " ("&fdr(6)(round(nB))&")"&fdr(8)(nC)&" ("&fdr(8)(round(nC*blen))&")"; endfor printf "---------------------------------------------------------------------------"; printf "<atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ]"; for i=1 upto tbl_atom_max: @@ -1403,32 +1336,29 @@ def proc_mol_out(expr n)= " "&decimal(sB[i])&" "&decimal(eB[i]) if bond_stereo(lineB[i])<>0: &" CFG="&decimal(bond_config(lineB[i])) fi; fi endfor - printf "M V30 END BOND"; printf "M V30 END CTAB"; printf "M END"; - fi + printf "M V30 END BOND"; printf "M V30 END CTAB"; printf "M END"; fi enddef; %================================================================================================= def proc_mc_out(expr f)= message "["&decimal(fig_num)&"]:"&inf_EN; file_output:="temp-mc.aux"; if mc_length<100: - nN:=split_comma(mc); nL:=length(mc); nA:=0; + nN:=scan_chars(mc,","); nL:=length(mc); nA:=0; forever: for i=nN downto 1: - if at_comma[i]<=nA+mc_length: - printf substring(nA,at_comma[i]) of mc; nA:=at_comma[i]; exitif true; fi + if at_char[i]<=nA+mc_length: + printf substring(nA,at_char[i]) of mc; nA:=at_char[i]; exitif true; fi endfor if nL-nA<=mc_length: printf substring(nA,nL) of mc; exitif true; fi endfor else: - for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blanks)&mc[i]; endfor - fi + for i=1 upto mc_row: printf (substring(0,mc_indent[i]) of blanks)&mc[i]; endfor fi printf EOF; enddef; %================================================================================================= vardef fit_zero(expr n)= if n<=9: "00" ef n<=99: "0" else: "" fi &decimal(n) enddef; vardef bond_type(expr n)= - if (n>=dl)and(n<=dm_):2 ef n=tm:3 ef (n=0)or(n=vf)or(n=vb): 0 else: 1 fi -enddef; + if (n>=dl)and(n<=dm_):2 ef n=tm:3 ef (n=0)or(n=vf)or(n=vb): 0 else: 1 fi enddef; vardef bond_charge(expr n)= if n=2: 1 ef n=1: 3 ef n=-1: 5 ef n=-2: 6 else: 0 fi enddef; vardef bond_stereo(expr n)= if (n=wf)or(n=zb)or(n=bd): 1 ef (n=zf)or(n=wb)or(n=dt): 6 ef n=wv: 4 else: 0 fi enddef; @@ -1439,16 +1369,13 @@ vardef STa(expr s,WT,MI)= str_cnt:=str_cnt+1; tbl_cnt:=tbl_cnt+1; parts_num:=parts_num+1; parts_com[parts_num][1]:=_set_atom; parts_par[parts_num][1]:=str_cnt; parts_cnt[parts_num]:=1; str_tbl[str_cnt]:=tbl_atom_str[tbl_cnt]:=s; tbl_atom[tbl_cnt]:=0; - tbl_atom_wt[tbl_cnt]:=WT; tbl_atom_mi[tbl_cnt]:=MI; - parts_num -enddef; + tbl_atom_wt[tbl_cnt]:=WT; tbl_atom_mi[tbl_cnt]:=MI; parts_num enddef; %------------------------------------------------------------------------------------------------- vardef STb(expr s)(text t)= str_cnt:=str_cnt+1; tbl_cnt:=tbl_cnt+1; parts_num:=parts_num+1; parts_com[parts_num][1]:=_set_atom; parts_par[parts_num][1]:=str_cnt; parts_cnt[parts_num]:=1; str_tbl[str_cnt]:=tbl_atom_str[tbl_cnt]:=s; tbl_atom[tbl_cnt]:=0; - for list=t: tbl_group[tbl_cnt][incr tbl_atom[tbl_cnt]]:=list-parts_emb_start; endfor - parts_num + for list=t: tbl_group[tbl_cnt][incr tbl_atom[tbl_cnt]]:=list-parts_emb_start; endfor parts_num enddef; %================================================================================================= parts_int:=parts_emi_start; parts_num:=parts_emb_start; @@ -1477,9 +1404,9 @@ W:= STa("W", 183.85, 181.948225); Zn:=STa("{Zn}",65.409, 63.929142 tbl_atom_end:=tbl_cnt; %------------------------------------------------------------------------------------------------- CH3:=STb("C{H_3_}")(C,H,H,H); CH2:=STb("C{H_3_}")(C,H,H); CN:=STb("CN")(C,N); OH:=STb("OH")(O,H); -COOH:=STb("COOH")(C,O,O,H); SH:= STb("SH")(S,H); CHO:=STb("CHO")(C,H,O); +COOH:=STb("COOH")(C,O,O,H); COONa:=STb("COO{Na}")(C,O,O,Na); CHO:=STb("CHO")(C,H,O); NO:=STb("NO")(N,O); NO2:=STb("N{O_2_}")(N,O,O); NH2:=STb("N{H_2_}")(N,H,H); -SO2H:=STb("S{O_2_}H")(S,O,O,H); SO3H:=STb("S{O_3_}H")(S,O,O,O,H); +SH:= STb("SH")(S,H); SO2H:=STb("S{O_2_}H")(S,O,O,H); SO3H:=STb("S{O_3_}H")(S,O,O,O,H); ONa:=STb("O{Na}")(O,Na); SO3Na:=STb("S{O_3_}{Na}")(S,O,O,O,Na); %------------------------------------------------------------------------------------------------- tbl_group_end:=tbl_cnt; parts_atom_end:=parts_num; @@ -1492,8 +1419,7 @@ for i=5,6,7,8: for j=11 upto 15: ?[i][j]:='(); endfor endfor %------------------------------------------------------------------------------------------------- !:=!1:='((_mk_bond,_arrange_ang)); !!:='(!~db); !!!:='(!~tm); for i==2 upto 20: - ![i]:='((_com,_len_ss),(_get_len,_tmp_len),! for j==2 upto i::,! endfor ,(_com,_len_ee)); -endfor + ![i]:='((_com,_len_ss),(_get_len,_tmp_len),! for j==2 upto i::,! endfor ,(_com,_len_ee)); endfor Me:='(); Et:='(!); iPr:=?!:='(/_,!); ?!2:='(/_,!2); tBu:=??!:='(/_,/_^60,60); !?:='(!,/_); !?!:='(!,/_,!); n_:='((_set_add,a_minus)); p_:='((_set_add,a_plus)); zero_wf:='(0~wf); zero_zf:='(0~zf); zero_dm:='(0~dm); zero_wv:='(0~wv); @@ -1541,8 +1467,7 @@ init_par(parameter_list); def expand_set= CH3:=xCH3; NH:=xNH; NH2:=xNH2; NO:=xNO; NO2:=xNO2; OH:=xOH; CHO:=xCHO; COOH:=xCOOH; CN:=xCN; SH:=xSH; SO2H:=xSO2H; SO3H:=xSO3H; !SH:=!xSH; - !CH3:=!xCH3; !OH:=!xOH; !NH2:=!xNH2; !CHO:=!xCHO; !COOH:=!xCOOH; !CN:=!xCN; !NO2:=!xNO2; -enddef; + !CH3:=!xCH3; !OH:=!xOH; !NH2:=!xNH2; !CHO:=!xCHO; !COOH:=!xCOOH; !CN:=!xCN; !NO2:=!xNO2; enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% vardef mc_check(expr s)= save mc_char,err_cnt,char_cnt,f_depth,cnt_prn_s,cnt_prn_e,cnt_brc_s,cnt_brc_e,cnt_brk_s, @@ -1556,13 +1481,12 @@ vardef mc_check(expr s)= %--------------------------------------------------------------------------------------------- if mc_row>=1: for i=1 upto length(s): - tempc:=subc(i,s); if tempc<>" ": mc_char[incr char_cnt]:=ASCII(tempc); fi - endfor + tempc:=subc(i,s); if tempc<>" ": mc_char[incr char_cnt]:=ASCII(tempc); fi endfor mc_char[0]:=mc_char[char_cnt+1]:=mc_char[char_cnt+2]:=a_cmm; %-- argument missing chkeck -------------------------------------------------------------- cnt_prn_s:=cnt_prn_e:=cnt_brc_s:=cnt_brc_e:=cnt_brk_s:=cnt_brk_e:=cnt_inline_def:=0; - cnt_at:=cnt_cmm:=cnt_and:=cnt_gtn:=cnt_equ:=cnt_cln:=cnt_bar:=cnt_bars:=0; - cnt_hsh:=cnt_hshs:=f_depth:=nA:=0; + cnt_at:=cnt_cmm:=cnt_and:=cnt_gtn:=cnt_equ:=cnt_cln:=cnt_bar:=cnt_bars:=cnt_tld:=cnt_hat:=0; + cnt_bqt:=cnt_ltn:=cnt_hsh:=cnt_hshs:=f_depth:=nA:=0; forever: nA:=nA+1; nB:=mc_char[nA-1]; nC:=mc_char[nA]; nD:=mc_char[nA+1]; if nC=a_cmm: if f_depth=0: cmm_adr[incr cnt_cmm]:=nA; fi @@ -1587,10 +1511,14 @@ vardef mc_check(expr s)= ef nC=a_and: cnt_and:=cnt_and+1; if nD= a_cmm: proc_err(7,nA) fi if nB<>a_cmm: proc_err(8,nA) fi % a & x ef nC=a_gtn: cnt_gtn:=cnt_gtn+1; - ef nC=a_ltn: if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x > x - ef nC=a_tld: if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x ~ x - ef nC=a_hat: if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x ^ x - ef nC=a_bqt: if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x ` x + ef nC=a_ltn: cnt_ltn:=cnt_ltn+1; + if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x > x + ef nC=a_tld: cnt_tld:=cnt_tld+1; + if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x ~ x + ef nC=a_hat: cnt_hat:=cnt_hat+1; + if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x ^ x + ef nC=a_bqt: cnt_bqt:=cnt_bqt+1; + if nD= a_cmm: proc_err(7,nA) fi if nB= a_cmm: proc_err(7,nA) fi % x ` x ef nC=a_bar: cnt_bar:=cnt_bar+1; % |+|| if nD= a_bar: cnt_bars:=cnt_bars+1; if mc_char[nA+2]=a_bar: nA:=nA+1; % || ef mc_char[nA+2]<>a_cmm: proc_err(8,nA) fi % | a @@ -1611,8 +1539,7 @@ vardef mc_check(expr s)= if cnt_prn_s>cnt_prn_e: proc_err(1,0) ef cnt_prn_s<cnt_prn_e: proc_err(2,0) fi if cnt_brc_s>cnt_brc_e: proc_err(3,0) ef cnt_brc_s<cnt_brc_e: proc_err(4,0) fi if cnt_brk_s>cnt_brk_e: proc_err(5,0) ef cnt_brk_s<cnt_brk_e: proc_err(6,0) fi - else: proc_err(0,0) - fi + else: proc_err(0,0) fi %--------------------------------------------------------------------------------------------- for i=1 upto err_cnt: message "*"&fdr(3)(i)&" "&err_type[err_code[i]]&fdr(4)(err_adr[i])&" '"&err_str[i]&"'"; @@ -1622,16 +1549,15 @@ vardef mc_check(expr s)= enddef; %------------------------------------------------------------------------------------------------- def proc_err(expr e,n)= err_adr[incr err_cnt]:=n; err_code[err_cnt]:=e; - if e<=6: err_str[err_cnt]:=" "; else: err_str[err_cnt]:=substring(n-3,n+2) of mc; fi -enddef; + if e<=6: err_str[err_cnt]:=" "; else: err_str[err_cnt]:=substring(n-3,n+2) of mc; fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def mc_query(text s)= begingroup save f_mcf,f_line,unit_row,unit_cnt,line_s,row_cnt,semic_cnt,info_cnt,order,min_n,key_cnt, info_s,sign_at,sign_n,filter_n,filter_tag,filter_var,filter_sign,filter_cnt,filter_p, - at_semic,at_colon,at_equal,at_less,at_greater,at_n,sort_all,key_s,sort_s; + at_char,at_colon,at_equal,at_less,at_greater,at_n,sort_all,key_s,sort_s; string line_s[][],sort_s[],sort_all[],key_s[],filter_tag[],filter_var[],info_s[]; - numeric row_cnt[],order[],order_tbl[],filter_sign[],filter_p[],at_semic[]; + numeric row_cnt[],order[],order_tbl[],filter_sign[],filter_p[],at_char[]; unit_row:=f_mcf:=mc_row:=info_cnt:=key_cnt:=filter_cnt:=0; unit_cnt:=1; file_input:=default_library; file_output:=default_temp_file; %----------------------------------------------------------------------------------------------- @@ -1655,8 +1581,7 @@ def mc_query(text s)= else: filter_tag[incr filter_cnt]:=sT; filter_sign[filter_cnt]:=sign_n; if (sign_n>=3)and(is_num(sV)=1): filter_var[filter_cnt]:=fix_num(sV); - else: filter_var[filter_cnt]:=sV; fi - fi + else: filter_var[filter_cnt]:=sV; fi fi endfor %----------------------------------------------------------------------------------------------- forever: @@ -1682,28 +1607,19 @@ def mc_query(text s)= ef filter_sign[j]=3: if not(temps< filter_var[j]): filter_n:=0; fi ef filter_sign[j]=4: if not(temps> filter_var[j]): filter_n:=0; fi ef filter_sign[j]=5: if not(temps<=filter_var[j]): filter_n:=0; fi - ef filter_sign[j]=6: if not(temps>=filter_var[j]): filter_n:=0; fi fi - fi - endfor + ef filter_sign[j]=6: if not(temps>=filter_var[j]): filter_n:=0; fi fi fi endfor endfor for i=1 upto filter_cnt: if filter_p[i]=0: filter_n:=0; fi endfor sort_all[unit_cnt]:=""; for j=1 upto key_cnt: if j=key_cnt: sort_all[unit_cnt]:=sort_all[unit_cnt]&sort_s[j]; - else: sort_all[unit_cnt]:=fix_str(15,sort_s[1]); fi - endfor + else: sort_all[unit_cnt]:=fix_str(15,sort_s[1]); fi endfor info_cnt:=0; if filter_n=1: unit_cnt:=unit_cnt+1; fi ef subc(1,temps)="+": f_mcf:=1; mc_row:=1; ef subc(1,temps)<>"%": if f_mcf=1: mc_row:=mc_row+1; else: - semic_cnt:=split_semic(temps); - for i=1 upto semic_cnt+1: - info_cnt:=info_cnt+1; - if i<=semic_cnt: info_s[info_cnt]:=substring(at_semic[i-1],at_semic[i]-1) of temps; - else: info_s[info_cnt]:=substring(at_semic[semic_cnt],length(temps)) of temps; fi - endfor - fi + info_cnt:=split_char(temps,";")+1; for i=1 upto info_cnt: info_s[i]:=arg_s[i]; endfor fi fi fi endfor @@ -1720,33 +1636,37 @@ def mc_query(text s)= for i=1 upto unit_cnt: for j=1 upto row_cnt[order_tbl[i]]: printf line_s[order_tbl[i]][j]; endfor endfor - else: for i=1 upto unit_cnt: for j=1 upto row_cnt[i]: printf line_s[i][j]; endfor endfor - fi + else: for i=1 upto unit_cnt: for j=1 upto row_cnt[i]: printf line_s[i][j]; endfor endfor fi closefrom file_input; closefrom file_output; endgroup; enddef; %============================================================================================= vardef fix_str(expr n,s)= if length(s)<n: sS:=s&substring(0,n-length(s)) of blanks; - ef length(s)>n: sS:=substring(0,n) of s; fi sS -enddef; + ef length(s)>n: sS:=substring(0,n) of s; fi sS enddef; %------------------------------------------------------------------------------------------------- vardef fix_num(expr s)= sS:=s; nN:=scan_char(".",sS,0,1); if nN=0: sS:=fsr(4)(sS); ef nN=1: sS:=" 0"&sS; - ef nN=2: sS:=" "&sS; ef nN=3: sS:=" "&sS; ef nN=4: sS:=" "&sS; fi sS -enddef; + ef nN=2: sS:=" "&sS; ef nN=3: sS:=" "&sS; ef nN=4: sS:=" "&sS; fi sS enddef; %------------------------------------------------------------------------------------------------- vardef is_num(expr s)= for i=1 upto length(s): if ((subc(i,s)>="0")and(subc(i,s)<="9"))or(subc(i,s)="."): nN:=1; else: nN:=0; fi endfor nN enddef; -%------------------------------------------------------------------------------------------------- -vardef split_semic(expr s)= - nN:=at_semic[0]:=0; for i=1 upto length(s): if subc(i,s)=";": at_semic[incr nN]:=i; fi endfor nN +%-------------------------------------------------------------------------------------------------- +vardef scan_bit(expr n,b)= if b>=1: odd(floor(n/b)) else: odd(floor((frac n)/b)) fi enddef; +%-------------------------------------------------------------------------------------------------- +vardef scan_char(expr c,s,d,n)= + nN:=0; if d=0: for i=n upto length(s): if subc(i,s)=c: nN:=i; fi exitif nN>0; endfor + ef d=1: for i=n upto length(s): if subc(i,s)<>c: nN:=i; fi exitif nN>0; endfor + ef d=-1: for i=length(s) downto n: if subc(i,s)<>c: nN:=i; fi exitif nN>0; endfor fi nN enddef; %------------------------------------------------------------------------------------------------- -vardef split_comma(expr s)= - nN:=at_comma[0]:=0; for i=1 upto length(s): if subc(i,s)=",": at_comma[incr nN]:=i; fi endfor nN -enddef; +vardef scan_chars(expr s,c)= + nN:=0; for i=1 upto length(s): if subc(i,s)=c: at_char[incr nN]:=i; fi endfor nN enddef; +%------------------------------------------------------------------------------------------------- +vardef split_char(expr s,c)= + nN:=scan_chars(s,c); at_char[nN+1]:=length(s)+1; + for i=1 upto nN+1: arg_s[i]:=substring(at_char[i-1],at_char[i]-1) of s; endfor nN enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/graphics/mcf2graph/mcf_exa_code.pdf b/graphics/mcf2graph/mcf_exa_code.pdf Binary files differindex 59e94dd93e..51743be2c8 100644 --- a/graphics/mcf2graph/mcf_exa_code.pdf +++ b/graphics/mcf2graph/mcf_exa_code.pdf diff --git a/graphics/mcf2graph/mcf_exa_code.tex b/graphics/mcf2graph/mcf_exa_code.tex index b7d3807fe6..1be25c7aba 100644 --- a/graphics/mcf2graph/mcf_exa_code.tex +++ b/graphics/mcf2graph/mcf_exa_code.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Print out mcf data list by A.Yamaji 2022.03.27 +% Print out mcf data list by A.Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mf must be version 4.83 +% ** mcf2graph.mf must be version 4.84 % ** use mcf_library.mcf % ** typeset by LuaLaTeX(luamplib) \documentclass{article} @@ -17,6 +17,7 @@ outputformat:="eps"; sw_output:=Fig+Calc; fsize:=(35mm,34mm); + fmargin:=(1mm,1mm); max_blength:=4mm; row_h:=3.8mm; header_h:=3.8mm; @@ -110,7 +111,6 @@ VerbatimTeX("\gdef\EOF{"&decimal(f_EOF)&"}"); \end{mplibcode}\vspace{-1.2pt}\\ %------------------------------------------------------------------------ -%%%%%%%\ifnum\fig@num=10 \CONT@false \fi% \ifx\EOF\one \CONT@false \fi% \message{[\the\fig@num:\EN]}% \ifCONT@ \repeat% diff --git a/graphics/mcf2graph/mcf_exa_soc.mp b/graphics/mcf2graph/mcf_exa_soc.mp index b4144fd0ce..0c4b39380d 100644 --- a/graphics/mcf2graph/mcf_exa_soc.mp +++ b/graphics/mcf2graph/mcf_exa_soc.mp @@ -1,8 +1,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format by Akira Yamaji 2022.03.27 +% Molecular Coding Format by Akira Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph; %%% it must be version 4.83 -message "* mcf_exa_soc 2022.03.27"; +input mcf2graph; %%% it must be version 4.84 +message "* mcf_exa_soc 2022.05.08"; message ""; %------------------------------------------------------------------------------ %%%%sw_frame:=Outside; diff --git a/graphics/mcf2graph/mcf_example.pdf b/graphics/mcf2graph/mcf_example.pdf Binary files differindex f14cc81259..9afd61cf8e 100644 --- a/graphics/mcf2graph/mcf_example.pdf +++ b/graphics/mcf2graph/mcf_example.pdf diff --git a/graphics/mcf2graph/mcf_example.tex b/graphics/mcf2graph/mcf_example.tex index c356799a8f..fee9b0ba5d 100644 --- a/graphics/mcf2graph/mcf_example.tex +++ b/graphics/mcf2graph/mcf_example.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.03.27 +% Example of MCF Typeset with LuaLaTeX(luamplib) by A.Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mf must be version 4.83 +% ** mcf2graph.mf must be version 4.84 % ** use mcf_library.mcf % ** typeset by LuaLaTeX(luamplib) \documentclass{article} diff --git a/graphics/mcf2graph/mcf_library.mcf b/graphics/mcf2graph/mcf_library.mcf index 2ea49f3b41..b23c8c6611 100644 --- a/graphics/mcf2graph/mcf_library.mcf +++ b/graphics/mcf2graph/mcf_library.mcf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% molecular library file mcf_library.mcf by Akira Yamaji 2022.03.27 +% molecular library file mcf_library.mcf by Akira Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % tag1:var1;tag2:var2;tag3:var3 ..... % first character of line "%" comment out @@ -9,7 +9,7 @@ % Cat = Category %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %============================================================================== -% molecular data for mcf_example.tex EXA=1(155) +% molecular data for mcf_example.tex EXA=1(155) EXA=2(7) %-============================================================================= Cat:biological;EN:Adenine;MW:135.13;EXA:1 + @@ -384,6 +384,14 @@ Cat:biological;EN:Chlorophyll a;MW:893.509;EXA:1 @2,*\^-6,!2,//O,!,O,!2,!!,|,!13,{1,5,9,13}:/_ +------------------------------------------------------------------------------ %============================================================================== +Cat:biological;EN:Apigenin;MW:270.24;EXA:- ++ +<30,Ph,3=?6,9=dl,10:O,7://O,@9,\,Ph,{2,6,14}:/OH ++------------------------------------------------------------------------------ +Cat:biological;EN:Luteolin;MW:286.24;EXA:- ++ +<30,Ph,3=?6,9=dl,10:O,7://O,@9,\,Ph,{2,6,14,15}:/OH ++------------------------------------------------------------------------------ Cat:biological;EN:Flavone;MW:222.24;EXA:1 + <30,Ph,3=?6,9=dl,10:O,7://O,9:/Ph, @@ -701,6 +709,15 @@ Cat:synthetic;EN:Melamine;MW:126.12;EXA:1 <30,Ph,{2,4,6}:N,{1,3,5}:/NH2 +------------------------------------------------------------------------------ %============================================================================== +Cat:synthetic;EN:Tartrazine;MW:534.3;EXA:1 ++ +<30,Ph,1:/SO3Na,@4,\,N,!!,N,!,<-12,?5,{-2,-5}=dl,{-2,-3}:N,-1:/COONa,-4:/OH, + @-3,-12,Ph,-3:/SO3Na ++------------------------------------------------------------------------------ +Cat:synthetic;EN:Erythrosine;MW:835.9;EXA:1 ++ +<30,Ph,{3,9}=?6,{8,13,16}=dl,10:O,-2://O,{1,5,12,14}:/I,@7,\,Ph,-1:/COOH,6:/OH ++------------------------------------------------------------------------------ Cat:synthetic;EN:Sudan red 1;MW:248.28;EXA:1 + <30,Ph,1=Ph,4:/OH,@3,\,N,!!,N,!,Ph @@ -965,7 +982,7 @@ Cat:pesticide;EN:Acrinathrin;MW:541.45;EXA:1 <-30,?3,{2^-35,2'^35}:*/_, @1,\,!~dl,!,//O,!,O,!,/CF3,!,CF3,@3,\,//O,!,O,!,/CN,!,Ph,-4:/OPh>rl +------------------------------------------------------------------------------ -Cat:pesticide;EN:Azaconazole;MW:300.139;EXA:1 +Cat:pesticide;EN:Azaconazole;MW:300.139;EXA:- + <30,Ph,{4,6}:/Cl,@3,\,!2,?5,{-2,-4}=dl,{-2,-4,-5}:N,@7,?5,{-1,-4}:O +------------------------------------------------------------------------------ @@ -2019,7 +2036,7 @@ Cat:antibacterial;EN:Sulfatiazole;MW:255.31;EXA:- + <30,Ph,1:/NH2,@4,\,SOO,!,NH,!,|,?5,{1,3}=dl,2:N,5:S +------------------------------------------------------------------------------ -Cat:antibacterial;EN:Chlopidol;MW:192.039;EXA:1 +Cat:antibacterial;EN:Chlopidol;MW:192.039;EXA:- + <30,Ph,{1,3}:/_,2:N,{4,6}:/Cl,5:/OH +------------------------------------------------------------------------------ @@ -2225,7 +2242,7 @@ Cat:biological;EN:Maitotoxin;MW:3425.86;EXA:2 {6,46,50,53,60,67,74}:*/H^-60, {9,18,85,93,112,139,143,147}:*/_^60`1,{80,88,97,108',115,120,124}:/*_^-60`1, @$6,\,|,!11,60~dr,-60,60,OH,{2',7,10}:*/OH,{1,3,8'}:*/_,11://_,12:/_, - @6,\,O,30,SOO,30,ONa, - @$36,-45~zf,O,30,SOO,30,ONa, + @6,\,O,30,SO3Na, + @$36,-45~zf,O,30,SO3Na, @$150,\,|,!7,{1,2}:/*OH,4:*/_,5:/*_,7=dl +------------------------------------------------------------------------------ diff --git a/graphics/mcf2graph/mcf_man_soc.mp b/graphics/mcf2graph/mcf_man_soc.mp index 62d042bbf7..f3344cff25 100644 --- a/graphics/mcf2graph/mcf_man_soc.mp +++ b/graphics/mcf2graph/mcf_man_soc.mp @@ -1,9 +1,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% MCF file for mcf_manual.tex by Akira.Yamaji 2022.03.27 +% MCF file for mcf_manual.tex by Akira.Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph; %% it must be version 4.83 +input mcf2graph; %% it must be version 4.84 % ** use library file 'mcf_library.mcf' -message "mcf_man_soc 2022.03.27"; message ""; +message "mcf_man_soc 2022.05.08"; message ""; %------------------------------------------------------------------------ sw_mframe:=0; sw_expand:=0; diff --git a/graphics/mcf2graph/mcf_manual.pdf b/graphics/mcf2graph/mcf_manual.pdf Binary files differindex 605c3a0c24..46fad77072 100644 --- a/graphics/mcf2graph/mcf_manual.pdf +++ b/graphics/mcf2graph/mcf_manual.pdf diff --git a/graphics/mcf2graph/mcf_manual.tex b/graphics/mcf2graph/mcf_manual.tex index 71ac080b10..e3aac3ed4b 100644 --- a/graphics/mcf2graph/mcf_manual.tex +++ b/graphics/mcf2graph/mcf_manual.tex @@ -1,7 +1,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2022.03.27 +% Molecular Coding Format manual by Akira Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} +%%%\usepackage{graphicx} +%%%\usepackage{hyperref} \usepackage[pdftex]{graphicx} \usepackage[pdftex]{hyperref} %%%\usepackage[dvipdfmx]{graphicx} @@ -1817,40 +1819,40 @@ file name = 'temp-mc.aux' \paragraph{(Output)} \begin{verbatim} =========================================================================== - No. 3 / Name = Cytosine + No[3],Name<Cytosine>,Category<biological>,File<mcf_library.mcf> --------------------------------------------------------------------------- - <30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2 +<30,?6,{4,6}=dl,4:N,3://O,2:NH,5:/NH2 +--------------------------------------------------------------------------- + Row[1],Length[37],Commands[7],&Code[59],Warning[0] --------------------------------------------------------------------------- - row= 1 / length= 37 / commands= 7 - {}=X = 1 / {}:X = 0 / '() = 0 / @ = 0 / & = 0 / < = 1 + =[1]({}=[1]), :[4]({}:[0]), '()[0] + @[0],&[0],<[1],~[0],^[0],`[0],>[0],|[0],||[0],#[0],##[0] --------------------------------------------------------------------------- - Warnings = 0 / Code= 60 - Width * Height = 34.68852 * 47.4036 - Shift width * height = 0 * -14.46167 - Bond length = 12.75589 Atom size = 5.38914 - Atom count= 9 Bond count= 9 Ring count= 1 Hide H count= 2 + Width[30.92432],Height[42.36536], Shift x[0],Shift y[-12.99213] + Bond length[11.33856],Atom size[4.8819] --------------------------------------------------------------------------- + Atom[9],Bond[9],Ring[1],Hide H[2] < NO. ><atom(s) >( x axis , y axis )<bond><hideH><chg> A1 C ( 0 , 0 ) 3 1 - A2 N ( 0.866 , -0.5 ) 3 - A3 C ( 1.732 , 0 ) 4 - A4 N ( 1.732 , 1 ) 3 - A5 C ( 0.866 , 1.5 ) 4 + A2 N ( 1 , 0 ) 3 + A3 C ( 2 , 0 ) 4 + A4 N ( 2 , 1 ) 3 + A5 C ( 1 , 2 ) 4 A6 C ( 0 , 1 ) 3 1 - A7 O ( 2.508 , -0.448 ) 2 - A8 H ( 0.866 , -0.922 ) 1 - A9 NH2 ( 0.866 , 2.371 ) 1 + A7 O ( 3 , 0 ) 2 + A8 H ( 1 , -1 ) 1 + A9 NH2 ( 1 , 2 ) 1 --------------------------------------------------------------------------- < NO. >< bond (sdt)><angle +( +- )><length ( pt )> - B1 1 -> 2 ( 1) 330 ( -30) 1 ( 12.76) - B2 2 -> 3 ( 1) 30 ( 30) 1 ( 12.76) - B3 3 -> 4 ( 1) 90 ( 90) 1 ( 12.76) - B4 4 -> 5 ( 2) 150 ( 150) 1 ( 12.76) - B5 5 -> 6 ( 1) 210 ( -150) 1 ( 12.76) - B6 6 -> 1 ( 2) 270 ( -90) 1 ( 12.76) - B7 3 -> 7 ( 2) 330 ( -30) 0.66 ( 8.42) - B8 2 -> 8 ( 1) 270 ( -90) 0.36 ( 4.59) - B9 5 -> 9 ( 1) 90 ( 90) 0.66 ( 8.42) + B1 1 -> 2 ( 1) 330 ( -30) 1 ( 11) + B2 2 -> 3 ( 1) 30 ( 30) 1 ( 11) + B3 3 -> 4 ( 1) 90 ( 90) 1 ( 11) + B4 4 -> 5 ( 2) 150 ( 150) 1 ( 11) + B5 5 -> 6 ( 1) 210 ( -150) 1 ( 11) + B6 6 -> 1 ( 2) 270 ( -90) 1 ( 11) + B7 3 -> 7 ( 2) 330 ( -30) 0.66 ( 7) + B8 2 -> 8 ( 1) 270 ( -90) 0.36 ( 4) + B9 5 -> 9 ( 1) 90 ( 90) 0.66 ( 7) --------------------------------------------------------------------------- <atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ] C ( 12.0107)[ 12] * 4 48.04279[ 48] diff --git a/graphics/mcf2graph/mcf_mplib_exa.pdf b/graphics/mcf2graph/mcf_mplib_exa.pdf Binary files differindex ed678e74bd..861f6a1596 100644 --- a/graphics/mcf2graph/mcf_mplib_exa.pdf +++ b/graphics/mcf2graph/mcf_mplib_exa.pdf diff --git a/graphics/mcf2graph/mcf_mplib_exa.tex b/graphics/mcf2graph/mcf_mplib_exa.tex index 666885b91d..1d37cc0492 100644 --- a/graphics/mcf2graph/mcf_mplib_exa.tex +++ b/graphics/mcf2graph/mcf_mplib_exa.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.03.27 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2022.05.08 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ** mcf2graph.mp must be version 4.83 +% ** mcf2graph.mp must be version 4.84 % ** use mcf_library.mcf \documentclass{article} %------------------------------------------------------------------------------ |