mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-27 18:54:42 +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:
parent
7ae3ab4379
commit
83ecf1ee2e
@ -69,7 +69,6 @@ default: true
|
|||||||
|
|
||||||
[ao_num_per_kpt]
|
[ao_num_per_kpt]
|
||||||
type: integer
|
type: integer
|
||||||
doc: Number of |AOs| per kpt
|
doc: Max number of |AOs| per kpt
|
||||||
default: =(ao_basis.ao_num/nuclei.kpt_num)
|
interface: ezfio, provider
|
||||||
interface: ezfio
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
BEGIN_PROVIDER [ integer, ao_num_per_kpt ]
|
!BEGIN_PROVIDER [ integer, ao_num_per_kpt ]
|
||||||
implicit none
|
! implicit none
|
||||||
BEGIN_DOC
|
! BEGIN_DOC
|
||||||
! number of aos per kpt.
|
! ! number of aos per kpt.
|
||||||
END_DOC
|
! END_DOC
|
||||||
ao_num_per_kpt = ao_num/kpt_num
|
! ao_num_per_kpt = ao_num/kpt_num
|
||||||
END_PROVIDER
|
!END_PROVIDER
|
||||||
|
@ -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 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_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 tmp_det_kpts,k_shft,ii)&
|
||||||
!$OMP SHARED(psi_det,psi_coef_complex,N_int,N_states,elec_alpha_num_kpts, &
|
!$OMP SHARED(psi_det,psi_coef_complex,N_int,N_states, &
|
||||||
!$OMP elec_beta_num_kpts,one_e_dm_mo_alpha_kpts,one_e_dm_mo_beta_kpts,N_det,&
|
!$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 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_transp_rows, psi_bilinear_matrix_transp_columns,&
|
||||||
!$OMP psi_bilinear_matrix_order_reverse, psi_det_alpha_unique, psi_det_beta_unique,&
|
!$OMP psi_bilinear_matrix_order_reverse, psi_det_alpha_unique, psi_det_beta_unique,&
|
||||||
|
@ -52,6 +52,5 @@ interface: ezfio
|
|||||||
[mo_num_per_kpt]
|
[mo_num_per_kpt]
|
||||||
type: integer
|
type: integer
|
||||||
doc: Number of |MOs| per kpt
|
doc: Number of |MOs| per kpt
|
||||||
default: =(mo_basis.mo_num/nuclei.kpt_num)
|
|
||||||
interface: ezfio
|
interface: ezfio
|
||||||
|
|
||||||
|
@ -39,6 +39,47 @@ BEGIN_PROVIDER [ integer, mo_num ]
|
|||||||
|
|
||||||
END_PROVIDER
|
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) ]
|
BEGIN_PROVIDER [ double precision, mo_coef, (ao_num,mo_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
BEGIN_PROVIDER [ integer, mo_num_per_kpt ]
|
!BEGIN_PROVIDER [ integer, mo_num_per_kpt ]
|
||||||
implicit none
|
! implicit none
|
||||||
BEGIN_DOC
|
! BEGIN_DOC
|
||||||
! number of mos per kpt.
|
! ! number of mos per kpt.
|
||||||
END_DOC
|
! END_DOC
|
||||||
mo_num_per_kpt = mo_num/kpt_num
|
! mo_num_per_kpt = mo_num/kpt_num
|
||||||
END_PROVIDER
|
!END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ complex*16, mo_coef_complex, (ao_num,mo_num) ]
|
BEGIN_PROVIDER [ complex*16, mo_coef_complex, (ao_num,mo_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -34,6 +34,8 @@ def convert_kpts(filename,qph5path):
|
|||||||
# need to change if we want to truncate orbital space within pyscf
|
# need to change if we want to truncate orbital space within pyscf
|
||||||
ezfio.set_ao_basis_ao_num(ao_num)
|
ezfio.set_ao_basis_ao_num(ao_num)
|
||||||
ezfio.set_mo_basis_mo_num(mo_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_alpha_num = elec_alpha_num
|
||||||
ezfio.electrons_elec_beta_num = elec_beta_num
|
ezfio.electrons_elec_beta_num = elec_beta_num
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user