From a09912f6f0634287328bcc6f0926fa3806c3889f Mon Sep 17 00:00:00 2001 From: Matteo Giantomassi Date: Thu, 19 Dec 2024 17:46:21 +0100 Subject: [PATCH] Fix examples --- abipy/dfpt/tests/test_vzsisa.py | 8 ++++---- abipy/examples/plot/plot_qha_vzsisa.py | 2 +- abipy/flowtk/tests/test_vzsisa.py | 2 +- abipy/flowtk/vzsisa.py | 2 +- abipy/flowtk/zsisa.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/abipy/dfpt/tests/test_vzsisa.py b/abipy/dfpt/tests/test_vzsisa.py index 0c9675f39..e0e8a6a0d 100644 --- a/abipy/dfpt/tests/test_vzsisa.py +++ b/abipy/dfpt/tests/test_vzsisa.py @@ -3,14 +3,14 @@ import numpy as np import abipy.data as abidata -from abipy.dfpt.qha_aproximation import QHA_App +from abipy.dfpt.vzsisa import Vzsisa from abipy.core.testing import AbipyTest class QhaTest(AbipyTest): - def test_v_ZSISA(self): - """Testing v_SSISA postprocessing tools.""" + def test_vzsisa(self): + """Testing Vzsisa postprocessing tools.""" # Root points to the directory in the git submodule with the output results. root = os.path.join(abidata.dirpath, "data_v-ZSISA-QHA.git", "Si_v_ZSISA_approximation") @@ -23,7 +23,7 @@ def test_v_ZSISA(self): ddb_paths = [os.path.join(root, "scale_{:d}_GSR_DDB".format(s)) for s in strains] phdos_paths = [os.path.join(root, "scale_{:d}_PHDOS.nc".format(s)) for s in strains2] - qha = QHA_App.from_ddb_phdos_files(ddb_paths, phdos_paths) + qha = Vzsisa.from_ddb_phdos_files(ddb_paths, phdos_paths) tstart, tstop = 0, 800 # Test basic properties and get methods of qha diff --git a/abipy/examples/plot/plot_qha_vzsisa.py b/abipy/examples/plot/plot_qha_vzsisa.py index 70a059be3..cc7a680a2 100755 --- a/abipy/examples/plot/plot_qha_vzsisa.py +++ b/abipy/examples/plot/plot_qha_vzsisa.py @@ -23,7 +23,7 @@ ddb_paths = [os.path.join(root, "scale_{:d}_GSR_DDB".format(s)) for s in strains] phdos_paths = [os.path.join(root, "scale_{:d}_PHDOS.nc".format(s)) for s in strains2] -qha = Vzsisa.from_ddb_phdos_Files(ddb_paths, phdos_paths) +qha = Vzsisa.from_ddb_phdos_files(ddb_paths, phdos_paths) tstart, tstop = 0, 800 #%% diff --git a/abipy/flowtk/tests/test_vzsisa.py b/abipy/flowtk/tests/test_vzsisa.py index 689463113..d3b445bd1 100644 --- a/abipy/flowtk/tests/test_vzsisa.py +++ b/abipy/flowtk/tests/test_vzsisa.py @@ -1,7 +1,7 @@ """Tests for qha module.""" from abipy.core.testing import AbipyTest -from abipy.flowtk.qha import VzsisaFlow +from abipy.flowtk.vzsisa import VzsisaFlow class TestVzsisa(AbipyTest): diff --git a/abipy/flowtk/vzsisa.py b/abipy/flowtk/vzsisa.py index 28c28ee4e..4ed2f87ad 100644 --- a/abipy/flowtk/vzsisa.py +++ b/abipy/flowtk/vzsisa.py @@ -128,7 +128,7 @@ def from_scf_input(cls, scf_input, bo_scales, ph_scales, ngqpt, relax_template.pop_tolerances() # optcell = 3: constant-volume optimization of cell geometry relax_template.set_vars(optcell=3, ionmov=ionmov, tolvrs=1e-8, toldff=1.e-6) - relax_template.set_vars_ifnotin(ecutsm=0.5, dilatmx=1.05) + #relax_template.set_vars_ifnotin(ecutsm=1.0, dilatmx=1.05) work.initial_relax_task = work.register_relax_task(relax_template) diff --git a/abipy/flowtk/zsisa.py b/abipy/flowtk/zsisa.py index 613365a48..7de6c102f 100644 --- a/abipy/flowtk/zsisa.py +++ b/abipy/flowtk/zsisa.py @@ -127,10 +127,10 @@ def from_scf_input(cls, scf_input, eps, ngqpt, # Create input for relaxation and register the relaxation task. work.relax_template = relax_template = scf_input.deepcopy() relax_template.pop_tolerances() - # optcell = 2: full optimization of cell geometry ( + # optcell = 2: full optimization of cell geometry relax_template.set_vars(optcell=2, ionmov=ionmov, tolvrs=1e-8, toldff=1.e-6) #if optcell is not None and optcell != 0: - relax_template.set_vars_ifnotin(ecutsm=0.5, dilatmx=1.05) + #relax_template.set_vars_ifnotin(ecutsm=1.0, dilatmx=1.05) work.initial_relax_task = work.register_relax_task(relax_template)