  We report an efficient algorithm using density fitting for the relativistic
complete active space self-consistent field (CASSCF) method, which is
significantly more stable than the algorithm previously reported by one of the
authors [J. E. Bates and T. Shiozaki, J. Chem. Phys. 142, 044112 (2015)]. Our
algorithm is based on the second-order orbital update scheme with an iterative
augmented Hessian procedure, in which the density-fitted orbital Hessian is
directly contracted to the trial vectors. Using this scheme, each
microiteration is made less time consuming than one Dirac-Hartree-Fock
iteration, and macroiterations converge quadratically. In addition, we show
that the CASSCF calculations with the Gaunt and full Breit interactions can be
efficiently performed by means of approximate orbital Hessians computed with
the Dirac-Coulomb Hamiltonian. It is demonstrated that our algorithm can also
be applied to systems under an external magnetic field, for which all of the
molecular integrals are computed using gauge-including atomic orbitals.
