NUS

 Chjan C. Lim

Monte Carlo Simulations
and Molecular Dynamics

CZ 3272

Thursdays, 10 a.m. to Noon; laboratory sessions biweekly, alternate Tuesdays 2 p.m. to 4 p.m.

Site under construction; lecture notes, laboratory modules, and additional material to be added.

Lecture notes, sample software, and applets will be provided as course materials. There is no textbook for the course.


Lecture Notes

The ntoes for 18 October are available in LaTeX format or as a DVI file.

The notes for 11 October are available in LaTeX format or as a DVI file.

The notes for 4 October are available in LaTeX format or as a DVI file.

The first project assignment has been handed out.

The notes for 27 September are available in LaTeX format or as a DVI file.

The notes for 20 September are available in LaTeX format or as a DVI file.

The notes for 13 September are available in LaTeX format or as a DVI file.

The notes for 30 August are available in LaTeX format or as a DVI file.

The notes for 23 August are available in LaTeX format or as a DVI file.

The notes for 16 August are available in LaTeX format or as a DVI file.

The notes for 2 August are available in LaTeX format or as a DVI file.

The LaTeX files were prepared in Scientific Workplace and will not compile correctly without certain macros from that program. The DVI file can be viewed on Unix stations after download by entering, for instance: xdvi lect1.dvi

One may also set a web browser to open the DVI file automatically, if it is not already set to do so. To set it, one should go to the web browser's preferences, and look for the panel Applications or Helpers -- the panel where the web browser is told what to do with files it can't show. Open a new type, described as TeX DVI Data, with MIMEType application/x-dvi and suffix dvi. The way to handle this type is to have it run by an application; for Netscape 4.76 on the Digital unix machines, xdvi %s should be the 'application.' Save this type and all should be well.


Laboratory Notes

11 September

The second computer lab assignment is available in DVI format and also as a LaTeX file. The first half of the assignment, on numeric integrators, is due 25 September; the second part is due 9 October.

Those seeking more information on symplectic integrators may wish to consult Symplectic Integration of Hamiltonian Systems, by Channell and Scovel, writing in Nonlinearity 3 (1990) pp. 231 to 259.

21 August

The first laboratory assignment is available as a DVI or as a LaTeX file (again built using Scientific Workplace). It is due by 11 September to Joseph Nebus. Be certain all the directions are read and the questions answered. One may ask for help if any part of the assignment should prove problematic.

Note that this assignment requires the use of Donald E. Knuth's RANARRY pseudorandom number sequence code, in either Fortran or C/C++ format; for this reason Fortran and C/C++ are recommended for the assignment. (It is possible to write the code using Java or Matlab, with external calls to the compiled RANARRAY code, but that is more work than this project requires.)

7 August

The programs and compilers used for the course -- language compilers, programs like Matlab, and the solid state physics package are described, and their locations given. (A plain LaTeX version can also be read.)

An outline on the problem of generating random numbers is provided (as is the plain LaTeX version); it discusses some of the popular methods to generate pseudorandom sequences of numbers.

A review of the FORTRAN 77 language including just enough description to refresh one's mind is available (as is the source in LaTeX). It does not explain all the mysteries of FORTRAN 77, but it will provide enough information to build on.

A similar brief review of the Java language will not in any way harm sales of any Java tutorial book (nor will its LaTeX version), but it is available.

As a demonstration of how essentially the same algorithm can appear in several different languages, a basic particle interaction program -- in which some particles are placed at (pseudo) random, with random charges, and allowed to interact (by an Eulerian integrator) for a few timesteps -- written in Java, in FORTRAN 77, and as a Matlab function can be downloaded and reviewed.

On the face of it, these sample codes provide a compelling argument for Matlab; the code appears dramatically shorter because several shortcuts were used for presenting results -- the program would need considerable rewriting to, for example, print the status only once every few steps; the other codes would need almost none. The FORTRAN 77 code appears longer than its substance is because it contains Donald E. Knuth's RANARRY pseudorandom number sequence code in it; in most real programs this would be a separate library file linked at compilation. The codes are not very good -- first drafts, essentially, as their inadequate internal documentation indicates -- but give some idea of how to compare the languages.

Useful References

Sun maintains a site with full documentation of the Java language. Note that most web browsers, and the tools available at the Computational Sciences building, rely on the 1.1 version of the Java language (specifically, 1.1.8 for the command line tools, and 1.1.4 in Netscape's web browser).

The Fortran Company maintains references and products for FORTRAN 77, Fortran 90, and Fortran 95, including documentation, standard libraries, and scans from the original IBM 704 FORTRAN manual.

The User Interface Hall of Shame forms an extremely good lesson in making sure one's software will be usable; while it is easy to think that a user interface does not matter for one's own programs, a good design will make one's use of the programs much more productive and much less error-prone. Similarly, the lessons in How to Write Unmaintainable Code explain how to develop good coding habits, and why those habits are needed.


Applets

Ising Model

A model based on the classic Ising lattice model can be played with. This model allows one to work with two or three dimensional grids, and to have magnetic moments completely free to move, constrained to one plane, or (as in the original Ising model) constrained to parallel or antiparallel the z axis.


Web Master

Web page designed by Joseph Nebus ( nebusj@rpi.edu ).

Last updated 29 September 2001.

Valid HTML 4.01 | Valid CSS! | Bobby Approved!