%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Molecular Coding Format manual by Akira Yamaji 2016.03.24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper]{article} \usepackage[dvipdfmx]{graphicx} %%%%\usepackage[pdftex]{graphicx} %%%%\usepackage{epstopdf} \topmargin=-18mm \textheight=255mm \textwidth=168mm \oddsidemargin=0mm \unitlength=1mm% \makeatletter %---------------------------------------------------------------------------- \newcount \fontnum% \newcount \tempnum% \fontnum=1% \tempnum=1% %---------------------------------------------------------------------------- \font\@strufont=mcf_man_soc\relax% %---------------------------------------------------------------------------- \def\MCFtitle#1{\framebox{\sf No.\the\tempnum}\hspace{2mm}\bf #1} %---------------------------------------------------------------------------- \def\MCFstru{% \rlap{\makebox(72,3.5)[t]{\makebox(68,42.3){\@strufont\char\fontnum}}}% \advance\fontnum\@ne\relax}% \def\MCFstructure{% \makebox(72,3.5)[t]{\frame{\makebox(68,42.3){\@strufont\char\fontnum}}}% \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax}% %-------------------------------------------------------------------- \def\mol@sel#1{% \if#1\empty\relax\else% \edef\@fst{\expandafter\@fst@param#1;}% \edef\@sec{\expandafter\@sec@param#1;}% \ifx\@fst\@F\edef\MOLfile{\@sec}\fi% \ifx\@fst\@C\edef\MOLchar{\@sec}\fi% \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi% \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi \fi}% \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\put@char{% \begin{picture}(120,45)% \put(10,35){\bf [\MOLnum] \MOLnameE}% \put(16,30){\tt MW:\MOLmw}% \put(16,25){\tt FM:\CALfm}% \put(0,0){\font\@strufont=\MOLfile\relax% \hbox{\@strufont\char\MOLchar}}% \end{picture}% } %---------------------------------------------------------------------------- \def\INFO#1{\@tfor\@temp:=#1\do{\mol@sel\@temp}\put@char}% %---------------------------------------------------------------------------- \begin{document} \begin{center} {\LARGE\bf Molecular Coding Format manual}\vspace{3mm}\\ Author : Akira Yamaji \quad Date : \today\\ Located at : http://www.ctan.org/pkg/mcf2graph\vspace{3mm}\\ \begin{minipage}{148mm} \quad 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.mf(metapost/metafont macro) convert MCF file to graphics file pk font,PNG,SVG,EPS or MDL MOL file(V2000). \\ \end{minipage}\\ \end{center} \linethickness{0.08mm}% \noindent% %---------------------------------------------------------------------------- {\bf (Molecular definition file)} \begin{verbatim} %------------------------------------------------------------------------- input mcf2graph.mf; % input macro %------------------------------------------------------------------------- sw_auxout:=1; % aux(information) file output on > Gloval setting sw_numberA:=0; % numbering atom off > sw_numberB:=0; % numbering bond off > sw_expand:=0; % substituent expand mode off > sw_start_vector:=0; % start vector output off > sw_font_frame:=0; % font frame off > font_wd#:=60mm#; % font width > font_ht#:=40mm#; % font height > var3:="calc_weight"; tag3:="MWc"; > AUX file table var4:="calc_formula"; tag4:="FMc"; > outputformat:="png"; hppp:=vppp:=0.1; > PNG output outputtemplate:="%j-%3c.png"; > %------------------------------------------------------------------------- beginfont("NO:1","EN:Chlorophyll a","MW:893.49") % begin font(information) sw_font_frame:=1; % font frame on > font_wd#:=120mm#; % font width set > Local setting font_ht#:=80mm#; % font height set > %----------------------------------------------------------------------- MCf( % begin MCF <54,{,``1,?5,$(2,5)d,4:N,3\,54~dl, % |,?5,$(2,4)d,5:N, % -2\,54~dl,|,?5,2=d,5:N,-2\~dl,54, % |,?5,5=d,5:N,-2\~dl,, % -1*,24,/*COOMe^15,72,//O,,}, % 4\`1.48,Mg,&17,-1*,&11~vb,-1*,&23~vb, % @(2,9,15,20~zf)/Me,8:/Et,14\,!~dr, % 21*,-6~wf,!2,//O,!,O,!2,!~dl, % |,!13,@(1,5,9,13)/Me, % ) % end MCF endfont % end font %------------------------------------------------------------------------ bye \end{verbatim} %---------------------------------------------------------------------------- {\bf (Molecular structure diagram output)}\vspace{3mm}\\ \frame{\makebox(100,44){\@strufont\char0}}\vspace{6mm}\\ %---------------------------------------------------------------------------- \noindent% {\bf (Molecular information output)} \begin{verbatim} \INFO{{F:mcf_man_soc}{C:0}{MWc:893.48962}{FMc:C55H72MgN4O5} {NO:1}{EN:Chlorophyll a}{MW:893.49}}% \end{verbatim} 'filename'-info.aux : for use in \TeX, it takes over filename, char number, molecular information,etc.\\ F:filename C:char number,MWc:molecular weight calculated, FMc:molecular formula calculated\\ NO:serial number, EN:english name, MW:molecular weight from literature data\vspace{5mm}\\ %---------------------------------------------------------------------------- {\bf (LaTeX file example)} %############################################################################ \begin{verbatim} %---------------------------------------------------------------------------- \documentclass[a4paper]{article} \usepackage{graphicx} \pagestyle{empty} \makeatletter% %-------------------------------------------------------------------- \def\mol@sel#1{% \if#1\empty\relax\else% \edef\@fst{\expandafter\@fst@param#1;}% \edef\@sec{\expandafter\@sec@param#1;}% \ifx\@fst\@F\edef\MOLfile{\@sec}\fi% \ifx\@fst\@C\edef\MOLchar{\@sec}\fi% \ifx\@fst\@EN\edef\MOLnameE{\@sec}\fi% \ifx\@fst\@NO\edef\MOLnum{\@sec}\fi \ifx\@fst\@MW\edef\MOLmw{\@sec}\fi \ifx\@fst\@FMc\edef\CALfm{\@sec}\fi \fi}% \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\put@char{% \begin{picture}(120,45)% \put(10,35){\bf [\MOLnum] \MOLnameE}% \put(16,30){\sf MW:\MOLmw}% \put(16,25){\sf FM:\CALfm}% \put(0,0){\font\@strufont=\MOLfile\relax% \hbox{\@strufont\char\MOLchar}}% \end{picture}% } %-------------------------------------------------------------------- \def\INFO#1{\@tfor\@temp:=#1\do{\mol@sel\@temp}\put@char}% \makeatother %-------------------------------------------------------------------- \begin{document} \unitlength=1mm% \INFO{{F:mcf_man_soc}{C:0}{MWc:893.48962}{FMc:C55H72MgN4O5}% {NO:1}{EN:Chlorophyll a}{MW:893.49}}% \end{document} %-------------------------------------------------------------------- \end{verbatim}% %############################################################################ \INFO{{F:mcf_man_soc}{C:0}{MWc:893.48962}{FMc:C55H72MgN4O5}% {NO:1}{EN:Chlorophyll a}{MW:893.49}}% \newpage %---------------------------------------------------------------------------- \noindent \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain(1)} \begin{verbatim} plus(+):anticlockwize,minus(-):clockwize <30,-60,60,-60,60,-60,60 ** bold arrow is default angle and position \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %---------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain(2)} \begin{verbatim} ! : take value(60 or -60) depend on current angle and enviroment <30,!,!,!,!,!,! \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain(3)} \begin{verbatim} !6 : !,!,!,!,!,! <30,!6 ** !n(0<=n<=20) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Jump to atom} \begin{verbatim} 3* : Jump to A3 <30,!6,3*,0,! ** An(-999<=n<=4095): atom number \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Jump to atom and branch bond} \begin{verbatim} 3\ : 3*,0 <30,!6,3\,! \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Connect bond} \begin{verbatim} &5 : Connect to A5 <30,!6,3\,-60,&5 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ring} \begin{verbatim} six membered ring ?6 ** ?6 : <-120,60,60,60,60,60,&1 ** ?n(3<=n<=20) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Rotate current angle} \begin{verbatim} : change type,angle,length,enviroment of substituent MCf(<30,``1, !,/Me~zf`2^30,!,/Me~zf`2^30, !2,*/Pr>lr,!2,*/Pr>rl,!) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Add substituent(1)} \begin{verbatim} sw_numberA:=1; numberA_end:=12; MCf(<30,!11, 2:/Me,3:/Et,6:/Pr,7:/iPr, 10:/tBu,11:/Ph^-30) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Add substituent(2)} \begin{verbatim} ~,^,` : change type,angle,length of substituent MCf(<30,?6, @(3`2^30,3~wf,4~zf,6~wf^-30,6~zf^30)/H) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Add substituent(3)} \begin{verbatim} ~,^,`,> : change type,angle,length, environment of substituent MCF(<30,!7`1, @(2,3)/*Me`2^30,5:*/Pr>lr,7:*/Pr>rl) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain strech direction environment (1)} \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} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain strech direction environment (2)} \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} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain strech direction environment (3)} \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} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Change atom and Substituent} \begin{verbatim} NH,SO,SOO : inset hetero atom and substituent simultaneously <30,!2,NH,!,SO,!,SOO,!3 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Change color} \begin{verbatim} @(5)green : change color of A5 green $(3)red : change color of B3 red <30,Ph,@(2,5)N, 2:red,5:blue,3=green ** METAFONT ignore color command \end{verbatim} \end{minipage} %%%%\MCFstructure % for Metafont \makebox(72,3.5)[t]{\frame{\makebox(68,42.3)% {\includegraphics{mcf_man_soc-031.eps}}}}% for dvipdfmx %%%%{\includegraphics[width=30mm]{mcf_man_soc-031.png}}}}% for pdfLaTeX \advance\fontnum\@ne\relax\advance\tempnum\@ne\relax% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Chain start multiple characters} \begin{verbatim} if chain start multi charactor string, use !0 instead of ! MCd( 1,1)(0 ,0.9)(<30,COOH,!0,!3,COOH) MCd(.8,1)(0.3,0.1)(<30,COOH,!4,COOH) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{User definition} \begin{verbatim} iBuOH : user defined substructure iBuOH:='(!,/Me,!,OH) MCf(<30,?6,@(4,6)/iBuOH) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Inline definition} \begin{verbatim} Insert user defined substructure <30,!3,/'(!,/Me,!,OH),!3 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Font size} \begin{verbatim} beginfont("EN:Caffeine") font_wd#:=30mm#; %<==font width font_ht#:=20mm#; %<==font height sw_font_frame:=1; MCf(<30,?6,-4=?5,$(3,8)dl,@(2,6,7,9)N, @(2,6,9)/Me,@(1,5)//O) endfont \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Max ratio bond/width length} \begin{verbatim} max_bond_width:=0.10; MCd(1,1)( 0, .5)(<30,Ph) max_bond_width:=0.15; %<<== : default MCd(1,1)(.33,.5)(<30,Ph) max_bond_width:=0.25; MCd(1,1)( 1, .5)(<30,Ph) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio thickness/bond length} \begin{verbatim} ratio_thickness_bond:= 0.005; MCd(1,.6)(0, .5)(<30,Ph) ratio_thickness_bond:= 0.015; %<<== MCd(1,.6)(.5,.5)(<30,Ph) ratio_thickness_bond:= 0.030; MCd(1,.6)(1, .5)(<30,Ph) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Offset thickness of bond} \begin{verbatim} beginfont() offset_thickness#:=0pt#; MCd(1,.3)(0, .5)(<30,Ph) endfont beginfont() offset_thickness#:=0.2pt#; %<<== MCd(1,.3)(.5,.5)(<30,Ph) endfont beginfont() offset_thickness#:=0.5pt#; MCd(1,.3)(1, .5)(<30,Ph) endfont \end{verbatim} \end{minipage} \MCFstru\MCFstru\MCFstructure% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio char/bond thickness} \begin{verbatim} ratio_char_bond:=1.0; MCd(1,.6)(0, .5)(<30,?6,5:O,2:NH) ratio_char_bond:=1.5; %<<== MCd(1,.6)(.5,.5)(<30,?6,5:O,2:NH) ratio_char_bond:=2.0; MCd(1,.6)(1, .5)(<30,?6,5:O,2:NH) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio bondgap/bond length} \begin{verbatim} ratio_bondgap_bond:= 0.10; MCd(1,.6)(0, .5)(<30,Ph) ratio_bondgap_bond:= 0.15; %<<== MCd(1,.6)(.5,.5)(<30,Ph) ratio_bondgap_bond:= 0.20; MCd(1,.6)(1, .5)(<30,Ph) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Offset of doublebond gap} \begin{verbatim} beginfont() offset_bond_gap#:=0.0pt#; MCd(1,.3)(0, .5)(<30,Ph) endfont beginfont() offset_bond_gap#:=0.3pt#; %<<== MCd(1,.3)(.5,.5)(<30,Ph) endfont beginfont() offset_bond_gap#:=1.0pt#; MCd(1,.3)(1, .5)(<30,Ph) endfont \end{verbatim} \end{minipage} \MCFstru\MCFstru\MCFstructure% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio atom/bond length} \begin{verbatim} ratio_atom_bond:= 0.25; MCd(1,.6)(0, .5)(<30,?6,@(2,5)O) ratio_atom_bond:= 0.36; %<<== MCd(1,.6)(.5,.5)(<30,?6,@(2,5)O) ratio_atom_bond:= 0.45; MCd(1,.6)(1, .5)(<30,?6,@(2,5)O) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Offset of atom width} \begin{verbatim} beginfont() offset_atom#:=0.0pt#; MCd(1,.3)(0, .5)(<30,Ph,@(2,4,6)N) endfont beginfont() offset_atom#:=0.8pt#; %<<== MCd(1,.3)(.5,.5)(<30,Ph,@(2,4,6)N) endfont beginfont() offset_atom#:=2.0pt#; MCd(1,.3)(1, .5)(<30,Ph,@(2,4,6)N) endfont \end{verbatim} \end{minipage} \MCFstru\MCFstru\MCFstructure% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio wedge/bond length} \begin{verbatim} ratio_wedge_bond:=0.10; MCd(1,.6)(0, .5)(<30,?6,5:*/Me) ratio_wedge_bond:=0.12; %<<== MCd(1,.6)(.5,.5)(<30,?6,5:*/Me) ratio_wedge_bond:=0.20;; MCd(1,.6)(1, .5)(<30,?6,5:*/Me) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Offset of wedge width} \begin{verbatim} beginfont("EN:Offset_wedge") offset_wedge#:=0.0pt#; MCd(1,.3)(0, .5)(<30,?6,5:*/Me) endfont beginfont() offset_wedge#:=0.4pt#; %<<== MCd(1,.3)(.5,.5)(<30,?6,5:*/Me) endfont beginfont() offset_wedge#:=1.0pt#; MCd(1,.3)(1, .5)(<30,?6,5:*/Me) endfont \end{verbatim} \end{minipage} \MCFstru\MCFstru\MCFstructure% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio font atom gap/atom length} \begin{verbatim} ratio_atomgap_atom:=0.0; MCd(1,.6)(0, .5)(<30,?6,@(2,5)O) ratio_atomgap_atom:=0.050; %<<== MCd(1,.6)(.5,.5)(<30,?6,@(2,5)O) ratio_atomgap_atom:=0.12; MCd(1,.6)(1, .5)(<30,?6,@(2,5)O) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio chain/ring length} \begin{verbatim} ratio_chain_ring:= 0.4; MCd(1,.6)(0, .5)(<30,?6,5:/Et) ratio_chain_ring:= 0.66; %<<== MCd(1,.6)(.5,.5)(<30,?6,5:/Et) ratio_chain_ring:= 1.0; MCd(1,.6)(1, .5)(<30,?6,5:/Et) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Ratio zebra gap/bond length} \begin{verbatim} ratio_zebragap_bond:=0.06; MCd(1,.6)(0, .5)(<30,Ph,5:/*Me`1) ratio_zebragap_bond:=0.12; %<<== MCd(1,.6)(.5,.5)(<30,Ph,5:/*Me`1) ratio_zebragap_bond:=0.20; MCd(1,.6)(1, .5)(<30,Ph,5:/*Me`1) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Margin left and right} \begin{verbatim} margin_left_right:=0mm; MCd(1,1)(0.5,0.9)(<30,CH3,!0,!17,CH3) margin_left_right:=0.4mm; %<<== MCd(1,1)(0.5,0.5)(<30,CH3,!0,!17,CH3) margin_left_right:=5mm; MCd(1,1)(0.5,0.1)(<30,CH3,!0,!17,CH3) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Margin top and bottom} \begin{verbatim} margin_top_bottom:=0mm; MCd(1,1)(0.1,0.5)(<30,Ph,2:/OH,5:/NH2) margin_top_bottom:=0.4mm; %<<== MCd(1,1)(0.5,0.5)(<30,Ph,2:/OH,5:/NH2) margin_top_bottom:=5mm; MCd(1,1)(0.9,0.5)(<30,Ph,2:/OH,5:/NH2) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch numbering atom} \begin{verbatim} numberA_start:=3; numberA_end:=8; sw_numberA:=1; MCd(1,1)(.5,.9)(<30,!9) sw_numberA:=2; MCd(1,1)(.5,.5)(<30,!9) sw_numberA:=3; MCd(1,1)(.5,.1)(<30,!9) ** default: numberA_start=1 numberA_end=4095 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch numbering bond} \begin{verbatim} numberB_start:=3; numberB_end:=8; sw_numberB:=1; MCd(1,1)(.5,.9)(<30,!9) sw_numberB:=2; MCd(1,1)(.5,.5)(<30,!9) sw_numberB:=3; MCd(1,1)(.5,.1)(<30,!9) ** default: numberB_start=1 numberB_end=4095 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch substituent off} \begin{verbatim} MCd(1,.6)( 0,0.5)(<30,Ph,4:/Cl,3:/F) sw_subst_off:=1; MCd(1,.6)( 1,0.5)(<30,Ph,4:/Cl,3:/F) ** default: sw_subst_off=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch all bond single} \begin{verbatim} MCd(1,.6)( 0,0.5)(<30,Ph,4:/Cl,3:/F) sw_bond_single:=1; MCd(1,.6)( 1,0.5)(<30,Ph,4:/Cl,3:/F) ** default: sw_bond_single=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch start vector} \begin{verbatim} sw_start_vector:=1; MCf(<30,Ph,4:/Cl,3:/F) ** default: sw_start_vector=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch font frame} \begin{verbatim} sw_font_frame:=1; MCf(<30,Ph,4:/Cl,3:/F) ** default: sw_font_frame=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch molecular frame} \begin{verbatim} MCd(1,.6)(0,0.5)(<30,Ph,4:/Cl,3:/F) sw_mol_frame:=1; MCd(1,.6)(1,0.5)(<30,Ph,4:/Cl,3:/F) ** default: sw_mol_frame=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch atom frame} \begin{verbatim} sw_atom_frame:=1; MCf(<30,Ph,4:/COOH,3:/OH) ** default: sw_atom_frame=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch solid mode} \begin{verbatim} MCd(1,.8)( 0,0.5)(<30,Ph,4:/Cl,3:/F) sw_solid:=1; ratio_bond_width:=0.08; MCd(1,.8)( 1,0.5)(<30,Ph,4:/Cl,3:/F) ** default: sw_solid=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Switch Expand} \begin{verbatim} MCd(1,.6)(0,0.5)(<30,Ph,4:/COOH,3:/NH2) sw_expand:=1; MCd(1,.6)(1,0.5)(<30,Ph,4:/COOH,3:/NH2) ** default: sw_expand=0 \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Function MCd (draw)} \begin{verbatim} MCd(a,b)(c,d)(...) a: ratio molecular width/font width b: ratio molecular hight/font hight c: x axis position d:y axis position MCd(1,0.8)(0.2,0.9)(<30,Ph,2:/OH,5:/NH2) MCd(1,0.8)(0.8,0.1)(<30,Ph,2:/OH,5:/NH2) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Function MCf (fit draw)} \begin{verbatim} MCf(...) : MCd(1,1)(0.5,0.5)(...) sw_font_frame:=1; sw_mol_frame:=1; MCf(<30,Ph,2:/OH,5:/NH2) \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Local setting} \begin{verbatim} beginfont() sw_mol_frame:=1; % <<== Local setting MCd(1,.4)( 0,.5)(Ph) endfont beginfont() MCd(1,.4)(.5,.5)(Ph) endfont beginfont() MCd(1,.4)( 1,.5)(Ph) endfont \end{verbatim} \end{minipage} \MCFstru\MCFstru\MCFstructure% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Global setting} \begin{verbatim} sw_mol_frame:=1; % <<== Global setting beginfont() MCd(1,.4)( 0,.5)(Ph) endfont beginfont() MCd(1,.4)(.5,.5)(Ph) endfont beginfont() MCd(1,.4)( 1,.5)(Ph) endfont \end{verbatim} \end{minipage} \MCFstru\MCFstru\MCFstructure% \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Output molecular information} \begin{verbatim} var3:="calc_weight"; tag3:="MWc"; var4:="calc_formula"; tag4:="FMc"; %% Output to mcf_man_soc-info.aux %% \INFO{{F:mcf_man_soc}{C:82} {MWc:194.19174}{FMc:C8H10N4O2}}% MWc:calculated molecular weight FMc:calculated molecular formula \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Output additional information} \begin{verbatim} beginfont("EN:Caffeine","CAS:58-08-2") MCf(...) endfont %% Output to mcf_man_soc-info.aux %% \INFO{{F:mcf_man_soc}{C:83}{EN:Caffeine} {CAS:58-08-2}}% *F:filename *C:char number EN:molecular name CAS:CAS number *:default output \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(1) Ampicillin} \begin{verbatim} <45,?4,2:N,2=?5,-1:S, @(3^45,4^-45)/*H,1://O^15, 5:/*COOH^-18,@(6^35,6^-35)/Me, 4\^75,NH,!,//O,!,NH,!,Ph \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(2) Cholesterol} \begin{verbatim} <30,?6,$(-4,-2)?6,-4=?5,7=dl, 1:*/OH,@(4,12)*/Me^60,9:*/H^60, 10:/*H^180,@(11,-1)/*H^-60, -1\^17,/*Me,!4,/Me,!, \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(3) alfa-Tocopherol} \begin{verbatim} <30,Ph,3=?6, 7:O,@(1,2,5)/Me,8:/*Me^60,6:/OH, 8\,|,!12,@(4,8)/*Me,12:/Me \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(4) Colchicine} \begin{verbatim} <30,Ph,@(1,2,6)/OMe,|,-4=?7, |,-5=?7,$(-1,-4,-6)dl,-2://O,-3:/OMe, #9\,NH,!,//O,! \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(5) 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:/*OH \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(6) Gibberellin} \begin{verbatim} <12,?6`1.3,3=?5,9=?7,12\^160`1.6,&8, 4\^155~zf`1.2,O,55,//O^180`1,&2~zb, 5=dl,11=wf,13=wb, 7:/COOH,11://Me,1:*/OH,12:/*OH,2:*/Me, @(3^-60,9^60)*/H \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(7) Capsaicin} \begin{verbatim} <30,Ph, 1:/OH,6:/OMe,4\,!,NH,!,//O, |,!8,-3=dr,-1:/Me \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(8) Quinine} \begin{verbatim} <30,Ph,3=Ph,7:N,6:/OMe, 10\,*/OH,/H~zf^-60,!, |,?6,2:N,1:*/H^60, 4*\,!~dr, 2*,165~zf,60,&5~zb \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(9) Atoropin} \begin{verbatim} <-30,O,!,//O,!,!,Ph, #1\~zb^-120, |,?7`1.1,6*\^190`1.25,N,/Me,&3~wb, #3\~wv,!,OH \end{verbatim} \end{minipage} \MCFstructure \vspace{5mm}\\ %----------------------------------------------------------------------------- \begin{minipage}[t][37mm]{90mm} \MCFtitle{Example(10) Paclitaxel} \begin{verbatim} ?6,5=d,3*,{,``1,36,45,45,45,45,},, -4=?6,-4=?4,-1=wb,-3=wf,-1:O,||, @(4^35,4^-35,6)/Me,@(3^-60,15)*/OH, 8:/*H^-60,9:*/Me^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} \MCFstructure %----------------------------------------------------------------------------- \end{document}