diff --git a/develop/assets/index-B_sF34RN.js b/develop/assets/index-RzBi9kVb.js similarity index 99% rename from develop/assets/index-B_sF34RN.js rename to develop/assets/index-RzBi9kVb.js index bd26ba9..a954e47 100644 --- a/develop/assets/index-B_sF34RN.js +++ b/develop/assets/index-RzBi9kVb.js @@ -309,7 +309,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var __assign$2=function(){return __assign$2=Object.assign||function(e){for(var a,s=1,h=arguments.length;s{if(references[e].type!=o)return;let a=refNr(e);return jsxRuntimeExports$1.jsxs("li",{style:{display:"flex",alignItems:"flex-start"},children:[jsxRuntimeExports$1.jsx("span",{style:{verticalAlign:"super",fontSize:"0.8em"},children:jsxRuntimeExports$1.jsxs("b",{children:["[",a,"]"]})}),jsxRuntimeExports$1.jsx("div",{id:"ref"+a,style:{marginLeft:"5px"},children:references[e].ref})]},a)})})}const aboutText=jsxRuntimeExports$1.jsx(MathJaxContext$1,{config:mathJaxConfig,children:jsxRuntimeExports$1.jsxs("div",{className:"about-text-container",children:[jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"How to cite"}),jsxRuntimeExports$1.jsx("p",{children:"If you use this tool or data, please cite the following works:"}),jsxRuntimeExports$1.jsx(CitationBox,{title:jsxRuntimeExports$1.jsx("span",{children:"Two-dimensional materials from high-throughput computational exfoliation of experimentally known compounds"}),authors:jsxRuntimeExports$1.jsx("span",{children:"N. Mounet, M. Gibertini, P. Schwaller, D. Campi, A. Merkys, A. Marrazzo, T. Sohier, I. E. Castelli, A. Cepellotti, G. Pizzi & N. Marzari"}),journal:"Nat. Nanotech. 13, 246-252",doi:"10.1038/s41565-017-0035-5",year:"2018",data:jsxRuntimeExports$1.jsxs("span",{children:["N. Mounet et al., Materials Cloud Archive 2020.158, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.24435/materialscloud:az-b2",target:"_blank",children:"10.24435/materialscloud:az-b2"})," ","(2020)"]}),arxiv:jsxRuntimeExports$1.jsxs("span",{children:["N. Mounet et al., arXiv:1611.05234, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.48550/arXiv.1611.05234",target:"_blank",children:"10.48550/arXiv.1611.05234"})," ","(2016)"]})}),jsxRuntimeExports$1.jsx(CitationBox,{title:jsxRuntimeExports$1.jsx("span",{children:"Expansion of the Materials Cloud 2D Database"}),authors:jsxRuntimeExports$1.jsx("span",{children:"D. Campi, N. Mounet, M. Gibertini, G. Pizzi & N. Marzari"}),journal:"ACS Nano 17, 12, 11268-11278",doi:"10.1021/acsnano.2c11510",year:"2023",data:jsxRuntimeExports$1.jsxs("span",{children:["D. Campi et al., Materials Cloud Archive 2022.84, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.24435/materialscloud:36-nd",target:"_blank",children:"10.24435/materialscloud:36-nd"})," ","(2022)"]}),arxiv:jsxRuntimeExports$1.jsxs("span",{children:["D. Campi et al., arXiv:2210.11301, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.48550/arXiv.2210.11301",target:"_blank",children:"10.48550/arXiv.2210.11301"})," ","(2022)"]})}),jsxRuntimeExports$1.jsx("p",{children:"The proper reference for each structure is reported in their corresponding detail page."}),jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"General overview"}),jsxRuntimeExports$1.jsxs("p",{children:["The 2D structures are originating from the computational exfoliation of experimental bulk (3D) materials extracted from the MPDS",getRef("mpds"),", the COD",getRef("cod")," and the ICSD",getRef("icsd")," databases. The computational procedure consisted in:"]}),jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsxs("li",{children:["cleaning improperly formatted CIF files with ",jsxRuntimeExports$1.jsx("b",{children:"cod-tools"}),getRef("cod"),getRef("cod_parser"),";"]}),jsxRuntimeExports$1.jsx("li",{children:"filtering out disordered structures, incompletely defined ones and those obviously wrong;"}),jsxRuntimeExports$1.jsxs("li",{children:["converting CIF files into ",jsxRuntimeExports$1.jsx("b",{children:"AiiDA"}),getRef("aiida1"),getRef("aiida2")," structures, using ",jsxRuntimeExports$1.jsx("b",{children:"pymatgen"}),getRef("pymatgen"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["correcting round-off errors in the atomic positions to recover the structure symmetries, thanks to ",jsxRuntimeExports$1.jsx("b",{children:"spglib"}),getRef("spglib"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["filtering out duplicate structures",getRef("pymatgen"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["screening layered materials thanks to a geometrical algorithm based on the identification of chemical bonds from interatomic distances, using van der Waals atomic radii provided by Ref.",getRef("vdw_radii"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["relaxing and computing the binding energies of the layered materials, using the ",jsxRuntimeExports$1.jsx("b",{children:"Quantum ESPRESSO"}),getRef("qe")," code with ",jsxRuntimeExports$1.jsx("b",{children:"DFT-PBE"})," van der Waals functionals (",jsxRuntimeExports$1.jsx("b",{children:"rVV10"}),getRef("vdw_lee"),getRef("vdw_cooper")," and ",jsxRuntimeExports$1.jsx("b",{children:"DF2-C09"}),getRef("vdw_vydrov"),getRef("vdw_sabatini"),"), tested and converged pseudopotentials from the ",jsxRuntimeExports$1.jsx("b",{children:"SSSP"}),getRef("sssp"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["selecting easily exfoliable materials as those for which the binding energy is less than 30 meV/Å",jsxRuntimeExports$1.jsx("sup",{children:"2"}),"(with the DF2-C09 functional) or 35 meV/Å",jsxRuntimeExports$1.jsx("sup",{children:"2"})," (with rVV10) and potentially exfoliable materials for which the binding energy is less than 120 meV/Å",jsxRuntimeExports$1.jsx("sup",{children:"2"}),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["optimizing the geometry of the monolayers as an isolated system using the PBE",getRef("pbe")," functional."]})]}),jsxRuntimeExports$1.jsxs("p",{children:["On the subset of 2D easily exfoliable monolayers with less than 6 atoms in the unit cell, found in ",getRef("mounet")," we also computed (at the PBE level):"]}),jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsx("li",{children:"possible ferromagnetic and antiferromagnetic configurations, to obtain the magnetic ground state;"}),jsxRuntimeExports$1.jsx("li",{children:"electronic band structure;"}),jsxRuntimeExports$1.jsx("li",{children:"phonon dispersion curves."})]}),jsxRuntimeExports$1.jsx("p",{children:"More details can be found in the associated publications."}),jsxRuntimeExports$1.jsx("div",{id:"definitions",className:"about-h",children:"Definitions and further details"}),jsxRuntimeExports$1.jsx(MathJax$2,{children:jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsx("li",{children:"All the properties are computed at the DFT-PBE level. The only exceptions are binding energies, which were calculated using the DF2-C09 and the rVV10 van-der-Waals functionals."}),jsxRuntimeExports$1.jsxs("li",{children:["All properties for the 258 easily exfoliable materials computed in"," ",getRef("mounet")," are calculated for the relaxed configuration in the correct magnetic ground state."]}),jsxRuntimeExports$1.jsxs("li",{children:["Binding energies are always computed in a non-magnetic reference configuration, both for the 3D parent and for exfoliated monolayers. We checked that including magnetism for magnetic systems does not alter the binding energy by more than 10 meV/Å2, and in the vast majority of cases it does not alter the classification as easily exfoliable (see Supplementary Figure in the journal paper"," ",getRef("sohier1"),")."]}),jsxRuntimeExports$1.jsxs("li",{children:["The total and absolute magnetizations are defined, respectively, as"," ","$$ M_{tot} = \\mu_B \\int m(\\vec{r}) \\, d\\vec{r} \\quad\\quad M_{abs} = \\mu_B \\int |m(\\vec{r})| \\, d\\vec{r} $$","where"," ","\\( m(\\vec{r})=n^\\uparrow(\\vec{r})-n^\\downarrow(\\vec{r}) \\)"," ","is the local magnetization and ","\\( n^\\uparrow(\\vec{r}) \\)",","," ","\\( n^\\downarrow(\\vec{r}) \\)"," are the densities of spin-up and spin-down electrons."]}),jsxRuntimeExports$1.jsxs("li",{children:["A system is labeled non-magnetic (NM) if in the ground state"," ","\\( M_{tot} = M_{abs} = 0 \\)",", while it is labeled anti-ferromagnetic (AFM) if ","\\( M_{abs} \\neq 0 \\)"," and"," ","\\( M_{tot} < 0.1 \\mu_B \\)",". In all other cases, the system is reported as ferromagnetic (FM)."]}),jsxRuntimeExports$1.jsx("li",{children:"Magnetic band structures are plotted with two different colors for the two different spin states."}),jsxRuntimeExports$1.jsx("li",{children:"For the same subset of 258 we have also performed phonon dispersion calculations. The calculation of 13 out of 258 phonon dispersions failed to converge in the self-consistent linear-response cycle, despite multiple attempts to tune calculation parameters. All the missing materials contain a lanthanide element (namely Ce, Dy, Er, Nd, Sm, Tb, Tm or Yb)."}),jsxRuntimeExports$1.jsx("li",{children:"Small imaginary ZA phonons close to Γ are a common numerical issue both in DFPT and in finite differences calculations for 2D materials. Recovering the perfect quadratic behavior of the ZA phonon, and the associated low frequencies near Γ requires prohibitively tight parameters (especially energy cutoffs)."}),jsxRuntimeExports$1.jsxs("li",{children:["The frequency separation between longitudinal and transverse optical phonons (LO-TO splitting) in polar materials crucially depends on dimensionality. In 2D systems and in the long-wavelength limit, the LO-TO splitting vanishes but the LO modes display a finite slope",getRef("sohier1"),". Using a newly implemented 2D setup in DFT and DFPT ",getRef("sohier2"),", we recover correctly this behavior in the phonon calculations. The phonon interpolation process is also appropriately modified ",getRef("sohier1")," to correctly describe the 2D LO-TO splitting."]}),jsxRuntimeExports$1.jsxs("li",{children:["As mentioned in the main text, due to symmetry unstable optical phonons can be found at Γ. When this happens, we choose to relax the structure by optimizing the atomic coordinates according to the displacement pattern associated with the unstable optical phonon. This typically leads to a symmetry reduction, and subsequently we allow for variable cell relaxation in order to take into account possible cell deformations associated with the atomic displacements. The details of the procedure are described in the Methods section of the journal paper ",getRef("campi"),"."]}),jsxRuntimeExports$1.jsx("li",{children:"Structures presenting unstable phonons outside Γ may be stabilized by including temperature effects or by considering supercells for which the wavevector of the unstable phonon folds at Γ. We do not try to do this because of the computational costs, even if the procedure would be analogous to that used for phonons at Γ."}),jsxRuntimeExports$1.jsxs("li",{children:["Paths and special k-points follow the conventions for 2D systems from Ref. ",getRef("ramirez")," as implemented in AiiDA"," ",getRef("aiida1"),"."]}),jsxRuntimeExports$1.jsxs("li",{children:["This set of 258 materials can be identified based on the citation associated with each material. Materials included in this set report only Ref. ",getRef("mounet")," as a reference paper."]}),jsxRuntimeExports$1.jsxs("li",{children:["All the structures, 3D and 2D, computed in Ref. ",getRef("campi")," ","are instead treated as non-magnetic using spin-unpolarized DFT regardless of their true magnetic ground state. The magnetic order has a negligible effect on the binding energies as discussed in Ref.",getRef("mounet"),", but caution is needed when looking at the electronic properties of materials with elements that might support a magnetic ground state. Materials with references of both Ref."," ",getRef("mounet")," and Ref. ",getRef("campi")," or just Ref."," ",getRef("campi")," have been computed with this non-magnetic approximation."]})]})}),jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"Acknowledgements and references"}),jsxRuntimeExports$1.jsx("b",{children:"HPC support"}),jsxRuntimeExports$1.jsx("br",{}),"Computational resources for this project have been provided by PRACE (Grant 2016163963 on KNL/Marconi at Cineca) and by the NCCR MARVEL (Piz Daint at CSCS).",jsxRuntimeExports$1.jsx("br",{}),jsxRuntimeExports$1.jsx("br",{}),jsxRuntimeExports$1.jsx("b",{children:"Primary publications"}),renderRefs("primary"),jsxRuntimeExports$1.jsx("b",{children:"Crystal structure databases"}),renderRefs("db"),jsxRuntimeExports$1.jsx("b",{children:"Software"}),renderRefs("software"),jsxRuntimeExports$1.jsx("b",{children:"Pseudopotentials and van der Waals functionals"}),renderRefs("pseudo_functionals"),jsxRuntimeExports$1.jsx("b",{children:"Van der Waals radii"}),renderRefs("vdw_radii"),jsxRuntimeExports$1.jsx("b",{children:"Other references"}),renderRefs("other"),jsxRuntimeExports$1.jsx("b",{children:"Related projects"}),renderRefs("related_projects"),jsxRuntimeExports$1.jsx("b",{children:"Similar studies"}),renderRefs("similar_studies")]})});var define_import_meta_env_default={BASE_URL:"/develop/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let mcRestApiUrl="https://dev-aiida.materialscloud.org/mc-rest-api/",aiidaRestBaseUrl="https://dev-aiida.materialscloud.org",exploreBaseUrl="https://dev-www.materialscloud.org/explore/";define_import_meta_env_default.VITE_PRODUCTION_BACKEND==="true"&&(mcRestApiUrl="https://aiida.materialscloud.org/mc-rest-api/",aiidaRestBaseUrl="https://aiida.materialscloud.org",exploreBaseUrl="https://www.materialscloud.org/explore/");const MC_REST_API_URL_BASE=mcRestApiUrl,MC_REST_API_URL=`${mcRestApiUrl}mc2d/pbe-v1`,AIIDA_REST_API_URL=`${aiidaRestBaseUrl}/mc2d/api/v4`,EXPLORE_URL=`${exploreBaseUrl}mc2d`;async function loadIndex(){let o=`${MC_REST_API_URL}/overview`;try{return await(await fetch(o,{method:"get"})).json()}catch(e){console.error("Error fetching index:",e)}}async function loadMetadata(){let o=`${MC_REST_API_URL}/meta`;try{return await(await fetch(o,{method:"get"})).json()}catch(e){console.error("Error fetching metadata:",e)}}async function loadDetails(o){let e=`${MC_REST_API_URL}/base/${o}`;try{return await(await fetch(e,{method:"get"})).json()}catch(a){console.error("Error fetching details:",a)}}async function loadAiidaAttributes(o){let e=`${AIIDA_REST_API_URL}/nodes/${o}/contents/attributes`;try{return(await(await fetch(e,{method:"get"})).json()).data.attributes}catch(a){console.error("Error fetching AiiDA attributes:",a)}}async function loadAiidaCif(o){let e=`${AIIDA_REST_API_URL}/nodes/${o}/download?download_format=cif&download=false`;try{return(await(await fetch(e,{method:"get"})).json()).data.download.data}catch(a){console.error("Error fetching AiiDA cif:",a)}}async function loadAiidaBands(o){let e=`${AIIDA_REST_API_URL}/nodes/${o}/download?download_format=json`;try{return await(await fetch(e,{method:"get"})).json()}catch(a){console.error("Error fetching AiiDA bands:",a)}}async function loadPhononVis(o){let e=`${MC_REST_API_URL}/phonon-vis/${o}`;try{const a=await fetch(e,{method:"get"});return a.ok?await a.json():null}catch(a){return console.error("Error fetching phonon-vis:",a),null}}async function loadStructureUuids(){let o=`${MC_REST_API_URL}/structure-uuids`;try{const e=await fetch(o,{method:"get"});return e.ok?await e.json():null}catch(e){return console.error("Error fetching structure-uuids:",e),null}}const DOCS_URL=`${MC_REST_API_URL_BASE}/docs`,INDEX_URL=`${MC_REST_API_URL}/overview`,SINGLE_ENTRY_URL=`${MC_REST_API_URL}/base/mc2d-1`,restapiText=jsxRuntimeExports$1.jsxs("div",{className:"restapi-text-container",children:[jsxRuntimeExports$1.jsx("p",{children:"This section contains an overview of our REST APIs to access the MC2D data."}),jsxRuntimeExports$1.jsx("div",{className:"restapi-h",children:"1. Materials Cloud and AiiDA REST APIs"}),jsxRuntimeExports$1.jsxs("div",{children:["The MC2D frontend is running on:",jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsxs("li",{children:["The Materials Cloud REST API for the curated metadata:"," ",jsxRuntimeExports$1.jsx("a",{href:DOCS_URL,target:"_blank",children:DOCS_URL}),", see e.g.",jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsxs("li",{children:["Index of materials:"," ",jsxRuntimeExports$1.jsx("a",{href:INDEX_URL,target:"_blank",children:INDEX_URL})]}),jsxRuntimeExports$1.jsxs("li",{children:["Single entry data:"," ",jsxRuntimeExports$1.jsx("a",{href:SINGLE_ENTRY_URL,target:"_blank",children:SINGLE_ENTRY_URL})]})]})]}),jsxRuntimeExports$1.jsxs("li",{children:["AiiDA REST API for properties and provenance:"," ",jsxRuntimeExports$1.jsx("a",{href:AIIDA_REST_API_URL,target:"_blank",children:AIIDA_REST_API_URL})]})]})]}),jsxRuntimeExports$1.jsx("div",{className:"restapi-h",children:"2. OPTIMADE REST API"}),jsxRuntimeExports$1.jsxs("div",{children:["The MC2D database can also be accessed via an API following the"," ",jsxRuntimeExports$1.jsx("a",{href:"https://www.optimade.org/optimade",target:"_blank",children:"OPTIMADE specification"}),". This currently only includes the crystal structures and no properties or provenance information is provided. Relevant endpoints are",jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsx("li",{children:jsxRuntimeExports$1.jsx("a",{href:"https://aiida.materialscloud.org/mc2d/optimade/v1/info",target:"_blank",children:"https://aiida.materialscloud.org/mc2d/optimade/v1/info"})}),jsxRuntimeExports$1.jsx("li",{children:jsxRuntimeExports$1.jsx("a",{href:"https://aiida.materialscloud.org/mc2d/optimade/v1/structures",target:"_blank",children:"https://aiida.materialscloud.org/mc2d/optimade/v1/structures"})})]})]})]});function countNumberOfAtoms(o){var e=o.split(/(?=[A-Z])/),a=0;return e.forEach(s=>{let h=s.match(/\d+/),nt=h==null?1:parseInt(h[0]);a+=nt}),a}function countNumberOfElements(o){let e=o.match(/[A-Z]/g);return e?e.length:0}const COLUMN_ORDER_AND_SETTINGS=[{field:"id",hide:!1,width:120},{field:"formula",hide:!1,minWidth:110},{field:"formula_hill",hide:!0},{field:"num_elements",hide:!1,minWidth:110},{field:"num_atoms",hide:!1,minWidth:110},{field:"prototype",hide:!0},{field:"space_group_int",hide:!1},{field:"space_group_number",hide:!0},{field:"band_gap",hide:!1,minWidth:110},{field:"abundance",hide:!0},{field:"magnetic_state",hide:!1,minWidth:110},{field:"total_magnetization",hide:!0,minWidth:130},{field:"absolute_magnetization",hide:!0,minWidth:130},{field:"phonons_unstable",hide:!1},{field:"binding_energy_df2",hide:!1,minWidth:140},{field:"binding_energy_rvv10",hide:!1},{field:"parent_formula",hide:!1},{field:"parent_space_group_number",hide:!0},{field:"parent_source_db",hide:!0},{field:"parent_source_db_id",hide:!0}],FRONTEND_COLUMNS=[{columnDef:{field:"num_elements",headerName:"Number of elements",colType:"integer"},calcFunc:o=>countNumberOfElements(o.formula_h)},{columnDef:{field:"num_atoms",headerName:"Num. of atoms/cell",colType:"integer"},calcFunc:o=>countNumberOfAtoms(o.formula_h)},{columnDef:{field:"space_group_int",headerName:"Space group international",colType:"spg_symbol",infoText:"International short symbol for the space group."},calcFunc:o=>Zs$1(o.sg).space_group_symbol}];function formatColumns(o){let e=[{field:"id",headerName:"ID",colType:"id",infoText:"The unique MC3D identifier of each structure."}];o["index-columns"].forEach(s=>{e.push({field:s.label,headerName:s.name,unit:s.unit||null,colType:s.type||"text",infoText:s.description||null})}),FRONTEND_COLUMNS.forEach(s=>{e.push(s.columnDef)});let a=[];return COLUMN_ORDER_AND_SETTINGS.forEach(s=>{let h=e.findIndex(nt=>nt.field===s.field);if(h!==-1){let nt=e[h];nt.hide=s.hide,["width","minWidth"].forEach(j=>{j in s&&(nt[j]=s[j])}),a.push(nt),e.splice(h,1)}}),e.forEach(s=>{s.hide=!0,a.push(s)}),a}function formatRows(o,e){let a=[],s={};return e["index-columns"].forEach(h=>{s[h.data_label]=h.label}),o.forEach(h=>{let nt=`/develop/#/details/${h.id}`,j={};Object.entries(h).map(([c,rt])=>{c in s&&(j[s[c]]=rt)});let $={id:h.id,href:nt};FRONTEND_COLUMNS.forEach(c=>{$[c.columnDef.field]=c.calcFunc(h)}),j={...j,...$},a.push(j)}),a}async function loadIndexMc2d(){let o=performance.now(),e=await loadIndex(),a=performance.now();console.log(`loadIndex: ${a-o} ms`),o=performance.now();let s=await loadMetadata();a=performance.now(),console.log(`loadMetadata: ${a-o} ms`),o=performance.now();let h=formatRows(e,s);return a=performance.now(),console.log(`formatRows: ${a-o} ms`),{columns:formatColumns(s),rows:h}}var FileSaver_min={exports:{}};(function(o,e){(function(a,s){s()})(commonjsGlobal$1,function(){function a(rt,ot){return typeof ot>"u"?ot={autoBom:!1}:typeof ot!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),ot={autoBom:!ot}),ot.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(rt.type)?new Blob(["\uFEFF",rt],{type:rt.type}):rt}function s(rt,ot,b){var _t=new XMLHttpRequest;_t.open("GET",rt),_t.responseType="blob",_t.onload=function(){c(_t.response,ot,b)},_t.onerror=function(){console.error("could not download file")},_t.send()}function h(rt){var ot=new XMLHttpRequest;ot.open("HEAD",rt,!1);try{ot.send()}catch{}return 200<=ot.status&&299>=ot.status}function nt(rt){try{rt.dispatchEvent(new MouseEvent("click"))}catch{var ot=document.createEvent("MouseEvents");ot.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),rt.dispatchEvent(ot)}}var j=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof commonjsGlobal$1=="object"&&commonjsGlobal$1.global===commonjsGlobal$1?commonjsGlobal$1:void 0,$=j.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=j.saveAs||(typeof window!="object"||window!==j?function(){}:"download"in HTMLAnchorElement.prototype&&!$?function(rt,ot,b){var _t=j.URL||j.webkitURL,Mn=document.createElement("a");ot=ot||rt.name||"download",Mn.download=ot,Mn.rel="noopener",typeof rt=="string"?(Mn.href=rt,Mn.origin===location.origin?nt(Mn):h(Mn.href)?s(rt,ot,b):nt(Mn,Mn.target="_blank")):(Mn.href=_t.createObjectURL(rt),setTimeout(function(){_t.revokeObjectURL(Mn.href)},4e4),setTimeout(function(){nt(Mn)},0))}:"msSaveOrOpenBlob"in navigator?function(rt,ot,b){if(ot=ot||rt.name||"download",typeof rt!="string")navigator.msSaveOrOpenBlob(a(rt,b),ot);else if(h(rt))s(rt,ot,b);else{var _t=document.createElement("a");_t.href=rt,_t.target="_blank",setTimeout(function(){nt(_t)})}}:function(rt,ot,b,_t){if(_t=_t||open("","_blank"),_t&&(_t.document.title=_t.document.body.innerText="downloading..."),typeof rt=="string")return s(rt,ot,b);var Mn=rt.type==="application/octet-stream",Dt=/constructor/i.test(j.HTMLElement)||j.safari,it=/CriOS\/[\d]+/.test(navigator.userAgent);if((it||Mn&&Dt||$)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var st=g.result;st=it?st:st.replace(/^data:[^;]*;/,"data:attachment/file;"),_t?_t.location.href=st:location=st,_t=null},g.readAsDataURL(rt)}else{var _=j.URL||j.webkitURL,Ln=_.createObjectURL(rt);_t?_t.location=Ln:location.href=Ln,_t=null,setTimeout(function(){_.revokeObjectURL(Ln)},4e4)}});j.saveAs=c.saveAs=c,o.exports=c})})(FileSaver_min);var FileSaver_minExports=FileSaver_min.exports;const getCurrentDateString=()=>{const o=new Date,e=o.getFullYear(),a=String(o.getMonth()+1).padStart(2,"0"),s=String(o.getDate()).padStart(2,"0"),h=String(o.getHours()).padStart(2,"0"),nt=String(o.getMinutes()).padStart(2,"0"),j=String(o.getSeconds()).padStart(2,"0");return`${e}-${a}-${s}-${h}-${nt}-${j}`},popover=jsxRuntimeExports$1.jsxs(Popover$1,{id:"popover-basic",children:[jsxRuntimeExports$1.jsx(Popover$1.Header,{children:jsxRuntimeExports$1.jsx("b",{children:"Download filtered entries"})}),jsxRuntimeExports$1.jsx(Popover$1.Body,{style:{textAlign:"justify"},children:jsxRuntimeExports$1.jsxs("p",{children:["This button allows to download all currently filtered entries shown in the Materials Grid. The data is downloaded in JSON format, as an array. The array contains a JSON object for each material entry, with key-value pairs corresponding to the column properties. Additionally, each entry includes a link to the corresponding detail page and a link to download the file in CIF format. ",jsxRuntimeExports$1.jsx("br",{}),jsxRuntimeExports$1.jsx("br",{}),"Note, to download all of the CIF files directly, see the corresponding Materials Cloud Archive entry."]})})]}),DownloadButton=({materialSelectorRef:o,disabled:e})=>{const[a,s]=reactExports.useState(!1),h=async()=>{if(o.current){s(!0);try{const nt=await loadStructureUuids();let $=o.current.getFilteredRows().map(b=>{let _t=nt[b.id],Mn=`${AIIDA_REST_API_URL}/nodes/${_t}/download?download_format=cif`,Dt={...b,details_link:`${window.location.origin}${b.href}`,download_cif:Mn};return delete Dt.href,Dt});const c=JSON.stringify($,null,2),rt=new Blob([c],{type:"application/json"}),ot=`mc2d_filtered_entries_${getCurrentDateString()}.json`;FileSaver_minExports.saveAs(rt,ot)}catch(nt){console.error("Error downloading data:",nt)}finally{s(!1)}}};return jsxRuntimeExports$1.jsxs("div",{className:"download-button-outer-container",children:[jsxRuntimeExports$1.jsx(Button,{size:"sm",variant:"secondary",onClick:h,disabled:e||a,children:a?jsxRuntimeExports$1.jsx(Spinner$1,{as:"span",animation:"border",size:"sm",role:"status","aria-hidden":"true"}):"Download filtered entries"}),jsxRuntimeExports$1.jsx(qs,{popover})]})};var DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React.createContext&&React.createContext(DefaultContext),_excluded=["attr","size","title"];function _objectWithoutProperties(o,e){if(o==null)return{};var a=_objectWithoutPropertiesLoose(o,e),s,h;if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(o);for(h=0;h=0)&&Object.prototype.propertyIsEnumerable.call(o,s)&&(a[s]=o[s])}return a}function _objectWithoutPropertiesLoose(o,e){if(o==null)return{};var a={};for(var s in o)if(Object.prototype.hasOwnProperty.call(o,s)){if(e.indexOf(s)>=0)continue;a[s]=o[s]}return a}function _extends(){return _extends=Object.assign?Object.assign.bind():function(o){for(var e=1;eReact.createElement(e.tag,_objectSpread({key:a},e.attr),Tree2Element(e.child)))}function GenIcon(o){return e=>React.createElement(IconBase,_extends({attr:_objectSpread({},o.attr)},e),Tree2Element(o.child))}function IconBase(o){var e=a=>{var{attr:s,size:h,title:nt}=o,j=_objectWithoutProperties(o,_excluded),$=h||a.size||"1em",c;return a.className&&(c=a.className),o.className&&(c=(c?c+" ":"")+o.className),React.createElement("svg",_extends({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},a.attr,s,j,{className:c,style:_objectSpread(_objectSpread({color:o.color||a.color},a.style),o.style),height:$,width:$,xmlns:"http://www.w3.org/2000/svg"}),nt&&React.createElement("title",null,nt),o.children)};return IconContext!==void 0?React.createElement(IconContext.Consumer,null,a=>e(a)):e(DefaultContext)}function FaBook(o){return GenIcon({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"},child:[]}]})(o)}const CitationText=({info:o})=>jsxRuntimeExports$1.jsxs("div",{style:{padding:"2px",display:"flex",gap:"6px",alignItems:"center"},children:[jsxRuntimeExports$1.jsxs("a",{className:"citation-a",href:`https://doi.org/${o.doi}`,target:"_blank",children:[jsxRuntimeExports$1.jsx(FaBook,{size:16,color:"black"})," ",o.authorsText,", ",o.journalText,", (",o.year,")"]}),jsxRuntimeExports$1.jsx(Gs,{doi:o.doi,label:"Paper DOI",color:"#a2e5b7"})]}),CITATION_MAPPING={Mounet18:{authorsText:"Mounet et al.",journalText:"Nat. Nanotech. 13, 246-252",doi:"10.1038/s41565-017-0035-5",year:2018},Campi23:{authorsText:"Campi et al.",journalText:"ACS Nano 17, 12, 11268-11278",doi:"10.1021/acsnano.2c11510",year:2023}},CitationsList=({citationLabels:o})=>jsxRuntimeExports$1.jsx("div",{style:{marginLeft:"8px"},children:o.map(e=>jsxRuntimeExports$1.jsx(CitationText,{info:CITATION_MAPPING[e]},e))}),MainPage=({tab:o})=>{const e=useNavigate(),[a,s]=reactExports.useState(o||"use"),[h,nt]=reactExports.useState([]),[j,$]=reactExports.useState([]);reactExports.useEffect(()=>{loadIndexMc2d().then(ot=>{nt(ot.columns),$(ot.rows)})},[]);const c=reactExports.useRef(null),rt=ot=>{s(ot),ot=="use"?e("/"):e(`/${ot}`)};return jsxRuntimeExports$1.jsx(default_1$1,{activeSection:"discover",breadcrumbsPath:[{name:"Discover",link:"https://www.materialscloud.org/discover"},{name:"Materials Cloud 2D crystals database",link:null}],children:jsxRuntimeExports$1.jsxs(Container$1,{fluid:"xxl",children:[jsxRuntimeExports$1.jsx(TitleAndLogo,{}),jsxRuntimeExports$1.jsxs("div",{className:"description",children:["Materials Cloud 2D crystals database is a curated set of 2D materials obtained by screening most known 3D crystal structures by a computational exfoliation procedure. This database contains the relaxed 2D materials and their various properties. For more details, please see the related publications:",jsxRuntimeExports$1.jsx("div",{style:{margin:"10px"},children:jsxRuntimeExports$1.jsx(CitationsList,{citationLabels:["Mounet18","Campi23"]})})]}),jsxRuntimeExports$1.jsxs(Tabs$1,{className:"main-tabs",activeKey:a,onSelect:rt,children:[jsxRuntimeExports$1.jsxs(Tab$1,{eventKey:"use",title:"Use",children:[jsxRuntimeExports$1.jsx("div",{style:{marginTop:"20px"}}),jsxRuntimeExports$1.jsx(default_1,{ref:c,columns:h,rows:j}),jsxRuntimeExports$1.jsx(DownloadButton,{materialSelectorRef:c,disabled:j.length==0})]}),jsxRuntimeExports$1.jsx(Tab$1,{eventKey:"about",title:"About",children:aboutText}),jsxRuntimeExports$1.jsx(Tab$1,{eventKey:"restapi",title:"REST API",children:restapiText})]})]})})};var Zs=Object.defineProperty,Ys$1=(o,e,a)=>e in o?Zs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[e]=a,Ci=(o,e,a)=>(Ys$1(o,typeof e!="symbol"?e+"":e,a),a),commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/** +***************************************************************************** */var __assign$2=function(){return __assign$2=Object.assign||function(e){for(var a,s=1,h=arguments.length;s{if(references[e].type!=o)return;let a=refNr(e);return jsxRuntimeExports$1.jsxs("li",{style:{display:"flex",alignItems:"flex-start"},children:[jsxRuntimeExports$1.jsx("span",{style:{verticalAlign:"super",fontSize:"0.8em"},children:jsxRuntimeExports$1.jsxs("b",{children:["[",a,"]"]})}),jsxRuntimeExports$1.jsx("div",{id:"ref"+a,style:{marginLeft:"5px"},children:references[e].ref})]},a)})})}const aboutText=jsxRuntimeExports$1.jsx(MathJaxContext$1,{config:mathJaxConfig,children:jsxRuntimeExports$1.jsxs("div",{className:"about-text-container",children:[jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"How to cite"}),jsxRuntimeExports$1.jsx("p",{children:"If you use this tool or data, please cite the following works:"}),jsxRuntimeExports$1.jsx(CitationBox,{title:jsxRuntimeExports$1.jsx("span",{children:"Two-dimensional materials from high-throughput computational exfoliation of experimentally known compounds"}),authors:jsxRuntimeExports$1.jsx("span",{children:"N. Mounet, M. Gibertini, P. Schwaller, D. Campi, A. Merkys, A. Marrazzo, T. Sohier, I. E. Castelli, A. Cepellotti, G. Pizzi & N. Marzari"}),journal:"Nat. Nanotech. 13, 246-252",doi:"10.1038/s41565-017-0035-5",year:"2018",data:jsxRuntimeExports$1.jsxs("span",{children:["N. Mounet et al., Materials Cloud Archive 2020.158, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.24435/materialscloud:az-b2",target:"_blank",children:"10.24435/materialscloud:az-b2"})," ","(2020)"]}),arxiv:jsxRuntimeExports$1.jsxs("span",{children:["N. Mounet et al., arXiv:1611.05234, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.48550/arXiv.1611.05234",target:"_blank",children:"10.48550/arXiv.1611.05234"})," ","(2016)"]})}),jsxRuntimeExports$1.jsx(CitationBox,{title:jsxRuntimeExports$1.jsx("span",{children:"Expansion of the Materials Cloud 2D Database"}),authors:jsxRuntimeExports$1.jsx("span",{children:"D. Campi, N. Mounet, M. Gibertini, G. Pizzi & N. Marzari"}),journal:"ACS Nano 17, 12, 11268-11278",doi:"10.1021/acsnano.2c11510",year:"2023",data:jsxRuntimeExports$1.jsxs("span",{children:["D. Campi et al., Materials Cloud Archive 2022.84, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.24435/materialscloud:36-nd",target:"_blank",children:"10.24435/materialscloud:36-nd"})," ","(2022)"]}),arxiv:jsxRuntimeExports$1.jsxs("span",{children:["D. Campi et al., arXiv:2210.11301, doi:"," ",jsxRuntimeExports$1.jsx("a",{href:"https://doi.org/10.48550/arXiv.2210.11301",target:"_blank",children:"10.48550/arXiv.2210.11301"})," ","(2022)"]})}),jsxRuntimeExports$1.jsx("p",{children:"The proper reference for each structure is reported in their corresponding detail page."}),jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"General overview"}),jsxRuntimeExports$1.jsxs("p",{children:["The 2D structures are originating from the computational exfoliation of experimental bulk (3D) materials extracted from the MPDS",getRef("mpds"),", the COD",getRef("cod")," and the ICSD",getRef("icsd")," databases. The computational procedure consisted in:"]}),jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsxs("li",{children:["cleaning improperly formatted CIF files with ",jsxRuntimeExports$1.jsx("b",{children:"cod-tools"}),getRef("cod"),getRef("cod_parser"),";"]}),jsxRuntimeExports$1.jsx("li",{children:"filtering out disordered structures, incompletely defined ones and those obviously wrong;"}),jsxRuntimeExports$1.jsxs("li",{children:["converting CIF files into ",jsxRuntimeExports$1.jsx("b",{children:"AiiDA"}),getRef("aiida1"),getRef("aiida2")," structures, using ",jsxRuntimeExports$1.jsx("b",{children:"pymatgen"}),getRef("pymatgen"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["correcting round-off errors in the atomic positions to recover the structure symmetries, thanks to ",jsxRuntimeExports$1.jsx("b",{children:"spglib"}),getRef("spglib"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["filtering out duplicate structures",getRef("pymatgen"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["screening layered materials thanks to a geometrical algorithm based on the identification of chemical bonds from interatomic distances, using van der Waals atomic radii provided by Ref.",getRef("vdw_radii"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["relaxing and computing the binding energies of the layered materials, using the ",jsxRuntimeExports$1.jsx("b",{children:"Quantum ESPRESSO"}),getRef("qe")," code with ",jsxRuntimeExports$1.jsx("b",{children:"DFT-PBE"})," van der Waals functionals (",jsxRuntimeExports$1.jsx("b",{children:"rVV10"}),getRef("vdw_lee"),getRef("vdw_cooper")," and ",jsxRuntimeExports$1.jsx("b",{children:"DF2-C09"}),getRef("vdw_vydrov"),getRef("vdw_sabatini"),"), tested and converged pseudopotentials from the ",jsxRuntimeExports$1.jsx("b",{children:"SSSP"}),getRef("sssp"),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["selecting easily exfoliable materials as those for which the binding energy is less than 30 meV/Å",jsxRuntimeExports$1.jsx("sup",{children:"2"}),"(with the DF2-C09 functional) or 35 meV/Å",jsxRuntimeExports$1.jsx("sup",{children:"2"})," (with rVV10) and potentially exfoliable materials for which the binding energy is less than 120 meV/Å",jsxRuntimeExports$1.jsx("sup",{children:"2"}),";"]}),jsxRuntimeExports$1.jsxs("li",{children:["optimizing the geometry of the monolayers as an isolated system using the PBE",getRef("pbe")," functional."]})]}),jsxRuntimeExports$1.jsxs("p",{children:["On the subset of 2D easily exfoliable monolayers with less than 6 atoms in the unit cell, found in ",getRef("mounet")," we also computed (at the PBE level):"]}),jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsx("li",{children:"possible ferromagnetic and antiferromagnetic configurations, to obtain the magnetic ground state;"}),jsxRuntimeExports$1.jsx("li",{children:"electronic band structure;"}),jsxRuntimeExports$1.jsx("li",{children:"phonon dispersion curves."})]}),jsxRuntimeExports$1.jsx("p",{children:"More details can be found in the associated publications."}),jsxRuntimeExports$1.jsx("div",{id:"definitions",className:"about-h",children:"Definitions and further details"}),jsxRuntimeExports$1.jsx(MathJax$2,{children:jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsx("li",{children:"All the properties are computed at the DFT-PBE level. The only exceptions are binding energies, which were calculated using the DF2-C09 and the rVV10 van-der-Waals functionals."}),jsxRuntimeExports$1.jsxs("li",{children:["All properties for the 258 easily exfoliable materials computed in"," ",getRef("mounet")," are calculated for the relaxed configuration in the correct magnetic ground state."]}),jsxRuntimeExports$1.jsxs("li",{children:["Binding energies are always computed in a non-magnetic reference configuration, both for the 3D parent and for exfoliated monolayers. We checked that including magnetism for magnetic systems does not alter the binding energy by more than 10 meV/Å2, and in the vast majority of cases it does not alter the classification as easily exfoliable (see Supplementary Figure in the journal paper"," ",getRef("sohier1"),")."]}),jsxRuntimeExports$1.jsxs("li",{children:["The total and absolute magnetizations are defined, respectively, as"," ","$$ M_{tot} = \\mu_B \\int m(\\vec{r}) \\, d\\vec{r} \\quad\\quad M_{abs} = \\mu_B \\int |m(\\vec{r})| \\, d\\vec{r} $$","where"," ","\\( m(\\vec{r})=n^\\uparrow(\\vec{r})-n^\\downarrow(\\vec{r}) \\)"," ","is the local magnetization and ","\\( n^\\uparrow(\\vec{r}) \\)",","," ","\\( n^\\downarrow(\\vec{r}) \\)"," are the densities of spin-up and spin-down electrons."]}),jsxRuntimeExports$1.jsxs("li",{children:["A system is labeled non-magnetic (NM) if in the ground state"," ","\\( M_{tot} = M_{abs} = 0 \\)",", while it is labeled anti-ferromagnetic (AFM) if ","\\( M_{abs} \\neq 0 \\)"," and"," ","\\( M_{tot} < 0.1 \\mu_B \\)",". In all other cases, the system is reported as ferromagnetic (FM)."]}),jsxRuntimeExports$1.jsx("li",{children:"Magnetic band structures are plotted with two different colors for the two different spin states."}),jsxRuntimeExports$1.jsx("li",{children:"For the same subset of 258 we have also performed phonon dispersion calculations. The calculation of 13 out of 258 phonon dispersions failed to converge in the self-consistent linear-response cycle, despite multiple attempts to tune calculation parameters. All the missing materials contain a lanthanide element (namely Ce, Dy, Er, Nd, Sm, Tb, Tm or Yb)."}),jsxRuntimeExports$1.jsx("li",{children:"Small imaginary ZA phonons close to Γ are a common numerical issue both in DFPT and in finite differences calculations for 2D materials. Recovering the perfect quadratic behavior of the ZA phonon, and the associated low frequencies near Γ requires prohibitively tight parameters (especially energy cutoffs)."}),jsxRuntimeExports$1.jsxs("li",{children:["The frequency separation between longitudinal and transverse optical phonons (LO-TO splitting) in polar materials crucially depends on dimensionality. In 2D systems and in the long-wavelength limit, the LO-TO splitting vanishes but the LO modes display a finite slope",getRef("sohier1"),". Using a newly implemented 2D setup in DFT and DFPT ",getRef("sohier2"),", we recover correctly this behavior in the phonon calculations. The phonon interpolation process is also appropriately modified ",getRef("sohier1")," to correctly describe the 2D LO-TO splitting."]}),jsxRuntimeExports$1.jsxs("li",{children:["As mentioned in the main text, due to symmetry unstable optical phonons can be found at Γ. When this happens, we choose to relax the structure by optimizing the atomic coordinates according to the displacement pattern associated with the unstable optical phonon. This typically leads to a symmetry reduction, and subsequently we allow for variable cell relaxation in order to take into account possible cell deformations associated with the atomic displacements. The details of the procedure are described in the Methods section of the journal paper ",getRef("campi"),"."]}),jsxRuntimeExports$1.jsx("li",{children:"Structures presenting unstable phonons outside Γ may be stabilized by including temperature effects or by considering supercells for which the wavevector of the unstable phonon folds at Γ. We do not try to do this because of the computational costs, even if the procedure would be analogous to that used for phonons at Γ."}),jsxRuntimeExports$1.jsxs("li",{children:["Paths and special k-points follow the conventions for 2D systems from Ref. ",getRef("ramirez")," as implemented in AiiDA"," ",getRef("aiida1"),"."]}),jsxRuntimeExports$1.jsxs("li",{children:["This set of 258 materials can be identified based on the citation associated with each material. Materials included in this set report only Ref. ",getRef("mounet")," as a reference paper."]}),jsxRuntimeExports$1.jsxs("li",{children:["All the structures, 3D and 2D, computed in Ref. ",getRef("campi")," ","are instead treated as non-magnetic using spin-unpolarized DFT regardless of their true magnetic ground state. The magnetic order has a negligible effect on the binding energies as discussed in Ref.",getRef("mounet"),", but caution is needed when looking at the electronic properties of materials with elements that might support a magnetic ground state. Materials with references of both Ref."," ",getRef("mounet")," and Ref. ",getRef("campi")," or just Ref."," ",getRef("campi")," have been computed with this non-magnetic approximation."]})]})}),jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"Legacy app"}),jsxRuntimeExports$1.jsxs("p",{children:["The previous version of this app can be found at"," ",jsxRuntimeExports$1.jsx("a",{href:"https://www.materialscloud.org/discover/legacy-mc2d",target:"_blank",children:"materialscloud.org/discover/legacy-mc2d"}),"."]}),jsxRuntimeExports$1.jsx("div",{className:"about-h",children:"Acknowledgements and references"}),jsxRuntimeExports$1.jsx("b",{children:"HPC support"}),jsxRuntimeExports$1.jsx("br",{}),"Computational resources for this project have been provided by PRACE (Grant 2016163963 on KNL/Marconi at Cineca) and by the NCCR MARVEL (Piz Daint at CSCS).",jsxRuntimeExports$1.jsx("br",{}),jsxRuntimeExports$1.jsx("br",{}),jsxRuntimeExports$1.jsx("b",{children:"Primary publications"}),renderRefs("primary"),jsxRuntimeExports$1.jsx("b",{children:"Crystal structure databases"}),renderRefs("db"),jsxRuntimeExports$1.jsx("b",{children:"Software"}),renderRefs("software"),jsxRuntimeExports$1.jsx("b",{children:"Pseudopotentials and van der Waals functionals"}),renderRefs("pseudo_functionals"),jsxRuntimeExports$1.jsx("b",{children:"Van der Waals radii"}),renderRefs("vdw_radii"),jsxRuntimeExports$1.jsx("b",{children:"Other references"}),renderRefs("other"),jsxRuntimeExports$1.jsx("b",{children:"Related projects"}),renderRefs("related_projects"),jsxRuntimeExports$1.jsx("b",{children:"Similar studies"}),renderRefs("similar_studies")]})});var define_import_meta_env_default={BASE_URL:"/develop/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let mcRestApiUrl="https://dev-aiida.materialscloud.org/mc-rest-api/",aiidaRestBaseUrl="https://dev-aiida.materialscloud.org",exploreBaseUrl="https://dev-www.materialscloud.org/explore/";define_import_meta_env_default.VITE_PRODUCTION_BACKEND==="true"&&(mcRestApiUrl="https://aiida.materialscloud.org/mc-rest-api/",aiidaRestBaseUrl="https://aiida.materialscloud.org",exploreBaseUrl="https://www.materialscloud.org/explore/");const MC_REST_API_URL_BASE=mcRestApiUrl,MC_REST_API_URL=`${mcRestApiUrl}mc2d/pbe-v1`,AIIDA_REST_API_URL=`${aiidaRestBaseUrl}/mc2d/api/v4`,EXPLORE_URL=`${exploreBaseUrl}mc2d`;async function loadIndex(){let o=`${MC_REST_API_URL}/overview`;try{return await(await fetch(o,{method:"get"})).json()}catch(e){console.error("Error fetching index:",e)}}async function loadMetadata(){let o=`${MC_REST_API_URL}/meta`;try{return await(await fetch(o,{method:"get"})).json()}catch(e){console.error("Error fetching metadata:",e)}}async function loadDetails(o){let e=`${MC_REST_API_URL}/base/${o}`;try{return await(await fetch(e,{method:"get"})).json()}catch(a){console.error("Error fetching details:",a)}}async function loadAiidaAttributes(o){let e=`${AIIDA_REST_API_URL}/nodes/${o}/contents/attributes`;try{return(await(await fetch(e,{method:"get"})).json()).data.attributes}catch(a){console.error("Error fetching AiiDA attributes:",a)}}async function loadAiidaCif(o){let e=`${AIIDA_REST_API_URL}/nodes/${o}/download?download_format=cif&download=false`;try{return(await(await fetch(e,{method:"get"})).json()).data.download.data}catch(a){console.error("Error fetching AiiDA cif:",a)}}async function loadAiidaBands(o){let e=`${AIIDA_REST_API_URL}/nodes/${o}/download?download_format=json`;try{return await(await fetch(e,{method:"get"})).json()}catch(a){console.error("Error fetching AiiDA bands:",a)}}async function loadPhononVis(o){let e=`${MC_REST_API_URL}/phonon-vis/${o}`;try{const a=await fetch(e,{method:"get"});return a.ok?await a.json():null}catch(a){return console.error("Error fetching phonon-vis:",a),null}}async function loadStructureUuids(){let o=`${MC_REST_API_URL}/structure-uuids`;try{const e=await fetch(o,{method:"get"});return e.ok?await e.json():null}catch(e){return console.error("Error fetching structure-uuids:",e),null}}const DOCS_URL=`${MC_REST_API_URL_BASE}/docs`,INDEX_URL=`${MC_REST_API_URL}/overview`,SINGLE_ENTRY_URL=`${MC_REST_API_URL}/base/mc2d-1`,restapiText=jsxRuntimeExports$1.jsxs("div",{className:"restapi-text-container",children:[jsxRuntimeExports$1.jsx("p",{children:"This section contains an overview of our REST APIs to access the MC2D data."}),jsxRuntimeExports$1.jsx("div",{className:"restapi-h",children:"1. Materials Cloud and AiiDA REST APIs"}),jsxRuntimeExports$1.jsxs("div",{children:["The MC2D frontend is running on:",jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsxs("li",{children:["The Materials Cloud REST API for the curated metadata:"," ",jsxRuntimeExports$1.jsx("a",{href:DOCS_URL,target:"_blank",children:DOCS_URL}),", see e.g.",jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsxs("li",{children:["Index of materials:"," ",jsxRuntimeExports$1.jsx("a",{href:INDEX_URL,target:"_blank",children:INDEX_URL})]}),jsxRuntimeExports$1.jsxs("li",{children:["Single entry data:"," ",jsxRuntimeExports$1.jsx("a",{href:SINGLE_ENTRY_URL,target:"_blank",children:SINGLE_ENTRY_URL})]})]})]}),jsxRuntimeExports$1.jsxs("li",{children:["AiiDA REST API for properties and provenance:"," ",jsxRuntimeExports$1.jsx("a",{href:AIIDA_REST_API_URL,target:"_blank",children:AIIDA_REST_API_URL})]})]})]}),jsxRuntimeExports$1.jsx("div",{className:"restapi-h",children:"2. OPTIMADE REST API"}),jsxRuntimeExports$1.jsxs("div",{children:["The MC2D database can also be accessed via an API following the"," ",jsxRuntimeExports$1.jsx("a",{href:"https://www.optimade.org/optimade",target:"_blank",children:"OPTIMADE specification"}),". This currently only includes the crystal structures and no properties or provenance information is provided. Relevant endpoints are",jsxRuntimeExports$1.jsxs("ul",{children:[jsxRuntimeExports$1.jsx("li",{children:jsxRuntimeExports$1.jsx("a",{href:"https://aiida.materialscloud.org/mc2d/optimade/v1/info",target:"_blank",children:"https://aiida.materialscloud.org/mc2d/optimade/v1/info"})}),jsxRuntimeExports$1.jsx("li",{children:jsxRuntimeExports$1.jsx("a",{href:"https://aiida.materialscloud.org/mc2d/optimade/v1/structures",target:"_blank",children:"https://aiida.materialscloud.org/mc2d/optimade/v1/structures"})})]})]})]});function countNumberOfAtoms(o){var e=o.split(/(?=[A-Z])/),a=0;return e.forEach(s=>{let h=s.match(/\d+/),nt=h==null?1:parseInt(h[0]);a+=nt}),a}function countNumberOfElements(o){let e=o.match(/[A-Z]/g);return e?e.length:0}const COLUMN_ORDER_AND_SETTINGS=[{field:"id",hide:!1,width:120},{field:"formula",hide:!1,minWidth:110},{field:"formula_hill",hide:!0},{field:"num_elements",hide:!1,minWidth:110},{field:"num_atoms",hide:!1,minWidth:110},{field:"prototype",hide:!0},{field:"space_group_int",hide:!1},{field:"space_group_number",hide:!0},{field:"band_gap",hide:!1,minWidth:110},{field:"abundance",hide:!0},{field:"magnetic_state",hide:!1,minWidth:110},{field:"total_magnetization",hide:!0,minWidth:130},{field:"absolute_magnetization",hide:!0,minWidth:130},{field:"phonons_unstable",hide:!1},{field:"binding_energy_df2",hide:!1,minWidth:140},{field:"binding_energy_rvv10",hide:!1},{field:"parent_formula",hide:!1},{field:"parent_space_group_number",hide:!0},{field:"parent_source_db",hide:!0},{field:"parent_source_db_id",hide:!0}],FRONTEND_COLUMNS=[{columnDef:{field:"num_elements",headerName:"Number of elements",colType:"integer"},calcFunc:o=>countNumberOfElements(o.formula_h)},{columnDef:{field:"num_atoms",headerName:"Num. of atoms/cell",colType:"integer"},calcFunc:o=>countNumberOfAtoms(o.formula_h)},{columnDef:{field:"space_group_int",headerName:"Space group international",colType:"spg_symbol",infoText:"International short symbol for the space group."},calcFunc:o=>Zs$1(o.sg).space_group_symbol}];function formatColumns(o){let e=[{field:"id",headerName:"ID",colType:"id",infoText:"The unique MC3D identifier of each structure."}];o["index-columns"].forEach(s=>{e.push({field:s.label,headerName:s.name,unit:s.unit||null,colType:s.type||"text",infoText:s.description||null})}),FRONTEND_COLUMNS.forEach(s=>{e.push(s.columnDef)});let a=[];return COLUMN_ORDER_AND_SETTINGS.forEach(s=>{let h=e.findIndex(nt=>nt.field===s.field);if(h!==-1){let nt=e[h];nt.hide=s.hide,["width","minWidth"].forEach(j=>{j in s&&(nt[j]=s[j])}),a.push(nt),e.splice(h,1)}}),e.forEach(s=>{s.hide=!0,a.push(s)}),a}function formatRows(o,e){let a=[],s={};return e["index-columns"].forEach(h=>{s[h.data_label]=h.label}),o.forEach(h=>{let nt=`/develop/#/details/${h.id}`,j={};Object.entries(h).map(([c,rt])=>{c in s&&(j[s[c]]=rt)});let $={id:h.id,href:nt};FRONTEND_COLUMNS.forEach(c=>{$[c.columnDef.field]=c.calcFunc(h)}),j={...j,...$},a.push(j)}),a}async function loadIndexMc2d(){let o=performance.now(),e=await loadIndex(),a=performance.now();console.log(`loadIndex: ${a-o} ms`),o=performance.now();let s=await loadMetadata();a=performance.now(),console.log(`loadMetadata: ${a-o} ms`),o=performance.now();let h=formatRows(e,s);return a=performance.now(),console.log(`formatRows: ${a-o} ms`),{columns:formatColumns(s),rows:h}}var FileSaver_min={exports:{}};(function(o,e){(function(a,s){s()})(commonjsGlobal$1,function(){function a(rt,ot){return typeof ot>"u"?ot={autoBom:!1}:typeof ot!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),ot={autoBom:!ot}),ot.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(rt.type)?new Blob(["\uFEFF",rt],{type:rt.type}):rt}function s(rt,ot,b){var _t=new XMLHttpRequest;_t.open("GET",rt),_t.responseType="blob",_t.onload=function(){c(_t.response,ot,b)},_t.onerror=function(){console.error("could not download file")},_t.send()}function h(rt){var ot=new XMLHttpRequest;ot.open("HEAD",rt,!1);try{ot.send()}catch{}return 200<=ot.status&&299>=ot.status}function nt(rt){try{rt.dispatchEvent(new MouseEvent("click"))}catch{var ot=document.createEvent("MouseEvents");ot.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),rt.dispatchEvent(ot)}}var j=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof commonjsGlobal$1=="object"&&commonjsGlobal$1.global===commonjsGlobal$1?commonjsGlobal$1:void 0,$=j.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=j.saveAs||(typeof window!="object"||window!==j?function(){}:"download"in HTMLAnchorElement.prototype&&!$?function(rt,ot,b){var _t=j.URL||j.webkitURL,Mn=document.createElement("a");ot=ot||rt.name||"download",Mn.download=ot,Mn.rel="noopener",typeof rt=="string"?(Mn.href=rt,Mn.origin===location.origin?nt(Mn):h(Mn.href)?s(rt,ot,b):nt(Mn,Mn.target="_blank")):(Mn.href=_t.createObjectURL(rt),setTimeout(function(){_t.revokeObjectURL(Mn.href)},4e4),setTimeout(function(){nt(Mn)},0))}:"msSaveOrOpenBlob"in navigator?function(rt,ot,b){if(ot=ot||rt.name||"download",typeof rt!="string")navigator.msSaveOrOpenBlob(a(rt,b),ot);else if(h(rt))s(rt,ot,b);else{var _t=document.createElement("a");_t.href=rt,_t.target="_blank",setTimeout(function(){nt(_t)})}}:function(rt,ot,b,_t){if(_t=_t||open("","_blank"),_t&&(_t.document.title=_t.document.body.innerText="downloading..."),typeof rt=="string")return s(rt,ot,b);var Mn=rt.type==="application/octet-stream",Dt=/constructor/i.test(j.HTMLElement)||j.safari,it=/CriOS\/[\d]+/.test(navigator.userAgent);if((it||Mn&&Dt||$)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var st=g.result;st=it?st:st.replace(/^data:[^;]*;/,"data:attachment/file;"),_t?_t.location.href=st:location=st,_t=null},g.readAsDataURL(rt)}else{var _=j.URL||j.webkitURL,Ln=_.createObjectURL(rt);_t?_t.location=Ln:location.href=Ln,_t=null,setTimeout(function(){_.revokeObjectURL(Ln)},4e4)}});j.saveAs=c.saveAs=c,o.exports=c})})(FileSaver_min);var FileSaver_minExports=FileSaver_min.exports;const getCurrentDateString=()=>{const o=new Date,e=o.getFullYear(),a=String(o.getMonth()+1).padStart(2,"0"),s=String(o.getDate()).padStart(2,"0"),h=String(o.getHours()).padStart(2,"0"),nt=String(o.getMinutes()).padStart(2,"0"),j=String(o.getSeconds()).padStart(2,"0");return`${e}-${a}-${s}-${h}-${nt}-${j}`},popover=jsxRuntimeExports$1.jsxs(Popover$1,{id:"popover-basic",children:[jsxRuntimeExports$1.jsx(Popover$1.Header,{children:jsxRuntimeExports$1.jsx("b",{children:"Download filtered entries"})}),jsxRuntimeExports$1.jsx(Popover$1.Body,{style:{textAlign:"justify"},children:jsxRuntimeExports$1.jsxs("p",{children:["This button allows to download all currently filtered entries shown in the Materials Grid. The data is downloaded in JSON format, as an array. The array contains a JSON object for each material entry, with key-value pairs corresponding to the column properties. Additionally, each entry includes a link to the corresponding detail page and a link to download the file in CIF format. ",jsxRuntimeExports$1.jsx("br",{}),jsxRuntimeExports$1.jsx("br",{}),"Note, to download all of the CIF files directly, see the corresponding Materials Cloud Archive entry."]})})]}),DownloadButton=({materialSelectorRef:o,disabled:e})=>{const[a,s]=reactExports.useState(!1),h=async()=>{if(o.current){s(!0);try{const nt=await loadStructureUuids();let $=o.current.getFilteredRows().map(b=>{let _t=nt[b.id],Mn=`${AIIDA_REST_API_URL}/nodes/${_t}/download?download_format=cif`,Dt={...b,details_link:`${window.location.origin}${b.href}`,download_cif:Mn};return delete Dt.href,Dt});const c=JSON.stringify($,null,2),rt=new Blob([c],{type:"application/json"}),ot=`mc2d_filtered_entries_${getCurrentDateString()}.json`;FileSaver_minExports.saveAs(rt,ot)}catch(nt){console.error("Error downloading data:",nt)}finally{s(!1)}}};return jsxRuntimeExports$1.jsxs("div",{className:"download-button-outer-container",children:[jsxRuntimeExports$1.jsx(Button,{size:"sm",variant:"secondary",onClick:h,disabled:e||a,children:a?jsxRuntimeExports$1.jsx(Spinner$1,{as:"span",animation:"border",size:"sm",role:"status","aria-hidden":"true"}):"Download filtered entries"}),jsxRuntimeExports$1.jsx(qs,{popover})]})};var DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React.createContext&&React.createContext(DefaultContext),_excluded=["attr","size","title"];function _objectWithoutProperties(o,e){if(o==null)return{};var a=_objectWithoutPropertiesLoose(o,e),s,h;if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(o);for(h=0;h=0)&&Object.prototype.propertyIsEnumerable.call(o,s)&&(a[s]=o[s])}return a}function _objectWithoutPropertiesLoose(o,e){if(o==null)return{};var a={};for(var s in o)if(Object.prototype.hasOwnProperty.call(o,s)){if(e.indexOf(s)>=0)continue;a[s]=o[s]}return a}function _extends(){return _extends=Object.assign?Object.assign.bind():function(o){for(var e=1;eReact.createElement(e.tag,_objectSpread({key:a},e.attr),Tree2Element(e.child)))}function GenIcon(o){return e=>React.createElement(IconBase,_extends({attr:_objectSpread({},o.attr)},e),Tree2Element(o.child))}function IconBase(o){var e=a=>{var{attr:s,size:h,title:nt}=o,j=_objectWithoutProperties(o,_excluded),$=h||a.size||"1em",c;return a.className&&(c=a.className),o.className&&(c=(c?c+" ":"")+o.className),React.createElement("svg",_extends({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},a.attr,s,j,{className:c,style:_objectSpread(_objectSpread({color:o.color||a.color},a.style),o.style),height:$,width:$,xmlns:"http://www.w3.org/2000/svg"}),nt&&React.createElement("title",null,nt),o.children)};return IconContext!==void 0?React.createElement(IconContext.Consumer,null,a=>e(a)):e(DefaultContext)}function FaBook(o){return GenIcon({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"},child:[]}]})(o)}const CitationText=({info:o})=>jsxRuntimeExports$1.jsxs("div",{style:{padding:"2px",display:"flex",gap:"6px",alignItems:"center"},children:[jsxRuntimeExports$1.jsxs("a",{className:"citation-a",href:`https://doi.org/${o.doi}`,target:"_blank",children:[jsxRuntimeExports$1.jsx(FaBook,{size:16,color:"black"})," ",o.authorsText,", ",o.journalText,", (",o.year,")"]}),jsxRuntimeExports$1.jsx(Gs,{doi:o.doi,label:"Paper DOI",color:"#a2e5b7"})]}),CITATION_MAPPING={Mounet18:{authorsText:"Mounet et al.",journalText:"Nat. Nanotech. 13, 246-252",doi:"10.1038/s41565-017-0035-5",year:2018},Campi23:{authorsText:"Campi et al.",journalText:"ACS Nano 17, 12, 11268-11278",doi:"10.1021/acsnano.2c11510",year:2023}},CitationsList=({citationLabels:o})=>jsxRuntimeExports$1.jsx("div",{style:{marginLeft:"8px"},children:o.map(e=>jsxRuntimeExports$1.jsx(CitationText,{info:CITATION_MAPPING[e]},e))}),MainPage=({tab:o})=>{const e=useNavigate(),[a,s]=reactExports.useState(o||"use"),[h,nt]=reactExports.useState([]),[j,$]=reactExports.useState([]);reactExports.useEffect(()=>{loadIndexMc2d().then(ot=>{nt(ot.columns),$(ot.rows)})},[]);const c=reactExports.useRef(null),rt=ot=>{s(ot),ot=="use"?e("/"):e(`/${ot}`)};return jsxRuntimeExports$1.jsx(default_1$1,{activeSection:"discover",breadcrumbsPath:[{name:"Discover",link:"https://www.materialscloud.org/discover"},{name:"Materials Cloud 2D crystals database",link:null}],children:jsxRuntimeExports$1.jsxs(Container$1,{fluid:"xxl",children:[jsxRuntimeExports$1.jsx(TitleAndLogo,{}),jsxRuntimeExports$1.jsxs("div",{className:"description",children:["Materials Cloud 2D crystals database is a curated set of 2D materials obtained by screening most known 3D crystal structures by a computational exfoliation procedure. This database contains the relaxed 2D materials and their various properties. For more details, please see the related publications:",jsxRuntimeExports$1.jsx("div",{style:{margin:"10px"},children:jsxRuntimeExports$1.jsx(CitationsList,{citationLabels:["Mounet18","Campi23"]})})]}),jsxRuntimeExports$1.jsxs(Tabs$1,{className:"main-tabs",activeKey:a,onSelect:rt,children:[jsxRuntimeExports$1.jsxs(Tab$1,{eventKey:"use",title:"Use",children:[jsxRuntimeExports$1.jsx("div",{style:{marginTop:"20px"}}),jsxRuntimeExports$1.jsx(default_1,{ref:c,columns:h,rows:j}),jsxRuntimeExports$1.jsx(DownloadButton,{materialSelectorRef:c,disabled:j.length==0})]}),jsxRuntimeExports$1.jsx(Tab$1,{eventKey:"about",title:"About",children:aboutText}),jsxRuntimeExports$1.jsx(Tab$1,{eventKey:"restapi",title:"REST API",children:restapiText})]})]})})};var Zs=Object.defineProperty,Ys$1=(o,e,a)=>e in o?Zs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[e]=a,Ci=(o,e,a)=>(Ys$1(o,typeof e!="symbol"?e+"":e,a),a),commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/** * @license React * react-jsx-runtime.production.min.js * diff --git a/develop/index.html b/develop/index.html index 11a7af7..ecdde57 100644 --- a/develop/index.html +++ b/develop/index.html @@ -25,7 +25,7 @@ header.appendChild(plausible); - +