Numerical simulation is often crucial for analysing the behaviour of many complex systems which do not admit analytic solutions. To this end, one either converts a 'smooth' model into a discrete (in space and time) model, or models systems directly at a discrete level. The goal of this paper is to provide a discrete analogue of differential geometry, and to define on these discrete models a formal discrete Hamiltonian structure-in doing so we try to bring together various fundamental concepts from numerical analysis, differential geometry, algebraic geometry, simplicial homology and classical Hamiltonian mechanics. For example, the concept of a twisted derivation is borrowed from algebraic geometry for developing a discrete calculus. The theory is applied to a nonlinear pendulum and we compare the dynamics obtained through a discrete modelling approach with the dynamics obtained via the usual discretization procedures. Also an example of an energy-conserving algorithm on a simple harmonic oscillator is presented, and its effect on the Poisson structure is discussed.