1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
| 1 ! open Files 2 ! read header of POSCAR file 3 ! read pseudopotentials 4 ! read INCAR 5 ! core level shift related items (parses INCAR) 6 ! loop over different smearing parameters 7 ! now read in Pseudopotential 8 ! LDA+U initialisation (parses INCAR) 10 ! optics initialisation (parses INCAR) 11 ! Read POSCAR Startjob and Continuation-job 12 ! diverse INCAR readers 13 ! exchange correlation table 14 ! init all chains (INCAR reader) 15 ! xml finish copying parameters from INCAR to xml file 16 ! for static calculations or relaxation jobs DYN%VEL is meaningless 17 ! initialize the symmetry stuff 18 ! Read KPOINTS 19 ! at this point we have enough information to create a param.inc file 20 ! set the basic quantities in WDES and set the grids 21 ! Write all important information 22 ! write out the lattice parameters 23 ! write out k-points,weights,size & positions 24 ! write out initial header for PCDAT, XDATCAR 25 ! write out initial header for DOS 26 ! write out initial header for EIGENvalueS 27 ! initialize the required grid structures 28 ! allocate work arrays 29 ! allocate wavefunctions 30 ! now read in wavefunctions 31 ! At this very point everything has been read in and we are ready to write all important information to the xml file 32 ! initialize index tables for broyden mixing 33 ! Use a reduced mesh but only if using preconditioning ... :calculate the structure-factor, initialize some arrays 34 ! set the coefficients of the plane wave basis states to zero before initialising the wavefunctions by calling WFINIT (usually random) 35 ! read Fermi-weigths from INCAR if supplied 36 ! calculate the projections of the wavefunctions onto the projection operators using real-space projection scheme or reciprocal scheme then perform an orthogonalisation of the wavefunctions 37 ! partial band decomposed chargedensities PARDENS 38 ! calculate initial chargedensity if ! ) we do not have any chargedensity ! ) we use a selfconsistent minimization scheme and do not have a delay 39 !======================== SUBROUTINE FEWALD ============================ ! calculate ewald energy forces, and stress 40 ! Set INFO%LPOTOK to false: this requires a recalculation of the ! total lokal potential 41 ! some special calculation routines such as GW, MP2 42 ! ++++++++++++ do 1000 n=1,required number of timesteps ++++++++++++++++ ! this is the main loop of the program during which one complete step of ! the electron dynamics and ionic movements is performed. 43 ! reset broyden mixing ! last energy 44 ! initialize pair-correlation funtion to zero ! also set TMEAN und SMEAN to zero ! TMEAN/SMEAN is the mean temperature 45 ! this part performs the total energy minimisation ! INFO%NELM loops are made, if the difference between two steps ! is less then INFO%EDIFF the loop is aborted 46 ! do some check for occupation numbers (do we have enough bands]: 47 ! Now perform the ion movements: 48 !====================== FORCES+STRESS ================================== ! no forces for OEP methods (EXXOEP/=0) ! no forces for IALGO=1-4 ! no forces if potential was read in INFO%INICHG==4 ! no forces if inner eigenvalue solver are used ! check the consistency of forces and total energy 49 ! we have maybe to update CVTOT here (which might have been destroyed) 50 ! electronic polarisation 51 ! add chain forces and constrain forces 52 ! CYCLE ion ! if uncommented VASP iterates forever without ionic upd 53 ! common write statment applying for most cases 54 ! do relaxations using diverse algorithms 55 ! update of ionic positions performed ! in any case POSION should now hold the new positions and ! POSIOC the old one 56 ! reached required number of time steps ! soft stop or hard stop ! if we need to pull the brake, then POSION is reset to POSIOC ! except for molecular dynamics, where the next electronic ! step should indeed correspond to POSIOC 57 ! update mean temperature mean energy 58 ! SMEAR_LOOP%ISMCNT != 0 Loop over several KPOINTS%SIGMA-values ! set new smearing parameters and continue main loop 59 ! tasks which are done all DYN%NBLOCK steps: 60 ! write out the position of the IONS to XDATCAR 61 ! acummulate dos 62 ! evaluate the pair-correlation function using the exact places ! also sum up mean temperatur 63 ! write pair-correlation and density of states ! quantities are initialized to 0 at the beginning of the main-loop 64 ! update file CONTCAR 65 !-----write out positions (only done on IONODE) 66 ! append new chargedensity to file CHG 67 ! if ions were moved recalculate some quantities 68 ! WAVPRE prediction of the new wavefunctions and charge-density ! if charge-density constant during ELM recalculate the charge-density ! according to overlapping atoms ! for relaxation jobs do not predict in the last step 69 ! call the ewald program to get the energy of the new ionic ! configuration 70 ! volume might have changed restet IRDMAX 71 ! if basis cell changed recalculate kinetic-energy array and tables 72 ! recalculate the real-space projection operators ! if volume changed also recalculate reciprocal projection operators ! and reset the cache for the phase-factor 73 ! recalculate projections and perform Gramm-Schmidt orthogonalization 74 ! wavefunctions are not diagonal, so if they are written to the file ! or if we do not diagonalize before the optimization ! rotate them now ! for the selfconsistent update set TOTEN now ! in any case we have to call RSPHER at this point even if the ions do not move ! since the force routine overwrites the required arrays 75 ! update file WAVECAR if INFO%LSTOP = .TRUE. ! or if wavefunctions on file TMPCAR are rotated 76 ! after 10 steps rotate the wavefunctions on the file 77 ! rotate wavefunctions on file (gives a better prediction) ! and read in wavefunctions (destroyed by WAVPRE) 78 ! next electronic energy minimisation 79 ! here we are at the end of the required number of timesteps 80 ! write out some additional information ! create the File CHGCAR 81 ! Write out the Eigenvalues 82 ! get current density and write output 83 ! calculate optical matrix elements 84 ! calculate four orbital integrals 85 ! MM: Stuff for Janos Angyan: write the AE-charge density to AECCAR2 86 ! calculate ELF 87 ! write ELF to file ELFCAR 88 ! STM calculation 89 ! total DOS, calculate ion and lm decomposed occupancies and dos 90 ! breath a sigh of relief - you have finished ! this jump is just a jump to the END statement 91 ! here we have sum code to test performance ! Output is written to IUT
|