In this tutorial Molecular dynamics simulation in LAMMPS is used to show what happens to a polymer chain at a certain temperature after some time. Chain's movement is caused by a molecular forces between atoms in the chain and by temperature of the chain. This factors are modeled in LAMMPS in order to show the behavior of this polymer chain. The chain was previously prepared in MATLAB. It contains 100 atoms with bound between neighbor atoms. During the simulation, firstly, the chain was left for do deform freely under the molecular forces and a random atomic fluctuation due to the temperature. After that the chain was minimized to find it's minimal energy condition. The tutorial explains basic LAMMPS commands and shows how to make a movie using AtomEye and ImageJ.

In this tutorial Molecular dynamics simulation in LAMMPS is used to show what happens to a polymer chain at a certain temperature after some time. Chain's movement is caused by a molecular forces between atoms in the chain and by temperature of the chain. This factors are modeled in LAMMPS in order to show the behavior of this polymer chain. The chain was previously prepared in MATLAB. It contains 100 atoms with bound between neighbor atoms. During the simulation, firstly, the chain was left for do deform freely under the molecular forces and a random atomic fluctuation due to the temperature. After that the chain was minimized to find it's minimal energy condition. The tutorial explains basic LAMMPS commands and shows how to make a movie using AtomEye and ImageJ.

Revision as of 17:51, 2 December 2011

Contents

Abstract

In this tutorial Molecular dynamics simulation in LAMMPS is used to show what happens to a polymer chain at a certain temperature after some time. Chain's movement is caused by a molecular forces between atoms in the chain and by temperature of the chain. This factors are modeled in LAMMPS in order to show the behavior of this polymer chain. The chain was previously prepared in MATLAB. It contains 100 atoms with bound between neighbor atoms. During the simulation, firstly, the chain was left for do deform freely under the molecular forces and a random atomic fluctuation due to the temperature. After that the chain was minimized to find it's minimal energy condition. The tutorial explains basic LAMMPS commands and shows how to make a movie using AtomEye and ImageJ.

Input File

Figure 1. Not-deformed polymer chain.

The polymer chain of 100 atoms was specially prepared in MATLAB. The atom's Z coordinate does not varies much, all of them are within 2Å. The distance between atoms is about 1.5Å. Basically, the chain goes from left upper to right lower corner of the box. At the right you can see the picture of the initial condition of the chain.

Here, the first section defines the numbers of atoms, bonds, angles and dihedrals. Lower you can see the types and the box sizes. Below that are the simulation box sizes.

Then comes the Atoms section. The first column is the atom number, then comes the atom type and some other information not used in this tutorial. Last three columns is the atom's x, y and z coordinates correspondingly.

Figure 2. Angles between atoms defined in LAMMPS.

Figure 2. Dihedral angles between atoms defined in LAMMPS.

In the Angle section listed the angles between atoms. First column is the angle number, second - angle ID, then comes the atom's number between which the angle is defined. Example of the distribution of the atoms can be seen on the picture to the left.
Dihedrals are a little bit more complicated. To define a diherdal four atoms are needed. Syntax are pretty much similar to the angles section. The only difference is that one more atom is needed to define a dihedral. Basically, the dihedral angle is the angle between the planes formed by 2 groups of 3 neighbor atoms. You see the example on the picture to the right.

LAMMPS Script

Below is the script used for the actual simulation. This input script was run using the November 2010 version of LAMMPS. Changes in some commands in more recent versions may require revision of the input script. This script runs the simulation with the previously discussed data file.

In general, this script does equilibration and minimization to the polymer chain. Polymer chain data file named 'PE_cl100.txt' should be the same directory. Line "dump 1 all cfg 6 dum..." used to output information during simulation can be moved before the equilibration part of the script to output the process of equilibration. Please note that you need to change a time step for a dump command otherwise it will give too many or very few dump files. It may be reasonable to choose a timestep of 10,000 for equilibration and 6 for minimization. That will give about 100 files for each step.

In this section goes the information about the bonds, angles, dihedrals in a chain. Bond_style and bond_coeff defines the type on the force field between atoms and a magnitude of this fields. "1" here corresponds to the second column of the "Bonds" section of the data file. Thus, every atom pair with "1" in the second column will be having such properties during the simulation. Similar goes to the angles and dihedrals.
Angle_* and dihedral_* lines defines the angles and dihedral angles between atoms in the polymer chain. Pair_* commands used to define pair potentials between atoms that are within a cutoff distance.
More about this commands and a parameters can be found at SANDIA website:

This commands are used to define which properties are to be calculated during the simulation. For example, "pe/atom" simply means to calculate the potential energy for each atom. Information about other possible properties to calculate can be found here

The equilibration step allows the chain to deform freely under the temperature driven movements of the atoms. Velocity command add the temperature to the chain. Fix command performs the check of the system every time step and updates the velocity and positions of the atoms. Thermo commands defines thermo output during the simulation. Run command stars the dynamic transformation.

The other step in the program is the minimization. It finds the minimum energy condition for such configuration. The parameters for minimize command includes: stopping tolerance for energy, stopping tolerance for force, max iterations of minimizer and max number of force/energy evaluations. Where stopping tolerance for energy being the first parameter and the max number of force/energy evaluations the last one.

LAMMPS Logfile

Here is the logfile produced by LAMMPS during the simulation. Note that the temperature during the equilibration does not concave and just randomly changes over time. On the other hand, the potential energy during the minimization lowers over time until it reaches the minimum for this configuration within a tolerance.

This assumes that you already have AtomEye and ImageJ downloaded and installed.

Visualize the dumpfile in AtomEye by typing the following command, "/A dump.tensile_0.cfg" (UNIX).

Use the AtomEye options to select how you want to visualize deformation. In this example, the centrosymmetry parameter was used to show only atoms in a non-centrosymmetric environment (see Fig. 2).

Use Alt+0 to activate centrosymmetric (csym) view.

Adjust threshold, or set of atoms to view, by using Shift+T. This will allow creation of a set for the current parameter (in this case, csym). Please note that you need to adjust both lower and higher thresholds unless the atoms from following images that exceeds maximum value for the first one will be not shown. You can make it 5 or 10.

Make atoms with values outside of the threshold invisible by using Ctrl+A.