Next: Introducing software design
Up: From bouncing balls to
Previous: Dynamics
The source code for SimpleMD.py
can be found here. The source code for Minimise.py
can be found here.
- Note that in each iteration of the simulator, the
evalForce
and evalPotential
functions need both be called. Is there
are more efficient way of doing this?
- Extend the program to print out the potential energy, kinetic energy
and total energy of the system in each iteration.
- Add the ability to turn each of the potential, kinetic and total
energies off through the use of global static flags.
- Add the ability to colour the atoms according to kinetic energy, and the
ability to turn colouring on or off. Atoms with high kinetic energy should be
red, and atoms with low kinetic energy should be blue.
*
- Imagine you had to modify your program to run on a box that did not
have visual python, rather you had to use a graphics package called 3d python.
What affect would this have on your code? Comment on the ease or difficulty
of extending and modifying your existing code.
Next: Introducing software design
Up: From bouncing balls to
Previous: Dynamics
James Roper
2004-02-12