320 likes | 457 Views
South China University of Technology. Molecular Dynamics Phase transition & Quasi-crystals. Xiaobao Yang Department of Physics. www.compphys.cn. Quasi-crystals. Many body dynamics. Multiscale modeling of materials. Understand the molecular level origins of materials behavior
E N D
South China University of Technology Molecular Dynamics Phase transition & Quasi-crystals Xiaobao Yang Department of Physics www.compphys.cn
Multiscale modeling of materials • Understand the molecular level origins of materials behavior • Predict the behavior of materials from first principles Electrons Atoms Mesoparticles Elements T i m e Macroscale second Mesoscale microsec Molecular dynamics nanosec. Quantum Mechanics picosec. L e n g t h femtosec. nanometer micron mm meters
Structural relaxation To obtain the ground state relaxed geometry of the system. the equilibrium lattice constants a given ionic configuration the forces obtained these forces are greater than some minimum tolerance the ions are moved in the direction of the forces
Key issues in MD • Classical Molecular Dynamics - Potentials to describe the particles in the system formulism + parameterization formulism + parameterization - Algorithm to solve Newton EQ: accuracy + efficiency accuracy + efficiency - Analysis of physical properties • Ab initio Molecular Dynamics - Coupling the motion of electrons and ions.
Why classical MD works for Atoms? • Energy View: Typical Kinetic energy < 0.1 eV, while it is about >1eV to remove/excite an elec. • Debroglie wavelength view: Typical distance between atoms > 1 Å, while the DeBroglie wavelength is ~ 10-7Å. • MD vs. MC: MC: be convenient for studying the equilibrium properties. MD: reflects the real process of a system from one microstate to another.
EoM: Verlet method Equation of Motion of particle i: Taylor expansion of positions with time Verlet method What is the difference with Euler or Euler-Cromer method?
Properties of a dilute gas • Lennard-Jones potential
Properties of a dilute gas • Periodical boundary condition PBC affects the force calculation and position update. • thermodynamic ensembles Temperature: Instantaneous temperature (T*):
MD.m [ pos, vel, acc] = initialize ( np, nd, box); [ force, potential, kinetic ] = compute ( np, nd, pos, vel, mass ); for step = 1 : step_num [ force, potential, kinetic ] = compute ( np, nd, pos, vel, mass ); [ pos, vel, acc ] = update ( np, nd, pos, vel, force, acc, mass, dt ); end Initialize.m Compute.m Update.m
Initialize.m • pos(1:nd,1:np) = rand ( nd, np ); • for i = 1 : nd • pos(i,1:np) = box(i) * pos(i,1:np); • end • vel(1:nd,1:np) = 0.0; • acc(1:nd,1:np) = 0.0; • return • end
Compute.m Ri = pos - repmat ( pos( :, i ), 1, np ); % array of vectors to 'i' D = sqrt ( sum ( Ri.^2 ) ); % array of distances Ri = Ri( :, ( D > 0.0 ) ); D = D( D > 0.0 ); % save only pos values
Compute.m • pot = pot + 0.5 * sum ( 1./(D.^12)-1./(D.^6) ); % accumulate pot. energy • f( :, i) = Ri * ( (6./(D.^6)-12./(D.^13)) ./ D )'; % force on particle 'i‘ % Compute kinetic energy. kin = 0.5 * mass * sum ( diag ( vel' * vel ) );
Update.m • % x(t+dt) = x(t) + v(t) * dt + 0.5 * a(t) * dt * dt • % v(t+dt) = v(t) + 0.5 * ( a(t) + a(t+dt) ) * dt • % a(t+dt) = f(t) / m • pos(1:nd,1:np) = pos(1:nd,1:np) + vel(1:nd,1:np) * dt ... + 0.5 * acc(1:nd,1:np) * dt * dt; • vel(1:nd,1:np) = vel(1:nd,1:np) ... • + 0.5 * dt * ( f(1:nd,1:np) * rmass + acc(1:nd,1:np) ); • acc(1:nd,1:np) = f(1:nd,1:np) * rmass;
Properties of a dilute gas Trajectories Speed distribution 20 particles in a 10x10 box with PBC
MD: isothermal molecular dynamics How can we modify the EoM so that they lead to constant temperature? Nose-Hoover thermostat Berendsen’s thermostat Direct feedback
AWK and VASP aa=`awk '$2 == "TOTAL-FORCE" {print NR}' OUTCAR` a=`expr $aa + 1` bb=`expr $aa + $num + 2` awk 'NR > a && NR < bb {print $4,$5,$6}' a=$a bb=$bb OUTCAR >force.1 paste site.1 velocity.1 force.1 >all.1 awk '{print $1+$4*h+$7*h*h/2/m*0.0096,$2+$5*h+$8*h*h/2/m*0.0096, $3+$6*h+$9*h*h/2/m*0.0096}' h=$dt m=$mass all.1>site.2 paste velocity.1 force.1 force.2 >all.2 awk '{print $1+$4*h/2/m*0.0096+$7*h/2/m*0.0096, $2+$5*h/2/m*0.0096+$8*h/2/m*0.0096, $3+$6*h/2/m*0.0096+$9*h/2/m*0.0096}' h=$dt m=$mass all.2>velocity.2
Annealing simulation Phase Transitions
Homework For lecture notes, refer to http://www.compphys.cn/~xbyang/ 主题:学号+姓名+第?次作业 Sending one word/pdf file to 17273799@qq.com when ready