diff --git a/404.html b/404.html
index 5d967a3c..051b88c5 100644
--- a/404.html
+++ b/404.html
@@ -69,6 +69,8 @@ MathJax.Hub.Config({
+
+
diff --git a/categories/index.html b/categories/index.html
index bed1f74b..625cd97a 100644
--- a/categories/index.html
+++ b/categories/index.html
@@ -70,6 +70,8 @@ MathJax.Hub.Config({
+
+
diff --git a/css/form.css b/css/form.css
index ab5f3414..283bcf58 100644
--- a/css/form.css
+++ b/css/form.css
@@ -8,7 +8,7 @@ ul.nestedCbList {
list-style-type: none;
padding-left: 1em;
}
-form button.SelectAll {
+form button.selectButton {
display: block;
}
form fieldset.main {
diff --git a/dataset/index.html b/dataset/index.html
index 44f22a05..97a2d224 100644
--- a/dataset/index.html
+++ b/dataset/index.html
@@ -59,7 +59,7 @@
"headline": "Dataset",
"description" : "function adjustSticky() { const height = $(\u0022nav\u0022).height() $(\u0022thead.sticky tr th \u0022).css(\u0022top\u0022, height) } window.onload = async () = { window.browser = bowser.getParser(window.navigator.userAgent); $(\u0022input[type=\u0027checkbox\u0027]\u0022).trigger(\u0022change\u0022) $(\u0022input[type=\u0027number\u0027].range\u0022).trigger(\u0022change\u0022) adjustSticky(); $(window).resize(adjustSticky) var slist = $(\u0022#SelectList\u0022) getAllSelect().each(function () { $(\u0022\u0022).text($(\u0027label[for=\u0022\u0027 \u002b $(this).attr(\u0027id\u0027) \u002b \u0027\u0022]\u0027).text()).appendTo(slist) }) $(\u0027[data-needbrowser],[data-neednotbrowser]\u0027).each(function () { function test(key, value) { switch (key) { case \u0022",
"inLanguage" : "en",
- "wordCount": 2068 ,
+ "wordCount": 2158 ,
"datePublished" : "0001-01-01T00:00:00",
"dateModified" : "0001-01-01T00:00:00",
"image" : "https:\/\/lcpq.github.io\/QUESTDB_website\/img\/TOC_JPCL.png",
@@ -120,6 +120,8 @@ MathJax.Hub.Config({
+
+
@@ -474,6 +476,7 @@ MathJax.Hub.Config({
processingIndicator.isActive = false
reloadSizeSelector()
reloadSelect("sets")
+ refreshExportGeoms()
}
async function clearSelect(BeforeName = null) {
var selects = ((BeforeName == null) ? getAllSelect() : getAllSelectAfter(BeforeName, true))
@@ -961,6 +964,41 @@ MathJax.Hub.Config({
}
await reloadContent();
}
+
+ function refreshExportGeoms() {
+ const vals=$("#mol_select").val()
+ const disable = vals === null || vals.length===0
+ $("#btn_export_geoms").prop("disabled",disable)
+ }
+ async function moleculeSelectionChanged(event) {
+ refreshExportGeoms()
+ await reloadNextSelect(event)
+ }
+
+ async function exportGeoms() {
+ var mols = new Set($("#mol_select").val())
+
+ if (mols.size!==0) {
+ const zip = JSZip();
+ const geomDic=new Map()
+ for (const geom of window.geoms) {
+ const molecule =geom.parseMetadata().molecule
+ if (mols.has(molecule)) {
+ if (!geomDic.has(molecule)) {
+ geomDic.set(molecule,[])
+ }
+ geomDic.get(molecule).push(geom.toXYZ())
+ }
+ }
+ for (const [molecule,geometries] of geomDic) {
+ const xyz=geometries.join("\n\n")
+ var blob=new Blob([xyz],{type: 'chemical/x-xyz'})
+ zip.file(`${mhchemCE.extract(molecule).toLowerCase().replace(" ","_")}.xyz`,blob)
+ }
+ const zipFile = await zip.generateAsync({type: 'blob'})
+ saveAs(zipFile, "molecules.zip")
+ }
+ }
+
+
diff --git a/js/Geometry.js b/js/Geometry.js
index f26c3215..6bde2820 100644
--- a/js/Geometry.js
+++ b/js/Geometry.js
@@ -3,6 +3,21 @@ class Geometry {
this.molecule = molecule
this.comment = comment
}
+
+ toXYZ() {
+ var lines =[]
+ lines.push(this.molecule.atoms.length)
+ lines.push(this.comment)
+ for (const a of this.molecule.atoms) {
+ var line = a.label.padEnd(4, ' ')
+ line += a.x.toFixed(8).padStart(11,' ')
+ line += a.y.toFixed(8).padStart(22,` `)
+ line += a.z.toFixed(8).padStart(22,` `)
+ lines.push(line)
+ }
+ return lines.join("\n")
+ }
+
static async loadXYZAsync(file) {
switch (trueTypeOf(file)) {
case String.name:
diff --git a/references/index.html b/references/index.html
index feee0960..a39cf250 100644
--- a/references/index.html
+++ b/references/index.html
@@ -120,6 +120,8 @@ MathJax.Hub.Config({
+
+
diff --git a/subsets/index.html b/subsets/index.html
index f2fccc6d..929312f5 100644
--- a/subsets/index.html
+++ b/subsets/index.html
@@ -120,6 +120,8 @@ MathJax.Hub.Config({
+
+
diff --git a/tags/index.html b/tags/index.html
index 1d308838..666adfdc 100644
--- a/tags/index.html
+++ b/tags/index.html
@@ -70,6 +70,8 @@ MathJax.Hub.Config({
+
+
diff --git a/view/index.html b/view/index.html
index 2a8db5d7..0499da8d 100644
--- a/view/index.html
+++ b/view/index.html
@@ -120,6 +120,8 @@ MathJax.Hub.Config({
+
+
@@ -275,7 +277,6 @@ MathJax.Hub.Config({
-