A unified scheme for ab initio molecular orbital theory and path integral molecular dynamics