mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 05:43:46 +01:00
Fix indentation
This commit is contained in:
parent
dcb59f7bfa
commit
8224f76d4e
@ -77,9 +77,9 @@ draft: false
|
||||
$("<li/>").text(name).appendTo(vertkindtl)
|
||||
}
|
||||
for (const [name, value] of excitationTypes.All) {
|
||||
var txt=value.description.string
|
||||
var txt = value.description.string
|
||||
if (value.description.isLaTeX) {
|
||||
txt=LatexInline[0]+txt+LatexInline[1]
|
||||
txt = LatexInline[0] + txt + LatexInline[1]
|
||||
}
|
||||
$("<li/>").text(txt).appendTo(extl)
|
||||
var cbli = $("<li/>")
|
||||
@ -108,8 +108,8 @@ draft: false
|
||||
for (mol of uniq(subdoi.map(d => d.molecule))) {
|
||||
const submol = subdoi.filter(d => d.molecule === mol)
|
||||
const source = submol.find((d) => {
|
||||
if (d.DOI.string==="10.1021/acs.jctc.8b01205") {
|
||||
return d.method.name==="CASPT2" && d.method.basis==="aug-cc-pVDZ"
|
||||
if (d.DOI.string === "10.1021/acs.jctc.8b01205") {
|
||||
return d.method.name === "CASPT2" && d.method.basis === "aug-cc-pVDZ"
|
||||
} else {
|
||||
return d.method.isTBE
|
||||
}
|
||||
@ -192,13 +192,13 @@ draft: false
|
||||
return $(el).val().includes(getSelectValue(d, el.name))
|
||||
})
|
||||
}).map((d) => getSelectValue(d, name)))
|
||||
const sets = await (async ()=>{
|
||||
if(name === "DOI"){
|
||||
const publis=await getPublis()
|
||||
const sets=publis.sets
|
||||
const sets = await (async () => {
|
||||
if (name === "DOI") {
|
||||
const publis = await getPublis()
|
||||
const sets = publis.sets
|
||||
return sets
|
||||
}
|
||||
else{
|
||||
else {
|
||||
return undefined
|
||||
}
|
||||
})()
|
||||
@ -237,60 +237,60 @@ draft: false
|
||||
if (!(sdatdic.has(key))) {
|
||||
sdatdic.set(key, new Map())
|
||||
}
|
||||
const myT1s=T1ref.get(d.DOI.string).get(d.molecule)
|
||||
const myT1s = T1ref.get(d.DOI.string).get(d.molecule)
|
||||
for (const exc of d.excitations) {
|
||||
var allowT1=false
|
||||
const T1Key=JSON.stringify((exc.initial,exc.final))
|
||||
const T1range=filterParams.T1
|
||||
if (T1range.min===0 && T1range.max===100) {
|
||||
allowT1=true
|
||||
var allowT1 = false
|
||||
const T1Key = JSON.stringify((exc.initial, exc.final))
|
||||
const T1range = filterParams.T1
|
||||
if (T1range.min === 0 && T1range.max === 100) {
|
||||
allowT1 = true
|
||||
} else if (myT1s.has(T1Key)) {
|
||||
const T1Val=myT1s.get(T1Key)
|
||||
if (T1range.min<=T1Val && T1Val<=T1range.max) {
|
||||
allowT1=true
|
||||
const T1Val = myT1s.get(T1Key)
|
||||
if (T1range.min <= T1Val && T1Val <= T1range.max) {
|
||||
allowT1 = true
|
||||
}
|
||||
}
|
||||
const key2 = JSON.stringify([d.molecule, exc.initial, exc.final, exc.cVertExcitationKind])
|
||||
const keydic = sdatdic.get(key)
|
||||
if ((!exc.isUnsafe || window.filterParams.unsafe) && ((exc.type & window.filterParams.exType) !== 0) && ((exc.VertExcitationKind & window.filterParams.exVertKind) !== 0) && allowT1) {
|
||||
if (!(keydic.has(key2))) {
|
||||
keydic.set(key2,exc.value)
|
||||
keydic.set(key2, exc.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (combbasis) {
|
||||
var sdatdic2=new Map()
|
||||
var sdatdic2 = new Map()
|
||||
for (const [strkey, sdat] of sdatdic) {
|
||||
if (refstr===strkey) {
|
||||
sdatdic2.set(strkey,sdatdic.get(strkey))
|
||||
if (refstr === strkey) {
|
||||
sdatdic2.set(strkey, sdatdic.get(strkey))
|
||||
}
|
||||
else {
|
||||
const key=JSON.parse(strkey)
|
||||
const newkey=JSON.stringify([key[0].name,key[1]])
|
||||
const newkeybasis=JSON.stringify(key[0].basis)
|
||||
const key = JSON.parse(strkey)
|
||||
const newkey = JSON.stringify([key[0].name, key[1]])
|
||||
const newkeybasis = JSON.stringify(key[0].basis)
|
||||
if (!sdatdic2.has(newkey)) {
|
||||
sdatdic2.set(newkey,new Map())
|
||||
sdatdic2.set(newkey, new Map())
|
||||
}
|
||||
if (!sdatdic2.get(newkey).has(newkeybasis)) {
|
||||
sdatdic2.get(newkey).set(newkeybasis,new Map())
|
||||
sdatdic2.get(newkey).set(newkeybasis, new Map())
|
||||
}
|
||||
for (const [strkey2,exval] of sdat) {
|
||||
sdatdic2.get(newkey).get(newkeybasis).set(strkey2,exval)
|
||||
for (const [strkey2, exval] of sdat) {
|
||||
sdatdic2.get(newkey).get(newkeybasis).set(strkey2, exval)
|
||||
}
|
||||
}
|
||||
}
|
||||
sdatdic=sdatdic2
|
||||
sdatdic = sdatdic2
|
||||
}
|
||||
var sdic = new Map()
|
||||
for (const [key, sdat] of sdatdic) {
|
||||
if (key!==refstr) {
|
||||
if (key !== refstr) {
|
||||
if (!(sdic.has(key))) {
|
||||
sdic.set(key, [])
|
||||
}
|
||||
if (combbasis) {
|
||||
for (const [key2, dic] of sdat) {
|
||||
for(const [key3,exval] of dic){
|
||||
for (const [key3, exval] of dic) {
|
||||
sdic.get(key).push(exval - ((sdatdic.has(refstr)) ? sdatdic.get(refstr).get(key3) : NaN))
|
||||
}
|
||||
}
|
||||
@ -315,7 +315,7 @@ draft: false
|
||||
var thdoi = th.clone()
|
||||
var publi = doiCache.get(doi, true)
|
||||
const publis = await getPublis()
|
||||
const sets=publis.sets
|
||||
const sets = publis.sets
|
||||
if (sets.has(doi)) {
|
||||
var str = sets.get(doi)
|
||||
$(thdoi).append(str + " ")
|
||||
@ -374,12 +374,13 @@ draft: false
|
||||
processingIndicator.isActive = false
|
||||
}
|
||||
async function reloadContent() {
|
||||
window.filterParams = {unsafe:$("#cb_unsafe").prop("checked"),
|
||||
exType:Array.from(Array.from($("#cb_exTypeList>li>input[type=checkbox]:checked")).map(el => parseInt(el.value))).reduce((pv, cv) => pv + cv, 0),
|
||||
exVertKind:Array.from(Array.from($("#cb_exVertKindList>li>input[type=checkbox]:checked")).map(el => parseInt(el.value))).reduce((pv, cv) => pv + cv, 0),
|
||||
T1:{
|
||||
min:parseFloat($("#T1min").val()),
|
||||
max:parseFloat($("#T1max").val())
|
||||
window.filterParams = {
|
||||
unsafe: $("#cb_unsafe").prop("checked"),
|
||||
exType: Array.from(Array.from($("#cb_exTypeList>li>input[type=checkbox]:checked")).map(el => parseInt(el.value))).reduce((pv, cv) => pv + cv, 0),
|
||||
exVertKind: Array.from(Array.from($("#cb_exVertKindList>li>input[type=checkbox]:checked")).map(el => parseInt(el.value))).reduce((pv, cv) => pv + cv, 0),
|
||||
T1: {
|
||||
min: parseFloat($("#T1min").val()),
|
||||
max: parseFloat($("#T1max").val())
|
||||
}
|
||||
}
|
||||
doiCache.clear()
|
||||
@ -397,23 +398,23 @@ draft: false
|
||||
delete (val)
|
||||
})
|
||||
})
|
||||
window.T1ref=new Map()
|
||||
window.T1ref = new Map()
|
||||
var dois = new Set(window.filtData.map((d) => d.DOI.string))
|
||||
var mols = new Set(window.filtData.map((d) => d.molecule))
|
||||
await window.doiCache.addRange(dois)
|
||||
for (const doi of dois) {
|
||||
window.T1ref.set(doi,new Map())
|
||||
window.T1ref.set(doi, new Map())
|
||||
for (const mol of mols) {
|
||||
window.T1ref.get(doi).set(mol,new Map())
|
||||
var TBESortdat=window.dats.filter(d=>d.DOI.string===doi && d.molecule===mol).sort((d1,d2)=>{
|
||||
window.T1ref.get(doi).set(mol, new Map())
|
||||
var TBESortdat = window.dats.filter(d => d.DOI.string === doi && d.molecule === mol).sort((d1, d2) => {
|
||||
if (d1.method.isTBE && !d2.method.isTBE) {
|
||||
return -1
|
||||
} else if(!d1.method.isTBE && d2.method.isTBE) {
|
||||
} else if (!d1.method.isTBE && d2.method.isTBE) {
|
||||
return 1
|
||||
} else if (d1.method.isTBE && d2.method.isTBE) {
|
||||
if (d1.method.name==="TBE(FC)" && d2.method.name==="TBE") {
|
||||
if (d1.method.name === "TBE(FC)" && d2.method.name === "TBE") {
|
||||
return -1
|
||||
} else if(d1.method.name==="TBE" && d2.method.name==="TBE(FC)") {
|
||||
} else if (d1.method.name === "TBE" && d2.method.name === "TBE(FC)") {
|
||||
return 1
|
||||
}
|
||||
else {
|
||||
@ -421,9 +422,9 @@ draft: false
|
||||
}
|
||||
}
|
||||
})
|
||||
if (TBESortdat.length>0 && TBESortdat[0].method.isTBE) {
|
||||
if (TBESortdat.length > 0 && TBESortdat[0].method.isTBE) {
|
||||
for (const exc of TBESortdat[0].excitations) {
|
||||
window.T1ref.get(doi).get(mol).set(JSON.stringify((exc.initial,exc.final)),exc.T1)
|
||||
window.T1ref.get(doi).get(mol).set(JSON.stringify((exc.initial, exc.final)), exc.T1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -442,7 +443,7 @@ draft: false
|
||||
return -1
|
||||
}
|
||||
else if (a.isTBE && b.isTBE) {
|
||||
if (a.basis!=="CBS" && b.basis==="CBS") {
|
||||
if (a.basis !== "CBS" && b.basis === "CBS") {
|
||||
return -1
|
||||
}
|
||||
else {
|
||||
@ -469,22 +470,22 @@ draft: false
|
||||
datadic = new Map()
|
||||
for (const dat of paperdata) {
|
||||
const key1 = dat.molecule;
|
||||
const myT1s=T1ref.get(dat.DOI.string).get(dat.molecule)
|
||||
const myT1s = T1ref.get(dat.DOI.string).get(dat.molecule)
|
||||
if (!datadic.has(key1)) {
|
||||
datadic.set(key1, new Map())
|
||||
}
|
||||
const key3 = JSON.stringify(dat.method)
|
||||
for (const ex of dat.excitations) {
|
||||
Reflect.setPrototypeOf(ex.type, excitationType.prototype)
|
||||
var allowT1=false
|
||||
const T1Key=JSON.stringify((ex.initial,ex.final))
|
||||
const T1range=filterParams.T1
|
||||
if (T1range.min===0 && T1range.max===100) {
|
||||
allowT1=true
|
||||
var allowT1 = false
|
||||
const T1Key = JSON.stringify((ex.initial, ex.final))
|
||||
const T1range = filterParams.T1
|
||||
if (T1range.min === 0 && T1range.max === 100) {
|
||||
allowT1 = true
|
||||
} else if (myT1s.has(T1Key)) {
|
||||
const T1Val=myT1s.get(T1Key)
|
||||
if (T1range.min<=T1Val && T1Val<=T1range.max) {
|
||||
allowT1=true
|
||||
const T1Val = myT1s.get(T1Key)
|
||||
if (T1range.min <= T1Val && T1Val <= T1range.max) {
|
||||
allowT1 = true
|
||||
}
|
||||
}
|
||||
if (((window.filterParams.exType & ex.type) !== 0) && ((window.filterParams.exVertKind & ex.VertExcitationKind) !== 0) && allowT1) {
|
||||
@ -513,8 +514,8 @@ draft: false
|
||||
if (ex[3].Value == VertExcitationKinds.Fluorescence.Value) {
|
||||
Vertkindtext = String.raw`[\mathrm{F}]`
|
||||
}
|
||||
if(ex[2].description.string){
|
||||
desctex="("+ex[2].description.string+")"
|
||||
if (ex[2].description.string) {
|
||||
desctex = "(" + ex[2].description.string + ")"
|
||||
}
|
||||
$("<th/>", { scope: "rowgroup" }).text(String.raw`${LatexInline[0]}${ex[0].toLaTeX()} \rightarrow ${ex[1].toLaTeX()} ${Vertkindtext} ${desctex} ${LatexInline[1]}`).appendTo(tr)
|
||||
var entries = Array.from(exdat.entries())
|
||||
@ -545,10 +546,10 @@ draft: false
|
||||
}
|
||||
await reloadRef()
|
||||
}
|
||||
async function reloadRef(){
|
||||
async function reloadRef() {
|
||||
const combbasis = $("#cb_combbasis").is(':checked')
|
||||
$(sel_ref).empty()
|
||||
for (const el of uniq(window.filtData.map(d =>[d.method, d.DOI.string]))) {
|
||||
for (const el of uniq(window.filtData.map(d => [d.method, d.DOI.string]))) {
|
||||
op = $("<option/>", {
|
||||
value: JSON.stringify(el)
|
||||
}).text(el[0])
|
||||
@ -678,9 +679,11 @@ draft: false
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>%T1</legend>
|
||||
<input class="range min" airia-label="Minimum value" type="number" id="T1min" step="0.01" onchange="numberRangeChange(event)" min="0" value="0">
|
||||
<input class="range min" airia-label="Minimum value" type="number" id="T1min" step="0.01"
|
||||
onchange="numberRangeChange(event)" min="0" value="0">
|
||||
<span>\(\leq \mathrm{\%T1} \leq\)</span>
|
||||
<input class="range max" airia-label="Maximum value" type="number" id="T1max" step="0.01" onchange="numberRangeChange(event)" max="100" value="100">
|
||||
<input class="range max" airia-label="Maximum value" type="number" id="T1max" step="0.01"
|
||||
onchange="numberRangeChange(event)" max="100" value="100">
|
||||
</fieldset>
|
||||
<input type="submit" disabled=true value="Load"></input>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user