Skip to content

Commit

Permalink
Merge branch 'main' into asedev
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen authored Dec 30, 2024
2 parents 8577ba0 + 2970a58 commit 1b85359
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project generally adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.9]

### Fixed

- Fixed a bug where DFT+U parameters might not be set appropriately if the `Atoms` object is sorted when using MP input sets

## [0.11.8]

### Added
Expand Down
4 changes: 3 additions & 1 deletion src/quacc/calculators/vasp/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ def __init__(
raise ValueError("Either atoms or prev_dir must be provided.")
self.atoms = atoms
self.prev_dir = prev_dir
self.structure = AseAtomsAdaptor.get_structure(atoms)
if self.atoms:
self.ase_sort, self.ase_resort = Vasp_()._make_sort(self.atoms)
self.structure = AseAtomsAdaptor.get_structure(self.atoms[self.ase_sort])

def convert_dict_set(self, dict_set: DictSet) -> dict:
"""
Expand Down
14 changes: 14 additions & 0 deletions tests/core/calculators/vasp/test_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pytest
from ase.atoms import Atoms
from ase.build import bulk
from ase.calculators.singlepoint import SinglePointDFTCalculator
from ase.calculators.vasp import Vasp as Vasp_
Expand Down Expand Up @@ -909,6 +910,19 @@ def test_pmg_input_set2():
}


def test_ldau_mp():
atoms = Atoms("HOHMn")
atoms.center(vacuum=10)
atoms.pbc = True
atoms[0].position += 0.1
atoms[1].position -= 0.1
parameters = MPtoASEConverter(atoms=atoms).convert_dict_set(MPRelaxSet)
assert len(parameters["ldauu"]) == 3
assert parameters["ldauu"] == [0, 0, 3.9]
assert len(parameters["magmom"]) == 4
assert parameters["magmom"] == [0.6, 0.6, 0.6, 5.0]


@pytest.mark.skipif(which(get_settings().VASP_CMD), reason="VASP is installed")
def test_run(monkeypatch, tmp_path):
monkeypatch.chdir(tmp_path)
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements-dask.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dask[distributed]==2024.12.0
dask[distributed]==2024.12.1
dask-jobqueue==0.9.0
2 changes: 1 addition & 1 deletion tests/requirements-parsl.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
parsl[monitoring]==2024.12.9
parsl[monitoring]==2024.12.16
2 changes: 1 addition & 1 deletion tests/requirements-phonons.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
phonopy==2.33.2
phonopy==2.33.3
seekpath==2.1.0
2 changes: 1 addition & 1 deletion tests/requirements-prefect.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dask-jobqueue==0.9.0
prefect[dask]==3.1.7
prefect[dask]==3.1.9
6 changes: 3 additions & 3 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ase==3.24.0
custodian==2024.10.16
emmet-core==0.84.4
emmet-core==0.84.5
maggma==0.70.0
monty==2024.12.10
numpy==1.26.4
psutil==6.1.0
pydantic==2.10.3
psutil==6.1.1
pydantic==2.10.4
pydantic-settings==2.7.0
pymatgen==2024.11.13
ruamel.yaml==0.18.6
Expand Down

0 comments on commit 1b85359

Please sign in to comment.