Skip to content

Commit 80f7f55

Browse files
committed
SOF-7449: return cutoffs obtained from pseudos only for qe
1 parent 83887b9 commit 80f7f55

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/context/providers/PlanewaveCutoffsContextProvider.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ export class PlanewaveCutoffsContextProvider extends mix(ContextProvider).with(
4747

4848
pseudos.forEach((data) => {
4949
// set the highest cutoff of all elements
50-
if (data.cutoffs?.wfc?.standard > ecutwfc) {
50+
if (data?.cutoffs?.wfc?.standard > ecutwfc) {
5151
ecutwfc = data.cutoffs.wfc.standard;
5252
}
5353

54-
if (data.cutoffs?.rho?.standard > ecutrho) {
54+
if (data?.cutoffs?.rho?.standard > ecutrho) {
5555
ecutrho = data.cutoffs.rho.standard;
5656
} else if (this.methodData.pseudo?.type === "us" && ecutwfc * 8 > ecutrho) {
5757
// if rho cutoff is not present, set it based on wfc cutoff
@@ -67,10 +67,12 @@ export class PlanewaveCutoffsContextProvider extends mix(ContextProvider).with(
6767
};
6868

6969
get defaultECUTWFC() {
70-
const [ecutwfc] = this.getCutoffsFromPseudos();
70+
if (["espresso", "qe"].includes(this.application.shortName)) {
71+
const [ecutwfc] = this.getCutoffsFromPseudos();
7172

72-
if (ecutwfc > 0) {
73-
return ecutwfc;
73+
if (ecutwfc > 0) {
74+
return ecutwfc;
75+
}
7476
}
7577

7678
return this._cutoffConfigPerApplication.wavefunction || null;

0 commit comments

Comments
 (0)