A novel formulation for tight-binding total energy calculations and ti
ght-binding molecular dynamics, which scales linearly with the size of
the system, is presented. The linear complexity allows us to treat sy
stems of very large size and the algorithm is already faster than the
best implementation of classical diagonalization for systems of 64 ato
ms. In addition, it is naturally parallelizable and it permits us ther
efore to perform molecular dynamics simulations of systems of unpreced
ented size. Finite electronic temperatures can also be taken into acco
unt. We illustrate this method by investigating structural and dynamic
al properties of solid and liquid carbon at different densities.