@@ -40,51 +40,51 @@ export class PlanewaveCutoffsContextProvider extends mix(ContextProvider).with(
40
40
return cutoffConfig [ this . application . name ] ;
41
41
}
42
42
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
+ // }
67
67
68
68
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;
71
71
72
- if ( ecutwfc > 0 ) {
73
- return ecutwfc ;
74
- }
75
- }
72
+ // if (ecutwfc > 0) {
73
+ // return ecutwfc;
74
+ // }
75
+ // }
76
76
77
77
return this . _cutoffConfigPerApplication . wavefunction || null ;
78
78
}
79
79
80
80
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;
83
83
84
- if ( ecutrho > 0 ) {
85
- return ecutrho ;
86
- }
87
- }
84
+ // if (ecutrho > 0) {
85
+ // return ecutrho;
86
+ // }
87
+ // }
88
88
89
89
return this . _cutoffConfigPerApplication . density || null ;
90
90
}
0 commit comments