Skip to content

Commit

Permalink
reading density matrix for ESP calculation means do only one SCf iter…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
vtripath65 committed Nov 11, 2024
1 parent ceb9461 commit d59e84c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions src/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ program quick
-(timer_end%T2elb-timer_begin%T2elb)

if (.not.quick_method%opt .and. .not.quick_method%grad) then
if(.not.quick_method%Skip)then
SAFE_CALL(getEnergy(.false.,ierr))
endif
! One electron properties (ESP, EField)

!call generate_MKS_surfaces()
Expand Down
7 changes: 1 addition & 6 deletions src/modules/quick_method_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module quick_method_module
logical :: readDMX = .false. ! flag to read density matrix
logical :: readPMat = .false. ! flag to read density matrix
logical :: writePMat = .false. ! flag to write density matrix
logical :: Skip = .false. ! Skip SCF and go to property calculations
logical :: readSAD = .true. ! flag to read SAD guess
logical :: writeSAD = .false. ! flag to write SAD guess
logical :: diisSCF = .false. ! DIIS SCF
Expand Down Expand Up @@ -250,7 +249,6 @@ subroutine broadcast_quick_method(self, ierr)
call MPI_BCAST(self%lapGridSpacing,1,mpi_double_precision,0,MPI_COMM_WORLD,mpierror)
call MPI_BCAST(self%readPMat,1,mpi_logical,0,MPI_COMM_WORLD,mpierror)
call MPI_BCAST(self%writePMat,1,mpi_logical,0,MPI_COMM_WORLD,mpierror)
call MPI_BCAST(self%Skip,1,mpi_logical,0,MPI_COMM_WORLD,mpierror)
call MPI_BCAST(self%extCharges,1,mpi_logical,0,MPI_COMM_WORLD,mpierror)
call MPI_BCAST(self%ext_grid,1,mpi_logical,0,MPI_COMM_WORLD,mpierror)
call MPI_BCAST(self%extgrid_angstrom,1,mpi_logical,0,MPI_COMM_WORLD,mpierror)
Expand Down Expand Up @@ -428,7 +426,6 @@ subroutine print_quick_method(self,io,ierr)
if (self%readDMX) write(io,'(" READ DENSITY MATRIX FROM FILE")')
if (self%readPMat) write(io,'(" READ DENSITY MATRIX From DATAFILE")')
if (self%writePMat) write(io,'(" WRITE DENSITY MATRIX TO FILE")')
if (self%Skip) write(io,'(" SKIPPING SCF CALCULATION")')
if (self%readSAD) write(io,'(" READ SAD GUESS FROM FILE")')
if (self%writeSAD) write(io,'(" WRITE SAD GUESS TO FILE")')

Expand Down Expand Up @@ -546,7 +543,7 @@ subroutine read_quick_method(self,keywd,ierr)
if(found)then
dataFileName = keyWD(i:i+j-2)
endif
Write(6,*)'dataFileName = ',dataFileName
self%iscf = 1
endif

call upcase(keyWD,300)
Expand Down Expand Up @@ -674,7 +671,6 @@ subroutine read_quick_method(self,keywd,ierr)
if (index(keyWD,'DIPOLE').ne.0) self%dipole=.true.

if (index(keyWD,'WRITE').ne.0) self%writePMat=.true.
if (index(keyWD,'SKIP').ne.0) self%Skip=.true.
if (index(keyWD,'EXTCHARGES').ne.0) self%EXTCHARGES=.true.
if (index(keyWD,'EXTGRID').ne.0) self%ext_grid=.true.
!if (index(keyWD,'EXTGRID_ANGSTROM').ne.0) self%extgrid_angstrom=.true.
Expand Down Expand Up @@ -915,7 +911,6 @@ subroutine init_quick_method(self,ierr)
self%calcDensLap = .false. ! calculate density lap
self%readPMat = .false. ! Input density matrix
self%writePMat = .false. ! Output density matrix
self%Skip = .false. ! Skipping single point SCF calculation
self%extCharges = .false. ! external charge
self%ext_grid = .false. ! external grid points
self%extgrid_angstrom = .false. ! external grid points (same as above) output in angstrom
Expand Down

0 comments on commit d59e84c

Please sign in to comment.