******************************************************************************** mcf2graph : Convert Molecular Coding Format to graphics with METAFONT/METAPOST Author : Akira Yamaji version : 3.86 2016-04-02 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(V2000). 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-031.eps No.31 EPS(with color) file of (4) ( 7) mcf_manual.pdf PDF of (4) (used LaTeX,dvipdfmx) ( 8) mcf_example.tex LaTeX example, Make file 'mcf_exa_soc-info.aux' before typeset >mpost -s ahangle=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 LaTeX,dvipdfmx) (11) mcf_mplib_exa.tex luamplib v2.11(LuaLaTeX) example (12) mcf_example.pdf PDF of (11) typeset with LuaTeX(LuaLaTeX) 3. How to use mcf2graph with Metapost ( 1) >mpost -s ahangle=0 FILENAME => output no graphic file. ( 2) >mpost -s ahangle=1 FILENAME => output PNG file. (default:eps) ( 3) >mpost -s ahangle=2 FILENAME => output SVG file. ( 4) >mpost -s ahangle=3 FILENAME => output MDL Molfile(V2000) ( 5) >mpost -s ahlength=1 FILENAME => output first definition only (for test) ( 6) >mpost -s ahlength=2 FILENAME => output checklist. 4. Molecular definition file example %----------------------------------------------------------------------- input mcf2graph.mf; % input main system %-- preamble ----------------------------------------------------------- sw_auxout:=1; % aux(information) file output on > 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 > Gloval setting 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"; > %-- molecular definition ----------------------------------------------- beginfont("EN:Acetamiprid") % molecular 1 sw_font_frame:=1; % > Local setting MCf(<30,Ph,4\,!,NH,!,!~dr,N,!,CN) % MCF endfont % beginfont("EN:Imidacloprid") % molecular 2 sw_start_vector:=1; % > Local setting MCf(<30,Ph,1:N,6:/Cl,3\,!, % MCF |,?5,1:N,3:NH,2\\,!,NO2) % endfont % %----------------------------------------------------------------------- bye 5. 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. %----------------------------------------------------------------------------