summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-26 22:19:38 +0000
committerKarl Berry <karl@freefriends.org>2020-01-26 22:19:38 +0000
commit9fc6341d273edf6d5788c3a0a404a0fed4bdc058 (patch)
treebec6c80d04ba62be6ec1c65cc6c411496f04f4e3 /Master/texmf-dist/metapost
parentbfd3a742581519a88ea734f6981249de3acbc69f (diff)
mcf2graph (26jan20)
git-svn-id: svn://tug.org/texlive/trunk@53550 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf333
1 files changed, 163 insertions, 170 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index 5ad3d1c752d..15aeb765196 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 4.47 Copyright (c) 2013-2019 Akira Yamaji
+% mcf2graph ver 4.48 Copyright (c) 2013-2020 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,
@@ -39,12 +39,12 @@
tracingstats:=1;
%-------------------------------------------------------------------------------------------------
newinternal com,par,nA,nB,nC,nD,nE,nF,nP;
-numeric save_num[],comD[][],parD[][],cntD[],tbl_atom[],tbl_group[][],f_char[],
+numeric save_num[],comD[][],parD[][],adrD[][],cntD[],tbl_atom[],tbl_group[][],f_char[],
tbl_atom_wt[],tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[],andA[],and_rot[],chargeA[],
com_group[][],par_group[][],cnt_group[],colorA[],colorB[];
-string save_str[],tbl_atom_str[],strD[],var[],tag[],out_file_name,out_file_aux,
- out_file_rep,out_file_mcl,aux_delimiter,atomfont,save_atomfont,save_defaultfont;
-pair save_pair[],msize,mposition,fsize,fmargin,save_mposition;
+string save_str[],tbl_atom_str[],strD[],var[],tag[],mpc_name[],out_file_name,out_file_aux,
+ out_file_rep,out_file_mpc,aux_delimiter,atomfont,save_atomfont,save_defaultfont;
+pair save_pair[],msize,mposition,fsize,fmargin,save_mposition,posBs,posBe;
picture mol_stru[],save_picture,temp_picture;
path arrow_path,arrow_head;
%-------------------------------------------------------------------------------------------------
@@ -64,7 +64,7 @@ if (known green)and(known ahlength):
%-----------------------------------------------------------------------------------------
atomfont:=defaultfont:="";
out_file_aux:=jobname&"-info.aux";
- out_file_mcl:=jobname&"-mcl.txt";
+ out_file_mpc:=jobname&"-mpc.txt";
out_file_rep:=jobname&"-report.txt";
def out_file_mol= jobname&"-"&fit_zero(char_num)&"-"&inf_EN&".mol" enddef;
%--default ahangle=45---------------------------------------------------------------------
@@ -125,7 +125,7 @@ fi
clearit;
%--------------------------------------------------------------------------------------------------
message "---------------------------------------------";
-message "This is mcf2graph ver 4.47 2019.12";
+message "This is mcf2graph ver 4.48 2020.01";
if f_MP=1:
if bboxmargin=0: message "output no image file";
elseif bboxmargin=1: message "output first font only";
@@ -136,7 +136,6 @@ if f_MP=1:
if ahlength=1: message "output aux file";
message "out_file_aux="&out_file_aux;
message "aux_delimiter="&aux_delimiter;
- message "aux_delimiter="&aux_delimiter;
elseif ahlength=2: message "output report file";
message "out_file_rep="&out_file_rep;
elseif ahlength=5: message "output MOL file(V2000)";
@@ -185,24 +184,23 @@ parts_usr_start:=2500; % 2500 => 2999 for user parts (max 500)
parts_int_start:=3000; % 3000 => 4000 for internal parts (max 1000)
%--------------------------------------------------------------------------------------------------
def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; endfor enddef;
-def_com(-4090)(_com,_jp_atom,_jp_A_abs,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_dl,_tmp_line,
+def_com(-4090)(_com,_jp_atom,_jp_absA,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_dl,_tmp_line,
_chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_adj_ang,_chg_env,_tmp_env,_set_colorA,_set_colorB,
- _group,_groupA,_groupB,_groupC,_groupD,_groupE,_groupF,_groupG,_groupH,
- _set_clr,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,
- _size_atom,_numeric,_jump_at,_connect_at,_set_and,_chg_charge,_nop,
- si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,si_,wf_,wb_,bd_);
+ _group_si,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,_size_atom,_numeric,
+ _jump_at,_connect_at,_set_and,_chg_charge,_nop,_mark,_moff,_term,_len_s,_len_e,_len_ss,_len_ee,
+ _group_s,_group_e,si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,nb,si_,wf_,wb_,bd_);
%--------------------------------------------------------------------------------------------------
def parameter_list=
sw_rep_out,sw_numberA,sw_numberB,sw_mframe,sw_aux_out,sw_expand,sw_mol_out,sw_calc,sw_single,
sw_ext_all,sw_aframe,sw_fframe,sw_group_off,sw_trimming,sw_arrow,sw_label_emu,
ratio_atom_bond,ratio_thickness_bond,ratio_char_bond,ratio_chain_ring,ratio_bondgap_bond,
ratio_zebra_black,ratio_zebragap_bond,ratio_thickness_char,ratio_wedge_bond,ratio_atomgap_atom,
- lonepairdiam,lonepairspace,blength,offset_atom,offset_wedge,max_blength,offset_zebra_gap,
+ lonepairdiam,lonepairspace,blength,offset_atom,offset_wedge,max_blength,offset_zebra_gap,
offset_bond_gap,thickness_fframe,thickness_mframe,thickness_aframe,offset_thickness,
numberA_start,numberA_end,numberB_start,numberB_end,defaultsize,defaultscale,labeloffset,mangle,
fsize,fmargin,msize,mposition,defaultfont,atomfont,
- Me,Et,Pr,Bu,iPr,tBu,CH3,CF3,CCl3,CBr3,NH,NH2,NO2,OH,CHO,COOH,CN,SH,OMe,OEt,SMe,SEt,
- !CH3,!NH2,!OH,!CHO,!COOH,!CN,!SH,!NO2
+ Me,Et,Pr,Bu,iPr,tBu,CF3,CCl3,CBr3,CH3,NH,NH2,NO2,OH,CHO,COOH,CN,SH,OMe,OEt,SMe,SEt,
+ !CH3,!NH2,!NO2,!OH,!CHO,!COOH,!CN,!SH,!2CH3,!2NH2,!2NO2,!2OH,!2CHO,!2COOH,!2CN,!2SH
enddef;
%--------------------------------------------------------------------------------------------------
def ]]]=] ] ] enddef;
@@ -313,42 +311,37 @@ def endfont=
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def set_def_MC=
- save /,//,/*,*/,**,*/*,~,^,`,<,>,>>,&,:,=,\,\\,*\,\*,*\*,@,$,{,},#,|,||,|||,|=,=|,|<,>|,|:,:|,
- _,d,w,z,inside_def_MC;
+ save /,//,/*,*/,**,*/*,~,^,`,``,<,>,&,:,=,\,\\,*\,\*,*\*,@,#,@#,$,{,},
+ |,||,|||,|=,=|,|<,>|,|:,:|,_,d,w,z,inside_def_MC;
inside_def_MC:=1;
_:=Me; d:=db; w:=wf; z:=zf;
tertiarydef a=b == if (known a)and(known b):: change_bond(a,b) else:: _nop fi enddef;
tertiarydef a:b == if (known a)and(known b):: change_atom(a,b) else:: _nop fi enddef;
- def { == read_number( enddef;
- let } == );
+ def { == read_number( enddef; let } == );
def &primary s == (_set_and,ASCII(s)) enddef;
vardef $primary a == a-4095 enddef;
- def ``primary n == (_chg_len,n) enddef;
def <primary n == (_rot_ang,n) enddef;
- def >>primary n == (_chg_env,n) enddef;
+ def ``primary n == (_chg_len,n) enddef;
tertiarydef a^b == if known b:: (_tmp_rot,b),a else:: _nop,a fi enddef;
tertiarydef a`b == if known b:: (_tmp_len,b),a else:: _nop,a fi enddef;
tertiarydef a~b == if known b:: (_tmp_line,b),a else:: _nop,a fi enddef;
tertiarydef a>b == if known b:: (_tmp_env,b),a else:: _nop,a fi enddef;
- def # == _connect_at enddef; def @ == _jump_at enddef;
- def \ == @,0 enddef; def \\ == \~dm enddef;
- def *\ == \~wf enddef; def \* == \~zf enddef;
- def *\* == \~wv enddef;
- def | == (_com,1) enddef; def || == (_com,2) enddef; def ||| == (_com,3) enddef;
- def |< == (_com,5) enddef; def >| == (_com,6) enddef;
- def |: == (_com,7) enddef; def :| == (_com,8) enddef;
+ def # == _connect_at enddef; def @ == _jump_at enddef; primarydef a@#b == a:@,b:# enddef;
+ def \ == @,0 enddef; def \\ == \~dm enddef;
+ def *\ == \~wf enddef; def \* == \~zf enddef; def *\* == \~wv enddef;
+ def | == (_com,_mark) enddef; def || == (_com,_moff) enddef; def ||| == (_com,_term) enddef;
+ def |< == (_com,_len_s) enddef; def >| == (_com,_len_e) enddef;
+ def |: == (_com,_len_ss) enddef; def :| == (_com,_len_ee) enddef;
def |=primary n == |<,(_chg_len,n) enddef; def =| == >| enddef;
- def /secondary n == if known n:: (_groupA,n) else:: _nop fi enddef;
- def //secondary n == if known n:: (_groupB,n) else:: _nop fi enddef;
- def */secondary n == if known n:: (_groupC,n) else:: _nop fi enddef;
- def /*secondary n == if known n:: (_groupD,n) else:: _nop fi enddef;
- def **secondary n == if known n:: (_groupF,n) else:: _nop fi enddef;
- def */*secondary n == if known n:: (_groupG,n) else:: _nop fi enddef;
+ def /secondary n == if known n:: (_group_si,n) else:: _nop fi enddef;
+ def //secondary n == /n~dm enddef; def */secondary n == /n~wf enddef;
+ def /*secondary n == /n~zf enddef; def */*secondary n == /n~wv enddef;
+ def **secondary n == /n~nb enddef;
enddef;
%=================================================================================================
-vardef '(text TXT)= read_command(incr parts_usr)(TXT); parts_usr enddef;
+vardef '(text TXT)= read_mcf(incr parts_usr)(TXT); parts_usr enddef;
%-------------------------------------------------------------------------------------------------
-def read_command(expr n)(text TXT)=
+def read_mcf(expr n)(text TXT)=
begingroup
save list_cnt,nCP;
if unknown inside_def_MC:: set_def_MC fi
@@ -397,28 +390,28 @@ vardef read_number(text TXT)=
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def fuse_ring(expr a,b) =
- CP(_jp_bond,a) CP(_rot_ang,180) CP(_get_len,a) CP(_com,5)
+ 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,6) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi
+ 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,5)
+ CP(_jp_bond,xpart(a)) CP(_rot_ang,180) CP(_com,_len_s)
if b==6:: CP(_chg_len,_ring_len) for i==1 upto c-1:: CP(_mk_bond,60) endfor
elseif b==5:: if c==2:: CP(_chg_len,1.25) CP(_mk_bond,80)
elseif c==3:: CP(_chg_len,1.1) CP(_mk_bond,78) CP(_mk_bond,72) fi
elseif b==4:: CP(_chg_len,1.225) CP(_mk_bond,105) fi
- CP(_com,6) if ypart(a)<=0:: CP(_cyc_eB,ypart(a)-c+1) else:: CP(_cyc_eB,ypart(a)) fi
+ CP(_com,_len_e) if ypart(a)<=0:: CP(_cyc_eB,ypart(a)-c+1) else:: CP(_cyc_eB,ypart(a)) fi
enddef;
%-------------------------------------------------------------------------------------------------
-def fuse_ring_rate(expr a,b,c) =
- CP(_jp_bond,a) CP(_rot_ang,180) CP(_com,5) CP(_chg_len,c DIV 10)
+def fuse_ring_size(expr a,b,c) =
+ CP(_jp_bond,a) CP(_rot_ang,180) CP(_com,_len_s) CP(_chg_len,c DIV 10)
if b==5:: CP(_mk_bond,72-((c-9) MUL 1.5)) CP(_mk_bond,72+(c-9)) CP(_mk_bond,72+(c-9))
elseif b==6:: CP(_mk_bond,60-(c-8)) for i==1 upto 3:: CP(_mk_bond,60+((c-8) DIV 2)) endfor
elseif 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
elseif 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,6) if a<=0:: CP(_cyc_eB,a-b+2) else:: CP(_cyc_eB,a) fi
+ 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) =
@@ -438,7 +431,7 @@ vardef change_bond(expr a,b) =
elseif b==_connect_at:: CP(_cyc_sB,a)
elseif comD[b][1]==_fuse::
if comD[b][2]<=6:: fuse_ring_bonds(a,parD[b][1],comD[b][2])
- elseif (comD[b][2]>=11)and(comD[b][2]<=15):: fuse_ring_rate(a,parD[b][1],comD[b][2])
+ elseif (comD[b][2]>=11)and(comD[b][2]<=15):: fuse_ring_size(a,parD[b][1],comD[b][2])
fi
fi
elseif color b:: color_list[incr cntC]:=b; CPe(a)(_set_colorB,cntC)
@@ -455,13 +448,14 @@ vardef change_atom(expr a,b)=
nCP:=0;
if numeric b::
if (b>=H)and(b<=U):: CPe(a)(_chg_atom,b)
- ef b==NH:: CPe(a)(_chg_atom,N) CP(_set_clr,1) CPx(a)(_groupH,H) CP(_set_clr,0)
+ ef b==NH:: CPe(a)(_chg_atom,N) CP(_tmp_line,nl)
+ CP(_com,_group_s) CPx(a)(_group_si,H) CP(_com,_group_e)
ef b==_jump_at:: CP(_jp_atom,a)
ef b==_connect_at:: CP(_cyc,a)
fi
ef pair b::
if xpart(b)==_set_and:: CP(_set_and,ypart(b)) CP(_chg_charge,a)
- else:: CP(_set_clr,1) CPx(a)(xpart(b),ypart(b)) CP(_set_clr,0)
+ else:: CP(_com,_group_s) CPx(a)(xpart(b),ypart(b)) CP(_com,_group_e)
fi
ef color b:: color_list[incr cntC]:=b; CPe(a)(_set_colorA,cntC)
fi
@@ -753,25 +747,20 @@ def MC(text TXT)=
margin_lr:=xpart(fmargin);
margin_tb:=ypart(fmargin);
%===============================================================================================
- read_command(0)(TXT,|||);
- %-----------------------------------------------------------------------------------------------
- proc_bond_atom(1);
- %-----------------------------------------------------------------------------------------------
- if (cnt_group>0)and(sw_group_off=0): read_group(1); fi
- %-----------------------------------------------------------------------------------------------
+ read_mcf(0)(TXT,|||);
+ proc_bond_atom(0)(1);
+ if (cnt_group>0)and(sw_group_off=0): read_group(0)(1); fi
char_use_check;
%-scaling---------------------------------------------------------------------------------------
- if blength>1: blen:=blength; proc_size_setup; proc_skeleton; proc_scaling;
- elseif blength>0:
- blen:=font_wd*blength;
- proc_size_setup; proc_skeleton; proc_scaling;
+ if blength>1: blen:=blength; proc_size_setup; proc_skeleton(0); proc_scaling;
+ elseif blength>0: blen:=font_wd*blength; proc_size_setup; proc_skeleton(0); proc_scaling;
else:
blen:=3mm;
proc_size_setup;
if xpart(msize)<1: m_wd:=font_wd*xpart(msize); else: m_wd:=font_wd; fi
if ypart(msize)<1: m_ht:=font_ht*ypart(msize); else: m_ht:=font_ht; fi
for i=1 upto 6:
- proc_skeleton; proc_scaling;
+ proc_skeleton(0); proc_scaling;
if (mol_ht/mol_wd)>(m_ht/m_wd):
if ypart(msize)>1: factor:=ypart(msize)/mol_ht;
else: factor:=((font_ht-2margin_tb)*ypart(msize))/mol_ht;
@@ -786,7 +775,7 @@ def MC(text TXT)=
proc_size_setup;
endfor
if blen>max_blength:
- blen:=max_blength; proc_size_setup; proc_skeleton; proc_scaling;
+ blen:=max_blength; proc_size_setup; proc_skeleton(0); proc_scaling;
fi
fi
%-draw atom--------------------------------------------------------------------------------------
@@ -858,23 +847,23 @@ def MC(text TXT)=
endgroup;
if ((sw_aux_out>=1)or(sw_rep_out=1)or(sw_mol_out>=1)or(sw_calc=1))and(f_MP=1): proc_calc; fi
%-----------------------------------------------------------------------------------------------
-%%%% message "count of usr ="& decimal(parts_usr) &" "& decimal(parts_usr-parts_usr_start);
-%%%% message "count of int ="& decimal(parts_int) &" "& decimal(parts_int-parts_int_start);
+%%% message "parts_usr ="& decimal(parts_usr) &" "& decimal(parts_usr-parts_usr_start);
+%%% message "parts_int ="& decimal(parts_int) &" "& decimal(parts_int-parts_int_start);
%-----------------------------------------------------------------------------------------------
enddef;
%-------------------------------------------------------------------------------------------------
def add_group=
if f_at=1: nE:=getA(adrT); check_adrA(nE); else: nE:=cntA+1; fi
cnt_group:=cnt_group+1; cnt_group[cnt_group]:=0;
- store_group(_jp_A_abs,nE) store_group(_com,5)
- if lineT<>0: store_group(_tmp_line,lineT) fi
+ store_group(_jp_absA,nE) store_group(_com,_len_s)
+ if lineT<>nb: store_group(_tmp_line,lineT) fi
if rotT<>0: store_group(_rot_ang,rotT) fi
if lenT<>crR: store_group(_chg_len,lenT) fi
if envT<>hz: store_group(_chg_env,envT) fi
if lineT=nl: store_group(_chg_len,_size_atom) store_group(_adj_ang,0) fi
- if lineT<>0: store_group(_mk_bond,0) fi
+ if lineT<>nb: store_group(_mk_bond,0) fi
for i=1 upto cntD[par]: store_group(comD[par][i],parD[par][i]) endfor
- store_group(_com,6) store_group(_com,3)
+ store_group(_com,_len_e) store_group(_com,_term)
if f_lineT=0: lineT:=si; fi
if f_lenT=0: lenT:=crR; fi
if f_rotT=0: rotT:=0; fi
@@ -886,16 +875,16 @@ def store_group(expr a,b)=
com_group[cnt_group][cnt_group[cnt_group]]:=a; par_group[cnt_group][cnt_group[cnt_group]]:=b;
enddef;
%=================================================================================================
-def read_group(expr n)=
+def read_group(expr a)(expr n)=
save_cnt_group:=cnt_group;
- save_cntD:=cntD[0];
+ save_cntD:=cntD[a];
for i=n upto cnt_group:
for j=1 upto cnt_group[i]:
- cntD[0]:=cntD[0]+1; comD[0][cntD[0]]:=com_group[i][j]; parD[0][cntD[0]]:=par_group[i][j];
+ cntD[a]:=cntD[a]+1; comD[a][cntD[a]]:=com_group[i][j]; parD[a][cntD[a]]:=par_group[i][j];
endfor
endfor
- proc_bond_atom(save_cntD+1);
- if cnt_group>save_cnt_group: read_group(save_cnt_group+1); fi
+ proc_bond_atom(a)(save_cntD+1);
+ if cnt_group>save_cnt_group: read_group(a)(save_cnt_group+1); fi
enddef;
%=================================================================================================
def draw_frame(expr PS,LX,LY,PN)=
@@ -955,36 +944,29 @@ def char_use_check=
fi
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-def proc_bond_atom(expr n)=
+def proc_bond_atom(expr a)(expr n)=
f_bra:=f_end:=f_term:=rotT:=f_lineT:=f_rotT:=f_lenT:=f_envT:=envT:=envB:=strAT:=f_at:=0;
bondL:=crR; lenT:=crR; sB[0]:=0; eB[0]:=1; lineT:=si;
andAT:=markA:=markB:=0;
%-----------------------------------------------------------------------------------------------
- for i=n upto cntD[0]:
- com:=comD[0][i]; par:=parD[0][i];
- if com=_mk_bond: if (par=0)and(rotT<>0): rotT:=0; fi add_atom;
- ef com=_set_adr: adrT:=par;
- ef com=_com: if par=1: markA:=cntA; markB:=cntB; elseif par=2: markA:=markB:=0;
- elseif par=3: termA;
- elseif par=5: temp_lenE:=bondL; elseif par=6: bondL:=temp_lenE;
- elseif par=7: temp_lenF:=bondL; elseif par=8: bondL:=temp_lenF; fi
- ef com=_set_clr:
- f_at:=par;
- if par=1: if lineT<>si: f_lineT:=1; fi if rotT<>0: f_rotT:=1; fi
- if lenT<>crR: f_lenT:=1; fi if envT<>hz: f_envT:=1; fi
- ef par=0: f_lineT:=f_rotT:=f_lenT:=f_envT:=rotT:=envT:=0; lineT:=si; lenT:=crR; fi
+ for i=n upto cntD[a]: com:=comD[a][i]; par:=parD[a][i];
+ if com=_mk_bond: if (par=0)and(rotT<>0): rotT:=0; fi add_atom;
+ ef com=_set_adr: adrT:=par;
+ ef com=_com: if par=_mark: markA:=cntA; markB:=cntB;
+ ef par=_moff: markA:=markB:=0;
+ ef par=_term: termA;
+ ef par=_len_s: temp_lenE:=bondL; ef par=_len_e: bondL:=temp_lenE;
+ ef par=_len_ss: temp_lenF:=bondL; ef par=_len_ee: bondL:=temp_lenF;
+ ef par=_group_s: f_at:=1; if lineT<>si: f_lineT:=1; fi if rotT<>0: f_rotT:=1; fi
+ if lenT<>crR: f_lenT:=1; fi if envT<>hz: f_envT:=1; fi
+ ef par=_group_e: f_at:=0; f_lineT:=f_rotT:=f_lenT:=f_envT:=rotT:=envT:=0;
+ lineT:=si; lenT:=crR;
+ fi
ef com=_set_atom: strAT:=par;
- ef com=_groupA: add_group;
- ef com=_groupB: lineT:=dm; add_group;
- ef com=_groupC: lineT:=wf; add_group;
- ef com=_groupD: lineT:=zf; add_group;
- ef com=_groupE: lineT:=nl; add_group;
- ef com=_groupF: lineT:=0; add_group;
- ef com=_groupG: lineT:=wv; add_group;
- ef com=_groupH: lineT:=nl; lenT:=_size_atom; add_group;
- ef com=_jp_bond: termA; nA:=getB(par); check_adrB(nA); sB[cntB+1]:=sB[nA]; f_bra:=1;
- ef com=_jp_atom: termA; nA:=getA(par); check_adrA(nA); sB[cntB+1]:=nA; f_bra:=1;
- ef com=_jp_A_abs: sB[cntB+1]:=par; f_bra:=1; temp_cntB:=cntB;
+ ef com=_group_si: add_group;
+ ef com=_jp_bond: termA; nA:=getB(par); check_adrB(nA); sB[cntB+1]:=sB[nA]; f_bra:=1;
+ ef com=_jp_atom: termA; nA:=getA(par); check_adrA(nA); sB[cntB+1]:=nA; f_bra:=1;
+ ef com=_jp_absA: sB[cntB+1]:=par; f_bra:=1; temp_cntB:=cntB;
ef com=_chg_atom: numS[getA(adrT)]:=parD[par][1];
ef com=_chg_len: if par=_ring_len: bondL:=ringL; else: bondL:=par; fi
ef com=_get_len: if par=_tmp_len: if bondL=crR: bondL:=lenT; fi
@@ -1024,38 +1006,33 @@ def check_adrA(expr n)=
enddef;
def check_adrB(expr n)= if (n>cntB)or(n<=0): errmessage("cntB=[ "&decimal(n)&" ]"); fi enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-def proc_skeleton=
- begingroup
- save posBs,posBe;
- pair posBs,posBe;
- markA:=markB:=cntA:=cntB:=f_end:=f_bra:=rotT:=f_term:=f_at:=0;
+def proc_skeleton(expr a)=
+ markA:=markB:=cntA:=cntB:=f_end:=f_bra:=rotT:=f_term:=0;
envT:=envB:=f_lineT:=f_rotT:=f_lenT:=f_envT:=0; lineT:=si; angT:=mangle;
angA[0]:=angB[0]:=angX[0]:=0; posA[0]:=posBs:=posBe:=(0,0);
%-----------------------------------------------------------------------------------------------
- for i=1 upto cntD[0]:
- com:=comD[0][i]; par:=parD[0][i];
- if com=_mk_bond: if (par=0)and(rotT<>0):par:=rotT; rotT:=0; fi add_bond(par);
- ef com=_com: if par=1: markA:=cntA; markB:=cntB; elseif par=2: markA:=markB:=0;
- elseif par=3: termB; fi
+ for i=1 upto cntD[a]: com:=comD[a][i]; par:=parD[a][i];
+ if com=_mk_bond: if (par=0)and(rotT<>0):par:=rotT; rotT:=0; fi add_bond(par);
+ ef com=_com: if par=_mark: markA:=cntA; markB:=cntB;
+ ef par=_moff: markA:=markB:=0; ef par=_term: termB;
+ ef par=_group_e: lineT:=si; lenT:=crR; rotT:=envT:=0; fi
ef com=_jp_bond: termB; nA:=getB(par); posBs:=posA[sB[nA]]; angT:=angB[nA]; f_bra:=1; rotT:=0;
ef com=_jp_atom: termB; adrT:=getA(par); posBs:=posA[adrT]; angT:=angX[adrT]; f_bra:=1; rotT:=0;
- ef com=_jp_A_abs: adrT:=par; posBs:=posA[adrT];
- angT:=angX[adrT]; f_bra:=1; rotT:=0; temp_cntB:=cntB;
+ ef com=_jp_absA: adrT:=par; posBs:=posA[adrT];
+ angT:=angX[adrT]; f_bra:=1; rotT:=0; temp_cntB:=cntB;
ef com=_adj_ang: if (angT<40)or(angT>320): angT:=0;
- ef angT<140: angT:=90; ef angT<220: angT:=180; else: angT:=270; fi
+ ef angT<140: angT:=90; ef angT<220: angT:=180; else: angT:=270; fi
ef com=_rot_ang: angT:=(angT+par) mod 360;
ef com=_tmp_rot: rotT:=par;
- ef (com>=_groupA)and(com<=_groupH): rotT:=0;
+ ef com=_group_si: rotT:=0;
ef com=_chg_env: envB:=par;
ef com=_tmp_env: envT:=par;
- ef com=_set_clr: f_at:=par; if par=0: lineT:=si; lenT:=crR; rotT:=envT:=0; fi
ef com=_cyc: f_end:=1; proc_cyc(getA(par));
ef com=_cyc_sB: f_end:=1; proc_cyc(sB[getB(par)]);
ef com=_cyc_eB: f_end:=1; proc_cyc(eB[getB(par)]);
else:
fi
endfor
- endgroup
enddef;
%-------------------------------------------------------------------------------------------------
def add_bond(expr ROT)=
@@ -1070,9 +1047,7 @@ def add_bond(expr ROT)=
if lenB[cntB+1]=_size_atom: posBe:=sfB(posBs,atom_wd,angT);
else:
nA:=lenB[cntB+1];
- if nA<0: nB:=glu_atom(adrT)+glu_atom(cntA+1); nA:=abs(nA);
- else: nB:=0;
- fi
+ if nA<0: nB:=glu_atom(adrT)+glu_atom(cntA+1); nA:=abs(nA); else: nB:=0; fi
posBe:=sfB(posBs,nA*blen+nB,angT);
fi
posA[cntA+1]:=posBe; f_term:=0;
@@ -1098,19 +1073,13 @@ def termA=
enddef;
%--------------------------------------------------------------------------------------------------
def termB=
- if f_term=0:
- if f_bra=0: cntA:=cntA+1; angX[cntA]:=angT mod 360; else:f_bra:=0; fi
- f_term:=1;
- fi
+ if f_term=0: if f_bra=0: cntA:=cntA+1; angX[cntA]:=angT mod 360; else:f_bra:=0; fi f_term:=1; fi
enddef;
%--------------------------------------------------------------------------------------------------
def proc_cyc(expr n)= add_bond(angle(posA[n]-posBs)-angT); enddef;
%--------------------------------------------------------------------------------------------------
vardef glu_atom(expr NUM)=
- if numS[NUM]<>0:
- nE:=angT mod 90; nF:=0.5atom_wd; (iif(nE<45,sind(nE),cosd(nE))*nF)++nF
- else: 0
- fi
+ if numS[NUM]<>0: nE:=angT mod 90; nF:=0.5atom_wd;(iif(nE<45,sind(nE),cosd(nE))*nF)++nF else: 0 fi
enddef;
%--------------------------------------------------------------------------------------------------
vardef proc_env(expr ANG,ENV)=
@@ -1220,6 +1189,7 @@ def draw_bond(expr NUM)=
fill sfB(Ls,ww,am)--Le--sfB(Ls,ww,ap)--cycle Cp(col);
ef nL=bd_: erase draw subpath(0.15,0.85) of zA wpcs 1.6bondgap;
draw zA withpen penrazor rotated ap scaled bondgap Cp(col);
+ ef nL=nb:
fi
endgroup
enddef;
@@ -1252,48 +1222,71 @@ lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr);
for i=3 upto 20: ?[i]:='(|:,(_get_len,_ring_len),<((-180 DIV i)-90)
for j==2 upto i:: ,(360 DIV i) endfor,(_cyc_sB,1-i),:|); endfor
Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5));
-!:=!1:='((_mk_bond,_arg_ang)); !!:='(!,(_set_adr,-1),(_set_line,db));
-!!!:='(!,,(_set_adr,-1),(_set_line,tm)); !0:='(<180,180);
+!:=!1:='((_mk_bond,_arg_ang)); !!:='(!~db); !!!:='(!~tm); !0:='(<180,180);
for i=2 upto 20: ![i]:='(|:,(_get_len,_tmp_len),! for j==2 upto i::,! endfor ,:|); endfor
-Me:='(); Et:='(!); Pr:=!x2:='(!,!); Bu:=!x3:='(!,!,!);
+Me:='(); Et:='(!); Pr:='(!,!); Bu:='(!,!,!);
for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
for i=5,6,7,8: for j=11 upto 15: ?[i][j]:='((_fuse,i),(j,0)); endfor endfor
%=================================================================================================
-H :='("H");C:='("C");N:='("N");O:='("O");S:='("S");P:='("P");F:='("F");I:='("I");
-Si:='("{Si}");Al:='("{Al}");Mg:='("{Mg}");Zn:='("{Zn}");As:='("{As}");Cu:='("{Cu}");
-Ag:='("{Ag}");Au:='("{Au}");Sn:='("{Sn}");Cl:='("{Cl}");Br:='("{Br}");Li:='("{Li}");
+H :='("H");C:='("C");N:='("N");O:='("O");S:='("S");P:='("P");F:='("F");I:='("I");K:='("K");
+Si:='("{Si}");Al:='("{Al}");Mg:='("{Mg}");Zn:='("{Zn}");As:='("{As}");Co:='("{Co}");Cu:='("{Cu}");
+Ag:='("{Ag}");Au:='("{Au}");Sn:='("{Sn}");Cl:='("{Cl}");Br:='("{Br}");Li:='("{Li}");Cr:='("{Cr}");
Na:='("{Na}");Ca:='("{Ca}");Hg:='("{Hg}");Ni:='("{Ni}");Ti:='("{Ti}");U:='("U");
-H[1]:='("{H^+^}");H[-1]:='("{H^-^}");C[1]:='("{C^+^}");C[-1]:='("{C^-^}");
-O[1]:='("{O^+^}");O[-1]:='("{O^-^}");N[1]:='("{N^+^}");N[-1]:='("{N^-^}");
-S[1]:='("{S^+^}");S[-1]:='("{S^-^}");P[1]:='("{P^+^}");P[-1]:='("{P^-^}");
+B:='("B");D:='("D");Fe:='("{Fe}");Mn:='("{Mn}");Se:='("{Se}");
+H[1]:= '("{H^+^}"); H[-1]:='("{H^-^}"); C[1]:='("{C^+^}"); C[-1]:='("{C^-^}");
+O[1]:= '("{O^+^}"); O[-1]:='("{O^-^}"); N[1]:='("{N^+^}"); N[-1]:='("{N^-^}");
+S[1]:= '("{S^+^}"); S[-1]:='("{S^-^}"); P[1]:='("{P^+^}"); P[-1]:='("{P^-^}");
Li[1]:='("{Li^+^}"); Na[1]:='("{Na^+^}"); Cl[-1]:='("{Cl^-^}"); Br[-1]:='("{Br^-^}");
%-------------------------------------------------------------------------------------------------
-R:='("R"); R1:='("{R^1^}"); R2:='("{R^2^}"); R3:='("{R^3^}"); R4:='("R^4^"); R5:='("{R^5^}");
+R:='("R"); R1:='("{R^1^}"); R2:='("{R^2^}"); R3:='("{R^3^}"); R4:='("R^4^"); R5:='("{R^5^}");
+R6:='("R6"); R7:='("{R^7^}"); R8:='("{R^8^}"); R9:='("{R^9^}"); R10:='("R^10^"); R11:='("{R^11^}");
%-------------------------------------------------------------------------------------------------
CHO:='("CHO"); OH:='("OH"); COOH:='("COOH"); CH2:='("C{H_2_}"); CH3:='("C{H_3_}"); CN:='("CN");
-NH2:='("N{H_2_}"); NO2:='("N{O_2_}"); SH:='("SH"); SO3:='("S{O_3_}"); NH:='(N,(_groupE,H));
-NMe:=N!:='(N,/Me); iPr:=Me!:='(/Me,60); tBu:='(/Me,/Me^60,60);
-SO:='(S,//O); SOO :='(S,//O^-35,//O^35);
-OMe:=O!:='(O,!); OEt:=O!2:='(O,!x2); OPr:=O!3:='(O,!x3); OiPr:=OMe!:='(O,!,iPr);
-SMe:=S!:='(S,!); SEt:=S!2:='(S,!x2); SPr:=S!3:='(S,!x3); SiPr:=SMe!:='(S,!,iPr);
-COO:='(//O,!,O); COOMe:=COO!:='(COO,!); COOEt:=COO!2:='(COO,!x2); COOiPr:=COOMe!:='(COO,!,iPr);
-COOPr:=COO!3:='(COO,!x3); COOtBu:='(COO,!,tBu); COMe:=CO!:='(//O,!); COEt:=CO!2:='(//O,!x2);
-OCOMe:=OCO!:='(O,!,//O,!); NMeMe:=NMe!:='(N!,!); NHCOMe:=NHCO!:='(NH,!,//O,!);
-NHiPr:=NHMe!:='(NH,!,iPr); NHtBu:='(NH,!,tBu); NHMe:=NH!:='(NH,!); NHEt:=NH!2:='(NH,!x2);
-!NH!:='(!,NH,!); !CO!:='(!,//O,!); !OH:='(!,OH); !SH:='(!,SH); !NH2:='(!,NH2); !OMe:=!O!:='(!,OMe);
-!COOH:='(!,COOH); !CH3:='(!,CH3); !CN:='(!,CN); !iPr:=!Me!:='(!,iPr); !tBu:='(!,tBu); !Ph:='(!,Ph);
-!CHO:='(!,CHO); !NO2:='(!,NO2); !Cl:='(!,Cl); !F:='(!,F);
-!?3:='(!,?3); !?4:='(!,?4); !?5:='(!,?5); !?6:='(!,?6); CF2:='(/F,60,F); CCl2:='(/Cl,60,Cl);
-CBr2:='(/Br,60,Br); CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/Br,/Br^60,60,Br);
+NH2:='("N{H_2_}"); NO2:='("N{O_2_}"); SH:='("SH"); SO3:='("S{O_3_}"); NH:='(N,/H~nl);
+%-------------------------------------------------------------------------------------------------
+NMe:=N!:='(N,/_); iPr:=Me!:='(/_,60); tBu:='(/_,/_^60,60); SO:='(S,//O); SOO :='(S,//O^-35,//O^35);
+OMe:=O!:='(O,!); OEt:=O!2:='(O,!,!); OPr:=O!3:='(O,!,!,!); OiPr:=OMe!:='(O,!,iPr);
+SMe:=S!:='(S,!); SEt:=S!2:='(S,!,!); SPr:=S!3:='(S,!,!,!); SiPr:=SMe!:='(S,!,iPr);
+%-------------------------------------------------------------------------------------------------
+COO:='(//O,!,O); COOMe:=COO!:='(COO,!); COOEt:=COO!2:='(COO,!,!); COOiPr:=COOMe!:='(COO,!,iPr);
+COOPr:=COO!3:='(COO,!,!,!); COOtBu:='(COO,!,tBu);
+COMe:=CO!:='(//O,!); COEt:=CO!2:='(//O,!,!); COPr:=CO!3:='(//O,!,!,!);
+OCOMe:=OCO!:='(O,!,//O,!); NMeMe:=NMe!:='(N!,!); NMeEt:=NMe!2:='(N!,!,!); NMePr:=NMe!3:='(N!,!,!,!);
+NHCOMe:=NHCO!:='(NH,!,//O,!); NHiPr:=NHMe!:='(NH,!,iPr); NHtBu:='(NH,!,tBu); NHMe:=NH!:='(NH,!);
+NHEt:=NH!2:='(NH,!,!); NHPr:=NH!3:='(NH,!,!,!);
+%--------------------------------------------------------------------------------------------------
+!OH:='(!,OH); !SH:='(!,SH); !NH2:='(!,NH2);
+!COMe:=!CO!:='(!,//O,!); !COEt:=!CO!2:='(!,CO!2); !COPr:=!CO!3:='(!,CO!3);
+!OMe:=!O!:='(!,O!); !OEt:=!O!2:='(!,O!2); !OPr:=!O!3:='(!,O!3); !OiPr:=!OMe!:='(!,OMe!);
+!SMe:=!S!:='(!,S!); !SEt:=!S!2:='(!,S!2); !SPr:=!S!3:='(!,S!3); !SiPr:=!SMe!:='(!,SMe!);
+!NHMe:=!NH!:='(!,NH!); !NHEt:=!NH!2:='(!,NH!2); !NHPr:=!NH!3:='(!,NH!3); !NHiPr:=!NHMe!:='(!,NHMe!);
+!COOH:='(!,COOH); !COOMe:=!COO!:='(!,COO!); !COOEt:=!COO!2:='(!,COO!2); !COOPr:=!COO!3:='(!,COO!3);
+!COOtBu:='(!,COOtBu); !OCOMe:=!OCO!:='(!,OCO!); !NMeMe:=!NMe!:='(!,NMe!);
+!NMeEt:=!NMe!2:='(!,NMe!2); !NMePr:=!NMe!3:='(!,NMe!3);
+!CH3:='(!,CH3); !CN:='(!,CN); !iPr:=!Me!:='(!,iPr); !tBu:='(!,tBu);
+!CHO:='(!,CHO); !NO2:='(!,NO2); !Cl:='(!,Cl); !Br:='(!,Br); !F:='(!,F);
+!?3:='(!,?3); !?4:='(!,?4); !?5:='(!,?5); !?6:='(!,?6); !?7:='(!,?7); !?8:='(!,?8); !Ph:='(!,Ph);
+%--------------------------------------------------------------------------------------------------
+!2OH:='(!,!,OH); !2COOH:='(!,!,COOH); !2NH2:='(!,!,NH2); !2CN:='(!,!,CN); !2NO2:='(!,!,NO2);
+!2CH3:='(!,!,CH3); !2CHO:='(!,!,CHO); !2SH:='(!,!SH); !2tBu:='(!,!,tBu); !2Cl:='(!,!,Cl);
+!2?5:='(!,!,?5); !2?6:='(!,!,?6); !2Ph:='(!,!,Ph);
+%--------------------------------------------------------------------------------------------------
+CF2:='(/F,60,F); CCl2:='(/Cl,60,Cl); CBr2:='(/Br,60,Br);
+CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/Br,/Br^60,60,Br);
+%--------------------------------------------------------------------------------------------------
+xCH3:='(/H,/H^60,60,H); xNH:='(N,/H); xNH2:='(N,/H,60,H); xNO2:='(N,//O,60~dm,O); xOH:='(O,!,H);
+xCHO:='(//O,!,H); xCOOH:='(//O,!,O,!,H); xCN:='(!~tm,N); xSH:='(S,!,H);
%==================================================================================================
init_par(parameter_list);
%--------------------------------------------------------------------------------------------------
-%%%%%%message "count of parts_usr =" & decimal(parts_usr);
+parts_emb_end:=parts_usr;
+%%%%% message "parts_emb =" & decimal(parts_emb_start) &" => " & decimal(parts_emb_end);
%--------------------------------------------------------------------------------------------------
def expand_set=
- CH3:='(/H,/H^60,60,H); NH:='(N,/H); NH2:='(N,/H,60,H); NO2:='(N,//O,60~dm,O); OH:='(O,!,H);
- CHO:='(//O,!,H); COOH:='(//O,!,O,!,H); CN:='(!~tm,N); SH:='(S,!,H); !CH3:='(!,CH3); !OH:='(!,OH);
- !NH2:='(!,NH2); !CHO:='(!,CHO); !COOH:='(!,COOH); !CN:='(!,CN); !SH:='(!,SH); !NO2:='(!,NO2);
+ CH3:=xCH3; NH:=xNH; NH2:=xNH2; NO2:=xNO2; OH:=xOH; CHO:=xCHO; COOH:=xCOOH; CN:=xCN; SH:=xSH;
+ !CH3:='(!,CH3); !OH:='(!,OH); !NH2:='(!,NH2); !CHO:='(!,CHO); !COOH:='(!,COOH); !CN:='(!,CN);
+ !SH:='(!,SH); !NO2:='(!,NO2); !2CH3:='(!,!CH3); !2OH:='(!,!OH); !2NH2:='(!,!NH2);
+ !2CHO:='(!,!CHO); !2COOH:='(!,!COOH); !2CN:='(!,!CN); !2SH:='(!,!SH); !2NO2:='(!,!NO2);
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
def char_size_set(expr WD)(expr HT)(expr STR)=
@@ -1454,7 +1447,7 @@ fi
endgroup
enddef;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-def blank_str:= " " enddef;
+def blank_str:= " " enddef;
vardef fixed_r(expr n)(expr s)= (substring(0,n-length(s)) of blank_str)&s enddef;
vardef fixed_l(expr n)(expr s)= s&(substring(0,n-length(s)) of blank_str) enddef;
vardef fdr(expr n)(expr s)=fixed_r(n)(decimal(s)) enddef;
@@ -1496,25 +1489,25 @@ def STb(expr ATOM)(text TXT)=
enddef;
%==================================================================================================
tbl_cnt:=0;
-STa("C" ,12.0107, 12.0000000); STa("H" , 1.00794, 1.00782503223);
-STa("{Al}",26.9815, 26.98153853); STa("{As}",74.9216, 74.92159457);
-STa("B" ,10.811, 11.00930536); STa("{Br}",79.904, 78.9183376);
-STa("{Ca}",40.078, 39.962590863); STa("{Cl}",35.453, 34.968852);
-STa("{Co}",58.933194, 58.93319429); STa("{Cr}",51.9961, 51.94050623);
-STa("{Cu}",63.546, 62.92959772); STa("D" ,2.012, 2.01410177812);
-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("{N^+^}",14.0067, 14.00307400443);
+STa("C" ,12.0107, 12.0000000); STa("H" , 1.00794, 1.00782503223);
+STa("{Al}",26.9815, 26.98153853); STa("{As}",74.9216, 74.92159457);
+STa("B" ,10.811, 11.00930536); STa("{Br}",79.904, 78.9183376);
+STa("{Ca}",40.078, 39.962590863); STa("{Cl}",35.453, 34.968852);
+STa("{Co}",58.933194, 58.93319429); STa("{Cr}",51.9961, 51.94050623);
+STa("{Cu}",63.546, 62.92959772); STa("D" ,2.012, 2.01410177812);
+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("{N^+^}",14.0067, 14.00307400443);
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("{O^-^}",15.9994, 15.99491461957);
-STa("{O^p^}",15.9994, 15.99491461957); STa("P" ,30.973762, 30.97376199842);
-STa("S" ,32.065, 31.9720711744); STa("{S^p^}",32.065, 31.9720711744);
+STa("{Na}",22.98977, 22.9897692820); STa("{Ni}",58.693, 57.93534241);
+STa("O" ,15.9994, 15.99491461957); STa("{O^-^}",15.9994, 15.99491461957);
+STa("{O^p^}",15.9994, 15.99491461957); STa("P" ,30.973762, 30.97376199842);
+STa("S" ,32.065, 31.9720711744); STa("{S^p^}",32.065, 31.9720711744);
STa("{S^m^}",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("{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");
@@ -1612,7 +1605,7 @@ def proc_report_out=
out_file_name:=out_file_rep;
printf "------------------------------------------------------------------";
printf " Molecular name = "& inf_EN;
- printf " Warnings = "&fdr(3)(warning_cnt)&" / Expanded command = "&decimal(cntD[0]);
+ printf " Warnings = "&fdr(3)(warning_cnt)&" / Expanded command = "&decimal(cntD[1]);
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);
@@ -1736,4 +1729,4 @@ def proc_bond_class(expr n)=
else: nA:=1; nB:=0;
fi
enddef;
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%--------------------------------------------------------------------------------------------------