Ab initio studies of methanol, methanethiol and methylamine dimer