Sree Hari P D

PhD Student, University of Edinburgh

Sree Hari obtained his Masters (M. Tech) in Thermal Science and Engineering from the Indian Institute of Technology Kharagpur, India in 2015. He is now a PhD student at the University of Edinburgh, within the Multiscale Fluid Unit in the School of Engineering. His research interests include nanodroplet migration on surfaces, polymer dynamics in nano-scale confinements and rarefied gas dynamics.

Packmol: An easy tool to make initial configuration for MD simulations

Initial configuration of an atomic system is crucial in MD simulations. Further away the initial configuration from its equilibrium position, longer will it take to reach the equilibrium state. Longer simulation means burning up more and more computational resources.

For example, If you want to simulate a drop spreading on a Platinum surface using MD and you are not interested in the transient dynamics, one obvious way is to begin with a wall and a cube of water molecules placed just above it. The attraction from the wall will bring down the cube and the “droplet” will spread.

But, if you already had a hemispherical arrangement for water molecules instead of a cube, the system would be nearer to its equilibrium state at t=0. This will only take much less time to attain equilibrium and thus will help save a lot of computational resources.

The working procedure is very simple as well. You can download and install Packmol from http://www.ime.unicamp.br/~martinez/packmol/home.shtml. Suppose we want 2000 water molecules randomly arranged inside a sphere of radius 25 Angstroms, all we need is two files:

File 1: tip4p.xyz

This file contains the atomic coordinates of two Hydrogen and an Oxygen atom according to TIP4P configuration of water molecule. The first line represents the total number of atoms to follow. Second line is neglected.

#######################

3

 

O         0.0       0.0       0.0

H          0.9572 0.0       0.0

H          -0.239  0.9266 0.0

#######################

File 2: input.inp

The packmole executable reads this file as an instruction to make initial configurations. In the file, tolerance is the average distance between two molecules and filetype is the output file format. The first three arguments of inside sphere denote the coordinates of centre of the sphere and last argument is the radius. You can also arrange water molecules inside a box, cylinder etc.

#######################

tolerance 2.0

filetype xyz

output waterSphere.xyz

structure tip4p.xyz

            number 2000

            inside sphere 0.0 0.0 0.0 25

end structure

#######################

Now, open a terminal in the packmol folder and execute “./packmol <input.inp”.

This will create a file named waterSphere.xyz, which will have 2000 water molecules arranged inside a sphere centred at (0,0,0) with radius 25 Angstroms. Next step is to write a C++/MATLAB script to read this output file and print it in a format that can be read by the MD software that you use. If you find packmol useful, don't forget to site the original work.

View all blog entries