diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-15 22:16:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-15 22:16:51 +0000 |
commit | 3e527bd25e64ce29a3929576ea1620daea8f8065 (patch) | |
tree | c3f54022ab09417a59b86fded423e9c1e53e8f90 | |
parent | aa547f10f843ffe675b79a79a90bce546355bb36 (diff) |
mcf2graph (15dec19)
git-svn-id: svn://tug.org/texlive/trunk@53137 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf | bin | 282794 -> 282839 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf | bin | 595049 -> 594238 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex | 24 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf | bin | 171892 -> 172055 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 264 |
11 files changed, 172 insertions, 169 deletions
diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG index cc25dbbb819..0f6ac19e3d6 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG +++ b/Master/texmf-dist/doc/metapost/mcf2graph/CHANGELOG @@ -1,6 +1,12 @@ ******************************************************************************* - Changelog of mcf2graph software package by Akira Yamaji 2019-12-08 + Changelog of mcf2graph software package by Akira Yamaji 2019-12-15 ******************************************************************************* +[ver. 4.47 / 2019-12-15] + -fix bug in fused ring + -change option parameter name + sw_subst_off => sw_group_off + -update MCF manual + [ver. 4.46 / 2019-12-08] -miner update mcf2graph.mf -update MCF manual diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/README b/Master/texmf-dist/doc/metapost/mcf2graph/README index 77d1a0633a3..5f7bef71224 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/README +++ b/Master/texmf-dist/doc/metapost/mcf2graph/README @@ -1,7 +1,7 @@ ******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST Author : Akira Yamaji - version : 4.46 2019-12-08 + version : 4.47 2019-12-15 E-mail : mcf2graph@gmail.com Located at : http://www.ctan.org/pkg/mcf2graph ******************************************************************************** diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf index 367fa30c048..c3ff7cce03c 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_exa_soc.mf @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2019.12.08 +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2019.12.15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %%% it must be version 4.46 or later +input mcf2graph.mf; %%% it must be version 4.47 or later %------------------------------------------------------------------------- fsize:=(33mm,24mm); max_blength:=4.5mm; @@ -398,3 +398,14 @@ beginfont("EN:Atoropin","MW:289.375") endfont %*************************************************************************** bye +***** +bye +********************************* +beginfont("EN:Atoropin","MW:289.375") + MC(<-30,O,!,//O,!,!,Ph, + $1:\~zb^-120,|,?7`1.1,6:*\^190`1.25,N,/_,3~wb:#,$3:/!OH~wv) +endfont +%*************************************************************************** +bye +***** +bye diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf Binary files differindex 1962c106cc7..495e5707ec5 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex index 41548467ebf..871b00e1b57 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_example.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2019.10.05 +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2019.12.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage{graphicx} diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf index 38fdf95c447..10be0a74c88 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_man_soc.mf @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2019.10.05 +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2019.12.13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -input mcf2graph.mf; %% it must be version 4.45 or later +input mcf2graph.mf; %% it must be version 4.47 or later %------------------------------------------------------------------------ sw_mframe:=0; sw_expand:=0; @@ -411,25 +411,25 @@ beginfont("EN:Spiro ring ") MC(<30,!6,4:@,?5) endfont %*********************************************************************** -beginfont("EN:substituent 1") +beginfont("EN:group 1") fsize:=(60mm,25mm); sw_trimming:=1; MC(<30,!,/_,!,/!,!3,/!2,!,/iPr,!3,/tBu,!,/Ph^-30,!) endfont %*********************************************************************** -beginfont("EN:substituent 2") +beginfont("EN:group 2") fsize:=(70mm,15mm); sw_trimming:=1; MC(<-30,!`1,//O,!2`1,/*H,!2`1,*/H,!2`1,*/*H,!2`1,**?3,!`1) endfont %*********************************************************************** -beginfont("EN:substituent 3") +beginfont("EN:group 3") fsize:=(60mm,18mm); sw_trimming:=1; MC(<30,``1,!2,/_`2^30,!2,/!2>lr,!2,/!2>rl,!) endfont %*********************************************************************** -beginfont("EN:substituent 3") +beginfont("EN:group 3") fsize:=(70mm,18mm); fmargin:=(2mm,2mm); sw_numberA:=1; @@ -438,7 +438,7 @@ beginfont("EN:substituent 3") MC(<-30,!16,2:/_,4:/!,6:/!2,10:/iPr,14:/tBu,16:/Ph^-60) endfont %*********************************************************************** -beginfont("EN:substituent 4") +beginfont("EN:group 4") fsize:=(60mm,18mm); sw_trimming:=1; fmargin:=(2mm,2mm); @@ -446,7 +446,7 @@ beginfont("EN:substituent 4") MC(<-30,!6`1,{2~wf,4~zf,6^-30}:/_) endfont %*********************************************************************** -beginfont("EN:substituent 5") +beginfont("EN:group 5") fsize:=(60mm,18mm); sw_trimming:=1; sw_numberA:=1; numberA_end:=8; @@ -482,7 +482,7 @@ beginfont("EN:chain strech direction mode 3") ) endfont %*********************************************************************** -beginfont("EN:change atom and substituent") +beginfont("EN:change atom and group") fsize:=(60mm,15mm); sw_trimming:=1; MC(<30,!2,NH,!2,SO,!2,SOO,!) @@ -856,10 +856,10 @@ beginfont("EN:Switwch Expand") MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) endfont %*********************************************************************** -beginfont("EN:Switwch substituent off") +beginfont("EN:Switwch group off") fsize:=(60mm,15mm); MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) - sw_subst_off:=1; + sw_group_off:=1; MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) endfont %*********************************************************************** diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf Binary files differindex 5acaf5607ad..fa55769249c 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex index 6c16180ac59..6758b3cddb5 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_manual.tex @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Molecular Coding Format manual by Akira Yamaji 2019.12.08 +% Molecular Coding Format manual by Akira Yamaji 2019.12.15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} %%%%\documentclass[a4paper,twoside]{article} @@ -469,8 +469,8 @@ pk font,PNG,SVG,EPS or MDL MOL file. \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsection{Substituent} -\subsubsection{Insert substituent} +\subsection{Group} +\subsubsection{Insert group} \begin{verbatim} / : single <30,!,/Me,!,/Et,!3,/Pr,!,/iPr, @@ -482,7 +482,7 @@ pk font,PNG,SVG,EPS or MDL MOL file. \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsubsection{Insert modified substituent} +\subsubsection{Insert modified group} \begin{verbatim} // : double (double middle) */ : wedge forward @@ -509,14 +509,14 @@ pk font,PNG,SVG,EPS or MDL MOL file. \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsubsection{Add substituent} +\subsubsection{Add group} \begin{verbatim} <-30,!17,2:/_,4:/!,6:/!2, 10:/iPr,14:/tBu,16:/Ph^-60 \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- -\subsubsection{Add modified substituent} +\subsubsection{Add modified group} \begin{verbatim} ~,^,` : change type,angle,length @@ -568,10 +568,10 @@ pk font,PNG,SVG,EPS or MDL MOL file. %----------------------------------------------------------------------------- \subsection{Miscellaneous} %----------------------------------------------------------------------------- -\subsubsection{Change atom and Substituent} +\subsubsection{Change atom and Group} \begin{verbatim} NH,SO,SOO : - inset hetero atom and substituent + inset hetero atom and group simultaneously <30,!2,NH,!,SO,!,SOO,! @@ -621,14 +621,14 @@ pk font,PNG,SVG,EPS or MDL MOL file. %----------------------------------------------------------------------------- \subsubsection{User definition} \begin{verbatim} - user defined substructure + user defined parts iBuOH:='(!,/_,!,OH) <30,?6,{4,6}:/iBuOH \end{verbatim} \MCFgraph %----------------------------------------------------------------------------- \begin{verbatim} - Insert user defined substructure + Insert user defined parts <30,!3,/'(!,/_,!,OH),!3 \end{verbatim} \MCFgraph @@ -911,9 +911,9 @@ MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) \makebox[30mm]{\tt 0 :default}% \makebox[30mm]{\tt 1}% %----------------------------------------------------------------------------- -\subsubsection{Substituent off mode} +\subsubsection{Group off mode} \begin{verbatim} - ** default: sw_subst_off=0 + ** default: sw_group_off=0 \end{verbatim} \MCFgraph\\ \makebox[5mm]{}% diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf Binary files differindex 8d54cc5cbf3..c284c2d563c 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.pdf diff --git a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex index 24b5a19e484..580d18b45fb 100644 --- a/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex +++ b/Master/texmf-dist/doc/metapost/mcf2graph/mcf_mplib_exa.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2019.12.08 +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2019.12.15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% mcf2graph.mf it must be version 4.46 or later +%%% mcf2graph.mf it must be version 4.47 or later \documentclass{article} %------------------------------------------------------------------------------ \usepackage{luamplib}% diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index e514b439868..5ad3d1c752d 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 4.46 Copyright (c) 2013-2019 Akira Yamaji +% mcf2graph ver 4.47 Copyright (c) 2013-2019 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, @@ -38,9 +38,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% tracingstats:=1; %------------------------------------------------------------------------------------------------- -newinternal com,par,nA,nB,nC,nD,nE,nF,nP,char_num,str_cnt,sub_usr,sub_int,tbl_cnt,sharp_char; -numeric save_num[],comD[][],parD[][],cntD[],tbl_atom[],tbl_subst[][], - tbl_atom_wt[],tbl_atom_mi[],tbl_char_wd[],tbl_char_ht[],andA[],and_rot[],chargeA[]; +newinternal com,par,nA,nB,nC,nD,nE,nF,nP; +numeric save_num[],comD[][],parD[][],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; @@ -49,7 +50,7 @@ path arrow_path,arrow_head; %------------------------------------------------------------------------------------------------- char_num:=str_cnt:=proc_end:=mangle:=sw_label_emu:=sw_calc:=sw_ext_all:=0; sw_numberA:=sw_numberB:=sw_aux_out:=sw_expand:=sw_fframe:=sw_mframe:=sw_aframe:=sw_trimming:=0; -sw_rep_out:=sw_mol_out:=sw_subst_off:=sw_single:=sw_arrow:=0; +sw_rep_out:=sw_mol_out:=sw_group_off:=sw_single:=sw_arrow:=0; numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; aux_max:=max_inf_num:=20; aux_delimiter:=";"; var1:="jobname"; tag1:="F"; var2:="char_num"; tag2:="C"; for i=3 upto aux_max: var[i]:=tag[i]:=""; endfor @@ -124,7 +125,7 @@ fi clearit; %-------------------------------------------------------------------------------------------------- message "---------------------------------------------"; -message "This is mcf2graph ver 4.46 2019.12"; +message "This is mcf2graph ver 4.47 2019.12"; if f_MP=1: if bboxmargin=0: message "output no image file"; elseif bboxmargin=1: message "output first font only"; @@ -179,21 +180,21 @@ labeloffset:=3bp; ext_defaultline:=0.5bp; lonepairdiam:=lonepairspace:=circlediam:=circlepen:=0; %================================================================================================== -sub_emb_start:=500; % 500 => 2499 for embedded sub structure (max 2000) -sub_usr_start:=2500; % 2500 => 2999 for user sub structure (max 500) -sub_int_start:=3000; % 3000 => 4000 for internal sub structure (max 1000) +parts_emb_start:=500; % 500 => 2499 for embedded parts (max 2000) +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, _chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_adj_ang,_chg_env,_tmp_env,_set_colorA,_set_colorB, - _substA,_substB,_substC,_substD,_substE,_substF,_substG,_substH, + _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_); %-------------------------------------------------------------------------------------------------- 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_subst_off,sw_trimming,sw_arrow,sw_label_emu, + 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, @@ -245,7 +246,7 @@ def beginfont(text s)= cal_FM,cal_MW,cal_MW_str,cal_MI,cal_MI_str,wdM,htM, inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW, posA,posM,lineB,sB,eB,angB,angA,wdA,dxA,lenB,ang_br,info; - numeric lineB[],sB[],eB[],angB[],angA[],lenB[],angX[],numS[],wdM[],htM[],wdA[],dxA[],dx_A[]; + numeric lineB[],sB[],eB[],angB[],angA[],lenB[],angX[],numS[],wdM[],htM[],wdA[],dxA[]; pair posA[],posM[][]; string info[],sumA,s_tag,s_var,cal_FM,cal_MW,cal_MW_str,cal_MI,cal_MI_str, inf_NO,inf_EN,inf_JN,inf_FM,inf_CAS,inf_USE,inf_EXA,inf_EXB,inf_MW; @@ -337,71 +338,62 @@ def set_def_MC= def |< == (_com,5) enddef; def >| == (_com,6) enddef; def |: == (_com,7) enddef; def :| == (_com,8) enddef; def |=primary n == |<,(_chg_len,n) enddef; def =| == >| enddef; - def /secondary n == if known n:: (_substA,n) else:: _nop fi enddef; - def //secondary n == if known n:: (_substB,n) else:: _nop fi enddef; - def */secondary n == if known n:: (_substC,n) else:: _nop fi enddef; - def /*secondary n == if known n:: (_substD,n) else:: _nop fi enddef; - def **secondary n == if known n:: (_substF,n) else:: _nop fi enddef; - def */*secondary n == if known n:: (_substG,n) else:: _nop fi 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; enddef; %================================================================================================= -vardef '(text TXT)= read_command(incr sub_usr)(TXT); sub_usr enddef; +vardef '(text TXT)= read_command(incr parts_usr)(TXT); parts_usr enddef; %------------------------------------------------------------------------------------------------- def read_command(expr n)(text TXT)= begingroup - save list_cnt; + save list_cnt,nCP; if unknown inside_def_MC:: set_def_MC fi - cntD[n]:=list_cnt:=0; + nCP:=list_cnt:=0; for list==TXT:: if known list:: list_cnt:=list_cnt+1; - if pair list:: - cntD[n]:=cntD[n]+1; - comD[n][cntD[n]]:=xpart(list); parD[n][cntD[n]]:=ypart(list); + if pair list:: nCP:=nCP+1; comD[n][nCP]:=xpart(list); parD[n][nCP]:=ypart(list); elseif numeric list:: - if list==_nop:: - message "unknown command in "AND decimal(list_cnt); - elseif list>=sub_emb_start:: + if list==_nop:: message "unknown command in "AND decimal(list_cnt); + elseif list>=parts_emb_start:: for i==1 upto cntD[list]:: - cntD[n]:=cntD[n]+1; - comD[n][cntD[n]]:=comD[list][i]; parD[n][cntD[n]]:=parD[list][i]; + nCP:=nCP+1; comD[n][nCP]:=comD[list][i]; parD[n][nCP]:=parD[list][i]; endfor - else:: - cntD[n]:=cntD[n]+1; - comD[n][cntD[n]]:=_mk_bond; parD[n][cntD[n]]:=list; + else:: nCP:=nCP+1; comD[n][nCP]:=_mk_bond; parD[n][nCP]:=list; fi elseif string list:: str_cnt:=str_cnt+1; strD[str_cnt]:=list; - cntD[n]:=cntD[n]+1; - comD[n][cntD[n]]:=_set_atom; parD[n][cntD[n]]:=str_cnt; + nCP:=nCP+1; comD[n][nCP]:=_set_atom; parD[n][nCP]:=str_cnt; fi - else:: - message "unknown command in "AND decimal(list_cnt); + else:: message "unknown command in "AND decimal(list_cnt); fi endfor + cntD[n]:=nCP; endgroup enddef; %------------------------------------------------------------------------------------------------- vardef read_number(text TXT)= - sub_int:=sub_int+1; - cntD[sub_int]:=0; + save nN; + parts_int:=parts_int+1; + nN:=0; for list==TXT:: if known list:: - if numeric list:: - if list==_nop:: message "unknown command in "AND decimal(sub_int); - else:: - cntD[sub_int]:=cntD[sub_int]+1; - comD[sub_int][cntD[sub_int]]:=_numeric; parD[sub_int][cntD[sub_int]]:=list; + if numeric list:: + if list==_nop:: message "unknown command in "AND decimal(parts_int); + else:: nN:=nN+1; comD[parts_int][nN]:=_numeric; parD[parts_int][nN]:=list; fi elseif pair list:: - cntD[sub_int]:=cntD[sub_int]+1; - comD[sub_int][cntD[sub_int]]:=xpart(list); parD[sub_int][cntD[sub_int]]:=ypart(list); + nN:=nN+1; comD[parts_int][nN]:=xpart(list); parD[parts_int][nN]:=ypart(list); fi - else:: - message "unknown command in "AND decimal(sub_int); + else:: message "unknown command in "AND decimal(parts_int); fi endfor - sub_int %------- Retern value ------- + cntD[parts_int]:=nN; + parts_int %------- Retern value ------- enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def fuse_ring(expr a,b) = @@ -412,7 +404,7 @@ enddef; %------------------------------------------------------------------------------------------------- def fuse_ring_bonds(expr a,b,c) = CP(_jp_bond,xpart(a)) CP(_rot_ang,180) CP(_com,5) - if b==6:: CP(_chg_len,0) for i==1 upto c-1:: CP(_mk_bond,60) endfor + 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 @@ -430,12 +422,14 @@ def fuse_ring_rate(expr a,b,c) = enddef; %================================================================================================== vardef change_bond(expr a,b) = + save nCP; if known b:: - sub_int:=sub_int+1; cntD[sub_int]:=0; + parts_int:=parts_int+1; + nCP:=0; if numeric b:: if (b>=si)and(b<=bd_):: CPe(a)(_set_line,b) elseif (b>=?3)and(b<=?20):: - if a>=sub_int_start:: for i==1 upto cntD[a]:: fuse_ring(parD[a][i],b-?3+3) endfor + if a>=parts_int_start:: for i==1 upto cntD[a]:: fuse_ring(parD[a][i],b-?3+3) endfor else:: fuse_ring(a,b-?3+3) fi elseif b==Ph1:: fuse_ring(a,6) CP(_dl,-2) CP(_dl,-4) @@ -449,16 +443,19 @@ vardef change_bond(expr a,b) = fi elseif color b:: color_list[incr cntC]:=b; CPe(a)(_set_colorB,cntC) fi - sub_int %------- Retern value ------- + cntD[parts_int]:=nCP; + parts_int %------- Retern value ------- fi enddef; %------------------------------------------------------------------------------------------------- vardef change_atom(expr a,b)= + save nCP; if known b:: - sub_int:=sub_int+1; cntD[sub_int]:=0; + parts_int:=parts_int+1; + 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)(_substH,H) CP(_set_clr,0) + ef b==NH:: CPe(a)(_chg_atom,N) CP(_set_clr,1) CPx(a)(_groupH,H) CP(_set_clr,0) ef b==_jump_at:: CP(_jp_atom,a) ef b==_connect_at:: CP(_cyc,a) fi @@ -468,7 +465,20 @@ vardef change_atom(expr a,b)= fi ef color b:: color_list[incr cntC]:=b; CPe(a)(_set_colorA,cntC) fi - sub_int %------- Retern value ------- + cntD[parts_int]:=nCP; + parts_int %------- Retern value ------- + fi +enddef; +%------------------------------------------------------------------------------------------------- +def com_par(expr a,b)= nCP:=nCP+1; comD[parts_int][nCP]:=a; parD[parts_int][nCP]:=b; enddef; +%------------------------------------------------------------------------------------------------- +def com_par_ext(expr f)(expr c)(expr a,b)= + if c>=parts_int_start:: + for i==1 upto cntD[c]:: + if comD[c][i]==_numeric:: com_par(_set_adr,parD[c][i]) com_par(a,b) + ef f==1:: com_par(comD[c][i],parD[c][i]) fi + endfor + else:: com_par(_set_adr,c) com_par(a,b) fi enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -578,11 +588,9 @@ def ext_font(text TXT)= enddef; %-------------------------------------------------------------------------------------------------- vardef image_emu(text TXT) = - save_picture:=currentpicture; - currentpicture:=nullpicture; + save_picture:=currentpicture; currentpicture:=nullpicture; TXT; - temp_picture:=currentpicture; - currentpicture:=save_picture; + temp_picture:=currentpicture; currentpicture:=save_picture; temp_picture enddef; %-------------------------------------------------------------------------------------------------- @@ -624,9 +632,7 @@ vardef urcorner_emu(expr b)= (scan_picture(b,4),scan_picture(b,2)) enddef; vardef ulcorner_emu(expr b)= (scan_picture(b,3),scan_picture(b,2)) enddef; %-------------------------------------------------------------------------------------------------- vardef circled_plus_add= - save nA,nB; - nA:=circlediam; - nB:=circlepen; + nA:=circlediam; nB:=circlepen; image(draw fullcircle scaled nA withpen pencircle scaled nB; draw (-.5nA,0)--(.5nA,0) withpen pencircle scaled nB; draw (0,-.5nA)--(0,.5nA) withpen pencircle scaled nB; @@ -634,18 +640,14 @@ vardef circled_plus_add= enddef; %-------------------------------------------------------------------- vardef circled_minus_add= - save nA,nB; - nA:=circlediam; - nB:=circlepen; + nA:=circlediam; nB:=circlepen; image(draw fullcircle scaled nA withpen pencircle scaled nB; draw (-.5nA,0)--(.5nA,0) withpen pencircle scaled nB; ) enddef; %-------------------------------------------------------------------- vardef lone_pair_add expr ANG= - save nA,nB; - nA:=lonepairdiam; - nB:=lonepairspace; + nA:=lonepairdiam; nB:=lonepairspace; image(draw (0,0) withpen pencircle scaled nA; draw ((0,nB) rotated ANG) withpen pencircle scaled nA;) enddef; @@ -720,24 +722,6 @@ def ahead_angle(expr p)= angle direction .5ahlength/length(point 1 of p - point 0 of p) of p enddef; %================================================================================================= -def com_par(expr a,b)= - cntD[sub_int]:=cntD[sub_int]+1; comD[sub_int][cntD[sub_int]]:=a; parD[sub_int][cntD[sub_int]]:=b; -enddef; -%------------------------------------------------------------------------------------------------- -def com_par_op(expr a,b)= - op_cnt[cntS]:=op_cnt[cntS]+1; op_com[cntS][op_cnt[cntS]]:=a; op_par[cntS][op_cnt[cntS]]:=b; -enddef; -%------------------------------------------------------------------------------------------------- -def com_par_ext(expr f)(expr c)(expr a,b)= - if c>=sub_int_start:: - for i==1 upto cntD[c]:: - if comD[c][i]==_numeric:: com_par(_set_adr,parD[c][i]) com_par(a,b) - ef f==1:: com_par(comD[c][i],parD[c][i]) fi - endfor - else:: com_par(_set_adr,c) com_par(a,b) - fi -enddef; -%================================================================================================= def MCat(expr FW,FH)(text TXT)= save_mposition:=mposition; mposition:=(FW,FH); @@ -747,25 +731,22 @@ enddef; %------------------------------------------------------------------------------------------------- def MC(text TXT)= begingroup - save markA,markB,f_bra,envT,envB,lenT,lineT,strAT,cntS,bondL,temp_lenE,temp_lenF, - temp_cntB,f_end,f_term,rotT,adrS,f_at,f_lineT,f_rotT,f_lenT,f_envT,angT, - maxX,maxY,f_char,ps_adr,ps_com,sA,sC,sD,pA,pB,factor,m_wd,m_ht, - op_com,op_par,op_cnt,crR,colorA,colorB,CP,CPo,CPe,CPx,defaultsize,defaultscale; + save markA,markB,f_bra,envT,envB,lenT,lineT,strAT,cnt_group,bondL,temp_lenE,temp_lenF, + temp_cntB,f_end,f_term,rotT,f_at,f_lineT,f_rotT,f_lenT,f_envT,angT, + maxX,maxY,sA,sC,sD,pA,pB,factor,m_wd,m_ht,crR,CP,CPe,CPx,defaultsize,defaultscale; %----------------------------------------------------------------------------------------------- def CP= com_par enddef; - def CPo= com_par_op enddef; def CPe= com_par_ext(0) enddef; def CPx= com_par_ext(1) enddef; %----------------------------------------------------------------------------------------------- - numeric f_char[],ps_adr[],ps_com[],colorA[],colorB[],op_com[][],op_par[][],op_cnt[]; string sA,sC,sD; pair pA,pB; %----------------------------------------------------------------------------------------------- if (sw_numberA>=1)or(sw_numberB>=1): ratio_atom_bond:=0.25; fi if (sw_expand=1)or(sw_mol_out>=1): expand_set; fi - sub_usr:=sub_usr_start; - sub_int:=sub_int_start; - cntA:=cntB:=cntS:=cntC:=0; strD[0]:=""; str_cnt:=2000; crR:=-ratio_chain_ring; + parts_usr:=parts_usr_start; + parts_int:=parts_int_start; + cntA:=cntB:=cnt_group:=cntC:=0; strD[0]:=""; str_cnt:=2000; crR:=-ratio_chain_ring; %----------------------------------------------------------------------------------------------- font_wd:=xpart(fsize); font_ht:=ypart(fsize); @@ -776,7 +757,7 @@ def MC(text TXT)= %----------------------------------------------------------------------------------------------- proc_bond_atom(1); %----------------------------------------------------------------------------------------------- - if (cntS>0)and(sw_subst_off=0): subst_get(1); fi + if (cnt_group>0)and(sw_group_off=0): read_group(1); fi %----------------------------------------------------------------------------------------------- char_use_check; %-scaling--------------------------------------------------------------------------------------- @@ -877,38 +858,46 @@ 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(sub_usr) &" "& decimal(sub_usr-sub_usr_start); -%%%% message "count of int ="& decimal(sub_int) &" "& decimal(sub_int-sub_int_start); +%%%% 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); %----------------------------------------------------------------------------------------------- enddef; %------------------------------------------------------------------------------------------------- -def subst_put= +def add_group= if f_at=1: nE:=getA(adrT); check_adrA(nE); else: nE:=cntA+1; fi - cntS:=cntS+1; ps_adr[cntS]:=nE; ps_com[cntS]:=par; op_cnt[cntS]:=0; - if lineT<>0: CPo(_tmp_line,lineT) fi - if rotT<>0: CPo(_rot_ang,rotT) fi - if lenT<>crR: CPo(_chg_len,lenT) fi - if envT<>hz: CPo(_chg_env,envT) fi - if lineT=nl: CPo(_chg_len,_size_atom) CPo(_adj_ang,0) fi - if lineT<>0: CPo(_mk_bond,0) 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 + 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 + for i=1 upto cntD[par]: store_group(comD[par][i],parD[par][i]) endfor + store_group(_com,6) store_group(_com,3) if f_lineT=0: lineT:=si; fi if f_lenT=0: lenT:=crR; fi if f_rotT=0: rotT:=0; fi if f_envT=0: envT:=hz; fi enddef; %------------------------------------------------------------------------------------------------- -def subst_get(expr n)= - sub_int:=0; - nA:=cntS; nB:=cntD[0]; - for i=n upto cntS: - CP(_jp_A_abs,ps_adr[i]) CP(_com,5) - for j=1 upto op_cnt[i]: CP(op_com[i][j],op_par[i][j]) endfor - for j=1 upto cntD[ps_com[i]]: CP(comD[ps_com[i]][j],parD[ps_com[i]][j]) endfor - CP(_com,6) CP(_com,3) +def store_group(expr a,b)= + cnt_group[cnt_group]:=cnt_group[cnt_group]+1; + com_group[cnt_group][cnt_group[cnt_group]]:=a; par_group[cnt_group][cnt_group[cnt_group]]:=b; +enddef; +%================================================================================================= +def read_group(expr n)= + save_cnt_group:=cnt_group; + save_cntD:=cntD[0]; + 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]; + endfor endfor - proc_bond_atom(nB+1); if cntS>nA: subst_get(nA+1); fi + proc_bond_atom(save_cntD+1); + if cnt_group>save_cnt_group: read_group(save_cnt_group+1); fi enddef; -%------------------------------------------------------------------------------------------------- +%================================================================================================= def draw_frame(expr PS,LX,LY,PN)= draw ((0,0)--(LX,0)--(LX,LY)--(0,LY)--cycle) shifted PS withpen pensquare scaled PN; enddef; @@ -967,7 +956,7 @@ def char_use_check= enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def proc_bond_atom(expr n)= - f_bra:=f_end:=f_term:=rotT:=adrS:=f_lineT:=f_rotT:=f_lenT:=f_envT:=envT:=envB:=strAT:=f_at:=0; + 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; %----------------------------------------------------------------------------------------------- @@ -985,14 +974,14 @@ def proc_bond_atom(expr n)= 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 ef com=_set_atom: strAT:=par; - ef com=_substA: subst_put; - ef com=_substB: lineT:=dm; subst_put; - ef com=_substC: lineT:=wf; subst_put; - ef com=_substD: lineT:=zf; subst_put; - ef com=_substE: lineT:=nl; subst_put; - ef com=_substF: lineT:=0; subst_put; - ef com=_substG: lineT:=wv; subst_put; - ef com=_substH: lineT:=nl; lenT:=_size_atom; subst_put; + 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; @@ -1039,7 +1028,7 @@ def proc_skeleton= begingroup save posBs,posBe; pair posBs,posBe; - markA:=markB:=cntA:=cntB:=adrS:=f_end:=f_bra:=rotT:=f_term:=f_at:=0; + markA:=markB:=cntA:=cntB:=f_end:=f_bra:=rotT:=f_term:=f_at:=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); %----------------------------------------------------------------------------------------------- @@ -1056,7 +1045,7 @@ def proc_skeleton= 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>=_substA)and(com<=_substH): rotT:=0; + ef (com>=_groupA)and(com<=_groupH): 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 @@ -1125,14 +1114,11 @@ vardef glu_atom(expr NUM)= enddef; %-------------------------------------------------------------------------------------------------- vardef proc_env(expr ANG,ENV)= - save nANG,nCW,nCC; - nCC:=60; nCW:=-nCC; - nANG:=(ANG mod 360); - if ENV>=sub_emb_start: - parD[ENV][cntB-temp_cntB] + nA:=(ANG mod 360); + if ENV>=parts_emb_start: parD[ENV][cntB-temp_cntB] else: - if ENV=hz: if nANG=0:nCC ef nANG<=90:nCW ef nANG<=180:nCC ef nANG<270:nCW else:nCC fi - ef ENV=vt: if nANG=0:nCW ef nANG<90:nCC ef nANG<=180:nCW ef nANG<=270:nCC else:nCW fi + if ENV=hz: if nA=0:60 ef nA<=90:-60 ef nA<=180:60 ef nA<270:-60 else:60 fi + ef ENV=vt: if nA=0:-60 ef nA<90:60 ef nA<=180:-60 ef nA<=270:60 else:-60 fi ef (ENV>=-180)and(ENV<=180): ENV fi fi @@ -1260,7 +1246,7 @@ vardef frame_str(expr NUM)= (posA[NUM]-(.5nA+iif((dxA[NUM]=-1)and(wdA[NUM]>atom_wd),nB-nA,0),.5nA)) enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -sub_usr:=sub_emb_start; +parts_usr:=parts_emb_start; %------------------------------------------------------------------------------------------------- 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) @@ -1285,7 +1271,7 @@ 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^}"); %------------------------------------------------------------------------------------------------- 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,(_substE,H)); +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); @@ -1302,7 +1288,7 @@ CBr2:='(/Br,60,Br); CF3:='(/F,/F^60,60,F); CCl3:='(/Cl,/Cl^60,60,Cl); CBr3:='(/B %================================================================================================== init_par(parameter_list); %-------------------------------------------------------------------------------------------------- -%%%%%%message "count of sub_usr =" & decimal(sub_usr); +%%%%%%message "count of parts_usr =" & decimal(parts_usr); %-------------------------------------------------------------------------------------------------- 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); @@ -1504,7 +1490,7 @@ def STb(expr ATOM)(text TXT)= for list=TXT: tbl_atom[tbl_cnt]:=tbl_atom[tbl_cnt]+1; for j=1 upto tbl_cnt: - if list=tbl_atom_str[j]: tbl_subst[tbl_cnt][tbl_atom[tbl_cnt]]:=j; fi + if list=tbl_atom_str[j]: tbl_group[tbl_cnt][tbl_atom[tbl_cnt]]:=j; fi endfor endfor enddef; @@ -1576,7 +1562,7 @@ def proc_calc= for j=1 upto tbl_cnt: if strD[numS[i]]=tbl_atom_str[j]: if tbl_atom[j]=0: sumA[j]:=sumA[j]+1; - else: for k=1 upto tbl_atom[j]: sumA[tbl_subst[j][k]]:=sumA[tbl_subst[j][k]]+1; endfor fi + else: for k=1 upto tbl_atom[j]: sumA[tbl_group[j][k]]:=sumA[tbl_group[j][k]]+1; endfor fi knownA:=1; fi endfor if knownA=0: warning(" Unknown Str("&strD[numS[i]]&") is used "&decimal(i)); fi endfor |