Skip to content
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

Migrate ML utilities from schuyann/koopmans #9

Merged
merged 33 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a0de894
Start adding tests
elinscott Sep 28, 2022
183aa6c
Removing erroneously included pyc files
elinscott Sep 28, 2022
86a1e63
Completed ozone test; added benchmark
elinscott Sep 28, 2022
37a6c02
Remove erroneously included userconfig and added it to gitignore
elinscott Sep 28, 2022
132d1ed
Add erroneously omitted testcode/bin
elinscott Sep 28, 2022
c740967
Added make check procedure in base directory
elinscott Sep 28, 2022
be3c59b
Add tests to gh action
elinscott Sep 28, 2022
f19a42a
Add test output as an artifact
elinscott Sep 28, 2022
cd30052
Bug fix in stress/force routine producing Infinity/NaN.
nscolonna Oct 5, 2022
9749a72
Merge branch 'bugfix_gfortran_NaN' into add_tests
elinscott Oct 5, 2022
33768d1
Merge branch 'master' into add_tests
elinscott Oct 5, 2022
45c610e
Add Yannicks modifications to CPV/ from schuyann/koopmans/ML_merge_wi…
elinscott Oct 5, 2022
52360d5
Merge branch 'master' into add_yannick_modifications
elinscott Oct 5, 2022
8e173df
WIP: reshuffle files between Modules/ and CPV/ to straighten out depe…
elinscott Oct 7, 2022
01e6c74
Fix typo in Makefile
elinscott Oct 7, 2022
414f890
Update gitignore
elinscott Oct 7, 2022
39fb102
Merge branch 'master' into add_yannick_modifications
elinscott Oct 7, 2022
6c12d00
Add bin2xml_real_space_density to PP
elinscott Oct 7, 2022
1ecceb7
Updated pp make.depend
elinscott Oct 7, 2022
3dfcfcc
Updated gitignores
elinscott Oct 7, 2022
307d632
Sort contents of make.depends
elinscott Oct 7, 2022
906ff7a
supply width for format string
elinscott Oct 7, 2022
c71e4ca
Shortened long lines; added missing snippet from Yannick's fork
elinscott Oct 7, 2022
9e4a124
Add dumb test for bin2xml where we chech the maximum density
elinscott Nov 15, 2022
5d8f563
Add test for github ci
elinscott Nov 15, 2022
d519cd1
Upgrade to checkout v3
elinscott Nov 15, 2022
0b5a482
Add path to run-bin2xml
elinscott Nov 15, 2022
c2b3167
Remove garbage from extract-bin2xml
elinscott Nov 15, 2022
0fc03d9
Fixed job config for bin2xml
elinscott Nov 15, 2022
3c6d07f
Fixed wrong path in run-bin2xml
elinscott Nov 16, 2022
c2a432a
Simplify bin2xml_real_space_density so that it does only one bin file…
elinscott Nov 16, 2022
6dde158
Removed extraneous single_orbital f90 file
elinscott Nov 16, 2022
2cc4f08
Rename bin2xml_module to follow pattern of other PP modules
elinscott Nov 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
git config --global user.name "koopmans-kcp-tester"
git config --global user.email ${{ secrets.TESTER_EMAIL }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CPV/cpver.h
Modules/cpver.h
Modules/version.h
include/iotk_config.h
include/configure.h
include/c_defs.h
Expand All @@ -14,3 +13,4 @@ make.sys
*.mod
*.a
bin/
.vscode
18 changes: 6 additions & 12 deletions CPV/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ main.o \
mainvar.o \
main_loops.o \
cplib_meta.o \
metadyn_base.o \
metadyn_io.o \
metadyn_vars.o \
metaxc.o \
modules.o \
move_electrons.o \
Expand All @@ -66,6 +69,7 @@ ortho_base.o \
ortho.o \
ortho_check.o \
para.o \
path_base.o \
path_routines.o \
phasefactor.o \
polarization.o \
Expand All @@ -84,14 +88,13 @@ restart_sub.o \
runcp.o \
spharmonic.o \
spline.o \
stop_run.o \
stress.o \
stop_run.o \
symm_wannier.o \
turbo.o \
util.o \
vanderwaals.o \
vol_clu.o \
cp_version.o \
wannier_base.o \
wannier.o \
waveinit.o \
Expand All @@ -109,6 +112,7 @@ makov_payne.o \
pc3nc_fixed.o \
empty_koopmans_pp.o \
perturbing_pot.o \
print_real_space_orbital_density.o

# dgradcorr.o
# setup_gga.o
Expand Down Expand Up @@ -153,11 +157,7 @@ MODULES = \
../Modules/mp.o \
../Modules/mp_base.o \
../Modules/metagga.o \
../Modules/metadyn_base.o \
../Modules/metadyn_io.o \
../Modules/metadyn_vars.o \
../Modules/parallel_types.o \
../Modules/path_base.o \
../Modules/path_formats.o \
../Modules/path_variables.o \
../Modules/path_opt_routines.o \
Expand Down Expand Up @@ -231,12 +231,6 @@ libcp.a : $(FOBJS) $(WAN90) $(LOBJS)
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@

cp_version.o : cpver.h

cpver.h :
echo "CHARACTER(LEN=70), PARAMETER :: version_date = '"`date`"'" \
> cpver.h

PPOBJS = \
../Modules/xml_io_base.o \
../Modules/mp.o \
Expand Down
8 changes: 7 additions & 1 deletion CPV/cg_empty_sub.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ subroutine runcg_uspp_emp(c0_emp, cm_emp, bec_emp, f_emp, fsic_emp, n_empx, &
use uspp_param, only: nhm
use descriptors, only: descla_siz_
use input_parameters, only: odd_nkscalfact_empty, wo_odd_in_empty_run, odd_nkscalfact, &
do_outerloop_empty, reortho
do_outerloop_empty, reortho, print_real_space_density
use print_real_space_orbital_density, only: print_orbr
!
implicit none
!
Expand Down Expand Up @@ -1109,6 +1110,11 @@ subroutine runcg_uspp_emp(c0_emp, cm_emp, bec_emp, f_emp, fsic_emp, n_empx, &
WRITE (stdout, '(/,3X,"writing empty state KC Hamiltonian file: ",A)') TRIM(fname)
CALL write_ham_emp_xml(nspin, nudx_emp, lambda_emp, desc_emp, fname)
!
if (print_real_space_density) then
call print_orbr(bec, n_emps, ispin_emp, lgam, .True., c0_emp)
end if


call do_deallocation()
!
return
Expand Down
8 changes: 7 additions & 1 deletion CPV/cg_sub.f90
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ subroutine runcg_uspp(nfi, tfirst, tlast, eigr, bec, irb, eigrb, &
printout_base_close
use control_flags, only: iprint_manifold_overlap, iprint_spreads
use input_parameters, only: fixed_state, fixed_band, odd_nkscalfact, do_outerloop, &
finite_field_introduced, finite_field_for_empty_state
finite_field_introduced, finite_field_for_empty_state, &
print_real_space_density
use print_real_space_orbital_density, only: print_orbr
!
implicit none
!
Expand Down Expand Up @@ -1439,6 +1441,10 @@ subroutine runcg_uspp(nfi, tfirst, tlast, eigr, bec, irb, eigrb, &
call bforceion(fion, tfor .or. tprnfor, ipolp, qmat, bec, becdr, gqq, evalue)
end if
!
if (print_real_space_density) then
call print_orbr(bec, nbsp, ispin, lgam, .False., c0)
end if
!
call do_deallocation()
!
return
Expand Down
14 changes: 0 additions & 14 deletions CPV/cp_version.f90

This file was deleted.

2 changes: 1 addition & 1 deletion CPV/environment.f90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SUBROUTINE environment_start( )
USE io_global, ONLY: stdout, meta_ionode
USE mp_global, ONLY: mpime, nproc, me_image, &
my_image_id, root_image
USE cp_version
USE global_version

LOGICAL :: texst
INTEGER :: nchar
Expand Down
7 changes: 6 additions & 1 deletion CPV/io_pot_sic_xml.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MODULE io_pot_sic_xml
CONTAINS

!------------------------------------------------------------------------
SUBROUTINE write_pot_sic_only( pot, extension )
SUBROUTINE write_pot_sic_only( pot, extension, field_specifier)
!------------------------------------------------------------------------
!
! ... this routine writes the charge-density in xml format into the
Expand All @@ -49,6 +49,7 @@ SUBROUTINE write_pot_sic_only( pot, extension )
IMPLICIT NONE
!
REAL(DP), INTENT(IN) :: pot(dfftp%nnr)
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: field_specifier
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: extension
!
CHARACTER(LEN=256) :: dirname, file_base
Expand All @@ -65,7 +66,11 @@ SUBROUTINE write_pot_sic_only( pot, extension )
!
IF ( PRESENT( extension ) ) ext = '.' // TRIM( extension )
!
IF ( PRESENT( extension ) ) THEN
file_base = TRIM( dirname ) // '/' // TRIM(field_specifier) // TRIM( ext )
ELSE
file_base = TRIM( dirname ) // '/sic_potential' // TRIM( ext )
END IF
!
!
CALL write_pot_xml( file_base, pot(:), dfftp%nr1, dfftp%nr2, &
Expand Down
Loading