diff --git a/content/dataset.html b/content/dataset.html index 91b41355..f25543df 100644 --- a/content/dataset.html +++ b/content/dataset.html @@ -95,16 +95,15 @@ draft: false } async function loadFiles() { processingIndicator.isActive = true - var chks = [] var data = await loadAllData() window.defaultDats = [] for (const sub of Object.values(data)) { - for (const doi of uniq(sub.map(d => (d.DOI == null ? "" : d.DOI.string)))) { - const subdoi = sub.filter(d => (d.DOI == null ? "" : d.DOI.string) === doi) + for (const doi of new Set(sub.map(d => d.DOI))) { + const subdoi = sub.filter(d => (d.DOI == null ? "" : d.DOI) === doi) 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 == null ? "" : d.DOI.string) === "10.1021/acs.jctc.8b01205") { + if ((d.DOI == null ? "" : d.DOI) === "10.1021/acs.jctc.8b01205") { return d.method.name === "CASPT2" && d.method.basis === "aug-cc-pVDZ" } else { return d.method.isTBE @@ -120,7 +119,7 @@ draft: false window.defaultDats = window.defaultDats.concat(sub) } - await doiCache.addRange(Array.from(new Set(window.defaultDats.filter(d => d.DOI !== null).map(d => d.DOI.string)))) + await doiCache.addRange(Array.from(new Set(window.defaultDats.filter(d => d.DOI !== null).map(d => d.DOI)))) window.defaultDats = window.defaultDats.sort((datfa, datfb) => { const DOIa = datfa.DOI const DOIb = datfb.DOI @@ -134,8 +133,8 @@ draft: false return -1 } else { - const puba = doiCache.get(DOIa.string).format('data', { format: 'object' })[0] - const pubb = doiCache.get(DOIb.string).format('data', { format: 'object' })[0] + const puba = doiCache.get(DOIa).format('data', { format: 'object' })[0] + const pubb = doiCache.get(DOIb).format('data', { format: 'object' })[0] return pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb) } }) @@ -189,8 +188,7 @@ draft: false if (!isLast) { await reloadSelect(afters.prop("name")) } - const fillArray = ["molecule"] - if (fillArray.includes(afters.prop("name"))) { + if (afters.prop("name") ==="molecule"){ selectSelectAll(afters.first()) } } @@ -291,13 +289,14 @@ draft: false case "basis": return data.method.basis case "DOI": - return data.DOI === null ? "" : data.DOI.string + return data.DOI === null ? "" : data.DOI default: return data[name] break; } } async function reloadStat() { + const publis = await publiDB.loadAsync() processingIndicator.isActive = true var stb = $("#stat_table > tbody") $("#graph_div").empty() @@ -306,10 +305,12 @@ draft: false var sdatdic = new Map() for (const d of window.filtData) { const key = JSON.stringify(d.method) + const doi = (d.DOI == null ? "" : d.DOI) + const SetName = publis.findSetNameFromDOI(doi,true) if (!(sdatdic.has(key))) { sdatdic.set(key, new Map()) } - const myT1s = T1ref.get(d.DOI == null ? "" : d.DOI.string).get(d.molecule) + const myT1s = T1ref.get(SetName).get(d.molecule) for (const exc of d.excitations) { var allowT1 = false const T1Key = JSON.stringify((exc.initial, exc.final)) @@ -322,7 +323,7 @@ draft: false allowT1 = true } } - const key2 = JSON.stringify([d.molecule, exc.initial, exc.final, exc.cVertExcitationKind]) + const key2 = JSON.stringify([d.molecule, exc.initial, exc.final, exc.VertExcitationKind]) 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))) { @@ -406,6 +407,7 @@ draft: false } } doiCache.clear() + const publis = await publiDB.loadAsync() processingIndicator.isActive = true window.filtData = window.dats getAllSelect().each(function () { @@ -420,14 +422,15 @@ draft: false }) }) window.T1ref = new Map() - var dois = new Set(window.filtData.map((d) => d.DOI === null ? "" : d.DOI.string)) + var dois = new Set(window.filtData.map((d) => d.DOI === null ? "" : d.DOI)) 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()) + const setName = publis.findSetNameFromDOI(doi,true) + window.T1ref.set(setName, new Map()) for (const mol of mols) { - window.T1ref.get(doi).set(mol, new Map()) - var TBESortdat = window.dats.filter(d => (d.DOI === null ? "" : d.DOI.string) === doi && d.molecule === mol).sort((d1, d2) => { + window.T1ref.get(setName).set(mol, new Map()) + var TBESortdat = window.dats.filter(d => (d.DOI === null ? "" : d.DOI) === doi && d.molecule === mol).sort((d1, d2) => { if (d1.method.isTBE && !d2.method.isTBE) { return -1 } else if (!d1.method.isTBE && d2.method.isTBE) { @@ -445,13 +448,13 @@ draft: false }) 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(setName).get(mol).set(JSON.stringify((exc.initial, exc.final)), exc.T1) } } } } $(sel_ref).empty() - for (const el of uniq(window.filtData.map(d => [d.method, (d.DOI === null ? null : d.DOI.string)]))) { + for (const el of uniq(window.filtData.map(d => [d.method, (d.DOI === null ? null : d.DOI)]))) { op = $("", { value: JSON.stringify(el) }).text(el[0]) @@ -466,12 +469,11 @@ draft: false var data = $("#data") $(data).empty(); if (window.filtData.length > 0) { - var publis = await publiDB.loadAsync() var PreviousSetName = undefined var CurrentsetName = undefined for (const doi of doiCache.keys()) { paperdata = window.filtData.filter((d) => { - return (d.DOI === null ? "" : d.DOI.string) == doi + return (d.DOI === null ? "" : d.DOI) == doi }) var methods = uniq(paperdata.map(d => d.method)) const sortedMethods = methods.sort((a, b) => { @@ -512,8 +514,10 @@ draft: false adjustSticky(); datadic = new Map() for (const dat of paperdata) { + const doi = (dat.DOI == null ? "" : dat.DOI) + const setName = publis.findSetNameFromDOI(doi,true) const key1 = dat.molecule; - const myT1s = T1ref.get(dat.DOI == null ? "" : dat.DOI.string).get(dat.molecule) + const myT1s = T1ref.get(setName).get(dat.molecule) if (!datadic.has(key1)) { datadic.set(key1, new Map()) } @@ -611,8 +615,6 @@ draft: false async function submitdat() { if (!DebugMode.Enabled) { window.onbeforeunload = () => { return ''; } - window.onbeforeunload = () => { return ''; } - window.onbeforeunload = () => { return ''; } } await reloadContent(); } @@ -630,7 +632,7 @@ draft: false On this page you can compare multiple dataset and have some statistics to evaluate method accuracy (All fields marked with a red asterisk (*) are mandatory).
-