0% found this document useful (0 votes)
73 views24 pages

Advance Thermodynamic Molecuar Dynamic Simulation: TA: Cuong Luu

This document provides an overview of molecular dynamics (MD) simulations. It discusses the interaction energies involved, including bond interactions, non-bond interactions, and the principles of MD simulation. It also outlines the typical steps to set up and run an MD simulation using software like LAMMPS or Gromacs, including creating configuration, index, and force field files. Specific examples are given on simulating a mixture of propane and kerogen molecules using Gromacs on a supercomputer.

Uploaded by

Luu Xuan Cuong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views24 pages

Advance Thermodynamic Molecuar Dynamic Simulation: TA: Cuong Luu

This document provides an overview of molecular dynamics (MD) simulations. It discusses the interaction energies involved, including bond interactions, non-bond interactions, and the principles of MD simulation. It also outlines the typical steps to set up and run an MD simulation using software like LAMMPS or Gromacs, including creating configuration, index, and force field files. Specific examples are given on simulating a mixture of propane and kerogen molecules using Gromacs on a supercomputer.

Uploaded by

Luu Xuan Cuong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Advance Thermodynamic

Molecuar Dynamic Simulation

TA: Cuong Luu


The world of MD simulation

Dr. Alberto Striolo work


Interaction Energy

Bond interaction Nonbon interaction


• Stretching • Van der Waals
• Bending • Electrostatic
• Improper torsion
• Torsion
Principle of MD simulation
Esteric energy = Estr + Ebend + Eimproper + Etor + EvdW + Eqq

Newton’s Fi  mi ai
Law:

Taylor expansion:

Verlet’s Method
Steps to Run MD Simulation

• Step 1. Choose software


+ LAMMPS
+Gromacs
……..
• Step 2. Create necessary files to run

• Step 3. Access supercomputer


How to Set up Simulation in Gromacs?

Initial
Index file Force field
Configuration

Run file

Submit to
supercomputer
Example
Investigation the behavior of propane – Kerogen
mixture
Choose:
• 2514: Kerogen molecules
• 1944: Propane molecules

Propane:
• Molecule name: PRO C3
• 3 atoms/molecule

C1
C2
Kerogen
• Amorphous structure
• Structure can be found on literature

Kerogen
• Molecule name: C
• Atom name: C
How to Make Configuration File
• Configuration files contain: For example
Molecules name, atom name, atom id, coordinate
• File type “.gro”. It is actually a text file, open by, for example:
editpad software: http://www.editpadlite.com/
How to Make Configuration File (cont)
Line 1st: Name Kerogen
Line 2nd: Total atom number 8346
1C C 1 2.574 3.053 1.539
2C C 2 3.224 3.141 1.697
Mol Mol & Atom Atom X, Y, Z 3C C 3 2.218 3.672 1.667
# Name # 4C C 4 3.042 3.431 1.941
2513C C 2513 2.066 5.886 1.692
(i5, 2a5, i5, 3f8.3) 2514C C 2514 3.557 4.690 1.978
1258PRO C1 2515 0.125 0.075 2.583
1258PRO C2 2516 0.206 0.204 2.544
1258PRO C3 2517 0.331 0.164 2.466
1259PRO C1 2518 0.625 0.075 2.583

3201PRO C2 8345 3.706 8.004 4.944


3201PRO C3 8346 3.831 7.964 4.866
Simulation box dimension 3.9000 8.1000 35.0000
How to create configuration file (cont)

• Fortran
• Matlab
• C
Example
Force field

Question 1. Which force field should I use?

Question 2. What is the format of force field file?

Bond Interaction Non-bond

Molecule1.itp Molecule2.itp

Forcefield.top
Format of Bond Force Field file (.itp)
1.
PRO 3
2.
; nr type resnr resid atom cgnr charge mass
1 CH3 1 PRO C1 1 0.000
2 CH2 1 PRO C2 2 0.000
3 CH3 1 PRO C3 3 0.000

3.

1 2 1 0.153 259408
2 3 1 0.153 259408
4.

5.

1 2 3 1 111.000 520.0712
[ moleculetype ]
Force Field of Propane
; Name nrexcl
PRO 3
[ atoms ]
; nr type resnr resid atom cgnr charge mass

1 CH3 1 PRO C1 1 0.000


2 CH2 1 PRO C2 2 0.000
3 CH3 1 PRO C3 3 0.000

[ bonds ]
; ai aj fu c0, c1, ...
1 2 1 0.153 259408
2 3 1 0.153 259408

[ pairs ]
; ai aj fu c0, c1, ...

[ angles ]
; ai aj ak fu
1 2 3 1 111.000 520.0712
Force Field of Kerogen
; **Graphite**
[ moleculetype ]
; name nrexcl
C 1

[ atoms ]
; nr type resnr residu atom cgnr
charge
1 C 1 C C 1 0.00000
Non-Bond Interaction
;***************************
; Non-bonded interactions *
;***************************

[ atomtypes ]
;name at.num mass charge ptype sigma [nm] eps [kJ/mol]
C2 6 14.02700 0.000 A 0.3905 0.493712 ; CH2
C1 6 15.03500 0.000 A 0.3905 0.732200 ; CH3
C3 6 15.03500 0.000 A 0.3905 0.732200 ; CH3
C 6 12.01100 0.0000 A 0.3400 0.148992 ; Graphite / Kerogen
Forcefield (.top)
[ defaults ]
1.
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ

2. #include "/directory in supercomputer/ffpropanenb.itp"


#include "/directory in supercomputer/propane.itp"
#include "/directory in supercomputer/graphite.itp"
Forcefield (.top) (cont)
3. [ system ]
Kerogen

4. [ molecules ]
;molecule name nr.
C 2514
PRO 1944
Forcefield (.top) (cont)
[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
1 2 yes 1.0 1.0

#include "/scratch/cuongluu/Thermoclass/Kerogen/topology/ffpropanenb.itp"
#include "/scratch/cuongluu/Thermoclass/Kerogen/topology/propane.itp"
#include "/scratch/cuongluu/Thermoclass/Kerogen/topology/graphite.itp"

[ system ]
Kerogen

[ molecules ]
;molecule name nr.
C 2514
PRO 1944
Run Simulation
Files

Run

Equilibrium
No

Check
Yes

Production
run

Property
Run file (.mdp)
Question 1. What information should be changed
in .mdp file?
; RUN CONTROL PARAMETERS
integrator = md
; Start time and timestep in ps
tinit =0
dt = 0.001
nsteps = 3000000

; Selection of energy groups


energygrps = C PRO

; ENERGY GROUP EXCLUSIONS


; Pairs of energy groups for which all non-bonded interactions are excluded
energygrp_excl =CC
Work on Supercomputer (SC)
• Software: Winscp: Conect our
computer to suppercomputer
• Putty: Submit our job
How to run job?
Step1: Use Winscp  create fonder on SC.
Step2: Use putty: Use command cd /directory of above fonder
Step 3: Make an index file by commanding directory/make_ndx –f
initial_conf.gro
Step 4: Run: bsub < bsub.bsub
Several command:
bjobs, bkill
#!/bin/sh
Work on Supercomputer
#
#BSUB -q normal (debug)
#
#
#BSUB -n 256
#BSUB -R "span[ptile=16]"
#
#BSUB -o /directory/Output_%J.txt
#BSUB -e /directory/Errors_%J.txt
#
#BSUB -W 10:30
#
#BSUB -J "kerogen"
#
#BSUB -u [email protected]
#

cd /directory

date

/Gromacs-directory/grompp -f XXX.mdp -c XXX.gro -p XXX.top -n XXX.ndx -o YYY.tpr -maxwarn 30


/Gromacs-directory/mdrun -s YYY.tpr -o ZZZ.trr -x ZZZ.xtc -c ZZZ.gro -e ZZZ.ener -g ZZZ.log -cpi

date
Example
#!/bin/sh
#
#BSUB -q debug
#
#
#BSUB -n 16
#BSUB -R "span[ptile=16]"
#
#BSUB -o /scratch/cuongluu/Thermoclass/Kerogen/Output_%J.txt
#BSUB -e /scratch/cuongluu/Thermoclass/Kerogen/Errors_%J.txt
#
#BSUB -W 00:30
#
#BSUB -J "kerogen"
#
#BSUB -u [email protected]
#

cd /scratch/cuongluu/Thermoclass/Kerogen

date

/home/tuanho/software/bin/grompp -f init300.mdp -c system.gro -p topology.top -n index.ndx -o init300.tpr -maxwarn 30


/home/tuanho/software/bin/mdrun -s init300.tpr -o init300.trr -x init300.xtc -c init300.gro -e init300.ener -g init300.log -cpi

You might also like