Commit 9711855b authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'georg_edits' into 'master'

adapted DOS calculations to data from prod-1.11.6

See merge request !1
parents 1c1a52b6 4fc432de
Pipeline #40245 passed with stages
in 17 seconds
......@@ -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 * 1e-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_band_structure) {
if (bothSpins(bsData, dosData)) _this33.spinLegend.style.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();
});
});
});
}
......
......@@ -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 * 1e-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();
});
})
});
}
......
......@@ -51,12 +51,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 * 1e-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 = [];
......
......@@ -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();
});
})
});
}
......
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