diff --git a/gui/package.json b/gui/package.json index e2d8a885c648a6c4454bf786e71021736fabc7b6..3ef9d6619f7c4d11cd29c1525fb94961a53d77ae 100644 --- a/gui/package.json +++ b/gui/package.json @@ -4,7 +4,7 @@ "commit": "e98694e", "private": true, "dependencies": { - "@lauri-codes/materia": "0.0.7", + "@lauri-codes/materia": "0.0.9", "@material-ui/core": "^4.0.0", "@material-ui/icons": "^4.0.0", "@material-ui/lab": "^4.0.0-alpha.49", diff --git a/gui/src/components/archive/ArchiveBrowser.js b/gui/src/components/archive/ArchiveBrowser.js index a52be99d0a3dd62dcbb0a2b53e5847bd9703dce7..d28fd4a7a85b8dc8e63873cecfa4394fd9259fe9 100644 --- a/gui/src/components/archive/ArchiveBrowser.js +++ b/gui/src/components/archive/ArchiveBrowser.js @@ -46,8 +46,8 @@ export const unitsState = atom({ }) // Shared instance of the StructureViewer -const viewer = new StructureViewer() -const bzViewer = new BrillouinZoneViewer() +const viewer = new StructureViewer(undefined, {view: {autoResize: false}}) +const bzViewer = new BrillouinZoneViewer(undefined, {view: {autoResize: false}}) // Contains details about the currently visualized system. Used to detect if a // reload is needed for the StructureViewer. @@ -430,7 +430,7 @@ function Overview({section, def}) { } system = { 'species': section.atom_species, - 'cell': convertSI(section.lattice_vectors, 'meter', {length: 'angstrom'}, false), + 'cell': section.lattice_vectors ? convertSI(section.lattice_vectors, 'meter', {length: 'angstrom'}, false) : undefined, 'positions': convertSI(section.atom_positions, 'meter', {length: 'angstrom'}, false), 'pbc': section.configuration_periodic_dimensions } diff --git a/gui/src/components/visualization/Structure.js b/gui/src/components/visualization/Structure.js index 5a1203eff93216a4fce0e9e35a378ec3d31d20fb..205e1cdc5eebd132596c2efe98fd5d0f6589d7e5 100644 --- a/gui/src/components/visualization/Structure.js +++ b/gui/src/components/visualization/Structure.js @@ -157,7 +157,7 @@ export default function Structure({className, classes, system, options, viewer, [1, 0, 0, 30] ] } - }}) + }}, false, false) // Systems without cell are centered on the center of positions } else { refViewer.current.setOptions({layout: { @@ -168,7 +168,7 @@ export default function Structure({className, classes, system, options, viewer, [1, 0, 0, 30] ] } - }}) + }}, false, false) } refViewer.current.load(system) refViewer.current.fitToCanvas() diff --git a/gui/yarn.lock b/gui/yarn.lock index de54787e7285437f529a1ef5563fa5a2d0a3adfb..a1c252a2ad373a7f4a253fe37d623ced4f7ec312 100644 --- a/gui/yarn.lock +++ b/gui/yarn.lock @@ -1287,10 +1287,10 @@ resolved "https://registry.yarnpkg.com/@kyleshockey/object-assign-deep/-/object-assign-deep-0.4.2.tgz#84900f0eefc372798f4751b5262830b8208922ec" integrity sha1-hJAPDu/DcnmPR1G1JigwuCCJIuw= -"@lauri-codes/materia@0.0.7": - version "0.0.7" - resolved "https://registry.yarnpkg.com/@lauri-codes/materia/-/materia-0.0.7.tgz#7580526874420641e26ab00bf0412d2a803d2cda" - integrity sha512-G3d4kRBNG4rYsLKceiW7Uhqy/uX0PFo70tsOIDZnOiNAICSIFF62LbYLDVHKgJf35xtyQM0kvM1WQGKgL9tmIw== +"@lauri-codes/materia@0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@lauri-codes/materia/-/materia-0.0.9.tgz#3ac8cac1b9ce8201a9e881afc0c5c6652c5a692a" + integrity sha512-qtY3pOWCKVG6z6iEs88vl/hqQNgK3tSCVNcAkSKFnuhk/Qdk66xHl7ZGVDMAOyqdXukNR2+iuZC/6CdFKc6/ow== dependencies: three "^0.119.1" threejs-meshline "^2.0.11" diff --git a/setup.sh b/setup.sh index dd120f62ecdc39251b3b79cd104f46678d75b4db..fb3fd9c0ce2885a8838eba624d2c374dce580995 100755 --- a/setup.sh +++ b/setup.sh @@ -10,5 +10,5 @@ git submodule update --init --jobs=4 pip install -e .[all] nomad dev metainfo > gui/src/metainfo.json -nomad dev search-quantities > gui/src/search-quantities.json +nomad dev search-quantities > gui/src/searchQuantities.json nomad dev units > gui/src/units.js