Skip to content

Commit

Permalink
Add seekpath to requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Jan 12, 2025
1 parent 3b4d48b commit bd5a5cf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion abipy/abio/tests/test_abivars.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def test_tricky_inputs(self):
self.assert_equal(inp.structure[1].specie.symbol, "As")
mat = 5.6533 * np.array([0, 1/2, 1/2, 1/2, 0, 1/2, 1/2, 1/2, 0])
mat.shape = (3, 3)
self.assert_equal(inp.structure[1].lattice.matrix, mat)
self.assert_almost_equal(inp.structure[1].lattice.matrix, mat)

# tutorial/input/tbase2_1
# 2 datasets with different natom (should use typat[:1] in 2nd dataset)
Expand Down
12 changes: 1 addition & 11 deletions abipy/dfpt/tests/test_msqdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_from_ddb(self):
assert np.all(abipy_indsym == msqd_dos.structure.indsym)

cif_string = msqd_dos.get_cif_string(temp=300)
#print("cif_string:\n", cif_string)
print("cif_string:\n", cif_string)

self.assertMultiLineEqual(cif_string, """\
# generated using pymatgen
Expand Down Expand Up @@ -98,16 +98,6 @@ def test_from_ddb(self):
O7 0.01126 0.01922 0.01356 0.00412 -0.00249 0.00765
O8 0.01922 0.01518 0.01356 -0.00661 -0.00412 0.01157""")

#Si0 0.00850 0.00695 0.00611 -0.00019 -0.00009 0.00348
#Si1 0.00850 0.00850 0.00611 0.00009 -0.00009 0.00502
#Si2 0.00695 0.00850 0.00611 0.00009 0.00019 0.00348
#O3 0.01916 0.01120 0.01353 0.00249 -0.00411 0.00762
#O4 0.01120 0.01512 0.01353 -0.00660 -0.00249 0.00358
#O5 0.01512 0.01916 0.01353 0.00411 0.00660 0.01153
#O6 0.01512 0.01120 0.01353 0.00249 0.00660 0.00358
#O7 0.01120 0.01916 0.01353 0.00411 -0.00249 0.00762
#O8 0.01916 0.01512 0.01353 -0.00660 -0.00411 0.01153""")

# Write CIF file with U_cif tensor
filepath = msqd_dos.write_cif_file(filepath=None, temp=300)
assert filepath.endswith(".cif")
Expand Down
2 changes: 1 addition & 1 deletion abipy/dfpt/tests/test_vzsisa.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_vzsisa(self):
self.assert_almost_equal(vols, [40.2445043, 40.4564043])

vols, fits = qha.vol_Einf_Vib2(tstop=tstop, tstart=tstart, num=2)
self.assert_almost_equal(vols, [40.2457091, 40.4461412])
self.assert_almost_equal(vols, [40.2457091, 40.4461412], decimal=5)

vols, fits = qha.vol_Einf_Vib4(tstop=tstop, tstart=tstart, num=2)
self.assert_almost_equal(vols, [40.2456922, 40.4467746])
Expand Down
13 changes: 6 additions & 7 deletions abipy/dynamics/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
e2s = 1.602188**2 # electron charge in Coulomb scaled by 10.d-19**2
kbs = 1.38066 # Boltzmann constant in Joule/K scaled by 10.d-23

#bohr2a = 0.529177
#kBoltzAng10m9 = 1.38066e-02
#kBoltz = 1.38066e-23
kBoltzEv = 8.617333e-05
#nCar = 56 # FIXME: Harcoded

Expand Down Expand Up @@ -420,6 +417,7 @@ def __init__(self,
cart_positions: Cartesian positions in Ang. Default shape: (nt, natom, 3).
ucmats: Array of lattice matrix of every step. Used for NPT.
For NVT-AIMD, the lattice at each time step is set to the lattice in the "structure" argument.
engine: String defining the engine used to produce the MD trajectory.
pos_order: "tac" if cart_positions has shape (nt, natom, 3).
"atc" if cart_positions has shape (natom, nt, 3).
evp_df:
Expand Down Expand Up @@ -1761,9 +1759,10 @@ class ArrheniusEntry:

@classmethod
def from_file(cls, filepath: PathLike, key, mpl_style) -> ArrheniusEntry:

# Read data in CSV format. Assuming header with at least the following entries:
# temperature,diffusion,err_diffusion,volume,symbol,composition
"""
Read data in CSV format. Assuming header with at least the following entries:
temperature,diffusion,err_diffusion,volume,symbol,composition
"""
try:
df = pd.read_csv(filepath, skipinitialspace=True)

Expand Down Expand Up @@ -1993,7 +1992,7 @@ def plot(self, thinvt_arange=None, what="diffusion", ncar=None, colormap="jet",
what: Selects the quantity to plot. Possibile values: "diffusion", "sigma", "tsigma".
ncar: Number of carriers. Required if what is "sigma" or "tsigma".
colormap: Colormap used to select the color if entry.mpl_style does not provide it.
with_t: True to dd a twin axes with the value of T
with_t: True to add a twin axes with the value of T
text:
ax: |matplotlib-Axes| or None if a new figure should be created.
fontsize: fontsize for legends and titles.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dependencies = [
"packaging",
"pandas",
"phonopy<=2.31.2",
"seekpath",
"plotly",
"pydispatcher>=2.0.5",
#"pymatgen==v2024.10.29",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ipython
chart-studio
click
phonopy<=2.31.2
seekpath
ase
# TODO remove after https://github.com/materialsproject/emmet/issues/768 is fixed
pydantic<2.0.0
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def cleanup():
"chart-studio",
"click",
"phonopy<=2.31.2",
"seekpath",
"ase",
#"custodian",
#pydantic,
Expand Down

0 comments on commit bd5a5cf

Please sign in to comment.