Upload
others
View
14
Download
0
Embed Size (px)
Citation preview
18/03/2013 Enrico Riccardi MD in Engineering 1
2 12/06/2013 Enrico Riccardi Gromacs MD simulations
Introduction to MD
Gromacs: (The) Molecular Dynamics (MD)
simulations package
Enrico Riccardi
Ugelstad Laboratory,
Chemical Engineering Department,
NTNU, Trondheim
3 12/06/2013 Enrico Riccardi Gromacs MD simulations
Introduction into Molecular Dynamics (MD)
If we can study and understand
the behavior of the
atoms/molecules and the
underlying mechanisms,
answers to many (any?)
questions and problems could
be obtained.
Every phenomenon and every property can be traced back to atomic-scale
characteristics and processes.
4 12/06/2013 Enrico Riccardi Gromacs MD simulations
Averaging Obtain static and dynamic properties
Calculate force for each particle
Solve equations of motion for ri (t),vi (t)
Molecular Dynamics (MD) is a computational technique which simulates
microscopic systems in atomistic/molecular resolution.
MD can, in principle, predict most system
properties through the knowledge of atoms
location, momentum, and atom-atom
interactions.
Introduction into Molecular Dynamics (MD)
5 12/06/2013 Enrico Riccardi Gromacs MD simulations
Computational Simulation Limits
Introduction into Molecular Dynamics (MD)
6 12/06/2013 Enrico Riccardi Gromacs MD simulations
Gromacs
GROMACS is Free Software, available under the “GNU Lesser General Public License”
http://www.gromacs.org/
Current release: GROMACS 4.6
Berendsen, et al. (1995) Comp. Phys. Comm. 91: 43-56. Lindahl, et al. (2001) J. Mol. Model. 7: 306-317. Van der Spoel, et al. (2005) J. Comput. Chem. 26: 1701-1718. Hess, et al. (2008) J. Chem. Theory Comput. 4: 435-447. Pronk, et al. (2013) Bioinformatics 29 845-854.
7 12/06/2013 Enrico Riccardi Gromacs MD simulations
http://www.gromacs.org/Documentation/Installation_Instructions_4.5
Installation procedure:
http://www.gromacs.org/Downloads
Download:
http://dqfnet.ufpe.br/groups/geekstuff/wiki/2ebb2/
System requirements: Linux, Mac OS X, Windows Almost any hardware
Gromacs
8 12/06/2013 Enrico Riccardi Gromacs MD simulations
Molecular Dynamics steps
2. Select a suitable force field
1. Definition of the simulation box and generation of initial configuration
5. Statistical analysis of the results
3. System setting and set up
4. Simulation RUN
9 12/06/2013 Enrico Riccardi Gromacs MD simulations
MD simulation file flow chart
settings.mdp
letsgo.tpr
forcefield.top
configuration.gro
Traj.xtc
10 12/06/2013 Enrico Riccardi Gromacs MD simulations
Molecular Dynamics steps
2. Select a suitable force field
1. Definition of the simulation box and generation of initial configuration
5. Statistical analysis of the results
3. System setting and set up
4. Simulation RUN
11 12/06/2013 Enrico Riccardi Gromacs MD simulations
MD Resolution
Atomistic resolution
Each atom contributes with 3 degrees of freedom to the system
Coarse grained (CG) resolution
Atoms are grouped into “super atoms”
12 12/06/2013 Enrico Riccardi Gromacs MD simulations
MD Resolution
computational effort / accuracy balance
13 12/06/2013 Enrico Riccardi Gromacs MD simulations
MD Resolution
-glucose monomer
B1 ≡ C1
B4 ≡ C4
B6 ≡ C6
O
HO OH
O
HO OH
O O
HO OH
HO
HO
HO
O
Coarse Grained Examples
Dextran polymer
Polystyrene
14 12/06/2013 Enrico Riccardi Gromacs MD simulations
Initial Conditions
Generate initial configuration, rinitial , (3N-dimensional) vector
Tk
vm
Tk
mvP
B
ixi
B
iix
2exp
22
1
N
i
iiB vmTNkE1
2
2
1
2
3
Equipartition principle Maxwell-Boltzmann distribution function
15 12/06/2013 Enrico Riccardi Gromacs MD simulations
Rigid Walls
Stochastic Boundary
Conditions
Boundary Conditions
16 12/06/2013 Enrico Riccardi Gromacs MD simulations
Periodic Boundary Conditions (PBC)
Adjacent identical system replica A particle exiting is replaced by his image entering
Boundary Conditions
17 12/06/2013 Enrico Riccardi Gromacs MD simulations
settings.mdp
letsgo.tpr
forcefield.top
configuration.gro
Traj.xtc
MD simulation file flow chart
18 12/06/2013 Enrico Riccardi Gromacs MD simulations
Initial Conditions
5 C 0.000000 0.000000 0.000000 H 0.000000 0.000000 1.089000 H 1.026719 0.000000 -0.363000 H -0.513360 -0.889165 -0.363000 H -0.513360 0.889165 -0.363000
Writing a .xyz file
Define the initial structure of a molecule
19 12/06/2013 Enrico Riccardi Gromacs MD simulations
Initial Conditions
Define the initial structure of a molecule
Writing a .gro file
6 1WATER OW1 1 0.126 1.624 1.679 0.1227 -0.0580 0.0434 1WATER HW2 2 0.190 1.661 1.747 0.8085 0.3191 -0.7791 1WATER HW3 3 0.177 1.568 1.613 -0.9045 -2.6469 1.3180 2WATER OW1 4 1.275 0.053 0.622 0.2519 0.3140 -0.1734 2WATER HW2 5 1.337 0.002 0.680 -1.0641 -1.1349 0.0257 2WATER HW3 6 1.326 0.120 0.568 1.9427 -0.8216 -0.0244 1.82060 1.82060 1.82060
residue number (5 positions, integer) residue name (5 characters) atom name (5 characters) atom number (5 positions, integer) position (in nm, x y z in 3 columns, each 8 positions with 3 decimal places) velocity (in nm/ps (or km/s), x y z in 3 columns, each 8 positions with 4 decimal places)
20 12/06/2013 Enrico Riccardi Gromacs MD simulations
1. Initial Conditions
Visual tools:
Avogadro (freeware)
Possibility to switch between output format in a click
Optimize the initial structures
Visual consistency check
Material Studio
21 12/06/2013 Enrico Riccardi Gromacs MD simulations
Initial Conditions
Reach desired system dimension by CLONING the desired molecule(s) n times:
genconf Syntax: genconf –f onemol.gro -nbox nx ny nz -rot -o manymol.gro
manymol.gro will thus contain nx*ny*nz the molecule contained in onemol.gro
A visual tool (VMD) can be used to check the results
vmd manymol.gro vmd onemol.gro
22 12/06/2013 Enrico Riccardi Gromacs MD simulations
Initial Conditions
Example: Nanocomposite system
23 12/06/2013 Enrico Riccardi Gromacs MD simulations
Molecular Dynamics steps
2. Select a suitable force field
1. Definition of the simulation box and generation of initial configuration
5. Statistical analysis of the results
3. System setting and set up
4. Simulation RUN
24 12/06/2013 Enrico Riccardi Gromacs MD simulations
Polyatomic molecules are subjected to intra and inter molecular interactions. The total potential energy and force can thus be expressed as:
&
The intramolecular interactions Uintra may include
- bond stretch (Us) - bond bending (Ub)
- torsion/dihedral (Ut) - electrostatic interaction (Ue)
- van der Waals interaction
The intermolecular interactions Uinter may include
- electrostatic interaction (Ue)
- van der Waals interaction
Force Field
25 12/06/2013 Enrico Riccardi Gromacs MD simulations
Bond interaction models:
Simple harmonic potential:
Constrains to freeze bond length (allow larger t):
• SHAKE algorithm
(bonded atoms are iteratively relocated to their equilibrium bond length)
• RATTLE algorithm
(bond lengths of atoms constrained by velocity alteration)
• Quaternion (solid rotation), etc.
Force Field
26 12/06/2013 Enrico Riccardi Gromacs MD simulations
Torsion (four body interactions):
i
di di -1
i -1
i i -2 Bending (three body interactions):
Ethane Torsional Potential
Force Field
27 12/06/2013 Enrico Riccardi Gromacs MD simulations
Non-Bonded interaction models:
− Lennard-Jones potential
: particle diameter, : potential depth
− Morse potential : equilibrium bond length : frequency parameter
Force Field
28 12/06/2013 Enrico Riccardi Gromacs MD simulations
Non-Bonded interaction models:
− Coulomb interaction between point-charges:
Special treatments are thus needed that include
− direct spherical cut-off − switching functions − Ewald summation − reaction field method
qi : i atom charge
: relative permittivity
: vacuum permittivity
Force Field
29 12/06/2013 Enrico Riccardi Gromacs MD simulations
settings.mdp
letsgo.tpr
forcefield.top
configuration.gro
Traj.xtc
MD simulation file flow chart
30 12/06/2013 Enrico Riccardi Gromacs MD simulations
.top file
Sample .top file #include "ffoplsaa.itp" #include "Xylene-p.itp" #include "CHCL3.itp" #include "tip3p.itp" #include "ions-NA.itp" #include “Surfactant-LIG.itp" [ system ] ; Name Complete-Mess [ molecules ] ; Compound #mols CHL 105 DRG 752 SOL 9727 NA 256 LIG 64
31 12/06/2013 Enrico Riccardi Gromacs MD simulations
Tip3p.itp [ moleculetype ] ; molname nrexcl SOL [ atoms ] ; id at type res nr residu name at name cgnr charge mass 1 opls_111 1 SOL OW 1 -0.834 16.00000 2 opls_112 1 SOL HW1 1 0.417 1.00800 3 opls_112 1 SOL HW2 1 0.417 1.00800 [ bonds ] ; I j funct length force.c. 1 2 1 0.09572 502416.0 1 3 1 0.09572 502416.0 [ angles ] ; i j k funct angle force.c. 2 1 3 1 104.52 628.02
.top file
32 12/06/2013 Enrico Riccardi Gromacs MD simulations
CHCL3.itp
[ moleculetype ] ; Name CHL [ atoms ] ; nr type resnr residue atom cgnr charge mass typeB chargeB massB 1 opls_135 1 CHL C 1 0.086 12.01100 2 opls_151 1 CHL CL 2 -0.030 35.45300 3 opls_151 1 CHL CL 3 -0.028 35.45300 4 opls_151 1 CHL CL 4 -0.028 35.45300 5 opls_140 1 CHL H 5 0.000 1.00800 [ bonds ] ; ai aj funct 1 2 1 ; C CL 1 3 1 ; C CL 1 4 1 ; C CL 1 5 1 ; C H [ angles ] ; ai aj ak funct 2 1 3 1 ; CL C CL 2 1 4 1 ; CL C CL 2 1 5 1 ; CL C H 3 1 4 1 ; CL C CL 3 1 5 1 ; CL C H 4 1 5 1 ; CL C H
.top file
33 12/06/2013 Enrico Riccardi Gromacs MD simulations
Molecular Dynamics steps
2. Select a suitable force field
1. Definition of the simulation box and generation of initial configuration
5. Statistical analysis of the results
3. System setting and set up
4. Simulation RUN
34 12/06/2013 Enrico Riccardi Gromacs MD simulations
settings.mdp
letsgo.tpr
forcefield.top
configuration.gro
Traj.xtc
MD simulation file flow chart
35 12/06/2013 Enrico Riccardi Gromacs MD simulations
Integration of Newton’s second law (equation of motion, EOM)
; RUN CONTROL PARAMETERS integrator = md dt = 0.001 ; time step (in ps) nsteps = 1000000 ; number of steps ; OUTPUT CONTROL OPTIONS nstxout = 5000 ; save coordinates every ps nstvout = 5000 ; save velocities every ps nstenergy = 5000 ; save energies every ps ; NEIGHBOR SEARCHING PARAMETERS nstlist = 10 pbc = xyz rlist = 1.0
Sample .mdp file
.mdp file
36 12/06/2013 Enrico Riccardi Gromacs MD simulations
; OPTIONS FOR ELECTROSTATICS AND VDW coulombtype = PME ; Particle Mesh Ewald for long-range Electrostatics rcoulomb = 1.0 vdw-type = Cut-off rvdw = 1.0 ; Temperature coupling tcoupl = v-rescale ; Couple temperature to ; external heat bath according to velocity re-scale method tau_t = 0.1 ; Coupling time constant, controlling strength of coupling ref_t = 300 ; Temperature of heat bath ; Pressure coupling Pcoupl = Parrinello-Rahman Pcoupltype = Isotropic tau_p = 2.0 compressibility = 4.5e-5 ref_p = 1.0
Sample .mdp file
.mdp file
37 12/06/2013 Enrico Riccardi Gromacs MD simulations
; GENERATE VELOCITIES FOR STARTUP RUN gen_vel = yes ; Assign velocities to particles by taking them randomly from a Maxwell distribution gen_temp = 300 ; Temperature to generate corresponding Maxwell distribution
Sample .mdp file
.mdp file
38 12/06/2013 Enrico Riccardi Gromacs MD simulations
Molecular Dynamics steps
2. Select a suitable force field
1. Definition of the simulation box and generation of initial configuration
5. Statistical analysis of the results
3. System setting and set up
4. Simulation RUN
39 12/06/2013 Enrico Riccardi Gromacs MD simulations
Basic principles of MD equations of motion
Integration yields the time evolution of the particle’s positions ri
40 12/06/2013 Enrico Riccardi Gromacs MD simulations
settings.mdp
letsgo.tpr
forcefield.top
configuration.gro
Traj.xtc
MD simulation file flow chart
41 12/06/2013 Enrico Riccardi Gromacs MD simulations
MD simulation START!
settings.mdp
forcefield.top
configuration.gro
grompp –f setting.mdp –p forcefield.top –c configuration.gro -o letsgo.tpr
mdrun –s letsgo.tpr
42 12/06/2013 Enrico Riccardi Gromacs MD simulations
Simulation Progress
- Particle trajectories
43 12/06/2013 Enrico Riccardi Gromacs MD simulations
Snap Shot
VMD can be used to check simulation snapshot and trajectory
vmd snapshot.gro
trjconv -f traj.xtc -dump 10000 -o snapshot.gro
44 12/06/2013 Enrico Riccardi Gromacs MD simulations
Trajectory
Movie
vmd traj.xtc
45 12/06/2013 Enrico Riccardi Gromacs MD simulations
Molecular Dynamics steps
2. Select a suitable force field
1. Definition of the simulation box and generation of initial configuration
5. Statistical analysis of the results
3. System setting and set up
4. Simulation RUN
46 12/06/2013 Enrico Riccardi Gromacs MD simulations
settings.mdp
letsgo.tpr
forcefield.top
configuration.gro
Traj.xtc
MD simulation file flow chart
47 12/06/2013 Enrico Riccardi Gromacs MD simulations
Initialization of the ri and vi
Integrate the equation of motion
Determine forces on atoms
Determination of mean values
MD
simulation
loops Ensemble
averaging
Equilibration
&
Time
averaging
Result Averaging Procedure
48 12/06/2013 Enrico Riccardi Gromacs MD simulations
Kinetic energy and temperature:
Pressure:
Potential energy (U), total energy (E), enthalpy (H):
Microscopic quantities examples
49 12/06/2013 Enrico Riccardi Gromacs MD simulations
Thank for your attention
50 12/06/2013 Enrico Riccardi Gromacs MD simulations
Ensembles
- DPD
Newton equation of motion
At every time step the forces acting on every particle is calculated as
Pair potential
Drag force
Random force contribution
Weight function
Random fluctuating parameter with Gaussian statistics
51 12/06/2013 Enrico Riccardi Gromacs MD simulations
Numerical: − dt → t: differential equations become finite difference equations of motion
− magnitude of t.
− integration algorithm
− potential model: approximation from QM or macroscopic properties fit.
− potential cutoff: if L < 2rc
Error sources
Thermodynamic:
− quantum fluctuation neglected
− finite-size effects: periodic boundary conditions (artificial order)
stochastic boundary conditions (wall effects)
− initial condition: trapping in metastable states ( for complex systems)
− duration of simulation: characteristic time scale