There is a python script in the OpenMx package that will convert simple Mx 1.0 scripts into OpenMx scripts. The script is called mxParser.py. It can be found either in the /tools directory (in a binary installation of OpenMx) or in the /inst/tools directory (in a source installation of OpenMx). You will need the python library "ply" to run the script. Use "sudo easy_install ply" to install the ply library on your machine. To use the script from an arbitrary location, modify your $PATH environment variable. Alternatively copy the script to a location in your $PATH (you will need to copy mxAlgebraParser.py as well).
mxParser.py accepts Mx 1.0 scripts on standard input, and returns OpenMx scripts on standard output. If you wish to translate a single Mx Algebra expression, you can run the script mxAlgebraParser.py. Currently mxParser.py recognizes the following commands:
- Begin Algebra/End Algebra blocks
- Begin Matrices/End Matrices blocks
- Start or Value