MUSIC Tutorial
Compiling MUSIC Programs
Before you can run a simulation you have to create an executable. The following steps are always the same no matter what kind of simulation you want to run. The "drivers" directory contains the main programs for the different types of simulations can be run with music. The "src" directory contains the (uncompiled) subroutines.
Some of the main programs in the drivers directory are:
- music_mapmaker.F90 – used to create a potential map
- music_mapdisplay.F90 – creates an xyz file that displays the layout of your potential map
- music_md.F90 – used to run a molecular dynamics simulation
- music_gcmc.F90 – used to run a grand canonical Monte Carlo simulation
- music_post.F90 – converts the binary files created during the simulation into data files that contain the results.
To create an executable, you have to copy the corresponding driver to the "src" directory:
- > cd home/music/src
- # goes to the subroutines folder
- > cp ../drivers/[needed program].F90 music.F90
- # copies the potential map maker routine and names this copy music.F90 (capital F)
- > ./makemake
- # creates a Makefile that contains a list of the subroutines needed
- > make
- # This is a compiler program which compiles the subroutines and creates music
- > mv music [newfilename]
- # every time you compile a program the music file is over written, so the above line renames it [newfilename] could be something like music_pmap or music_gcmc
Note: once you have compiled the program into your music directory you can just create a shortcut to it from the folders where you are running the simulation. This saves disc space and makes sure that you are using the most recent executable (i.e. you don't have to remember to copy the executable to all your directory if you recompiled the program).
For example, in one of your pmap folders type:
> ln –s ~/music/music_pmap .
This will create a symbolic link in the folder which you can treat as the actual program. (The dot indicates to copy it into the current directory; this can be replaced by a folder path.)