10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-24 14:12:24 +02:00

modifications for kpts

{ao,mo}_num_per_kpt were being set as floats in python
now imported explicitly as ints
no default (could maybe fix with // ?)
This commit is contained in:
Kevin Gasperich 2020-06-22 10:51:33 -05:00
parent 7ae3ab4379
commit 83ecf1ee2e
7 changed files with 61 additions and 20 deletions

View File

@ -69,7 +69,6 @@ default: true
[ao_num_per_kpt]
type: integer
doc: Number of |AOs| per kpt
default: =(ao_basis.ao_num/nuclei.kpt_num)
interface: ezfio
doc: Max number of |AOs| per kpt
interface: ezfio, provider

View File

@ -1,7 +1,7 @@
BEGIN_PROVIDER [ integer, ao_num_per_kpt ]
implicit none
BEGIN_DOC
! number of aos per kpt.
END_DOC
ao_num_per_kpt = ao_num/kpt_num
END_PROVIDER
!BEGIN_PROVIDER [ integer, ao_num_per_kpt ]
! implicit none
! BEGIN_DOC
! ! number of aos per kpt.
! END_DOC
! ao_num_per_kpt = ao_num/kpt_num
!END_PROVIDER

View File

@ -441,8 +441,8 @@ END_PROVIDER
!$OMP PRIVATE(j,k,k_a,k_b,l,m,occ,ck, cl, ckl,phase,h1,h2,p1,p2,s1,s2, degree,exc,&
!$OMP tmp_a, tmp_b, n_occ, krow, kcol, lrow, lcol, tmp_det, tmp_det2,ih1,ip1,kh1,kp1,kk,&
!$OMP tmp_det_kpts,k_shft,ii)&
!$OMP SHARED(psi_det,psi_coef_complex,N_int,N_states,elec_alpha_num_kpts, &
!$OMP elec_beta_num_kpts,one_e_dm_mo_alpha_kpts,one_e_dm_mo_beta_kpts,N_det,&
!$OMP SHARED(psi_det,psi_coef_complex,N_int,N_states, &
!$OMP one_e_dm_mo_alpha_kpts,one_e_dm_mo_beta_kpts,N_det,&
!$OMP mo_num_per_kpt,psi_bilinear_matrix_rows,psi_bilinear_matrix_columns,&
!$OMP psi_bilinear_matrix_transp_rows, psi_bilinear_matrix_transp_columns,&
!$OMP psi_bilinear_matrix_order_reverse, psi_det_alpha_unique, psi_det_beta_unique,&

View File

@ -52,6 +52,5 @@ interface: ezfio
[mo_num_per_kpt]
type: integer
doc: Number of |MOs| per kpt
default: =(mo_basis.mo_num/nuclei.kpt_num)
interface: ezfio

View File

@ -39,6 +39,47 @@ BEGIN_PROVIDER [ integer, mo_num ]
END_PROVIDER
BEGIN_PROVIDER [ integer, mo_num_per_kpt ]
implicit none
BEGIN_DOC
! Number of MOs per kpt
END_DOC
logical :: has
PROVIDE ezfio_filename
if (mpi_master) then
call ezfio_has_mo_basis_mo_num_per_kpt(has)
endif
IRP_IF MPI_DEBUG
print *, irp_here, mpi_rank
call MPI_BARRIER(MPI_COMM_WORLD, ierr)
IRP_ENDIF
IRP_IF MPI
include 'mpif.h'
integer :: ierr
call MPI_BCAST( has, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
if (ierr /= MPI_SUCCESS) then
stop 'Unable to read mo_num_per_kpt with MPI'
endif
IRP_ENDIF
if (.not.has) then
mo_num_per_kpt = ao_ortho_canonical_num_per_kpt_max
else
if (mpi_master) then
call ezfio_get_mo_basis_mo_num_per_kpt(mo_num_per_kpt)
endif
IRP_IF MPI
call MPI_BCAST( mo_num_per_kpt, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
if (ierr /= MPI_SUCCESS) then
stop 'Unable to read mo_num_per_kpt with MPI'
endif
IRP_ENDIF
endif
call write_int(6,mo_num_per_kpt,'mo_num_per_kpt')
ASSERT (mo_num_per_kpt > 0)
END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_coef, (ao_num,mo_num) ]
implicit none

View File

@ -1,10 +1,10 @@
BEGIN_PROVIDER [ integer, mo_num_per_kpt ]
implicit none
BEGIN_DOC
! number of mos per kpt.
END_DOC
mo_num_per_kpt = mo_num/kpt_num
END_PROVIDER
!BEGIN_PROVIDER [ integer, mo_num_per_kpt ]
! implicit none
! BEGIN_DOC
! ! number of mos per kpt.
! END_DOC
! mo_num_per_kpt = mo_num/kpt_num
!END_PROVIDER
BEGIN_PROVIDER [ complex*16, mo_coef_complex, (ao_num,mo_num) ]
implicit none

View File

@ -34,6 +34,8 @@ def convert_kpts(filename,qph5path):
# need to change if we want to truncate orbital space within pyscf
ezfio.set_ao_basis_ao_num(ao_num)
ezfio.set_mo_basis_mo_num(mo_num)
ezfio.set_ao_basis_ao_num_per_kpt(ao_num//kpt_num)
ezfio.set_mo_basis_mo_num_per_kpt(mo_num//kpt_num)
ezfio.electrons_elec_alpha_num = elec_alpha_num
ezfio.electrons_elec_beta_num = elec_beta_num