Skip to content

Commit

Permalink
test: filter by compatible functional
Browse files Browse the repository at this point in the history
  • Loading branch information
azech-hqs committed Aug 29, 2023
1 parent f150162 commit b41576d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/pseudopotential.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,13 @@ describe("Pseudopotentials", () => {
expect(filtered[0].apps[0]).to.be.equal(filterObj2.appName);
expect(filtered[0].element).to.be.equal(filterObj2.elements[0]);
});
it("are filtered by compatible functionals", () => {
const exchangeCorrelation = { approximation: "hybrid", functional: "hse06" };
const sortedPseudos = Pseudopotential.filterRawDataByExchangeCorrelation(
pseudos,
exchangeCorrelation,
);
expect(sortedPseudos).to.have.length(3); // there are 3 PBE pseudos above
expect(sortedPseudos.map((p) => p.exchangeCorrelation.functional)).to.include("pbe");
});
});

0 comments on commit b41576d

Please sign in to comment.