Step 3: Double click on the XPP parrot icon
- a. If you receive a prompt warning that "xpp" was downloaded from the internet and asking "Are you sure you want to open it?", click the "open" button.
- b. If you receive a prompt stating that "'xpp' can't be opened because it is from an unidentified developer", click the "OK" button and follow these additional steps:
- i. Open "System Preferences" from the Finder Applications folder, then click the "Security & Privacy" icon.
- ii. Next to the message stating "xpp" was blocked frm opening, click the "Open Anyway" button, accepting any additional warnings / prompts and then closing the System Preferences window.
- iii. Double-click the XPP parrot icon in the Finder Applications folder to open the program.
- Step 4. To use XPP, Drag and Drop an ODE file (from the ode/ folder, e.g.)
The best way to use XPP is from the command line as this gives you many more options and much more flexibility.
Here is how to do it.
- Click on the XQuartz Icon in your Dock. Then click on the Applications Terminal menu item on the menus. This will bring up a new terminal window. For me, the default font is way way too small, so with your mouse in the window, press the control key and put two fingers on the mouse pad to bring up a little menu to get a bigger font. (I like the Huge font)
- The default for the XTerm is to be in your Home directory. If you did what I said earlier, then you should have the xppmac folder on your Desktop. Navigate to the ode folder by typing:
cd
cd Desktop/xppmac/ode
ls *.ode
The second command just lists all the ODE files. If you are going to use XPP a lot, it is good to maintain different folders with the ODEs and other files like table files and set files all together. This way you can always navigate to them and run XPP from the command line. For now, you can just keep hem here.
- Now just type:
/Applications/xppaut lecar.ode
to fire up the old lecar.ode model in XPP
Customizing defaults
You may want to customize your defaults so that XPP looks the way you want it to when you run it. I generally get rid of some defaults (such as the Bell) and make the fonts bigger so I can see them. This is done by creating a plain text file in your HOME directory called .xpprc
. You can use textedit to create the file (or your favorite editor) but make sure it is plain text and make sure that the .txt
extension is left off. I provide the following example ( example.xpprc
):
@ bell=0,grads=0,dwcolor=ffffee,forecolor=222200
@ bigfont=lucidasanstypewriter-bold-14
@ ps_lw=15,ps_color=1,ps_font=Helvetica,ps_fsize=18
@ nmax=2000,npr=500,ntst=60
@ tutorial=0
This automatically turns the bell off, the fancy menus (grads) off, and the tutorial off. I also change the drawing window color from white to a kind of ivory and the drawing foreground color to a brown. I also use much bigger fonts and change some of the AUTO defaults. Finally I change some of the postscript defaults. You can find out more about these options in the xpp_sum.pdf document.
The only way to change the fonts and the colors of XPP is via the .xpprc
file or through the command line since these are processed before the X11 server starts. Sorry.
Creating your own ODE files
ODE files are just descriptions of what you want to solve. They are plain text files that have the extension .ode
but can have any extension yiu want as XPP ignores it. There are a few rules that are really important to understand:
- XPP is case-insensitive so that
aBc
and ABC
are the same to XPP.
- There should be a space after the "@" symbol in all options statements
- It is generally bad to put spaces between parameter/initial conditions and their values (although this is now OK), so write
iapp=0.1
instead of iapp = 0.1
- Any line beginning with
#
is a comment
- Always end your ODE file with
done
If you do you can write lots of instructions after this that will be ignored by the program but may be useful for the user who reads the ODE file.
- There is a specific order to the way things are evaluated in ODEs.
- Expressions of the form
name=expression
are evaluated first and in the order they are written, so if one expression makes a reference to another, then make sure they are ordered appropriately
- Expressions like
special name=expression
like convolutions etc.
- Differential algebraic expressions
- Calls to C code via the
export
command
- Right hand sides of the ODEs
- Auxilliary quantities
Look at the many examples to see how to construct your own ODE files.
There are many XPP tutorials out there to help you get started
Problems
- You see something like "Illegal Instruction". In this case, you are probably using a version of the OS that is older than 10.7.5. You probably should upgrade to the most recent OS. It is possible for me to make a binary for some older machines, so in this case contact me.
- Error like "Display not found." You may not have X11 up and running. If you do have it up and running, then it is possible that you need to set the correct DISPLAY. Consult your administrator