From d55d7e8d1a53b799e0c01be44ccb9538bdff9817 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Wed, 18 Dec 2019 22:56:44 +0800 Subject: [PATCH 1/7] Create docs.yml try to build docs automatically by actions --- .github/workflows/docs.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..5182ebf9c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,25 @@ +# docs.yaml +name: Auto update docs for master branch +on: + push: + branches: + - master +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Build and Deploy + uses: JamesIves/github-pages-deploy-action@master + env: + ACCESS_TOKEN: ${{ secrets.BUILD_DOCS_ACCESS_TOKEN }} + BRANCH: gh-pages + FOLDER: html-site + BUILD_SCRIPT: | + apt-get install python3-pip -y && + pip3 install sphinx && + pip3 install sphinxcontrib-napoleon && + pip3 install m2r && + cd docs && make html && mv _build/html/ ../html-site && cd .. From 578548345072f8ac6de5df7a884ed343c0c11efb Mon Sep 17 00:00:00 2001 From: Han Wang Date: Thu, 19 Dec 2019 12:15:18 +0800 Subject: [PATCH 2/7] fix bug in doc display --- .github/workflows/docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5182ebf9c..150f331da 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,7 +19,10 @@ jobs: FOLDER: html-site BUILD_SCRIPT: | apt-get install python3-pip -y && - pip3 install sphinx && + pip3 install sphinx==1.7.5 && pip3 install sphinxcontrib-napoleon && + pip3 install numpy && + pip3 install monty && pip3 install m2r && + python3 setup.py install && cd docs && make html && mv _build/html/ ../html-site && cd .. From 6946f7fb1467a8d7b62098f476a085d29234eb90 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Thu, 6 Feb 2020 13:08:07 +0800 Subject: [PATCH 3/7] fix the bug when the energy has shape () --- dpdata/deepmd/comp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dpdata/deepmd/comp.py b/dpdata/deepmd/comp.py index 5f52c1a0f..ae6fb257a 100644 --- a/dpdata/deepmd/comp.py +++ b/dpdata/deepmd/comp.py @@ -33,6 +33,8 @@ def to_system_data(folder, nframes = np.reshape(cells, [-1,3,3]).shape[0] all_cells.append(np.reshape(cells, [nframes,3,3])) all_coords.append(np.reshape(coords, [nframes,-1,3])) + if eners is not None: + eners = np.reshape(eners, [nframes]) if labels: if eners is not None and len(eners) > 0: all_eners.append(np.reshape(eners, [nframes])) From d043b1b35f70f8b9361f6f962f158e3092a63e03 Mon Sep 17 00:00:00 2001 From: Haruka <990628wjy@gmail.com> Date: Tue, 7 Apr 2020 11:42:16 +0800 Subject: [PATCH 4/7] fix a bug --- dpdata/system.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dpdata/system.py b/dpdata/system.py index 44440a714..3ee81a943 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -69,7 +69,8 @@ def __init__ (self, type_map = None, begin = 0, step = 1, - data = None) : + data = None, + **kwargs) : """ Constructor @@ -113,7 +114,7 @@ def __init__ (self, return if file_name is None : return - self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step) + self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step, **kwargs) if type_map is not None: self.apply_type_map(type_map) @@ -898,7 +899,8 @@ def __init__ (self, type_map = None, begin = 0, step = 1, - data=None) : + data=None, + **kwargs) : """ Constructor @@ -941,7 +943,7 @@ def __init__ (self, return if file_name is None : return - self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step) + self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step, **kwargs) if type_map is not None: self.apply_type_map(type_map) From c52828b73cb5bfd82f56cad20d7d31cc1def1693 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Thu, 9 Apr 2020 15:08:23 +0800 Subject: [PATCH 5/7] fix bug of install gromacs --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 57c8d4030..8819cda49 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,9 @@ 'dpdata/xyz', 'dpdata/pwmat', 'dpdata/amber', - 'dpdata/fhi_aims'], + 'dpdata/fhi_aims', + 'dpdata/gromacs' + ], package_data={'dpdata':['*.json']}, classifiers=[ "Programming Language :: Python :: 3.6", From a843feec3149226197bb4c22e091e8b4cbbd4d32 Mon Sep 17 00:00:00 2001 From: Chentao168 Date: Sat, 9 Jan 2021 21:10:25 +0800 Subject: [PATCH 6/7] new_energy --- dpdata/qe/scf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dpdata/qe/scf.py b/dpdata/qe/scf.py index 33bbdbc9a..613bed4d7 100755 --- a/dpdata/qe/scf.py +++ b/dpdata/qe/scf.py @@ -64,10 +64,11 @@ def get_coords (lines) : return list(atom_names), atom_numbs, atom_types, coord def get_energy (lines) : + energy = None for ii in lines : if '! total energy' in ii : - return ry2ev * float(ii.split('=')[1].split()[0]) - return None + energy = ry2ev * float(ii.split('=')[1].split()[0]) + return energy def get_force (lines) : blk = get_block(lines, 'Forces acting on atoms', skip = 1) From bcda8688017862ddd111503572f8b1f5dce3a48b Mon Sep 17 00:00:00 2001 From: Chentao168 Date: Mon, 1 Feb 2021 23:15:46 +0800 Subject: [PATCH 7/7] test --- tests/qe.scf/Al.in | 43 +++ tests/qe.scf/Al.out | 557 +++++++++++++++++++++++++++++ tests/test_qe_pw_scf_energy_bug.py | 24 ++ 3 files changed, 624 insertions(+) create mode 100755 tests/qe.scf/Al.in create mode 100644 tests/qe.scf/Al.out create mode 100644 tests/test_qe_pw_scf_energy_bug.py diff --git a/tests/qe.scf/Al.in b/tests/qe.scf/Al.in new file mode 100755 index 000000000..e3a430142 --- /dev/null +++ b/tests/qe.scf/Al.in @@ -0,0 +1,43 @@ +&CONTROL + calculation = "scf", + pseudo_dir = "../", + prefix = "Aluminium", + wf_collect = .True., + tstress = .True., + tprnfor = .True., + outdir = "./", + iprint = 1, +/ +&SYSTEM + ibrav = 0, + nat = 4, + ntyp = 1, + occupations ='smearing', + smearing ='fermi-dirac', + degauss = 0.001d0, + nosym = .true., + ecutwfc = 50, + nbnd = 12, +/ +&ELECTRONS + electron_maxstep = 200, + mixing_mode = 'plain', + conv_thr = 1.0D-8, + mixing_beta = 0.7D0, +/ +CELL_PARAMETERS (angstrom) +4.04 0 0 +0 4.04 0 +0 0 4.04 + +ATOMIC_SPECIES +Al 26.98 Al.pbe-n-nc.UPF + +ATOMIC_POSITIONS (crystal) +Al 0 0 0 +Al 0 0.5 0.5 +Al 0.5 0 0.5 +Al 0.5 0.5 0 + +K_POINTS (automatic) +2 2 2 0 0 0 diff --git a/tests/qe.scf/Al.out b/tests/qe.scf/Al.out new file mode 100644 index 000000000..882ccba83 --- /dev/null +++ b/tests/qe.scf/Al.out @@ -0,0 +1,557 @@ + + Program PWSCF v.6.7MaX starts on 1Feb2021 at 22:29:45 + + This program is part of the open-source Quantum ESPRESSO suite + for quantum simulation of materials; please cite + "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009); + "P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017); + URL http://www.quantum-espresso.org", + in publications or presentations arising from this work. More details at + http://www.quantum-espresso.org/quote + + Parallel version (MPI), running on 8 processors + + MPI processes distributed on 1 nodes + R & G space division: proc/nbgrp/npool/nimage = 8 + Reading input from Al.in + + Current dimensions of program PWSCF are: + Max number of different atomic species (ntypx) = 10 + Max number of k-points (npk) = 40000 + Max angular momentum in pseudopotentials (lmaxx) = 3 + + Subspace diagonalization in iterative solution of the eigenvalue problem: + one sub-group per band group will be used + scalapack distributed-memory algorithm (size of sub-group: 2* 2 procs) + + Found symmetry operation: I + ( 0.0000 -0.5000 -0.5000) + This is a supercell, fractional translations are disabled + + Parallelization info + -------------------- + sticks: dense smooth PW G-vecs: dense smooth PW + Min 116 116 35 2654 2654 446 + Max 117 117 37 2657 2657 447 + Sum 933 933 285 21247 21247 3575 + + + + bravais-lattice index = 0 + lattice parameter (alat) = 7.6345 a.u. + unit-cell volume = 444.9802 (a.u.)^3 + number of atoms/cell = 4 + number of atomic types = 1 + number of electrons = 12.00 + number of Kohn-Sham states= 12 + kinetic-energy cutoff = 50.0000 Ry + charge density cutoff = 200.0000 Ry + scf convergence threshold = 1.0E-08 + mixing beta = 0.7000 + number of iterations used = 8 plain mixing + Exchange-correlation= PBE + ( 1 4 3 4 0 0 0) + + celldm(1)= 7.634494 celldm(2)= 0.000000 celldm(3)= 0.000000 + celldm(4)= 0.000000 celldm(5)= 0.000000 celldm(6)= 0.000000 + + crystal axes: (cart. coord. in units of alat) + a(1) = ( 1.000000 0.000000 0.000000 ) + a(2) = ( 0.000000 1.000000 0.000000 ) + a(3) = ( 0.000000 0.000000 1.000000 ) + + reciprocal axes: (cart. coord. in units 2 pi/alat) + b(1) = ( 1.000000 0.000000 0.000000 ) + b(2) = ( 0.000000 1.000000 0.000000 ) + b(3) = ( 0.000000 0.000000 1.000000 ) + + + PseudoPot. # 1 for Al read from file: + ../Al.pbe-n-nc.UPF + MD5 check sum: f1c8cd6d2c6964a193fa1ea9a097ceb9 + Pseudo is Norm-conserving + core correction, Zval = 3.0 + Generated using "atomic" code by A. Dal Corso v.5.0.2 svn rev. 9656 + Using radial grid of 1135 points, 2 beta functions with: + l(1) = 0 + l(2) = 1 + + atomic species valence mass pseudopotential + Al 3.00 26.98000 Al( 1.00) + + No symmetry found + + + + Cartesian axes + + site n. atom positions (alat units) + 1 Al tau( 1) = ( 0.0000000 0.0000000 0.0000000 ) + 2 Al tau( 2) = ( 0.0000000 0.5000000 0.5000000 ) + 3 Al tau( 3) = ( 0.5000000 0.0000000 0.5000000 ) + 4 Al tau( 4) = ( 0.5000000 0.5000000 0.0000000 ) + + number of k points= 8 Fermi-Dirac smearing, width (Ry)= 0.0010 + cart. coord. in units 2pi/alat + k( 1) = ( 0.0000000 0.0000000 0.0000000), wk = 0.2500000 + k( 2) = ( 0.0000000 0.0000000 -0.5000000), wk = 0.2500000 + k( 3) = ( 0.0000000 -0.5000000 0.0000000), wk = 0.2500000 + k( 4) = ( 0.0000000 -0.5000000 -0.5000000), wk = 0.2500000 + k( 5) = ( -0.5000000 0.0000000 0.0000000), wk = 0.2500000 + k( 6) = ( -0.5000000 0.0000000 -0.5000000), wk = 0.2500000 + k( 7) = ( -0.5000000 -0.5000000 0.0000000), wk = 0.2500000 + k( 8) = ( -0.5000000 -0.5000000 -0.5000000), wk = 0.2500000 + + Dense grid: 21247 G-vectors FFT dimensions: ( 36, 36, 36) + + Estimated max dynamical RAM per process > 2.53 MB + + Estimated total dynamical RAM > 20.22 MB + + Check: negative core charge= -0.000005 + + Initial potential from superposition of free atoms + + starting charge 11.99084, renormalised to 12.00000 + Starting wfcs are 16 randomized atomic wfcs + + total cpu time spent up to now is 0.2 secs + + Self-consistent Calculation + + iteration # 1 ecut= 50.00 Ry beta= 0.70 + Davidson diagonalization with overlap + ethr = 1.00E-02, avg # of iterations = 2.8 + + Threshold (ethr) on eigenvalues was too large: + Diagonalizing with lowered threshold + + Davidson diagonalization with overlap + ethr = 3.17E-04, avg # of iterations = 1.9 + + total cpu time spent up to now is 0.6 secs + + k = 0.0000 0.0000 0.0000 band energies (ev): + + -3.2360 5.0027 5.0027 5.0027 6.3490 6.3490 6.3490 13.5555 + 13.5556 13.5556 13.5556 13.5556 + + k = 0.0000 0.0000-0.5000 band energies (ev): + + -0.9727 -0.9727 7.0885 7.0885 7.0886 7.0886 8.0679 8.0679 + 9.1152 9.1152 15.4767 15.4768 + + k = 0.0000-0.5000 0.0000 band energies (ev): + + -0.9727 -0.9727 7.0885 7.0885 7.0885 7.0886 8.0679 8.0679 + 9.1152 9.1152 15.4767 15.4767 + + k = 0.0000-0.5000-0.5000 band energies (ev): + + 1.2520 1.2520 1.2520 1.2520 9.1779 9.1779 9.1779 9.1780 + 10.6997 10.6997 10.6997 10.6997 + + k =-0.5000 0.0000 0.0000 band energies (ev): + + -0.9727 -0.9727 7.0885 7.0885 7.0886 7.0886 8.0679 8.0679 + 9.1152 9.1152 15.4767 15.4768 + + k =-0.5000 0.0000-0.5000 band energies (ev): + + 1.2520 1.2520 1.2520 1.2520 9.1779 9.1779 9.1780 9.1780 + 10.6997 10.6997 10.6997 10.6997 + + k =-0.5000-0.5000 0.0000 band energies (ev): + + 1.2520 1.2520 1.2520 1.2520 9.1779 9.1779 9.1780 9.1780 + 10.6997 10.6997 10.6997 10.6997 + + k =-0.5000-0.5000-0.5000 band energies (ev): + + 3.3086 3.3086 3.3086 3.3087 3.5896 3.5896 3.5896 3.5896 + 19.3649 19.3650 19.3650 19.3651 + + the Fermi energy is 8.0679 ev + +! total energy = -21.76174003 Ry + estimated scf accuracy < 0.03820994 Ry + smearing contrib. (-TS) = -0.00103972 Ry + internal energy E=F+TS = -21.76070031 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = 11.87797707 Ry + hartree contribution = 0.02122794 Ry + xc contribution = -12.10349065 Ry + ewald contribution = -21.61964430 Ry + scf correction = 0.06322963 Ry + + iteration # 2 ecut= 50.00 Ry beta= 0.70 + Davidson diagonalization with overlap + ethr = 3.18E-04, avg # of iterations = 1.0 + + total cpu time spent up to now is 0.8 secs + + k = 0.0000 0.0000 0.0000 band energies (ev): + + -3.2685 4.9748 4.9748 4.9748 6.3005 6.3005 6.3006 13.4945 + 13.4945 13.4946 13.4946 13.4947 + + k = 0.0000 0.0000-0.5000 band energies (ev): + + -1.0064 -1.0062 7.0578 7.0578 7.0580 7.0580 8.0797 8.0798 + 8.9742 8.9743 15.4122 15.4124 + + k = 0.0000-0.5000 0.0000 band energies (ev): + + -1.0067 -1.0060 7.0576 7.0576 7.0582 7.0583 8.0797 8.0798 + 8.9742 8.9743 15.4120 15.4123 + + k = 0.0000-0.5000-0.5000 band energies (ev): + + 1.2169 1.2173 1.2178 1.2180 9.1439 9.1442 9.1447 9.1448 + 10.6348 10.6351 10.6357 10.6359 + + k =-0.5000 0.0000 0.0000 band energies (ev): + + -1.0065 -1.0062 7.0577 7.0578 7.0581 7.0581 8.0797 8.0798 + 8.9742 8.9743 15.4122 15.4123 + + k =-0.5000 0.0000-0.5000 band energies (ev): + + 1.2172 1.2174 1.2176 1.2178 9.1442 9.1444 9.1445 9.1447 + 10.6351 10.6353 10.6355 10.6357 + + k =-0.5000-0.5000 0.0000 band energies (ev): + + 1.2169 1.2173 1.2177 1.2180 9.1439 9.1442 9.1446 9.1449 + 10.6348 10.6352 10.6356 10.6360 + + k =-0.5000-0.5000-0.5000 band energies (ev): + + 3.3028 3.3030 3.3030 3.3031 3.5193 3.5194 3.5194 3.5195 + 19.2453 19.2454 19.2454 19.2455 + + the Fermi energy is 8.0798 ev + +! total energy = -21.76159248 Ry + estimated scf accuracy < 0.00229810 Ry + smearing contrib. (-TS) = -0.00103972 Ry + internal energy E=F+TS = -21.76055276 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = 11.88942524 Ry + hartree contribution = 0.02870492 Ry + xc contribution = -12.06302033 Ry + ewald contribution = -21.61964430 Ry + scf correction = 0.00398171 Ry + + iteration # 3 ecut= 50.00 Ry beta= 0.70 + Davidson diagonalization with overlap + ethr = 1.92E-05, avg # of iterations = 1.2 + + total cpu time spent up to now is 1.0 secs + + k = 0.0000 0.0000 0.0000 band energies (ev): + + -3.2755 4.9705 4.9705 4.9705 6.2861 6.2863 6.2865 13.4778 + 13.4779 13.4779 13.4780 13.4780 + + k = 0.0000 0.0000-0.5000 band energies (ev): + + -1.0139 -1.0135 7.0525 7.0526 7.0529 7.0529 8.0850 8.0855 + 8.9312 8.9313 15.3944 15.3946 + + k = 0.0000-0.5000 0.0000 band energies (ev): + + -1.0139 -1.0135 7.0525 7.0525 7.0530 7.0530 8.0850 8.0855 + 8.9313 8.9313 15.3944 15.3946 + + k = 0.0000-0.5000-0.5000 band energies (ev): + + 1.2094 1.2098 1.2098 1.2102 9.1379 9.1383 9.1384 9.1387 + 10.6162 10.6165 10.6166 10.6169 + + k =-0.5000 0.0000 0.0000 band energies (ev): + + -1.0138 -1.0137 7.0527 7.0527 7.0528 7.0528 8.0852 8.0853 + 8.9313 8.9313 15.3945 15.3945 + + k =-0.5000 0.0000-0.5000 band energies (ev): + + 1.2095 1.2097 1.2099 1.2100 9.1380 9.1382 9.1384 9.1386 + 10.6164 10.6165 10.6166 10.6167 + + k =-0.5000-0.5000 0.0000 band energies (ev): + + 1.2095 1.2097 1.2100 1.2101 9.1380 9.1382 9.1385 9.1386 + 10.6163 10.6164 10.6167 10.6168 + + k =-0.5000-0.5000-0.5000 band energies (ev): + + 3.3040 3.3044 3.3045 3.3049 3.5002 3.5004 3.5005 3.5007 + 19.2100 19.2101 19.2101 19.2103 + + the Fermi energy is 8.0853 ev + +! total energy = -21.76175335 Ry + estimated scf accuracy < 0.00000644 Ry + smearing contrib. (-TS) = -0.00103967 Ry + internal energy E=F+TS = -21.76071368 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = 11.89482626 Ry + hartree contribution = 0.02889136 Ry + xc contribution = -12.06507400 Ry + ewald contribution = -21.61964430 Ry + scf correction = 0.00028700 Ry + + iteration # 4 ecut= 50.00 Ry beta= 0.70 + Davidson diagonalization with overlap + ethr = 5.36E-08, avg # of iterations = 2.1 + + total cpu time spent up to now is 1.2 secs + + k = 0.0000 0.0000 0.0000 band energies (ev): + + -3.2748 4.9713 4.9713 4.9713 6.2860 6.2870 6.2883 13.4785 + 13.4790 13.4791 13.4794 13.4796 + + k = 0.0000 0.0000-0.5000 band energies (ev): + + -1.0139 -1.0121 7.0526 7.0527 7.0545 7.0545 8.0837 8.0863 + 8.9336 8.9338 15.3949 15.3959 + + k = 0.0000-0.5000 0.0000 band energies (ev): + + -1.0141 -1.0119 7.0524 7.0524 7.0547 7.0547 8.0834 8.0866 + 8.9335 8.9339 15.3953 15.3964 + + k = 0.0000-0.5000-0.5000 band energies (ev): + + 1.2086 1.2103 1.2107 1.2126 9.1371 9.1390 9.1394 9.1413 + 10.6160 10.6174 10.6178 10.6193 + + k =-0.5000 0.0000 0.0000 band energies (ev): + + -1.0131 -1.0128 7.0535 7.0535 7.0537 7.0537 8.0849 8.0851 + 8.9337 8.9337 15.3956 15.3957 + + k =-0.5000 0.0000-0.5000 band energies (ev): + + 1.2094 1.2100 1.2110 1.2119 9.1380 9.1385 9.1397 9.1406 + 10.6168 10.6170 10.6181 10.6185 + + k =-0.5000-0.5000 0.0000 band energies (ev): + + 1.2092 1.2097 1.2113 1.2120 9.1378 9.1383 9.1400 9.1407 + 10.6166 10.6168 10.6183 10.6187 + + k =-0.5000-0.5000-0.5000 band energies (ev): + + 3.3023 3.3044 3.3048 3.3073 3.5005 3.5018 3.5020 3.5032 + 19.2114 19.2121 19.2126 19.2131 + + the Fermi energy is 8.0850 ev + +! total energy = -21.76175564 Ry + estimated scf accuracy < 0.00002038 Ry + smearing contrib. (-TS) = -0.00103827 Ry + internal energy E=F+TS = -21.76071737 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = 11.89466555 Ry + hartree contribution = 0.02891972 Ry + xc contribution = -12.06506812 Ry + ewald contribution = -21.61964430 Ry + scf correction = 0.00040978 Ry + + iteration # 5 ecut= 50.00 Ry beta= 0.70 + Davidson diagonalization with overlap + ethr = 5.36E-08, avg # of iterations = 1.0 + + total cpu time spent up to now is 1.3 secs + + k = 0.0000 0.0000 0.0000 band energies (ev): + + -3.2748 4.9713 4.9713 4.9713 6.2870 6.2871 6.2871 13.4791 + 13.4791 13.4791 13.4791 13.4791 + + k = 0.0000 0.0000-0.5000 band energies (ev): + + -1.0130 -1.0129 7.0535 7.0535 7.0537 7.0537 8.0849 8.0851 + 8.9337 8.9337 15.3957 15.3958 + + k = 0.0000-0.5000 0.0000 band energies (ev): + + -1.0131 -1.0128 7.0535 7.0535 7.0537 7.0537 8.0849 8.0851 + 8.9337 8.9337 15.3956 15.3957 + + k = 0.0000-0.5000-0.5000 band energies (ev): + + 1.2104 1.2105 1.2107 1.2108 9.1390 9.1391 9.1393 9.1394 + 10.6174 10.6175 10.6177 10.6179 + + k =-0.5000 0.0000 0.0000 band energies (ev): + + -1.0130 -1.0129 7.0535 7.0535 7.0537 7.0537 8.0850 8.0850 + 8.9337 8.9337 15.3957 15.3957 + + k =-0.5000 0.0000-0.5000 band energies (ev): + + 1.2104 1.2106 1.2106 1.2107 9.1391 9.1392 9.1392 9.1393 + 10.6175 10.6176 10.6176 10.6178 + + k =-0.5000-0.5000 0.0000 band energies (ev): + + 1.2103 1.2105 1.2107 1.2108 9.1390 9.1391 9.1393 9.1394 + 10.6174 10.6175 10.6177 10.6179 + + k =-0.5000-0.5000-0.5000 band energies (ev): + + 3.3046 3.3047 3.3047 3.3048 3.5018 3.5019 3.5019 3.5020 + 19.2123 19.2123 19.2123 19.2124 + + the Fermi energy is 8.0850 ev + +! total energy = -21.76175739 Ry + estimated scf accuracy < 0.00000029 Ry + smearing contrib. (-TS) = -0.00103972 Ry + internal energy E=F+TS = -21.76071767 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = 11.89466503 Ry + hartree contribution = 0.02898289 Ry + xc contribution = -12.06473946 Ry + ewald contribution = -21.61964430 Ry + scf correction = 0.00001818 Ry + + iteration # 6 ecut= 50.00 Ry beta= 0.70 + Davidson diagonalization with overlap + ethr = 2.43E-09, avg # of iterations = 1.5 + + total cpu time spent up to now is 1.5 secs + + End of self-consistent calculation + + k = 0.0000 0.0000 0.0000 ( 2601 PWs) bands (ev): + + -3.2749 4.9712 4.9712 4.9712 6.2870 6.2870 6.2870 13.4789 + 13.4789 13.4790 13.4790 13.4790 + + k = 0.0000 0.0000-0.5000 ( 2666 PWs) bands (ev): + + -1.0131 -1.0130 7.0535 7.0535 7.0536 7.0536 8.0851 8.0851 + 8.9332 8.9333 15.3955 15.3956 + + k = 0.0000-0.5000 0.0000 ( 2666 PWs) bands (ev): + + -1.0131 -1.0129 7.0535 7.0535 7.0536 7.0536 8.0851 8.0851 + 8.9332 8.9333 15.3955 15.3956 + + k = 0.0000-0.5000-0.5000 ( 2680 PWs) bands (ev): + + 1.2104 1.2105 1.2106 1.2106 9.1390 9.1391 9.1392 9.1393 + 10.6173 10.6174 10.6175 10.6176 + + k =-0.5000 0.0000 0.0000 ( 2666 PWs) bands (ev): + + -1.0131 -1.0130 7.0535 7.0535 7.0536 7.0536 8.0851 8.0851 + 8.9333 8.9333 15.3955 15.3956 + + k =-0.5000 0.0000-0.5000 ( 2680 PWs) bands (ev): + + 1.2104 1.2105 1.2105 1.2106 9.1391 9.1391 9.1392 9.1392 + 10.6174 10.6174 10.6175 10.6175 + + k =-0.5000-0.5000 0.0000 ( 2680 PWs) bands (ev): + + 1.2104 1.2105 1.2106 1.2106 9.1390 9.1391 9.1392 9.1393 + 10.6173 10.6174 10.6175 10.6176 + + k =-0.5000-0.5000-0.5000 ( 2608 PWs) bands (ev): + + 3.3047 3.3047 3.3047 3.3047 3.5016 3.5017 3.5017 3.5018 + 19.2120 19.2120 19.2120 19.2121 + + the Fermi energy is 8.0851 ev + +! total energy = -21.76175741 Ry + estimated scf accuracy < 7.0E-09 Ry + smearing contrib. (-TS) = -0.00103972 Ry + internal energy E=F+TS = -21.76071769 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = 11.89471334 Ry + hartree contribution = 0.02897992 Ry + xc contribution = -12.06476665 Ry + ewald contribution = -21.61964430 Ry + + convergence has been achieved in 6 iterations + + Forces acting on atoms (cartesian axes, Ry/au): + + atom 1 type 1 force = -0.00000064 0.00000288 -0.00000097 + atom 2 type 1 force = -0.00000087 -0.00000194 0.00000106 + atom 3 type 1 force = 0.00000054 0.00000195 0.00000063 + atom 4 type 1 force = 0.00000096 -0.00000289 -0.00000071 + + Total force = 0.000005 Total SCF correction = 0.000050 + SCF correction compared to forces is large: reduce conv_thr to get better values + + + Computing stress (Cartesian axis) and pressure + + total stress (Ry/bohr**3) (kbar) P= -37.45 + -0.00025459 -0.00000000 -0.00000000 -37.45 -0.00 -0.00 + -0.00000000 -0.00025458 -0.00000000 -0.00 -37.45 -0.00 + -0.00000000 -0.00000000 -0.00025458 -0.00 -0.00 -37.45 + + + Writing output data file ./Aluminium.save/ + + init_run : 0.10s CPU 0.12s WALL ( 1 calls) + electrons : 1.10s CPU 1.35s WALL ( 1 calls) + forces : 0.02s CPU 0.02s WALL ( 1 calls) + stress : 0.05s CPU 0.06s WALL ( 1 calls) + + Called by init_run: + wfcinit : 0.08s CPU 0.08s WALL ( 1 calls) + potinit : 0.01s CPU 0.01s WALL ( 1 calls) + hinit0 : 0.01s CPU 0.01s WALL ( 1 calls) + + Called by electrons: + c_bands : 0.90s CPU 1.13s WALL ( 7 calls) + sum_band : 0.15s CPU 0.16s WALL ( 7 calls) + v_of_rho : 0.04s CPU 0.05s WALL ( 7 calls) + mix_rho : 0.01s CPU 0.01s WALL ( 7 calls) + + Called by c_bands: + init_us_2 : 0.02s CPU 0.02s WALL ( 136 calls) + cegterg : 0.88s CPU 1.10s WALL ( 56 calls) + + Called by *egterg: + cdiaghg : 0.26s CPU 0.36s WALL ( 140 calls) + h_psi : 0.58s CPU 0.69s WALL ( 156 calls) + g_psi : 0.00s CPU 0.00s WALL ( 92 calls) + + Called by h_psi: + h_psi:calbec : 0.02s CPU 0.02s WALL ( 156 calls) + vloc_psi : 0.55s CPU 0.65s WALL ( 156 calls) + add_vuspsi : 0.01s CPU 0.01s WALL ( 156 calls) + + General routines + calbec : 0.02s CPU 0.03s WALL ( 196 calls) + fft : 0.03s CPU 0.03s WALL ( 95 calls) + ffts : 0.00s CPU 0.00s WALL ( 7 calls) + fftw : 0.61s CPU 0.71s WALL ( 3988 calls) + + Parallel routines + fft_scatt_xy : 0.09s CPU 0.11s WALL ( 4090 calls) + fft_scatt_yz : 0.30s CPU 0.36s WALL ( 4090 calls) + + PWSCF : 1.33s CPU 1.63s WALL + + + This run was terminated on: 22:29:47 1Feb2021 + +=------------------------------------------------------------------------------= + JOB DONE. +=------------------------------------------------------------------------------= diff --git a/tests/test_qe_pw_scf_energy_bug.py b/tests/test_qe_pw_scf_energy_bug.py new file mode 100644 index 000000000..975aca487 --- /dev/null +++ b/tests/test_qe_pw_scf_energy_bug.py @@ -0,0 +1,24 @@ +import os +import numpy as np +import unittest +from context import dpdata + +class TestPWSCFSinglePointEnergy: + + def test_energy(self) : + ref_energy = -296.08379065679094669 + self.assertAlmostEqual(self.system_al.data['energies'][0], ref_energy) + +class TestPWSCFLabeledOutput(unittest.TestCase, TestPWSCFSinglePointEnergy): + + def setUp(self): + self.system_al = dpdata.LabeledSystem('qe.scf/Al.out',fmt='qe/pw/scf') + +class TestPWSCFLabeledOutputListInput(unittest.TestCase, TestPWSCFSinglePointEnergy): + + def setUp(self): + self.system_al = dpdata.LabeledSystem(['qe.scf/Al.in', 'qe.scf/Al.out'], fmt='qe/pw/scf') + +if __name__ == '__main__': + unittest.main() +