Changeset 6351
- Timestamp:
- 03/11/10 20:01:22 (6 months ago)
- Files:
-
- 1 modified
-
trunk/src/main/static_pol.F90 (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/static_pol.F90
r6349 r6351 68 68 type(states_t), pointer :: st 69 69 70 integer :: iunit, ios, i_start, ii, jj, is, isign, ierr, read_count 70 integer :: iunit, ios, i_start, ii, jj, is, isign, ierr, read_count, verbosity 71 71 FLOAT :: e_field 72 72 FLOAT, allocatable :: Vpsl_save(:), trrho(:), dipole(:, :, :) … … 75 75 FLOAT :: center_dipole(1:MAX_DIM), diag_dipole(1:MAX_DIM), ionic_dipole(1:MAX_DIM), print_dipole(1:MAX_DIM) 76 76 type(born_charges_t) :: born_charges 77 logical :: calc_Born, start_density_is_zero_field, write_restart_densities, calc_diagonal 77 logical :: calc_Born, start_density_is_zero_field, write_restart_densities, calc_diagonal, verbose 78 78 logical :: diagonal_done, center_written, fromScratch_local 79 79 character(len=80) :: fname, dir_name … … 144 144 145 145 if(iand(sys%outp%what, output_density) .ne. 0 .or. & 146 iand(sys%outp%what, output_pol_density) .ne. 0 .or. calc_Born) then 147 i_start = 1 148 diagonal_done = .false. 146 iand(sys%outp%what, output_pol_density) .ne. 0) then 147 if(i_start .gt. 2 .and. calc_diagonal) then 148 i_start = 2 149 diagonal_done = .false. 150 !FIXME: take derivatives between yz and z (not y) so can restart from only last (z) calc 151 endif 149 152 endif 150 153 … … 187 190 write(message(2), '(a)') 'Info: Calculating dipole moment for zero field.' 188 191 call write_info(2) 189 call scf_run(scfv, sys%gr, sys%geo, st, sys%ks, hm, sys%outp, gs_run=.false., verbosity = VERB_COMPACT)192 call scf_run(scfv, sys%gr, sys%geo, st, sys%ks, hm, sys%outp, gs_run=.false., verbosity = verbosity) 190 193 191 194 gs_rho(1:gr%mesh%np, 1:st%d%nspin) = st%rho(1:gr%mesh%np, 1:st%d%nspin) … … 252 255 253 256 call scf_mix_clear(scfv) 254 call scf_run(scfv, sys%gr, sys%geo, st, sys%ks, hm, sys%outp, gs_run=.false., verbosity = VERB_COMPACT)257 call scf_run(scfv, sys%gr, sys%geo, st, sys%ks, hm, sys%outp, gs_run=.false., verbosity = verbosity) 255 258 256 259 trrho = M_ZERO … … 329 332 330 333 call scf_mix_clear(scfv) 331 call scf_run(scfv, sys%gr, sys%geo, st, sys%ks, hm, sys%outp, gs_run=.false., verbosity = VERB_COMPACT)334 call scf_run(scfv, sys%gr, sys%geo, st, sys%ks, hm, sys%outp, gs_run=.false., verbosity = verbosity) 332 335 333 336 trrho = M_ZERO … … 441 444 !%End 442 445 call parse_logical(datasets_check('EMWriteRestartDensities'), .true., write_restart_densities) 446 447 !%Variable EMVerbose 448 !%Type logical 449 !%Default false 450 !%Section Linear Response::Static Polarization 451 !%Description 452 !% Write full SCF output. 453 !% Only applies if <tt>ResponseMethod = finite_differences</tt>. 454 !%End 455 call parse_logical(datasets_check('EMVerbose'), .false., verbose) 456 457 if(verbose) then 458 verbosity = VERB_FULL 459 else 460 verbosity = VERB_COMPACT 461 endif 443 462 444 463 call pop_sub() … … 662 681 iand(sys%outp%what, output_pol_density) .ne. 0) then 663 682 SAFE_DEALLOCATE_A(lr_rho) 683 SAFE_DEALLOCATE_A(lr_rho2) 664 684 end if 665 685
