Micro and Nano Mechanics Group

Making a simulation using MD++ scripts

To make a simulation movie, follow these three major steps:

Step 1

Make cfg files using the scipt file.  To do so,

add this command to your script file before your iterations. This command will create the cfg files. Savecfgfreq sets the frequency of generating the cfg files.

 savecfg = 1 savecfgfreq = 50 intercfgfile = inter.cfg 
Next, run the script file.  When the script file is run, the cfg files will be created.
Example:  ...MD++$ bin/tersoff_gpp scripts/myscripts/buckyball.script

Check to see if the cfg files were created by going to the runs directory and then to the directory were your your saving your files for the simulation.

Example:  ...MD++$ls runs/buckyball/  (Check that the cfg files were created.)

Note: Before running another simulation make sure that the cfg are removed. Otherwise, you code will refer to this cfg files to create new animation movies.

Example:  ...MD++$ rm runs/buckyball/inter00* (to remove your cfg files type this command)

Step 2

Open the first cfg file in Atom Eye. This file should start inter0001.cfg. Make the necessary changes to your initial frame like change the color of your background, change color of atoms species, etc.

Example:  ...MD++$ Tools/AtomEye/A.i686 runs/buckyball/inter0001.cfg &

Now, press the "y" key to start creating the jpg files. This a frame for each cfg file and put them in directory in the MD++ directory and name it Jpgs. This new directory will be used by a compression program called MEncoder.

Step 3

Get the multimedia player software Mplayer in Ubuntu. This MPlayer comes with MEncoder which will allow compression of the jpg files into a movie. Other commercial software can also be used like Adobe Premiere or Animation Shop. To create an animation in using the Mplayer in Ubuntu, download the script file vidcompress to the MD++ directory. First setup the permissions to access the vidcompress file.

Example:  ...MD++$ chmod 755 vidcompress

Run the vidcompress script file by typing:

Example:  ...MD++$ ./vidcompress

This will compress the jpg files to make the movie and will see the movie in the MD++ directory named AtomEye.mpg. Lastly, open the movie using the MPlayer or another media player that opens mpg files.

Important Note: To make another animation movie, you must remove the src_anim file, rename the Jpgs directory and the movie itself. Otherwise, this will create another animation movie of the jpg files.

Example:  ...MD++$ mplayer AtomEye.mpg

References

1. MD++
2. Atom Eye