ρ QM is the density calculated from quantum mechanics, where the subscript indicates whether the density is in its true form or projected form in the "density fitting" basis (Eq. 1). ρ M L is the machine learning predicted density, which is always expressed in the density fitting basis and so does not need a subscript. ϵ ρ M L is the error that comes from fitting the trained model, whereas ϵ ρtrue includes the "density fitting" contribution to the error and so will always be higher than ϵ ρ M L . For all tests with the def2-universal-jfit basis, the density fitting error was essentially constant, at around 0.73%. The learning curve for training the model with increasing numbers of training samples is plotted in Fig. . The reported error ϵ ρ M L is calculated against the test set of 2-mers. For a functional machine learning model that meaningfully learns from training data, this learning curve must be linear on a log-log scale. The linear trend of our data proves that our proposed training protocol produces a functional machine learning model. The model trained on 4000 samples predicts 2-mer test set densities with an average error of ϵ ρ M L = 0.62%. Including the "density fitting" error, the total prediction error averages to ϵ ρtrue = 1.00%. Recall that the training set contains only configurations with two base pairs. For the model to predict accurate densities for arbitrary DNA structures longer than two base pairs, the error must not significantly increase for longer base sequences. Figure shows the model prediction error against the complete test set with DNA sequence lengths up to five base pairs. Because it is computationally burdensome to project quantum mechanical densities on to the density fitting basis for the larger systems in the test set, we compare all results to the true quantum mechanical densities using ϵ ρtrue in Eq. 3, noting that the machine learning error ϵ ρ M L would be lower as in Fig. . The error increases slightly from the test set of 2-mers but flattens out as DNA sequence length is increased, reaching an average error of ϵ ρtrue = 1.06% for the test set of 5-mers.