Skip to content

Commit d082a42

Browse files
committed
SOF-7449: debug
1 parent 3881f6d commit d082a42

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

src/context/providers/PlanewaveCutoffsContextProvider.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -40,51 +40,51 @@ export class PlanewaveCutoffsContextProvider extends mix(ContextProvider).with(
4040
return cutoffConfig[this.application.name];
4141
}
4242

43-
get cutoffsFromPseudos() {
44-
const pseudos = this.methodData.pseudo || [];
45-
let ecutwfc = 0;
46-
let ecutrho = 0;
47-
48-
pseudos.forEach((data) => {
49-
// set the highest cutoff of all elements
50-
if (data?.cutoffs?.wfc?.standard > ecutwfc) {
51-
ecutwfc = data.cutoffs.wfc.standard;
52-
}
53-
54-
if (data?.cutoffs?.rho?.standard > ecutrho) {
55-
ecutrho = data.cutoffs.rho.standard;
56-
} else {
57-
// if rho cutoff is not present, set it based on wfc cutoff
58-
// if it is ultrasoft pseudopotential set rho cutoff 8 times
59-
// that of wfc cutoff, otherwise 4 times that of wfc cutoff
60-
const rhoMultiplier = this.methodData.pseudo?.type === "us" ? 8 : 4;
61-
ecutrho = Math.max(ecutrho, ecutwfc * rhoMultiplier);
62-
}
63-
});
64-
65-
return [ecutwfc, ecutrho];
66-
}
43+
// get cutoffsFromPseudos() {
44+
// const pseudos = this.methodData.pseudo || [];
45+
// let ecutwfc = 0;
46+
// let ecutrho = 0;
47+
48+
// pseudos.forEach((data) => {
49+
// // set the highest cutoff of all elements
50+
// if (data?.cutoffs?.wfc?.standard > ecutwfc) {
51+
// ecutwfc = data.cutoffs.wfc.standard;
52+
// }
53+
54+
// if (data?.cutoffs?.rho?.standard > ecutrho) {
55+
// ecutrho = data.cutoffs.rho.standard;
56+
// } else {
57+
// // if rho cutoff is not present, set it based on wfc cutoff
58+
// // if it is ultrasoft pseudopotential set rho cutoff 8 times
59+
// // that of wfc cutoff, otherwise 4 times that of wfc cutoff
60+
// const rhoMultiplier = this.methodData.pseudo?.type === "us" ? 8 : 4;
61+
// ecutrho = Math.max(ecutrho, ecutwfc * rhoMultiplier);
62+
// }
63+
// });
64+
65+
// return [ecutwfc, ecutrho];
66+
// }
6767

6868
get defaultECUTWFC() {
69-
if (["espresso", "qe"].includes(this.application.shortName)) {
70-
const [ecutwfc] = this.cutoffsFromPseudos;
69+
// if (["espresso", "qe"].includes(this.application.shortName)) {
70+
// const [ecutwfc] = this.cutoffsFromPseudos;
7171

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

7777
return this._cutoffConfigPerApplication.wavefunction || null;
7878
}
7979

8080
get defaultECUTRHO() {
81-
if (["espresso", "qe"].includes(this.application.shortName)) {
82-
const [, ecutrho] = this.cutoffsFromPseudos;
81+
// if (["espresso", "qe"].includes(this.application.shortName)) {
82+
// const [, ecutrho] = this.cutoffsFromPseudos;
8383

84-
if (ecutrho > 0) {
85-
return ecutrho;
86-
}
87-
}
84+
// if (ecutrho > 0) {
85+
// return ecutrho;
86+
// }
87+
// }
8888

8989
return this._cutoffConfigPerApplication.density || null;
9090
}

0 commit comments

Comments
 (0)