next up previous
Next: Exercises Up: The final product Previous: Building the GUI

Summary

It is relatively simple to write a visual python molecular dynamics minimiser or simulator, these programs being 185 lines of code altogether. But as we have seen, if we want to make it easy to extend and reuse our code, we can't do a simple hack job. Excluding the GTK interface, our simulator and minimiser together are 647 lines of code. This is much larger than the original number, however, we can quickly write a controller that will do by far much more than our original programs, without touching the existing code, including simulating minimised structures. We can also add new functions, incorporate different environments and forces, again without touching our existing code and with relative ease. This ability to simply plug in different functions should always be aimed for in the design of software, no matter what the size.



James Roper 2004-02-12