diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/mcf2graph |
Initial commit
Diffstat (limited to 'graphics/mcf2graph')
-rw-r--r-- | graphics/mcf2graph/CHANGELOG | 381 | ||||
-rw-r--r-- | graphics/mcf2graph/README | 65 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf2graph.mf | 1819 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_exa_soc.mf | 397 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_example.pdf | bin | 0 -> 282495 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_example.tex | 87 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_man_soc-064.mps | 595 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_man_soc.mf | 1142 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_manual.pdf | bin | 0 -> 594168 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_manual.tex | 1667 | ||||
-rw-r--r-- | graphics/mcf2graph/mcf_mplib_exa.pdf | bin | 0 -> 172091 bytes | |||
-rw-r--r-- | graphics/mcf2graph/mcf_mplib_exa.tex | 460 |
12 files changed, 6613 insertions, 0 deletions
diff --git a/graphics/mcf2graph/CHANGELOG b/graphics/mcf2graph/CHANGELOG new file mode 100644 index 0000000000..fa35cf4dd9 --- /dev/null +++ b/graphics/mcf2graph/CHANGELOG @@ -0,0 +1,381 @@ +******************************************************************************* + Changelog of mcf2graph software package by Akira Yamaji 2019-07-07 +******************************************************************************* +[ver. 4.44 / 2019-07-07] + -improve to ignore unknown command + +[ver. 4.43 / 2019-06-23] + -add binop for add() + a << b : a rotated b + -improve embedded font + -update MCF manual + +[ver. 4.42 / 2019-05-26] + -add function for add() + plus : circled plus + minus : circled minus + lonepair : lonepair + -add binop for add() + a ** b : a scaled b + a /* b : point of b scaled a + -add variable for add() + A[n]up : dir An + A[n]left : dir An+90 + A[n]right : dir An-90 + A[n]down : dir An+180 + B[n]up : dir Bn + B[n]left : dir Bn+90 + B[n]right : dir Bn-90 + B[n]down : dir Bn+180 + -change variable for add() + A[n]dir => A[n]ang + A[n]ang : angle of An + B[n] => Bm[n] + B[n] : bond position => path + -improve label emulation + -update MCF manual + +[ver. 4.41 / 2019-05-11] + -change syntax + |<=,=>| => |=,=| + ext() => add() + EXT() => ext() + -update MCF manual + +[ver. 4.40 / 2019-03-21] + -add function MC() + -change function name MCa() => MCat() + -delete function MCc(),MCd(),MCf() + -add angle parameter mangle + -add size parameter + thickness_mframe + -change size parameter name + bond_len => blength + max_bond_length => max_blength + font_wd,font_ht => fsize(w,h) + margin_left_right,margin_top_bottom + => fmargin(w,h) + thickness_font_frame => thickness_fframe + thickness_atom_frame => thickness_aframe + -delete ratio parameter ratio_bond_width + -delete option parameter sw_solid + -change option parameter name + sw_clip => sw_trimming + sw_bond_single => sw_single + sw_fomt_frame => sw_fframe + sw_mol_frame => sw_mframe + sw_atom_frame => sw_aframe + -update MCF manual + +[ver. 4.36 / 2019-02-11] + -fix bug in draw atom,draw bond + -delete size parameter atomfontsize + -update MCF manual + +[ver. 4.35 / 2019-01-03] + -fix bug in numbering bond + -update MCF manual + +[ver. 4.34 / 2018-11-11] + -change default driver(graphicx,hyperref) + dvipdfmx => pdftex + -change file name + mcf_man_soc-064.eps => mcf_man_soc-064.mps + -change command-line parameter settings + -change option parameter name + sw_report => sw_rep_out + -update MCF manual + +[ver. 4.33 / 2018-06-18] + -change syntax n:& + n:& => n:# + -add command &"c" + -update MCF manual and examples + +[ver. 4.32 / 2018-06-03] + -add commands C[],N[],O[],S[] + X[1] : "{X^+^}" + X[-1] : "{X^-^}" + -change option parameter name + sw_MOLout => sw_mol_out + sw_auxout => sw_aux_out + -improve MOL file output + sw_mol_out=0 : no MOL file + sw_mol_out=1 : MOL file V2000 + sw_mol_out=2 : MOL file V3000 + -update MCF manual and examples + +[ver. 4.31 / 2018-04-16] + -add command */*n , n:*\* , |<=n + */*n : /n~wv + n:*\* : n:\~wv + |<=n : |<,``n + -update MCF manual and examples + +[ver. 4.30 / 2018-01-03] + -change syntax &n + &n => n:& + -improve address error detection + -improve expand mode + -update MCF manual and examples + +[ver. 4.29 / 2017-10-29] + -miner update mcf2graph.mf + +[ver. 4.28 / 2017-09-15] + -change syntax #n + #n => $n + -update MCF syntax manual + +[ver. 4.27 / 2017-09-03] + -improve function ext(),EXT() + -update MCF syntax manual + +[ver. 4.26 / 2017-08-13] + -improve label emulation + -update MCF syntax manual + +[ver. 4.25 / 2017-07-23] + -improve label,arrow emulation + -change variable name + Bs[] => B[]s + Be[] => B[]e + B[]ang => B[]dir + A[]bra => B[]dir + -update MCF syntax manual + +[ver. 4.24 / 2017-07-17] + -atom font can be changed + -update MCF syntax manual + +[ver. 4.23 / 2017-06-04] + -change syntax n*,n\ + n* => n:@ + n\ => n:\ + -update MCF syntax manual + +[ver. 4.22 / 2017-05-27] + -change syntax @(),$() + @(a,b,...)c => {a,b,...}:c + $(a,b,...)c => {a,b,...}=c + -improve function ext() + add variable Bs[],Be[] + -update MCF syntax manual + +[ver. 4.21 / 2017-05-03] + -change brock making commands + '{','}' => '|<','>|' + -improve report output + -update MCF syntax manual + +[ver. 4.20 / 2017-03-26] + -change length expression + length# => length + -add emulation commands + dotlabel,drawarrow,drawdblarrow + -add function MCa(),MCc() + -delete function draw_vector() + -update MCF syntax manual + +[ver. 4.11 / 2017-03-06] + -improve function EXT(),ext() + -update MCF syntax manual + +[ver. 4.10 / 2017-02-13] + -improve function EXT(),ext() + -update MCF syntax manual + +[ver. 4.09 / 2017-01-29] + -add new function puts() + put string in EXT(),ext() + -add new function use_font() + make font for puts() + -change option parameter name + sw_checklist => sw_report + -update MCF syntax manual + +[ver. 4.08 / 2017-01-15] + -add monoisotopic mass calculation + -update MCF syntax manual + +[ver. 4.07 / 2017-01-09] + -add new command '!!' : '!~db' + -add new command '!!!' : '!~tm' + -add new substituent '/_' : '/Me' + -improve molecular weight calculation + -update MCF syntax manual + +[ver. 4.06 / 2017-01-03] + -miner update + -corrected molecular examples + -update MCF syntax manual + +[ver. 4.05 / 2016-11-15] + -improve molecular checklist + -update MCF syntax manual + +[ver. 4.04 / 2016-11-05] + -improve clipping mode + -update MCF syntax manual + +[ver. 4.03 / 2016-11-03] + -miner update + -update MCF syntax manual + +[ver. 4.02 / 2016-10-30] + -add function EXT(),ext() + -delete option parameter sw_start_vector + -update MCF syntax manual + +[ver. 4.01 / 2016-10-23] + -many fixes for robustness + -update MCF syntax manual + +[ver. 4.00 / 2016-10-19] + -change solid mode parameter + 1:solid ratio,2:solid length + -update MCF syntax manual + +[ver. 3.99 / 2016-10-14] + -miner update + -update MCF syntax manual + fixed page number of contents + +[ver. 3.98 / 2016-10-10] + -add option parameter sw_clip (clipping font) + -add max_bond_length , delete max_bond_width + -update MCF syntax manual + +[ver. 3.97 / 2016-08-21] + -change bond type name 'ov' to 'si_' + -add bond type 'wf_','wb_','bd_' + -update MCF syntax manual + +[ver. 3.96 / 2016-08-06] + -large scaled rings can fuse + 5,6,7,8 membered ring scaled 11/10,12/10,13/10,14/10,15/10 + -update MCF syntax manual + +[ver. 3.95 / 2016-07-10] + -improve bond type 'ov' + -update MCF syntax manual and example + +[ver. 3.94 / 2016-06-19] + -set maximum ratio atom size / bond length to 0.8 + for avoid error when font size is very small + +[ver. 3.93 / 2016-06-11] + -improve font frame + -update MCF syntax manual + +[ver. 3.92 / 2016-05-05] + -miner update + -update MCF syntax manual + +[ver. 3.91 / 2016-05-01] + -add information tag and var for fixed aux file + -update MCF syntax manual + +[ver. 3.90 / 2016-04-28] + -add parameter 'sw_auxfix' + fixed aux information format is added + It is easy to use with spreadsheet software + +[ver. 3.89 / 2016-04-10] + -add new bond type bz (broad dotted) + +[ver. 3.88 / 2016-04-06] + -rename variable 'aux_separater' => 'aux_delimiter' + +[ver. 3.87 / 2016-04-04] + -change aux information delimiter(, => ;) + a lot of molecular name include ',' + +[ver. 3.86 / 2016-04-02] + -change aux output format(command => csv) + -update MCF syntax manual + +[ver. 3.85 / 2016-03-24] + -change aux output control + -update MCF syntax manual + +[ver. 3.84 / 2016-03-19] + -improve efficiency of command @,: + -update MCF syntax manual + +[ver. 3.83 / 2016-03-05] + -change option parameter name + sw_logout => sw_auxout + sw_MOLfile => sw_MOLout + -update MCF syntax manual + +[ver. 3.82 / 2016-02-14] + -add new commands ~~,^^,'`,:> + -update MCF syntax manual + +[ver. 3.81 / 2016-02-11] + -add parameter sw_subst_off,sw_bond_single + -delete constant _skeltonA_end + -update MCF syntax manual + +[ver. 3.80 / 2016-02-06] + add new command || , divide CHANGELOG from README + change e-mail address + +[ver. 3.78 / 2016-01-16] + update MCF syntax manual and MCF luamplib example + +[ver. 3.76 / 2015-11-28] + update MCF syntax manual and MCF example + +[ver. 3.75 / 2015-10-17] + fix bug in command ** + +[ver. 3.74 / 2015-10-03] + improve bond infomation of checklist + +[ver. 3.72 / 2015-09-22] + change command ^^ to < and delete ^^ + +[ver. 3.71 / 2015-09-18] + delete command !!,?? + +[ver. 3.70 / 2015-09-16] + add new command | ,change syntax of !,!!,?,?? + +[ver. 3.63 / 2015-09-14] + add command option of numbering address,update MCF syntax manual + +[ver. 3.62 / 2015-09-07] + improve numbering bond, numbering atom, update MCF syntax manual + +[ver. 3.61 / 2015-09-01] + fix bug in local setting of font_wd# and font_ht# + +[ver. 3.59 / 2015-08-23] + update MCF syntax manual + +[ver. 3.58 / 2015-08-18] + improve calculation of molecular formula and weight + +[ver. 3.57 / 2015-08-14] + improve AUX file format + +[ver. 3.55 / 2015-08-04] + support luamplib(v2.11), renew mcf_mplib_exa.tex + +[ver. 3.54 / 2015-08-03] + maximum item number of MOLinfo can be changed + +[ver. 3.53 / 2015-07-29] + support luamplib(LuaLaTeX) + +[ver. 3.52 / 2015-07-20] + '!!4`2' can use as '{,``2,!4,}' + +[ver. 3.51 / 2015-07-19] + '?6`2' can use as '{,``2,?6,}' + +[ver. 3.50 / 2015-07-11] + first version uploaded to ctan. +****************************************************************************** diff --git a/graphics/mcf2graph/README b/graphics/mcf2graph/README new file mode 100644 index 0000000000..879a75196a --- /dev/null +++ b/graphics/mcf2graph/README @@ -0,0 +1,65 @@ +******************************************************************************** + mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST + Author : Akira Yamaji + version : 4.44 2019-07-07 + E-mail : mcf2graph@gmail.com + Located at : http://www.ctan.org/pkg/mcf2graph +******************************************************************************** + +1. Introduction + Molecular Coding Format(MCF) is new linear notation represent chemical + structure diagrams. This 'Coding' is named from coding(programing) technique + adressing,grouping,macro,etc. There are no Meta language commands in MCF. + mcf2graph.mf(METAFONT/METAPOST macro) convert MCF file to graphics file + (pk font/PNG/SVG/EPS) or MDL MOL file. + +2. The distribution of software + ( 1) README This file + ( 2) CHANGELOG Changelog file of mcf2graph + ( 3) mcf2graph.mf Macro of Metafont / Metapost + ( 4) mcf_manual.tex MCF syntax manual(LaTeX file) + ( 5) mcf_man_soc.mf Molecular difinition file for mcf_manual.tex + ( 6) mcf_man_soc-064.mps No.64 eps(with color) file of (4) + ( 7) mcf_manual.pdf PDF of (4) (used pdftex(LaTeX)) + ( 8) mcf_example.tex LaTeX example, + Make file 'mcf_exa_soc-info.aux' before typeset + >mpost -s ahlength=1 -s bboxmargin=0 mcf_exa_soc.mf + ( 9) mcf_exa_soc.mf Molecular difinition file for mcf_example.tex + (10) mcf_example.pdf PDF of (8) (used pdftex(LaTeX)) + (11) mcf_mplib_exa.tex luamplib(LuaLaTeX) example + (12) mcf_example.pdf PDF of (11) typeset with LuaTeX(LuaLaTeX) + +3. How to use mcf2graph with Metapost + Minimum requirement to run mcf2graph : mpost.exe,mpost.dll,mpost.mp,plain.mp + ( 1) >mpost -s bboxmargin=0 FILENAME => output no graphic file + ( 2) >mpost -s bboxmargin=1 FILENAME => output first font only (for test) + ( 3) >mpost -s ahangle=0 FILENAME => output eps file (.mps default) + ( 4) >mpost -s ahangle=1 FILENAME => output png file + ( 5) >mpost -s ahangle=2 FILENAME => output svg file + ( 6) >mpost -s ahangle=3 FILENAME => output eps file (.eps) + ( 7) >mpost -s ahlength=1 FILENAME => output aux file + ( 8) >mpost -s ahlength=2 FILENAME => output report file + ( 9) >mpost -s ahlength=5 FILENAME => output mol file(V2000) + (10) >mpost -s ahlength=6 FILENAME => output mol file(V3000) + (11) >mpost -s labeloffset=1 FILENAME => use plain.mp 'label','drawarrow' + (12) >mpost -s labeloffset=2 FILENAME => atomfont="uhvr8r" + +4. License + 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, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + diff --git a/graphics/mcf2graph/mcf2graph.mf b/graphics/mcf2graph/mcf2graph.mf new file mode 100644 index 0000000000..0906454eb5 --- /dev/null +++ b/graphics/mcf2graph/mcf2graph.mf @@ -0,0 +1,1819 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% mcf2graph ver 4.44 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, +% including without limitation the rights to use, copy, modify, merge, publish, distribute, +% sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: +% +% The above copyright notice and this permission notice shall be included in all copies +% or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, +% INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE +% AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +% DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% mcf2graph is METAFONT/METAPOST macro package convert +% Molecular Coding Format(MCF) to font(pk)/eps/sgv/png/mdl molfile +%-------------------------------------------------------------------------------------------------- +% This package is located at : http://www.ctan.org/pkg/mcf2graph +% Suggestion or request mail to : mcf2graph@gmail.com +%-------------------------------------------------------------------------------------------------- +% Set output no image file : mpost -s bboxmargin=0 FILENAME +% Set output first font only : mpost -s bboxmargin=1 FILENAME +% Set outputformat to "eps"(.mps) : mpost -s ahangle=0 FILENAME +% Set outputformat to "png" : mpost -s ahangle=1 FILENAME +% Set outputformat to "svg" : mpost -s ahangle=2 FILENAME +% Set outputformat to "eps" (.eps) : mpost -s ahangle=3 FILENAME +% Set output aux file : mpost -s ahlength=1 FILENAME +% Set output report : mpost -s ahlength=2 FILENAME +% Set output MOL(V2000) : mpost -s ahlength=5 FILENAME +% Set output MOL(V3000) : mpost -s ahlength=6 FILENAME +% Set to use plain.mp (label,arrow) : mpost -s labeloffset=1 FILENAME +% Set to use plain.mp (label,arrow,atom) : mpost -s labeloffset=2 FILENAME +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +tracingstats:=1; +%------------------------------------------------------------------------------------------------- +newinternal 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[]; +string save_str[],tbl_atom_str[],strD[],var[],tag[],out_file_name,out_file_aux,out_file_rep, + aux_delimiter,atomfont,save_atomfont,save_defaultfont; +pair save_pair[],msize,mposition,fsize,fmargin,save_mposition; +picture mol_stru[],save_picture,temp_picture; +path arrow_path,arrow_head; +%------------------------------------------------------------------------------------------------- +char_num:=str_cnt:=proc_end:=mangle:=sw_label_emu:=sw_calc:=sw_extall:=0; +sw_numberA:=sw_numberB:=sw_mframe:=sw_aux_out:=sw_expand:=sw_fframe:=sw_trimming:=0; +sw_aframe:=sw_rep_out:=sw_mol_out:=sw_subst_off:=sw_single:=sw_auxfix:=sw_arrow:=0; +numberA_start:=numberB_start:=1; numberA_end:=numberB_end:=4095; aux_max:=max_inf_num:=20; +aux_delimiter:=";"; var1:="jobname"; tag1:="F"; var2:="char_num"; tag2:="C"; +for i=3 upto aux_max: var[i]:=tag[i]:=""; endfor +%================================================================================================= +if (known green)and(known ahlength): + f_MP:=1; + color color_list[]; + prologues:=3; + %----------------------------------------------------------------------------------------- + fontmapfile "pdftex.map"; + %----------------------------------------------------------------------------------------- + atomfont:=defaultfont:=""; + out_file_aux:=jobname&"-info.aux"; + out_file_rep:=jobname&"-report.txt"; + def out_file_mol= jobname&"-"&fit_zero(char_num)&"-"&inf_EN&".mol" enddef; + %--default ahangle=45--------------------------------------------------------------------- + if ahangle=0: outputformat:="eps"; % eps format(.mps) + elseif ahangle=1: outputformat:="png"; hppp:=vppp:=0.12; % png format(600dpi) + elseif ahangle=2: outputformat:="svg"; % svg format + elseif ahangle=3: outputformat:="eps"; % eps format(.eps) + % + elseif ahangle=11: outputformat:="png"; hppp:=vppp:=0.24; % png format(300dpi) + elseif ahangle=12: outputformat:="png"; hppp:=vppp:=0.10; % png format(720dpi) + elseif ahangle=13: outputformat:="png"; hppp:=vppp:=0.06; % png format(1200dpi) + fi + %--default ahlength=4--------------------------------------------------------------------- + if ahlength=1: sw_aux_out:=1; bboxmargin:=0; % output aux file + elseif ahlength=2: sw_rep_out:=1; bboxmargin:=0; % output report + elseif ahlength=5: sw_mol_out:=1; bboxmargin:=0; % output MOL(V2000) + elseif ahlength=6: sw_mol_out:=2; bboxmargin:=0; % output MOL(V3000) + fi + %-- default bboxmargin=2------------------------------------------------------------------ + if bboxmargin=0: def shipit = enddef; % No image file + elseif bboxmargin=1: proc_end:=1; % output first font only + fi + %--default labeloffset=3------------------------------------------------------------------ + if labeloffset=1: sw_arrow:=1; defaultfont:="uhvr8r"; % plain.mp label + elseif labeloffset=2: sw_arrow:=1; defaultfont:=atomfont:="uhvr8r"; % plain.mp label,atom + fi + %--default outputtemplate:="%j-%3c."&"mps"------------------------------------------------ + if (outputformat="eps")and(ahangle<>3): outputtemplate:="%j-%3c."&"mps"; + else: outputtemplate:="%j-%3c."&outputformat; + fi + %----------------------------------------------------------------------------------------- + def endchar = endfig enddef; + def printf expr s= write s to out_file_name enddef; + def # = enddef; + vardef totalweight expr a= 0 enddef; + def Cp(expr s) = if known s: if s<>0: withcolor color_list[s] fi fi enddef; + def ext(text TXT)= sw_extall:=sw_calc:=1; def EXTALL = TXT enddef; enddef; + if atomfont="": atomfont:="draw"; fi % default atom font + if defaultfont="": defaultfont:="draw"; fi % default label font + %----------------------------------------------------------------------------------------- +else: f_MP:=0; + %------------------------------------ + def image = image_emu enddef; + def llcorner = llcorner_emu enddef; + def lrcorner = lrcorner_emu enddef; + def urcorner = urcorner_emu enddef; + def ulcorner = ulcorner_emu enddef; + string defaultfont; + dotlabeldiam:=3bp; + def Cp(expr s) = enddef; + def color = transform enddef; + def ext(text TXT)= enddef; + sw_arrow:=0; + atomfont:="draw"; + defaultfont:="draw"; + mode_setup; +fi +clearit; +%-------------------------------------------------------------------------------------------------- +message "---------------------------------------------"; +message "This is mcf2graph ver 4.44 2019.07"; +if f_MP=1: + message "numbersystem="&numbersystem; + if ahlength=1: message "output aux file"; + message "out_file_aux="&out_file_aux; + elseif ahlength=2: message "output report file"; + message "out_file_rep="&out_file_rep; + elseif ahlength=5: message "output MOL file(V2000)"; + message jobname&"-nnn-"&"inf_EN"&".mol"; + elseif ahlength=6: message "output MOL file(V3000)"; + message jobname&"-nnn-"&"inf_EN"&".mol"; + fi + if bboxmargin=0: + message "No image file"; + else: + if outputformat="png": + message "outputformat="&outputformat &" / ppp="&decimal(hppp); + else: + message "outputformat="&outputformat; + fi + message "outputtemplate="&outputtemplate; + fi +fi +message "---------------------------------------------"; +%-------------------------------------------------------------------------------------------------- +let DIV= /; let MUL= *; let LT= <; let GT= >; let AND= &; let :: = : ; let == = =; let ef=elseif; +%-------------------------------------------------------------------------------------------------- +primarydef a at b = fat(a,b) enddef; +def fat(expr a,b)= mposition:=b; a enddef; +%-------------------------------------------------------------------------------------------------- +?3:=?20:=Ph:=Ph1:=Ph2:=hz:=0; vt:=1; +ratio_chain_ring:= 0.66; ratio_atom_bond:=0.36; +ratio_thickness_bond:=0.015; ratio_thickness_char:=0.1; +ratio_char_bond:=1.5; ratio_bondgap_bond:=0.15; ratio_zebragap_bond:=0.12; +ratio_zebra_black:=0.4; ratio_wedge_bond:=0.12; ratio_atomgap_atom:=0.040; +offset_thickness:=0.2bp; offset_bond_gap:=0.3bp; offset_zebra_gap:=0.1bp; +offset_atom:=0.8pt; offset_wedge:=0.4bp; max_labelsize:=20mm; +thickness_fframe:=0.2bp; thickness_mframe:=0.2bp; thickness_aframe:=0.1bp; +max_blength:=10mm; blength:=0; mangle:=0; +%-------------------------------------------------------------------------------------------------- +fsize:=(30mm,20mm); fmargin:=(0.4mm,0.4mm); msize:=(1,1); mposition:=(0.5,0.5); +%================================================================================================== +ahangle:=45; +ahlength:=4bp; +bboxmargin:=2bp; +defaultsize:=8bp; +defaultscale:=1; +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) +%-------------------------------------------------------------------------------------------------- +def def_com(expr n)(text tx)= nA:=n; forsuffixes list=tx:: list:=nA; nA:=nA+1; endfor enddef; +def_com(-4000)(_term,_jp_atom,_jp_atom_abs,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_line,_chg_line, + _dl,_mb,_N,_O,_S,_tmp_line,_chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_adj_ang,_chg_env, + _tmp_env,_set_colorA,_set_colorB,_postA,_postB,_postC,_postD,_postE,_postF,_postG,_postH, + _set_clr,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,_push,_pop, + _size_a,_numeric,_jump_at,_connect_at,_set_and,_chg_charge,_nop); +def_com(1)(si,dl,dr,db,dm,tm,wf,wb,bd,bz,zf,zb,dt,wv,nl,vf,vb,si_,wf_,wb_,bd_); +%-------------------------------------------------------------------------------------------------- +def parameter_list= + sw_rep_out,sw_numberA,sw_numberB,sw_mframe,sw_aux_out,sw_expand,sw_mol_out,sw_calc,sw_extall, + sw_aframe,sw_fframe,sw_subst_off,sw_single,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,offset_bond_gap, + thickness_fframe,thickness_mframe,thickness_aframe,offset_thickness, + numberA_start,numberA_end,numberB_start,numberB_end, + defaultsize,defaultscale,labeloffset,mangle, + 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, + fsize,fmargin,msize,mposition,defaultfont,atomfont +enddef; +%-------------------------------------------------------------------------------------------------- +def ]]]=] ] ] enddef; +vardef iif(expr a,b,c)=if a: b else: c fi enddef; +vardef pic_c(expr i,s)= substring(i,i+1) of s enddef; +vardef sfB(expr a,b,c)= a shifted ((b,0) rotated c) enddef; +%-------------------------------------------------------------------------------------------------- +def init_par(text t)= +nA:=nB:=nC:=0; + for list=t: + if numeric list: nA:=nA+1; save_num[nA]:=list; + elseif pair list: nB:=nB+1; save_pair[nB]:=list; + elseif string list: nC:=nC+1; save_str[nC]:=list; + fi + endfor +enddef; +%-------------------------------------------------------------------------------------------------- +def store_par(text t)= + nA:=nB:=nC:=0; + for list=t: + if numeric list: nA:=nA+1; if save_num[nA]<>list: save_num[nA]:=list; fi + elseif pair list: nB:=nB+1; if save_pair[nB]<>list: save_pair[nB]:=list; fi + elseif string list: nC:=nC+1; if save_str[nC]<>list: save_str[nC]:=list; fi + fi + endfor +enddef; +%-------------------------------------------------------------------------------------------------- +def restore_par(text t)= + nA:=nB:=nC:=0; + forsuffixes list=t: + if numeric list: nA:=nA+1; if list<>save_num[nA]: list:=save_num[nA]; fi + elseif pair list: nB:=nB+1; if list<>save_pair[nB]: list:=save_pair[nB]; fi + elseif string list: nC:=nC+1; if list<>save_str[nC]: list:=save_str[nC]; fi + fi + endfor +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def beginfont(text s)= + begingroup + save cntA,cntB,cntM,minX,minY,f_beginchar,numS,sftX,sftY,f_ext,blen,ext,add, + 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[]; + 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; + %------------------------------------------------------------------------------------------------ + def ext=ext_font enddef; + def add=add_mole enddef; + %------------------------------------------------------------------------------------------------ + inf_NO:=inf_EN:=inf_JN:=inf_FM:=inf_CAS:=inf_USE:=inf_EXA:=inf_EXB:=inf_MW:=""; + cal_MW:=cal_MW_str:=cal_FM:=""; + %------------------------------------------------------------------------------------------------ + char_num:=char_num+1; + store_par(parameter_list); + for i:=1 upto max_inf_num: info[i]:=":"; endfor + f_ext:=inf_num:=cntM:=0; + for list=s: inf_num:=inf_num+1; info[inf_num]:=list; endfor + %------------------------------------------------------------------------------------------------ + for j=1 upto inf_num: + nA:=0; for i=0 upto length(info[j]): if pic_c(i,info[j])=":": nA:=i; fi exitif nA>0; endfor + if nA>0: + s_tag:=substring (0,nA) of info[j]; + s_var:=substring (nA+1,length(info[j])) of info[j]; + if known scantokens("inf_"&s_tag): scantokens("inf_"&s_tag):=s_var; fi + fi + endfor + %------------------------------------------------------------------------------------------------ + mol_stru[0]:=nullpicture; +enddef; +%================================================================================================== +def endfont= + if (f_MP=1)and(sw_extall=1): ext_font(EXTALL); fi + if sw_trimming>=1: + nA:=nC:=4095; nB:=nD:=-4095; + for i=1 upto cntM: + if xpart(posM[1][i])<nA: nA:=xpart(posM[1][i]); fi + if xpart(posM[2][i])>nB: nB:=xpart(posM[2][i]); fi + if ypart(posM[1][i])<nC: nC:=ypart(posM[1][i]); fi + if ypart(posM[2][i])>nD: nD:=ypart(posM[2][i]); fi + endfor + font_wd:=nB-nA+2margin_lr; + font_ht:=nD-nC+2margin_tb; + fsize:=(font_wd,font_ht); + for i=1 upto cntM: + posM[0][i]:=posM[0][i]+(margin_lr-nA,margin_tb-nC); + posM[1][i]:=posM[1][i]+(margin_lr-nA,margin_tb-nC); + endfor + fi + %----------------------------------------------------------------------------------------------- + if f_MP=0: beginchar(char_num,font_wd/bp*bp#,font_ht/bp*bp#,0) + else: beginfig(char_num) w:=charwd:=font_wd; h:=charht:=font_ht; chardp:=0; + fi + if (sw_fframe=1)or(sw_fframe=3): ext(draw_frame((0,0),w,h,thickness_fframe);) fi + if (sw_fframe=2)or(sw_fframe=3): ext(draw_frame(p0,w0,h0,thickness_fframe);) fi + if sw_fframe=4: ext(drawdot(0,0); drawdot(w,0); drawdot(w,h); drawdot(0,h);) fi + for i=1 upto cntM: + addto currentpicture also mol_stru[i] shifted posM[0][i]; mol_stru[i]:=nullpicture; + if sw_mframe=1: ext(draw_frame(p[i],w[i],h[i],thickness_mframe)) fi + endfor + if f_ext=1: addto currentpicture also mol_stru[0]; mol_stru[0]:=nullpicture; fi + endchar; + clearit; + restore_par(parameter_list); + endgroup; + if proc_end=1: scantokens("bye"); fi +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def set_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 { == '''( enddef; + let } == ); + def &primary s == (_set_and,ASCII(s)) enddef; + vardef $primary a == a-4095 enddef; + def ^^primary n == (_tmp_rot,n) enddef; + def ``primary n == (_chg_len,n) enddef; + def '`primary n == (_tmp_len,n) enddef; + def <primary n == (_rot_ang,n) enddef; + def >>primary n == (_chg_env,n) enddef; + def ~~primary n == (_tmp_line,n) enddef; + def :>primary n == (_tmp_env,n) enddef; + tertiarydef a^b == if known b:: ^^b,a else:: _nop,a fi enddef; + tertiarydef a`b == if known b:: '`b,a else:: _nop,a fi enddef; + tertiarydef a~b == if known b:: ~~b,a else:: _nop,a fi enddef; + tertiarydef a>b == if known b:: :>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 |: == (_push,0) enddef; + def :| == (_pop,0) enddef; + def |< == (_push,1) enddef; + def >| == (_pop,1) enddef; + def |=primary n == (_push,0),``n enddef; + def =| == (_pop,0) enddef; + def | == (_push,2) enddef; + def || == (_pop,2) enddef; + def /secondary n == if known n:: (_postA,n) else:: _nop fi enddef; + def //secondary n == if known n:: (_postB,n) else:: _nop fi enddef; + def */secondary n == if known n:: (_postC,n) else:: _nop fi enddef; + def /*secondary n == if known n:: (_postD,n) else:: _nop fi enddef; + def **secondary n == if known n:: (_postF,n) else:: _nop fi enddef; + def */*secondary n == if known n:: (_postG,n) else:: _nop fi enddef; +enddef; +%================================================================================================= +vardef '(text TXT)= ''(incr sub_usr)(TXT); sub_usr enddef; +%------------------------------------------------------------------------------------------------- +def ''(expr ADR)(text TXT)= + begingroup + save list_cnt; + if unknown inside_def_MC:: set_def_MC fi + cntD[ADR]:=list_cnt:=0; + for list==TXT:: + list_cnt:=list_cnt+1; + if known list:: + if pair list:: + cntD[ADR]:=cntD[ADR]+1; + comD[ADR][cntD[ADR]]:=xpart(list); + parD[ADR][cntD[ADR]]:=ypart(list); + elseif numeric list:: + if list==_nop:: + message "unknown command in "AND decimal(list_cnt); + elseif list>=sub_emb_start:: + for i==1 upto cntD[list]:: + cntD[ADR]:=cntD[ADR]+1; + comD[ADR][cntD[ADR]]:=comD[list][i]; + parD[ADR][cntD[ADR]]:=parD[list][i]; + endfor + else:: + cntD[ADR]:=cntD[ADR]+1; + comD[ADR][cntD[ADR]]:=_mk_bond; + parD[ADR][cntD[ADR]]:=list; + fi + elseif string list:: + str_cnt:=str_cnt+1; + strD[str_cnt]:=list; + cntD[ADR]:=cntD[ADR]+1; + comD[ADR][cntD[ADR]]:=_set_atom; + parD[ADR][cntD[ADR]]:=str_cnt; + fi + else:: + message "unknown command in "AND decimal(list_cnt); + fi + endfor + endgroup +enddef; +%------------------------------------------------------------------------------------------------- +vardef '''(text TXT)= + sub_int:=sub_int+1; + cntD[sub_int]:=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; + 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); + fi + else:: + message "unknown command in "AND decimal(sub_int); + fi + endfor + sub_int %------- Retern value ------- +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def fuse_ring(expr a,b) = + PA(_jp_bond,a) PA(_rot_ang,180) PA(_get_len,a) PA(_push,0) + PA(_chg_len,_ring_len) for i==1 upto b-2:: PA(_mk_bond,360 DIV b) endfor PA(_pop,0) + if a>=1:: PA(_cyc_eB,0) elseif a>=-999:: PA(_cyc_eB,a-b+2) else:: PA(_cyc_eB,a) fi +enddef; +%------------------------------------------------------------------------------------------------- +def fuse_ring_bonds(expr a,b,c) = + PA(_jp_bond,xpart(a)) PA(_rot_ang,180) PA(_push,0) + if b==6:: PA(_chg_len,0) for i==1 upto c-1:: PA(_mk_bond,60) endfor + elseif b==5:: if c==2:: PA(_chg_len,1.25) PA(_mk_bond,80) + elseif c==3:: PA(_chg_len,1.1) PA(_mk_bond,78) PA(_mk_bond,72) fi + elseif b==4:: PA(_chg_len,1.225) PA(_mk_bond,105) fi + PA(_pop,0) if ypart(a)<=0:: PA(_cyc_eB,ypart(a)-c+1) else:: PA(_cyc_eB,ypart(a)) fi +enddef; +%------------------------------------------------------------------------------------------------- +def fuse_ring_rate(expr a,b,c) = + PA(_jp_bond,a) PA(_rot_ang,180) PA(_push,0) PA(_chg_len,c DIV 10) + if b==5:: PA(_mk_bond,72-((c-9) MUL 1.5)) PA(_mk_bond,72+(c-9)) PA(_mk_bond,72+(c-9)) + elseif b==6:: PA(_mk_bond,60-(c-8)) for i==1 upto 3:: PA(_mk_bond,60+((c-8) DIV 2)) endfor + elseif b==7:: PA(_mk_bond,360 DIV 7-(c-8)) + for i==1 upto 4:: PA(_mk_bond,360 DIV 7+((c-8) DIV 2.5)) endfor + elseif b==8:: PA(_mk_bond,45-(c-8)) for i==1 upto 5:: PA(_mk_bond,45+((c-8) DIV 3)) endfor + fi + PA(_pop,0) if a>=1:: PA(_cyc_eB,0) else:: PA(_cyc_eB,list) fi +enddef; +%================================================================================================== +vardef change_bond(expr a,b) = + sub_int:=sub_int+1; + cntD[sub_int]:=0; + if known b:: if numeric b:: + if (b>=si)and(b<=bd_):: if b==dl:: PP(a,_dl) else:: PX(a)(_set_line,b) fi + 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 + else:: fuse_ring(a,b-?3+3) + fi + elseif b==Ph1:: fuse_ring(a,6) PA(_dl,-2) PA(_dl,-4) + elseif b==Ph2:: fuse_ring(a,6) PA(_dl,-1) PA(_dl,-3) PA(_dl,-5) + elseif b==_jump_at:: PA(_jp_bond,a) + elseif b==_connect_at:: PA(_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]) + fi + fi + elseif color b:: color_list[incr cntC]:=b; PX(a)(_set_colorB,cntC) + fi fi + sub_int %------- Retern value ------- +enddef; +%------------------------------------------------------------------------------------------------- +vardef change_atom(expr a,b)= + sub_int:=sub_int+1; + cntD[sub_int]:=0; + if known b:: if numeric b:: + if (b>=H)and(b<=U):: if b==N:: PP(a,_N) elseif b==O:: PP(a,_O) elseif b==S:: PP(a,_S) + else:: PX(a)(_chg_atom,b) + fi + ef b==NH:: PA(_set_clr,1) PP(a,_N) PX(a)(_postH,H) PA(_set_clr,0) + ef b==_jump_at:: PA(_jp_atom,a) + ef b==_connect_at:: PA(_cyc,a) + fi + ef pair b:: + if xpart(b)==_set_and:: + PA(_set_and,ypart(b)) PA(_chg_charge,a) + else:: + PA(_set_clr,1) PX(a)(xpart(b),ypart(b)) PA(_set_clr,0) + fi + ef color b:: color_list[incr cntC]:=b; PX(a)(_set_colorA,cntC) + fi fi + sub_int %------- Retern value ------- +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def puts(expr POS)(expr STR)= + begingroup + save pA,sA,bA,nB,nC; + pair pA; + string sA; + picture bA; + pA:=POS; + nB:=defaultscale*defaultsize; + nC:=0; + %------------------------------------------------------------------------------------------------ + for i=0 upto length(STR)-1: + sA:=pic_c(i,STR); + if sw_label_emu=1: + if sA="_": nC:=iif(nC=-0.5,0,-0.5); + elseif sA="^": nC:=iif(nC= 0.5,0, 0.5); + else: + if defaultfont="draw": + draw_char(sA,pA+(0,nB*nC),nB,ratio_thickness_char*defaultscale*defaultsize,0); + pA:=pA+(nB*tbl_char_wd[ASCII(sA)],0); + else: + bA:=sA infont defaultfont scaled defaultscale; + addto currentpicture also bA shifted (pA+(0,nB*nC)); + pA:=pA+(lrcorner bA-llcorner bA); + fi + fi + else: + draw_char(sA,pA,nB,ratio_thickness_char*defaultscale*defaultsize,0); + pA:=pA+(nB*tbl_char_wd[ASCII(sA)],0); + fi + endfor + endgroup; +enddef; +%================================================================================================== +def ext_setup= + pickup pencircle scaled ext_defaultline; + dotlabeldiam:=3bp; + labeloffset:=3bp; + save em; + em=defaultscale*defaultsize; + if (f_MP=0)or(sw_label_emu=1): + save label,dotlabel; + def label = label_emu enddef; + def dotlabel = dotlabel_emu enddef; + else: + defaultfont:="uhvr8r"; + fi + if (sw_arrow=0)or(f_MP=0): + save drawarrow,drawdblarrow; + def drawarrow = drawarrow_emu enddef; + def drawdblarrow = drawdblarrow_emu enddef; + fi +enddef; +%-------------------------------------------------------------------------------------------------- +def add_mole(text TXT)= + begingroup + save w,h,n,l,p,am,aw,A,B,plus,minus,lonepair,**,<<,/*; + numeric A[]dir,B[]up,A[]ang,B[]ang; + pair p[],A[],B[],B[]s,B[]e,B[]m,A[]up,A[]left,A[]right,A[]down, + B[]up,B[]left,B[]right,B[]down; + path B[]; + ext_setup; + def plus = circled_plus_add enddef; + def minus = circled_minus_add enddef; + def lonepair = lone_pair_add enddef; + let ** = scaled; + let << = rotated; + primarydef a /* b = point b of a enddef; + w:=mol_wd; h:=mol_ht; l:=blength; aw:=atom_wd; + p0:=(minX,minY); + An:=cntA; Bn:=cntB; + lonepairdiam:=0.3aw; + lonepairspace:=.7aw; + circlediam:=.6aw; + circlepen:=.2bp; + for i=1 upto An: + 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 + for i=1 upto Bn: + 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 + TXT addto mol_stru[cntM] also currentpicture; clearit; + endgroup; +enddef; +%-------------------------------------------------------------------------------------------------- +def ext_font(text TXT)= + begingroup + save w,h,wd,ht,n,p,am,aw; + pair p[]; + ext_setup; + w:=xpart(fsize); + h:=ypart(fsize); + w0:=w-2margin_lr; + h0:=h-2margin_tb; + p0:=(margin_lr,margin_tb); + aw:=atom_wd; + n:=cntM; + for i=1 upto n: p[i]:=posM[1][i]; w[i]:=wdM[i]; h[i]:=htM[i]; endfor + TXT addto mol_stru[0] also currentpicture; clearit; f_ext:=1; + endgroup; +enddef; +%-------------------------------------------------------------------------------------------------- +vardef image_emu(text TXT) = + save_picture:=currentpicture; + currentpicture:=nullpicture; + TXT; + temp_picture:=currentpicture; + currentpicture:=save_picture; + temp_picture +enddef; +%-------------------------------------------------------------------------------------------------- +vardef scan_picture(expr PIC,SD)= + save save_pic,nA,nB,nC,nD,nE,nS,iw,erase_h,erase_v; + picture save_pic; + path erase_h,erase_v; + nD:=0.2bp; + if (SD=1)or(SD=3): nS:=-max_labelsize; nE:=max_labelsize; nB:=nD; nC:=-nD; + elseif (SD=2)or(SD=4): nS:=max_labelsize; nE:=-max_labelsize; nB:=-nD; nC:=0; + fi + if (SD=1)or(SD=2): + erase_h:=unitsquare xscaled 2max_labelsize yscaled nD shifted (-max_labelsize,nC); + elseif (SD=3)or(SD=4): + erase_v:=unitsquare xscaled nD yscaled 2max_labelsize shifted (nC,-max_labelsize); + fi + save_pic:=currentpicture; + currentpicture:=PIC; + erase fill unitsquare scaled nD shifted (-max_labelsize,-max_labelsize); + iw:=totalweight currentpicture; + if iw>=0: + for i=nS step nB until nE: + if (SD=1)or(SD=2): erase fill erase_h shifted (0,i); + elseif (SD=3)or(SD=4): erase fill erase_v shifted (i,0); + fi + nA:=i; + exitif (totalweight currentpicture)<iw; + endfor + else: + nA:=0; + fi + currentpicture:=save_pic; + nA +enddef; +%-------------------------------------------------------------------------------------------------- +vardef llcorner_emu(expr b)= (scan_picture(b,3),scan_picture(b,1)) enddef; +vardef lrcorner_emu(expr b)= (scan_picture(b,4),scan_picture(b,1)) enddef; +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; + 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; + ) +enddef; +%-------------------------------------------------------------------- +vardef circled_minus_add= + save nA,nB; + 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; + image(draw (0,0) withpen pencircle scaled nA; + draw ((0,nB) rotated ANG) withpen pencircle scaled nA;) +enddef; +%-------------------------------------------------------------------------------------------------- +vardef label_emu@#(expr OBJ,POS) = %% modified 'thelabel@#(expr s,z)' of plain.mp + save oft,fx,fy,wds,sC,bA,pA,pB,pC,pD; + pair oft,oft.lft,oft.rt,oft.top,oft.bot,oft.ulft,oft.llft,oft.urt,oft.lrt,pA,pB,pC,pD; + string sC; + picture bA; + wds:=0; + %--------------------------------------------------------------- + if string OBJ: + for i=0 upto length(OBJ)-1: + sC:=pic_c(i,OBJ); + if not((sw_label_emu=1)and((sC="_")or(sC="^"))): + if (defaultfont="draw")or(f_MP=0): + wds:=wds+defaultscale*defaultsize*tbl_char_wd[ASCII(sC)]; + else: + bA:=sC infont defaultfont scaled defaultscale; + wds:=wds+xpart(lrcorner bA-llcorner bA); + fi + fi + endfor + fi + %--------------------------------------------------------------- + oft:= ( 0, 0); fx:=0.5; fy:=0.5; + oft.lft:= ( -1, 0); fx.lft:=1; fy.lft:=0.5; + oft.rt := ( 1, 0); fx.rt :=0; fy.rt :=0.5; + oft.bot:= ( 0, -1); fx.bot:=0.5; fy.bot:=1; + oft.top:= ( 0, 1); fx.top:=0.5; fy.top:=0; + oft.ulft:=(-.7, .7); fx.ulft:=1; fy.ulft:=0; + oft.urt:= ( .7, .7); fx.urt:=0; fy.urt:=0; + oft.llft:=(-.7,-.7); fx.llft:=1; fy.llft:=1; + oft.lrt:= ( .7,-.7); fx.lrt:=0; fy.lrt:=1; + %--------------------------------------------------------------- + if string OBJ: + puts(POS+(labeloffset*oft@#)-(wds*fx@#,defaultscale*defaultsize*fy@#))(OBJ); + elseif picture OBJ: + pA:=llcorner(OBJ); + pB:=urcorner(OBJ); + pC:=.5(pB-pA) xscaled xpart(oft@#) yscaled ypart(oft@#); + pD:=.5(pA+pB); + addto currentpicture also OBJ shifted (POS+labeloffset*oft@#+pC-pD); + fi +enddef; +%------------------------------------------------------------------------------------------------- +vardef dotlabel_emu@#(expr OBJ,POS)= + label_emu@#(OBJ,POS); draw POS withpen pencircle scaled dotlabeldiam; +enddef; +%================================================================================================== +def drawarrow_emu expr PAT = arrow_path:=PAT; draw_arrow enddef; +%------------------------------------------------------------------------------------------------- +def draw_arrow text t = %% modified 'drawarrow' of plain.mp + filldraw arrow_head rotated ahead_angle(reverse arrow_path) + shifted point infinity of arrow_path t; + draw arrow_path t +enddef; +%------------------------------------------------------------------------------------------------- +def drawdblarrow_emu expr PAT = arrow_path:=PAT; draw_dblarrow enddef; +%------------------------------------------------------------------------------------------------- +def draw_dblarrow text t = + filldraw arrow_head rotated ahead_angle(arrow_path) shifted point 0 of arrow_path t; + filldraw arrow_head rotated ahead_angle(reverse arrow_path) + shifted point infinity of arrow_path t; + draw arrow_path t +enddef; +%------------------------------------------------------------------------------------------------- +arrow_head:=(0,0)--(ahlength,-(sind 0.5ahangle)*ahlength)-- + (ahlength, (sind 0.5ahangle)*ahlength)--cycle; +%------------------------------------------------------------------------------------------------- +def ahead_angle(expr p) = + angle direction .5ahlength/length(point 1 of p - point 0 of p) of p +enddef; +%================================================================================================= +def sub_add(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 sub_add_op(expr a,b)= + op_cnt[cntP]:=op_cnt[cntP]+1; op_com[cntP][op_cnt[cntP]]:=a; op_par[cntP][op_cnt[cntP]]:=b; +enddef; +%------------------------------------------------------------------------------------------------- +def sub_pro(expr a,b)= + if a>=sub_int_start:: for i==1 upto cntD[a]:: sub_add(b,parD[a][i]) endfor else:: sub_add(b,a) fi +enddef; +%------------------------------------------------------------------------------------------------- +def sub_ext(expr c)(expr a,b)= + if c>=sub_int_start:: + for i==1 upto cntD[c]:: + if comD[c][i]==_numeric:: sub_add(_set_adr,parD[c][i]) sub_add(a,b) + else:: sub_add(comD[c][i],parD[c][i]) fi + endfor + else:: sub_add(_set_adr,c) sub_add(a,b) + fi +enddef; +%================================================================================================= +def MCat(expr FW,FH)(text TXT)= + save_mposition:=mposition; + mposition:=(FW,FH); + MC(TXT) + mposition:=save_mposition; +enddef; +%------------------------------------------------------------------------------------------------- +def MC(text TXT)= + begingroup + save com,par,adrA,adrB,f_bra,envT,envB,lenT,lineT,strAT,stkA,stkB,stkL,stkM,cntP,bondL,temp_len, + temp_cntB,f_end,f_term,rotT,adrS,f_at,f_lineT,f_rotT,f_lenT,f_envT,angT,tempB,tempA, + 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,PA,PO,PP,PX,defaultsize,defaultscale; + %----------------------------------------------------------------------------------------------- + def PA= sub_add enddef; + def PO= sub_add_op enddef; + def PP= sub_pro enddef; + def PX= sub_ext enddef; + %----------------------------------------------------------------------------------------------- + numeric stkB[],stkA[],stkL[],stkM[],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:=cntP:=cntC:=0; strD[0]:=""; str_cnt:=2000; crR:=-ratio_chain_ring; + %----------------------------------------------------------------------------------------------- + font_wd:=xpart(fsize); + font_ht:=ypart(fsize); + margin_lr:=xpart(fmargin); + margin_tb:=ypart(fmargin); + %=============================================================================================== + ''(0)(TXT,(_term,0)); + %----------------------------------------------------------------------------------------------- + proc_bond_atom(1); + %----------------------------------------------------------------------------------------------- + if (cntP>0)and(sw_subst_off=0): post_get(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; + 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; + 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; + fi + else: + if xpart(msize)>1: factor:=xpart(msize)/mol_wd; + else: factor:=((font_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; proc_scaling; + fi + fi + %-draw atom-------------------------------------------------------------------------------------- + if (sw_numberA=0)and(sw_numberB=0): for i=1 upto cntA: draw_atom(i); endfor fi + %-draw charge------------------------------------------------------------------------------------ + for i=1 upto cntA: + if andA[i]<>0: + sA:=char(andA[i]); nA:=angX[i]+and_rot[i]; nC:=nA mod 90; + if numS[i]=0: nB:=.5atom_wd; + else: nB:=.85atom_wd+iif(nC<45,sind(nC),cosd(nC))*.5atom_wd; + fi + pA:=sfB(posA[i]-(.35atom_wd,.35atom_wd),nB,nA); + draw_char(sA,pA,atom_wd,bond_pen_wd*ratio_char_bond,0); + else: sA:=""; + fi + nA:=length(strD[numS[i]]); sC:=substring(nA-3,nA-2) of strD[numS[i]]; + if (sA="+")or(sC="+"): chargeA[i]:=1; ef (sA="-")or(sC="-"): chargeA[i]:=-1; + else: chargeA[i]:=0; + fi + endfor + %-draw bond------------------------------------------------------------------------------------- + for i=1 upto cntB: if lineB[i]<si_ : draw_bond(i); fi endfor + for i=1 upto cntB: if lineB[i]>=si_: draw_bond(i); fi endfor + %-atom numbering-------------------------------------------------------------------------------- + if sw_numberA>=1: + for i=1 upto cntA: + if (i>=numberA_start)and(i<=numberA_end): + if sw_numberA=2: nA:=i-numberA_start+1; + elseif sw_numberA=3: nA:=iif(numberA_end<cntA,numberA_end-i+1,cntA-i+1); + else: nA:=i; + fi + erase fill unitsquare xscaled (.8atom_wd*length(decimal(nA))) + yscaled atom_wd shifted (posA[i]-(.5atom_wd,.5atom_wd)); + defaultsize:=atom_wd; defaultscale:=1; + puts(posA[i]-(.5atom_wd,.5atom_wd))(decimal(nA)); + fi + endfor + fi + %-bond numbering-------------------------------------------------------------------------------- + if sw_numberB>=1: + for i=1 upto cntB: + if (i>=numberB_start)and(i<=numberB_end): + if sw_numberB=2: nB:=i-numberB_start+1; + elseif sw_numberB=3: nB:=iif(numberB_end<cntB,numberB_end-i+1,cntB-i+1); + else: nB:=i; + fi + erase fill unitsquare yscaled atom_wd xscaled (.8atom_wd*length(decimal(nB))) + shifted (.5[posA[sB[i]],posA[eB[i]]]-(.5atom_wd,.5atom_wd)); + defaultsize:=atom_wd; defaultscale:=1; + puts(0.5[posA[sB[i]],posA[eB[i]]]-(.5atom_wd,.5atom_wd))(decimal(nB)); + fi + endfor + fi + %----------------------------------------------------------------------------------------------- + if xpart(mposition)>1: sftX:=xpart(mposition)-minX; + else: sftX:=margin_lr-minX+(font_wd-mol_wd-2margin_lr)*xpart(mposition); + fi + if ypart(mposition)>1: sftY:=ypart(mposition)-minY; + else: sftY:=margin_tb-minY+(font_ht-mol_ht-2margin_tb)*ypart(mposition); + fi + cntM:=cntM+1; + posM[0][cntM]:=(sftX,sftY); + posM[1][cntM]:=(minX+sftX,minY+sftY); + posM[2][cntM]:=(maxX+sftX,maxY+sftY); + wdM[cntM]:=mol_wd; + htM[cntM]:=mol_ht; + mol_stru[cntM]:=currentpicture; + clearit; + 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); + %----------------------------------------------------------------------------------------------- +enddef; +%------------------------------------------------------------------------------------------------- +def post_put= + begingroup + save nA; + if f_at=1: nA:=getA(adrT); check_adrA(nA); else: nA:=cntA+1; fi + cntP:=cntP+1; ps_adr[cntP]:=nA; ps_com[cntP]:=par; op_cnt[cntP]:=0; + if lineT<>0: PO(_tmp_line,lineT) fi + if rotT<>0: PO(_rot_ang,rotT) fi + if lenT<>crR: PO(_chg_len,lenT) fi + if envT<>hz: PO(_chg_env,envT) fi + if lineT=nl: PO(_chg_len,_size_a) PO(_adj_ang,0) fi + if lineT<>0: PO(_mk_bond,0) fi + 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 + endgroup +enddef; +%------------------------------------------------------------------------------------------------- +def post_get(expr n)= + sub_int:=0; + nA:=cntP; nB:=cntD[0]; + for i=n upto cntP: + PA(_jp_atom_abs,ps_adr[i]) PA(_push,1) + for j=1 upto op_cnt[i]: PA(op_com[i][j],op_par[i][j]) endfor + for j=1 upto cntD[ps_com[i]]: PA(comD[ps_com[i]][j],parD[ps_com[i]][j]) endfor + PA(_pop,1) PA(_term,0) + endfor + proc_bond_atom(nB+1); if cntP>nA: post_get(nA+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; +%------------------------------------------------------------------------------------------------- +def proc_size_setup= + if (blen*ratio_atom_bond+offset_atom)<.8blen: + atom_wd:=blen*ratio_atom_bond+offset_atom; + else: + atom_wd:=.8blen; ratio_chain_ring:= .5; + fi + wedge_wd:= blen*ratio_wedge_bond+offset_wedge; + zebra_gap:= blen*ratio_zebragap_bond+offset_zebra_gap; + bondgap:= blen*ratio_bondgap_bond+offset_bond_gap; + bond_pen_wd:= blen*ratio_thickness_bond+offset_thickness; +enddef; +%------------------------------------------------------------------------------------------------- +def proc_scaling= + begingroup + save nU,nD,nP,nL,nR,xpos,ypos; + minX:=minY:=4095; + maxX:=maxY:=-4095; + for i=1 upto cntA: + xpos:=xpart(posA[i]); + ypos:=ypart(posA[i]); + if numS[i]<>0: + nU:=nD:=nP:=nL:=nR:=0; + for j=0 upto length(strD[numS[i]])-1: + sA:=pic_c(j,strD[numS[i]]); + if (sA="^"): nU:=.5atom_wd; + elseif (sA="_"): nD:=.5atom_wd; + elseif (sA<>"{")and(sA<>"}"): nP:=nP+atom_wd*tbl_char_wd[ASCII(sA)]; + fi + endfor + if (angX[i]<=90)or(angX[i]>=270): nR:=nP; else: nL:=nP; fi + if (xpos-nL+.5atom_wd)<minX: minX:=xpos-nL+.5atom_wd; fi + if (xpos+nR-.5atom_wd)>maxX: maxX:=xpos+nR-.5atom_wd; fi + if (ypos-nD-.5atom_wd)<minY: minY:=ypos-nD-.5atom_wd; fi + if (ypos+nU+.5atom_wd)>maxY: maxY:=ypos+nU+.5atom_wd; fi + else: if xpos<minX: minX:=xpos; fi if xpos>maxX: maxX:=xpos; fi + if ypos<minY: minY:=ypos; fi if ypos>maxY: maxY:=ypos; fi + fi + endfor + mol_wd:=maxX-minX; mol_ht:=maxY-minY; + endgroup +enddef; +%------------------------------------------------------------------------------------------------- +def char_use_check= + for i=1 upto 128: f_char[i]:=0; endfor + if (sw_numberA<>0)or(sw_numberB<>0): + for j=ASCII("0") upto ASCII("9"): f_char[j]:=1; endfor + else: + for i=1 upto cntA: + if numS[i]<>0: + for j=0 upto length(strD[numS[i]])-1: f_char[ASCII(pic_c(j,strD[numS[i]]))]:=1; endfor + fi + endfor + fi +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; + stkL[0]:=bondL:=crR; lenT:=crR; sB[0]:=0; eB[0]:=1; lineT:=si; andAT:=0; + for i=0 upto 5: stkA[i]:=stkB[i]:=0; endfor + %----------------------------------------------------------------------------------------------- + for i=n upto cntD[0]: + nC:=comD[0][i]; par:=parD[0][i]; + if nC=_push: + if par=1: stkL[adrS]:=bondL; adrS:=adrS+1; stkA[adrS]:=adrA:=cntA; stkB[adrS]:=adrB:=cntB; + elseif par=0: temp_len:=bondL; + elseif par=2: stkA[adrS+1]:=cntA; stkB[adrS+1]:=cntB; + fi + ef nC=_pop: if par=1: adrS:=adrS-1; adrA:=stkA[adrS]; adrB:=stkB[adrS]; bondL:=stkL[adrS]; + ef par=0: bondL:=temp_len; + ef par=2: stkA[adrS+1]:=0; + fi + ef nC=_mk_bond: if (par=0)and(rotT<>0): rotT:=0; fi add_atom; + ef nC=_set_adr: adrT:=par; + ef nC=_set_atom: strAT:=par; + ef nC=_postA: post_put; + ef nC=_postB: lineT:=dm; post_put; + ef nC=_postC: lineT:=wf; post_put; + ef nC=_postD: lineT:=zf; post_put; + ef nC=_postE: lineT:=nl; post_put; + ef nC=_postF: lineT:=0; post_put; + ef nC=_postG: lineT:=wv; post_put; + ef nC=_postH: lineT:=nl; lenT:=_size_a; post_put; + ef nC=_jp_bond: termA; tempB:=getB(par); check_adrB(tempB); sB[cntB+1]:=sB[tempB]; f_bra:=1; + ef nC=_jp_atom: termA; tempA:=getA(par); check_adrA(tempA); sB[cntB+1]:=tempA; f_bra:=1; + ef nC=_jp_atom_abs: sB[cntB+1]:=par; f_bra:=1; temp_cntB:=cntB; + ef nC=_chg_atom: numS[getA(adrT)]:=parD[par][1]; + ef nC=_N: numS[getA(par)]:=parD[N][1]; + ef nC=_O: numS[getA(par)]:=parD[O][1]; + ef nC=_S: numS[getA(par)]:=parD[S][1]; + ef nC=_chg_len: if par=_ring_len: bondL:=ringL; + ef par=0: if lenT<>crR: bondL:=lenT; else: if bondL<0: bondL:=1; fi fi + else: bondL:=par; fi + ef nC=_get_len: if par=0: if bondL=crR: bondL:=lenT; fi else: ringL:=lenB[getB(par)]; fi + ef nC=_tmp_len: lenT:=par; + ef nC=_set_line: lineB[getB(adrT)]:=par; + ef nC=_dl: lineB[getB(par)]:=dl; + ef nC=_mb: lineB[getB(-1)]:=par; + ef (nC=_chg_line)or(nC=_tmp_line): lineT:=par; + ef nC=_tmp_rot: rotT:=par; + ef nC=_cyc: f_end:=getA(par); check_adrA(f_end); add_atom; + ef nC=_cyc_eB: f_end:=eB[getB(par)]; add_atom; + ef nC=_cyc_sB: f_end:=sB[getB(par)]; add_atom; + ef nC=_chg_env: envB:=par; + ef nC=_tmp_env: envT:=par; + ef nC=_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 + ef nC=_term: termA; + ef nC=_set_colorA: colorA[getA(adrT)]:=par; + ef nC=_set_colorB: colorB[getB(adrT)]:=par; + ef nC=_set_and: andAT:=par; + ef nC=_chg_charge: andA[getA(par)]:=andAT; andAT:=0; if rotT<>0: and_rot[getA(par)]:=rotT; fi + else: + fi + endfor +enddef; +%------------------------------------------------------------------------------------------------- +def add_atom= + cntB:=cntB+1; + lineB[cntB]:=lineT; + lineT:=si; + if lenT=crR: lenB[cntB]:=bondL; else: lenB[cntB]:=lenT; lenT:=crR; fi + if f_bra=0: cntA:=cntA+1; sB[cntB]:=cntA; numS[cntA]:=strAT; + andA[cntA]:=andAT; andAT:=strAT:=and_rot[cntA]:=0; + if rotT<>0: and_rot[cntA]:=rotT; rotT:=0; fi + if f_MP=1: colorA[cntA]:=colorB[cntA]:=0; fi else: f_bra:=0; fi + if f_end=0: eB[cntB]:=cntA+1; f_term:=0; else: eB[cntB]:=f_end; f_end:=0; f_term:=1; fi +enddef; +%-------------------------------------------------------------------------------------------------- +def check_adrA(expr n)= + if (n>iif(f_term=0,cntA+1,cntA))or(n<=0): errmessage("adrA=[ "&decimal(n)&" ]"); fi enddef; +def check_adrB(expr n)= if (n>cntB)or(n<=0): errmessage("adrB=[ "&decimal(n)&" ]"); fi enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def proc_skeleton= + begingroup + save posBs,posBe,nC; + pair posBs,posBe; + adrA:=adrB:=cntA:=cntB:=adrS:=f_end:=f_bra:=rotT:=f_term:=f_at:=0; + envT:=envB:=f_lineT:=f_rotT:=f_lenT:=f_envT:=stkM[0]:=0; lineT:=si; angT:=mangle; + angA[0]:=angB[0]:=angX[0]:=0; posA[0]:=posBs:=posBe:=(0,0); + for i=0 upto 5: stkA[i]:=stkB[i]:=0; endfor + %----------------------------------------------------------------------------------------------- + for i=1 upto cntD[0]: + nC:=comD[0][i]; par:=parD[0][i]; + if nC=_push: if par=1: stkM[adrS]:=envB; adrS:=adrS+1; stkA[adrS]:=adrA:=cntA; + stkB[adrS]:=adrB:=cntB; + ef par=0: temp_len:=bondL; + ef par=2: stkA[adrS+1]:=cntA; stkB[adrS+1]:=cntB; + fi + ef nC=_pop: if par=1: adrS:=adrS-1; adrA:=stkA[adrS]; adrB:=stkB[adrS]; envB:=stkM[adrS]; + ef par=0: temp_len:=bondL; + ef par=2: stkA[adrS+1]:=0; + fi + ef nC=_jp_bond: termB; tempB:=getB(par); posBs:=posA[sB[tempB]]; + angT:=angB[tempB]; f_bra:=1; rotT:=0; + ef nC=_jp_atom: termB; adrT:=getA(par); posBs:=posA[adrT]; + angT:=angX[adrT]; f_bra:=1; rotT:=0; + ef nC=_jp_atom_abs: adrT:=par; posBs:=posA[adrT]; + angT:=angX[adrT]; f_bra:=1; rotT:=0; temp_cntB:=cntB; + ef nC=_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 nC=_mk_bond: if (par=0)and(rotT<>0):par:=rotT; rotT:=0; fi add_bond(par); + ef nC=_rot_ang: angT:=(angT+par) mod 360; + ef nC=_tmp_rot: rotT:=par; + ef (nC>=_postA)and(nC<=_postH): rotT:=0; + ef nC=_chg_env: envB:=par; + ef nC=_tmp_env: envT:=par; + ef nC=_set_clr: f_at:=par; if par=0: lineT:=si; lenT:=crR; rotT:=envT:=0; fi + ef nC=_cyc: f_end:=1; proc_cyc(getA(par)); + ef nC=_cyc_sB: f_end:=1; proc_cyc(sB[getB(par)]); + ef nC=_cyc_eB: f_end:=1; proc_cyc(eB[getB(par)]); + ef nC=_term: termB; + else: + fi + endfor + endgroup +enddef; +%------------------------------------------------------------------------------------------------- +def add_bond(expr ROT)= + begingroup + save nA,nB; + if ROT=_arg_ang: nA:=proc_env(angT,envB); else: nA:=ROT; fi + if f_bra=0: + adrT:=cntA:=cntA+1; posA[cntA]:=posBs; angA[cntA]:=angT; + angX[cntA]:=(angT+nA/2+iif(nA>=0,-90,90)) mod 360; + else: f_bra:=0; + fi + angB[cntB+1]:=angT:=(angT+nA) mod 360; + if f_end=0: + if lenB[cntB+1]=_size_a: 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 + posBe:=sfB(posBs,nA*blen+nB,angT); + fi + posA[cntA+1]:=posBe; f_term:=0; + else: + f_end:=0; f_term:=1; + fi + cntB:=cntB+1; posBs:=posBe; + endgroup +enddef; +%================================================================================================== +vardef getA(expr ADR)= + if ADR>=0: stkA[adrS+1]+ADR ef ADR>=-999: cntA+ADR+1 else: stkA[adrS]+ADR+4095 fi +enddef; +%-------------------------------------------------------------------------------------------------- +vardef getB(expr ADR)= + if ADR>=1: stkB[adrS+1]+ADR ef ADR=0: tempB ef ADR>=-999: cntB+ADR+1 else: stkB[adrS]+ADR+4095 fi +enddef; +%-------------------------------------------------------------------------------------------------- +def termA= + if f_term=0: + if f_bra=0: + cntA:=cntA+1; numS[cntA]:=strAT; andAT:=strAT:=and_rot[cntA]:=andA[cntA]:=0; + if rotT<>0: and_rot[cntA]:=rotT; rotT:=0; fi + if f_MP=1: colorA[cntA]:=0; fi + else: f_bra:=0; + fi + f_term:=1; + fi +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 +enddef; +%-------------------------------------------------------------------------------------------------- +def proc_cyc(expr ADR)= add_bond(angle(posA[ADR]-posBs)-angT); enddef; +%-------------------------------------------------------------------------------------------------- +vardef glu_atom(expr NUM)= + save nB,nC; + if numS[NUM]<>0: + nB:=angT mod 90; nC:=0.5atom_wd; + (iif(nB<45,sind(nB),cosd(nB))*nC)++nC + else: 0 + fi +enddef; +%-------------------------------------------------------------------------------------------------- +vardef proc_env(expr ANG,ENV)= + save nA,nCW,nCC; + nCC:=60; nCW:=-nCC; + nA:=(ANG mod 360); + if ENV>=sub_emb_start: + parD[ENV][cntB-temp_cntB] + else: + if ENV=hz: if nA=0:nCC ef nA<=90:nCW ef nA<=180:nCC ef nA<270:nCW else:nCC fi + ef ENV=vt: if nA=0:nCW ef nA<90:nCC ef nA<=180:nCW ef nA<=270:nCC else:nCW fi + ef (ENV>=-180)and(ENV<=180): ENV + fi + fi +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def draw_atom(expr NUM)= + begingroup + save slen,f_wd,f_ht,r_ff,pA,pB,bA,sA,sB,dx,nA,nB,nC,nD; + string sA,sB; + pair pA,pB; + picture bA; + %---------------------------------------------------------------------------------------------- + sA:=strD[numS[NUM]]; slen:=length(sA)-1; + nA:=angX[NUM]; dxA[NUM]:=dx:=iif((nA<=90)or(nA>=270),1,-1); + wdA[NUM]:=nC:=0; pB:=(0,0); + pA:=posA[NUM]-(.5atom_wd*dx,.5atom_wd); + if (atomfont<>"draw")and(f_MP=1): + bA:="C" infont atomfont; + r_ff:=atom_wd/(ypart(ulcorner bA)-ypart(llcorner bA)); + fi + for i=0 upto slen: + if nC=0: + sB:=pic_c(i,sA); + if (dx=-1)and(sB="{"): + nD:=i+1; nC:=0; for j=nD upto slen: nC:=nC+1; exitif pic_c(j,sA)="}"; endfor + fi + else: nC:=nC-1; sB:=pic_c(nD+nC,sA); + fi + if sB="_": pB:=iif(pB=(0,0),(0,-.5atom_wd),(0,0)); + elseif sB="^": pB:=iif(pB=(0,0),(0, .5atom_wd),(0,0)); + elseif (sB<>"{")and(sB<>"}"): + if (atomfont<>"draw")and(f_MP=1): + bA:=sB infont atomfont; + f_wd:=(xpart(lrcorner bA)-xpart(llcorner bA))*r_ff; + f_ht:=(ypart(urcorner bA)-ypart(llcorner bA))*r_ff; + if dx=-1: pA:=pA-(f_wd,0); fi + addto currentpicture also bA scaled (r_ff*(1-2ratio_atomgap_atom)) + shifted (pA+pB+(f_wd*ratio_atomgap_atom,f_ht*ratio_atomgap_atom)) Cp(colorA[NUM]); + if sw_aframe=1: draw_frame(pA+pB,f_wd,f_ht,thickness_aframe); fi + if dx=1: pA:=pA+(f_wd,0); fi + else: + f_wd:=atom_wd*tbl_char_wd[ASCII(sB)]; + if dx=-1: pA:=pA-(f_wd,0); fi + draw_char(sB,pA+pB,atom_wd,bond_pen_wd*ratio_char_bond,NUM); + if sw_aframe=1: draw_frame(pA+pB,f_wd,atom_wd,thickness_aframe); fi + if dx=1: pA:=pA+(f_wd,0); fi + fi + wdA[NUM]:=wdA[NUM]+f_wd; + fi + endfor + endgroup +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def draw_bond(expr NUM)= + begingroup + save ww,ap,am,ang,col,len,Ls,Le,nA,nB,nC,nD,nL,nS,nE,pA,zA,zL,wpcs; + pair pA,Ls,Le; + path zA,zL; + def wpcs expr n= withpen pencircle scaled n enddef; + %------------------------------------------------------------------------------------------------ + nL:=lineB[NUM]; ang:=angB[NUM]; nS:=sB[NUM]; nE:=eB[NUM]; col:=colorB[NUM]; + zL:=posA[nS]--posA[nE]; ww:=wedge_wd; ap:=ang+90; am:=ang-90; + %------------------------------------------------------------------------------------------------ + if (numS[nS]=0)and(numS[nE]=0)or(sw_numberA=1)or(sw_numberB=1): + Ls:=posA[nS]; Le:=posA[nE]; pA:=(.1,.9); + ef numS[nS]=0: Le:=zL intersectionpoint frame_str(nE); Ls:=posA[nS]; pA:=(.15,1); + ef numS[nE]=0: Ls:=zL intersectionpoint frame_str(nS); Le:=posA[nE]; pA:=(0,.85); + else: Ls:=zL intersectionpoint frame_str(nS); Le:=zL intersectionpoint frame_str(nE); pA:=(0,1); + fi + zA:=Ls--Le; len:=length(Le-Ls); + %------------------------------------------------------------------------------------------------ + pickup pencircle scaled bond_pen_wd; + if (nL=si)or(sw_single=1): draw zA Cp(col); + ef nL=dl: draw zA Cp(col); draw sfB(subpath pA of zA,bondgap,ap) Cp(col); + ef nL=dr: draw zA Cp(col); draw sfB(subpath pA of zA,bondgap,am) Cp(col); + ef nL=dm: draw sfB(zA,bondgap/1.75,ap) Cp(col); draw sfB(zA,bondgap/1.75,am) Cp(col); + ef nL=db: nA:=iif(((ang-angX[nS]) mod 360)<=180,ap,am); + draw zA Cp(col); draw sfB(subpath pA of zA,bondgap,nA) Cp(col); + ef nL=tm: draw zA Cp(col);draw sfB(zA,bondgap,ap) Cp(col); draw sfB(zA,bondgap,am) Cp(col); + ef nL=wf: fill Ls--sfB(Le,ww,am)--sfB(Le,ww,ap)--cycle Cp(col); + ef nL=wb: fill sfB(Ls,ww,am)--Le--sfB(Ls,ww,ap)--cycle Cp(col); + ef nL=bd: draw zA withpen penrazor rotated ap scaled bondgap Cp(col); + ef nL=bz: bz_put(sfB(Ls,ww,ap),sfB(Le,ww,ap),sfB(Ls,ww,am),sfB(Le,ww,am)); + ef nL=zf: wz_put(Ls,sfB(Le,ww,ap),sfB(Le,ww,am)); + ef nL=zb: wz_put(Le,sfB(Ls,ww,am),sfB(Ls,ww,ap)); + ef nL=dt: for i=0 step .75zebra_gap/len until 1: drawdot i[Ls,Le] Cp(col); endfor + ef nL=wv: nA:=3bond_pen_wd; nB:=len/nA; + draw Le for i=1 upto nB: + ..controls(((i-.5)/nB)[sfB(Le,nA,iif(odd(i),ap,am)),sfB(Ls,nA,iif(odd(i),ap,am))]) + ..(i/nB)[Le,Ls] endfor ..Ls Cp(col); + ef nL=vf: draw zA Cp(col);draw sfB(Le,bondgap,ang-150)--Le--sfB(Le,bondgap,ang+150) Cp(col); + ef nL=vb: draw zA Cp(col);draw sfB(Ls,bondgap,ang-30)--Ls--sfB(Ls,bondgap,ang+30) Cp(col); + ef nL=si_: erase draw subpath (0.15,0.85) of zA wpcs 0.8bondgap; draw zA Cp(col); + ef nL=wf_: erase draw subpath (0.15,0.85) of (Ls--sfB(Le,ww,am)) wpcs 0.8bondgap; + erase draw subpath (0.15,0.85) of (Ls--sfB(Le,ww,ap)) wpcs 0.8bondgap; + fill Ls--sfB(Le,ww,am)--sfB(Le,ww,ap)--cycle Cp(col); + ef nL=wb_: erase draw subpath (0.15,0.85) of (sfB(Ls,ww,am)--Le) wpcs 0.8bondgap; + erase draw subpath (0.15,0.85) of (sfB(Ls,ww,ap)--Le) wpcs 0.8bondgap; + 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); + fi + endgroup +enddef; +%------------------------------------------------------------------------------------------------ +def wz_put(expr PA,PB,PD)= + for i=0 upto len/zebra_gap: + nA:=zebra_gap*i/len; nD:=(zebra_gap*i+ratio_zebra_black*zebra_gap)/len; + if nD>((len-zebra_gap)/len): nD:=1; fi + fill nA[PB,PA]--nA[PD,PA]--nD[PD,PA]--nD[PB,PA]--cycle Cp(col); + endfor +enddef; +%------------------------------------------------------------------------------------------------ +def bz_put(expr PA,PB,PC,PD)= + for i=0 upto len/zebra_gap: + nA:=zebra_gap*i/len; nD:=(zebra_gap*i+ratio_zebra_black*zebra_gap)/len; + fill nA[PB,PA]--nA[PD,PC]--nD[PD,PC]--nD[PB,PA]--cycle Cp(col); + endfor +enddef; +%------------------------------------------------------------------------------------------------ +vardef frame_str(expr NUM)= + save nA,nB; + nA:=1.12atom_wd; nB:=wdA[NUM]+.12atom_wd; + ((0,0)--(nB,0)--(nB,nA)--(0,nA)--cycle) shifted + (posA[NUM]-(.5nA+iif((dxA[NUM]=-1)and(wdA[NUM]>atom_wd),nB-nA,0),.5nA)) +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def ring expr n= <((-180 DIV n)-90),(_chg_len,0), + for i==2 upto n:: ,(360 DIV n) endfor,(_cyc_sB,1-n) enddef; +%------------------------------------------------------------------------------------------------- +sub_usr:=sub_emb_start; +%------------------------------------------------------------------------------------------------- +lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr); +for i=3 upto 20: ?[i]:='(|:,ring i,:|); endfor +Ph:=Ph1:='(?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='(?6,(_dl,-1),(_dl,-3),(_dl,-5)); +!:=!1:='((_mk_bond,_arg_ang)); !!:='(!,(_mb,db)); !!!:='(!,(_mb,tm)); !0:='(<180,180); +for i=2 upto 20: ![i]:='(|:,(_get_len,0),! for j==2 upto i::,! endfor,:|); endfor +Me:='(); Et:='(!); Pr:=!x2:='(!,!); Bu:=!x3:='(!,!,!); +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}"); +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^-^}"); +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,(_postE,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); +%================================================================================================== +init_par(parameter_list); +%-------------------------------------------------------------------------------------------------- +%%%%%%message "count of sub_usr =" & decimal(sub_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); + 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); +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def char_size_set(expr WD)(expr HT)(expr STR)= + for j=0 upto length(STR)-1: + nA:=ASCII(pic_c(j,STR)); + tbl_char_wd[nA]:=WD; + tbl_char_ht[nA]:=HT; + endfor +enddef; +%------------------------------------------------------------------------------------------------- +char_size_set( 1)( 1)("CGHMNOQW"); +char_size_set( .9)( 1)("ABDFIJKPRSTUVXY/><#\%@"); +char_size_set( .8)( 1)("ELZ&"); +char_size_set( .7)( 1)(" ()[]0123456789nh=tfg?~"); +char_size_set( .7)( .9)("$"); +char_size_set( .7)( .7)("-+*"); +char_size_set(.45)(.95)("l"); +char_size_set(.75)( .8)("opq"); +char_size_set( .8)( .8)("e"); +char_size_set( .9)( .8)("wm"); +char_size_set( .7)( .8)("abdcksuvrxyz"); +char_size_set(.35)( .9)("i"); +char_size_set( .5)( .9)("j"); +char_size_set(.35)( 1)("!|"); +char_size_set( .4)( 1)(".,:;'`^"); +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +def draw_char(expr CHR,POS,WD,PEN,NUM)= +begingroup +save Z,aW,aH,fW,fH,hW,hW,hH,fP,hP,zO,zOh,pos,dw,dwh,dwv,cdw,ppcs,sbp,sC; +path zO,zOh,zOa; +string sC; +pair Z[],pos; +%------------------------------------------------------------------------------------------------- +def ppcs expr n= pickup pencircle scaled n enddef; +def sbp(expr m,n)expr p=subpath(m*length(p),n*length(p)) of p enddef; +def dw expr p = draw (p) shifted pos Cp(colorA[NUM]) enddef; +def dwv expr p = draw (p) withpen penrazor scaled fP shifted pos Cp(colorA[NUM]) enddef; +def dwvs (expr n)expr p= + draw (p) withpen penrazor scaled fP scaled n shifted pos Cp(colorA[NUM]) enddef; +def dwh expr p=draw (p) withpen penrazor rotated 90 scaled fP shifted pos Cp(colorA[NUM]) enddef; +def cdw expr p=cutdraw (p) shifted pos Cp(colorA[NUM]) enddef; +%------------------------------------------------------------------------------------------------- +sC:=CHR; fP:=PEN; hP:=0.5fP; +aW:=WD*tbl_char_wd[ASCII(sC)]*(1-2ratio_atomgap_atom); +aH:=WD*tbl_char_ht[ASCII(sC)]*(1-2ratio_atomgap_atom); +pos:=POS+(WD*ratio_atomgap_atom,WD*ratio_atomgap_atom); +fW:=aW-hP; hW:=.5aW; fH:=aH-hP; hH:=.5aH; +Z01:=( 0,hP); Z02:=(hP, 0); Z03:=(hP,hP); Z04:=(aW,hP); Z05:=(fW, 0); Z06:=(hW,aH); Z07:=(hW, 0); +Z08:=( 0,hH); Z09:=(hP,hH); Z10:=(fW,hH); Z11:=(hW,aW); Z12:=( 0,fH); Z13:=(hP,fH); Z14:=(hW,fH); +Z15:=(fW,aH); Z16:=(aW,fH); Z17:=(aW,hH); Z18:=(hP,aH); Z19:=(hW,hP); Z20:=(hW,hH); Z21:=(fW,hP); +Z22:=(fW,fH); Z23:=(hW,fW); +zO:=Z10..(.8aW,fH-.5hP)..tension 1.5..(.2aW,fH-.5hP)..Z09.. + (.2aW,1.5hP)..tension 1.5..(.8aW,1.5hP)..cycle; +zOh:=(hP,.25aH)..Z19..(fW,.25aH)..Z20..cycle; +zOa:=(hP,.35aH)..(hW,hP)..(fW,.35aH)..(hW,.7aH)..cycle; +%------------------------------------------------------------------------------------------------- +ppcs fP; +if sC="A": dwvs(1.14) Z02--Z06--Z05; dw .33[Z02,Z06]--.33[Z05,Z06]; +ef sC="B": dw Z13--Z14{right}..(.9fH,.75aH)..{left}Z20--Z09--Z20{right}..(.9fH,.25aH).. + {left}Z19--Z03; dwv Z02--Z18; +ef sC="C": cdw sbp(.05,.95)zO; +ef sC="D": dw Z13--Z14..Z10..Z19--Z03; dwv Z02--Z18; +ef sC="E": pickup pensquare scaled fP; dw Z21--Z03--Z13--Z22; dw Z09--Z10; +ef sC="F": dwh Z12--Z16; dwh (0,.45aH)--(fW,.45aH); dw Z02--Z13; +ef sC="G": cdw sbp(.06,.97)zO; dwh bot Z20-- bot Z17; +ef sC="H": dwv Z02--Z18; dw Z09--Z10; dwv Z05--Z15; +ef sC="I": dwv Z19--Z14; dwh (hW-fP,hP)--(hW+fP,hP); dwh (hW-fP,fH)--(hW+fP,fH); +ef sC="J": cdw Z09..(hP,.4aH){down}..{right}Z19{right}..{up}(fW,.4aH)..Z15; +ef sC="K": cdw Z02--Z18; cdw .35[.45[Z02,Z18],Z16]--Z05; cdw .35[Z02,Z18]--Z16; +ef sC="L": dwh Z04--Z01; dwv Z02--Z18; +ef sC="M": dwv Z02--Z18; dwvs(1.14) Z18--Z19--Z15; dwv Z15--Z05; +ef sC="N": dwv Z02--Z18; dwv Z05--Z15; dwvs(1.4) (1.4hP,aH)--(aW-1.4hP,0); +ef sC="O": dw zO; +ef sC="P": dwv Z02--Z18; dw Z13--(.65aW,fH){right}..(fW,.7aH)..{left}(.65aW,.44aH)..(hP,.44aH); +ef sC="Q": dw zO; dw (.6aW,.4aH)--Z05; +ef sC="R": dwv Z02--Z18; dw Z13--(.65aW,fH){right}..(fW,.7aH)..{left}(.65aW,.44aH)..(hP,.44aH); + cdw Z05{up}..{left}(hW,.44aH); +ef sC="S": cdw sbp(.05,.45)zO; cdw sbp(.55,.95)zO; dw (fW,.3aH){up}..{up}(hP,.7aH); +ef sC="T": dwh Z12--Z16; dwv .5[Z12,Z16]--Z07; +ef sC="U": cdw Z18..Z09{down}..{right}Z19{right}..{up}Z10..Z15; +ef sC="U": cdw Z18..(hP,.4fH){down}..{right}Z19{right}..{up}(fW,.4fH)..Z15; +ef sC="V": dwvs(1.2) Z18--Z07--Z15; +ef sC="W": dwvs(1.08) Z18--(.25aW,0)--Z06--(.75aW,0)--Z15; +ef sC="X": dwvs(1.4) Z18..Z05; dwvs(1.4) Z02..Z15; +ef sC="Y": dwvs(1.2) Z18--Z20--Z15; dwv Z20--Z07; +ef sC="Z": dwh Z12--Z16; dwvs(1.4) (1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z01--Z04; +ef sC="a": dw Z19..Z10..Z14..Z09..cycle; dwv Z05--Z15; +ef sC="b": dw Z19..Z10..Z11..Z09..cycle; dwv Z02--(hP,1.3aH) +ef sC="c": cdw sbp(.06,.94)Z10..Z14..Z09..Z19..cycle; +ef sC="d": dw Z19..Z10..Z11..Z09..cycle; dwv Z05--(fW,1.3aH); +ef sC="e": cdw sbp(0,.92)Z10..Z14..Z09..Z19..cycle; dw Z10--Z09; +ef sC="f": cdw (.4fW,0)--(.4fW,.75aH){up}..(.75aW,fH)..{down}(fW,.8aH); dwh Z08--Z17; +ef sC="g": dw zOa; dw sbp(0,.5)zOh shifted (0,-.5fH); cdw (aW-hP,.7aH)--(aW-hP,-.25aH); +ef sC="h": cdw Z02..(hP,.3aH){up}..(hW,.7fH)..{down}(fW,.3aH)..Z05; dwv (hP,.3aH)--Z18; +ef sC="i": dwv Z07--(hW,.7aH); ppcs 1.4fP; dw Z14; +ef sC="j": cdw (fW,.7aH)--Z21..(.25aW,-.66fP)..Z03; ppcs 1.4fP; dw Z22; +ef sC="k": dwv Z02--(hP,1.3fH); cdw .5[Z02,Z18]--Z05; cdw .5[Z02,Z18]--Z16; +ef sC="l": dwv Z07--Z06; dwh Z14--Z13; dwh Z19--Z21; +ef sC="m": cdw Z02..(hP,.3aH){up}..(.28aW,fH)..{down}(hW,.3aH)..Z07; + cdw (hW,.6aH){up}..(.7aW,aH-hP)..{down}(fW,.6aH)..Z05; dwv (hP,.3aH)--(hP,aH); +ef sC="n": cdw Z02{up}..(hW,.8fH)..{down}(fW,.5aH)..Z05; dwv (hP,0)--(hP,.8aH); +ef sC="o": dw Z19..Z10..Z14..Z09..cycle; +ef sC="p": dw Z19..Z10..Z14..Z09..cycle; dwv (hP,aH)--(hP,-.3aH); +ef sC="q": dw Z19..Z10..Z14..Z09..cycle; dwv (fW,aH)--(fW,-.3aH); +ef sC="r": cdw (sbp(.33,.72)Z19..Z10..Z14..Z09..cycle) shifted(0,-hP); dwv Z02--Z18; +ef sC="s": cdw sbp(.05,.45)zO; cdw sbp(.55,.95)zO; dw (fW,.3aH){up}..{up}(hP,.7aH); +ef sC="t": dwv Z07--Z06; dwh (0,.66aH)--(aW,.66aH); +ef sC="u": cdw Z18..(hP,.55aH){down}..Z19..(fW,.55aH){up}..Z15; dwv Z15--Z05; +ef sC="v": dwv Z18--Z07--Z15; +ef sC="w": dwv Z18--(.25aW,0)--Z06--(.75aW,0)--Z15; +ef sC="x": dwvs(1.4) Z18--Z05; dwvs(1.4) Z15--Z02; +ef sC="y": dwvs(1.4) (Z18--Z20) shifted (0,-.3aH); dwvs(1.4) (Z15--Z02) shifted (0,-.3aH); +ef sC="z": dwh Z12--Z16; dwvs(1.4) (1.4hP,fP)--(aW-1.4hP,aH-fP); dwh Z01--Z04; +ef sC="0": dw Z09...Z14...Z10...Z19...cycle; +ef sC="1": dwv Z07--(hW,aH-.3hP)--(hW-fP,aH-fP)--(hW-fP,aH-1.5fP); +ef sC="2": cdw (hP,1.3hP)..(.4fW,.35fH)..(fW,.65aH)..Z14..(hP,.65aH); dwh Z04--Z01; +ef sC="3": cdw sbp(0,.75)zOh; cdw sbp(.25,.98)zOh shifted (0,hH-hP); dwh (.3aW,hH)--Z20; +ef sC="4": dwh (0,.25aH)--(aW,.25aH); dwv (.75aW,0)--(.75aW,aH)--(1.2hP,.25aH+hP); + dwv (.75aW+.5hP,aH)--(1.7hP,.25aH+hP); +ef sC="5": dwh Z12--Z16; dwv Z13--(hP,.55fH); + cdw (.5hP,.18aH)..(.65aW,1.3hP)..(fW,.4aH)..(hW,.63aH)..(.7hP,.56aH); +ef sC="6": dw Z19..(fW,.5fW)..Z23..(hP,.5fW)..cycle; cdw (.8fP,hH)--Z06; +ef sC="7": dwh (0,.fH)--Z16; dwvs(1.2) (aW-1.2hP,aH-fP)--(.4aW,0); +ef sC="8": dw zOh; dw (hP,.75aH)...Z14...(fW,.75aH)...Z20...cycle; +ef sC="9": dw (Z19..(fW,.5fW)..Z23..(hP,.5fW)..cycle) shifted (0,.32aH); cdw (fW-.45fP,hH)--Z07; +ef sC=" ": +ef sC=".": ppcs 1.4fP; dw Z19; +ef sC=",": dw (hW+.5fP,hP)..(hW+.3fP,-fP)..(hW-.5fP,hP-2fP); ppcs 1.4fP; dw Z19; +ef sC="'": dw (hW+.5fP,fH)..(hW+.3fP,fH-fP)..(hW-.5fP,fH-2fP); ppcs 1.4fP; dw Z14; +ef sC="`": dw (hW-.5fP,fH-2fP)..(hW-.3fP,fH-fP)..(hW+.5fP,fH); ppcs 1.4fP; dw (hW,fH-2fP); +ef sC=":": ppcs 1.4fP; dw (hW,.2aH); dw (hW,.8aH); +ef sC=";": dw (hW+hP,.2aH)..(hW-hP,.2aH-2fP); ppcs 1.4fP; dw (hW,.2aH); dw (hW,.8aH); +ef sC="(": dw Z19...Z09...Z14; +ef sC=")": dw Z19...Z10...Z14; +ef sC="[": dwv Z07--Z06; dwh Z14--Z22; dwh Z19--Z21; +ef sC="]": dwv Z07--Z06; dwh Z14--Z13; dwh Z03--Z19; +ef sC="<": cdw Z01--Z17--Z12; +ef sC=">": cdw Z16--Z08--Z04; +ef sC="-": dwh Z09--Z10; +ef sC="=": dwh (hP,.3aH)--(fW,.3aH); dwh (hP,.6aH)--(fW,.6aH); +ef sC="/": dw Z22..Z01; +ef sC="+": dwv Z19--Z14; dwh Z09--Z10; +ef sC="*": dw Z19--Z14; dw Z09--Z10; dw (.2aW,.2aH)--(.8aW,.8aH); dw (.2aW,.8aH)--(.8aW,.2aH); +ef sC="$": cdw sbp(.05,.45)zO; cdw sbp(.55,.95)zO; dw (fW,.3aH){up}..{up}(hP,.7aH); + dwv (hW,-fP)--(hW,fH+1.5fP); +ef sC="#": dwv (.3aW,0)--(.3aW,aH); dwv (.7aW,0)--(.7aW,aH); + dwh (0,.3aH)--(aW,.3aH); dwh (0,.7aH)--(aW,.7aH); +ef sC="!": dwv Z06--(hW,.25aH); ppcs 1.4fP; dw Z07; +ef sC="?": cdw (hP,.75fH)..(hW,aH)..(fW,.75fH)..(hW,.4fH)--(hW,.2fH); ppcs 1.4fP; dw Z07; +ef sC="|": dwv Z07--Z06; +ef sC="\": dw Z13--Z21; +ef sC="%": dw Z22..Z01; dw fullcircle scaled 2.7fP shifted (.2fH,.9fH); + dw fullcircle scaled 2.7fP shifted (.73fH,.20fH); +ef sC="~": dw (hP,.8aH)..(.3aW,.9aH)..(.6aW,.7aH)..(fW,.8aH); +ef sC="&": cdw Z21..(hW,.35aH)..(.25aW,.75aH)..(hW,.fH)..(.75aW,.75fH)..(hP,.3aH)..(hW,.hP)..Z10; +ef sC="@": cdw sbp(0,.7)zO; dwv (fW,hH)--(fW,0); + dw (fW,.45aH)..(.7aW,.75aH)..(.3aW,.45aH)..(.7aW,.15aH)..cycle; +else: +fi +endgroup +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; +vardef fdl(expr n)(expr s)=fixed_l(n)(decimal(s)) enddef; +def warning(expr s)= message "% "&decimal(char_num)&fdr(3)(incr warning_cnt)&")"&s; enddef; +%-------------------------------------------------------------------------------------------------- +def bond_check(expr a)(text s)= + nF:=0; for list=s: if list=bond_cnt: nF:=1; fi endfor + if nF=0: + warning("A"&decimal(a)&" ( "&fixed_l(8)(strD[numS[a]])&") has"&fdr(2)(bond_cnt)&" bonds"); + fi +enddef; +%-------------------------------------------------------------------------------------------------- +vardef stripP(expr ATOM)= + if length(ATOM)=4: substring (1,3) of ATOM + elseif length(ATOM)=6: substring (1,2) of ATOM + else: ATOM + fi +enddef; +%================================================================================================== +def STa(expr ATOM,WT,MI)= + tbl_cnt:=tbl_cnt+1; + tbl_atom_str[tbl_cnt]:=ATOM; + tbl_atom[tbl_cnt]:=0; + tbl_atom_wt[tbl_cnt]:=WT; + tbl_atom_mi[tbl_cnt]:=MI; +enddef; +%---------------------------------------------------------------------------------- +def STb(expr ATOM)(text TXT)= + tbl_cnt:=tbl_cnt+1; + tbl_atom_str[tbl_cnt]:=ATOM; + tbl_atom[tbl_cnt]:=0; + 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 + endfor + endfor +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("{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("{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("{Zn}",65.409, 63.92914201); +%-------------------------------------------------------------------------------------------------- +STb("{H_2_}")("H","H"); STb("OH")("O","H"); STb("O{Na}")("O","{Na}"); STb("CN")("C","N"); +STb("SH")("S","H"); STb("CHO")("C","H","O"); STb("N{O_2_}")("N","O","O"); +STb("N{H_2_}")("N","H","H"); STb("S{O_3_}")("S","O","O","O"); STb("COOH")("C","O","O","H"); +STb("C{H_3_}")("C","H","H","H"); STb("C{F_3_}")("C","F","F","F"); +%================================================================================================== +def proc_calc= + begingroup + save warning_cnt,MWp,knownA,bondC,tmp_wtp,bond_cnt,cnt_hide_H; + numeric sumA[],bondC[],hideH[]; + string sumA; + cnt_hide_H:=warning_cnt:=num_MW:=num_MI:=MWp:=0; + %------------------------------------------------------------------------------------------ + for i=1 upto tbl_cnt: sumA[i]:=0; endfor + for i=1 upto cntA: + knownA:=bond_cnt:=0; + for j=1 upto cntB: + if (lineB[j]>=dl)and(lineB[j]<=dm): bondC[j]:=2; + ef lineB[j]=tm: bondC[j]:=3; + ef (lineB[j]=vf)or(lineB[j]=vb): bondC[j]:=0; + else: bondC[j]:=1; + fi + if (sB[j]=i)or(eB[j]=i): bond_cnt:=bond_cnt+bondC[j]; fi + endfor + Bcnt[i]:=bond_cnt; + if numS[i]=0: strD[numS[i]]:="C"; fi + if (strD[numS[i]]="C")and(bond_cnt<4): + hideH[i]:=4-bond_cnt; cnt_hide_H:=cnt_hide_H+hideH[i]; else: hideH[i]:=0; + fi + if strD[numS[i]]="C": bond_check(i)(1,2,3,4); + ef strD[numS[i]]="N": bond_check(i)(3,5); + ef strD[numS[i]]="H": bond_check(i)(1); + ef strD[numS[i]]="O": bond_check(i)(2); + ef strD[numS[i]]="S": bond_check(i)(2,4,6); + ef strD[numS[i]]="P": bond_check(i)(5); + ef strD[numS[i]]="OH": bond_check(i)(1); + ef strD[numS[i]]="COOH": bond_check(i)(1); + ef strD[numS[i]]="CN": bond_check(i)(1); + ef strD[numS[i]]="N{H_2_}": bond_check(i)(1); + ef strD[numS[i]]="F": bond_check(i)(1); + ef strD[numS[i]]="{Cl}": bond_check(i)(1); + ef strD[numS[i]]="{Br}": bond_check(i)(1); + fi + 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 + knownA:=1; fi endfor + if knownA=0: warning(" Unknown Str("&strD[numS[i]]&") is used "&decimal(i)); fi + endfor + sumA[2]:=sumA[2]+cnt_hide_H; + for i=1 upto tbl_cnt: + if sumA[i]>=1: + nA:=tbl_atom_wt[i]/100*sumA[i]; + MWp:=MWp+nA; + if (MWp<40)and(nA<40): + num_MW:= num_MW+tbl_atom_wt[i]*sumA[i]; + num_MI:= num_MI+tbl_atom_mi[i]*sumA[i]; + fi + cal_FM:=cal_FM&stripP(tbl_atom_str[i]) if sumA[i]>=2: &decimal(sumA[i]) fi; + fi + endfor + cal_MI:=substring (0,10) of decimal(num_MI); + cal_MW:=substring (0,8) of decimal(num_MW); + if sw_aux_out=1: proc_auxfile_out; fi + if sw_rep_out=1: proc_report_out; fi + if sw_mol_out>=1: proc_mol_out; fi + endgroup +enddef; +%================================================================================================== +def auxtag_out= + for i=1 upto aux_max: exitif tag[i]=""; if i=1: printf tag[1] else: &aux_delimiter&tag[i] fi + endfor +enddef; +%================================================================================================== +def proc_auxfile_out= + message "["&decimal(char_num)&"]:"&inf_EN; + out_file_name:=out_file_aux; + for i=1 upto aux_max: exitif tag[i]=""; + if i=1: printf "" else: &aux_delimiter fi if sw_auxfix=0: &tag[i]&":" fi & + if string scantokens(var[i]): scantokens(var[i]) + elseif numeric scantokens(var[i]): decimal(scantokens(var[i])) fi + endfor + if sw_auxfix=0: for i=1 upto inf_num: &aux_delimiter&info[i] endfor; fi +enddef; +%================================================================================================== +vardef round_auto(expr n)= + if (n<4) and(n>-4): round(n*1000)/1000 elseif (n<40) and(n>-40): round(n*100)/100 + elseif (n<400)and(n>-400): round(n*10)/10 else: round(n) fi +enddef; +%-------------------------------------------------------------------------------------------------- +def proc_report_out= + message "["&decimal(char_num)&"]:"&inf_EN; + out_file_name:=out_file_rep; + printf "------------------------------------------------------------------"; + printf " Molecular name = "& inf_EN; + printf " Warnings = "&fdr(3)(warning_cnt)&" / Expanded command = "&decimal(cntD[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)(cnt_hide_H); + printf "------------------------------------------------------------------"; + printf "< NO. >( x axis , y axis )< atom >< bond >< hideH >< chg >"; + for i=1 upto cntA: + printf " A"&fdl(4)(i)&" ("&fdr(10)(round_auto(xpart(posA[i])/blen))&" , "& + fdr(10)(round_auto(ypart(posA[i])/blen))&" ) "&fixed_l(8)(strD[numS[i]])& + " "&fdr(3)(Bcnt[i]) + &iif(hideH[i]>0,fdr(8)(hideH[i])," ") + if chargeA[i]<>0: &fdr(8)(chargeA[i]) fi; + endfor + printf "------------------------------------------------------------------"; + printf "< NO. >< bond (sdt)><angle + ( +- )><length ( pt )>"; + for i=1 upto cntB: + nC:=lenB[i]; if nC=_size_a: nC:=ratio_atom_bond; elseif nC<0: nC:=-nC; fi + if lineB[i]<>0: + 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)(bondC[i]-si+1)&")"&fdr(9)(round_auto(angB[i]))& + " ("&fdr(6)(round_auto(nB))&")"&fdr(8)(nC)&" ("&fdr(8)(round_auto(nC*blen))&")"; + fi + endfor + printf "------------------------------------------------------------------"; + printf "<atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ]"; + if MWp<=40: cal_MW_str:=cal_MW; cal_MI_str:=cal_MI; + else: cal_MW_str:=fdr(10)(MWp)&" * 100"; cal_MI_str:=fdr(10)(MIp)&" * 100"; + fi + for i=1 upto tbl_cnt: + if sumA[i]>=1: + nA:=tbl_atom_wt[i]/100*sumA[i]; nB:=tbl_atom_mi[i]/100*sumA[i]; + printf " "& + fixed_l(5)(stripP(tbl_atom_str[i]))& + "("&fdr(9)(tbl_atom_wt[i])&")"&"["&fdr(9)(tbl_atom_mi[i])&"]"& + " * "&fdr(4)(sumA[i])&" = " + if nA<40: &fdr(12)(tbl_atom_wt[i]*sumA[i])&"["&fdr(12)(tbl_atom_mi[i]*sumA[i])&"]"; + else: &fdr(12)(nA)&" * 100"&"["&fdr(12)(nA)&" * 100"&"]"; + fi + fi + endfor + printf " Molecular Weight [Mono Isotopic] = "& + fixed_r(12)(cal_MW_str)&"["&fixed_r(12)(cal_MI_str)&"]"; + printf "------------------------------------------------------------------"; + printf " Weight Calc: " &cal_MW_str &" / Input: " + if inf_MW<>"": &inf_MW &" / weight gap= " &decimal(num_MW-scantokens(inf_MW)) fi; + printf " Fomula Calc: "&cal_FM&" / Input: " + if inf_FM<>"": &inf_FM&" / "& iif(inf_FM=cal_FM,"MACTCH","NOT MACTCH") fi; + printf "=================================================================="; +enddef; +%================================================================================================== +def proc_mol_out= + begingroup + save chg_cnt,chg_atm,chg_chg,nA,nB; + nA:=nB:=chg_cnt:=0; + message "["&decimal(char_num)&"]:"&inf_EN; + out_file_name:=out_file_mol; + if sw_mol_out<=2: + out_file_name:=out_file_mol; + if sw_mol_out=1: proc_vdk; + elseif sw_mol_out=2: proc_vtk; + fi + fi + endgroup +enddef; +%-V2000------------------------------------------------------------------------------------------ +def proc_vdk= + printf ""; printf " -MCFtoMOL- "&fixed_l(20)(info[1]); + printf ""; + printf fdr(3)(cntA)&fdr(3)(cntB)&" 0 0 0 0 0 0 0 0999 V2000"; + for i=1 upto cntA: + printf fdr(10)(xpart(posA[i])/blen)& fdr(10)(ypart(posA[i])/blen)& + fdr(10)(0)&" "&fixed_l(2)(stripP(strD[numS[i]]))&" 0 0 0 0"; + if chargeA[i]<>0: chg_atm[incr chg_cnt]:=i; chg_chg[chg_cnt]:=chargeA[i]; fi + endfor + for i=1 upto cntB: + if lineB[i]<>0: + proc_bond_class(lineB[i]); + printf fdr(3)(sB[i])&fdr(3)(eB[i])&fdr(3)(nA)&fdr(3)(nB)&" 0 0"; + fi + endfor + if chg_cnt>0: + printf "M CHG"&fdr(3)(chg_cnt) + for i=1 upto chg_cnt: &fdr(4)(chg_atm[i])&fdr(4)(chg_chg[i]) endfor; + fi + printf "M END"; +enddef; +%-V3000--------------------------------------------------------------------------------------- +def proc_vtk= + printf ""; printf " -MCFtoMOL- "&fixed_l(20)(info[1]); + printf ""; + printf " 0 0 0 0 0 999 V3000"; + printf "M V30 BEGIN CTAB"; + printf "M V30 COUNTS "&decimal(cntA)&" "&decimal(cntB)&" 0 0 0"; + printf "M V30 BEGIN ATOM"; + for i=1 upto cntA: + printf "M V30 "&decimal(i)&" "&stripP(strD[numS[i]])&" "& + decimal(xpart(posA[i])/blen)&" "&decimal(ypart(posA[i])/blen)&" 0 0" + if chargeA[i]<>0: &" CHG="&decimal(chargeA[i]) fi; + endfor + printf "M V30 END ATOM"; + printf "M V30 BEGIN BOND"; + for i=1 upto cntB: + if lineB[i]<>0: + proc_bond_class(lineB[i]); + printf "M V30 "&decimal(i)&" "&decimal(nA)&" "&decimal(sB[i])&" "&decimal(eB[i]); + fi + endfor + printf "M V30 END BOND"; + printf "M V30 END CTAB"; + printf "M END"; +enddef; +%------------------------------------------------------------------------------------------------- +vardef fit_zero(expr n)=if n<=9: "00" elseif n<=99: "0" fi &decimal(n) enddef; +%------------------------------------------------------------------------------------------------- +def proc_bond_class(expr n)= + if (n=dl)or(n=dr)or(n=dm): nA:=2; + ef n=tm: nA:=3; + ef (n=wf)or(n=zb)or(n=bd): nB:=1; + ef (n=zf)or(n=wb)or(n=dt): nB:=6; + ef n=wv: nB:=4; + else: nA:=1; nB:=0; + fi +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/graphics/mcf2graph/mcf_exa_soc.mf b/graphics/mcf2graph/mcf_exa_soc.mf new file mode 100644 index 0000000000..7ade70ca72 --- /dev/null +++ b/graphics/mcf2graph/mcf_exa_soc.mf @@ -0,0 +1,397 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Molecular Coding Format for mcf_example.tex by Akira Yamaji 2019.07.07 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +input mcf2graph.mf; %%% it must be version 4.44 or later +%------------------------------------------------------------------------- +fsize:=(33mm,24mm); +max_blength:=4.5mm; +%------------------------------------------------------------------------- +%%%%sw_aux_out:=1; +%%%%sw_fframe:=1; +%%%%sw_aframe:=1; +%%%%sw_mframe:=1; +%%%% sw_expand:=1; +var3:="cal_FM"; tag3:="cFM"; +var4:="cal_MW"; tag4:="cMW"; +%%%% outputtemplate:="%3c-%j.png"; +%%%% sw_auxfix:=1; +%%%% var3:="mol_wd"; tag3:="mWD"; +%%%% var4:="mol_ht"; tag4:="mHT"; +%%%% var5:="cal_MW"; tag5:="cMW"; +%%%% var6:="cal_MI"; tag6:="cMI"; +%%%% var7:="cal_FM"; tag7:="cFM"; +%%%% var8:="inf_USE"; tag8:="USE"; +%%%% var9:="inf_EXA"; tag9:="EXA"; +%%%% auxtag_out; +%%%% sw_rep_out:=1; +%%%% sw_mol_out:=1; +%%%% atomfont:="uhvb8r"; +%%%% atomfont:="cmtt8"; +%%%% atomfont:="cmvtt10"; +%%%% outputformat:="png"; hppp:=vppp:=0.1; outputtemplate:="%j-%3c.png"; +%*************************************************************************** +beginfont("EN:Acetamiprid","MW:222.676","FM:C10H11ClN4") + MC(<30,Ph,2:N,1:/Cl,4:\,!,N,/_,!,/_,!!,N,!,CN) +endfont +%*************************************************************************** +beginfont("EN:Imidacloprid","MW:255.662") + MC(<30,Ph,1:N,6:/Cl,3:\,!,|,?5,2=dl,1:N,3:N,2:\,NH,!,NO2) +endfont +%*************************************************************************** +beginfont("EN:Thiamethoxam","MW:291.71") + MC(<30,?6,{4,6}:N,2:O,6:/_,5:\\,N,!,NO2,4:\,!,|,?5,{1,3}=dl,3:N,5:S,4:/Cl) +endfont +%*************************************************************************** +beginfont("EN:Tebufenozide","MW:352.478") + MC(<30,Ph,6:/!,3:\,//O,!,NH,!,N,/tBu,!,//O,!,|,Ph,{3,5}:/_) +endfont +%*************************************************************************** +beginfont("EN:Pyridaphenthion","MW:340.334") + MC(<-30,!2,O,!,P,//S,/O!2^160>rl,!,O,!,|,?6,{1,5}=dl,{2,3}:N,4://O,3:/Ph) +endfont +%*************************************************************************** +beginfont("EN:Fenitrothion","MW:277.231") + MC(<30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,3:/_,4:/NO2) +endfont +%*************************************************************************** +beginfont("EN:Permethrin","MW:391.288") + MC(<-30,?3,2^-35:*/_,2^35:/*_,1:\,!!,/Cl,!,Cl, + 3:\,//O,!,O,!2,|,Ph,3:\,O,-60,Ph) +endfont +%*************************************************************************** +beginfont("EN:Bensultap","MW:431.598") + MC(<30,Ph,4:\,SOO,!,S,!2,N,/iPr,!2,S,!,SOO,!,Ph) +endfont +%*************************************************************************** +beginfont("EN:Azoxystorbin","MW:403.394") + MC(<30,Ph,2:/CN,3:\,O,!,|,Ph,{4,6}:N,3:\,O,!,|,Ph,2:\,/COO!,!!,!,O,!) +endfont +%*************************************************************************** +beginfont("EN:Isoprothiolane","MW:290.392") + MC(<30,!,/_,!,O,!,//O,|,!2,//O,!,O,!,/_,!,2:\\,|,?5,{2,5}:S) +endfont +%*************************************************************************** +beginfont("EN:Etridiazole","MW:247.518") + MC(<18,?5,{1,3}=dl,{2,4}:N,5:S,1:/O!2,3:/CCl3) +endfont +%*************************************************************************** +beginfont("EN:Oxine-Copper","MW:351.852") + MC(Ph,4:N,5=Ph,-4:\,O,-60,<90,Cu,-90,O,60,|,Ph,5=Ph,10:N, + ||,4:@,12~vf:#,23:@,12~vf:#) +endfont +%*************************************************************************** +beginfont("EN:Captan","MW:300.578") + MC(<12,?6,6=dl,3=?5,8:N,{7,9}://O,8:\,S,!,CCl3) +endfont +%*************************************************************************** +beginfont("EN:Chlorothalonil","MW:265.902") + MC(<30,Ph,{1,2,4,6}:/Cl,{3,5}:/CN) +endfont +%*************************************************************************** +beginfont("EN:Tetraconazole","MW:372.145") + MC(<-6, + ?5,{2,5}=dl,{1,2,4}:N,4:\,!3,O,!,/F^35,/F^-35,!,CF2, + 7:\,|,Ph,{4,6}:/Cl) +endfont +%*************************************************************************** +beginfont("EN:Endosulfan","MW:406.904"); + MC(<26,?7,7=?6[13],11:@,208~wf`1.45,8~wb:#,10=d,{3,5}:O,4:S,4://O, + {8,9,10,11,12^-210,12^-150}:/Cl) +endfont; +%*************************************************************************** +beginfont("EN:Flutolanil","MW:323.315") + MC(<30,Ph,2:/CF3,3:\,//O,!,NH,!,|,Ph,6:/OiPr) +endfont +%*************************************************************************** +beginfont("EN:Propiconazole","MW:342.22") + MC(<-6,?5,{2,5}=dl,{1,3,4}:N, + 4:\,!2,Ph,{-1,-3}:/Cl,7:@,|,?5,{1,4}:O,3:/!2^24) +endfont +%*************************************************************************** +beginfont("EN:Pencycuron","MW:328.84") + MC(<30,Ph,6:/Cl,3:\,!,N,/?5,!,//O,!,NH,!,Ph) +endfont +%*************************************************************************** +beginfont("EN:Asulam","MW:230.238") + MC(<30,Ph,6:/NH2,3:\,SOO,!,NH,!,//O,!,O,!) +endfont +%*************************************************************************** +beginfont("EN:Oxadiargyl","MW:341.19") + MC(<30,Ph,{1,3}:/Cl,4:\,|,?5,2=d,{1,2}:N,4:O,5://O,-3:/tBu,$6:\,O,!2,!!!) +endfont +%*************************************************************************** +beginfont("EN:Oxaziclomefone","MW:376.277") + MC(<30,?6,6=dl,4:N,2:O,1:/_,5://O,6:/Ph,4:\,/_^35,/_^-35,!,|,Ph,{3,5}:/Cl) +endfont +%*************************************************************************** +beginfont("EN:Cafenstrole","MW:350.437") + MC(<30,Ph,{2,4,6}:/_,3:\,SOO,!,|,?5,{2,5}=dl,{2,4,5}:N,4:\,//O,!,N,/!,!2) +endfont +%*************************************************************************** +beginfont("EN:Cyclosulfamuron","MW:421.428") + MC(<30, + Ph,5:\,//O,!,?3,4:\,NH,!,SOO,!,NH,!,//O,!,NH,!,|,Ph,{2,6}:N,{3,5}:/O!) +endfont +%*************************************************************************** +beginfont("EN:Napropamide","MW:271.36") + MC(<-30,Ph,3=Ph,10:\,O,!,/_^35,/_^-35,!,//O,!,N,/!,!) +endfont +%*************************************************************************** +beginfont("EN:Pyributicarb","MW:330.446") + MC(<30,Ph,5:/tBu,3:\,O,!,//S,!,N,/_,!,|,Ph,2:N,3:/O!) +endfont +%*************************************************************************** +beginfont("EN:Propyzamide","MW:256.126") + MC(<30,Ph,{1,5}:/Cl,3:\,//O,!,NH,!,/_^35,/_^-35,!,!!!) +endfont +%*************************************************************************** +beginfont("EN:Pendimethalin","MW:281.312") + MC(<30,Ph,{1,2}:/_,{3,5}:/NO2,4:\,NH,!,/!,!2) +endfont +%*************************************************************************** +beginfont("EN:Benfluralin","MW:335.283") + MC(<30,Ph,{1,3}:/NO2,5:/CF3,2:\,N,/!,!4) +endfont +%*************************************************************************** +beginfont("EN:Trinexapac-ethyl","MW:252.266") + MC(<30,?6,{2,4}://O,6:/COO!2,3:\\,/OH,!,?3) +endfont +%*************************************************************************** +beginfont("EN:Buprofezin","MW:305.44") + MC(<-30,?6,{1,5}:N,3:S,6://O,5:/iPr,4:\\,N,!,tBu,1:/Ph) +endfont +%*************************************************************************** +beginfont("EN:Tricyclazole","MW:189.236") + MC(<30,Ph,2:/_,|,-4=?5,1:N,3:S,|,-3=?5,{2,4}=dl,{2,3}:N) +endfont +%*************************************************************************** +beginfont("EN:Phthalide","MW:271.91") + MC(<30,Ph,{1,2,5,6}:/Cl,|,-4=?5,2:O,3://O) +endfont +%*************************************************************************** +beginfont("EN:Probenazole","MW:223.246") + MC(<12,Ph,|,-4=?5,-2=dl,1:S,{1^35,1^-35}://O,2:N,3:\,O,!2,!!) +endfont +%*************************************************************************** +beginfont("EN:Simetryn","MW:213.303") + MC(<30,Ph,{2,4,6}:N,5:/S!,{1,3}:/NH!2) +endfont +%*************************************************************************** +beginfont("EN:Rifampicin","MW:822.94") + MC(<30,Ph,6:/_^30,5:/OH,|,-6=?5,1:O,3://O,2:/*_^60, + |,-8=?6,{2,4}=dl,{1,4}:/OH, + |=1,-2:\,NH,60,//O,-60,/_,60~dl,60,60~dl,-60, + */_,60,/*OH,-60,/*_,60,/*OH,60,*/_^30,-60, + 60,/*_^30,-53,66,-53~dl,66`1.2,O,=|,$8:#, + -4:/*O!,-6:@,-30,O,!,//O,!,$11:\,!!,N,!,|,?6,{1,4}:N,4:/_) +endfont +%*************************************************************************** +beginfont("EN:Wortmannin","MW:428.43") + MC(<30,?6,{-4,-2}=?6,-4=?5,(2,7)=?5[3], + 6:O,1://O,{7,10}=dl,8://O,17://O,-3=d,-1:O, + {4,12}:*/_^60,11:/*H^-60, + $5:\*,60,O,!,$14:\*^-25,//O,!,O,!) +endfont +%*************************************************************************** +beginfont("EN:Ampicillin","MW:349.405") + MC(<45,?4,-3=?5,2:N,7:S, + {3^45,4^-45}:/*H,1://O^15,5:/*COOH^-18,{6^35,6^-35}:/_, + ,4:*\^75,NH,!,//O,!,/*NH2,!,Ph) +endfont +%*************************************************************************** +beginfont("EN:Validamycin","MW:497.494") + MC(<30,?6,{5,6}:/OH,3:\,-60,OH, + $4:\,O,-60,|,?6,2:O,{3,4,5}:/OH,6:/!OH, + $1:\,NH,!,|,?6,2=dl,{4,5,6}:/OH,3:/!OH) +endfont +%************************************************************************** +beginfont("EN:Oceltamivir","MW:312.41") + MC(<30,?6,3=d,1:/NH2,3:/COO!2,6:/NHCO!,5:\*,O,!,/!,!2) +endfont +%*************************************************************************** +beginfont("EN:Luciferin","MW:280.33") + MC(<30,Ph,3=?5,8:\,?5,{9,16}=dl,{9,14}:N,{7,11}:S,1:/OH,-2:*/COOH) +endfont +%*************************************************************************** +beginfont("EN:Chlorophyll a","MW:893.509") +MC(<54,|=1,?5,{2,5}=dl,4:N,3:\,54~dl,|,?5,{2,4}=dl,5:N, + -2:\,54~dl,|,?5,2=d,5:N,-2:\~dl,54,|,?5,5=d,5:N,-2:\~dl,$5:#, + -1:@,24,/*COO!^15,72,//O,$1:#,=|,||, + {2,9,15,20~zf}:/_,8:/!,14:\,!!, + 4:\`1.45,Mg,17:#,-1:@,11~vb:#,-1:@,23~vb:#, + 21:@,-6~wf,!2,//O,!,O,!2,!!,|,!13,{1,5,9,13}:/_ + ) +endfont +%************************************************************************** +beginfont("EN:Gibberellin A3","MW:346.379"); + MC(<18,?5,3=?7,5=?6[12],8:@,160`1.3,3:#,13=dl,6=wf,8=wb, + 5:@,40~zf`1,O,50,//O^180,14~zb:#, + 2:/COOH,7://_,13:*/OH,8:/*OH,14:*/_,{1,4}:*/H^60) +endfont; +%************************************************************************** +beginfont("EN:Cholesterol","MW:386.664") + MC(<30,?6,{-4,-2}=?6,-4=?5,7=dl, + 1:*/OH,{4,12}:*/_^60, + 10:/*H^180,{11,-1}:/*H^-60,9:*/H^60,-1:@,17,/*_,!4,/_,!) +endfont +%*************************************************************************** +beginfont("EN:Lycorine","MW:287.315") + MC(<30,Ph,-4=?6,-2=?6,6=?5,(9,12)=?5[3],13=dl,8:N,{15,17}:O, + 9:/*H^180,10:*/H^60,13:*/OH,14:/*OH) +endfont +%************************************************************************** +beginfont("EN:Tetrodotoxine","MW:319.27") + MC(|=1,<60,-90,60,-30`1.15,150,60,$1:#,$3:@,-135,60,-30`1.15,150,$4:#, + $10:\,O,60`1.33,60,$3~si_:#,$8:@,-15~si_,O,$12:#,=|, + $9:@,45,-60,OH,1^120://NH, + {5~zf^-15,7,9^-75,12,13~zf}:/OH,{2,6^180}:NH) +endfont +%*************************************************************************** +beginfont("EN:beta-Carotene","MW:536.888") + MC(<30,?6,3=dl,{3,5^35,5^-35}:/_, + 4:\,|,!18,{1,3,5,7,9,11,13,15,17}=dr,{3,7,12,16}:/_, + |,?6,6=dl,{6,2^35,2^-35}:/_) +endfont +%************************************************************************** +beginfont("EN:alfa-Tocopherol","MW:430.717") + MC(<30,Ph,3=?6,7:O,{1,2,5}:/_,8:/*_^60,6:/OH,8:\,|,!12,{4,8}:/*_,12:/_) +endfont +%************************************************************************** +beginfont("EN:Quercetin","MW:302.24") + MC(<30,Ph,3=?6,9:\,Ph,9=dl,10:O,7://O,{2,6,8,13,14}:/OH) +endfont +%*************************************************************************** +beginfont("EN:Limonin","MW:470.518") + MC(<30,?6,{-3,-4}=?6,-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, + {13,15,17,20}:O,{3,12,21}://O, + {4~wf^60,8~zf^60,18^35,18^-35}:/_,{1^60,5^180,16^60}:/*H, + 14:\*,|,?5,{1,4}=dl,3:O) +endfont +%************************************************************************** +beginfont("EN:Cromolyn","MW:468.37") + MC(<30,Ph,|,-1=?6,3=dl,1:O,4://O,2:/COOH, + $2:\,O,!2,/OH,!2,O,60,Ph,|,-5=?6,3=dl,4:O,1://O,3:/COOH) +endfont +%************************************************************************** +beginfont("EN:Emetine","MW:480.649") + MC(<30,Ph,{-4,-4}=?6, + 8:N,{1,6}:/O!,-2:/*!,{7^-60,12^-60}:/*H, + -3:\,!~zb,<-60,|,?6,5=d,2:NH,-6^-60:*/H,|,-2=?6,{2,4}=dl,{-2,-3}:/O!) +endfont +%*************************************************************************** +beginfont("EN:Colchicine","MW:399.443") + MC(<30,Ph,{1,2,6}:/O!,-4=?7,-5=?7,{-1,-4,-6}=dl,-2://O,-3:/O!, + 9:\,NH,!,//O,!) +endfont +%*************************************************************************** +beginfont("EN:Caffeine","MW:194.194") + MC(<30,?6,3=d,{2,6}:N,{2,6}:/_,{1,5}://O,|,-4=?5,2=dl,{1,3}:N,3:/_) +endfont +%************************************************************************** +beginfont("EN:Acronycine","MW:321.376") + MC(<30,Ph,|,-4=?6,1:N,4://O,,1:/_,-3=Ph2,-1:/O!, + |,-4=?6,2=d,4:O,-2^-35:/_,-2^35:/_) +endfont +%*************************************************************************** +beginfont("EN:Ibotenic acid","MW:158.113") + MC(<18,?5,4=d,3:O,2:NH,1://O,4:@,-24,/NH2,!,COOH) +endfont +%************************************************************************** +beginfont("EN:Piperine","MW:285.343") + MC(<30,Ph,|,-1=?5,{1,3}:O,$4:\,!!,!,!!,!,//O,!,|,?6,1:N) +endfont +%*************************************************************************** +beginfont("EN:Febrifugine","MW:301.346") + MC(<30,Ph,|,-4=?6,2=d,{1,3}:N,4://O,$9:\,!,//O,!,!~zf,|,?6,2:NH,-1:*/OH) +endfont +%*************************************************************************** +beginfont("EN:Mitomycine C","MW:334.332") + MC(<30,?6,{3,6}=dl,{2,5}://O,1:/_,|,-4=?5,1:N, + $6:/NH2,|,-3=?5,|,-2=?3,-1=wb,-2=wf,-1:NH, + $8:/*O!^35,$9:@,17.9`1,!,O,!,//O,!,NH2) +endfont +%*************************************************************************** +beginfont("EN:Podophyllotoxin","MW:414.41"); + MC(<0,?5,{2,5}:O,-3=Ph2,-3=?6,-3=?5,-2:O,-1=wb,-3://O, + 10:\*,Ph,{-2,-3,-4}:/O!,$13:/*OH,{$11~wf^-60,$12~zf^60}:/H) +endfont; +%*************************************************************************** +beginfont("EN:Warfarin","MW:308.333"); + MC(<30,Ph,3=?6,8=dl,10:O,7:/OH,9://O,8:\,/Ph`1,60,!,//O,!) +endfont; +%*************************************************************************** +beginfont("EN:Genistein","MW:270.24"); + MC(<30,Ph,3=?6,9=dl,10:O,{2,6}:/OH,7://O,8:\,Ph,-3:/OH) +endfont; +%*************************************************************************** +beginfont("EN:Baicalein","MW:270.24"); + MC(<30,Ph,3=?6,9=dl,10:O,{1,2,6}:/OH,7://O,8:\,Ph) +endfont; +%*************************************************************************** +beginfont("EN:Reserpine","MW:608.688"); + MC(<54,Ph,-4=?5,-2=?6,-4=?6,-3=?6,9=dl,11:N,7:NH,10:*/H^-60, + {15^-60,16^60}:/*H, + $20:*\,O,!,//O,!,|,Ph,{-2,-3,-4}:/O!,{$1,$19~zf>rl}:/O!, + $18:*\,//O,!,O,!) +endfont; +%*************************************************************************** +beginfont("EN:Nicotine","MW:162.23"); + MC(<30,Ph,2:N,4:\,|,?5,2:N,2:/_) +endfont; +%*************************************************************************** +beginfont("EN:Rotenone","MW:394.423"); + MC(<-60,?5,{-3,-2,-3,-4}=?6,{7,9,-2,-4}=dl,{3,17}=dr, + {2,13,16}:O,10://O,{11^-60,12^60}:*/H,{-2,-3}:/O!,1:*\,/_,!!) +endfont; +%*************************************************************************** +beginfont("EN:Pyrethrin I","MW:328.452"); + MC(<30,?3,{3^35~wf,3^-35~zf}:/_,1:*\,!!,iPr, + 2:\*,//O,!,O,-36~zb,|,?5,-2=d,-1:/_,-3://O,-2:\,!4,{-1,-3}=dl) +endfont; +%*************************************************************************** +beginfont("EN:Erythromycin","MW:733.937"); +MC(<30,|=1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,=|,1:#, + 14:O,13:/*!,{1,9}://O,{2,10}:*/_,{4,6^-35,8,12^35}:/*_, + {6^35,11,12^-35}:*/OH, + $3:\*,O,30,|,?6`.7,2:O,{3,5^35}:/_,4:/OH,5^-35:/O!, + $5:\*^30`1.7,O,!,|,?6`.7,6:O,5:/_,2:/OH,3:/NMe!) +endfont; +%************************************************************************** +beginfont("EN:Paclitaxel","MW:853.918") + MC(?6,5=d,3:@,|=1,36,45,45,45,45,=|,$5:#,-4=?6,-4=?4,||,-1=wb,-3=wf,-1:O, + {4^35,4^-35,6}:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, + $1:\,O,!,//O,!,*/OH,!,/Ph,60~wf,NH,-60,//O,60,Ph, + $7:\*,O,-45,//O,60,Ph,$11:*\,O,-60,//O,60,$12:\*^-15,O,60,//O,-60) +endfont +%************************************************************************** +beginfont("EN:Mevastatin","MW:390.52") + MC(<30,?6,2=d,4:*/H^60,|,-4=?6,2=d,$9:*/_, + $10:*\,!,60~wb,|,?6,6:O,-2://O,-4:/*OH,$5:\*,O,60,//O,!,*/_,!2) +endfont +%*************************************************************************** +beginfont("EN:Sesamine","MW:354.35") + MC(<54,?5,1=?5,{4,7}:O,{1^-54,2^54}:*/H, + $5:*\^-12,Ph,|,-3=?5,{-1,-3}:O,$8:*\^-12,Ph,|,-3=?5,{-1,-3}:O) +endfont +%************************************************************************** +beginfont("EN:Morphine","MW:285.343") + MC(<30,Ph,2=?6,-4=?6,(1,12)=?5[2],-1:O,-1=zb, + 7:@,60~wf`0.75,70~si_`1.3,45,N,/_,9~wb:#, + 15=d,6:/OH,8^180:*/H,12:/*OH) +endfont +%************************************************************************** +beginfont("EN:Capsaicin","MW:305.418") + MC(<30,Ph,1:/OH,6:/O!,4:\,!,NH,!,//O,|,!8,-3=d,-1:/_) +endfont +%*************************************************************************** +beginfont("EN:Quinine","MW:324.424") + MC(<30,Ph,3=Ph,7:N,6:/O!, + 10:\,*/OH,/H~zf^-60,!,|,?6,2:N,1:*/H^60,4:*\,!!,2:@,165~zf,60,5~zb:#) +endfont +%*************************************************************************** +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 diff --git a/graphics/mcf2graph/mcf_example.pdf b/graphics/mcf2graph/mcf_example.pdf Binary files differnew file mode 100644 index 0000000000..0d9a7977c9 --- /dev/null +++ b/graphics/mcf2graph/mcf_example.pdf diff --git a/graphics/mcf2graph/mcf_example.tex b/graphics/mcf2graph/mcf_example.tex new file mode 100644 index 0000000000..5e26c477d7 --- /dev/null +++ b/graphics/mcf2graph/mcf_example.tex @@ -0,0 +1,87 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Example of MCF typeset by LaTeX mcf_examples.tex by A.Yamaji 2019.05.26 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[a4paper]{article} +\usepackage{graphicx} +\pagestyle{empty} +\topmargin=-20mm +\oddsidemargin=-12mm +\textwidth=190mm +\textheight=280mm +\parindent=0mm +\setlength\columnsep{8mm} +%------------------------------------------------------------------------------- +\makeatletter% +\newbox \@stringbox% +\newcount \fontnum% +\newcount \tnum% +\newif\ifCONT@% +\newread\@auxf% +%------------------------------------------------------------------------------- +\def\mol@sel#1{% +\if#1\empty\relax\else% + \edef\@tag{\expandafter\@fst@param#1;}% + \edef\@var{\expandafter\@sec@param#1;}% + \ifx\@tag\@F\edef\MOLfile{\@var}\fi \ifx\@tag\@C\edef\MOLchar{\@var}\fi% + \ifx\@tag\@Lx\edef\MOLlenx{\@var}\fi \ifx\@tag\@Ly\edef\MOLleny{\@var}\fi% + \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi \ifx\@tag\@JN\edef\MOLnameJ{\@var}\fi% + \ifx\@tag\@CAS\edef\MOLcas{\@var}\fi \ifx\@tag\@USE\edef\MOLuse{\@var}\fi% + \ifx\@tag\@FM\edef\MOLfm{\@var}\fi \ifx\@tag\@cFM\edef\CALfm{\@var}\fi% + \ifx\@tag\@MW\edef\MOLmw{\@var}\fi \ifx\@tag\@cMW\edef\CALmw{\@var}\fi% + \ifx\@tag\@logP\edef\MOLlogP{\@var}\fi \ifx\@tag\@EXA\edef\MOLextA{\@var}\fi% + \ifx\@tag\@EXB\edef\MOLextB{\@var}\fi \ifx\@tag\@NO\edef\MOLnum{\@var}\fi\fi}% +%------------------------------------------------------------------------------- +\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@JN{JN}\def\@CAS{CAS}% +\def\@MW{MW}\def\@cMW{cMW}\def\@FM{FM}\def\@cFM{cFM}\def\@Lx{Lx}\def\@Ly{Ly}% +\def\@NO{NO}\def\@USE{USE}\def\@logP{logP}\def\@EXA{EXA}\def\@EXB{EXB}% +%------------------------------------------------------------------------------- +\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}% +\def\@stru#1[#2]{\font\@strufont=#1\relax\hbox{\@strufont\char#2}}% +%------------------------------------------------------------------------------- +\def\put@char{% + \unitlength=0.01mm\relax \@tempcnta=3300\relax \@tempcntb=3750\relax% + \begin{picture}(\@tempcntb,\@tempcnta)% + \advance\@tempcnta -300\relax% + \put(20,\@tempcnta){\footnotesize\bf [\the\fontnum] \MOLnameE}% + \advance\@tempcnta -250\relax% + \put(20,\@tempcnta){\tiny\tt MW:\CALmw { / }FM:\CALfm}% + \advance\@tempcnta -220\relax% + \put(20,\@tempcnta){\tiny\tt MW:\MOLmw(data)}% + \put( 0,0){\makebox(\@tempcntb,\@tempcnta){\@stru{\MOLfile}[\MOLchar]}}% + \end{picture}% +} +%------------------------------------------------------------------------------- +% modified latex2e kernel program control (@for delimiter ','=>';') +\def\@sfor#1#2{\expandafter\def\expandafter\@tmp\expandafter{#1}% + \ifx\@tmp\@empty\else\expandafter\@rep#1;\@nil;\@@\@list{#2}\fi}% +\def\@rep#1;#2\@@#3#4{\def#3{#1}\ifx#3\@nnil% + \expandafter\@fornoop\else#4\relax\expandafter\@rep\fi#2\@@#3{#4}}% +%------------------------------------------------------------------------------- +\def\inputINFOS#1{\openin\@auxf=#1\CONT@true% +\loop +\read\@auxf to \@info% +\ifeof\@auxf\CONT@false\else\@sfor\@info{\mol@sel\@list}% + \put@char% + \advance\fontnum\@ne\relax\advance\tnum\@ne\relax% + \ifnum\tnum=5 \\ \tnum=0\relax \fi% +\fi% +\ifCONT@ \repeat +\closein\@auxf}% +%------------------------------------------------------------------------------- +\makeatother +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} +\begin{center} + {\Huge\sf Molecular Coding Format examples}\vspace{5mm}\\ + Author : Akira Yamaji \quad Date : \today\\ + Located at : http://www.ctan.org/pkg/mcf2graph\vspace{3mm}\\ +\end{center} +{\small ** FM:Molecular formula calculated by mcf2graph \quad + ** MW:Molecular weight calculated by mcf2graph}\vspace{3mm}\\ +\fontnum=1% +\noindent% +%------------------------------------------------------------------------ +\inputINFOS{mcf_exa_soc-info.aux}% +%------------------------------------------------------------------------ +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/graphics/mcf2graph/mcf_man_soc-064.mps b/graphics/mcf2graph/mcf_man_soc-064.mps new file mode 100644 index 0000000000..ff26223148 --- /dev/null +++ b/graphics/mcf2graph/mcf_man_soc-064.mps @@ -0,0 +1,595 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -1 -1 213 57 +%%HiResBoundingBox: -0.1 -0.1 212.69804 56.79282 +%%Creator: MetaPost 2.00 +%%CreationDate: 2019.06.19:0623 +%%Pages: 1 +%%DocumentResources: procset mpost-minimal +%%+ font JIZCCV-NimbusSanL-Regu IXTKJB-CMR8 +%%DocumentSuppliedResources: procset mpost-minimal +%%+ font JIZCCV-NimbusSanL-Regu IXTKJB-CMR8 +%%EndComments +%%BeginProlog +%%BeginResource: procset mpost-minimal +/bd{bind def}bind def/fshow {exch findfont exch scalefont setfont show}bd +/fcp{findfont dup length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall}bd +/fmc{FontMatrix dup length array copy dup dup}bd/fmd{/FontMatrix exch def}bd +/Amul{4 -1 roll exch mul 1000 div}bd/ExtendFont{fmc 0 get Amul 0 exch put fmd}bd +/ScaleFont{dup fmc 0 get Amul 0 exch put dup dup 3 get Amul 3 exch put fmd}bd +/SlantFont{fmc 2 get dup 0 eq{pop 1}if Amul FontMatrix 0 get mul 2 exch put fmd}bd +%%EndResource +%%BeginResource: font JIZCCV-NimbusSanL-Regu +%!PS-AdobeFont-1.0: NimbusSanL-Regu 1.05a +%%Title: NimbusSanL-Regu +%%CreationDate: Thu Mar 20 10:08:51 2003 +%%Creator: Primoz Peterlin +%%DocumentSuppliedResources: font NimbusSanL-Regu +% Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +% Generated by PfaEdit 1.0 (http://pfaedit.sf.net/) +%%EndComments +FontDirectory/JIZCCV-NimbusSanL-Regu known{/JIZCCV-NimbusSanL-Regu findfont dup/UniqueID known{dup +/UniqueID get 5020902 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /JXDTPR-NimbusSanL-Regu def +/FontBBox [-174 -285 1001 953 ]readonly def +/UniqueID 5020902 def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (1.05a) readonly def +/Notice (Copyright \050URW\051++,Copyright 1999 by \050URW\051++ Design & Development) readonly def +/FullName (Nimbus Sans L Regular) readonly def +/FamilyName (Nimbus Sans L) readonly def +/Weight (Regular) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -151 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 40 /parenleft put +dup 41 /parenright put +dup 56 /eight put +dup 97 /a put +dup 99 /c put +dup 100 /d put +dup 109 /m put +dup 114 /r put +dup 119 /w put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE33C33655F6FF751F340A8D6C01E3 +2E02C24E186BA91B34A1F538959D4450CB683EAE5B034D030186901B458D3777 +6B3942BD2E07121385120248891AEC2EB33C4E3A0CF00828D0F130C31A918C18 +979FE94379C648EF21ABF659253E43CD1253866F157F1DF85AE7E8714F061B1E +ABA3AD094FE8D6293916FA82EE4F486C7E513A06D4C9BE44306A8287970B4ABF +B6D1F9274A5A0BB6ECF713ADBD1260D5D6C4420D357FD486470A74B2F0621B59 +A9373ABECDBF32FA68AABB66FAB0C970A3354A335D70DB2CC5A3208BB6D768E7 +B58CD9BC2B6B7E110693C5A88D680B7290DB121996E3B7C8AE3C23147280F8BF +D8C60B415552700FF0E44C2257B467ADD5D550F61EC34A76143393E0B34D55C0 +8B64B48E5F1FD16E16B967511AE15434B7F755BDF2574191E3C3DC528B69B5BA +7DDBBD3C7878FA69ADE75011A2C0F02F5707E86FA632D1269281D3C265B31F3B +F3145052467647AFE18B9D763FAEE4BA72CB9C385568EE5BBF5854C278F1E3CC +475C6234E83ED33345268BE52F0931B58F302EDA0D5751348E7B7E53D4882FB6 +9343BDAAE87E48F6E82024D8EC1FACBBA36582092CCD76553B0449A5090774EA +7242123C53B80F2E927B98DF2B36C403D1FA1E9F8439F3964DC9F89A0CAB5AE2 +C907309460F097AA87BD156575D6C73EDB2B40C015E67734397ED14395C43394 +7A0201C6B0F652B035FD7BB82ED236D0F7C20048AFD83A56925C7A2898B46270 +B440913E4714FD89697B3E59F5BDD5A2AACF6630257957ABE1A63502A3081B6E +307A534A9E238F986D4C866AFBAB7A0B1B5A6E99AA0A56DC1FD7E8A39CC45147 +259AC7033A0C58192CA82FB12E09F309F75690043646193AD92D2368F345771F +01CFD21236BA52F74E36CF4B94259CDBA2EF1D61AD93A2B942A9896B0819D20C +59E440851CB99E89C887FC62FD9E7F88F54E5BC157D81A5FBC70699820C51BC6 +27D7755B195C0BAD8225A6F3EAE0A5A674E8AF6B11BCC69DCF5FB89D8BE0E2E5 +FE7E2588F93F583E4E2F6ED5457E90B902B02F51D54B9F0BA54291E687F4A7A2 +08CA5FCE0C9F3B954247312EDA3C532D3DCDFDCB56FFE03B36DB7D549D4203C6 +7DA8772A2F732A15DE675D3212C28DC755E3D0156A777BF514112ABBE4372ACB +97D7834813E1850F90CEE543B4C09BE1E93742EA98B8CACC09FCC4D2595EECD4 +46C942EEA60211FA7DBC11CE869D55BF0C7EC6AA747EB2AE2CB3CC2DBEC936C9 +540CE2E08291323B36F6549CDB97BBF9F0DA429CA9C863B629410885540DA6C4 +9AAADB30C39051C993CB547BCD573D6448DC09BF7FF2D1B108ABEC2AAEE4060D +182ABDB3100AC627E5C883E8F42D90D699C8028D4123472F211C8FBB744D7E3D +C626ED03D8517D69E1ACD26BE4F83FAE31122294816736827D138E4F4CAB1681 +236C1654E01231EA7F08AD0E73BBE1BE19A7AD6DA63AE0C7F5A360A53BB35268 +CC90125C7545D9D59F5127F0AD964AA66DF020F639832FAF9C2CCA82C01120BA +6469960C350D3AF786666EC14158728E0BA2DD8A639C28E0A7EA8BBF608FD7DF +79C7B5DDEA05C8C3D6FC70177D1A9EA9AD056F0CE31AB535A22FF7EB33748071 +694BCE70111394D24DCEA030AE4C07AECAC39144621A6B719682FF74DB5C081C +B538F17221F8D06EAAD43B64DA5CF93030CB93DD54FCC5B44980F2AC6A66C512 +54F71283450DFCA305E0B134FC95E54C2699C18624EBE6A7D0067E306EADCFE5 +2D2A78AA02574548893EE05FFD60CB41E00B2E7761AA55732EFE6EE3C19EEF6B +179276229BA324E59A81107FFFAE0685C7C24E70ACB8564454277C41C28075AC +96964C61BD933742996058691C47B09CEBE352FC29A63119C731B3FC8D78A9E3 +69F922CA6454BC1F6CFD1E03B285AFC3D8A7C81B83F0D950DAD2F3E562353B9A +1D56DABD05371F9479BFA4CAEC5CBAAC37C200F6E27BB35E591601EBFF9580F3 +78E3BF2E599FF22A1434E7D661083C7F8D02F91CCD580EA19FC752DC7DB84DEB +6DA73092F21F04F718009DBA58BF46AB95BC4B9154DC2390AE0089A9FEEC29F5 +90EE85785CF7E9EC5CC31283CFFE2CBE71C3A2EF82C984D16ADD4BFAE300036D +4D161A5BD529D9E7C7EBD598A6CF895C2B0A06DBB62EA1E10D52D2D69E373F43 +4024FF3F78725CD06CA3E2F2FF6EC30EC7E3EB389DFC287C5803B56F4058A19F +EAC02F63B3708C71BBFE34996E87AE9B53C0B8009CCFE62C17E001C96636A66B +10F2CB000A0D128B232D9A9E24006A4FCB9FDD47C70C954BEAA33A81A5EE27B9 +220C89DF8C7471D82051EC633967352C75105A1222751EDFBB3E8B7294D5DF44 +958A1F7695ECE82296DF0D272C713BA3B612591D25AD1A01EC4C31819D2DC7B3 +5CF2D9F0F492A21E1C0F12BA04D7AAD47D978D9E27B27A5E810DA3288710EE9A +55270BAEF9025D1ACAB90E7A0010434D7551D9C6ED8854FDAA3736542746ADFA +E256888F27BD0473AF8CEAE50E72CCFD28AB52B5B5AFE50CA179D56CEC0F66BF +4E29E49139796AD76F219F2F7E4A093AE79BEBA96AA3C4846BE06F450ABA400D +1802978E39789984C5BC3E386CED0321AA1103F4C98E7938A0A43221BD62CB3E +9919166E4C5685DB2251F4B257A56C518348D27E0C312082BB785A7A71D46A55 +84BEB0D0F8488FE1851E4D2218F93467C90464BFEECCD83F382E45211576133D +BBDA5CC4582CC326879574A5B0C840E7B69617A157AB0CF1881601EF22909D51 +457962C37265CA81F4462979DBC27E2D40FA8A83DA4DC02F8945783A3F7D7E63 +9A2C7FD9A366B87678E42AD75BC9BB94EC921332E60DE90966B9A2828B3983A0 +B4AD97C71BFD312AFF12B19F8BD653A82396A30C8767F169B664A12D1B1D5A2B +955F8D68D7F589FEC9ADA8B3D621165F366C39D2B6EFA16EE1981A33422DAC4C +63444836C47FD4CF75E964571BD86643FAB5F8CFB63633A19B36ABA949504A51 +BF3395620F8CBBBA1D06FFC01CBAA4281B1934BC9EADFCE21949101595399607 +3F5CECB8BDB43E672FDF8E4E6472EEDE6CF3C9B0C606643CD25E8EEAA88FB5DA +337D8E8246D149FF54C613B691679A646D961D98B7BE1C06AF5F69A4FA62DC94 +8A4D4D40D065CBBC229205072021BE4A2085C6209F103909A048836120F9C369 +5BAEBB29EE7C59CA69954B26E3EA58438675DAB14FAB778437E05FB92B7FA3D3 +CFFBF34B0E7526D9564D23650E9B9AE6DF11C2BF0B272327F4FC47A764BD6E09 +46F0561971FDD8B8D0969B50FABF52CFD470EF37327F814E2656C5BDBD061A35 +4684B66BB71DDE9AF914DE7CB8A2A33999008A7D81F24CB629294ED8B96656CC +5DD1C2AC79FBE594F5DF0ADB51D448AF658613F899B309514EDD2CE48C4AF155 +0CB5983755E12C1F37ABB0CEDE003EFBD0BF18082DFE7842F8C565C82E28BA27 +D956BAA853052BAB3C9A63E1CAAACC3ABF6E62CE8A1DC3954DE1ACD0193F8AA3 +E4195E722AD662CE3E188456AEB1A392E24F02C9EA38B6065E6C9B8233606230 +ADCD832E0D691E7DD709659F7EC3FE02A244E832DF17E6991BB9042E8B98F6FF +5E6A9AC55AE7F243EC23CB8858306ECFFA2FF8F7C227091154781ABEA3BEC50E +18F0854E26646F5E73932206F2FFD5EC588B006ABBBD7A6B81F3FABEBACB5523 +7AFCB8AB313AFFD9232DBE7E33C0AE19EEFC32F1B94E9040F1D8CE31A358973F +79E987BF6F49B4A5C717F8956488A3084EDA5CF510EB618AD0F44AD88E375AD9 +986AA8D585FDD73F172A740BC8E0119336140328BB5C79F8953189313DC1EA99 +B6A47CFBB66A98110B7E71A6D9CE4F3BE94D3507F2A44AFC967C8E254ABABE0D +919A34A7FBAC0233585CABDB28A3F104B882AD71FABF3D9F41849523D29E95BA +7840334C52DE6900A9B308E5047D9ECEA8E3308F8BDD81CDDD6E9D81CCDE9A66 +DC9C2E10F4850068D2D321839FB316F4F09FA26664EA51EE86EB2DF3E41186D7 +B73A68C125FEE7826020C77B0632E3D138D002C23F13F44C47014748102FCC29 +9F0458E90084393FCBA5430D2BCF1D585C7428DF54B884807709867C739AFDDA +7B398E3126978279F50E08F102184641D223CCC9DBF3F4A0FBE3897AE3A87DFB +E81876C20DF82204D8B35B3EFFABA6D74EDC357432D7D51FD626A1CDB1929A36 +9CE5AF6AED4365628E6B083788384DCC6EF09253B99949D376A6D21CB84EA2D5 +353898E4654D93AF0B5AC8A3D796970576B373D47AD58FD12002718EE0A54139 +80B3A3F2D3108B975F8DC1167B47E9A4673DD434B87055AC26973EFCBFE6D48A +5A68F099B118ACF08F0E60FD147AFD97952EB2A0E1D869D5408E4F6DBB5BFF81 +4E9CC701141A63DD8264CF4F2EE53CA9C175A06FEF0E9F65C510E7E561C63982 +E797D77238480D13078773317A0E2917CF1B307C315E88340F56B5F957E4A6E3 +2867EC63A3F9ADE503D6ADEF8B236E449889CC6992E3329B8213066EC393A9CA +CF4485B17BE4F202ABB890D75B0EC6 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndResource +%%BeginResource: font IXTKJB-CMR8 +%!PS-AdobeFont-1.0: CMR8 003.002 +%%Title: CMR8 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (<http://www.ams.org>), with Reserved Font Name CMR8. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/IXTKJB-CMR8 known{/IXTKJB-CMR8 findfont dup/UniqueID known{dup +/UniqueID get 5000791 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /GMTUEE-CMR8 def +/FontBBox {-36 -250 1070 750 }readonly def +/UniqueID 5000791 def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050<http://www.ams.org>\051, with Reserved Font Name CMR8.) readonly def +/FullName (CMR8) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 50 /two put +dup 72 /H put +dup 78 /N put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9928A7C95D3A6E9B +8E92F84CA0AA44461D2F4FA0F8B81C6F5B7BE98C9712BE166610465CF689DFAF +27C875C029C0116DE61C21DA0092D029E7DBEDFDDEE3D67E6936623AB53FA2AF +18BEDDD7AC19A19CADB6ED6CA7A26E6044BE414FFF59C0B98D5819A6B881F9AB +7AD0D03BDD5CD309C67811D5CF0B93F6FDC9AE64F74ED4E81F2E18D880BD842A +DAFD0BDF06300201C6946087FC0B999447BC370200BFB8CA420B668B32EBC242 +6DB1546A7164CF55B332FE9D239B65F532B69EF9F4F93828A44C8F5C526126F8 +B7A369114CA68D4F98638121F4E17F351723D9F1A902FCF087F94AFD23876517 +2D15B482AF2D68C3F31FFA864E031596E597882578AC7FB0DAE2A713B065B374 +3E2E72519ED6D50CBCA40A7275A7109A4F3ED8A4566AD8832890D3D1F4899850 +9B757442B7EA355175CD5D6D8B4152ED2D7EEB4CE30F174FF672140354046A45 +7098EC45B9DF3DF5CF7B417E201DA88308CEF4CED8E8903AF24FB8DD0187352D +25738519ECBC70304F8F620CC45D2586619205DA3955696FAFFE2082402B3502 +CB682F410DE5FFE80A4DA3D3BCF02E35BD577D0DE55E7B8A33B7A2FD5136B5DD +A0BCB61F8E7F4363C21F890CF287304DDB8FCE7FE207C0D160B81E7EA662BED2 +DFF8C444E19C91E72254257CD87240A70F1A964FA54ED9ECF27E27A57DACC3DE +EABB92C085030870C6CF5C40B6E47F5C0AEB30E84A73ECDABB2D754EF6EA28BB +16EBD6636BC288E62F4A38BFB55F5F4DD20FDD77D767F6CB52F9513E8EB75413 +07F1877B2C01278675177499E4E8EB09F2657821613F5C7643FC064293EC6E9E +B519FFAEEA36B19C9D1302CF91FCBF87FCB57C5F995CB6712BB3D8681EB6F05B +B2A4195A3C73CB4ABCCFB958EAC533BD89560D2790CDE1444C0F2E4EF27A529C +F01052964E56F6D76A190E5FF45934BB711A3406284AF130D4DC0D8112BB3752 +762CA0200CA262359D4F54C0CCFA9A50DE18C7DB14419E2990ADDC4A54B94978 +D9174CA39434022FA77FB30179EF805E2189C35919F5EBE215EE2A00B4407826 +CE56329C5586D8B414770BA5D45513C3AF1931D632FCE69B4CA504944E03362C +74A1177C6398A61A12DAA0F156543E2A8E9969C4308B7ACC21A5ECAC8F172541 +1B1316A88C0C163E574FFD3CD22FF08488662FCF2F9344BC25D02146F36CA6F9 +E2D0130C654B7485EEA9A110A33AA0C769121F81821E9A2BD062FAC158359D44 +3F9D9947200EF1EDDD5860F10438B162A69683957300C75AF7546C70C97AB2EE +37EAAF0089E2623F787F252569B06C665FDB45EC9681C0774ACFBA76B98C4E89 +7EB12AA5F8798FFC110B49C25E3A483ABE83B0BCC6DF0578403ADC369E013762 +C9D08FC94D949BAE636ACA9F36F4E3F02296775A062077B011A705B6F1784D36 +A926622CB3847533D7ACB24A4EBABB14593B5D8E1DAE2BFEF8A51835C8D4E76D +7543C126A4271C59A5881A5AF89331694F84489CA66725995DC3070F306EA447 +CF30F63CD476A46D528EC1FFBFB8EACFA2BEEDCF54C92CE2BD26DEA5827186BD +3A4D1709415CEE7D51D671357B4A5D11E835F63521B9824EE5282E58F05A8ACC +FD249461181A38C2F47BAC4E79BE368D64F886AA493C61CBCB2ED401C8AFBA61 +59CA6F6216D941A92AC52ACB3D7ECC28D6A58EF4CC70BA6DE23E80937AB38E89 +6F05FDD15B954C0826636267EDAF9F2BB466BF79D2E10EED9B04297E6BC93069 +79581ADD1A9D9FAE9306F46AC95B98C60A2E53D60CF1AA4069BE301E17E25070 +F98DD67BD8642B1D07571A32766072E48BF27E1576FFEED300D7313A358A823B +49C8F135961B7E259095C9BB67F996CE0B90E95344F203922F47E11753F70D38 +2ECB615403490310CEE6C03AFA97DA2F47ED47125D110FA69725BA0018F6A40B +29A307FDB3E52322A77A0102E6F57654CF1E96A134D13860D83AFA0A41112D3F +2247A09ACF7D06713BE443FA27C7E7220E875965D53030FE7D2D62EFD2F1DB87 +5FB091FEAF599BA8C5167525899E578AB341BFE2BC4E53A047093168AE189237 +EA55F055514EFA939DAE9E859CB5FBCF37D99484F44FE5AA5FA386B28BB642F5 +5DBAF059A50FE96C7C6D834531D64F1F2E99AB2E96EE74D149178B1C0618495E +293973D9A03E1790654B67C0882376ABEC17D74785B3737D81644F28B3BC6FFF +F92FE29126995A07E0BC5EF3A4B93789A103C428943E045B8D1A5063AE71E806 +568D48072E53DEA85253B01DF0BB7367A6BE4DD7BE514AD74E3F77C825ABA405 +64DAFA25EAFF8F63344B5F6B523629776CEB090B546469F6A6008DE43072DD3C +DEF51F62731037D1FBD0C038A1E9B669849EB3BEBA281624F13D20B61917A109 +A0A7871A73F7BAA18077360B38A4625C5DB9AB9E43BDEEB856FD0E2D3AA2E075 +267B978B9EB47F2369302E87DBD5D5B422830BEC32411FE75D584C58650EFB1D +136FEB92B94BF8939FD63AFB7349C7511E5E46AA7324F8B1FFCA9C2A9E9720C0 +A720918E8E860F137567D386AC29870FD990BD69465B3A3D2A0ECF2753578AD7 +80DC87EBB319EB5AFE0B6F6FF8616EA30C51425FE3ECBC5F8D0B0BEFDEF32FA7 +D168B4E85C804B7326A0942CFDE732B1171C643452B7099B31649CA2C38B62FB +46EBDF7180004C549B53F88021D029452C2B37D8C565BCDB0B11541039A13C0A +E45D4B68C7907B8BF08C6F41F564B62BB554235D50330E78DD02795516D969C9 +66119D718798120442CB7EB9877FF84EC69DAE25F8559DCE3BD8042959F695F8 +2F99845B1B5680DDCF181D806CC4903E077D1FF5E60918EB34C0B1E028422B71 +CA63EFBF3F4F3CD813CE831EB54265A555BDD35AD7D723F9CFBDAB29C54F8AFF +2D35C6A3299E0A2DB470C7B141B1E3E10DABB7873AE302926BA8743278FAA8C0 +DC6174501D6A289CF980A3F55F2DD5C3A514E7E7F13133C35D2697D64C25130C +DB78FC997968D6B3BC929E8A31B6D212C5128E4412632BC52B3A1049F7F2F61B +C74AE9A6AD19B9E2E240617E2882F7D29ED3A4279439107AF9AEBEE47CE85DE5 +CE9595A96A118ACF1EB1F5929930321AF7732E351E18C6AD378508E37B4C327B +0E06AAE21278AFA9255AFE5C022034DA2968D260879B4B38E7EE2E11A593DC3F +CE71ABA050C004473324CAB6F3C50E85DEDA3E9A27388D8FD3A8F6E42A79670E +F7549CFAD4CCB337A6E0BAA4846ABCA059F1E1933CF11DC0FFBFF550CC4A1B47 +CF7BCE0875FA747AA854534960F757884505A5AEE0330179A9547A4AE3E68479 +7A457DE83326DC30B67F27CFD4AB697601CEE352F72F0966B3CEE3EA24683BEF +6D23AD51B8432C3F0DD0D0F80791E1091F38988B7A54E466A9AC7810DE8B7893 +6B0AA6356597891D56190A7660BC7F657BC559E0525D41EC228078F2FBF89C6C +72D666DAD838CBF0861FBF0A1D4ECC069AA49DFBAE5C56B781A1D5D79DAAC256 +13E3F9B928A2394FC71691E4355642764459714412D6F8EF803FC5F7353822DE +6CCBB8FBE5AA1F2C7F4D384039D85E7728527DF9FE0239E2CF8BCB7411C000B7 +1FE660AE6A2A19229E5E8776CC83EFF3C27403935756463EB4721C51FE0B1197 +86C2F17842A0FB639F28083DFD4F1E86D7D3BEFA922514ABF489C5CCE93D6F72 +D2EAAE14F6CBA2BE4BBE7D7EA8EA19DB3A87350D4A52064137C3D15A5B05B03B +70B1DA7328D10713B83974C390C3270AF5A9A47C0BFBFABB9F31063B0CCFBB10 +0F236C74446688198EFF039110F6FF42FA9F82D463AD3958B5FD205BDF85DE20 +FE3F0C7AEEF350AEE6DBC1DE2E2DA4F4599956F59D6F121F7086DC120416E180 +52DBBC4E56C09746938698860F30007091E1CC0351B43990E47208ED495310F5 +7BA9C6AB3CA10A3F1B318FD47C1CE3B9FF1304321F9623E32D315AA9CE64B35B +F841E6C62B5B2488A311C94937879E5E0E170FA77AF0AC75C5E6E9F3E8F825AA +09C1702682E14FDFA72D27901C5BDE009B1E52E8C4511C6F6336251BD45261F7 +401CA3DAE7C4B0CAEB91B9954BF4A97C48ECE7FAD401351D59DDAE9DA94E2335 +74A2B880E4749D3D7026CB5299F16C204B6E00A20A6619C34922C7D3FB50F127 +3157CFC08DCC5164C8023CD1B6C3556C73CB8E4ADA845339CA9BABA1457ECEE6 +ECB9849DF1F0FEBC89E5F97C92978A500196520839CEBA6C0FD2E3D27BB4B4F0 +93CB2BB565F4627C6DB62DD0E084E627D69B5DEF42EF094381B62C0D67EFD197 +301B132420F51A41561E6106870147E0D597078435BE3819ACF0DE28AD779847 +F3D2CF667DA06955D53E0204CEA2935E9E984E76963D3079EC092031E2A10E61 +1227E5EE6770DD4D745A52655369EBA06A19BD7D95BBA271E488241199D1008E +36EA99F8DFD2A9F87B06B070158B466AA4C6EA3BA77DB0F853F0BF9A304EA291 +34069714368E0B94DFCBA3BE5EDB6C8204DFA7EAF5C3406F60A7056407D1BF6C +CB85C1F432F97D821F5518BBA79AF8453A568FB2C2D025A70CEC75F46C545011 +ACE3A99B2582793BA1DC655230AE2EFD24DE20A01D4A441AFFAB7771F223FA6B +9169849E727E494247F67D6E1EA9DCA06A082FE2094BD548AD7F08B565145634 +E7ED832FEC1378306DDC796303392ADB0CBA130B63B38ED57B7828B47732853A +893E8836FE19CCF27002AE92C2B2CACFDF8A42F1B8066E033B965D2E9157FDF8 +E1264B40813C1A4CE424274AA3528A4F09B3B53DD4D23789A68B3D17BC1398AE +0ADA2C2168427A49846DE0216908C2FFFEF4F13C1ECA12AD341E238EE46E6DC2 +B71B54C52659632911F901660261E493AE2483D64E119D9924489779B62BC9FB +A052E822FD8D83178E09ADC825DF0DA07FCE7AD68EEB29FAA275A13691B4A5A5 +B0BC0499CD6307610CD6209583C1152C559A2760823F8DC0B9B990BFFE7B7E9F +3969B968AFEAADB9FC0F1410EBBAA0DB979CF153F0B8C978405F8E6F2B6406D7 +AAFBF4A655A15DD6D1E9A7EAE10EF89264659B09283F50B734236885FC09FBE5 +98D780012FA77FCB19F15BDC522CC7312546C0730EF5225DEA8C22A3BC6554EF +4FE73B9AEB5C2F7DBD474221760E5F539A064AC450591BCF3499E3968F2CBD6B +F15BA2B37080A4129B66D4C2188524F025414F14DB3F96049A8B0E5EB2BBE7A1 +AD64A988FE875FE4FE5186BB4F5DDA16983CB052D474B7D72F3E8965663EB50E +015C72407C3437142D3D7DBC055FA627139488DBC5A0F98D805C2143D99F491A +167E07AF60EC9F17C36289368D740B632CB919A0E74C412B76CE7A5906D5200F +9E79CEB9C65ADA3A0F23E8947E834AE7A329A9F0AA7A6BF545B1D7B4666C6522 +CFF268634EA06DB3A82D91A4C0A9B227E79961212881A54A6762C335DE7E0831 +130C45D94394D21C049B9D189ED955438C2151514F17BFC67E431DD9A8349202 +2F616AEC1C7B19F63D5000EB4771370924BD4B9053FE78B5E4A244B9A149D66D +A8BF3B398396D2233E92E4A5FDC70FAADEADAFD255193D688842DBA865CF6154 +C9348D590F3FEB135D4B7BD4D76A52CB140888247CAFAB25ED51F4D187041CA0 +ABD956F83A5661CEC171B52AF92F9ADE27973B560C802E1E0FF51C4003D1289A +CDD09F8EDA8AFDFF666D35418CEADF3B0BE298F0D1E5C8E024D6A2017A7E71F3 +3A9FEC9930F1118101E040339F9D41379170928DDF5B5875212B271DC843F612 +E0C21C67263186E3D6929160464D4D5C8928E14D0845762C36FFBDE548188E20 +3B6BAFE5EECA0385142F01216FB8A90C43A472C1D4447FE5C7C78CC088FC72E7 +3FAFA062C338BDE8A430FDF1951B107D8D73FF9376FACDE5900BA362C66F8C1D +947F9545C5C13A53E4479B1C1A50472C05E8F8C266C6D4F4EB08E97B3B1BA972 +26973B844545089C5732322BCC9A5A8FC972FA0D7DB8BD85D2F515ADE65DA479 +0224F7EA2276CFED0B75B2C23AE7377F86F1F6F205D6FE19377D87E782143697 +984E731F83CA888199CEB425643C259D4FB8B58DD69A96085198306494BB497E +FE7C9954EF35B679BBE3847A9C73507874F71FC97665E2A58BA41407A1745247 +44A79B588D969D11CE4B863CDA655DAA53CEA5C3C263B345E782006CE9831D49 +603D2D95DE9E370D617F5928BA416C362BB2B4DEF16A5D44BD24B34257765F3B +6223B3F9B54DAED69A90C7050AB97B06693D253C6894CBD7B497DA449F1D9B7C +D91B421891EC0724F59C82B9CB288DC42F2D2D7A7F22EE3D910E15953D7766AE +276DABED3820390BAF2700C4653E1C77FE63DB71A66D93ED293E25B8412A1EFF +809554BF04ED0DE83F7F190883ED793803CAD2C34A66524D3A580ACDF3C13B22 +08F18905E7A4A16DA9ED2A112462FB9FFE481EC2069E484E8BBFC19D594153B7 +3DED4C11762223B7586483B06BC164D824D1A6FCAE80A35DE0DB8B33396771DF +76DC5C05578EF1BE00A70BAF3D951A01C87328DB2B0DAD6E1B4C21F37D1BC0C5 +A929BDE5EADF20DA60C4DE2E3C151005814F24824D33B95F700E09A0207EB602 +3EF60DEB1622B91DB99A855A8F1DA96358F05CFCEDBDDDFC8446AE3391BEEC41 +966E594E28D052DD5ADA49DFF65E79540EBE5329DFD86C23CC800F95221B9C18 +CBBF941D2FA47EF1EF59A89DB5DD188E75EE94AD2A79E2221107E5992C00D531 +2E00B544895A9204656867E3DE9D4CDB64B920B5CCA9A73E6514B36CABAE01BF +94C15603B86780190595560F792E5EF01650074EA4A9BBC6ED284B9AC2020641 +DCBCEE0ED27FE58171DFE104EEE4202759E594159DF45113C00236127A46FB35 +9EC705F21C0E456C1F0F924594C09AC64D4377C5FEEF764BA4A09ABA8D09DEB1 +FC13B0CD202B2F04CF5D73DEAB65C36C2FA7C0DC236BEEF6D23BFFC9C493DC8E +1831F19EEF81EEDD976E43BAC6B5CED13F901DE59835FC75490EA528A72CEB77 +24C38B258EC38B9E6B97F85CA8C10D8809BBE55A6FAA12456FCAC786942E123C +06D1E55F7ED04400088BEC968BC5081DC7A1B1B65166E7821679F76694F235FC +6854C8776AF855B83445D9FF919B1D80E98DE0741D06D6C5EEDB3E3EA6392530 +F1BA817737D8162F7B3A36AC2A03190CDEC654383E31934C3E0A012B639532C6 +26FEBE9B412F1C92D1943B7C18CEF510729D501349644C97F087F2F840074AE6 +D8CD0FB2E620FFC908BFCD938B675A0A4A687F7FBE8F3DD06A62D7B6DE7DF3E2 +49D367D60B10061EA86CD512F5A1BE8950D83C62695E130128E0037B62552D17 +064319BBB9B1FAB9D79705E5D68AAE9B36EA14BF1A59A863BDB8DAD9AB5D7B8A +E30E2B499F952D65877C8E38EDD7DB29F9579D09E629AC188DB6A6403AB4BA3A +D358B3770D727A2B77D84B6C9EC17E29D88E3421F9B7D2D822EB78BB8BB50692 +8C46DD6F9BBEF2E848A2B5669B200019802AD19661537A84D3514AEC5AA47445 +2C791E01DCEDF18D9506367241255FFADEEA6183F51A9F42448A7DE413C08359 +52DAD2A60FD606AFE14702BD3B0EC448720FE63438D020DEDFCDE3582FC31DF1 +17B25FC152789D2F17FD60B8209D292D2152DCF8D28B5ADC04F6659BBB746CDF +145163361823CA343763AA951C640B5D4A99B7787105A1609EDD6A596EFC3F6F +2FC33D0D499DBE56C6668E137715D435D6B683E0113647B2765AB0F3D98AC717 +5B33C3EDDE18506E73B4E392B022F30480BD30F59B2E3A59D93017296C3156B4 +B5722E1955777716388AA987B2665669716F866FE6BDAD5E74A523CC03915F26 +9B7B231F5D9B1F61DF7CB01ED3F27070E36547B263855DF5B2E3ABD2ACC440B9 +0826E1D9B057F51ACE6BBADF67DC4C0A0F1AE1F8606EE140FB1B2D8843522362 +8762E804EDDD847E3201FE5EE8F0F34C2C187B58D5AC8F5D150CB3584CB2DD0E +C16B9625A9F795211DB4FF82FF02AC437D4E47E6DCDC1159D24520249DFF1C41 +2A623E442ACEB6BC69133B99DC80ADA307ED5D47ABD348FDF349085C2CDCFD4E +43F9656FE59EDACF3C11361D8DBE56162631049333E66F494B254381414CFE91 +8D91E50414A004EE730B80A588C792E8AE3CE5019FA34C43654B8B293AD57519 +ABB8F34817296D47D49BB98035C973E5CAD59EF76A44ABA084649110CBEFAE57 +A7B3CE611D9065828AE89DA68BB86B423B8A2EB3CC9A9302692555D4127D754F +BC6730C6BA23F13C6A8BD9FAE1E8D13A3967607FDB42D5729F1EDC4D11601C0C +FF97705B5DE9E3E78C8D3252A6710B6BC1B2599C68076E7AC67EE55ED3DEA9CE +97B691CEA9D9D5987DA181DF71433965C58C2BB5117F5257FEE5E0F50C88AEE2 +25EEFAD0E4D1FCAD6D4871F7F62683D81C6622374700176A94DF43D46BE2F2D6 +2459FB8DAA2FCF9F2F54CAAE768D5D0C6AAA34DE207A87CA574EF2465C216D66 +C448F5AF51FAB37EB7F78D1EC92E59D90CBD15626B7F1A535046E3399AC08010 +4B9978A76DE005ACF7C89F3456CDD267A164E499DB2FA99A547041B2402EC067 +8169E334136BD1C5007FADD425DDB95CB268697B07581B7B4E9E5429A53DBCCD +EA58B7FE38208A97A64C7EDC850C1A6D50E9C37516D192CBA3F77577A7B8E581 +570C84FEFBCB6AFCBDD1B2D2BB1CB1E211E02C3502CEA050CDE090BC0F101C27 +3643951846FD3CBB3454A9A6EAF0F81450F0E6474148EFFC6BDA692F9116228D +366587DE955F4A0568DC07974613F01240566DC7C821CDD6E80B760C563126CE +33BF6B0808B86AD9D8AC4B2CEF41BE8163BF8084336C9E705F5D7BD6C8B6F162 +7F3A224703F4CB287E90017469C4584FD71B2438619BF3E942CAB9BDB481DF52 +926FF3481E9A0D4D696B8E0F17F91637114A96CA2EBF5589AD650022FB95FCE3 +63145735C8F15578E9828046C710525509E381FA400DB658C7E568CB7C56B3C9 +61B48B71F4020440969424D3062ED74A64FF9C6B74E14D460862D239B5812461 +A2506B3074897F1FB5B8C5EFAA5BCE70CA1274F0 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndResource +%%EndProlog +%%BeginSetup + /uhvr8r /JXDTPR-NimbusSanL-Regu def + /cmr8 /GMTUEE-CMR8 def +%%EndSetup +%%Page: 1 1 + 1 0 0 setrgbcolor +newpath 54.14986 5.99792 moveto +54.9016 5.99792 lineto +54.9016 13.38094 lineto +54.14986 13.38094 lineto + closepath fill +newpath 60.78113 5.99792 moveto +61.53287 5.99792 lineto +61.53287 13.38094 lineto +60.78113 13.38094 lineto + closepath fill +newpath 55.20229 13.38094 moveto +54.14986 13.38094 lineto +60.48044 5.99792 lineto +61.53287 5.99792 lineto + closepath fill + 0 0 1 setrgbcolor +newpath 54.14986 46.15283 moveto +54.9016 46.15283 lineto +54.9016 53.53584 lineto +54.14986 53.53584 lineto + closepath fill +newpath 60.78113 46.15283 moveto +61.53287 46.15283 lineto +61.53287 53.53584 lineto +60.78113 53.53584 lineto + closepath fill +newpath 55.20229 53.53584 moveto +54.14986 53.53584 lineto +60.48044 46.15283 lineto +61.53287 46.15283 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 86.89844 7.16803 moveto +87.65018 7.16803 lineto +87.65018 14.55104 lineto +86.89844 14.55104 lineto + closepath fill +newpath 93.52971 7.16803 moveto +94.28145 7.16803 lineto +94.28145 14.55104 lineto +93.52971 14.55104 lineto + closepath fill +newpath 87.95087 14.55104 moveto +86.89844 14.55104 lineto +93.22902 7.16803 lineto +94.28145 7.16803 lineto + closepath fill +newpath 94.92334 7.16803 moveto +95.67508 7.16803 lineto +95.67508 14.55104 lineto +94.92334 14.55104 lineto + closepath fill + 0 0.75172 dtransform truncate idtransform setlinewidth pop [] 0 setdash + 1 setlinecap 1 setlinejoin 10 setmiterlimit +newpath 95.29921 10.85954 moveto +101.93048 10.85954 lineto stroke +newpath 101.55461 7.16803 moveto +102.30635 7.16803 lineto +102.30635 14.55104 lineto +101.55461 14.55104 lineto + closepath fill + 0 setlinecap +newpath 103.32411 3.64421 moveto +103.60684 4.45103 104.14868 5.14159 104.8651 5.60812 curveto +105.96042 6.32141 107.49776 6.64987 107.74046 7.95448 curveto +107.96924 9.18422 106.85799 10.2441 105.53229 10.16272 curveto +104.34424 10.0898 103.397 9.14253 103.32411 7.95448 curveto stroke +newpath 108.11633 3.15558 moveto +108.11633 3.90732 lineto +102.94824 3.90732 lineto +102.94824 3.15558 lineto + closepath fill + 0 0.50114 dtransform truncate idtransform setlinewidth pop 1 setlinecap +newpath 40.45374 19.72816 moveto +53.34746 12.28403 lineto stroke +newpath 44.04344 21.47943 moveto +55.0032 15.15187 lineto stroke +newpath 62.33528 12.28403 moveto +75.229 19.72816 lineto stroke + 0 1 0 setrgbcolor 0.50114 + 0 dtransform exch truncate exch idtransform pop setlinewidth +newpath 75.229 19.72816 moveto +75.229 39.80562 lineto stroke +newpath 71.91751 21.73604 moveto +71.91751 37.79782 lineto stroke + 0 0 0 setrgbcolor 0 0.50114 dtransform truncate idtransform setlinewidth pop +newpath 75.229 39.80562 moveto +62.33528 47.24976 lineto stroke +newpath 53.34746 47.24976 moveto +40.45374 39.80562 lineto stroke +newpath 55.0032 44.38191 moveto +44.04344 38.05435 lineto stroke + 0.50114 0 dtransform exch truncate exch idtransform pop setlinewidth +newpath 40.45374 39.80562 moveto +40.45374 19.72816 lineto stroke + 0 0.50114 dtransform truncate idtransform setlinewidth pop +newpath 75.229 19.72816 moveto +86.09601 13.45413 lineto stroke +9.22984 46.03944 moveto +(\(draw\)) uhvr8r 9.96265 fshow +150.05211 5.99792 moveto +(N) cmr8 10.80444 fshow +150.05211 46.15283 moveto +(N) cmr8 10.80444 fshow +182.80069 7.16803 moveto +(N) cmr8 10.80444 fshow +192.14693 7.16803 moveto +(H) cmr8 10.80444 fshow +201.3689 3.13731 moveto +(2) cmr8 10.80444 fshow +newpath 136.30315 19.72816 moveto +149.19687 12.28403 lineto stroke +newpath 139.89285 21.47943 moveto +150.85262 15.15187 lineto stroke +newpath 159.506 13.04684 moveto +171.07841 19.72816 lineto stroke + 0.50114 0 dtransform exch truncate exch idtransform pop setlinewidth +newpath 171.07841 19.72816 moveto +171.07841 39.80562 lineto stroke +newpath 167.76692 21.73604 moveto +167.76692 37.79782 lineto stroke + 0 0.50114 dtransform truncate idtransform setlinewidth pop +newpath 171.07841 39.80562 moveto +159.506 46.48694 lineto stroke +newpath 149.19687 47.24976 moveto +136.30315 39.80562 lineto stroke +newpath 150.85262 44.38191 moveto +139.89285 38.05435 lineto stroke + 0.50114 0 dtransform exch truncate exch idtransform pop setlinewidth +newpath 136.30315 39.80562 moveto +136.30315 19.72816 lineto stroke + 0 0.50114 dtransform truncate idtransform setlinewidth pop +newpath 171.07841 19.72816 moveto +181.94542 13.45413 lineto stroke +104.53125 46.03944 moveto +(\(cmr8\)) uhvr8r 9.96265 fshow +newpath -0.1 0.1 moveto +-0.1 -0.1 lineto +0.1 -0.1 lineto +212.69804 -0.1 lineto +212.69804 0.1 lineto +212.69804 56.79282 lineto +212.49803 56.79282 lineto +-0.1 56.79282 lineto +-0.1 56.5928 lineto +-0.1 -0.1 lineto +0.1 -0.1 lineto +0.1 0.1 lineto +0.1 56.79282 lineto +0.1 56.5928 lineto +212.69804 56.5928 lineto +212.49803 56.5928 lineto +212.49803 -0.1 lineto +212.49803 0.1 lineto + closepath fill +showpage +%%EOF diff --git a/graphics/mcf2graph/mcf_man_soc.mf b/graphics/mcf2graph/mcf_man_soc.mf new file mode 100644 index 0000000000..53e5a5671d --- /dev/null +++ b/graphics/mcf2graph/mcf_man_soc.mf @@ -0,0 +1,1142 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Molecular Coding Format file for mcf_manual.tex by Akira.Yamaji 2019.07.07 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +input mcf2graph.mf; %% it must be version 4.44 or later +%------------------------------------------------------------------------ +sw_mframe:=0; +sw_expand:=0; +%%%%sw_aux_out:=0; +%%%%sw_rep_out:=1; +%*********************************************************************** +fsize:=(35mm,25mm); +blength:=6mm; +%------------------------------------------------------------------------- +%ext(defaultscale:=.5; label.bot(decimal(char_num)&":"&inf_EN,(.5w,0));) +%*********************************************************************** +beginfont("EN:Glycine") + MC(<30,NH2,!0,!,COOH) +endfont +%*********************************************************************** +beginfont("EN:Alanine") + MC(<30,NH2,!0,/_,!,COOH) +endfont +%*********************************************************************** +beginfont("EN:Valine") + MC(<30,NH2,!0,/iPr,!,COOH) +endfont +%*********************************************************************** +beginfont("EN:Leucine") + MC(<30,NH2,!0,!,COOH,2:\,!,/_,!) +endfont +%*********************************************************************** +beginfont("EN:Isoleucine") + MC(<30,NH2,!0,!,COOH,2:\,/_,!2) +endfont +%*********************************************************************** +beginfont("EN:Serine") + MC(<30,NH2,!0,!,COOH,2:/!OH) +endfont +%*********************************************************************** +beginfont("EN:Threonine") + MC(<30,NH2,!0,!,COOH,2:\,/_,!,OH) +endfont +%*********************************************************************** +beginfont("EN:Cysteine") + MC(<30,NH2,!0,!,COOH,2:/!SH) +endfont +%*********************************************************************** +beginfont("EN:Methionine") + MC(<30,NH2,!0,!,COOH,2:\,!2,SMe) +endfont +%*********************************************************************** +beginfont("EN:Phenylalanine") + MC(<30,NH2,!0,!,COOH,2:/!Ph) +endfont +%*********************************************************************** +beginfont("EN:Tyrosine") + MC(<30,NH2,!0,!,COOH,2:\,!,Ph,-3:/OH) +endfont +%*********************************************************************** +beginfont("EN:Triptophan") + MC(<30,NH2,!0,!,COOH,2:\,!,<24,|,?5,-4=Ph,2=dr,5=dl,4:NH) +endfont +%*********************************************************************** +beginfont("EN:Prorine") + MC(<18,?5,3:NH,4:/COOH) +endfont +%*********************************************************************** +beginfont("EN:Glutamine") + MC(<30,NH2,!0,!,COOH,2:\`1,-45,-45,//O,!,NH2) +endfont +%*********************************************************************** +beginfont("EN:Asparagine") + MC(<30,NH2,!0,!,COOH,2:\,!,//O,!,NH2) +endfont +%*********************************************************************** +beginfont("EN:Aspartic acid") + MC(<30,NH2,!0,/!COOH,!,COOH) +endfont +%*********************************************************************** +beginfont("EN:Glutamic acid") + MC(<30,NH2,!0,!,COOH,2:\,!2,COOH) +endfont +%*********************************************************************** +beginfont("EN:Lysine") + MC(<30,NH2,!0,!,COOH,2:\,!4,NH2) +endfont +%*********************************************************************** +beginfont("EN:Arginine") + MC(<30,NH2,!0,!,COOH,2:\,-45,-45,60,NH,!,//NH,!,NH2) +endfont +%*********************************************************************** +beginfont("EN:Hystidine") + MC(<30,NH2,!0,!,COOH,2:\,!,|,?5,{1,3}=dl,3:N,5:NH) +endfont +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +fsize:=(60mm,35mm); +blength:=0mm; +max_blength:=10mm; +ratio_thickness_bond:=0.015; +ratio_atom_bond:=0.36; +sw_fframe:=1; +fmargin:=(2mm,1mm); +%*********************************************************************** +beginfont("EN:Chain 1") + fsize:=(60mm,20mm); + sw_numberB:=1; + numberB_end:=6; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<10,-30,45,-45,30,-30,60, + {1^-75,2^67.5,3^-60,4^75,5^-75,6^60}:/_~dt + ) + add( + defaultscale:=0.5; + labeloffset:=2bp; + drawarrow B7/*.7{B7right}..{B1right}B1/*.7; label.ulft("-30",B7/*.7); + drawarrow B8/*.7{B8left}..{B2left}B2/*.7; label.llft("45",B8/*.7); + drawarrow B9/*.7{B9right}..{B3right}B3/*.7; label.ulft("-45",B9/*.7); + drawarrow B10/*.7{B10left}..{B4left}B4/*.7; label.llft("30",B10/*.7); + drawarrow B11/*.7{B11right}..{B5right}B5/*.7; label.ulft("-30",B11/*.7); + drawarrow B12/*.7{B12left}..{B6left}B6/*.7; label.llft("60",B12/*.7); + ) +endfont +%*********************************************************************** +beginfont("EN:Chain 2") + fsize:=(60mm,20mm); + sw_numberB:=1; + numberB_end:=6; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<30,!6, + {1^-60,2^60,3^-60,4^60,5^-60,6^60}:/_~dt + ) + add( + defaultscale:=0.5; + labeloffset:=2bp; + drawarrow B7/*.7{B7right}..{B1right}B1/*.7; label.ulft("-60",B7/*.7); + drawarrow B8/*.7{B8left}..{B2left}B2/*.7; label.llft("60",B8/*.7); + drawarrow B9/*.7{B7right}..{B3right}B3/*.7; label.ulft("-60",B9/*.7); + drawarrow B10/*.7{B10left}..{B4left}B4/*.7; label.llft("60",B10/*.7); + drawarrow B11/*.7{B11right}..{B5right}B5/*.7; label.ulft("-60",B11/*.7); + drawarrow B12/*.7{B12left}..{B6left}B6/*.7; label.llft("60",B12/*.7); + ) +endfont +%*********************************************************************** +beginfont("EN:Jump and Branch") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_trimming:=1; + sw_numberA:=1; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<30,!6,3:@,0,!,5:@,-30) +endfont +%*********************************************************************** +beginfont("EN:Jump and Branch") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_numberA:=1; + sw_trimming:=1; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<30,!6,3:\,!) +endfont +%*********************************************************************** +beginfont("EN:branch1") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_numberA:=1; + sw_trimming:=1; + numberA_end:=10; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<-30,!10,2:\,!,4:*\,!,6:\*,!,8:\\,!,10:*\*,!) +endfont +%*********************************************************************** +beginfont("EN:branch2") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_trimming:=1; + sw_numberA:=1; + numberA_end:=7; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<-30,!6,2:\~dr,!,4:\`1.5,-90,6:@,15,-60) +endfont +%*********************************************************************** +beginfont("EN:Connect atom") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_trimming:=1; + sw_numberA:=1; + ratio_chain_ring:=1; +%---------------------------------------------------------------------- + MC(<30,!6,3:\,!,5~bd:#) +endfont +%*********************************************************************** +beginfont("EN:ring") + fsize:=(60mm,20mm); + sw_trimming:=1; + fmargin:=(2mm,3mm); + sw_numberB:=1; +%---------------------------------------------------------------------- + MC(?6) +endfont +%*********************************************************************** +beginfont("EN:rotate 1") + fsize:=(60mm,20mm); + fmargin:=(2mm,3mm); + sw_trimming:=1; + sw_numberB:=1; + ratio_chain_ring:=1; + numberB_end:=5; + defaultscale:=0.5; + labeloffset:=2bp; + MC(``1,0,0,<90,0,<-90,0,0,{1,2,3,4,5}=vf, + {3,4^180}:/_~dt) + add( + drawarrow B6/*.7{B6left}..{B3left}B3/*.7; label.urt("90",B6/*.7); + drawarrow B7/*.7{B7right}..{B4right}B4/*.7; label.urt("-90",B7/*.7); + ) +endfont +%*********************************************************************** +beginfont("EN:change bond 1") + fsize:=(70mm,12mm); + fmargin:=(2mm,3mm); + blength:=8mm; + sw_trimming:=1; + ratio_chain_ring:=1; + MC(<30,!~dm,!,!~dl,!,!~dr,!~db,!~db,!,!~tm) +endfont +%*********************************************************************** +beginfont("EN:change bond 2") + fsize:=(60mm,12mm); + fmargin:=(2mm,3mm); + blength:=9.5mm; + sw_trimming:=1; + ratio_chain_ring:=1; + MC(<30,!~wf,!,!~wb,!,!~zf,!,!~zb) +endfont +%*********************************************************************** +beginfont("EN:change bond 3") + fsize:=(70mm,12mm); + fmargin:=(2mm,3mm); + blength:=10mm; + sw_trimming:=1; + ratio_chain_ring:=1; + MC(<30,!~vf,!,!~vb) +endfont +%*********************************************************************** +beginfont("EN:change bond 3") + fsize:=(70mm,12mm); + fmargin:=(2mm,3mm); + blength:=9mm; + sw_trimming:=1; + ratio_chain_ring:=1; + MC(<30,!7,1=dt,3=wv,5=bd,7=bz) +endfont +%*********************************************************************** +beginfont("EN:change bond 4") + fsize:=(60mm,12mm); + fmargin:=(2mm,3mm); + blength:=9mm; + sw_trimming:=1; + ratio_chain_ring:=1; + MC(<30,!7,{2,4,6}=dr) +endfont +%*********************************************************************** +beginfont("EN:over line") + sw_trimming:=1; + fsize:=(60mm,20mm); + ratio_chain_ring:=1; + MC(<-30,!8,!,60,90`8,{2~si_,4~wf_,6~wb_,8~bd_}:/_`2) +endfont +%*********************************************************************** +beginfont("EN:change bond length1") + fsize:=(60mm,12mm); + sw_numberB:=1; + MC(<30,!2,!2`1.2,!2) +endfont +%*********************************************************************** +beginfont("EN:change bond length2") + fsize:=(60mm,12mm); + sw_numberB:=1; + MC(<30,!2,``1.2,!4) +endfont +%*********************************************************************** +beginfont("EN:change ring length") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_trimming:=1; + sw_numberB:=1; + MC(?6,4:\,?6`1.2) +endfont +%*********************************************************************** +beginfont("EN:Insert atom") + sw_trimming:=1; + fsize:=(70mm,12mm); + MC(<30,!2,O,!2,N,!2) +endfont +%*********************************************************************** +beginfont("EN:change atom") + fsize:=(70mm,10mm); + MCat(0,0.5)(<-30,!4,2:O,{3,4}:N) + sw_numberA:=1; + MCat(1,0.5)(<-30,!4,2:O,{3,4}:N) +endfont +%*********************************************************************** +beginfont("EN:change atom brock address 1") + fsize:=(70mm,15mm); + MCat(0,.5)(?6,4:\,|,?6,2:O) + sw_numberA:=1; + msize:=(1,.88); + MCat(1,.5)(?6,4:\,?6) +endfont +%*********************************************************************** +beginfont("EN:change atom brock address 2") + fsize:=(70mm,15mm); + MCat(0,.5)(?6,4:\,|,?6,||,2:N) + sw_numberA:=1; + msize:=(1,.88); + MCat(1,.5)(?6,4:\,?6) +endfont +%*********************************************************************** +beginfont("EN:change atom absolute address") + fsize:=(70mm,15mm); + MCat(0,.5)(?6,4:\,?6,$2:N) + sw_numberA:=1; + msize:=(1,.88); + MCat(1,.5)(?6,4:\,?6) +endfont +%*********************************************************************** +beginfont("EN:change atom relative adress") + fsize:=(70mm,15mm); + MCat(0,.5)(?6,4:\,?6,-2:N) + sw_numberA:=3; + msize:=(1,.88); + MCat(1,.5)(?6,4:\,?6) +endfont +%*********************************************************************** +beginfont("EN:Charged atom") + sw_trimming:=1; + fsize:=(60mm,15mm); + MC(<-30,!2,N[1],!2,O[-1],!2,&"-",!2,N,&"+"^180,!) +endfont +%*********************************************************************** +beginfont("EN:fused ring") + fsize:=(60mm,18mm); + fmargin:=(2mm,1.5mm); + sw_trimming:=1; + sw_numberB:=1; + MC(<30,?6,3=?6,3=dt,{7,8,9,10,11}=bd) +endfont +%----------------------------------------------------------------------- +beginfont("EN:change ring length") + fsize:=(60mm,25mm); + fmargin:=(2mm,2mm); + sw_trimming:=1; + sw_numberB:=1; + MC(?6,4:\,?6`1.2,5=?6,11=?6, + {14,15,16,17,18,19,20,21,22,23}=bd,{5,11}=dt) +endfont +%----------------------------------------------------------------------- +beginfont("EN:fused large 6 ring") + fsize:=(60mm,18mm); + fmargin:=(2mm,1.5mm); + margin_top_bottom:=1.5mm; + sw_numberB:=1; + sw_trimming:=1; + MC(<30,?6,3=?6[13],3=dt,{7,8,9,10,11}=bd) +endfont +%----------------------------------------------------------------------- +beginfont("EN:fuse multi ring") + fsize:=(70mm,20mm); + sw_numberB:=1; + sw_trimming:=1; + MC(<30,?6,{-3,-4,-4,-2,-2,-4,-4}=?6,{4,8,13,20,25,28,33}=dt) +endfont +%*********************************************************************** +beginfont("EN:fused ring 2") + fsize:=(75mm,20mm); + sw_numberB:=1; + MCat( 0,.5)(<30,?6,3=?6,(11,4)=?6[4],{11,4}=dt,{12,13,14,15}=bd) + msize:=(1,.9); MCat(.5,.5)(<30,?6,3=?6,(11,4)=?5[3],{11,4}=dt,{12,13,14}=bd) + msize:=(1,.9); MCat( 1,.5)(<30,?6,3=?6,(11,4)=?4[2],{11,4}=dt,{12,13}=bd) +endfont +%*********************************************************************** +beginfont("EN:fused ring 3") + fsize:=(60mm,20mm); + fmargin:=(2mm,2mm); + sw_numberB:=1; + MCat(0,1)(?6,{3,10}=?6,(16,4)=?6[3],{16,4}=dt,{17,18,19}=bd) + MCat(1,0)(?6,{3,10}=?6,(16,4)=?5[2],{16,4}=dt,{17,18}=bd) +endfont +%*********************************************************************** +beginfont("EN:fused ring 4") + fsize:=(60mm,22mm); + fmargin:=(2mm,2mm); + sw_trimming:=1; + sw_numberB:=1; + MC(<-30,?6,{3,10,15}=?6,(21,4)=?6[2],{21,4}=dt,{22,23}=bd) +endfont +%*********************************************************************** +beginfont("EN:Spiro ring ") + sw_trimming:=1; + fsize:=(60mm,18mm); + fmargin:=(2mm,3mm); + sw_numberA:=1; + numberA_end:=7; + ratio_chain_ring:=1; + MC(<30,!6,4:@,?5) +endfont +%*********************************************************************** +beginfont("EN:substituent 1") + fsize:=(60mm,25mm); + sw_trimming:=1; + MC(<30,!,/_,!,/!,!3,/!2,!,/iPr,!3,/tBu,!,/Ph^-30,!) +endfont +%*********************************************************************** +beginfont("EN:substituent 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") + fsize:=(60mm,18mm); + sw_trimming:=1; + MC(<30,``1,!2,/_`2^30,!2,/!2>lr,!2,/!2>rl,!) +endfont +%*********************************************************************** +beginfont("EN:substituent 3") + fsize:=(70mm,18mm); + fmargin:=(2mm,2mm); + sw_numberA:=1; + sw_trimming:=1; + numberA_end:=17; + MC(<-30,!16,2:/_,4:/!,6:/!2,10:/iPr,14:/tBu,16:/Ph^-60) +endfont +%*********************************************************************** +beginfont("EN:substituent 4") + fsize:=(60mm,18mm); + sw_trimming:=1; + fmargin:=(2mm,2mm); + sw_numberA:=1; numberA_end:=7; + MC(<-30,!6`1,{2~wf,4~zf,6^-30}:/_) +endfont +%*********************************************************************** +beginfont("EN:substituent 5") + fsize:=(60mm,18mm); + sw_trimming:=1; + sw_numberA:=1; numberA_end:=8; + MC(<30,!7`1,3:/_`2^30,5:/!2>lr,7:/!2>rl) +endfont +%*********************************************************************** +beginfont("EN:chain strech direction mode 1") + fsize:=(60mm,27mm); + sw_trimming:=1; + ratio_chain_ring:=1; + MC( + ?4,{3^-90,3^-30,3^90}:/'(!3,"{hz}")>hz, + {1^-60,1`1.5,1^60}:/'(!2,"{vt}")>vt + ) +endfont +%*********************************************************************** +beginfont("EN:chain strech direction mode 2") + fsize:=(60mm,23mm); + sw_trimming:=1; + ratio_chain_ring:=1; + MC( + <30,!6,{3^-30,3,3^30}:/'(!,!,!,"{lr}")>lr, + {5^-30,5,5^30}:/'(!,!,!,"{rl}")>rl + ) +endfont +%*********************************************************************** +beginfont("EN:chain strech direction mode 3") + fsize:=(60mm,25mm); + sw_trimming:=1; + ratio_chain_ring:=1; + MC(<-30,!6,{6>45}:/'(!3,"{45}"), + {3>'(90,-90,90)}:/'(!3,"{'(90,-90,90)}") + ) +endfont +%*********************************************************************** +beginfont("EN:change atom and substituent") + fsize:=(60mm,15mm); + sw_trimming:=1; + MC(<30,!2,NH,!2,SO,!2,SOO,!) +endfont +%*********************************************************************** +beginfont("EN:Change color,font") + fsize:=(75mm,20mm); + sw_label:=1; + defaultfont:="cmtt10"; + defaultsize:=10bp; + fmargin:=(3mm,1mm); + MCat(0.25,0)(<30,Ph,{2,5}:N,3:/NH2,2:red,5:blue,3=green) + add(label.lft("(draw)",p0+(0,.9h));) + atomfont:="cmr8"; + MCat(1,0)(<30,Ph,{2,5}:N,3:/NH2) + add(label.lft("(cmr8)",p0+(0,.9h));) +endfont +%*********************************************************************** +beginfont("EN:Make brock") + fsize:=(60mm,8mm); + sw_trimming:=1; + sw_numberB:=1; + MC(<30,!2,|<,``1.2,!2,>|,!2) +endfont +%*********************************************************************** +beginfont("EN:Chain start multi characters") + fsize:=(60mm,9mm); + sw_trimming:=1; + MC(<30,COOH,!0,!5,COOH) +endfont; +beginfont("EN:not good") + fsize:=(60mm,9mm); + fmargin:=(5mm,2mm); + sw_trimming:=1; + MC(<30,COOH,!6,COOH) +endfont; +%*********************************************************************** +beginfont("EN:User definition") + fsize:=(60mm,12mm); + sw_trimming:=1; + iBuOH:='(!,/_,!,OH); + MC(<30,?6,{4,6}:/iBuOH) +endfont +%*********************************************************************** +beginfont("EN:Inline definition") + fsize:=(60mm,12mm); + fmargin:=(2mm,1mm); + sw_trimming:=1; + MC(<30,!3,/'(!,/_,!,OH),!3) +endfont +%*********************************************************************** +beginfont("EN:mangle") + fsize:=(50mm,15mm); + blength:=6mm; + mangle:=0; + MCat(0.2,0.5)(Ph) + add(drawarrow((A1 shifted (aw,0)) rotated A1ang..A1);) + mangle:=30; + MCat(0.8,0.5)(Ph) + add(drawarrow((A1 shifted (aw,0)) rotated A1ang..A1);) +endfont +%*********************************************************************** +beginfont("EN:blength=0") + sw_fframe:=3; + fsize:=(40mm,15mm); + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%----------------------------------------------------------------------- +beginfont("EN:0<blength=<1") + sw_fframe:=3; + fsize:=(40mm,15mm); + blength:=0.1; + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%----------------------------------------------------------------------- +beginfont("EN:blength>1") + sw_fframe:=3; + fsize:=(40mm,15mm); + blength:=8mm; + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%*********************************************************************** +beginfont("EN:msize=(1)") + sw_fframe:=3; + sw_mframe:=1; + fsize:=(40mm,15mm); + msize:=(1,1); + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%------------------------------------------------------ +beginfont("EN:msize=(0.25,1)") + sw_fframe:=3; + sw_mframe:=1; + fsize:=(40mm,15mm); + msize:=(0.25,1); + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%------------------------------------------------------ +beginfont("EN:msize=(11mm,11mm)") + sw_fframe:=3; + sw_mframe:=1; + fsize:=(40mm,15mm); + msize:=(11mm,11mm); + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%*********************************************************************** +beginfont("EN:mposition") + sw_fframe:=3; + sw_mframe:=1; + fsize:=(40mm,15mm); + msize:=(1,0.8); + mposition:=(0.5,0.5); + MC(<30,Ph) +endfont +%----------------------------------------------------- +beginfont("EN:mposition") + sw_fframe:=3; + sw_mframe:=1; + fsize:=(40mm,15mm); + msize:=(1,0.8); + mposition:=(1,0); + MC(<30,Ph) +endfont +%----------------------------------------------------- +beginfont("EN:mposition") + sw_mframe:=1; + fsize:=(40mm,15mm); + msize:=(1,0.8); + mposition:=(10mm,4mm); + MC(<30,Ph) + ext(drawdot p1 withpen pencircle scaled 3pt; + pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%*********************************************************************** +beginfont("EN:Font size") + fsize:=(40mm,15mm); + sw_fframe:=1; + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + ) +endfont +%*********************************************************************** +beginfont("EN:fmargin") + fsize:=(40mm,15mm); + sw_fframe:=3; + sw_mframe:=1; + fmargin:=(10mm,3mm); + MC(<30,Ph) + ext(pickup pencircle scaled 0.2pt; + for i=0 upto w/mm: draw (i*mm,0)--(i*mm,-.5mm); endfor + for i=0 upto h/mm: draw (0,i*mm)--(-.5mm,i*mm); endfor + for i=0 upto w/cm: draw (i*cm,0)--(i*cm,-.8mm); endfor + for i=0 upto h/cm: draw (0,i*cm)--(-.8mm,i*cm); endfor + drawdot p0 withpen pencircle scaled 3pt; + ) +endfont +%*********************************************************************** +beginfont("EN:offset_thickness") + fsize:=(60mm,15mm); + offset_thickness:=0.0pt; MCat(0.08,0.5)(<30,Ph) + offset_thickness:=0.2pt; MCat(.5,0.5)(<30,Ph) + offset_thickness:=0.5pt; MCat(0.92,0.5)(<30,Ph) endfont +%*********************************************************************** +beginfont("EN:offset_bond_gap") + fsize:=(60mm,15mm); + offset_bond_gap:=0.0pt; + MCat(0.08, .5)(<30,Ph) + offset_bond_gap:=0.3pt; %<<== default + MCat(.50, .5)(<30,Ph) + offset_bond_gap:=1.0pt; + MCat(0.92, .5)(<30,Ph) +endfont +%*********************************************************************** +beginfont("EN:offset_atom") + fsize:=(60mm,15mm); + offset_atom:=0.0pt; + MCat(0.08, .5)(<30,?6,3:O) + offset_atom:=0.8pt; %<<== default + MCat(.5, .5)(<30,?6,3:O) + offset_atom:=2.0pt; + MCat(0.92, .5)(<30,?6,3:O) +endfont +%*********************************************************************** +beginfont("EN:offset_wedge") + fsize:=(60mm,15mm); + offset_wedge:=0.0pt; + MCat(0.08, .5)(<30,?6,5:*/_) + offset_wedge:=0.4pt; %<<== default + MCat( .5, .5)(<30,?6,5:*/_) + offset_wedge:=1.0pt; + MCat(0.92, .5)(<30,?6,5:*/_) +endfont +%*********************************************************************** +beginfont("EN:max_blength") + fsize:=(60mm,25mm); + sw_mframe:=1; + max_blength:=6mm; + MCat(0, .5)(<30,Ph) + max_blength:=8mm; + MCat(.4,.5)(<30,Ph) + max_blength:=20mm; %<<== default + MCat(1, .5)(<30,Ph) +endfont +%*********************************************************************** +beginfont("EN:ratio_thickness_bond") + fsize:=(60mm,15mm); + ratio_thickness_bond:=0.005; + MCat(0.08, .5)(<30,Ph) + ratio_thickness_bond:=0.015; %<<== default + MCat(.5, .5)(<30,Ph) + ratio_thickness_bond:=0.03; + MCat(0.92, .5)(<30,Ph) +endfont +%*********************************************************************** +beginfont("EN:ratio_char_bond") + fsize:=(60mm,15mm); + ratio_char_bond:=1.0; + MCat( 0, .5)(<30,?6,6:O,3:NH) + ratio_char_bond:=1.5; %<<== default + MCat(.5, .5)(<30,?6,6:O,3:NH) + ratio_char_bond:=2.0; + MCat( 1, .5)(<30,?6,6:O,3:NH) +endfont +%*********************************************************************** +beginfont("EN:ratio_bondgap_bond") + fsize:=(60mm,15mm); + ratio_bondgap_bond:=0.10; + MCat(0.08, .5)(<30,Ph) + ratio_bondgap_bond:=0.15; %<<== default + MCat(.5, .5)(<30,Ph) + ratio_bondgap_bond:=0.20; + MCat(0.92, .5)(<30,Ph) +endfont +%*********************************************************************** +beginfont("EN:ratio_atom_bond") + fsize:=(60mm,15mm); + ratio_atom_bond:=0.25; + MCat(0.08, .5)(<30,?6,3:O) + ratio_atom_bond:=0.33; %<<== default + MCat(.5, .5)(<30,?6,3:O) + ratio_atom_bond:=0.45; + MCat(0.92, .5)(<30,?6,3:O) +endfont +%*********************************************************************** +beginfont("EN:ratio_wedge_bond") + fsize:=(60mm,15mm); + ratio_wedge_bond:=0.1; + MCat(0.08, .5)(<30,?6,5:*/_) + ratio_wedge_bond:=0.12; %<<== default + MCat(.5, .5)(<30,?6,5:*/_) + ratio_wedge_bond:=0.2;; + MCat(0.92, .5)(<30,?6,5:*/_) +endfont +%*********************************************************************** +beginfont("EN:ratio_atomgap_atom") + fsize:=(60mm,8mm); + sw_aframe:=1; + ratio_atomgap_atom:=0.00; + MCat(0, .5)(<-30,!2,2:O) + ratio_atomgap_atom:=0.050; %<<== default + MCat(.5, .5)(<-30,!2,2:O) + ratio_atomgap_atom:=0.12; + MCat(1, .5)(<-30,!2,2:O) +endfont +%*********************************************************************** +beginfont("EN:ratio_chain_ring") + fsize:=(70mm,15mm); + ratio_chain_ring:= 0.4; + MCat(0, .5)(<30,?6,4:/!) + ratio_chain_ring:= 0.66; %<<== default + MCat(.45, .5)(<30,?6,4:/!) + ratio_chain_ring:= 1; + MCat(1, .5)(<30,?6,4:/!) +endfont +%*********************************************************************** +beginfont("EN:ratio_zebragap_bond") + fsize:=(60mm,15mm); + ratio_zebragap_bond:=0.06; + MCat(0.08, .5)(<-30,!2,2:/*_`1) + ratio_zebragap_bond:=0.12; %<<== default + MCat( .5, .5)(<-30,!2,2:/*_`1) + ratio_zebragap_bond:=0.20; + MCat(0.92, .5)(<-30,!2,2:/*_`1) +endfont +%*********************************************************************** +beginfont("EN:Switwch numberingA") + fsize:=(60mm,20mm); + ratio_chain_ring:=1; + numberA_start:=3; numberA_end:=8; + sw_numberA:=1; MCat(.5,.9)(<30,!9) + sw_numberA:=2; MCat(.5,.5)(<30,!9) + sw_numberA:=3; MCat(.5,.1)(<30,!9) +endfont +%*********************************************************************** +beginfont("EN:Switwch numberingB") + fsize:=(60mm,20mm); + ratio_chain_ring:=1; + numberB_start:=3; numberB_end:=8; + sw_numberB:=1; MCat(.5,.9)(<30,!9) + sw_numberB:=2; MCat(.5,.5)(<30,!9) + sw_numberB:=3; MCat(.5,.1)(<30,!9) +endfont +%*********************************************************************** +beginfont("EN:Switwch trimming") + fsize:=(60mm,20mm); + sw_fframe:=3; + sw_mframe:=1; + msize:=(1,.7); MCat(.2,.3)(Ph) + MCat(.8,.7)(Ph) +endfont +%----------------------------------------------------------------------- +beginfont("EN:Switwch trimming") + fsize:=(60mm,20mm); + sw_fframe:=3; + sw_mframe:=1; + sw_trimming:=1; + msize:=(1,.7); + MCat(.2,.3)(Ph) + MCat(.8,.7)(Ph) +endfont +%*********************************************************************** +beginfont("EN:Switwch Expand") + fsize:=(60mm,20mm); + MCat(0, .5)(<30,Ph,4:/COOH,3:/NH2) + sw_expand:=1; + MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) +endfont +%*********************************************************************** +beginfont("EN:Switwch substituent off") + fsize:=(60mm,15mm); + MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) + sw_subst_off:=1; + MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) +endfont +%*********************************************************************** +beginfont("EN:Switwch bondtype off") + fsize:=(60mm,15mm); + MCat(.15, .5)(<30,Ph,4:/Cl,3:/F) + sw_single:=1; + MCat(.85, .5)(<30,Ph,4:/Cl,3:/F) +endfont +%*********************************************************************** +beginfont("EN:Switwch font frame 1") + fsize:=(40mm,12mm); + fmargin:=(5mm,2mm); + sw_fframe:=1; + MC(<30,Ph) +endfont +beginfont("EN:Switwch font frame 2") + fsize:=(40mm,12mm); + fmargin:=(5mm,2mm); + sw_fframe:=2; + MC(<30,Ph) +endfont +beginfont("EN:Switwch font frame 3") + fsize:=(40mm,12mm); + fmargin:=(5mm,2mm); + sw_fframe:=3; + MC(<30,Ph) +endfont +%*********************************************************************** +beginfont("EN:Switwch molecular frame") + sw_fframe:=1; + fsize:=(40mm,15mm); + msize:=(1,1); + sw_mframe:=1; + MC(<30,Ph) +endfont +%*********************************************************************** +beginfont("EN:Switwch atom frame") + fsize:=(60mm,15mm); + sw_aframe:=1; + MC(<30,COOH,!0,COOH) +endfont +%*********************************************************************** +beginfont("EN:Local setting 1") + fsize:=(15mm,12mm); + MC(Ph) +endfont +beginfont("EN:Local setting 2") + fsize:=(15mm,12mm); + ratio_thickness_bond:=0.05; + MC(Ph) +endfont +beginfont("EN:Local setting 3") + fsize:=(15mm,12mm); + MC(Ph) +endfont +%*********************************************************************** +save_ratio:=ratio_thickness_bond; +beginfont("EN:Local setting 1") + fsize:=(15mm,12mm); + MC(Ph) +endfont +ratio_thickness_bond:=0.05; +beginfont("EN:Local setting 2") + fsize:=(15mm,12mm); + MC(Ph) +endfont +beginfont("EN:Local setting 3") + fsize:=(15mm,12mm); + MC(Ph) +endfont +ratio_thickness_bond:=save_ratio; +%*********************************************************************** +beginfont("EN:MC() ") + fmargin:=(0.5mm,0.5mm); + fsize:=(40mm,15mm); + sw_fframe:=1; + sw_mframe:=1; + MC(<30,Ph,4:/Cl,3:/F) +endfont +%----------------------------------------------------------------------- +beginfont("EN:MCat()") + defaultsize:=5bp; + fsize:=(75mm,75mm); + fmargin:=(3mm,3mm); + blength:=0.07; + sw_fframe:=1; + mangle:=0; + for i=1 step -0.25 until 0: + for j=0 step 0.25 until 1: + MCat(j,i)(Ph,4:N) + add( + drawarrow((A1+A1up**aw)..A1); + label(decimal(mangle),p0+(0.5w,0.5h)); + ) + mangle:=mangle+15; + endfor + endfor +endfont +%*********************************************************************** +beginfont("EN:add()") + fsize:=(70mm,20mm); + msize:=(1,0.85); MCat(0,0)(<30,Ph,3=dl,4:/NH2) + add(labeloffset:=.7aw; + label.top(lonepair 90,A7); + drawarrow (A7+up**1.2aw){A7left}..{B7right}B7/*0.3; + drawarrow B3m..A3+B2up**1.5aw..{A3down}A3; + ) + MCat(1,0)(<30,?6,{1,5}=dl,4://NH2) + add(labeloffset:=.7aw; + label.top(plus,A7); + label.urt(minus,A3); + label(lonepair A3ang,A3+A3up**.7aw); + ) + ext(drawdblarrow (0.4w,0.4h)..(0.55w,0.4h);) +endfont +%*********************************************************************** +beginfont("EN:ext()") + fsize:=(70mm,30mm); + blength:=0.065; + sw_label_emu:=1; + % + MCat(0.1,0.5)(<-210,60`1,60`1,60`1,{1,3}=dl,1:/R1,4:/R2^-60) + add( + defaultscale:=0.6; + label.bot("Diene",p0+(0.5w,0)); + ) + MCat(0.4,0.5)(<-30,-60`1,1=dl,1:/R3,2:/R4^60) + add( + defaultscale:=0.6; + label.bot("Dienophile",p0+(0.5w,0)); + ) + MCat(0.9,0.5)(<30,?6,6=dl,2:/R2,3:/R4,4:/R3,5:/R1) + ext( + drawarrow (0.52w,0.5h)..(0.6w,0.5h); + defaultscale:=0.7; + label("+",(0.25w,0.5h)); + ratio_thickness_char:=0.125; + label.bot("Diels-Alder Reaction",(0.5w,h)); + ) +endfont +sw_trimming:=1; +%*************************************************************************** +beginfont("EN:Acetamiprid","MW:222.676") + fsize:=(60mm,18mm); + MC(<30,Ph,2:N,1:/Cl,4:\,!,N,/_,!,/_,!!,N,!,CN) +endfont +%*************************************************************************** +beginfont("EN:Fenitrothion","MW:277.231") + fsize:=(60mm,18mm); + MC(<30,!,O,!,P,//S,/O!^160,!,O,!,|,Ph,3:/_,4:/NO2) +endfont +%*************************************************************************** +beginfont("EN:Permethrin","MW:391.288") + fsize:=(60mm,25mm); + MC(<-30,?3,2^-35:*/_,2^35:/*_,1:\,!!,/Cl,!,Cl, + 3:\,//O,!,O,!2,Ph,-4:\,O,-60,Ph) +endfont +%*************************************************************************** +beginfont("EN:Endosulfan","MW:406.904"); + fsize:=(60mm,25mm); + MC(<26,?7,7=?6[13],11:@,208~wf`1.45,8~wb:#,10=d,{3,5}:O,4:S,4://O, + {8,9,10,11,12^-210,12^-150}:/Cl) +endfont; +%*************************************************************************** +beginfont("EN:Luciferin","MW:280.33") + fsize:=(60mm,20mm); + MC(<30,Ph,3=?5,8:\,?5,{9,16}=dl, + {9,14}:N,{7,11}:S,1:/OH,-2:*/COOH) +endfont +%*************************************************************************** +beginfont("EN:Warfarin","CAS:81-81-2","FM:C19H16O4","MW:308.33") + fsize:=(60mm,25mm); + MC(<30,Ph,3=?6,8=dl,10:O,7:/OH,9://O,8:\,/Ph`1,60,!,//O,!) +endfont +%*************************************************************************** +beginfont("EN:Limonin") + fsize:=(60mm,30mm); + MC(<30,?6,{-3,-4}=?6,-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, + {13,15,17,20}:O,{3,12,21}://O, + {4~wf^60,8~zf^60,18^35,18^-35}:/_,{1^60,5^180,16^60}:/*H, + 14:\*,|,?5,{1,4}=dl,3:O) +endfont +%*************************************************************************** +beginfont("EN:Sesamine") + fsize:=(60mm,25mm); + MC(<54,?5,1=?5,{4,7}:O,{1^-54,2^54}:*/H, + $5:*\^-12,Ph,-3=?5,{-1,-3}:O,8:*\^-12,Ph,-3=?5,{-1,-3}:O) +endfont +%*************************************************************************** +beginfont("EN:Colchicine","CAS:477-27-0","FM:C21H23NO6","MW:385.41") + fsize:=(60mm,25mm); + MC(<30,Ph,{1,2,6}:/O!,|,-4=?7, + |,-5=?7,{-1,-4,-6}=dl,-2://O,-3:/O!, + $9:\,NH,!,//O,!) +endfont +%*************************************************************************** +beginfont("EN:Lycorine","CAS:476-28-8","FM:C16H17NO4","MW:287.31") + fsize:=(60mm,25mm); + MC(<30, + Ph,-4=?6,-2=?6,6=?5,(9,12)=?5[3],13=dl,8:N,{15,17}:O, + 9:/*H^180,10:*/H^60,13:*/OH,14:/*OH + ) +endfont +%*********************************************************************** +beginfont("EN:Gibberellin A3","CAS:77-06-5","FM:C19H22O6","MW:346.37"); + fsize:=(60mm,20mm); + MC(<18,?5,3=?7,5=?6[12],8:@,160`1.3,3:#,13=dl,6=wf,8=wb, + 5:@,40~zf`1,O,50,//O^180,14~zb:#, + 2:/COOH,7://_,13:*/OH,8:/*OH,14:*/_,{1,4}:*/H^60) +endfont +%*************************************************************************** +beginfont("EN:Quinine","CAS:130-95-0","FM:C20H24N2O2","MW:324.42") + fsize:=(60mm,25mm); + MC(<30,Ph,3=Ph,7:N,6:/O!, + 10:\,*/OH,/H~zf^-60,!,|,?6,2:N,1:*/H^60,4:*\,!!,2:@,165~zf,60,5~zb:#) +endfont +%*************************************************************************** +beginfont("EN:Atoropin","CAS:51-55-8","FM:C17H23NO3","MW:289.37") + fsize:=(60mm,22mm); + MC(<-30,O,!,//O,!,!,Ph, + $1:@,-120~zb,|,?7,6:*\^190`1.12,N,/_,3~wb:#,$3:*\*,!,OH) +endfont +%*************************************************************************** +beginfont("EN:Rotenone"); + fsize:=(60mm,30mm); + MC(<-60,?5,{-3,-2,-3,-4}=?6,{7,9,-2,-4}=dl,{3,17}=dr, + {2,13,16}=O,10://O,{11^-60,12^60}:*/H,{-2,-3}:/O!,1:*\,/_,!!) +endfont; +%*************************************************************************** +beginfont("EN:Pyrethrin I"); + MC(<30,?3,{3^35~wf,3^-35~zf}:/_,1:*\,!!,iPr, + 2:\*,//O,!,O,-36~zb,|,?5,-2=dl,-1:/_,-3://O,-2:\,!4,{-1,-3}=dl) +endfont; +%*************************************************************************** +beginfont("EN:Validamycin") + fsize:=(60mm,20mm); + MC(<30,?6,{5,6}:/OH,3:/!OH>rl, + $4:\,O,-60,|,?6,2:O,{3,4,5}:/OH,6:/!OH, + $1:\,NH,!,|,?6,2=dl,{4,5,6}:/OH,3:/!OH) +endfont +%*************************************************************************** +beginfont("EN:Paclitaxel","CAS:33069-62-4","FM:C47H51NO14","MW:853.91") + MC(?6,5=dl,3:@,|<,``1,36,45,45,45,45,>|, + $5:#,-4=?6,-4=?4,-1=wb,-3=wf,-1:O,||, + {4^35,4^-35,6}:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, + 1:\,O,!,//O,!,*/OH,!,/Ph,60~wf,NH,-60,//O,60,Ph, + 7:\*,O,-45,//O,60,Ph,11:*\,O,-60,//O,60,12:\*^-15,O,60,//O,-60) +endfont +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +beginfont("EN:Ampicillin","MW:349.405") + fsize:=(60mm,15mm); + MC(<45,?4,-3=?5,2:N,7:S, + {3^45,4^-45}:/*H,1://O^15,5:/*COOH^-18,{6^35,6^-35}:/_, + 4:*\^75,NH,!,//O,!,/*NH2,!,Ph) +endfont +%*************************************************************************** +beginfont("EN:Cholesterol","CAS:57-88-5","FM:C27H46O","MW:386.65") + fsize:=(60mm,15mm); + MC( + <30,?6,{-4,-2}=?6,-4=?5,7=dl, + 1:*/OH,{4,12}:*/_^60,9:*/H^60, + 10:/*H^180,11:/*H^-60,17:/*H^-54, + -1:@,18,/*_,-60,!3,/_,!, + ) +endfont +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +bye +?6,{-4,-2}=?6,-4=?5,7=dl, + 1:*/OH,{4,12}:*/_^60,9:*/H^60, + 10:/*H^180,11:/*H^-60,17:/*H^-54, + -1:@,18,/*_,-60,!3,/_,!, + ) +endfont +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +bye +%%%%% +bye + +bye diff --git a/graphics/mcf2graph/mcf_manual.pdf b/graphics/mcf2graph/mcf_manual.pdf Binary files differnew file mode 100644 index 0000000000..b76b2dc02a --- /dev/null +++ b/graphics/mcf2graph/mcf_manual.pdf diff --git a/graphics/mcf2graph/mcf_manual.tex b/graphics/mcf2graph/mcf_manual.tex new file mode 100644 index 0000000000..71ca0286fd --- /dev/null +++ b/graphics/mcf2graph/mcf_manual.tex @@ -0,0 +1,1667 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Molecular Coding Format manual by Akira Yamaji 2019.07.07 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[a4paper]{article} +%%%%\documentclass[a4paper,twoside]{article} +%%%%\usepackage{graphicx} +\usepackage[pdftex]{graphicx} +%%%%\usepackage{epstopdf} +%%%%\usepackage[dvipdfmx]{graphicx} +\usepackage[pdftex]{hyperref} +%%%%\usepackage[dvipdfmx]{hyperref} +\hypersetup{colorlinks=true,linkcolor=blue} +\topmargin=-18mm +\textheight=254mm +\textwidth=168mm +\oddsidemargin=0mm +%%%%\oddsidemargin=7mm +%%%%\evensidemargin=-7mm +\unitlength=1mm% +\makeatletter +%---------------------------------------------------------------------------- +\newcount \fontnum% +\newcount \tempnum% +\newdimen \htman% +\newdimen \wdman% +\newdimen \htmans% +%---------------------------------------------------------------------------- +\newcount \MCFformat% +\newbox \box@strufont% +\htman=45mm% +\wdman=94mm% +\htmans=42mm% +\fontnum=21% +\tempnum=1% +%---------------------------------------------------------------------------- +\edef\MCFjobname{mcf_man_soc}% +%---------------------------------------------------------------------------- +\MCFformat=-1% use pkfont +%%\MCFformat=0% \includegraphics{jobname-nnn.mps} +%%\MCFformat=1% \includegraphics[width=wd{jobname-nnn.png}} +%%\MCFformat=2% \includegraphics{jobname-nnn.svg} +%%\MCFformat=3% \includegraphics{jobname-nnn.eps} +%---------------------------------------------------------------------------- +\font\@strufont=\MCFjobname\relax% +%---------------------------------------------------------------------------- +\def\MCFgraph{% +\ifnum\MCFformat<0{\hspace{5mm}\@strufont\char\fontnum}% +\else% +\ifnum\MCFformat=0\edef\stru@ext{mps}\fi +\ifnum\MCFformat=1\edef\stru@ext{png}\fi +\ifnum\MCFformat=2\edef\stru@ext{svg}\fi +\ifnum\MCFformat=3\edef\stru@ext{eps}\fi +% +\ifnum\fontnum<100% +\ifnum\fontnum<10\edef\zero@cnt{00}% jobname-00n.ext +\else\edef\zero@cnt{0}\fi% jobname-0nn.ext +\else\edef\zero@cnt{}% jobname-nnn.ext +\fi% +% +\edef\file@name{\MCFjobname-\zero@cnt\the\fontnum.\stru@ext}% +% +\ifnum\MCFformat=1% +\setbox\box@strufont=\hbox{\@strufont\char\fontnum}% +\hspace{5mm}\includegraphics[width=\wd\box@strufont]{\file@name}% +\else% +\hspace{5mm}\includegraphics\file@name% +\fi% +% +\fi% +% +\global\advance\fontnum\@ne\relax% +}% +%--------------------------------------------------------------------------- +\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@cMW{cMW}\def\@cFM{cFM}% +\def\@fst#1:#2;{#1}\def\@sec#1:#2;{#2}% +\def\mol@sel#1{% +\if#1\empty\relax\else% + \edef\@tag{\expandafter\@fst#1;}% + \edef\@var{\expandafter\@sec#1;}% + \ifx\@tag\@F\edef\MOLfile{\@var}\fi% + \ifx\@tag\@C\edef\MOLchar{\@var}\fi% + \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi% + \ifx\@tag\@NO\edef\MOLnum{\@var}\fi + \ifx\@tag\@cMW\edef\CALmw{\@var}\fi + \ifx\@tag\@cFM\edef\CALfm{\@var}\fi +\fi}% +\def\put@char{% + \begin{picture}(84,28)% + \put(0,23){\bf [\MOLnum]\MOLnameE}% + \put(5,18){\small\tt FM:\CALfm{ }MW:\CALmw}% + \put(5,0){\font\@strufont=\MOLfile\relax% + \hbox{\@strufont\char\MOLchar}}% + \end{picture}% +} +%---------------------------------------------------------------------------- +\def\INFO#1{\@for\@temp:=#1\do{\mol@sel\@temp}\put@char}% +%---------------------------------------------------------------------------- +\begin{document} +\title{\Huge\sf Molecular Coding Format manual} +\author{Akira Yamaji} +\date{\today} +\maketitle +\begin{center} Located at http://www.ctan.org/pkg/mcf2graph \end{center} +\begin{center} Suggestion or request mail to: mcf2graph@gmail.com \end{center} +%----------------------------------------------------------------------------- +\thispagestyle{empty} +\vspace{3mm}% +\begin{center} +{\@strufont% +\char1 \raisebox{10mm}{\char2 }\char3 \raisebox{10mm}{\char4}\\ +\char5 \raisebox{10mm}{\char6 }\char7 \raisebox{10mm}{\char8}\\ +\char9 \raisebox{10mm}{\char10}\char11\raisebox{10mm}{\char12}\\ +\char13\raisebox{10mm}{\char14}\char15\raisebox{10mm}{\char16}\\ +\char17\raisebox{10mm}{\char18}\char19\raisebox{10mm}{\char20}\\ +}% +\end{center} +%----------------------------------------------------------------------------- +\twocolumn +\thispagestyle{empty} +\tableofcontents +%----------------------------------------------------------------------------- +\linethickness{0.08mm}% +%---------------------------------------------------------------------------- +\newpage +\section{Introduction} +Molecular Coding Format(MCF) is new linear notation +represent chemical structure diagrams. +This 'Coding' is named from coding(programing) technique +like adressing,grouping,macro,etc. +There are no Meta language commands in MCF. +mcf2graph convert MCF file to graphics file +pk font,PNG,SVG,EPS or MDL MOL file. +%----------------------------------------------------------------------------- +\section{MCF syntax} +\subsection{Make bond} +\subsubsection{Chain} +\begin{verbatim} + real number plus (+): Counterclockwize + real number minus(-): Clockwize + + <10,-30,45,-45,30,-30,60 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + ! : take value 60 or -60 depend on + current angle and enviroment + !6 : !,!,!,!,!,! + + <30,!,!,!,!,!,! + <30,!6 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Jump and branch bond} +\begin{verbatim} + n:@ : Jump to An + ** An: atom number(-999<=n<=4095) + + <30,!6,3:@,0,!,5:@,-30 +\end{verbatim} +\MCFgraph +%------------------------------------ +\begin{verbatim} + 3:\ : 3:@,0 + + <30,!6,3:\,! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Branch bond} +\begin{verbatim} + 2:\ : 2:@,0 + 4:*\ : 4:@,0~wf + 6:\* : 6:@,0~zf + 8:\\ : 8:@,0~dm + 10:*\* : 10:@,0~wv + + <30,!8, + 2:\,!,4:*\,!,6:\*,!,8:\\,!,10:*\*,! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + <-30,!6, + 2:\~dr,!, : 2:@,0~dr,! + 4:\`1.5,-90, : 4:@,0`1.5,-90 + 6:\^15,-60 : 6:@,0^15,-60 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Connect atom} +\begin{verbatim} + n:# : Connect to An + + <30,!6,3:\,!,5~bd:# +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Ring} +\begin{verbatim} + ?n : n membered ring(3<=n<=20) + ?6 : <-120,60,60,60,60,60,1:# + ?6 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Rotate current angle} +\begin{verbatim} + <angle : rotate current angle + + 0,0,<90,0,<-90,0,0,{1,2,3,4,5}=vf +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Change bond type} +\subsubsection{Double,triple} +\begin{verbatim} + a~type : ~~type,a + dm : double middle + dl : double left side + dr : double right side + db : double left or right side + tm : triple + !! : !~db / !!! : !~tm + + <30,!~dm,!,!~dl,!,!~dr,!~db,!~db,!,!~tm + <30,!~dm,!,!~dl,!,!~dr,!! ,!! ,!,!!! +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + dm dl dr db db tm +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Wedge} +\begin{verbatim} + wf : wedge forward / wb : wedge backward + zf : wedge dotted + zb : wedge dotted backward + + <30,!~wf,!,!~wb,!,!~zf,!,!~zb +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + wf wb zf zb +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Vector} +\begin{verbatim} + vf:vector forward / vb:vector backward + + <30,!~vf,!,!~vb +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + vf vb +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Dotted,wave} +\begin{verbatim} + Bn=bond type : change bond type at Bn + dt : dotted / wv : wave + bd : broad / bz : broad dotted + + <30,!7,1=dt,3=wv,5=bd,7=bz +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + dt wv bd bz +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Change multiple bond type} +\begin{verbatim} + {2,4,6}=dr : 2=dr,4=dr,6=dr + + <30,!7,{2,4,6}=dr +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Over line} +\begin{verbatim} + si_ : single over line + wf_ : wedge forward over line + wb_ : wedge backward over line + bd_ : broad over line + + <-30,!8,!,60,90`8, + {2~si_,4~wf_,6~wb_,8~bd_}:/_`2 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Change bond length} +\subsubsection{Chain length} +\begin{verbatim} + (!,!n)`length : change length of !,!n + + <30,!2,!2`1.2,!2 + + ** !2`1.2 : '`1.2,!2 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} +``length : change all bond length after + + <30,!2,``1.2,!4 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Ring length} +\begin{verbatim} + ?n`length : change ring length + + ?6,4:\,?6`1.2 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Change atom} +\subsubsection{Insert atom} +\begin{verbatim} + Insert hetero atom + + <30,!2,O,!2,N,!2 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Addressed atom} +\begin{verbatim} + 2:O : change A2 C to O + {3,4}:N : change A3,A4 C to N + + <30,!4,2:O,{3,4}:N +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Brock address} +\begin{verbatim} + | : divide brock + + ?6,4:\,|,?6,2:O +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + || : reset brock adress + + ?6,4:\,|,?6,||,2:N +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Absolute address} +\begin{verbatim} + $2:N : change A$2 C to N + ** $n : (1<=n<=3095) + + ?6,4:\,|,?6,$2:N +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Relative address} +\begin{verbatim} + -2:N : change A(-2) C to N + ** -n : (1<=n<=999) + + ?6,4:\,?6,-2:N +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Charged atom} +\begin{verbatim} + N[1]:N+ / O[-1]:O- / A,&"c":A+c + + <-30,!2,N[1],!2,O[-1], + !2,&"-",!2,N,&"+"^180,! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Fuse ring} +\begin{verbatim} + (Attached 1 bond) + + ?6,3=?6 : fuse ?6 at B3 + ** Bn(n:-999<=n<=4095): bond number + + ?6,3=?6 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + ** fused ring size depend on + attached bond length + + ?6,4:\,?6`1.2,5=?6,11=?6 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + ?6,3=?6[13] : fuse ?6[13] at B3 + ?6[13]: 6 membered ring scaled 13/10 + ** ?m[n] (5<=m<=8,11<=n<=15) + + ?6,3=?6[13] +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + ?6,{-3,-4,-4,-2,-2,-4,-4}=?6 + ?6,{4,8,13,20,25,28,33}=?6 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + (Attached 2 bond) + + (4,11)=?6[4] : fuse 4/6 ring to B11..B4 + (4,11)=?5[3] : fuse 3/5 ring to B11..B4 + (4,11)=?4[2] : fuse 2/4 ring to B11..B4 + ** ?m[n] (4<=m<=6,n=m-2) + +1:<30,?6,3=?6,(11,4)=?6[4] +2:<30,?6,3=?6,(11,4)=?5[3] +3:<30,?6,3=?6,(11,4)=?4[2] +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 1 2 3 +\end{verbatim} +%----------------------------------------------------------------------------- +\begin{verbatim} + (Attached 3 bond) + + (16,4)=?6[3] : fuse 3/6 ring to B16..B4 + (16,4)=?5[2] : fuse 2/5 ring to B16..B4 + ** ?m[n] (5<=m<=6,n=m-3) + +1:?6,{3,10}=?6,(16,4)=?6[3] +2:?6,{3,10}=?6,(16,4)=?5[2] +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 1 2 +\end{verbatim} +%----------------------------------------------------------------------------- +%%%%\subsubsection{Attached 4 bond} +\begin{verbatim} + (Attached 4 bond) + + (21,4)=?6[2] : fuse 2/6 ring to B21..B4 + + MC(<-30,?6,{3,10,15}=?6,(21,4)=?6[2]) + + ** ?m[n] (m=6,n=2) +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Spiro ring} +\begin{verbatim} + 4:@,?5 : add ?5 at A4 + + <30,!6,4:@,?5 + + An:@ : jump to An +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Substituent} +\subsubsection{Insert substituent} +\begin{verbatim} + / : single + <30,!,/Me,!,/Et,!3,/Pr,!,/iPr, + !3,/tBu,!,/Ph^-30,! + + ** Me:methyl(/_) Et:ethyl(/!) + Pr:propyl(/!2) iPr:isopropyl + tBu:tertial buthyl Ph:phenyl +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Insert modified substituent} +\begin{verbatim} + // : double (double middle) + */ : wedge forward + /* : wedge dotted forward + */* : wave + ** : direct + + <30,!,//O,!2,/*H,!2,*/H,!2,*/*H,!2,**?3,! +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + // /* */ */* ** +\end{verbatim} +%----------------------------------------------------------------------------- +\begin{verbatim} + ~ : change type + ^ : change angle + ` : change length + > : change enviroment + + <30,``1,!, + /_`2^30,!2,/!2>lr,!2,/!2>rl,!) +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Add substituent} +\begin{verbatim} + <-30,!17,2:/_,4:/!,6:/!2, + 10:/iPr,14:/tBu,16:/Ph^-60 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Add modified substituent} +\begin{verbatim} + ~,^,` : change type,angle,length + + <-30,!6, + {2~wf,4~zf,6^-30}:/_ +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + + ^,`,> : change angle,length,environment + + <30,!7`1, + 3:/_`2^30,5:/!2>lr,7:/!2>rl +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Chain environment} +\subsubsection{Horizontal,vertical} +\begin{verbatim} + >hz : horizontal enviroment (default) + >vt : vertical enviroment + + ?4,{3^-90,3^-30,3^90}:/'(!3,"{hz}")>hz, + {1^-60,1`2,1^60}:/'(!2,"{vt}")>vt +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Left-right,right-left} +\begin{verbatim} + >lr : left-right enviroment + >rl : right-left enviroment + + <30,!6, + {3^-30,3,3^30}:/'(!3,"{lr}")>lr, + {5^-30,5,5^30}:/'(!3,"{rl}")>rl +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Fixed angle,multi angle} +\begin{verbatim} + >45 : fixed angle enviroment + >'(-90,90,-90) : multi angle enviroment + + <-30,!6,2>45:/'(!3,"{45}"), + {6>'(-90,90,-90)}:/'(!3,"{(-90,90,-90)}") +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Miscellaneous} +%----------------------------------------------------------------------------- +\subsubsection{Change atom and Substituent} +\begin{verbatim} + NH,SO,SOO : + inset hetero atom and substituent + simultaneously + + <30,!2,NH,!,SO,!,SOO,! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Change color, atom font} +\begin{verbatim} + 1=green : change color of B1 green + 3:red : change color of A3 red + atomfont:="cmr8" : use cmr8 for atom font + + defaultfont:="cmtt8"; + defaultsize:=8bp; + MCat(0.25,0)(<30,Ph,{2,5}:N,3:/NH2, + 2:red,5:blue,3=green) + add(label.lft("(draw)",p0+(0,0.9h));) + atomfont:="cmr8"; % default:"draw" + MCat(1,0)(<30,Ph,{2,5}:N,3:/NH2) + add(label.lft("(cmr8)",p0+(0,0.9h));) +\end{verbatim} +{\MCFformat=0 \MCFgraph} +%----------------------------------------------------------------------------- +\subsubsection{Make block} +\begin{verbatim} + |< : start brock + >| : end brock + |=n, bond length=n ,=| + + <30,!2,|<,``1.2,!2,>|,!2 + <30,!2,|=1.2,!2,=|,!2 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Chain start multiple characters} +\begin{verbatim} + if chain start multi charactor string, + use !0 instead of ! + + MC(<30,COOH,!0,!3,COOH) +\end{verbatim} +\MCFgraph +\begin{verbatim} + MC(<30,COOH,!4,COOH) +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{User definition} +\begin{verbatim} + user defined substructure + iBuOH:='(!,/_,!,OH) + <30,?6,{4,6}:/iBuOH +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\begin{verbatim} + Insert user defined substructure + <30,!3,/'(!,/_,!,OH),!3 +\end{verbatim} +\MCFgraph +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newpage +\section{Option parameter} +%------------------------------------------------------------------------------ +\subsection{Angle parameter} +\begin{verbatim} + mangle=0 ** default + + MCat(0.2,0.5)(Ph) + mangle:=30; + MCat(0.8,0.5)(Ph) +\end{verbatim} +\MCFgraph +%------------------------------------------------------------------------------ +\subsection{Size/Ratio parameter} +%----------------------------------------------------------------------------- +\subsubsection{Bond length} +\begin{verbatim} + (fit to font size) + blength=0 ** default +\end{verbatim} +\MCFgraph +%----------------------------------------- +\begin{verbatim} + (ratio bond/font width) + blength=0.1 ** (0<blength<=1) + blength=60mm(width)*0.1=6mm +\end{verbatim} +\MCFgraph +%----------------------------------------- +\begin{verbatim} + (bond length) + blength=9mm + ** (blength>1) ignore msize(w,h) +\end{verbatim} +\MCFgraph +%------------------------------------------------------------------------------ +\subsubsection{Molecular size} +\begin{verbatim} + msize=(1,1) ** default +\end{verbatim} +\MCFgraph +%----------------------------------------------------------- +\begin{verbatim} + msize=(0.25,1) + msize=40mm-4mm*0.25=9mm +\end{verbatim} +\MCFgraph +%----------------------------------------------------------- +\begin{verbatim} + msize=(11mm,11mm) +\end{verbatim} +\MCFgraph +%------------------------------------------------------------------------------ +\subsubsection{Molecular position} +\begin{verbatim} + mposition=(0.5,0.5) ** default +\end{verbatim} +\MCFgraph +%-------------------------------------------------------------- +\begin{verbatim} + mposition=(1,0) +\end{verbatim} +\MCFgraph +%-------------------------------------------------------------- +\begin{verbatim} + mposition=(10mm,4mm) +\end{verbatim} +\MCFgraph +%------------------------------------------------------------------------------ +\subsection{Size parameter} +%----------------------------------------------------------------------------- +\subsubsection{Font size} +\begin{verbatim} + fsize=(font width,font height) + ** default: (30mm,20mm) + + fsize=(40mm,15mm) +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Font margin} +\begin{verbatim} + fmargin=(margin left rigth,top bottom) + ** default: (0.4mm,0.4mm) + + fmargin=(10mm,2mm) +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Offset thickness of bond} +\begin{verbatim} + default: offset_thickness=0.2pt +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0pt 0.2pt 0.5pt +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Offset of doublebond gap} +\begin{verbatim} + default: offset_bond_gap=0.3pt +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.0pt 0.3pt 1.0pt +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Offset of atom width} +\begin{verbatim} + default: offset_atom=0.8pt +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.0pt 0.8pt 2.0pt +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Offset of wedge width} +\begin{verbatim} + default: offset_wedge=0.4pt +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.0pt 0.4pt 1.0pt +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Max bond length} +\begin{verbatim} + default: max_blength=10mm +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 6mm 8mm 20mm +\end{verbatim} +%----------------------------------------------------------------------------- +\subsection{Ratio parameter} +%----------------------------------------------------------------------------- +\subsubsection{Thickness/bond length} +\begin{verbatim} + default: ratio_thickness_bond=0.015 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.005 0.015 0.030 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Char/bond thickness} +\begin{verbatim} + default: ratio_char_bond=1.5 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 1.0 1.5 2.0 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Bondgap/bond length} +\begin{verbatim} + default: ratio_bondgap_bond= 0.15 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.10 0.15 0.20 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Atom/bond length} +\begin{verbatim} + default: ratio_atom_bond= 0.36 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.25 0.36 0.46 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Wedge/bond length} +\begin{verbatim} + default: ratio_wedge_bond=0.12 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.10 0.12 0.20 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Font atom gap/atom length} +\begin{verbatim} + default: ratio_atomgap_atom= 0.050 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.0 0.050 0.12 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Chain/ring length} +\begin{verbatim} + default: ratio_chain_ring= 0.66 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.4 0.65 1.0 +\end{verbatim} +%----------------------------------------------------------------------------- +\subsubsection{Zebra gap/bond length} +\begin{verbatim} + default: ratio_zebragap_bond=0.12 +\end{verbatim} +\MCFgraph +\vspace{-3mm}% +\begin{verbatim} + 0.06 0.12 0.20 +\end{verbatim} +%----------------------------------------------------------------------------- +\newpage +%----------------------------------------------------------------------------- +\subsection{Drawing mode} +%----------------------------------------------------------------------------- +\subsubsection{Numbering atom} +\begin{verbatim} + numberA_start:=3; numberA_end:=8; + default: sw_numberA=0 : + numberA_start=1 numberA_end=4095 +\end{verbatim} +\MCFgraph +\begin{picture}(5,20) +\put(0,14){\makebox[5mm]{\tt 1}} +\put(0, 8){\makebox[5mm]{\tt 2}} +\put(0, 2){\makebox[5mm]{\tt 3}} +\end{picture} +%----------------------------------------------------------------------------- +\subsubsection{Numbering bond} +\begin{verbatim} + numberB_start:=3; numberB_end:=8; + default: sw_numberB=0 : + numberB_start=1 numberB_end=4095 +\end{verbatim} +\MCFgraph +\begin{picture}(5,20) +\put(0,14){\makebox[5mm]{\tt 1}} +\put(0, 8){\makebox[5mm]{\tt 2}} +\put(0, 2){\makebox[5mm]{\tt 3}} +\end{picture} +%----------------------------------------------------------------------------- +\subsubsection{Trimming mode} +\begin{verbatim} + sw_trimming:=0; ** default + msize:=(1,0.7); + MCat(0.2,0.3)(Ph) + MCat(0.8,0.7)(Ph) +\end{verbatim} +\MCFgraph +\begin{verbatim} + sw_trimming:=1; + MCat(0.2,0.3)(Ph) + MCat(0.8,0.7)(Ph) +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Expand mode} +\begin{verbatim} +MCat(0, .5)(<30,Ph,4:/COOH,3:/NH2) +sw_expand:=1; +MCat(1, .5)(<30,Ph,4:/COOH,3:/NH2) +** default: sw_expand=0 +\end{verbatim} +\MCFgraph\\ +\makebox[5mm]{}% +\makebox[30mm]{\tt 0 :default}% +\makebox[30mm]{\tt 1}% +%----------------------------------------------------------------------------- +\subsubsection{Substituent off mode} +\begin{verbatim} + ** default: sw_subst_off=0 +\end{verbatim} +\MCFgraph\\ +\makebox[5mm]{}% +\makebox[30mm]{\tt 0 :default}% +\makebox[30mm]{\tt 1}% +%----------------------------------------------------------------------------- +\subsubsection{Single bond mode} +\begin{verbatim} + ** default: sw_single=0 +\end{verbatim} +\MCFgraph\\ +\makebox[5mm]{}% +\makebox[30mm]{\tt 0 :default}% +\makebox[30mm]{\tt 1}% +%----------------------------------------------------------------------------- +\subsection{Frame} +%----------------------------------------------------------------------------- +\subsubsection{Font frame} +\begin{verbatim} + (Draw font frame) + fmargin:=(5mm,2mm); + sw_fframe=1 +\end{verbatim} +\MCFgraph +\begin{verbatim} + (Draw frame inside margin) + sw_fframe=2 +\end{verbatim} +\MCFgraph +\begin{verbatim} + (Draw both frame) + sw_fframe=3 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Molecular frame} +\begin{verbatim} + sw_mframe=1 ** default:sw_mframe=0 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsubsection{Atom frame} +\begin{verbatim} + sw_aframe=1 ** default: sw_aframe=0 + MC(<30,COOH,!0,COOH) +\end{verbatim} +\MCFgraph +\newpage +%----------------------------------------------------------------------------- +\subsection{Local parameter setting} +\begin{verbatim} + beginfont() + MC(Ph) + endfont + beginfont() + %-------------------------- + ratio_thickness_bond:=0.05; + %-------------------------- + MC(Ph) + endfont + beginfont() + MC(Ph) + endfont +\end{verbatim} +\MCFgraph\MCFgraph\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Global parameter setting} +\begin{verbatim} + beginfont() + MC(Ph) + endfont + %-------------------------- + ratio_thickness_bond:=0.05; + %-------------------------- + beginfont() + MC(Ph) + endfont + beginfont() + MC(Ph) + endfont +\end{verbatim} +\MCFgraph\MCFgraph\MCFgraph +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{Function} +%----------------------------------------------------------------------------- +\subsection{Function MC()} +\begin{verbatim} + (Draw molecule) + + msize=(a,b) **default (1,1) + mposition=(c,d) **default (0.5,0.5) + + a: ratio molecular width/font width + b: ratio molecular hight/font hight + c: x axis position + d: y axis position + + beginfont() + MC(<30,Ph,3:/F,4:/Cl) + endfont +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Function MCat()} +\begin{verbatim} + (Draw molecule at mposition) + + MCat(c,d)(....) : + + mposition:=(c,d); + MC(....) + + c: x axis position + d: y axis position + + beginfont() + defaultsize:=5bp; + fsize:=(75mm,75mm); + fmargin:=(3mm,3mm); + blength:=0.07; + sw_fframe:=1; + mangle:=0; + for i=1 step -0.25 until 0: + for j=0 step 0.25 until 1: + MCat(j,i)(Ph,4:N) + add( + drawarrow((A1+A1up**aw)..A1); + label(decimal(mangle), + p0+(0.5w,0.5h)); + ) + mangle:=mangle+15; + endfor + endfor + endfont + +\end{verbatim} +\MCFgraph +%=============================================================================== +\newpage +\subsection{Function add()} +\begin{verbatim} +(Add graphic to molecule) + + w: molecular width + h: molecular height + aw: atom font size + em: label font size + p0: origin of molecular structure + l: bond length + An: atom number + A[m]: atom position + A[m]ang: branch angle of A[m] + A[m]up: dir A[m]ang + A[m]left: dir A[m]ang+90 + A[m]right: dir A[m]ang-90 + A[m]down: dir A[m]ang+180 + Bn: bond number + B[m]: bond(path) + B[m]s: bond start position + B[m]m: bond middle position + B[m]e: bond end position + B[m]ang: bond angle + B[m]up: dir B[m]ang + B[m]left: dir B[m]ang+90 + B[m]right: dir B[m]ang-90 + B[m]down: dir B[m]ang+180 + plus : '+' circled + minus : '-' circled + circlediam = 0.6aw (default) + circlepen = 0.2bp (default) + lonepair r: ':' rotated r + lonepairdiam = 0.3aw (default) + lonepairspace = 0.7aw (default) + ** : scaled + << : rotated + a /* b : point b of a +%---------------------------------------- +beginfont() + fsize:=(60mm,20mm); + msize:=(1,0.85); + MCat(0,0)(<30,Ph,3=dl,4:/NH2) + add( + labeloffset:=.7aw; + label.top(lone_pair 90,A7); + drawarrow (A7+up**1.2aw){A7left} + ..{B7right}B7/*0.3; + drawarrow B3m..A3+B2up**1.5aw + ..{A3down}A3; + ) + MCat(1,0)(<30,?6,{1,5}=dl,4://NH2) + add( + labeloffset:=.7aw; + label.top(plus,A7); + label.urt(minus,A3); + label(lonepair A3ang,A3+A3up**.7aw); + ) + ext(drawdblarrow (.4w,.4h)..(.55w,.4h);) +endfont +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +%%%\newpage +\subsection{Function ext()} +\begin{verbatim} +(Extra graphic to font) + + w: font width + h: font height + w0: font width-2xpart(fmargin) + h0: font height-2ypart(fmargin) + aw: atom font size + em: label font size + p0: fmargin + n: molecular number + p[m]: molecular origin position + w[m]: molecular width + h[m]: molecular height + ratio_thickness_char: + pen thickness / char width + +%======================================== +ext(label(inf_EN,(.5w,0));) => all font +%======================================== +beginfont() + fsize:=(70mm,30mm;); blength:=0.065; + MCat(0.1,0.5) + (<-210,60`1,60`1,60`1,{1,3}=dl, + 1:/R1,4:/R2^-60) + add(defaultscale:=0.6; + label.bot("Diene",p0+(0.5w,0));) + MCat(0.4,0.5) + (<-30,-60`1,1=dl,1:/R3,2:/R4^60) + add(defaultscale:=0.6; + label.bot("Dienophile",p0+(.5w,0));) + MCat(0.9,0.5) + (<30,?6,6=dl,2:/R2,3:/R4,4:/R3,5:/R1) + ext( + drawarrow (.52w,.5h)..(.6w,.5h); + defaultscale:=0.7; + label("+",(0.25w,0.5h)); + ratio_thickness_char:=0.125; + label.bot("Diels-Alder Reaction", + (.5w,h)); + ) + %--------------------------------------- +endfont +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\newpage +\section{MCF example} +%----------------------------------------------------------------------------- +\subsection{Acetamiprid} +\begin{verbatim} + <30,Ph,2:N,1:/Cl, + 4:\,!,N,/_,!,/_,!!,N,!,CN +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Fenitrothion} +\begin{verbatim} + <30,!,O,!,P,//S,/O!^160,!,O,!, + |,Ph,3:/_,4:/NO2 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Permethrin} +\begin{verbatim} + <-30,?3,2^-35:*/_,2^35:/*_, + 1:\,!!,/Cl,!,Cl, + 3:\,//O,!,O,!2,Ph, + -4:\,O,-60,Ph +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Endosulfan} +\begin{verbatim} + <26,?7,7=?6[13],11:@,208~wf`1.45,8~wb:#, + 10=d,{3,5}:O,4:S,4://O, + {8,9,10,11,12^-210,12^-150}:/Cl +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Luciferin} +\begin{verbatim} + <30,Ph,3=?5,8:\,?5,{9,16}=dl, + {9,14}:N,{7,11}:S, + 1:/OH,-2:*/COOH +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Warfarin} +\begin{verbatim} + <30,Ph,3=?6,8=dl, + 10:O,7:/OH,9://O, + 8:\,/Ph`1,60,!,//O,! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Limonin} +\begin{verbatim} + <30,?6,{-3,-4}=?6,-5=?3, + -2=wf,-1=wb,6=?5,-4=?6,-5=wf, + {13,15,17,20}:O,{3,12,21}://O, + {4~wf^60,8~zf^60,18^35,18^-35}:/_, + {1^60,5^180,16^60}:/*H, + 14:\*,|,?5,{1,4}=dl,3:O +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Sesamine} +\begin{verbatim} + <54,?5,1=?5, + {4,7}:O,{1^-54,2^54}:*/H, + 5:*\^-12,Ph,-3=?5,{-1,-3}:O, + 8:*\^-12,Ph,-3=?5,{-1,-3}:O +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Colchicine} +\begin{verbatim} + <30,Ph,{1,2,6}:/O!, + -4=?7,-5=?7, + {-1,-4,-6}=dl,-2://O,-3:/O!, + 9:\,NH,!,//O,! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Lycorine} +\begin{verbatim} + <30,Ph, + -4=?6,-2=?6,6=?5,(9,12)=?5[3], + 13=dl, + 8:N,{15,17}:O, + 9:/*H^180,10:*/H^60, + 13:*/OH,14:/*OMe +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Gibberellin} +\begin{verbatim} + <18,?5,3=?7,5=?6[12], + 8:@,160`1.3,3:#, + 13=dl,6=wf,8=wb, + 5:@,40~zf`1,O,60,//O^180,14~zb:#, + 2:/COOH,7://_,13:*/OH,8:/*OH, + 14:*/_,{1,4}:*/H^60 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Quinine} +\begin{verbatim} + <30,Ph,3=Ph,7:N,6:/O!, + 10:\,*/OH,/H~zf^-60,!, + |,?6,2:N,1:*/H^60, + 4:*\,!!, + 2:@,165~zf,60,5~zb:# +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Atoropin} +\begin{verbatim} + <-30,O,!,//O,!,!,Ph, + $1:@,-120~zb, + |,?7,6:*\^190`1.02,N,/_,3~wb:#, + $3:*\*,!,OH +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Rotenone} +\begin{verbatim} + <-60,?5,{-3,-2,-3,-4}=?6, + {7,9,-2,-4}=dl,{3,17}=dr, + {2,13,16}:O,10://O,{11^-60,12^60}:*/H, + {-2,-3}:/O!,1:*\,/_,!! +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Pyrethrin I} +\begin{verbatim} + <30,?3,{3^35~wf,3^-35~zf}:/_, + 1:*\,!!,iPr,2:\*,//O,!,O,-36~zb,|, + ?5,-2=d,-1:/_,-3://O,-2\,!4,{-1,-3}=dl +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Validamycin} +\begin{verbatim} + <30,?6,{5,6}:/OH,3:/!OH>rl, + $4:\,O,-60,|,?6,2:O,{3,4,5}:/OH,6:/!OH, + $1:\,NH,!,|,?6,2=dl,{4,5,6}:/OH,3:/!OH +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\subsection{Paclitaxel} +\begin{verbatim} + ?6,5=d,3:@,|<=1,36,45,45,45,45,>|,$5:#, + -4=?6,-4=?4,-1=wb,-3=wf,-1:O,||, + {4^35,4^-35,6}:/_,{3^-60,15}:*/OH, + 8:/*H^-60,9:*/_^60,10://O, + 1:\,O,!,//O,!,*/OH,!,/Ph, + 60~wf,NH,-60,//O,60,Ph, + 7:\*,O,-45,//O,60,Ph,11:*\,O,-60,//O,60, + 12:\*^-15,O,60,//O,-60 +\end{verbatim} +\MCFgraph +%----------------------------------------------------------------------------- +\onecolumn +\section{Example to use mcf2graph} +\subsection{Molecular definition file} +\begin{verbatim} +%------------------------------------------------------------------------- +input mcf2graph.mf; % input macro +%------------------------------------------------------------------------- +sw_aux_out:=1; % aux(information) file output on > Gloval setting +fsize:=(60mm,40mm); % (font width,font height) > +var3:="cal_MW"; tag3:="cMW"; > AUX file table +var4:="cal_FM"; tag4:="cFM"; > +%%%% sw_rep_out:=1; > Report output +%%%% sw_mol_out:=1; > MOL file output +outputformat:="png"; hppp:=vppp:=0.1; > PNG output +outputtemplate:="%j-%3c.png"; > +%------------------------------------------------------------------------- +beginfont("NO:1","EN:Ampicillin") > begin font(information) + MC(<45,?4,2:N,2=?5,-1:S, > begin MCF (1) + {3^45,4^-45}:/*H,1://O^15,5:/*COOH^-18, > + {6^35,6^-35}:/_, > + 4:@,75,NH,!,//O,!,/*NH,!,Ph) > end MCF +endfont > end font +%------------------------------------------------------------------------ +beginfont("NO:2","EN:Cholesterol") > begin font(information) + MC(<30,?6,{-4,-2}=?6,-4=?5,7=dl, > begin MCF (2) + 1:*/OH,{4,12}:*/_^60,9:*/H^60, > + 10:/*H^180,{11,-1}:/*H^-60, > + -1:@,17,/*_,!4,/_,!) > end MCF +endfont > end font +%------------------------------------------------------------------------ +beginfont("NO:3","EN:Limonin") > begin font(information) + MC(<30,?6,{-3,-4}=?6, > begin MCF (3) + -5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, > + {13,15,17,20}:O,{3,12,21}://O, > + {4~wf^60,8~zf^60,18^35,18^-35}:/_, > + {1^60,5^180,16^60}:/*H, > + 14:\*,|,?5,{1,4}=dl,3:O) > end MCF +endfont > end font +%------------------------------------------------------------------------ +beginfont("NO:4","EN:beta-carotene) > begin font(information) + MC(<30,?6,3=dl,{3,5^35,5^-35}:/_, > begin MCF (4) + 4:\,|,!18,{1,3,5,7,9,11,13,15,17}=dr, > + {3,7,12,16}:/_, > + |,?6,6=dl,{6,2^35,2^-35}:/_) > end MCF +endfont > end font +%------------------------------------------------------------------------ +beginfont("NO:5","EN:Gibberellin A3"); > begin font(information) + MC(<18,?5,3=?7,5=?6[12], > begin MCF (5) + 8:@,160`1.3,3:#,13=dl,6=wf,8=wb, > + 5:@,40~zf`1,O,60,//O^180,14~zb:#, > + 2:/COOH,7://_,13:*/OH,8:/*OH, > + 14:*/_,{1^60,4^60}:*/H) > end MCF +endfont; > end font +%------------------------------------------------------------------------ +bye +\end{verbatim} +%------------------------------------------------------------------------ +\noindent% +\newpage +\subsection{Information auxfile output} +\paragraph{(Insert option parameter setting)} +\begin{verbatim} + sw_aux_out:=1; + ** default : sw_aux_out=0 +\end{verbatim} +\paragraph{(Command line)} +\begin{verbatim} + >mpost -s ahlength=1 FILENAME +\end{verbatim} +\paragraph{(Sourse)} +\begin{verbatim} +beginfont("EN:Ampicillin")(....) +beginfont("EN:Cholesterol")(....) +beginfont("EN:Limonin")(....) +beginfont("EN:beta-Carotene")(....) +beginfont("EN:Gibberellin A3")(....) +\end{verbatim} +\paragraph{(Setting)} +\begin{verbatim} +tag1:="F"; var1:="jobname"; * default output +tag2:="C"; var2:="char_num"; * default output +tag3:="cMW"; var3:="calc_weight"; +tag4:="cFM"; var4:="calc_formula"; +\end{verbatim} +\paragraph{(Output)} +\begin{verbatim} +(sw_auxfix=0) +F:mcf_man_soc;C:1;cMW:349.40462;cFM:C16H19N3O4S;EN:Ampicillin +F:mcf_man_soc;C:2;cMW:386.6532;cFM:C27H46O;EN:Cholesterol +F:mcf_exa_soc;C:3;cMW:470.5113;cFM:C26H30O8;EN:Limonin +F:mcf_exa_soc;C:4;cMW:536.8722;cFM:C40H56;EN:beta-Carotene +F:mcf_exa_soc;C:5;cMW:346.3742;cFM:C19H22O6;EN:Gibberellin A3 + +(sw_auxfix=1) +F;C;cMW;cFM;EN +mcf_man_soc;1;349.40462;C16H19N3O4S;Ampicillin +mcf_man_soc;2;386.6532;C27H46O;Cholesterol +mcf_exa_soc;3;470.5113;C26H30O8;Limonin +mcf_exa_soc;4;536.8722;C40H56;beta-Carotene +mcf_exa_soc;5;346.3742;C19H22O6;Gibberellin A3 + +(aux_delimiter:="/";) +F:mcf_man_soc/C:1/cMW:349.40462/cFM:C16H19N3O4S/EN:Ampicillin +F:mcf_man_soc/C:2/cMW:386.6532/cFM:C27H46O/EN:Cholesterol +F:mcf_exa_soc/C:3/cMW:470.5113/cFM:C26H30O8/EN:Limonin +F:mcf_exa_soc/C:4/cMW:536.8722/cFM:C40H56/EN:beta-Carotene +F:mcf_exa_soc/C:5/cMW:346.3742/cFM:C19H22O6/EN:Gibberellin A3 +\end{verbatim} +\paragraph{(Tag)} +\begin{verbatim} +F : filename +C : char number +NO : serial number +EN : english name +JN : japanese name +FM : formula from literature data +MW : molecular weight from literature data +USE : the use +cMW : molecular weight calculated +cMI : monoisotopic mass calculated +cFM : molecular formula calculated +\end{verbatim} +%------------------------------------------------------------------------ +\newpage +\noindent% +\subsection{Report output} +\paragraph{(Insert option parameter setting)} +\begin{verbatim} + sw_rep_out:=1; + ** default : sw_rep_out=0 +\end{verbatim} +\paragraph{(Command line)} +\begin{verbatim} + >mpost -s ahlength=2 FILENAME +\end{verbatim} +\paragraph{(Output)} +\begin{verbatim} +------------------------------------------------------------------ + Molecular name = Nicotine + Warnings = 0 / Expanded command = 40 + Width * Height = 49.57332 * 41.37605 + Shift width * height = 0 * -9.07253 + Bond length = 12.75589 Atom size = 5.38914 + Atom count= 12 Bond count= 13 Ring count= 2 Hide H count= 14 +------------------------------------------------------------------ +< NO. >( x axis , y axis )< atom >< bond >< hide_H > + A1 ( 0 , 0 ) C 3 1 + A2 ( 0.866 , -0.5 ) N 3 + A3 ( 1.732 , 0 ) C 3 1 + A4 ( 1.732 , 1 ) C 4 + A5 ( 0.866 , 1.5 ) C 3 1 + A6 ( 0 , 1 ) C 3 1 + A7 ( 2.304 , 1.33 ) C 3 1 + A8 ( 3.217 , 0.923 ) N 3 + A9 ( 3.886 , 1.666 ) C 2 2 + A10 ( 3.386 , 2.532 ) C 2 2 + A11 ( 2.408 , 2.325 ) C 2 2 + A12 ( 3.399 , 0.067 ) C 1 3 +------------------------------------------------------------------ +< NO. >< bond (sdt)><angle + ( +- )><length ( pt )> + B1 1 -> 2 ( 2) 330 ( -30) 1 ( 12.76) + B2 2 -> 3 ( 1) 30 ( 30) 1 ( 12.76) + B3 3 -> 4 ( 2) 90 ( 90) 1 ( 12.76) + B4 4 -> 5 ( 1) 150 ( 150) 1 ( 12.76) + B5 5 -> 6 ( 2) 210 ( -150) 1 ( 12.76) + B6 6 -> 1 ( 1) 270 ( -90) 1 ( 12.76) + B7 4 -> 7 ( 1) 30 ( 30) 0.66 ( 8.42) + B8 7 -> 8 ( 1) 336 ( -24) 1 ( 12.76) + B9 8 -> 9 ( 1) 48 ( 48) 1 ( 12.76) + B10 9 -> 10 ( 1) 120 ( 120) 1 ( 12.76) + B11 10 -> 11 ( 1) 192 ( -168) 1 ( 12.76) + B12 11 -> 7 ( 1) 264 ( -96) 1 ( 12.76) + B13 8 -> 12 ( 1) 282 ( -78) 0.66 ( 8.42) +------------------------------------------------------------------ +<atom>( atom wt )[ mi wt ] < cnt > < sum wt >[ sum mi wt ] + C ( 12.0107)[ 12] * 10 = 120.10696[ 120] + H ( 1.00793)[ 1.00783] * 14 = 14.11108[ 14.10959] + N ( 14.0067)[ 14.00307] * 2 = 28.0134[ 28.00613] + Molecular Weight [Mono Isotopic] = 162.2314[ 162.11572] +------------------------------------------------------------------ + Weight Calc: 162.2314 / Input: 162.23 / weight gap= 0.00145 + Fomula Calc: C10H14N2 / Input: +================================================================== +\end{verbatim}% +\newpage +%------------------------------------------------------------------------ +\noindent% +\subsection{MOL file output} +\paragraph{(Insert option parameter setting)} +\begin{verbatim} + sw_mol_out:=1; % MOL(V2000) + sw_mol_out:=2; % MOL(V3000) + ** default : sw_mol_out=0 +\end{verbatim} +\paragraph{(Command line)} +\begin{verbatim} + >mpost -s ahlength=5 -s FILENAME % MOL(V2000) + >mpost -s ahlength=6 -s FILENAME % MOL(V3000) +\end{verbatim} +\paragraph{(Output)} +\begin{verbatim} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + -MCFtoMOL- EN:Caffeine + + 14 15 0 0 0 0 0 0 0 0999 V2000 + 0 0 0 C 0 0 0 0 + 0.86603 -0.5 0 N 0 0 0 0 + 1.73206 0 0 C 0 0 0 0 + 1.73206 1 0 C 0 0 0 0 + 0.86603 1.5 0 C 0 0 0 0 + 0 1 0 N 0 0 0 0 + 2.6831 -0.30902 0 N 0 0 0 0 + 3.27089 0.5 0 C 0 0 0 0 + 2.6831 1.30902 0 N 0 0 0 0 + 0.86603 -1.36383 0 C 0 0 0 0 + -0.76894 1.44394 0 C 0 0 0 0 + -0.76894 -0.44394 0 O 0 0 0 0 + 0.86603 2.36383 0 O 0 0 0 0 + 2.95299 2.1396 0 C 0 0 0 0 + 1 2 1 0 0 0 + 2 3 1 0 0 0 + 3 4 2 0 0 0 + 4 5 1 0 0 0 + 5 6 1 0 0 0 + 6 1 1 0 0 0 + 3 7 1 0 0 0 + 7 8 2 0 0 0 + 8 9 1 0 0 0 + 9 4 1 0 0 0 + 2 10 1 0 0 0 + 6 11 1 0 0 0 + 1 12 2 0 0 0 + 5 13 2 0 0 0 + 9 14 1 0 0 0 +M END +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\end{verbatim}% +%---------------------------------------------------------------------------- +\newpage +\subsection{LuaTeX file example} +%############################################################################ +\begin{verbatim} +%-------------------------------------------------------------------- +\documentclass{article} +\usepackage{luamplib}% +\mplibcodeinherit{enable}% +\mplibverbatim{enable}% +\everymplib{if unknown Ph1: + input mcf2graph.mf; + mp_log_name:="temp-info.aux"; + sw_aux_out:=1; + fi}% +%-------------------------------------------------------------------- +\begin{document} +\noindent% +%-------------------------------------------------------------------- +\begin{mplibcode} + fsize:=(50mm,50mm); + beginfont("NO:2","EN:Limonin","MW:470.51") + MC(<30, + ?6,{-3,-4}=?6, + -5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, + {13,15,17,20}:O,{3,12,21}://O, + {4~wf^60,8~zf^60,18^35,18^-35}:/_, + {1^60,5^180,16^60}:/*H, + 14:\*,|,?5,{1,4}=dl,3:O + ) + endfont +\end{mplibcode}\\ +%-------------------------------------------------------------------- +\begin{mplibcode} + fsize:=(80mm,50mm); + beginfont("NO:3","EN:beta-carotene","MW:536.87") + MC(<30, + ?6,3=dl,{3,5^35,5^-35}:/_, + 4:\,|,!18,{1,3,5,7,9,11,13,15,17}=dr, + {3,7,12,16}:/_, + |,?6,6=dl,{6,2^35,2^-35}:/_ + ) + endfont +\end{mplibcode}\\ +%-------------------------------------------------------------------- +\begin{mplibcode} + fsize:=(50mm,50mm); + beginfont("NO:4","EN:Gibberellin A3","MW:346.37"); + MC(<18,?5,3=?7,5=?6[12], + 8:@,160`1.3,3:#,13=dl,6=wf,8=wb, + 5:@,40~zf`1,O,60,//O^180,14~zb:#, + 2:/COOH,7://_,13:*/OH,8:/*OH, + 14:*/_,{1^60,4^60}:*/H + ) +endfont; +\end{mplibcode}\\ +%-------------------------------------------------------------------- +\end{document} +%-------------------------------------------------------------------- +\end{verbatim}% +%############################################################################ +%------------------------------------------------------------------------ +\newpage +\subsection{LaTeX file example} +%############################################################################ +\begin{verbatim} +%-------------------------------------------------------------------- +\documentclass[a4paper]{article} +\usepackage{graphicx} +\pagestyle{empty} +\makeatletter% +%-------------------------------------------------------------------- +\def\@F{F}\def\@C{C}\def\@EN{EN}\def\@NO{NO}\def\@MW{MW}\def\@FMc{FMc}% +\def\@fst@param#1:#2;{#1}\def\@sec@param#1:#2;{#2}% +\def\mol@sel#1{% +\if#1\empty\relax\else% + \edef\@tag{\expandafter\@fst@param#1;}% + \edef\@var{\expandafter\@sec@param#1;}% + \ifx\@tag\@F\edef\MOLfile{\@var}\fi% + \ifx\@tag\@C\edef\MOLchar{\@var}\fi% + \ifx\@tag\@EN\edef\MOLnameE{\@var}\fi% + \ifx\@tag\@NO\edef\MOLnum{\@var}\fi + \ifx\@tag\@MW\edef\CALmw{\@var}\fi + \ifx\@tag\@FMc\edef\CALfm{\@var}\fi +\fi}% +\def\put@char{% + \begin{picture}(84,42)% + \put(0,38){\bf [\MOLnum]\MOLnameE{ }\small\tt/FM:\CALfm/MW:\CALmw}% + \put(10,0){\font\@strufont=\MOLfile\relax% + \hbox{\@strufont\char\MOLchar}}% + \end{picture}% +\def\INFO#1{\@for\@temp:=#1\do{\mol@sel\@temp}\put@char}% +\makeatother +%-------------------------------------------------------------------- +\begin{document} +\unitlength=1mm% +\INFO{F:mcf_man_soc,C:134,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}% +\INFO{F:mcf_man_soc,C:135,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}% +\end{document} +%-------------------------------------------------------------------- +\end{verbatim}% +%############################################################################ +%------------------------------------------------------------------------ +\INFO{F:mcf_man_soc,C:134,NO:1,cMW:349.40462,cFM:C16H19N3O4S,EN:Ampicillin}% +\INFO{F:mcf_man_soc,C:135,NO:2,cMW:386.6532,cFM:C27H46O,EN:Cholesterol}% +%------------------------------------------------------------------------ +\end{document} diff --git a/graphics/mcf2graph/mcf_mplib_exa.pdf b/graphics/mcf2graph/mcf_mplib_exa.pdf Binary files differnew file mode 100644 index 0000000000..cf946f3f49 --- /dev/null +++ b/graphics/mcf2graph/mcf_mplib_exa.pdf diff --git a/graphics/mcf2graph/mcf_mplib_exa.tex b/graphics/mcf2graph/mcf_mplib_exa.tex new file mode 100644 index 0000000000..b71e80a2f7 --- /dev/null +++ b/graphics/mcf2graph/mcf_mplib_exa.tex @@ -0,0 +1,460 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Example of MCF typest with LuaLaTeX(luamplib) by A.Yamaji 2019.07.07 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% mcf2graph.mf it must be version 4.44 or later +\documentclass{article} +%------------------------------------------------------------------------------ +\usepackage{luamplib}% +\usepackage[T1]{fontenc}% +\usepackage{textcomp}% +\mplibcodeinherit{enable}% +\mplibverbatim{enable}% +\mplibnumbersystem{double}% +\everymplib{% + if unknown Ph1: input mcf2graph.mf; fi + sw_calc:=1; + sw_fframe:=4; + max_blength:=4.5mm; + defaultfont:="uhvr8r"; + defaultsize:=8bp; + defaultscale:=1; +}% +%------------------------------------------------------------------------------ +\pagestyle{empty} +\topmargin=-20mm +\oddsidemargin=0mm +\textwidth=170mm +\textheight=280mm +\unitlength=1mm +%------------------------------------------------------------------------------------ +\begin{document} +\begin{center} + {\Huge\sf MCF example for luamplib(Lua\LaTeX)}\vspace{5mm}\\ + Author : Akira Yamaji \quad Date : \today\\ + Located at : http://www.ctan.org/pkg/mcf2graph\vspace{2mm}\\ +\end{center} +\noindent% +%------------------------------------------------------------------------------------ +{{\tt FM(C) :} molecular formula calculated by mcf2graph\\ +{{\tt MW(C) :} molecular weight calculated by mcf2graph\\ +{{\tt MW(D) :} molecular weight from literature data\vspace{5mm}\\ +\begin{mplibcode} + fsize:=(80mm,40mm); + beginfont("NO:1","EN:Chlorophyll a","MW:893.49") + msize:=(.9,.9); + MCat(0,0.5)(<54, + |=1,?5,{2,5}=dl,4:N,3:\,54~dl,|,?5,{2,4}=dl,5:N, + -2:\,54~dl,|,?5,2=d,5:N,-2:\~dl,54,|,?5,5=d,5:N,-2:\~dl,$5:#, + -1:@,24,/*COO!^15,72,//O,$1:#,=|,||, + {2,9,15,20~zf}:/_,8:/!,14:\,!!, + 4:\`1.45,Mg,17:#,-1:@,11~vb:#,-1:@,23~vb:#, + 21:@,-6~wf,!2,//O,!,O,!2,!!,|,!13,{1,5,9,13}:/_ + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) + endfont +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +|=1,?5,{2,5}=dl,4:N,3:\,54~dl, +|,?5,{2,4}=dl,5:N, +-2:\,54~dl,|,?5,2=d,5:N,-2:\~dl,54, +|,?5,5=d,5:N,-2:\~dl,$5:#, +-1:@,24,/*COO!^15,72,//O,$1:#,=|,||, + {2,9,15,20~zf}:/_,8:/!,14:\,!!, + 4:\`1.45,Mg,17:#,-1:@,11~vb:#, + -1:@,23~vb:#, + 21:@,-6~wf,!2,//O,!,O,!2,!!, +|,!13,{1,5,9,13}:/_ + +\end{verbatim} +\end{minipage} +\vspace{7mm}\\ +%---------------------------------------------------------------------------- +\begin{mplibcode} +fsize:=(80mm,20mm); +beginfont("EN:beta-Carotene","MW:536.888") + msize:=(.65,1); + MCat(.9,.5)( + <30,?6,3=dl,{3,5^35,5^-35}:/_, + 4:\,|,!18,{1,3,5,7,9,11,13,15,17}=dr,{3,7,12,16}:/_, + |,?6,6=dl,{6,2^35,2^-35}:/_ + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) +endfont +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +<30,?6,3=dl,{3,5^35,5^-35}:/_, +4:\,|,!18, +{1,3,5,7,9,11,13,15,17}=dr, +{3,7,12,16}:/_, +|,?6,6=dl,{6,2^35,2^-35}:/_ +\end{verbatim} +\end{minipage} +\vspace{7mm}\\ +%---------------------------------------------------------------------------- +\begin{mplibcode} + fsize:=(80mm,30mm); + beginfont("NO:2","EN:Limonin","MW:470.51") + MCat(0.7,0.5)(<30, + ?6,{-3,-4}=?6,-5=?3,-2=wf,-1=wb,6=?5,-4=?6,-5=wf, + {13,15,17,20}:O,{3,12,21}://O, + {4~wf^60,8~zf^60,18^35,18^-35}:/_,{1^60,5^180,16^60}:/*H, + 14:\*,|,?5,{1,4}=dl,3:O + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) + endfont +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +<30,?6,{-3,-4}=?6,-5=?3, +-2=wf,-1=wb,6=?5,-4=?6,-5=wf, +{13,15,17,20}:O,{3,12,21}://O, +{4~wf^60,8~zf^60,18^35,18^-35}:/_, +{1^60,5^180,16^60}:/*H, +14:\*,|,?5,{1,4}=dl,3:O + +\end{verbatim} +\end{minipage} +\vspace{7mm}\\% +%---------------------------------------------------------------------------- +\begin{mplibcode} +fsize:=(80mm,20mm); +beginfont("NO:4","EN:Gibberellin A3","MW:346.37"); + MCat(0.8,0.5)( + <18,?5,3=?7,5=?6[12],8:@,160`1.3,3:#,13=dl,6=wf,8=wb, + 5:@,40~zf`1,O,60,//O^180,14~zb:#, + 2:/COOH,7://_,13:*/OH,8:/*OH,14:*/_,{1,4}:*/H^60) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) +endfont; +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +<18,?5,3=?7,5=?6[12],8:@,160`1.3,3:#, +13=dl,6=wf,8=wb, +5:@,40~zf`1,O,60,//O^180,14~zb:#, +2:/COOH,7://_,13:*/OH,8:/*OH, +14:*/_,{1,4}:*/H^60) +\end{verbatim} +\end{minipage} +\vspace{7mm}\\ +%---------------------------------------------------------------------------- +\begin{mplibcode} +fsize:=(80mm,25mm); +beginfont("EN:Morphine","MW:285.343") + MCat(0.7,0.5)( + <30,Ph,2=?6,-4=?6,(1,12)=?5[2],-1:O,-1=zb, + 7:@,60~wf`0.75,70~si_`1.3,45,N,/_,9~wb:#, + 15=d,6:/OH,8^180:*/H,12:/*OH + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) +endfont +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +<30,Ph,2=?6,-4=?6,(1,12)=?5[2], +-1:O,-1=zb, +7:@,60~wf`0.75,70~si_`1.3, +45,N,/_,9~wb:#, +15=dl, +6:/OH,8^180:*/H,12:/*OH +\end{verbatim} +\end{minipage} +\vspace{7mm}\\ +%---------------------------------------------------------------------------- +\begin{mplibcode} +fsize:=(80mm,35mm); +beginfont("NO:5","EN:Erythromycin","MW:733.93"); + MCat(0.8,0.5)( + <30,|=1,<-120,60,60,60,-60,60,60,-60,60,60,60,-60,60,60,=|,1:#, + 14:O,13:/*Et,{1,9}://O,{2,10}:*/_,{4,6^-35,8,12^35}:/*_, + {6^35,11,12^-35}:*/OH, + $3:\*,O,30,|,?6`.7,2:O,{3,5^35}:/_,4:/OH,5^-35:/O!, + $5:\*^30`1.7,O,!,|,?6`.7,6:O,5:/_,2:/OH,3:/NMeMe + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) + endfont; +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +<30,|=1,<-120,60,60,60,-60,60, +60,-60,60,60,60,-60,60,60,=|,1:#, +14:O,13:/*Et,{1,9}://O,{2,10}:*/_, +{4,6^-35,8,12^35}:/*_, +{6^35,11,12^-35}:*/OH, +$3:\*,O,30,|,?6`.7,2:O, +{3,5^35}:/_,4:/OH,5^-35:/O!, +$5:\*^30`1.7,O,!,|,?6`.7,6:O, +5:/_,2:/OH,3:/NMeMe +\end{verbatim} +\end{minipage} +\vspace{7mm}\\ +%---------------------------------------------------------------------------- +\begin{mplibcode} +fsize:=(80mm,35mm); +beginfont("EN:Paclitaxel","MW:853.918") + MCat(0.8,0.5)( + ?6,5=d,3:@,|=1,36,45,45,45,45,=|,$5:#,-4=?6,-4=?4,||,-1=wb,-3=wf,-1:O, + {4^35,4^-35,6}:/_,{3^-60,15}:*/OH,8:/*H^-60,9:*/_^60,10://O, + $1:\,O,!,//O,!,*/OH,!,/Ph,60~wf,NH,-60,//O,60,Ph, + $7:\*,O,-45,//O,60,Ph,$11:*\,O,-60,//O,60,$12:\*^-15,O,60,//O,-60 + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) +endfont +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +?6,5=d,3:@,|=1,36,45,45,45,45,=|,$5:#, +-4=?6,-4=?4,||,-1=wb,-3=wf,-1:O, +{4^35,4^-35,6}:/_,{3^-60,15}:*/OH, +8:/*H^-60,9:*/_^60,10://O, +$1:\,O,!,//O,!,*/OH,!,/Ph, +60~wf,NH,-60,//O,60,Ph, +$7:\*,O,-45,//O,60,Ph,$11:*\,O,-60,//O,60, +$12:\*^-15,O,60,//O,-60) +\end{verbatim} +\end{minipage} +\vspace{7mm}\\ +%---------------------------------------------------------------------------- +\noindent +\begin{mplibcode} +fsize:=(80mm,70mm); +beginfont("NO:6","EN:Vancomycin","MW:1449.25"); + MCat(0.9,0)( + <30, + |=1,!12,{1,3,12}=zf,7=wf,/H^-60,60,*/OH,60, + Ph,-4:/Cl,-3:\,O,!,Ph,-4:\,O,!,Ph,-1^15:/Cl,-3:\,/*OH,*/H^-60,$1:#, + $7:@,$26:#,$1:@,120,//O,60,NH,60,/*H,*/COOH^180,-60, + Ph,{-2,-4}:/OH,-1:\,Ph,-5:/OH,-2:@,$4:#,=|, + {3^40,6,9,12}://O,{2,5,8,11}:NH, + {1^180,4^180}:*/H,{7^-60,10^60,14^60}:/*H, + $10:*\^-60,60,//O,!,NH2, + $13:*\,NH,!,//O,!,/!iPr^-35>60,*/H^60,!~zf,NH,!, + $23:\,O,!,|,?6`.7,2:O,3^10:/!OH,{4,5}:/OH, + -1:\,O,!,|,?6`.7,6:O,{3^35,5}:/_,3^-35:/NH2,4:/OH + ) + ext( + label.lrt("("&inf_EN&")",(0,h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,h-13mm)); + ) +endfont; +\end{mplibcode} +\begin{minipage}[b]{85mm} +\begin{verbatim} +<30,|=1,!12,{1,3,12}=zf,7=wf, +/H^-60,60,*/OH,60,Ph,-4:/Cl, +-3:\,O,!,Ph,-4:\,O,!,Ph,-1^15:/Cl, +-3:\,/*OH,*/H^-60,$1:#, +$7:@,$26:#,$1:@,120,//O,60,NH,60, + /*H,*/COOH^180,-60, +Ph,{-2,-4}:/OH,-1:\,Ph,-5:/OH,-2:@,$4:#,=|, +{3^40,6,9,12}://O,{2,5,8,11}:NH, +{1^180,4^180}:*/H, +{7^-60,10^60,14^60}:/*H, +$10:*\^-60,60,//O,!,NH2,$13:*\,NH,!,//O,!, + /!iPr^-35>60,*/H^60 ,!~zf,NH,!, +$23:\,O,!,|,?6`.7,2:O,3^10:/!OH,{4,5}:/OH, +-1:\,O,!,|,?6`.7,6:O, +{3^35,5}:/_,3^-35:/NH2,4:/OH +\end{verbatim} +\end{minipage} +\vspace{10mm}\\% +%---------------------------------------------------------------------------- +\begin{mplibcode} + fsize:=(170mm,70mm); + beginfont("NO:7","EN:Maitotoxin","MW:3425.86") + MC( + <55.8,?6,-4=?7 ,{-4,-3,-3,-3}=?6,-3:\,!3,?6,{-4,-3,-3,-3}=?6,-3:\,?6,-3=?6, + -3:\,!3,60,<-30,?6,-3=?6,-3:@,30,<30,?6,{-3,-3}=?6,-3=?7,{-4,-3,-3}=?6, + -2:\,?6,-3=?6,-3=?7,{-3,-3}=?6,-3=?8,-3=dl,{-5,-3,-3,-3}=?6, + {5,7,15,16,23,24,32,40,41,48,49,58,59,72,73,82,83,90,91,99, + 100,107,113,114,122,123,130,131,140,141,148,149}:O, + {1^60,2,26,28,29,51,54,61,63,68,75^60,78,109}:*/OH, + {11,20,35,45,52,55,65,69,86}:/*OH,{47,57,71}:/*H^60, + {3,8,13,17,21,33,38,42,56,70,84,92,101,106,111,128,138,142,146,150}:/*H^-60, + {4,14,22,34,39,43,81,89,98,102,116,121,125,129,133}:*/H^60, + {6,46,50,53,60,67,74}:*/H^-60, + {9,18,85,93,112,139,143,147}:*/_`1^60, + {80,88,97,115,120,124}:/*_`1^-60,108:*/_`1^-60, + $6:\,|,!11,60~dr,-60,60,OH,2:/*OH,{7,10}:*/OH,{1,3}:*/_,{8~zf,11~dm,12}:/_, + 6:\,O,30,SOO,30,"O{Na}", + $36:@,-45~zf,O,30,SOO,30,"O{Na}", + $150:\,|,!7,{1,2}:/*OH,4:*/_,5:/*_,7=dl + ) + ext( + label.lrt("("&inf_EN&")",(0,.8h)); + defaultscale:=0.8; + label.lrt("FM(C): "&cal_FM,(0,.8h-5mm)); + label.lrt("MW(C): "&cal_MW,(0,.8h-9mm)); + label.lrt("MW(D): "&inf_MW,(0,.8h-13mm)); + ) + endfont +\end{mplibcode} +\begin{verbatim} + <55.8,?6,-4=?7,{-4,-3,-3,-3}=?6, + -3:\,!3,?6,{-4,-3,-3,-3}=?6,-3:\,?6,-3=?6,-3:\,!3,60,<-30,?6,-3=?6, + -3:@,30,<30,?6,{-3,-3}=?6,-3=?7,{-4,-3,-3}=?6, + -2:\,?6,-3=?6,-3=?7,{-3,-3}=?6,-3=?8,-3=dl,{-5,-3,-3,-3}=?6, + {5,7,15,16,23,24,32,40,41,48,49,58,59,72,73,82,83,90,91,99, + 100,107,113,114,122,123,130,131,140,141,148,149}:O, + {1^60,2,26,28,29,51,54,61,63,68,75^60,78,109}:*/OH, + {11,20,35,45,52,55,65,69,86}:/*OH,{47,57,71}:/*H^60, + {3,8,13,17,21,33,38,42,56,70,84,92,101,106,111,128,138,142,146,150}:/*H^-60, + {4,14,22,34,39,43,81,89,98,102,116,121,125,129,133}:*/H^60, + {6,46,50,53,60,67,74}:*/H^-60,{9,18,85,93,112,139,143,147}:*/_`1^60, + {80,88,97,115,120,124}:/*_`1^-60,108:*/_`1^-60, + $6:\,|,!11,60~dr,-60,60,OH,2:/*OH,{7,10}:*/OH,{1,3}:*/_,{8~zf,11~dm,12}:/_, + 6:\,O,30,SOO,30,"O{Na}", + $36:@,-45~zf,O,30,SOO,30,"O{Na}",$150:\,|,!7,{1,2}:/*OH,4:*/_,5:/*_,7=dl +\end{verbatim} +\vspace{8mm}% +%---------------------------------------------------------------------------- +\newpage +\begin{mplibcode} +beginfont("EN:TCA cycle") +fsize:=(160mm,75mm); +max_blength:=5mm; +%------------------------------------------------------------------------ +MCat(0.33, 1)(<30,O[-1],!0,//O,!,//O,!2,//O,!,O[-1]) +MCat(0.66, 1)(<30,O[-1],!0,//O,!4,//O,!,O[-1],-4`1:\,//O,!,O[-1],4:/OH^-165) +MCat(1, 1)(<30,O[-1],!0,//O,!2,!~dr,!,//O,!,O[-1],-4`1:\,//O,!,O[-1]) +MCat(1, 0.55)(<30,O[-1],!0,//O,!4,//O,!,O[-1],-4:\`1,//O,!,O[-1]) +MCat(1, 0.05)(<30,O[-1],!0,//O,!3,//O,!,//O,!,O[-1],-4:\`1,//O,!,O[-1]) +MCat(0.66,0.05)(<30,O[-1],!0,//O,!3,//O,!,//O,!,O[-1]) +MCat(0.33,0.05)(<30,O[-1],!0,//O,!3,//O,!,"{S-CoA}") +MCat(0, 0.05)(<30,O[-1],!0,//O,!3,//O,!,O[-1]) +MCat(0, 0.55)(<30,O[-1],!0,//O,!,!~dr,!,//O,!,O[-1]) +MCat(0, 1)(<30,O[-1],!0,//O,!3,//O,!,O[-1],3:/OH) +%------------------------------------------------------------------------- +ext( +defaultfont:="uhvr8r"; +defaultscale:=0.75; +ext_setup; +def sel_dir(expr rot)= + save tx; nA:=rot; if nA>=360: nA:=nA-360; fi + if (nA<30)or(nA>330): def tx=top enddef; elseif (nA>=30)and(nA<=150): def tx=lft enddef; + elseif (nA>150)and(nA<210): def tx=bot enddef; elseif (nA>=210)and(nA<=330): def tx=rt enddef; fi +enddef; +def r_arrow(expr a)(expr r)(expr p)(expr sa,la)(expr sb,lb)(expr sc,lc)(expr sd,ld)= + drawarrow ((0,0)..(a,0)) rotated r shifted p; + if sa<>"": draw ((0.5a,0){dir 180}..{dir 90}(0,.5a*la)) rotated r shifted p; + sel_dir(r); label.tx(sa,p+((0,0.5a*la) rotated r)); fi + if sb<>"": draw ((0.5a,0){dir 0}..{dir 90}(a,.5a*lb)) rotated r shifted p; + sel_dir(r); label.tx(sb,p+((a,0.5a*lb) rotated r)); fi + if sc<>"": draw ((0.5a,0){dir 180}..{dir -90}(0,-.5a*lc)) rotated r shifted p; + sel_dir(r+180); label.tx(sc,p+((0,-0.5a*lc) rotated r)); fi + if sd<>"": draw ((0.5a,0){dir 0}..{dir -90}(a,-.5a*ld)) rotated r shifted p; + sel_dir(r+180); label.tx(sd,p+((a,-0.5a*ld) rotated r)); fi +enddef; +%------------------------------------------------------------------------ +save dx; pair dx; dx:=(12mm,0); +label.bot("Oxaloacetate",p1+dx); label.bot("Citrate",p2+dx); +label.bot("cis-Aconitate",p3+dx); label.bot("Isocitrate",p4+dx); +label.bot("Oxalosuccinate",p5+dx); label.bot("alfa-Ketoglutarate",p6+dx); +label.bot("Succinyl-CoA",p7+dx); label.bot("Succinate",p8+dx); +label.bot("Fumarate",p9+dx); label.bot("L-Malate",p10+dx); +sw_label_emu:=1; +ext_setup; +r_arrow(10mm)( 0)(p1+(1.1w1,.3h1))("",0)("",0)("Acetyl-CoA",1.5)(" CoA-SH",1); +r_arrow(10mm)( 0)(p2+(1.1w2,.4h2))("",0)("",0)("",0)("H_2_O",1); +r_arrow( 8mm)(270)(p3+(.5w3,-.4h3))("",0)("",0)("H_2_O",1)("",0); +r_arrow( 8mm)(270)(p4+(.5w4,-.4h4))("",0)("",0)("NAD^+",1)("NADH2^+",1); +r_arrow(10mm)(180)(p5+(-.1w5,.4h5))("",0)("",0)("",0)("CO_2_",1); +r_arrow(10mm)(180)(p6+(-.1w6,.5h6))("",0)("",0)("NAD^+^,CoA-SH",1.7)("NADH2^+^,CO_2",1); +r_arrow(10mm)(180)(p7+(-.1w7,.5h7))("",0)("",0)("GDP,Pi",1.7)("GTP,CoA-SH",1); +r_arrow( 8mm)( 90)(p8+(.4w8,1.2h8))("",0)("",0)("FAD",1)("FADH2",1); +r_arrow( 8mm)( 90)(p9+(.4w9,1.2h9))("",0)("",0)("H_2_O",1)("",0); +r_arrow(10mm)( 0)(p10+(1.1w10,.3h10))("",0)("",0)("NAD^+",1)("NADH2^+",1.5); +defaultscale:=1.5; +label("TCA-cycle",(0.5w,0.5h)); +) +endfont +\end{mplibcode} +\begin{verbatim} +beginfont("EN:TCA cycle") +fsize:=(160mm,75mm); +max_blength:=5mm; +MCat(0.33, 1)(<30,O[-1],!0,//O,!,//O,!2,//O,!,O[-1]) +MCat(0.66, 1)(<30,O[-1],!0,//O,!4,//O,!,O[-1],-4`1:\,//O,!,O[-1],4:/OH^-165) +MCat(1, 1)(<30,O[-1],!0,//O,!2,!~dr,!,//O,!,O[-1],-4`1:\,//O,!,O[-1]) +MCat(1, 0.55)(<30,O[-1],!0,//O,!4,//O,!,O[-1],-4:\`1,//O,!,O[-1]) +MCat(1, 0.05)(<30,O[-1],!0,//O,!3,//O,!,//O,!,O[-1],-4:\`1,//O,!,O[-1]) +MCat(0.66,0.05)(<30,O[-1],!0,//O,!3,//O,!,//O,!,O[-1]) +MCat(0.33,0.05)(<30,O[-1],!0,//O,!3,//O,!,"{S-CoA}") +MCat(0, 0.05)(<30,O[-1],!0,//O,!3,//O,!,O[-1]) +MCat(0, 0.55)(<30,O[-1],!0,//O,!,!~dr,!,//O,!,O[-1]) +MCat(0, 1)(<30,O[-1],!0,//O,!3,//O,!,O[-1],3:/OH) +ext( +defaultfont:="uhvr8r"; +defaultscale:=0.75; +ext_setup; +save dx; pair dx; dx:=(12mm,0); +label.bot("Oxaloacetate",p1+dx); label.bot("Citrate",p2+dx); +label.bot("cis-Aconitate",p3+dx); label.bot("Isocitrate",p4+dx); +label.bot("Oxalosuccinate",p5+dx); label.bot("alfa-Ketoglutarate",p6+dx); +label.bot("Succinyl-CoA",p7+dx); label.bot("Succinate",p8+dx); +label.bot("Fumarate",p9+dx); label.bot("L-Malate",p10+dx); +sw_label_emu:=1; +ext_setup; +r_arrow(10mm)( 0)(p1+(1.1w1,.3h1))("",0)("",0)("Acetyl-CoA",1.5)(" CoA-SH",1); +r_arrow(10mm)( 0)(p2+(1.1w2,.4h2))("",0)("",0)("",0)("H_2_O",1); +r_arrow( 8mm)(270)(p3+(.5w3,-.4h3))("",0)("",0)("H_2_O",1)("",0); +r_arrow( 8mm)(270)(p4+(.5w4,-.4h4))("",0)("",0)("NAD^+",1)("NADH2^+",1); +r_arrow(10mm)(180)(p5+(-.1w5,.4h5))("",0)("",0)("",0)("CO_2_",1); +r_arrow(10mm)(180)(p6+(-.1w6,.5h6))("",0)("",0)("NAD^+^,CoA-SH",1.7)("NADH2^+^,CO_2",1); +r_arrow(10mm)(180)(p7+(-.1w7,.5h7))("",0)("",0)("GDP,Pi",1.7)("GTP,CoA-SH",1); +r_arrow( 8mm)( 90)(p8+(.4w8,1.2h8))("",0)("",0)("FAD",1)("FADH2",1); +r_arrow( 8mm)( 90)(p9+(.4w9,1.2h9))("",0)("",0)("H_2_O",1)("",0); +r_arrow(10mm)( 0)(p10+(1.1w10,.3h10))("",0)("",0)("NAD^+",1)("NADH2^+",1.5); +defaultscale:=1.5; +label("TCA-cycle",(0.5w,0.5h)); +) +endfont +\end{verbatim} +%---------------------------------------------------------------------------- +\end{document} |