Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
encyclopedia-gui
Commits
4fc432de
Commit
4fc432de
authored
Nov 29, 2018
by
Markus Scheidgen
Browse files
Fixed missing bz data.
parent
3afd5369
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/bundle-es5.js
View file @
4fc432de
...
...
@@ -2527,8 +2527,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var
dosValueFactor
=
E_FACTOR
;
//console.log('setPoints codeName : ', calcData.code_name, calcData.cell_volume);
if
(
calcData
.
code_name
===
'
exciting
'
)
dosValueFactor
=
1
/
E_FACTOR
;
else
if
(
calcData
.
code_name
===
'
VASP
'
)
dosValueFactor
=
1
/
(
E_FACTOR
*
1
e
-
30
);
//calcData.cell_volume); previous version
else
if
(
calcData
.
code_name
===
'
FHI-aims
'
)
dosValueFactor
=
1
;
// add exceptional cases here
//if (calcData.code_name === CODE)
// dosValueFactor = FACTOR;
// else general case
this
.
pointsSpin1
=
[];
...
...
@@ -5536,35 +5537,39 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
band_structure
'
),
function
(
e2
)
{
var
bsData
=
JSON
.
parse
(
e2
.
target
.
response
).
band_structure
;
if
(
bothSpins
(
bsData
,
dosData
))
_this33
.
spinLegend
.
style
.
display
=
'
block
'
;
//***util.addBandGapData(calcData, bsData);
//console.log('CODE NAME:', calc.code_name);
_this33
.
bsDosPlotter
.
setUpAndData
(
bsData
,
dosData
,
calc
);
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
brillouin_zone_json
'
),
function
(
e3
)
{
var
bzData
=
JSON
.
parse
(
e3
.
target
.
response
).
brillouin_zone_json
;
if
(
calc
.
has_ba
nd
_
st
ructure
)
{
if
(
bothSpins
(
bsData
,
dosData
))
_this33
.
spinLege
nd
.
st
yle
.
display
=
'
block
'
;
_this33
.
bandGapField
.
style
.
display
=
'
block
'
;
_this33
.
bandGapValue
.
textContent
=
util
.
J2eV
(
calc
.
band_gap
,
2
)
+
'
eV
'
;
// console.log('calc.brillouin_zone_json',calc.brillouin_zone_json);
if
(
calc
.
brillouin_zone_json
!==
null
)
{
_this33
.
lowerSection
.
style
.
display
=
'
block
'
;
_this33
.
bzViewerWrapper
.
setCalcData
(
calc
.
brillouin_zone_json
,
bsData
.
segments
);
//***util.addBandGapData(calcData, bsData);
//console.log('CODE NAME:', calc.code_name);
_this33
.
bsDosPlotter
.
setUpAndData
(
bsData
,
dosData
,
calc
);
if
(
calc
.
has_band_structure
)
{
_this33
.
bandGapField
.
style
.
display
=
'
block
'
;
_this33
.
bandGapValue
.
textContent
=
util
.
J2eV
(
calc
.
band_gap
,
2
)
+
'
eV
'
;
if
(
bzData
)
{
_this33
.
lowerSection
.
style
.
display
=
'
block
'
;
_this33
.
bzViewerWrapper
.
setCalcData
(
bzData
,
bsData
.
segments
);
}
else
{
_this33
.
lowerSection
.
style
.
display
=
'
none
'
;
_this33
.
bzViewerWrapper
.
setNoData
();
}
//this.bzViewerWrapper.setCalcData(bzData, bsData.segments);
// if there bandstruc data && calc.band_gap === 0 => show FermiSurface
//if (calc.band_gap === 0)
//setFermiVizContent(this.fermiBox, (calc === null ? '' : util.FERMI_SURFACE_URL));
}
else
{
_this33
.
lowerSection
.
style
.
display
=
'
none
'
;
_this33
.
bandGapField
.
style
.
display
=
'
none
'
;
_this33
.
bzViewerWrapper
.
setNoData
();
}
//this.bzViewerWrapper.setCalcData(calc.brillouin_zone_json, bsData.segments);
// if there bandstruc data && calc.band_gap === 0 => show FermiSurface
//if (calc.band_gap === 0)
//setFermiVizContent(this.fermiBox, (calc === null ? '' : util.FERMI_SURFACE_URL));
}
else
{
_this33
.
lowerSection
.
style
.
display
=
'
none
'
;
_this33
.
bandGapField
.
style
.
display
=
'
none
'
;
_this33
.
bzViewerWrapper
.
setNoData
();
}
LoadingPopup
.
hide
();
LoadingPopup
.
hide
();
});
});
});
}
...
...
client/bundle.js
View file @
4fc432de
...
...
@@ -2630,12 +2630,9 @@ class DOSPlotter extends InteractivePlotterBase{
let
dosValueFactor
=
E_FACTOR
;
//console.log('setPoints codeName : ', calcData.code_name, calcData.cell_volume);
if
(
calcData
.
code_name
===
'
exciting
'
)
dosValueFactor
=
1
/
E_FACTOR
;
else
if
(
calcData
.
code_name
===
'
VASP
'
)
dosValueFactor
=
1
/
(
E_FACTOR
*
1
e
-
30
);
//calcData.cell_volume); previous version
else
if
(
calcData
.
code_name
===
'
FHI-aims
'
)
dosValueFactor
=
1
;
// add exceptional cases here
//if (calcData.code_name === CODE)
// dosValueFactor = FACTOR;
// else general case
this
.
pointsSpin1
=
[];
...
...
@@ -6269,40 +6266,43 @@ class ElectronicStructDetails extends DetailsViewBase{
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
dos
'
),
e1
=>
{
let
dosData
=
JSON
.
parse
(
e1
.
target
.
response
).
dos
;
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
band_structure
'
),
e2
=>
{
let
bsData
=
JSON
.
parse
(
e2
.
target
.
response
).
band_structure
;
if
(
bothSpins
(
bsData
,
dosData
))
this
.
spinLegend
.
style
.
display
=
'
block
'
;
//***util.addBandGapData(calcData, bsData);
//console.log('CODE NAME:', calc.code_name);
this
.
bsDosPlotter
.
setUpAndData
(
bsData
,
dosData
,
calc
);
if
(
calc
.
has_band_structure
){
this
.
bandGapField
.
style
.
display
=
'
block
'
;
this
.
bandGapValue
.
textContent
=
util
.
J2eV
(
calc
.
band_gap
,
2
)
+
'
eV
'
;
// console.log('calc.brillouin_zone_json',calc.brillouin_zone_json);
if
(
calc
.
brillouin_zone_json
!==
null
){
this
.
lowerSection
.
style
.
display
=
'
block
'
;
this
.
bzViewerWrapper
.
setCalcData
(
calc
.
brillouin_zone_json
,
bsData
.
segments
);
}
else
{
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
band_structure
'
),
e2
=>
{
let
bsData
=
JSON
.
parse
(
e2
.
target
.
response
).
band_structure
;
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
brillouin_zone_json
'
),
e3
=>
{
let
bzData
=
JSON
.
parse
(
e3
.
target
.
response
).
brillouin_zone_json
;
if
(
bothSpins
(
bsData
,
dosData
))
this
.
spinLegend
.
style
.
display
=
'
block
'
;
//***util.addBandGapData(calcData, bsData);
//console.log('CODE NAME:', calc.code_name);
this
.
bsDosPlotter
.
setUpAndData
(
bsData
,
dosData
,
calc
);
if
(
calc
.
has_band_structure
)
{
this
.
bandGapField
.
style
.
display
=
'
block
'
;
this
.
bandGapValue
.
textContent
=
util
.
J2eV
(
calc
.
band_gap
,
2
)
+
'
eV
'
;
if
(
bzData
)
{
this
.
lowerSection
.
style
.
display
=
'
block
'
;
this
.
bzViewerWrapper
.
setCalcData
(
bzData
,
bsData
.
segments
);
}
else
{
this
.
lowerSection
.
style
.
display
=
'
none
'
;
this
.
bzViewerWrapper
.
setNoData
();
}
//this.bzViewerWrapper.setCalcData(bzData, bsData.segments);
// if there bandstruc data && calc.band_gap === 0 => show FermiSurface
//if (calc.band_gap === 0)
//setFermiVizContent(this.fermiBox, (calc === null ? '' : util.FERMI_SURFACE_URL));
}
else
{
this
.
lowerSection
.
style
.
display
=
'
none
'
;
this
.
bandGapField
.
style
.
display
=
'
none
'
;
this
.
bzViewerWrapper
.
setNoData
();
}
//this.bzViewerWrapper.setCalcData(calc.brillouin_zone_json, bsData.segments);
// if there bandstruc data && calc.band_gap === 0 => show FermiSurface
//if (calc.band_gap === 0)
//setFermiVizContent(this.fermiBox, (calc === null ? '' : util.FERMI_SURFACE_URL));
}
else
{
this
.
lowerSection
.
style
.
display
=
'
none
'
;
this
.
bandGapField
.
style
.
display
=
'
none
'
;
this
.
bzViewerWrapper
.
setNoData
();
}
LoadingPopup
.
hide
();
});
LoadingPopup
.
hide
();
});
})
});
}
...
...
client/src/material-mod/ElectronicStructDetails.view.js
View file @
4fc432de
...
...
@@ -309,40 +309,43 @@ class ElectronicStructDetails extends DetailsViewBase{
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
dos
'
),
e1
=>
{
let
dosData
=
JSON
.
parse
(
e1
.
target
.
response
).
dos
;
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
band_structure
'
),
e2
=>
{
let
bsData
=
JSON
.
parse
(
e2
.
target
.
response
).
band_structure
;
if
(
bothSpins
(
bsData
,
dosData
))
this
.
spinLegend
.
style
.
display
=
'
block
'
;
//***util.addBandGapData(calcData, bsData);
//console.log('CODE NAME:', calc.code_name);
this
.
bsDosPlotter
.
setUpAndData
(
bsData
,
dosData
,
calc
);
if
(
calc
.
has_band_structure
){
this
.
bandGapField
.
style
.
display
=
'
block
'
;
this
.
bandGapValue
.
textContent
=
util
.
J2eV
(
calc
.
band_gap
,
2
)
+
'
eV
'
;
// console.log('calc.brillouin_zone_json',calc.brillouin_zone_json);
if
(
calc
.
brillouin_zone_json
!==
null
){
this
.
lowerSection
.
style
.
display
=
'
block
'
;
this
.
bzViewerWrapper
.
setCalcData
(
calc
.
brillouin_zone_json
,
bsData
.
segments
);
}
else
{
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
band_structure
'
),
e2
=>
{
let
bsData
=
JSON
.
parse
(
e2
.
target
.
response
).
band_structure
;
util
.
serverReq
(
util
.
getMaterialCalcURL
(
matId
,
calc
.
id
,
'
brillouin_zone_json
'
),
e3
=>
{
let
bzData
=
JSON
.
parse
(
e3
.
target
.
response
).
brillouin_zone_json
;
if
(
bothSpins
(
bsData
,
dosData
))
this
.
spinLegend
.
style
.
display
=
'
block
'
;
//***util.addBandGapData(calcData, bsData);
//console.log('CODE NAME:', calc.code_name);
this
.
bsDosPlotter
.
setUpAndData
(
bsData
,
dosData
,
calc
);
if
(
calc
.
has_band_structure
)
{
this
.
bandGapField
.
style
.
display
=
'
block
'
;
this
.
bandGapValue
.
textContent
=
util
.
J2eV
(
calc
.
band_gap
,
2
)
+
'
eV
'
;
if
(
bzData
)
{
this
.
lowerSection
.
style
.
display
=
'
block
'
;
this
.
bzViewerWrapper
.
setCalcData
(
bzData
,
bsData
.
segments
);
}
else
{
this
.
lowerSection
.
style
.
display
=
'
none
'
;
this
.
bzViewerWrapper
.
setNoData
();
}
//this.bzViewerWrapper.setCalcData(bzData, bsData.segments);
// if there bandstruc data && calc.band_gap === 0 => show FermiSurface
//if (calc.band_gap === 0)
//setFermiVizContent(this.fermiBox, (calc === null ? '' : util.FERMI_SURFACE_URL));
}
else
{
this
.
lowerSection
.
style
.
display
=
'
none
'
;
this
.
bandGapField
.
style
.
display
=
'
none
'
;
this
.
bzViewerWrapper
.
setNoData
();
}
//this.bzViewerWrapper.setCalcData(calc.brillouin_zone_json, bsData.segments);
// if there bandstruc data && calc.band_gap === 0 => show FermiSurface
//if (calc.band_gap === 0)
//setFermiVizContent(this.fermiBox, (calc === null ? '' : util.FERMI_SURFACE_URL));
}
else
{
this
.
lowerSection
.
style
.
display
=
'
none
'
;
this
.
bandGapField
.
style
.
display
=
'
none
'
;
this
.
bzViewerWrapper
.
setNoData
();
}
LoadingPopup
.
hide
();
});
LoadingPopup
.
hide
();
});
})
});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment