QM/MM intefaces, rankTypes and minor optimizations