ME346 Introduction to Molecular Simulation

Port MD++ on CygWin

It took me some time to port MD++ on CygWin. Here are some of the procedure you need to pay attention to if you would like to do the same.

Download and Install CygWin

First go to www.cygwin.com to download setup.exe

Run setup.exe. Select Download from Internet button. Select http://mirror.mcs.anl.gov mirror site -- this one is pretty fast for me (at Stanford). In the Select Packages window, click the little circle after “+ALL” and make sure all “Default” turns into “Install” on this window. This will download the complete CygWin package onto your computer.

After download is complete, run setup.exe again. Select Install from Local Directory. This time, leave the options to “Default” on the Select Packages window. This will install a compact version of CygWin on your computer. A CygWin icon will be created onto your desktop.

Run setup.exe for the 3rd time. Select Install from Local Directory. This time, click the little circle after “+ALL” and make sure all “Default” turns into “Install” on the Select Packages window. This will install the full version of CygWin on your computer. (I had problems with installing the full version of CygWin directly – don't know why. Installing a compact version first somehow made it work.)

Run CygWin

Click the CygWin icon on your desktop. In the new terminal, type startx. This will launch the X-server, which we will need to run MD++. A new xterm will also appear. We will do our work in the new xterm. To test whether X is running properly, type

xclock

A new window displaying a clock should pop up.

Compile and Run MD++

In your home directory, make a new directory by

mkdir Codes

Put the MD++ package there (has to be md++-11-20-2004.tar.gz or a newer version). Unpack by

tar zxvf md++-11-20-2004.tar.gz

This will create the Codes/MD++ directory.

cd MD++
make fs SYS=cygwin build=R

This will create the fs_cygwin.exe file in the Codes/MD++/bin directory.

bin/fs_cygwin.exe Examples/example05-mo.script

This will run the example05 in the Examples directory (uniaxial tension of BCC Mo containing a void by conjugate gradient relaxation).

Note: In src/Makefile.base, I used -D_NOLOCK in the cygwin compiler option. This option disables the use of semaphore, which gives us problems when running MD++ under CygWin. This option is only recognized by MD++ version later than (and including)11-20-2004. Disabling semaphore is only a temporary solution. You may notice that the X-display window now flickers more than before. We should be able to make semaphore working under CygWin in the future.

You can download MD++ from coursework.stanford.edu (ME346) or here.