Commit a22dc0b9 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed missing bz data.

parent dfc3aa56
...@@ -2463,8 +2463,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons ...@@ -2463,8 +2463,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var dosValueFactor = E_FACTOR; var dosValueFactor = E_FACTOR;
//console.log('setPoints codeName : ', calcData.code_name, calcData.cell_volume); //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 * 1e-30); //calcData.cell_volume); previous version // add exceptional cases here
else if (calcData.code_name === 'FHI-aims') dosValueFactor = 1; //if (calcData.code_name === CODE)
// dosValueFactor = FACTOR;
// else general case // else general case
this.pointsSpin1 = []; this.pointsSpin1 = [];
...@@ -5539,35 +5540,39 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons ...@@ -5539,35 +5540,39 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'band_structure'), function (e2) { util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'band_structure'), function (e2) {
var bsData = JSON.parse(e2.target.response).band_structure; var bsData = JSON.parse(e2.target.response).band_structure;
if (bothSpins(bsData, dosData)) _this33.spinLegend.style.display = 'block';
//***util.addBandGapData(calcData, bsData); util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'brillouin_zone_json'), function (e3) {
//console.log('CODE NAME:', calc.code_name); var bzData = JSON.parse(e3.target.response).brillouin_zone_json;
_this33.bsDosPlotter.setUpAndData(bsData, dosData, calc);
if (calc.has_band_structure) { if (bothSpins(bsData, dosData)) _this33.spinLegend.style.display = 'block';
_this33.bandGapField.style.display = 'block'; //***util.addBandGapData(calcData, bsData);
_this33.bandGapValue.textContent = util.J2eV(calc.band_gap, 2) + ' eV '; //console.log('CODE NAME:', calc.code_name);
// console.log('calc.brillouin_zone_json',calc.brillouin_zone_json); _this33.bsDosPlotter.setUpAndData(bsData, dosData, calc);
if (calc.brillouin_zone_json !== null) {
_this33.lowerSection.style.display = 'block'; if (calc.has_band_structure) {
_this33.bzViewerWrapper.setCalcData(calc.brillouin_zone_json, bsData.segments);
_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 { } else {
_this33.lowerSection.style.display = 'none'; _this33.lowerSection.style.display = 'none';
_this33.bandGapField.style.display = 'none';
_this33.bzViewerWrapper.setNoData(); _this33.bzViewerWrapper.setNoData();
} }
LoadingPopup.hide();
//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();
}); });
}); });
} }
......
...@@ -2570,12 +2570,9 @@ class DOSPlotter extends InteractivePlotterBase{ ...@@ -2570,12 +2570,9 @@ class DOSPlotter extends InteractivePlotterBase{
let dosValueFactor = E_FACTOR; let dosValueFactor = E_FACTOR;
//console.log('setPoints codeName : ', calcData.code_name, calcData.cell_volume); //console.log('setPoints codeName : ', calcData.code_name, calcData.cell_volume);
if (calcData.code_name === 'exciting') // add exceptional cases here
dosValueFactor = 1/E_FACTOR; //if (calcData.code_name === CODE)
else if (calcData.code_name === 'VASP') // dosValueFactor = FACTOR;
dosValueFactor = 1/(E_FACTOR * 1e-30); //calcData.cell_volume); previous version
else if (calcData.code_name === 'FHI-aims')
dosValueFactor = 1;
// else general case // else general case
this.pointsSpin1 = []; this.pointsSpin1 = [];
...@@ -6278,40 +6275,43 @@ class ElectronicStructDetails extends DetailsViewBase{ ...@@ -6278,40 +6275,43 @@ class ElectronicStructDetails extends DetailsViewBase{
util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'dos'), e1 => { util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'dos'), e1 => {
let dosData = JSON.parse(e1.target.response).dos; let dosData = JSON.parse(e1.target.response).dos;
util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'band_structure'), util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'band_structure'), e2 => {
e2 => { let bsData = JSON.parse(e2.target.response).band_structure;
let bsData= JSON.parse(e2.target.response).band_structure;
if (bothSpins(bsData, dosData)) util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'brillouin_zone_json'), e3 => {
this.spinLegend.style.display = 'block'; let bzData = JSON.parse(e3.target.response).brillouin_zone_json;
//***util.addBandGapData(calcData, bsData); if (bothSpins(bsData, dosData))
//console.log('CODE NAME:', calc.code_name); this.spinLegend.style.display = 'block';
this.bsDosPlotter.setUpAndData(bsData, dosData, calc );
//***util.addBandGapData(calcData, bsData);
if (calc.has_band_structure){ //console.log('CODE NAME:', calc.code_name);
this.bsDosPlotter.setUpAndData(bsData, dosData, calc);
this.bandGapField.style.display = 'block';
this.bandGapValue.textContent= util.J2eV(calc.band_gap, 2)+' eV '; if (calc.has_band_structure) {
// console.log('calc.brillouin_zone_json',calc.brillouin_zone_json);
if (calc.brillouin_zone_json !== null){ this.bandGapField.style.display = 'block';
this.lowerSection.style.display = 'block'; this.bandGapValue.textContent = util.J2eV(calc.band_gap, 2) + ' eV ';
this.bzViewerWrapper.setCalcData(calc.brillouin_zone_json, bsData.segments); if (bzData) {
}else{ 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.lowerSection.style.display = 'none';
this.bandGapField.style.display = 'none';
this.bzViewerWrapper.setNoData(); this.bzViewerWrapper.setNoData();
} }
LoadingPopup.hide();
//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();
});
}); });
} }
......
...@@ -309,40 +309,43 @@ class ElectronicStructDetails extends DetailsViewBase{ ...@@ -309,40 +309,43 @@ class ElectronicStructDetails extends DetailsViewBase{
util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'dos'), e1 => { util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'dos'), e1 => {
let dosData = JSON.parse(e1.target.response).dos; let dosData = JSON.parse(e1.target.response).dos;
util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'band_structure'), util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'band_structure'), e2 => {
e2 => { let bsData = JSON.parse(e2.target.response).band_structure;
let bsData= JSON.parse(e2.target.response).band_structure;
if (bothSpins(bsData, dosData)) util.serverReq(util.getMaterialCalcURL(matId, calc.id, 'brillouin_zone_json'), e3 => {
this.spinLegend.style.display = 'block'; let bzData = JSON.parse(e3.target.response).brillouin_zone_json;
//***util.addBandGapData(calcData, bsData); if (bothSpins(bsData, dosData))
//console.log('CODE NAME:', calc.code_name); this.spinLegend.style.display = 'block';
this.bsDosPlotter.setUpAndData(bsData, dosData, calc );
//***util.addBandGapData(calcData, bsData);
if (calc.has_band_structure){ //console.log('CODE NAME:', calc.code_name);
this.bsDosPlotter.setUpAndData(bsData, dosData, calc);
this.bandGapField.style.display = 'block';
this.bandGapValue.textContent= util.J2eV(calc.band_gap, 2)+' eV '; if (calc.has_band_structure) {
// console.log('calc.brillouin_zone_json',calc.brillouin_zone_json);
if (calc.brillouin_zone_json !== null){ this.bandGapField.style.display = 'block';
this.lowerSection.style.display = 'block'; this.bandGapValue.textContent = util.J2eV(calc.band_gap, 2) + ' eV ';
this.bzViewerWrapper.setCalcData(calc.brillouin_zone_json, bsData.segments); if (bzData) {
}else{ 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.lowerSection.style.display = 'none';
this.bandGapField.style.display = 'none';
this.bzViewerWrapper.setNoData(); this.bzViewerWrapper.setNoData();
} }
LoadingPopup.hide();
//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();
});
}); });
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment