Skip to content

Commit

Permalink
patch up args to legacy library
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Jackson committed Mar 28, 2022
1 parent ecdfecb commit cc56543
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
18 changes: 8 additions & 10 deletions src/wannier_lib.F90
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,12 @@ module w90_wannier90_libv1_types
end module w90_wannier90_libv1_types

!================================================!
subroutine wannier_setup(seed__name, mp_grid_loc, num_kpts_loc, real_lattice_loc, recip_lattice_loc, &
kpt_latt_loc, &
num_bands_tot, num_atoms_loc, atom_symbols_loc, atoms_cart_loc, &
gamma_only_loc, spinors_loc, nntot_loc, nnlist_loc, nncell_loc, &
num_bands_loc, num_wann_loc, proj_site_loc, proj_l_loc, proj_m_loc, &
proj_radial_loc, proj_z_loc, proj_x_loc, proj_zona_loc, &
exclude_bands_loc, proj_s_loc, proj_s_qaxis_loc)
subroutine wannier_setup(seed__name, mp_grid_loc, num_kpts_loc, real_lattice_loc, &
recip_lattice_loc, kpt_latt_loc, num_bands_tot, num_atoms_loc, &
atom_symbols_loc, atoms_cart_loc, gamma_only_loc, spinors_loc, &
nntot_loc, nnlist_loc, nncell_loc, num_bands_loc, num_wann_loc, &
proj_site_loc, proj_l_loc, proj_m_loc, proj_radial_loc, proj_z_loc, &
proj_x_loc, proj_zona_loc, exclude_bands_loc, proj_s_loc, proj_s_qaxis_loc)
!================================================!
!! This routine should be called first from a code calling the library
!! mode to setup all the variables.
Expand Down Expand Up @@ -409,9 +408,8 @@ end subroutine wannier_setup

!================================================!
subroutine wannier_run(seed__name, mp_grid_loc, num_kpts_loc, real_lattice_loc, recip_lattice_loc, &
kpt_latt_loc, &
num_bands_loc, num_wann_loc, nntot_loc, num_atoms_loc, atom_symbols_loc, &
atoms_cart_loc, gamma_only_loc, M_matrix_loc, A_matrix_loc, &
kpt_latt_loc, num_bands_loc, num_wann_loc, nntot_loc, num_atoms_loc, &
atom_symbols_loc, atoms_cart_loc, gamma_only_loc, M_matrix_loc, A_matrix_loc, &
eigenvalues_loc, U_matrix_loc, U_matrix_opt_loc, lwindow_loc, &
wann_centres_loc, wann_spreads_loc, spread_loc)

Expand Down
21 changes: 10 additions & 11 deletions test-suite/library-mode-test/test_library.F90
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ program test_library
print *, '#spinors_loc:', spinors_loc
end if

call wannier_setup(seed__name, mp_grid_loc, num_kpts_loc, &
real_lattice_loc, kpt_latt_loc, num_bands_tot, &
num_atoms_loc, atom_symbols_loc, atoms_cart_loc, gamma_only_loc, spinors_loc, &
nntot_loc, nnlist_loc, nncell_loc, num_bands_loc, num_wann_loc, &
proj_site_loc, proj_l_loc, proj_m_loc, proj_radial_loc, proj_z_loc, &
proj_x_loc, proj_zona_loc, exclude_bands_loc, proj_s_loc, proj_s_qaxis_loc)
call wannier_setup(seed__name, mp_grid_loc, num_kpts_loc, real_lattice_loc, recip_lattice_loc, &
kpt_latt_loc, num_bands_tot, num_atoms_loc, atom_symbols_loc, atoms_cart_loc, &
gamma_only_loc, spinors_loc, nntot_loc, nnlist_loc, nncell_loc, &
num_bands_loc, num_wann_loc, proj_site_loc, proj_l_loc, proj_m_loc, &
proj_radial_loc, proj_z_loc, proj_x_loc, proj_zona_loc, exclude_bands_loc, &
proj_s_loc, proj_s_qaxis_loc)

if (verbose) then
print *, "# WANNIER_SETUP CALLED."
Expand Down Expand Up @@ -510,11 +510,10 @@ program test_library

if (verbose) print *, "# SECOND ALLOCATION PHASE COMPLETED."

call wannier_run(seed__name, mp_grid_loc, num_kpts_loc, &
real_lattice_loc, kpt_latt_loc, num_bands_loc, &
num_wann_loc, nntot_loc, num_atoms_loc, atom_symbols_loc, &
atoms_cart_loc, gamma_only_loc, M_matrix_loc, A_matrix_loc, eigenvalues_loc, &
U_matrix_loc, U_matrix_opt_loc, lwindow_loc, wann_centres_loc, &
call wannier_run(seed__name, mp_grid_loc, num_kpts_loc, real_lattice_loc, recip_lattice_loc, &
kpt_latt_loc, num_bands_loc, num_wann_loc, nntot_loc, num_atoms_loc, &
atom_symbols_loc, atoms_cart_loc, gamma_only_loc, M_matrix_loc, A_matrix_loc, &
eigenvalues_loc, U_matrix_loc, U_matrix_opt_loc, lwindow_loc, wann_centres_loc, &
wann_spreads_loc, spread_loc)

if (verbose) print *, "# WANNIER_RUN CALLED."
Expand Down

0 comments on commit cc56543

Please sign in to comment.