New method for direct linear-scaling calculation of electron density of proteins