Abstract
The prediction of the electron density in molecules and crystals is a key pillar in the first principles computation of their properties. Using machine learning to predict the electron density by using the atomic structure alone can save the computational cost of performing first principles computations. While various machine learning approaches have been introduced for predicting the electron density, none of them predicts the electron density for charged systems. This work extends a recent machine learning charge density model, DeepDFT, by including the charge of the structure as an input parameter into the model. We establish an input charge representation approach that successfully predicts the charged electron densities for several test cases, including charged defective perovskites, LiCoO$_2$ supercells with multiple Li vacancies, diamond-based defects, metal organic frameworks and molecular crystals.