Argon module initial conditions and input data files

Your piece of phase space

The calculation to be carried out is assigned by Username below. Each student is asked to carry out simulations at three values of the reduced temperature, T* at the indicated reduced density, r*.

Your individual assignment is listed here

You should carry out simulations at three or more values of the reduced temperature T*. These values should include a value of 0.6, 1.0, and 1.4. You may wish to try one or two more (e.g. 0.8 and 1.2) to see the trends. Keep in mind that these temperatures span the boiling point of argon at the densities studied.

Organization

 

Create two directories called mc/ and md/ using the commands:

 

Ø     mkdir mc

Ø     mkdir md

 

In this exercise, you will perform three simulations at different temperatures and a single density given to you in the assignment table. Create three sub-directories (one for each simulation) in each of the two directories and copy the corresponding files in each sub-directory:

 

Ø     cd mc

 

Considering each combination of pressure and temperature as a point in phase space and calling those points r1, r2, r3 etc., the directories where each calculation will be carred out will be called, rho1, rho2, rho3 etc. as indicated below.

 

Ø     mkdir rho1

Ø     mkdir rho2

Ø     mkdir rho3

The procedure is the same for the md/ directory

Ø     cd ..     (move up one level)

Ø     cd md

 

Considering each combination of pressure and temperature as a point in phase space and calling those points r1, r2, r3 etc., the directories where each calculation will be carred out will be called, rho1, rho2, rho3 etc. as indicated below.

 

Ø     mkdir rho1

Ø     mkdir rho2

Ø     mkdir rho3

Now you have created identical points in phase space in two parallel directories for different calculational approaches.

Retrieving the argon box coordinate and data files for molecular dynamics

In the md/ directory save the following input files to your computer.

(Right-click your mouse on the 2 links and choose "save link as...")

Coordinate file (rahman_864.car)

Molecular data file (rahman_864.mdf)

You will now have the following two files in your account:

rahman_864.car

rahman_864.mdf

The file rahman_864.car is a coordinate file that also contains information on the size of the box used for periodic boundary conditions. The rahman_864.mdf file contains atoms types, lists of partial charges and connectivities between atoms. In the present case it is quite simple since it is just a repeat of the atom type Ar 864 times.

Modifying the size of the argon box for molecular dynamics (MD)

The box size will need to be changed in order to model the density of interest. The steps you need to follow to modify the rahman_864.car file are as follows.

1.     Compute the volume of the cubic box in Å3 that corresponds to the reduced density, r* that you have been assigned.

2.     Once you have determined the dimensions of the cube you will need to change the dimensions in your *.car file. Use the vi editor.

3.     In vi, use the j command to go down to the line that contains the cube dimensions and the l command to place the cursor at the beginning of the number that must be changed. The cube dimensions in the car file are given in Angstroms. The line of text that needs to be change looks like

PBC 34.7394 34.7394 34.7394 90.0000 90.0000 90.0000 (P 1)

Where PBC refers to periodic boundary conditions, the numbers 34.7394 refer to the sides of the cube in Å and the 90.0000 refer to the angles.

4.     To replace the value there with the value you have calculated use the command 8s. You will the old number disappear. Type in your calculated cube dimension. Once you have typed in your value hit the Esc key. Go to the beginning of next number and type period (.). This command will execute the change that you have just made on the second number in the sequence. You may use the period (.) command as many times as you like until you make a new text replacement. You may also use the 8s command three times to replace the three numbers. Make sure that the length of the new numbers is the same as that of the original ones (8 digits including the decimal place).

5.     To exit and save type :wq. This means write and quit.

You will not need to alter the mdf (molecular data file).

Getting the files in place for MD calculations

You can move these files to the appropriate directory using the copy command.  For example, if the rahman_864.car file is in the md/ directory and you want to move it to rho1/ simply use the command:

Ø     cp rahman_864.car rho1 

 

You will want to begin with identical files in all three directories rho1/, rho2/, and rho3/.  The density (i.e. box size) is the same for all three, however the temperatures will differ.

Modification of the input file for DISCOVER

You can create an input file using InsightII.  Once you have done so the file can be edited using the vi editor.  This is sometimes useful changing the temperature or for adding information on user-defined force fields.

Let’s assume that the temperature in the input file is 132 K as is the case for the sample input file provided for your examination.  To search on the text string 132 use the command

/132

in vi. To replace this value with 156 use 3s. The number 132 will disappear. Once you have finished typing in 156 use the Esc key. Hit n. You will now be at the next place in the file where 132 appears. Hit . (period). You should see the number 156 replace 132. Hit n again. If all of the occurrences of the number 132 have been located and replaced you will get a message "Pattern not found: 132". You have successfully changed the temperature from 132 K to 156 K in the input file. To exit use Esc followed by :wq

Once you have the input, car and mdf files set up as above you are ready to run DISCOVER in standalone mode. This is done using the script run_DISCOVER as discussed in the section on setting batch jobs in the supercomputer queue.

Retrieving the argon box coordinate and input file for Monte Carlo

In the mc/ directory save the following input files to your computer.

(Right-click your mouse on the 2 links and choose "save link as...")

Coordinate file (initial.conf)

inputfile

You will now have two files that can be used to run a Monte Carlo simulation.  The initial.conf file contains the same number of argon atoms and coordinates as the rahman_864.car file above.  The conversion between these files can be accomplished using two programs (MC_to_MD and MD_to_MC).  The inputfile allows you to change in the input temperature and box size in order to obtain the appropriate points in phase space.

Getting the files in place for MC calculations

You can move these files to the appropriate directory using the copy command.  For example, if the initial.conf file is in the mc/ directory and you want to move it to rho1/ simply use the command:

Ø     cp initial.conf rho1

Ø     cp inputfile 

 

You will want to begin with identical files in all three directories rho1/, rho2/, and rho3/.  The density (i.e. box size) is the same for all three, however the temperatures will differ.

 

Using the program NVT_LJ for MC calculations

You will also need the program NVT_LJ which calculates Monte Carlo trajectories at constant number N, volume V and temperature T.  The potential function is a Lennard-Jones potential (LJ).  The program can be downloaded as a fortran90 program. 

NVT_LJ.f90

After downloading the file you can compile it using the following command.

Ø     f90 NVT_LJ.f90 –o NVT_LJ

 

This will make the executable NVT_LJ.  When you type NVT_LJ at the command line it will automatically read the files initial.conf and inputfile in the same directory.  You can leave this program in mc/ and run it from the rho1 subdirectory using the command

 

Ø     ../NVT_LJ 

The output will be the files blkaverages which gives the value of the energy U and pressure P during the calculation and gr which gives the radial distribution function. 

Once you have the input file and initial.conf files set up with the appropriate density and temperature youready to run NVT_LJ. This is done using the script run_NVT_LJ as discussed in the section on setting batch jobs in the supercomputer queue.