Micro and Nano Mechanics Group
(Difference between revisions)

Revision as of 14:58, 8 August 2008

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 vidcompress.

Step 3

Get this compression software like Mplayer in Ubuntu. Or other commercial software like Adobe Premiere or Animation Shop. To create an animation in using the Mplayer in Ubuntu, download the execution files vidcompress to the MD++ directory. First setup the permissions to access the vidcompress file.

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

Run the vidcompress execution file.

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

Lastly, run the movie.

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

References

1. MD++
2. Atom Eye