Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Dec 19, 2024
1 parent 9735a3d commit a09912f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions abipy/dfpt/tests/test_vzsisa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion abipy/examples/plot/plot_qha_vzsisa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

#%%
Expand Down
2 changes: 1 addition & 1 deletion abipy/flowtk/tests/test_vzsisa.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 1 addition & 1 deletion abipy/flowtk/vzsisa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions abipy/flowtk/zsisa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a09912f

Please sign in to comment.