Homework1

Homework1 - Homework #1 (page 1 of 2) Simple MD code with...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MSE 4270/6270: Introduction to Atomistic Simulations, Leonid Zhigilei Homework #1 (page 1 of 2) Simple MD code with Velocity Verlet algorithm Write the simplest possible one-dimensional ±molecular dynamics code²fo r two pa r t ic le s connected by a spring (Force = k(x 2 -x 1 -x 0 )) where ' x=x 2 -x 1 is the distance between particles, x 0 is the equilibrium length of the spring. Your code can have the following structure: ³Define the parameters of the system (k, x 0 , m 1 , m 2 ), initial coordinates and velocities of the particles in the system (x 1 0 , x 2 0 , v 1 0 , v 2 0 ), initial time = 0, time of the simulation, and timestep of integration, ' t. ³Calculate initial force F init = k(x 2 0 -x 1 0 -x 0 ) ³F old = F init , x 1 old = x 1 0 , x 2 old = x 2 0 , v 1 old = v 1 0 , v 2 old = v 2 0 ³Time loop: 1. Calculate position at the current time x 1 new = x 1 old + ' t v 1 old + ' t 2 F old /2m 1 x 2 new = x 2 old + ' t v 2 old - ' t 2 F old /2m 2 2. Calculate new forces F new = k(x
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Homework1 - Homework #1 (page 1 of 2) Simple MD code with...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online