fixed a bug with atoms too far otuside the basis set, added rectifier function