An ab initio force field for the cofactors of bacterial photosynthesis