2 ! Copyright (C) 2002-2008 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU Lesser General Public
4 ! License. See the file COPYING for license details.
7 ! 1-reduced density matrix functional theory
14 ! generate q-point set and wiq2 array
16 ! read density and potentials from file
18 ! generate the core wavefunctions and densities
20 ! find the new linearisation energies
22 ! generate the APW radial functions
24 ! generate the local-orbital radial functions
26 ! compute the overlap radial integrals
28 ! compute the Hamiltonian radial integrals
30 ! compute the kinetic energy of the core
32 ! generate the kinetic matrix elements
34 ! read in the occupancies
36 call getoccsv(vkl(1,ik
),occsv(1,ik
))
38 ! calculate Coulomb potential matrix elements
39 call genvmat(vclmt
,vclir
,vclmat
)
40 ! derivative of kinetic energy w.r.t. evecsv
42 ! open information files
43 open(60,file
='RDM_INFO.OUT',action
='WRITE',form
='FORMATTED')
44 ! write out general information to RDM_INFO.OUT
46 ! begin main self-consistent loop
49 write(60,'("+-------------------------+")')
50 write(60,'("| Iteration number : ",I4," |")') iscl
51 write(60,'("+-------------------------+")')
53 ! minimisation over natural orbitals
57 write(60,'("Natural orbital minimisation done")')
60 ! minimisation over occupation number
64 write(60,'("Occupation number minimisation done")')
69 ! write density to STATE.OUT
71 ! write occupation numbers for restart
73 call putoccsv(ik
,occsv(1,ik
))
75 ! close RDM_INFO.OUT file