-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add maximum overlap method in hartree fock #347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
do j = 1, mo_num ! curent mo | ||
do k = 1, ao_num | ||
do l = 1, ao_num | ||
overlap(i,j) += mo_coef_begin_iteration(k,i)* ao_overlap(k,l) * mo_coef(l,j) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change ao_overlap(k,l)
into ao_overlap(l,k)
for better array access :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it would be better to use dgemm here:
call dgemm('T','N', mo_num, ao_num, ao_num, 1.d0, &
mo_coef_begin_iteration, size(mo_coef_begin_iteration,1), &
ao_overlap, size(ao_overlap,1), 0.d0, &
tmp, size(tmp,1))
call dgemm('N','N', mo_num, mo_num, ao_num, 1.d0, &
tmp, size(tmp,1), &
mo_coef, size(mo_coef, 1), 0.d0, &
overlap, size(overlap,1) )
overlap_alpha(:,:) = 0d0 | ||
proj_alpha(:) = 0d0 | ||
iorder_alpha(:) = 0d0 | ||
do i = 1, mo_num ! old mo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, dgemm!!!
! if ( (SCF_algorithm == 'DIIS').and.(Delta_Energy_SCF > 0.d0) ) then | ||
! Fock_matrix_AO(1:ao_num,1:ao_num) = Fock_matrix_DIIS (1:ao_num,1:ao_num,index_dim_DIIS) | ||
! Fock_matrix_AO_alpha = Fock_matrix_AO*0.5d0 | ||
! Fock_matrix_AO_beta = Fock_matrix_AO*0.5d0 | ||
! TOUCH Fock_matrix_AO_alpha Fock_matrix_AO_beta | ||
! endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't comment, delete please
This commit introduces the do_mom keyword in scf_utils to run maximum overlap method hartree-fock calculation.