Virtual Laboratory for Computational Physics

at Laboratory of Statistical and Computational Physics (LSCP)


Chen Jau-Ann and Hu Chin-Kun

Institute of Physics, Academia Sinica, Taipei, Taiwan

Abstract

In this project, we build a virtual laboratory for Molecular Dynamics (MD) and Monte Carlo (MC) simulations. We integrate the current technology of computer both in hardware and software to provide an interactive, visible, and parallel-computing environment for theoretical model investigation. The virtual laboratory consists of a Beowulf-like computing cluster (PC cluster), serial and parallel programming environment, library for MD simulations, and animation tools for visualization.

Introduction

Computer simulation is a powerful tool for the study of complex systems. As long as a physical model, an evolution algorithm, visualization tools and a computational platform are built, many processes of complex systems can be investigated in a reliable and efficient way. Due to its mighty computational power and realistic animation capability, the traditional trial-and-error investigation process can be speeded up by changing the parameters through the interactive interface and the understanding of the simulated result can be comprehended by computer graphic or animation. The simulation also provides an oppotunity for investigators to look at some processes which are not easy to be observed or too expensive to be really carried out. Its purpose is not to replace experiments, instead it can be used as a guide for a future experimential setup. Furthermore, it also help to provide vital information for theoretical model investigation.

No doubt, there are a lot of excellent commerical and academic packages for interactive, visible molecular dynamics simulations, but we strongly believe that it is better to understand your investigation tools by building it. The free software on the Internet and high-performance personal computer architecture provide us this opportunity.

According to our definition, virtual Laboratory is the use of computer's hardware and software to generate a simulation of an experiment. The basic requirements for a virtual laboratory should contain the following capabilities, visibility, interactivity, and high-performance computing. To achieve these requirements, it is important to know how to utilize and exploit the current computer technology. Thanks to the free software philosophy on the Internet, we can build our virtual laboratory from scratch by combining different sofeware components together which range from operating systems, programming languages, numerical libraries to application programs. The benefit of this approach is that we can modify the source codes of these software components to meet our need if it is necessary.

The virtual laboratory consists of four components: a computational engine, a display window, an instrument panel and a control panel.

Putting these components together, a virtual laboratory can be built for the study of complex systems in an interactive way.

Virtual Laboratory Configuration

Hardware configuration

The hardware platform is a PC cluster with one master node, one NFS and NFS-root server node, and several diskless client nodes. All of these nodes are connected to switch hups by ethernet to achieve the parallel computing capability. The cluster hardware configuration is shown in Figure 1.

Software Configuration

How to Build a Diskless PC-cluster

Software Components of the Virtual Laboratory

See Figure 2 and Figure 3.

Demonstrations of the Virtual Laboratory

We use the following six examples to demonstrate what the virtual laboratory can be used for researchers.

Example 1: Soft-Disk MD Simulation (Figure 4(a)-(d))

The major purpose of this example is used for the demonstration of the combination of different software components to perform an interactive simulation. The display window shows the evolution of the system. The control panel contains six events, "Quit", "Pause", "Expand Volume", "Compress Volume", and "Free Expansion" (Figure 4(a)). Each event can be invoked by mouse clicking and the system will response to the event accordingly. For example, if we click the "Compress Volume" event, we can see from the instrument panel that the pressure of the system is increasing (Figure 4(b), Figure 4(c) ). If we click the "Free Expansion" bottom, the system will undergo the free expansion process (Figure 4(d)). The instrument panel acts like some measurement gauges from which the kinetic energy, pressure, etc, of the system can be obtained.

System Description
Simulation Description

Using mouse-click to generate different events, for example, compression of the system. After the event been sent, we can see from instrument panel and display window that the various physical quantities are changing with simulation time.

We can stop this process at any time by sending freeze event and record the pressure and volume values after the system reaches equilibrium. Repeating the process several time, we can obtain a quasi-static adiabatic P-V diagram in Figure 4(e).

Example 2: N-Body Parallel Simulation (Figure 5(a)-(c))

This simulation is used for the demonstration of parallel computing. With the combination of X window and MPI parallel programming library, we can see the evolution of the system during the simulation.

System Description
Simulation Description

The inital configuration of the particles are arranged in a rectangle shape. There are total 1440 particles. All of them have the same mass except the one in the center which has the mass 1000 times bigger then others. The evolution of the system configurations are shown in (Figure 5(a), Figure 5(b), Figure 5(c)). The simulation time vs number of processor (CPU) is shown in (Figure 5(d)).

PC cluster Network Performance

Performance of Point-to-Point Communication
length(byte) time (sec) Rate (MB/sec)
1024 0.000955 8.578010
2048 0.001703 9.617846
4096 0.003105 10.555001
8192 0.006131 10.689284
16384 0.012167 10.772746

Example 3: Soft-Sphere MD Simulation (Figure 6)

Basically, this example is the same as example 1 except the system is in three dimensional space. We use this example to demonstrate how to combine the simulation program with OpenGL library to generate 3D effects such as depth, shadow, lighting, etc. (Figure 6).

System Description
Simulation Description

This simulation is used for the demonstration of 3D animation.

Example 4: Water Molecule MD Simulation (Figure 7)

This example is the simulation of water molecule using rigid water model (TIP4P). The big sphere represents oxygen atom and the small sphere represents hydrogen atoms. We use this example to demonstrate the importance of visualization.

System Description
Simulation Description

The initial position of each water molecule is arranged in the center of unit cube with randomly assigned orientation. After a while, we can see from the display window (Figure 7), the hydrogen bonds are formed between different water molecule.

Example 5: Polymer Chain MD Simulation (Figure 8(a)-(c))

The purpose of this example is the same as in example 4. Through the real time animation we can see the folding process of a polymer in a soft-sphere solvent (Figure 8(a), Figure 8(b), Figure 8(c)).

System Description

Example 6: q-state Potts Model MC Simulation (Figure 9(a)-(d))

This example demonstrate the first-order phase transition of q=10 Potts model. We can decrease or increase the temperature to see the transition from order states to disorder states of Potts model by clicking the "Increase" or "Decrease" button. (Figure 9(a)-(b), Figure 9(c)-(d)).

System Description

Summary

So far, we've built our own virtul laboratory totally relied on free software. We also demonstrate that it is possible to achieve visibility, interactivity, and high-performance computing capabilities from scratch. The motivation of this project is not try to compete with some excellent commercial or academic MD packages, instead we try to get familiar with our research tools through the building process. We regard this project as an infrastructure for future complex problem studies and we will continue to improve it.