c----------------------------------------------------------------------- subroutine write_den(den,iset,type) c----------------------------------------------------------------------- implicit double precision (a-h,o-z) character*(*) type dimension den(*)Writes a density matrix to an active dump record. type (input) is a string describing the density type, e.g. CHARGE or SPIN. The input variable iset is the set number of the density matrix. If iset exists, it is overwritten, otherwise a new set is created. if iset.eq.0, a new set is created. iset is not modified, but the actual set number used is stored in variable dump_iset. The total SCF charge density is always set 1, while the spin-density is stored in set 2 (open-shell only).