diff options
author | Karl Berry <karl@freefriends.org> | 2015-07-20 22:07:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-07-20 22:07:53 +0000 |
commit | b5403930021ed0f7f3968516d34f2d29606c3d97 (patch) | |
tree | 0dd71be3c29e4e462b440334b406a1edbe597644 /Master/texmf-dist/metapost | |
parent | 4723ab94f415968862007c7c39630d65ea45c64a (diff) |
mcf2graph (20jul15)
git-svn-id: svn://tug.org/texlive/trunk@37906 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r-- | Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf index bd05e6e2a1d..05f69ae860b 100644 --- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf +++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mcf2graph ver 3.50 Copyright (c) 2013,2014,2015 Akira Yamaji +% mcf2graph ver 3.52 Copyright (c) 2013-2015 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, @@ -18,10 +18,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % mcf2graph is METAFONT/METAPOST macro package convert % Molecular Coding Format(MCF) to font/eps/sgv/png/mdl molfile(V2000) -%--------------------------------------------------------------------------------------------- +%---------------------------------------------------------------------------------------------- % Web page of author: http://molecoding.cocolog-nifty.com/blog/ % Suggestion or request mail to: akira.yamaji5@gmail.com -%--------------------------------------------------------------------------------------------- +%---------------------------------------------------------------------------------------------- % Set outputformat to "png" : mpost -s ahangle=1 FILENAME % Set outputformat to "svg" : mpost -s ahangle=2 FILENAME % Set outputformat to MDL Molfile : mpost -s ahangle=3 FILENAME @@ -337,9 +337,12 @@ def proc_atom(expr n)= elseif com=0or_jp_atom: termA; sB[cntB+1]:=getA(par); f_Br:=1; elseif com=_jp_atom_abs: sB[cntB+1]:=par; f_Br:=1; temp_cntB:=cntB; elseif com=_chg_atom: strA[getA(adrT)]:=parMC[par][1]; - elseif com=_chg_len: if par=_ring_len: B_len:=ring_len; - elseif par=0: if B_len<0: B_len:=1; fi else: B_len:=par; fi - elseif com=_get_len: ring_len:=lenB[getB(par)]; + elseif com=_chg_len: if par=_ring_len: B_len:=ring_len; + elseif par=0: + if lenT<>ratio_cr: B_len:=lenT; else: if B_len<0: B_len:=1; fi fi + else: B_len:=par; fi + elseif com=_get_len: if par=0: if B_len=ratio_cr: B_len:=lenT; fi + else: ring_len:=lenB[getB(par)]; fi elseif com=_tmp_len: lenT:=par; elseif com=_set_line: lineB[getB(adrT)]:=par; elseif com=_dl: lineB[getB(par)]:=dl; @@ -516,7 +519,7 @@ enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mc_num:=first_def_number; lr:='(60 for i==1 upto 10:: ,-60,60 endfor); rl:='(-60,lr); -def ring expr n=^^((-180 DIV n)-90),(_chg_len,0) +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; for i=3 upto 20: ??[i]:='({{,ring i,}}); endfor for i=3 upto 20: ?[i]:='({,ring i,}); endfor @@ -524,7 +527,7 @@ Ph:=Ph1:='( ?6,(_dl,-2),(_dl,-4),(_dl,-6)); Ph2:='( ?6,(_dl,-1),(_dl,-3),(_dl,-5 ph:=ph1:='(??6,(_dl,-2),(_dl,-4),(_dl,-6)); ph2:='(??6,(_dl,-1),(_dl,-3),(_dl,-5)); !:='((_mk_bond,_arg_ang)); !0:='(^^180,180); for i=1 upto 20: !![i]:='(! for j==2 upto i::,! endfor); endfor -for i=1 upto 20: ![i]:='({,!![i],}); endfor +for i=1 upto 20: ![i]:='({,(_get_len,0),!![i],}); endfor !!:=!!1; Me:='(); Et:=!; Pr:='(!,!); Bu:='(!,!,!); for i=4,5,6: for j=2 upto i-2: ?[i][j]:='((_fuse,i),(j,1)); endfor endfor for i=4,5,6: for j=2 upto i-2: ??[i][j]:='((_fuse,i),(j,0)); endfor endfor |