# md-ex04 - 3 Remember you can build this exercise on your...

This preview shows page 1. Sign up to view the full content.

Molecular Dynamics Simulations 2011. Exercise 4: mdmorse : Solv- ing the equations of motion. Return by Tue 4.10. at 12:15, exercise session Thu 6.10. at 12:15. 1. (12 p) Write the subroutine Solve1 which does the predictor part of the solution of the equations of motion with the velocity Verlet algorithm. Also, add control for periodic boundary conditions in the code. That is, if the variable periodic%x (or periodic.x in the C version) is set to a nonzero value, make the atoms which move over the boundary of the simulation cell in the x dimension reappear over the opposite boundary, and the same for y and z . 2. (8 p) Write the subroutine Solve2 which does the corrector part of the velocity Verlet algorithm. Return the exercises as the Fle solve.f90/.c and some output which shows that the code works (e.g. atoms.out from the “test run” given with Exercise
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3). Remember, you can build this exercise on your previous solutions or use the model solutions. To compile the code, type make in the directory con-taining all the source code. To run the code, move the compiled executable mdmorse to a directory containing the input Fles and type ./mdmorse . If you solve this exercise right and use a working solution to the previous exercise, the atoms will start moving when you run mdmorse . But since the force calculation is not yet implemented, the atoms will move in straight paths (Newton I). When returning the subroutines, the minimum requirement is that each subroutine compiles on a standard Unix/Linux system with gfortran -c filename.f90 in ±ortran or cc -c filename.c in C. Subroutines which do not compile give 0 p....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online