A forcefield to describe the structures and properties of metal-organic frameworks