diff --git a/docs/master/api/.buildinfo b/docs/master/api/.buildinfo index 6151c37..08b6fca 100644 --- a/docs/master/api/.buildinfo +++ b/docs/master/api/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 5bf09dbf2e1e474a72b668da27a12fab +config: 742c9120c14155ce83dcf55dfa02dfca tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/master/api/_modules/abics/exception.html b/docs/master/api/_modules/abics/exception.html index dd0b78e..12a5690 100644 --- a/docs/master/api/_modules/abics/exception.html +++ b/docs/master/api/_modules/abics/exception.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/_modules/abics/loggers/loggers.html b/docs/master/api/_modules/abics/loggers/loggers.html index e6f4296..d706031 100644 --- a/docs/master/api/_modules/abics/loggers/loggers.html +++ b/docs/master/api/_modules/abics/loggers/loggers.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/_modules/abics/model.html b/docs/master/api/_modules/abics/model.html index d17b7fa..0d2584f 100644 --- a/docs/master/api/_modules/abics/model.html +++ b/docs/master/api/_modules/abics/model.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/_modules/abics/replica_params.html b/docs/master/api/_modules/abics/replica_params.html index 0a40294..51cd9a6 100644 --- a/docs/master/api/_modules/abics/replica_params.html +++ b/docs/master/api/_modules/abics/replica_params.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/_modules/index.html b/docs/master/api/_modules/index.html index 710489d..68ee1bc 100644 --- a/docs/master/api/_modules/index.html +++ b/docs/master/api/_modules/index.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/_static/basic.css b/docs/master/api/_static/basic.css index 30fee9d..f316efc 100644 --- a/docs/master/api/_static/basic.css +++ b/docs/master/api/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/master/api/_static/doctools.js b/docs/master/api/_static/doctools.js index d06a71d..4d67807 100644 --- a/docs/master/api/_static/doctools.js +++ b/docs/master/api/_static/doctools.js @@ -4,7 +4,7 @@ * * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/master/api/_static/language_data.js b/docs/master/api/_static/language_data.js index 250f566..367b8ed 100644 --- a/docs/master/api/_static/language_data.js +++ b/docs/master/api/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -13,7 +13,7 @@ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version is copied as a separate JS file, is available */ +/* Non-minified version is copied as a separate JS file, if available */ /** * Porter Stemmer diff --git a/docs/master/api/_static/searchtools.js b/docs/master/api/_static/searchtools.js index 7918c3f..b08d58c 100644 --- a/docs/master/api/_static/searchtools.js +++ b/docs/master/api/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms) + Search.makeSearchSummary(data, searchTerms, anchor) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js @@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => { ); else Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, @@ -137,6 +137,22 @@ const _displayNextItem = ( // search finished, update title and status message else _finishSearch(resultCount); }; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -160,13 +176,26 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString) => { + htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; + if (docContent) return docContent.textContent; + console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, @@ -239,16 +268,7 @@ const Search = { else Search.deferQuery(query); }, - /** - * execute search (requires search index to be loaded) - */ - query: (query) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - + _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -284,21 +304,38 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - // array of [docname, title, anchor, descr, score, filename] - let results = []; + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase(); + const queryLower = query.toLowerCase().trim(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - let score = Math.round(100 * queryLower.length / title.length) - results.push([ + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score, + score + boost, filenames[file], ]); } @@ -308,46 +345,47 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id] of foundEntries) { - let score = Math.round(100 * queryLower.length / entry.length) - results.push([ + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - ]); + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } } } } // lookup as object objectTerms.forEach((term) => - results.push(...Search.performObjectSearch(term, objectTerms)) + normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - - // now sort the results by score (in opposite order of appearance, since the - // display function below uses pop() to retrieve items) and then - // alphabetically - results.sort((a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; - }); + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -361,7 +399,12 @@ const Search = { return acc; }, []); - results = results.reverse(); + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy @@ -466,14 +509,18 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord) && !terms[word]) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord) && !titleTerms[word]) - arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); - }); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } } // no match but word was a required one @@ -496,9 +543,8 @@ const Search = { // create the mapping files.forEach((file) => { - if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) - fileMap.get(file).push(word); - else fileMap.set(file, [word]); + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); @@ -549,8 +595,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords) => { - const text = Search.htmlToText(htmlText); + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/docs/master/api/abics.applications.html b/docs/master/api/abics.applications.html index 32f5a10..23e91ea 100644 --- a/docs/master/api/abics.applications.html +++ b/docs/master/api/abics.applications.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.aenet.html b/docs/master/api/abics.applications.latgas_abinitio_interface.aenet.html index dfb97b9..3a78af5 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.aenet.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.aenet.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_pylammps.html b/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_pylammps.html index 26e3524..2e1ba3d 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_pylammps.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_pylammps.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_trainer.html b/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_trainer.html index f76d33f..a453b0f 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_trainer.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.aenet_trainer.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.base_solver.html b/docs/master/api/abics.applications.latgas_abinitio_interface.base_solver.html index e46371e..4216ef8 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.base_solver.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.base_solver.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.default_observer.html b/docs/master/api/abics.applications.latgas_abinitio_interface.default_observer.html index 574fb6e..055fa63 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.default_observer.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.default_observer.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.defect.html b/docs/master/api/abics.applications.latgas_abinitio_interface.defect.html index 4afdf0c..6a53659 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.defect.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.defect.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.html b/docs/master/api/abics.applications.latgas_abinitio_interface.html index 34f4de0..2c70128 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.map2perflat.html b/docs/master/api/abics.applications.latgas_abinitio_interface.map2perflat.html index ffbb39c..b503876 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.map2perflat.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.map2perflat.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.model_setup.html b/docs/master/api/abics.applications.latgas_abinitio_interface.model_setup.html index dc0e6e8..16bc057 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.model_setup.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.model_setup.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.naive_matcher.html b/docs/master/api/abics.applications.latgas_abinitio_interface.naive_matcher.html index 9031de6..1498c15 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.naive_matcher.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.naive_matcher.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.openmx.html b/docs/master/api/abics.applications.latgas_abinitio_interface.openmx.html index 82d921c..2b2d02f 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.openmx.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.openmx.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.params.html b/docs/master/api/abics.applications.latgas_abinitio_interface.params.html index 48ed169..7383b58 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.params.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.params.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.qe.html b/docs/master/api/abics.applications.latgas_abinitio_interface.qe.html index f8c3004..15c1660 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.qe.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.qe.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.run_base_mpi.html b/docs/master/api/abics.applications.latgas_abinitio_interface.run_base_mpi.html index 46e9ee0..4673c01 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.run_base_mpi.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.run_base_mpi.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.user_function_solver.html b/docs/master/api/abics.applications.latgas_abinitio_interface.user_function_solver.html index cc590c5..9587c92 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.user_function_solver.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.user_function_solver.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.latgas_abinitio_interface.vasp.html b/docs/master/api/abics.applications.latgas_abinitio_interface.vasp.html index c76899e..f1c8b56 100644 --- a/docs/master/api/abics.applications.latgas_abinitio_interface.vasp.html +++ b/docs/master/api/abics.applications.latgas_abinitio_interface.vasp.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.lattice_model.html b/docs/master/api/abics.applications.lattice_model.html index ae75bdb..c0ab121 100644 --- a/docs/master/api/abics.applications.lattice_model.html +++ b/docs/master/api/abics.applications.lattice_model.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.applications.lattice_model.potts.html b/docs/master/api/abics.applications.lattice_model.potts.html index 412ffbf..29bef1f 100644 --- a/docs/master/api/abics.applications.lattice_model.potts.html +++ b/docs/master/api/abics.applications.lattice_model.potts.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.exception.html b/docs/master/api/abics.exception.html index 96d26ac..9ff6852 100644 --- a/docs/master/api/abics.exception.html +++ b/docs/master/api/abics.exception.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.html b/docs/master/api/abics.html index 999a5b2..3191542 100644 --- a/docs/master/api/abics.html +++ b/docs/master/api/abics.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.loggers.html b/docs/master/api/abics.loggers.html index 6b3adb6..ea0cdb0 100644 --- a/docs/master/api/abics.loggers.html +++ b/docs/master/api/abics.loggers.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.loggers.loggers.html b/docs/master/api/abics.loggers.loggers.html index 2c7d94e..f3ae2c4 100644 --- a/docs/master/api/abics.loggers.loggers.html +++ b/docs/master/api/abics.loggers.loggers.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.mc.html b/docs/master/api/abics.mc.html index f8baedb..21e0c77 100644 --- a/docs/master/api/abics.mc.html +++ b/docs/master/api/abics.mc.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.mc_mpi.html b/docs/master/api/abics.mc_mpi.html index 2fd7abf..9ddd1bd 100644 --- a/docs/master/api/abics.mc_mpi.html +++ b/docs/master/api/abics.mc_mpi.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.mlref.html b/docs/master/api/abics.mlref.html index 104762e..7784f13 100644 --- a/docs/master/api/abics.mlref.html +++ b/docs/master/api/abics.mlref.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.model.html b/docs/master/api/abics.model.html index 379b693..447e039 100644 --- a/docs/master/api/abics.model.html +++ b/docs/master/api/abics.model.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.observer.html b/docs/master/api/abics.observer.html index 304fa13..45aeec7 100644 --- a/docs/master/api/abics.observer.html +++ b/docs/master/api/abics.observer.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.replica_params.html b/docs/master/api/abics.replica_params.html index 0a923d2..da2b876 100644 --- a/docs/master/api/abics.replica_params.html +++ b/docs/master/api/abics.replica_params.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.html b/docs/master/api/abics.sampling.html index cf4eb86..beb8502 100644 --- a/docs/master/api/abics.sampling.html +++ b/docs/master/api/abics.sampling.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.mc.html b/docs/master/api/abics.sampling.mc.html index cb51ee0..8d6d206 100644 --- a/docs/master/api/abics.sampling.mc.html +++ b/docs/master/api/abics.sampling.mc.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.mc_mpi.html b/docs/master/api/abics.sampling.mc_mpi.html index 8261d9f..c179395 100644 --- a/docs/master/api/abics.sampling.mc_mpi.html +++ b/docs/master/api/abics.sampling.mc_mpi.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.pamc.html b/docs/master/api/abics.sampling.pamc.html index 512fa17..56cfcdf 100644 --- a/docs/master/api/abics.sampling.pamc.html +++ b/docs/master/api/abics.sampling.pamc.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.resampling.html b/docs/master/api/abics.sampling.resampling.html index 10d0497..c5b8811 100644 --- a/docs/master/api/abics.sampling.resampling.html +++ b/docs/master/api/abics.sampling.resampling.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.rxmc.html b/docs/master/api/abics.sampling.rxmc.html index cf917f2..e2c9336 100644 --- a/docs/master/api/abics.sampling.rxmc.html +++ b/docs/master/api/abics.sampling.rxmc.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.sampling.simple_parallel.html b/docs/master/api/abics.sampling.simple_parallel.html index 215dc68..cb5a55d 100644 --- a/docs/master/api/abics.sampling.simple_parallel.html +++ b/docs/master/api/abics.sampling.simple_parallel.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.abicsRXsepT.html b/docs/master/api/abics.scripts.abicsRXsepT.html index 74da610..33e13d8 100644 --- a/docs/master/api/abics.scripts.abicsRXsepT.html +++ b/docs/master/api/abics.scripts.abicsRXsepT.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.activelearn.html b/docs/master/api/abics.scripts.activelearn.html index 7e082b7..32d8b1a 100644 --- a/docs/master/api/abics.scripts.activelearn.html +++ b/docs/master/api/abics.scripts.activelearn.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.html b/docs/master/api/abics.scripts.html index 7e83eff..992becf 100644 --- a/docs/master/api/abics.scripts.html +++ b/docs/master/api/abics.scripts.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.main.html b/docs/master/api/abics.scripts.main.html index 3328d83..1685c8e 100644 --- a/docs/master/api/abics.scripts.main.html +++ b/docs/master/api/abics.scripts.main.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.main_dft_latgas.html b/docs/master/api/abics.scripts.main_dft_latgas.html index cb5bcfe..5995339 100644 --- a/docs/master/api/abics.scripts.main_dft_latgas.html +++ b/docs/master/api/abics.scripts.main_dft_latgas.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.main_potts.html b/docs/master/api/abics.scripts.main_potts.html index fee90c1..6fe1354 100644 --- a/docs/master/api/abics.scripts.main_potts.html +++ b/docs/master/api/abics.scripts.main_potts.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.mocksolver.html b/docs/master/api/abics.scripts.mocksolver.html index a6f8dfb..a1a189e 100644 --- a/docs/master/api/abics.scripts.mocksolver.html +++ b/docs/master/api/abics.scripts.mocksolver.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.st2abics_config.html b/docs/master/api/abics.scripts.st2abics_config.html index a7eb7cf..52dbca6 100644 --- a/docs/master/api/abics.scripts.st2abics_config.html +++ b/docs/master/api/abics.scripts.st2abics_config.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.scripts.train.html b/docs/master/api/abics.scripts.train.html index 7a4870c..8452162 100644 --- a/docs/master/api/abics.scripts.train.html +++ b/docs/master/api/abics.scripts.train.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/abics.util.html b/docs/master/api/abics.util.html index 8f681f6..4d13554 100644 --- a/docs/master/api/abics.util.html +++ b/docs/master/api/abics.util.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/genindex.html b/docs/master/api/genindex.html index d0a059c..8712b87 100644 --- a/docs/master/api/genindex.html +++ b/docs/master/api/genindex.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/index.html b/docs/master/api/index.html index e839320..7e0564f 100644 --- a/docs/master/api/index.html +++ b/docs/master/api/index.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/modules.html b/docs/master/api/modules.html index 5a6a69c..3094e6e 100644 --- a/docs/master/api/modules.html +++ b/docs/master/api/modules.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/py-modindex.html b/docs/master/api/py-modindex.html index 8c663b8..91b1db9 100644 --- a/docs/master/api/py-modindex.html +++ b/docs/master/api/py-modindex.html @@ -15,7 +15,7 @@ - + diff --git a/docs/master/api/search.html b/docs/master/api/search.html index 2ee4b06..e5553ad 100644 --- a/docs/master/api/search.html +++ b/docs/master/api/search.html @@ -16,7 +16,7 @@ - + diff --git a/docs/master/api/searchindex.js b/docs/master/api/searchindex.js index e6d515b..c464fa4 100644 --- a/docs/master/api/searchindex.js +++ b/docs/master/api/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["abics", "abics.applications", "abics.applications.latgas_abinitio_interface", "abics.applications.latgas_abinitio_interface.aenet", "abics.applications.latgas_abinitio_interface.aenet_pylammps", "abics.applications.latgas_abinitio_interface.aenet_trainer", "abics.applications.latgas_abinitio_interface.base_solver", "abics.applications.latgas_abinitio_interface.default_observer", "abics.applications.latgas_abinitio_interface.defect", "abics.applications.latgas_abinitio_interface.map2perflat", "abics.applications.latgas_abinitio_interface.model_setup", "abics.applications.latgas_abinitio_interface.naive_matcher", "abics.applications.latgas_abinitio_interface.openmx", "abics.applications.latgas_abinitio_interface.params", "abics.applications.latgas_abinitio_interface.qe", "abics.applications.latgas_abinitio_interface.run_base_mpi", "abics.applications.latgas_abinitio_interface.user_function_solver", "abics.applications.latgas_abinitio_interface.vasp", "abics.applications.lattice_model", "abics.applications.lattice_model.potts", "abics.exception", "abics.loggers", "abics.loggers.loggers", "abics.mc", "abics.mc_mpi", "abics.mlref", "abics.model", "abics.observer", "abics.replica_params", "abics.sampling", "abics.sampling.mc", "abics.sampling.mc_mpi", "abics.sampling.pamc", "abics.sampling.resampling", "abics.sampling.rxmc", "abics.sampling.simple_parallel", "abics.scripts", "abics.scripts.abicsRXsepT", "abics.scripts.activelearn", "abics.scripts.main", "abics.scripts.main_dft_latgas", "abics.scripts.main_potts", "abics.scripts.mocksolver", "abics.scripts.st2abics_config", "abics.scripts.train", "abics.util", "index", "modules"], "filenames": ["abics.rst", "abics.applications.rst", "abics.applications.latgas_abinitio_interface.rst", "abics.applications.latgas_abinitio_interface.aenet.rst", "abics.applications.latgas_abinitio_interface.aenet_pylammps.rst", "abics.applications.latgas_abinitio_interface.aenet_trainer.rst", "abics.applications.latgas_abinitio_interface.base_solver.rst", "abics.applications.latgas_abinitio_interface.default_observer.rst", "abics.applications.latgas_abinitio_interface.defect.rst", "abics.applications.latgas_abinitio_interface.map2perflat.rst", "abics.applications.latgas_abinitio_interface.model_setup.rst", "abics.applications.latgas_abinitio_interface.naive_matcher.rst", "abics.applications.latgas_abinitio_interface.openmx.rst", "abics.applications.latgas_abinitio_interface.params.rst", "abics.applications.latgas_abinitio_interface.qe.rst", "abics.applications.latgas_abinitio_interface.run_base_mpi.rst", "abics.applications.latgas_abinitio_interface.user_function_solver.rst", "abics.applications.latgas_abinitio_interface.vasp.rst", "abics.applications.lattice_model.rst", "abics.applications.lattice_model.potts.rst", "abics.exception.rst", "abics.loggers.rst", "abics.loggers.loggers.rst", "abics.mc.rst", "abics.mc_mpi.rst", "abics.mlref.rst", "abics.model.rst", "abics.observer.rst", "abics.replica_params.rst", "abics.sampling.rst", "abics.sampling.mc.rst", "abics.sampling.mc_mpi.rst", "abics.sampling.pamc.rst", "abics.sampling.resampling.rst", "abics.sampling.rxmc.rst", "abics.sampling.simple_parallel.rst", "abics.scripts.rst", "abics.scripts.abicsRXsepT.rst", "abics.scripts.activelearn.rst", "abics.scripts.main.rst", "abics.scripts.main_dft_latgas.rst", "abics.scripts.main_potts.rst", "abics.scripts.mocksolver.rst", "abics.scripts.st2abics_config.rst", "abics.scripts.train.rst", "abics.util.rst", "index.rst", "modules.rst"], "titles": ["abics package", "abics.applications package", "abics.applications.latgas_abinitio_interface package", "abics.applications.latgas_abinitio_interface.aenet module", "abics.applications.latgas_abinitio_interface.aenet_pylammps module", "abics.applications.latgas_abinitio_interface.aenet_trainer module", "abics.applications.latgas_abinitio_interface.base_solver module", "abics.applications.latgas_abinitio_interface.default_observer module", "abics.applications.latgas_abinitio_interface.defect module", "abics.applications.latgas_abinitio_interface.map2perflat module", "abics.applications.latgas_abinitio_interface.model_setup module", "abics.applications.latgas_abinitio_interface.naive_matcher module", "abics.applications.latgas_abinitio_interface.openmx module", "abics.applications.latgas_abinitio_interface.params module", "abics.applications.latgas_abinitio_interface.qe module", "abics.applications.latgas_abinitio_interface.run_base_mpi module", "abics.applications.latgas_abinitio_interface.user_function_solver module", "abics.applications.latgas_abinitio_interface.vasp module", "abics.applications.lattice_model package", "abics.applications.lattice_model.potts module", "abics.exception module", "abics.loggers package", "abics.loggers.loggers module", "abics.mc module", "abics.mc_mpi module", "abics.mlref module", "abics.model module", "abics.observer module", "abics.replica_params module", "abics.sampling package", "abics.sampling.mc module", "abics.sampling.mc_mpi module", "abics.sampling.pamc module", "abics.sampling.resampling module", "abics.sampling.rxmc module", "abics.sampling.simple_parallel module", "abics.scripts package", "abics.scripts.abicsRXsepT module", "abics.scripts.activelearn module", "abics.scripts.main module", "abics.scripts.main_dft_latgas module", "abics.scripts.main_potts module", "abics.scripts.mocksolver module", "abics.scripts.st2abics_config module", "abics.scripts.train module", "abics.util module", "Welcome to abics\u2019s API documentation!", "abics"], "terms": {"applic": [0, 21, 22, 46, 47], "latgas_abinitio_interfac": [0, 1], "lattice_model": [0, 1], "logger": [0, 46, 47], "set_log_handl": [0, 21, 22], "sampl": [0, 28, 46, 47], "mc": [0, 28, 29, 46, 47], "mc_mpi": [0, 29, 46, 47], "pamc": [0, 29], "resampl": [0, 29], "rxmc": [0, 29], "simple_parallel": [0, 29], "script": [0, 46, 47], "abicsrxsept": [0, 36], "activelearn": [0, 36], "main": [0, 36], "main_dft_latga": [0, 36], "main_pott": [0, 36], "mocksolv": [0, 36], "st2abics_config": [0, 36], "train": [0, 36], "except": [0, 46, 47], "error": [0, 20, 21, 22, 46, 47], "inputerror": [0, 20, 46, 47], "messag": [0, 20, 21, 22], "matrixparseerror": [0, 20, 46, 47], "mlref": [0, 46, 47], "model": [0, 46, 47], "energi": [0, 26], "model_nam": [0, 26], "newconfig": [0, 26], "trialstep": [0, 26], "observ": [0, 28, 46, 47], "replica_param": [0, 46, 47], "parallelmcparam": [0, 28, 46, 47], "nreplica": [0, 28], "nprocs_per_replica": [0, 28], "ktstart": [0, 28], "ktend": [0, 28], "nstep": [0, 28], "sample_frequ": [0, 28], "print_frequ": [0, 28], "reload": [0, 28], "seed": [0, 28], "from_dict": [0, 28], "from_toml": [0, 28], "parallelrandomparam": [0, 28, 46, 47], "rxparam": [0, 28, 46, 47], "rxtrial_frequ": [0, 28], "samplerparam": [0, 28, 46, 47], "sampler": [0, 28], "util": [0, 46, 47], "submodul": [1, 46, 47], "aenet": [1, 2], "aenet_pylammp": [1, 2], "aenet_train": [1, 2], "base_solv": [1, 2], "default_observ": [1, 2], "defect": [1, 2], "map2perflat": [1, 2], "model_setup": [1, 2], "naive_match": [1, 2], "openmx": [1, 2], "param": [1, 2, 21, 22, 28], "qe": [1, 2], "run_base_mpi": [1, 2], "user_function_solv": [1, 2], "vasp": [1, 2], "pott": [1, 18], "sourc": [20, 21, 22, 26, 28], "base": [20, 26, 28], "class": [20, 26, 28], "str": [20, 21, 22, 28], "rais": [20, 21, 22], "input": [20, 26, 28], "explan": 20, "type": [20, 21, 22, 26, 28], "matrix": 20, "pars": 20, "take": 21, "care": 21, "log": [21, 22], "duti": 21, "app_nam": [21, 22], "level": [21, 22], "int": [21, 22, 28], "20": [21, 22], "consol": [21, 22], "default": [21, 22], "console_level": [21, 22], "none": [21, 22], "logfile_path": [21, 22], "path": [21, 22], "logfile_mod": [21, 22], "logfile_level": [21, 22], "logfile_rank": [21, 22], "dict": [21, 22, 28], "set": [21, 22, 28], "desir": [21, 22], "add": [21, 22], "file": [21, 22, 28], "handler": [21, 22], "paramet": [21, 22, 26, 28], "name": [21, 22, 28], "mpi": [21, 22], "serial": [21, 22], "output": [21, 22], "mode": [21, 22], "examin": [21, 22], "environ": [21, 22], "i": [21, 22, 26, 28], "avail": [21, 22], "parallel": [21, 22, 28], "which": [21, 22, 26, 28], "rank": [21, 22], "number": [21, 22, 28], "ar": [21, 22], "shown": [21, 22], "suppress": [21, 22], "superced": [21, 22], "object": [21, 22, 26, 28], "send": [21, 22], "onli": [21, 22], "parent": [21, 22], "directori": [21, 22], "automat": [21, 22], "creat": [21, 22], "thei": [21, 22], "present": [21, 22], "master": [21, 22], "collect": [21, 22], "worker": [21, 22], "fiil": [21, 22], "from": [21, 22, 26, 28], "0": [21, 22, 26, 28], "write": [21, 22], "all": [21, 22], "one": [21, 22], "open": [21, 22], "each": [21, 22], "process": [21, 22, 28], "design": [21, 22], "its": [21, 22], "consid": [21, 22], "list": [21, 22], "written": [21, 22], "taken": [21, 22], "account": [21, 22], "abov": [21, 22], "mai": [21, 22, 26], "overwritten": [21, 22], "pack": [21, 22], "given": [21, 22], "kei": [21, 22], "same": [21, 22], "those": [21, 22], "argument": [21, 22], "label": [21, 22], "runtimeerror": [21, 22], "If": [21, 22, 28], "specifi": [21, 22, 28], "while": [21, 22], "mpi4pi": [21, 22], "instal": [21, 22], "refer": [21, 22], "http": [21, 22], "group": [21, 22], "googl": [21, 22], "com": [21, 22], "g": [21, 22, 28], "c": [21, 22], "sanzc8bdj6u": [21, 22], "stackoverflow": [21, 22], "question": [21, 22], "35869137": [21, 22], "avoid": [21, 22], "tensorflow": [21, 22], "print": [21, 22], "standard": [21, 22], "56085015": [21, 22], "openmp": [21, 22], "debug": [21, 22], "when": [21, 22], "run": [21, 22], "cpu": [21, 22], "note": [21, 22], "our": [21, 22], "notat": [21, 22], "python": [21, 22], "cpp": [21, 22], "10": [21, 22], "1": [21, 22], "true": [21, 22], "ye": [21, 22], "info": [21, 22], "off": [21, 22], "fals": [21, 22], "warn": [21, 22], "30": [21, 22], "2": [21, 22], "40": [21, 22], "3": [21, 22], "initi": 22, "packag": [22, 46, 47], "thi": 26, "defin": 26, "whose": 26, "equal": 26, "matter": 26, "configur": 26, "never": 26, "chang": 26, "templat": 26, "build": 26, "us": [26, 28], "abstract": 26, "config": 26, "float": [26, 28], "calcul": 26, "return": [26, 28], "dconfig": 26, "updat": 26, "trial": 26, "step": [26, 28], "origin": 26, "mutat": 26, "through": 26, "function": 26, "differ": 26, "tupl": 26, "ani": [26, 28], "can": 26, "contain": 26, "minim": 26, "inform": [26, 28], "construct": 26, "make": 26, "sure": 26, "unchang": 26, "current": 26, "The": [26, 28], "de": 26, "alia": 26, "embarrasingli": 28, "mont": 28, "carlo": 28, "replica": 28, "lower": 28, "bound": 28, "temperatur": 28, "rang": 28, "upper": 28, "between": 28, "measur": 28, "show": 28, "whether": 28, "restart": 28, "simul": 28, "bool": 28, "random": 28, "gener": 28, "some": 28, "e": 28, "system": 28, "time": 28, "nois": 28, "classmethod": 28, "d": 28, "mutablemap": 28, "read": 28, "dictionari": 28, "includ": 28, "embarrassingli": 28, "method": 28, "self": 28, "dftparam": 28, "fname": 28, "toml": 28, "f": 28, "exchang": 28, "oper": 28, "algorithm": 28, "subpackag": [46, 47], "modul": [46, 47], "index": 46, "search": 46, "page": 46, "content": 47}, "objects": {"": [[0, 0, 0, "-", "abics"]], "abics": [[1, 0, 0, "-", "applications"], [20, 0, 0, "-", "exception"], [21, 0, 0, "-", "loggers"], [26, 0, 0, "-", "model"], [28, 0, 0, "-", "replica_params"], [29, 0, 0, "-", "sampling"], [36, 0, 0, "-", "scripts"]], "abics.applications": [[18, 0, 0, "-", "lattice_model"]], "abics.exception": [[20, 1, 1, "", "Error"], [20, 1, 1, "", "InputError"], [20, 1, 1, "", "MatrixParseError"]], "abics.exception.InputError": [[20, 2, 1, "", "message"]], "abics.exception.MatrixParseError": [[20, 2, 1, "", "message"]], "abics.loggers": [[22, 0, 0, "-", "loggers"], [21, 3, 1, "", "set_log_handles"]], "abics.loggers.loggers": [[22, 3, 1, "", "set_log_handles"]], "abics.model": [[26, 4, 1, "", "Model"], [26, 2, 1, "", "model"]], "abics.model.Model": [[26, 5, 1, "", "energy"], [26, 2, 1, "", "model_name"], [26, 5, 1, "", "newconfig"], [26, 5, 1, "", "trialstep"]], "abics.replica_params": [[28, 4, 1, "", "ParallelMCParams"], [28, 4, 1, "", "ParallelRandomParams"], [28, 4, 1, "", "RXParams"], [28, 4, 1, "", "SamplerParams"]], "abics.replica_params.ParallelMCParams": [[28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "kTend"], [28, 2, 1, "", "kTstart"], [28, 2, 1, "", "nprocs_per_replica"], [28, 2, 1, "", "nreplicas"], [28, 2, 1, "", "nsteps"], [28, 2, 1, "", "print_frequency"], [28, 2, 1, "", "reload"], [28, 2, 1, "", "sample_frequency"], [28, 2, 1, "", "seed"]], "abics.replica_params.ParallelRandomParams": [[28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "nprocs_per_replica"], [28, 2, 1, "", "nreplicas"], [28, 2, 1, "", "nsteps"], [28, 2, 1, "", "print_frequency"], [28, 2, 1, "", "reload"], [28, 2, 1, "", "sample_frequency"], [28, 2, 1, "", "seed"]], "abics.replica_params.RXParams": [[28, 2, 1, "", "RXtrial_frequency"], [28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "kTend"], [28, 2, 1, "", "kTstart"], [28, 2, 1, "", "nprocs_per_replica"], [28, 2, 1, "", "nreplicas"], [28, 2, 1, "", "nsteps"], [28, 2, 1, "", "print_frequency"], [28, 2, 1, "", "reload"], [28, 2, 1, "", "sample_frequency"], [28, 2, 1, "", "seed"]], "abics.replica_params.SamplerParams": [[28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "sampler"]]}, "objtypes": {"0": "py:module", "1": "py:exception", "2": "py:attribute", "3": "py:function", "4": "py:class", "5": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "exception", "Python exception"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "function", "Python function"], "4": ["py", "class", "Python class"], "5": ["py", "method", "Python method"]}, "titleterms": {"abic": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "packag": [0, 1, 2, 18, 21, 29, 36], "subpackag": [0, 1], "submodul": [0, 2, 18, 21, 29, 36], "modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "content": [0, 1, 2, 18, 21, 29, 36, 46], "applic": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], "latgas_abinitio_interfac": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "aenet": 3, "aenet_pylammp": 4, "aenet_train": 5, "base_solv": 6, "default_observ": 7, "defect": 8, "map2perflat": 9, "model_setup": 10, "naive_match": 11, "openmx": 12, "param": 13, "qe": 14, "run_base_mpi": 15, "user_function_solv": 16, "vasp": 17, "lattice_model": [18, 19], "pott": 19, "except": 20, "logger": [21, 22], "mc": [23, 30], "mc_mpi": [24, 31], "mlref": 25, "model": 26, "observ": 27, "replica_param": 28, "sampl": [29, 30, 31, 32, 33, 34, 35], "pamc": 32, "resampl": 33, "rxmc": 34, "simple_parallel": 35, "script": [36, 37, 38, 39, 40, 41, 42, 43, 44], "abicsrxsept": 37, "activelearn": 38, "main": 39, "main_dft_latga": 40, "main_pott": 41, "mocksolv": 42, "st2abics_config": 43, "train": 44, "util": 45, "welcom": 46, "": 46, "api": 46, "document": 46, "indic": 46, "tabl": 46}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx.ext.todo": 2, "sphinx": 60}, "alltitles": {"abics package": [[0, "abics-package"]], "Subpackages": [[0, "subpackages"], [1, "subpackages"]], "Submodules": [[0, "submodules"], [2, "submodules"], [18, "submodules"], [21, "submodules"], [29, "submodules"], [36, "submodules"]], "Module contents": [[0, "module-abics"], [1, "module-abics.applications"], [2, "module-contents"], [18, "module-abics.applications.lattice_model"], [21, "module-abics.loggers"], [29, "module-abics.sampling"], [36, "module-abics.scripts"]], "abics.applications package": [[1, "abics-applications-package"]], "abics.applications.latgas_abinitio_interface package": [[2, "abics-applications-latgas-abinitio-interface-package"]], "abics.applications.latgas_abinitio_interface.aenet module": [[3, "abics-applications-latgas-abinitio-interface-aenet-module"]], "abics.applications.latgas_abinitio_interface.aenet_pylammps module": [[4, "abics-applications-latgas-abinitio-interface-aenet-pylammps-module"]], "abics.applications.latgas_abinitio_interface.aenet_trainer module": [[5, "abics-applications-latgas-abinitio-interface-aenet-trainer-module"]], "abics.applications.latgas_abinitio_interface.base_solver module": [[6, "abics-applications-latgas-abinitio-interface-base-solver-module"]], "abics.applications.latgas_abinitio_interface.default_observer module": [[7, "abics-applications-latgas-abinitio-interface-default-observer-module"]], "abics.applications.latgas_abinitio_interface.defect module": [[8, "abics-applications-latgas-abinitio-interface-defect-module"]], "abics.applications.latgas_abinitio_interface.map2perflat module": [[9, "abics-applications-latgas-abinitio-interface-map2perflat-module"]], "abics.applications.latgas_abinitio_interface.model_setup module": [[10, "abics-applications-latgas-abinitio-interface-model-setup-module"]], "abics.applications.latgas_abinitio_interface.naive_matcher module": [[11, "abics-applications-latgas-abinitio-interface-naive-matcher-module"]], "abics.applications.latgas_abinitio_interface.openmx module": [[12, "abics-applications-latgas-abinitio-interface-openmx-module"]], "abics.applications.latgas_abinitio_interface.params module": [[13, "abics-applications-latgas-abinitio-interface-params-module"]], "abics.applications.latgas_abinitio_interface.qe module": [[14, "abics-applications-latgas-abinitio-interface-qe-module"]], "abics.applications.latgas_abinitio_interface.run_base_mpi module": [[15, "abics-applications-latgas-abinitio-interface-run-base-mpi-module"]], "abics.applications.latgas_abinitio_interface.user_function_solver module": [[16, "abics-applications-latgas-abinitio-interface-user-function-solver-module"]], "abics.applications.latgas_abinitio_interface.vasp module": [[17, "abics-applications-latgas-abinitio-interface-vasp-module"]], "abics.applications.lattice_model package": [[18, "abics-applications-lattice-model-package"]], "abics.applications.lattice_model.potts module": [[19, "abics-applications-lattice-model-potts-module"]], "abics.exception module": [[20, "module-abics.exception"]], "abics.loggers package": [[21, "abics-loggers-package"]], "abics.loggers.loggers module": [[22, "module-abics.loggers.loggers"]], "abics.mc module": [[23, "abics-mc-module"]], "abics.mc_mpi module": [[24, "abics-mc-mpi-module"]], "abics.mlref module": [[25, "abics-mlref-module"]], "abics.model module": [[26, "module-abics.model"]], "abics.observer module": [[27, "abics-observer-module"]], "abics.replica_params module": [[28, "module-abics.replica_params"]], "abics.sampling package": [[29, "abics-sampling-package"]], "abics.sampling.mc module": [[30, "abics-sampling-mc-module"]], "abics.sampling.mc_mpi module": [[31, "abics-sampling-mc-mpi-module"]], "abics.sampling.pamc module": [[32, "abics-sampling-pamc-module"]], "abics.sampling.resampling module": [[33, "abics-sampling-resampling-module"]], "abics.sampling.rxmc module": [[34, "abics-sampling-rxmc-module"]], "abics.sampling.simple_parallel module": [[35, "abics-sampling-simple-parallel-module"]], "abics.scripts package": [[36, "abics-scripts-package"]], "abics.scripts.abicsRXsepT module": [[37, "abics-scripts-abicsrxsept-module"]], "abics.scripts.activelearn module": [[38, "abics-scripts-activelearn-module"]], "abics.scripts.main module": [[39, "abics-scripts-main-module"]], "abics.scripts.main_dft_latgas module": [[40, "abics-scripts-main-dft-latgas-module"]], "abics.scripts.main_potts module": [[41, "abics-scripts-main-potts-module"]], "abics.scripts.mocksolver module": [[42, "abics-scripts-mocksolver-module"]], "abics.scripts.st2abics_config module": [[43, "abics-scripts-st2abics-config-module"]], "abics.scripts.train module": [[44, "abics-scripts-train-module"]], "abics.util module": [[45, "abics-util-module"]], "Welcome to abics\u2019s API documentation!": [[46, "welcome-to-abics-s-api-documentation"]], "Contents:": [[46, null]], "Indices and tables": [[46, "indices-and-tables"]], "abics": [[47, "abics"]]}, "indexentries": {"abics": [[0, "module-abics"]], "module": [[0, "module-abics"], [1, "module-abics.applications"], [18, "module-abics.applications.lattice_model"], [20, "module-abics.exception"], [21, "module-abics.loggers"], [22, "module-abics.loggers.loggers"], [26, "module-abics.model"], [28, "module-abics.replica_params"], [29, "module-abics.sampling"], [36, "module-abics.scripts"]], "abics.applications": [[1, "module-abics.applications"]], "abics.applications.lattice_model": [[18, "module-abics.applications.lattice_model"]], "error": [[20, "abics.exception.Error"]], "inputerror": [[20, "abics.exception.InputError"]], "matrixparseerror": [[20, "abics.exception.MatrixParseError"]], "abics.exception": [[20, "module-abics.exception"]], "message (abics.exception.inputerror attribute)": [[20, "abics.exception.InputError.message"]], "message (abics.exception.matrixparseerror attribute)": [[20, "abics.exception.MatrixParseError.message"]], "abics.loggers": [[21, "module-abics.loggers"]], "set_log_handles() (in module abics.loggers)": [[21, "abics.loggers.set_log_handles"]], "abics.loggers.loggers": [[22, "module-abics.loggers.loggers"]], "set_log_handles() (in module abics.loggers.loggers)": [[22, "abics.loggers.loggers.set_log_handles"]], "model (class in abics.model)": [[26, "abics.model.Model"]], "abics.model": [[26, "module-abics.model"]], "energy() (abics.model.model method)": [[26, "abics.model.Model.energy"]], "model (in module abics.model)": [[26, "abics.model.model"]], "model_name (abics.model.model attribute)": [[26, "abics.model.Model.model_name"]], "newconfig() (abics.model.model method)": [[26, "abics.model.Model.newconfig"]], "trialstep() (abics.model.model method)": [[26, "abics.model.Model.trialstep"]], "parallelmcparams (class in abics.replica_params)": [[28, "abics.replica_params.ParallelMCParams"]], "parallelrandomparams (class in abics.replica_params)": [[28, "abics.replica_params.ParallelRandomParams"]], "rxparams (class in abics.replica_params)": [[28, "abics.replica_params.RXParams"]], "rxtrial_frequency (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.RXtrial_frequency"]], "samplerparams (class in abics.replica_params)": [[28, "abics.replica_params.SamplerParams"]], "abics.replica_params": [[28, "module-abics.replica_params"]], "from_dict() (abics.replica_params.parallelmcparams class method)": [[28, "abics.replica_params.ParallelMCParams.from_dict"]], "from_dict() (abics.replica_params.parallelrandomparams class method)": [[28, "abics.replica_params.ParallelRandomParams.from_dict"]], "from_dict() (abics.replica_params.rxparams class method)": [[28, "abics.replica_params.RXParams.from_dict"]], "from_dict() (abics.replica_params.samplerparams class method)": [[28, "abics.replica_params.SamplerParams.from_dict"]], "from_toml() (abics.replica_params.parallelmcparams class method)": [[28, "abics.replica_params.ParallelMCParams.from_toml"]], "from_toml() (abics.replica_params.parallelrandomparams class method)": [[28, "abics.replica_params.ParallelRandomParams.from_toml"]], "from_toml() (abics.replica_params.rxparams class method)": [[28, "abics.replica_params.RXParams.from_toml"]], "from_toml() (abics.replica_params.samplerparams class method)": [[28, "abics.replica_params.SamplerParams.from_toml"]], "ktend (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.kTend"]], "ktend (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.kTend"]], "ktstart (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.kTstart"]], "ktstart (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.kTstart"]], "nprocs_per_replica (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.nprocs_per_replica"]], "nprocs_per_replica (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.nprocs_per_replica"]], "nprocs_per_replica (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.nprocs_per_replica"]], "nreplicas (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.nreplicas"]], "nreplicas (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.nreplicas"]], "nreplicas (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.nreplicas"]], "nsteps (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.nsteps"]], "nsteps (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.nsteps"]], "nsteps (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.nsteps"]], "print_frequency (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.print_frequency"]], "print_frequency (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.print_frequency"]], "print_frequency (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.print_frequency"]], "reload (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.reload"]], "reload (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.reload"]], "reload (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.reload"]], "sample_frequency (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.sample_frequency"]], "sample_frequency (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.sample_frequency"]], "sample_frequency (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.sample_frequency"]], "sampler (abics.replica_params.samplerparams attribute)": [[28, "abics.replica_params.SamplerParams.sampler"]], "seed (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.seed"]], "seed (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.seed"]], "seed (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.seed"]], "abics.sampling": [[29, "module-abics.sampling"]], "abics.scripts": [[36, "module-abics.scripts"]]}}) \ No newline at end of file +Search.setIndex({"alltitles": {"Contents:": [[46, null]], "Indices and tables": [[46, "indices-and-tables"]], "Module contents": [[0, "module-abics"], [1, "module-abics.applications"], [2, "module-contents"], [18, "module-abics.applications.lattice_model"], [21, "module-abics.loggers"], [29, "module-abics.sampling"], [36, "module-abics.scripts"]], "Submodules": [[0, "submodules"], [2, "submodules"], [18, "submodules"], [21, "submodules"], [29, "submodules"], [36, "submodules"]], "Subpackages": [[0, "subpackages"], [1, "subpackages"]], "Welcome to abics\u2019s API documentation!": [[46, null]], "abics": [[47, null]], "abics package": [[0, null]], "abics.applications package": [[1, null]], "abics.applications.latgas_abinitio_interface package": [[2, null]], "abics.applications.latgas_abinitio_interface.aenet module": [[3, null]], "abics.applications.latgas_abinitio_interface.aenet_pylammps module": [[4, null]], "abics.applications.latgas_abinitio_interface.aenet_trainer module": [[5, null]], "abics.applications.latgas_abinitio_interface.base_solver module": [[6, null]], "abics.applications.latgas_abinitio_interface.default_observer module": [[7, null]], "abics.applications.latgas_abinitio_interface.defect module": [[8, null]], "abics.applications.latgas_abinitio_interface.map2perflat module": [[9, null]], "abics.applications.latgas_abinitio_interface.model_setup module": [[10, null]], "abics.applications.latgas_abinitio_interface.naive_matcher module": [[11, null]], "abics.applications.latgas_abinitio_interface.openmx module": [[12, null]], "abics.applications.latgas_abinitio_interface.params module": [[13, null]], "abics.applications.latgas_abinitio_interface.qe module": [[14, null]], "abics.applications.latgas_abinitio_interface.run_base_mpi module": [[15, null]], "abics.applications.latgas_abinitio_interface.user_function_solver module": [[16, null]], "abics.applications.latgas_abinitio_interface.vasp module": [[17, null]], "abics.applications.lattice_model package": [[18, null]], "abics.applications.lattice_model.potts module": [[19, null]], "abics.exception module": [[20, null]], "abics.loggers package": [[21, null]], "abics.loggers.loggers module": [[22, null]], "abics.mc module": [[23, null]], "abics.mc_mpi module": [[24, null]], "abics.mlref module": [[25, null]], "abics.model module": [[26, null]], "abics.observer module": [[27, null]], "abics.replica_params module": [[28, null]], "abics.sampling package": [[29, null]], "abics.sampling.mc module": [[30, null]], "abics.sampling.mc_mpi module": [[31, null]], "abics.sampling.pamc module": [[32, null]], "abics.sampling.resampling module": [[33, null]], "abics.sampling.rxmc module": [[34, null]], "abics.sampling.simple_parallel module": [[35, null]], "abics.scripts package": [[36, null]], "abics.scripts.abicsRXsepT module": [[37, null]], "abics.scripts.activelearn module": [[38, null]], "abics.scripts.main module": [[39, null]], "abics.scripts.main_dft_latgas module": [[40, null]], "abics.scripts.main_potts module": [[41, null]], "abics.scripts.mocksolver module": [[42, null]], "abics.scripts.st2abics_config module": [[43, null]], "abics.scripts.train module": [[44, null]], "abics.util module": [[45, null]]}, "docnames": ["abics", "abics.applications", "abics.applications.latgas_abinitio_interface", "abics.applications.latgas_abinitio_interface.aenet", "abics.applications.latgas_abinitio_interface.aenet_pylammps", "abics.applications.latgas_abinitio_interface.aenet_trainer", "abics.applications.latgas_abinitio_interface.base_solver", "abics.applications.latgas_abinitio_interface.default_observer", "abics.applications.latgas_abinitio_interface.defect", "abics.applications.latgas_abinitio_interface.map2perflat", "abics.applications.latgas_abinitio_interface.model_setup", "abics.applications.latgas_abinitio_interface.naive_matcher", "abics.applications.latgas_abinitio_interface.openmx", "abics.applications.latgas_abinitio_interface.params", "abics.applications.latgas_abinitio_interface.qe", "abics.applications.latgas_abinitio_interface.run_base_mpi", "abics.applications.latgas_abinitio_interface.user_function_solver", "abics.applications.latgas_abinitio_interface.vasp", "abics.applications.lattice_model", "abics.applications.lattice_model.potts", "abics.exception", "abics.loggers", "abics.loggers.loggers", "abics.mc", "abics.mc_mpi", "abics.mlref", "abics.model", "abics.observer", "abics.replica_params", "abics.sampling", "abics.sampling.mc", "abics.sampling.mc_mpi", "abics.sampling.pamc", "abics.sampling.resampling", "abics.sampling.rxmc", "abics.sampling.simple_parallel", "abics.scripts", "abics.scripts.abicsRXsepT", "abics.scripts.activelearn", "abics.scripts.main", "abics.scripts.main_dft_latgas", "abics.scripts.main_potts", "abics.scripts.mocksolver", "abics.scripts.st2abics_config", "abics.scripts.train", "abics.util", "index", "modules"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1}, "filenames": ["abics.rst", "abics.applications.rst", "abics.applications.latgas_abinitio_interface.rst", "abics.applications.latgas_abinitio_interface.aenet.rst", "abics.applications.latgas_abinitio_interface.aenet_pylammps.rst", "abics.applications.latgas_abinitio_interface.aenet_trainer.rst", "abics.applications.latgas_abinitio_interface.base_solver.rst", "abics.applications.latgas_abinitio_interface.default_observer.rst", "abics.applications.latgas_abinitio_interface.defect.rst", "abics.applications.latgas_abinitio_interface.map2perflat.rst", "abics.applications.latgas_abinitio_interface.model_setup.rst", "abics.applications.latgas_abinitio_interface.naive_matcher.rst", "abics.applications.latgas_abinitio_interface.openmx.rst", "abics.applications.latgas_abinitio_interface.params.rst", "abics.applications.latgas_abinitio_interface.qe.rst", "abics.applications.latgas_abinitio_interface.run_base_mpi.rst", "abics.applications.latgas_abinitio_interface.user_function_solver.rst", "abics.applications.latgas_abinitio_interface.vasp.rst", "abics.applications.lattice_model.rst", "abics.applications.lattice_model.potts.rst", "abics.exception.rst", "abics.loggers.rst", "abics.loggers.loggers.rst", "abics.mc.rst", "abics.mc_mpi.rst", "abics.mlref.rst", "abics.model.rst", "abics.observer.rst", "abics.replica_params.rst", "abics.sampling.rst", "abics.sampling.mc.rst", "abics.sampling.mc_mpi.rst", "abics.sampling.pamc.rst", "abics.sampling.resampling.rst", "abics.sampling.rxmc.rst", "abics.sampling.simple_parallel.rst", "abics.scripts.rst", "abics.scripts.abicsRXsepT.rst", "abics.scripts.activelearn.rst", "abics.scripts.main.rst", "abics.scripts.main_dft_latgas.rst", "abics.scripts.main_potts.rst", "abics.scripts.mocksolver.rst", "abics.scripts.st2abics_config.rst", "abics.scripts.train.rst", "abics.util.rst", "index.rst", "modules.rst"], "indexentries": {"abics": [[0, "module-abics", false]], "abics.applications": [[1, "module-abics.applications", false]], "abics.applications.lattice_model": [[18, "module-abics.applications.lattice_model", false]], "abics.exception": [[20, "module-abics.exception", false]], "abics.loggers": [[21, "module-abics.loggers", false]], "abics.loggers.loggers": [[22, "module-abics.loggers.loggers", false]], "abics.model": [[26, "module-abics.model", false]], "abics.replica_params": [[28, "module-abics.replica_params", false]], "abics.sampling": [[29, "module-abics.sampling", false]], "abics.scripts": [[36, "module-abics.scripts", false]], "energy() (abics.model.model method)": [[26, "abics.model.Model.energy", false]], "error": [[20, "abics.exception.Error", false]], "from_dict() (abics.replica_params.parallelmcparams class method)": [[28, "abics.replica_params.ParallelMCParams.from_dict", false]], "from_dict() (abics.replica_params.parallelrandomparams class method)": [[28, "abics.replica_params.ParallelRandomParams.from_dict", false]], "from_dict() (abics.replica_params.rxparams class method)": [[28, "abics.replica_params.RXParams.from_dict", false]], "from_dict() (abics.replica_params.samplerparams class method)": [[28, "abics.replica_params.SamplerParams.from_dict", false]], "from_toml() (abics.replica_params.parallelmcparams class method)": [[28, "abics.replica_params.ParallelMCParams.from_toml", false]], "from_toml() (abics.replica_params.parallelrandomparams class method)": [[28, "abics.replica_params.ParallelRandomParams.from_toml", false]], "from_toml() (abics.replica_params.rxparams class method)": [[28, "abics.replica_params.RXParams.from_toml", false]], "from_toml() (abics.replica_params.samplerparams class method)": [[28, "abics.replica_params.SamplerParams.from_toml", false]], "inputerror": [[20, "abics.exception.InputError", false]], "ktend (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.kTend", false]], "ktend (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.kTend", false]], "ktstart (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.kTstart", false]], "ktstart (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.kTstart", false]], "matrixparseerror": [[20, "abics.exception.MatrixParseError", false]], "message (abics.exception.inputerror attribute)": [[20, "abics.exception.InputError.message", false]], "message (abics.exception.matrixparseerror attribute)": [[20, "abics.exception.MatrixParseError.message", false]], "model (class in abics.model)": [[26, "abics.model.Model", false]], "model (in module abics.model)": [[26, "abics.model.model", false]], "model_name (abics.model.model attribute)": [[26, "abics.model.Model.model_name", false]], "module": [[0, "module-abics", false], [1, "module-abics.applications", false], [18, "module-abics.applications.lattice_model", false], [20, "module-abics.exception", false], [21, "module-abics.loggers", false], [22, "module-abics.loggers.loggers", false], [26, "module-abics.model", false], [28, "module-abics.replica_params", false], [29, "module-abics.sampling", false], [36, "module-abics.scripts", false]], "newconfig() (abics.model.model method)": [[26, "abics.model.Model.newconfig", false]], "nprocs_per_replica (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.nprocs_per_replica", false]], "nprocs_per_replica (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.nprocs_per_replica", false]], "nprocs_per_replica (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.nprocs_per_replica", false]], "nreplicas (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.nreplicas", false]], "nreplicas (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.nreplicas", false]], "nreplicas (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.nreplicas", false]], "nsteps (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.nsteps", false]], "nsteps (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.nsteps", false]], "nsteps (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.nsteps", false]], "parallelmcparams (class in abics.replica_params)": [[28, "abics.replica_params.ParallelMCParams", false]], "parallelrandomparams (class in abics.replica_params)": [[28, "abics.replica_params.ParallelRandomParams", false]], "print_frequency (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.print_frequency", false]], "print_frequency (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.print_frequency", false]], "print_frequency (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.print_frequency", false]], "reload (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.reload", false]], "reload (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.reload", false]], "reload (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.reload", false]], "rxparams (class in abics.replica_params)": [[28, "abics.replica_params.RXParams", false]], "rxtrial_frequency (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.RXtrial_frequency", false]], "sample_frequency (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.sample_frequency", false]], "sample_frequency (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.sample_frequency", false]], "sample_frequency (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.sample_frequency", false]], "sampler (abics.replica_params.samplerparams attribute)": [[28, "abics.replica_params.SamplerParams.sampler", false]], "samplerparams (class in abics.replica_params)": [[28, "abics.replica_params.SamplerParams", false]], "seed (abics.replica_params.parallelmcparams attribute)": [[28, "abics.replica_params.ParallelMCParams.seed", false]], "seed (abics.replica_params.parallelrandomparams attribute)": [[28, "abics.replica_params.ParallelRandomParams.seed", false]], "seed (abics.replica_params.rxparams attribute)": [[28, "abics.replica_params.RXParams.seed", false]], "set_log_handles() (in module abics.loggers)": [[21, "abics.loggers.set_log_handles", false]], "set_log_handles() (in module abics.loggers.loggers)": [[22, "abics.loggers.loggers.set_log_handles", false]], "trialstep() (abics.model.model method)": [[26, "abics.model.Model.trialstep", false]]}, "objects": {"": [[0, 0, 0, "-", "abics"]], "abics": [[1, 0, 0, "-", "applications"], [20, 0, 0, "-", "exception"], [21, 0, 0, "-", "loggers"], [26, 0, 0, "-", "model"], [28, 0, 0, "-", "replica_params"], [29, 0, 0, "-", "sampling"], [36, 0, 0, "-", "scripts"]], "abics.applications": [[18, 0, 0, "-", "lattice_model"]], "abics.exception": [[20, 1, 1, "", "Error"], [20, 1, 1, "", "InputError"], [20, 1, 1, "", "MatrixParseError"]], "abics.exception.InputError": [[20, 2, 1, "", "message"]], "abics.exception.MatrixParseError": [[20, 2, 1, "", "message"]], "abics.loggers": [[22, 0, 0, "-", "loggers"], [21, 3, 1, "", "set_log_handles"]], "abics.loggers.loggers": [[22, 3, 1, "", "set_log_handles"]], "abics.model": [[26, 4, 1, "", "Model"], [26, 2, 1, "", "model"]], "abics.model.Model": [[26, 5, 1, "", "energy"], [26, 2, 1, "", "model_name"], [26, 5, 1, "", "newconfig"], [26, 5, 1, "", "trialstep"]], "abics.replica_params": [[28, 4, 1, "", "ParallelMCParams"], [28, 4, 1, "", "ParallelRandomParams"], [28, 4, 1, "", "RXParams"], [28, 4, 1, "", "SamplerParams"]], "abics.replica_params.ParallelMCParams": [[28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "kTend"], [28, 2, 1, "", "kTstart"], [28, 2, 1, "", "nprocs_per_replica"], [28, 2, 1, "", "nreplicas"], [28, 2, 1, "", "nsteps"], [28, 2, 1, "", "print_frequency"], [28, 2, 1, "", "reload"], [28, 2, 1, "", "sample_frequency"], [28, 2, 1, "", "seed"]], "abics.replica_params.ParallelRandomParams": [[28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "nprocs_per_replica"], [28, 2, 1, "", "nreplicas"], [28, 2, 1, "", "nsteps"], [28, 2, 1, "", "print_frequency"], [28, 2, 1, "", "reload"], [28, 2, 1, "", "sample_frequency"], [28, 2, 1, "", "seed"]], "abics.replica_params.RXParams": [[28, 2, 1, "", "RXtrial_frequency"], [28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "kTend"], [28, 2, 1, "", "kTstart"], [28, 2, 1, "", "nprocs_per_replica"], [28, 2, 1, "", "nreplicas"], [28, 2, 1, "", "nsteps"], [28, 2, 1, "", "print_frequency"], [28, 2, 1, "", "reload"], [28, 2, 1, "", "sample_frequency"], [28, 2, 1, "", "seed"]], "abics.replica_params.SamplerParams": [[28, 5, 1, "", "from_dict"], [28, 5, 1, "", "from_toml"], [28, 2, 1, "", "sampler"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "exception", "Python exception"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "function", "Python function"], "4": ["py", "class", "Python class"], "5": ["py", "method", "Python method"]}, "objtypes": {"0": "py:module", "1": "py:exception", "2": "py:attribute", "3": "py:function", "4": "py:class", "5": "py:method"}, "terms": {"0": [21, 22, 26, 28], "1": [21, 22], "10": [21, 22], "2": [21, 22], "20": [21, 22], "3": [21, 22], "30": [21, 22], "35869137": [21, 22], "40": [21, 22], "56085015": [21, 22], "If": [21, 22, 28], "The": [26, 28], "abicsrxsept": [0, 36], "abov": [21, 22], "abstract": 26, "account": [21, 22], "activelearn": [0, 36], "add": [21, 22], "aenet": [1, 2], "aenet_pylammp": [1, 2], "aenet_train": [1, 2], "algorithm": 28, "alia": 26, "all": [21, 22], "ani": [26, 28], "app_nam": [21, 22], "applic": [0, 21, 22, 46, 47], "ar": [21, 22], "argument": [21, 22], "automat": [21, 22], "avail": [21, 22], "avoid": [21, 22], "base": [20, 26, 28], "base_solv": [1, 2], "between": 28, "bool": 28, "bound": 28, "build": 26, "c": [21, 22], "calcul": 26, "can": 26, "care": 21, "carlo": 28, "chang": 26, "class": [20, 26, 28], "classmethod": 28, "collect": [21, 22], "com": [21, 22], "config": 26, "configur": 26, "consid": [21, 22], "consol": [21, 22], "console_level": [21, 22], "construct": 26, "contain": 26, "content": 47, "cpp": [21, 22], "cpu": [21, 22], "creat": [21, 22], "current": 26, "d": 28, "dconfig": 26, "de": 26, "debug": [21, 22], "default": [21, 22], "default_observ": [1, 2], "defect": [1, 2], "defin": 26, "design": [21, 22], "desir": [21, 22], "dftparam": 28, "dict": [21, 22, 28], "dictionari": 28, "differ": 26, "directori": [21, 22], "duti": 21, "e": 28, "each": [21, 22], "embarrasingli": 28, "embarrassingli": 28, "energi": [0, 26], "environ": [21, 22], "equal": 26, "error": [0, 20, 21, 22, 46, 47], "examin": [21, 22], "except": [0, 46, 47], "exchang": 28, "explan": 20, "f": 28, "fals": [21, 22], "fiil": [21, 22], "file": [21, 22, 28], "float": [26, 28], "fname": 28, "from": [21, 22, 26, 28], "from_dict": [0, 28], "from_toml": [0, 28], "function": 26, "g": [21, 22, 28], "gener": 28, "given": [21, 22], "googl": [21, 22], "group": [21, 22], "handler": [21, 22], "http": [21, 22], "i": [21, 22, 26, 28], "includ": 28, "index": 46, "info": [21, 22], "inform": [26, 28], "initi": 22, "input": [20, 26, 28], "inputerror": [0, 20, 46, 47], "instal": [21, 22], "int": [21, 22, 28], "its": [21, 22], "kei": [21, 22], "ktend": [0, 28], "ktstart": [0, 28], "label": [21, 22], "latgas_abinitio_interfac": [0, 1], "lattice_model": [0, 1], "level": [21, 22], "list": [21, 22], "log": [21, 22], "logfile_level": [21, 22], "logfile_mod": [21, 22], "logfile_path": [21, 22], "logfile_rank": [21, 22], "logger": [0, 46, 47], "lower": 28, "mai": [21, 22, 26], "main": [0, 36], "main_dft_latga": [0, 36], "main_pott": [0, 36], "make": 26, "map2perflat": [1, 2], "master": [21, 22], "matrix": 20, "matrixparseerror": [0, 20, 46, 47], "matter": 26, "mc": [0, 28, 29, 46, 47], "mc_mpi": [0, 29, 46, 47], "measur": 28, "messag": [0, 20, 21, 22], "method": 28, "minim": 26, "mlref": [0, 46, 47], "mocksolv": [0, 36], "mode": [21, 22], "model": [0, 46, 47], "model_nam": [0, 26], "model_setup": [1, 2], "modul": [46, 47], "mont": 28, "mpi": [21, 22], "mpi4pi": [21, 22], "mutablemap": 28, "mutat": 26, "naive_match": [1, 2], "name": [21, 22, 28], "never": 26, "newconfig": [0, 26], "nois": 28, "none": [21, 22], "notat": [21, 22], "note": [21, 22], "nprocs_per_replica": [0, 28], "nreplica": [0, 28], "nstep": [0, 28], "number": [21, 22, 28], "object": [21, 22, 26, 28], "observ": [0, 28, 46, 47], "off": [21, 22], "one": [21, 22], "onli": [21, 22], "open": [21, 22], "openmp": [21, 22], "openmx": [1, 2], "oper": 28, "origin": 26, "our": [21, 22], "output": [21, 22], "overwritten": [21, 22], "pack": [21, 22], "packag": [22, 46, 47], "page": 46, "pamc": [0, 29], "parallel": [21, 22, 28], "parallelmcparam": [0, 28, 46, 47], "parallelrandomparam": [0, 28, 46, 47], "param": [1, 2, 21, 22, 28], "paramet": [21, 22, 26, 28], "parent": [21, 22], "pars": 20, "path": [21, 22], "pott": [1, 18], "present": [21, 22], "print": [21, 22], "print_frequ": [0, 28], "process": [21, 22, 28], "python": [21, 22], "qe": [1, 2], "question": [21, 22], "rais": [20, 21, 22], "random": 28, "rang": 28, "rank": [21, 22], "read": 28, "refer": [21, 22], "reload": [0, 28], "replica": 28, "replica_param": [0, 46, 47], "resampl": [0, 29], "restart": 28, "return": [26, 28], "run": [21, 22], "run_base_mpi": [1, 2], "runtimeerror": [21, 22], "rxmc": [0, 29], "rxparam": [0, 28, 46, 47], "rxtrial_frequ": [0, 28], "same": [21, 22], "sampl": [0, 28, 46, 47], "sample_frequ": [0, 28], "sampler": [0, 28], "samplerparam": [0, 28, 46, 47], "sanzc8bdj6u": [21, 22], "script": [0, 46, 47], "search": 46, "seed": [0, 28], "self": 28, "send": [21, 22], "serial": [21, 22], "set": [21, 22, 28], "set_log_handl": [0, 21, 22], "show": 28, "shown": [21, 22], "simple_parallel": [0, 29], "simul": 28, "some": 28, "sourc": [20, 21, 22, 26, 28], "specifi": [21, 22, 28], "st2abics_config": [0, 36], "stackoverflow": [21, 22], "standard": [21, 22], "step": [26, 28], "str": [20, 21, 22, 28], "submodul": [1, 46, 47], "subpackag": [46, 47], "superced": [21, 22], "suppress": [21, 22], "sure": 26, "system": 28, "take": 21, "taken": [21, 22], "temperatur": 28, "templat": 26, "tensorflow": [21, 22], "thei": [21, 22], "thi": 26, "those": [21, 22], "through": 26, "time": 28, "toml": 28, "train": [0, 36], "trial": 26, "trialstep": [0, 26], "true": [21, 22], "tupl": 26, "type": [20, 21, 22, 26, 28], "unchang": 26, "updat": 26, "upper": 28, "us": [26, 28], "user_function_solv": [1, 2], "util": [0, 46, 47], "vasp": [1, 2], "warn": [21, 22], "when": [21, 22], "whether": 28, "which": [21, 22, 26, 28], "while": [21, 22], "whose": 26, "worker": [21, 22], "write": [21, 22], "written": [21, 22], "ye": [21, 22]}, "titles": ["abics package", "abics.applications package", "abics.applications.latgas_abinitio_interface package", "abics.applications.latgas_abinitio_interface.aenet module", "abics.applications.latgas_abinitio_interface.aenet_pylammps module", "abics.applications.latgas_abinitio_interface.aenet_trainer module", "abics.applications.latgas_abinitio_interface.base_solver module", "abics.applications.latgas_abinitio_interface.default_observer module", "abics.applications.latgas_abinitio_interface.defect module", "abics.applications.latgas_abinitio_interface.map2perflat module", "abics.applications.latgas_abinitio_interface.model_setup module", "abics.applications.latgas_abinitio_interface.naive_matcher module", "abics.applications.latgas_abinitio_interface.openmx module", "abics.applications.latgas_abinitio_interface.params module", "abics.applications.latgas_abinitio_interface.qe module", "abics.applications.latgas_abinitio_interface.run_base_mpi module", "abics.applications.latgas_abinitio_interface.user_function_solver module", "abics.applications.latgas_abinitio_interface.vasp module", "abics.applications.lattice_model package", "abics.applications.lattice_model.potts module", "abics.exception module", "abics.loggers package", "abics.loggers.loggers module", "abics.mc module", "abics.mc_mpi module", "abics.mlref module", "abics.model module", "abics.observer module", "abics.replica_params module", "abics.sampling package", "abics.sampling.mc module", "abics.sampling.mc_mpi module", "abics.sampling.pamc module", "abics.sampling.resampling module", "abics.sampling.rxmc module", "abics.sampling.simple_parallel module", "abics.scripts package", "abics.scripts.abicsRXsepT module", "abics.scripts.activelearn module", "abics.scripts.main module", "abics.scripts.main_dft_latgas module", "abics.scripts.main_potts module", "abics.scripts.mocksolver module", "abics.scripts.st2abics_config module", "abics.scripts.train module", "abics.util module", "Welcome to abics\u2019s API documentation!", "abics"], "titleterms": {"": 46, "abic": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "abicsrxsept": 37, "activelearn": 38, "aenet": 3, "aenet_pylammp": 4, "aenet_train": 5, "api": 46, "applic": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], "base_solv": 6, "content": [0, 1, 2, 18, 21, 29, 36, 46], "default_observ": 7, "defect": 8, "document": 46, "except": 20, "indic": 46, "latgas_abinitio_interfac": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "lattice_model": [18, 19], "logger": [21, 22], "main": 39, "main_dft_latga": 40, "main_pott": 41, "map2perflat": 9, "mc": [23, 30], "mc_mpi": [24, 31], "mlref": 25, "mocksolv": 42, "model": 26, "model_setup": 10, "modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "naive_match": 11, "observ": 27, "openmx": 12, "packag": [0, 1, 2, 18, 21, 29, 36], "pamc": 32, "param": 13, "pott": 19, "qe": 14, "replica_param": 28, "resampl": 33, "run_base_mpi": 15, "rxmc": 34, "sampl": [29, 30, 31, 32, 33, 34, 35], "script": [36, 37, 38, 39, 40, 41, 42, 43, 44], "simple_parallel": 35, "st2abics_config": 43, "submodul": [0, 2, 18, 21, 29, 36], "subpackag": [0, 1], "tabl": 46, "train": 44, "user_function_solv": 16, "util": 45, "vasp": 17, "welcom": 46}}) \ No newline at end of file diff --git a/docs/master/en/html/.buildinfo b/docs/master/en/html/.buildinfo index b6a4836..2987863 100644 --- a/docs/master/en/html/.buildinfo +++ b/docs/master/en/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 3ec219bb0ea4d6af39d3b41ec4eea567 +config: 10b16c74ffa4e530fa1047a5799eb605 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/master/en/html/_static/alabaster.css b/docs/master/en/html/_static/alabaster.css index a32244c..9792e52 100644 --- a/docs/master/en/html/_static/alabaster.css +++ b/docs/master/en/html/_static/alabaster.css @@ -69,6 +69,11 @@ div.relations { } +div.sphinxsidebar { + max-height: 100%; + overflow-y: auto; +} + div.sphinxsidebar a { color: #444; text-decoration: none; @@ -155,6 +160,14 @@ div.sphinxsidebar input { font-size: 1em; } +div.sphinxsidebar #searchbox input[type="text"] { + width: 160px; +} + +div.sphinxsidebar .search > div { + display: table-cell; +} + div.sphinxsidebar hr { border: none; height: 1px; @@ -638,15 +651,7 @@ a:hover tt, a:hover code { display: none!important; } -/* Make nested-list/multi-paragraph items look better in Releases changelog - * pages. Without this, docutils' magical list fuckery causes inconsistent - * formatting between different release sub-lists. - */ -div#changelog > div.section > ul > li > p:only-child { - margin-bottom: 0; -} - -/* Hide fugly table cell borders in ..bibliography:: directive output */ +/* Hide ugly table cell borders in ..bibliography:: directive output */ table.docutils.citation, table.docutils.citation td, table.docutils.citation th { border: none; /* Below needed in some edge cases; if not applied, bottom shadows appear */ diff --git a/docs/master/en/html/_static/basic.css b/docs/master/en/html/_static/basic.css index 30fee9d..e5179b7 100644 --- a/docs/master/en/html/_static/basic.css +++ b/docs/master/en/html/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -222,7 +222,7 @@ table.modindextable td { /* -- general body styles --------------------------------------------------- */ div.body { - min-width: 360px; + min-width: inherit; max-width: 800px; } diff --git a/docs/master/en/html/_static/doctools.js b/docs/master/en/html/_static/doctools.js index d06a71d..4d67807 100644 --- a/docs/master/en/html/_static/doctools.js +++ b/docs/master/en/html/_static/doctools.js @@ -4,7 +4,7 @@ * * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/master/en/html/_static/language_data.js b/docs/master/en/html/_static/language_data.js index 250f566..367b8ed 100644 --- a/docs/master/en/html/_static/language_data.js +++ b/docs/master/en/html/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -13,7 +13,7 @@ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version is copied as a separate JS file, is available */ +/* Non-minified version is copied as a separate JS file, if available */ /** * Porter Stemmer diff --git a/docs/master/en/html/_static/searchtools.js b/docs/master/en/html/_static/searchtools.js index 7918c3f..b08d58c 100644 --- a/docs/master/en/html/_static/searchtools.js +++ b/docs/master/en/html/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms) + Search.makeSearchSummary(data, searchTerms, anchor) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js @@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => { ); else Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, @@ -137,6 +137,22 @@ const _displayNextItem = ( // search finished, update title and status message else _finishSearch(resultCount); }; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -160,13 +176,26 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString) => { + htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; + if (docContent) return docContent.textContent; + console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, @@ -239,16 +268,7 @@ const Search = { else Search.deferQuery(query); }, - /** - * execute search (requires search index to be loaded) - */ - query: (query) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - + _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -284,21 +304,38 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - // array of [docname, title, anchor, descr, score, filename] - let results = []; + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase(); + const queryLower = query.toLowerCase().trim(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - let score = Math.round(100 * queryLower.length / title.length) - results.push([ + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score, + score + boost, filenames[file], ]); } @@ -308,46 +345,47 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id] of foundEntries) { - let score = Math.round(100 * queryLower.length / entry.length) - results.push([ + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - ]); + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } } } } // lookup as object objectTerms.forEach((term) => - results.push(...Search.performObjectSearch(term, objectTerms)) + normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - - // now sort the results by score (in opposite order of appearance, since the - // display function below uses pop() to retrieve items) and then - // alphabetically - results.sort((a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; - }); + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -361,7 +399,12 @@ const Search = { return acc; }, []); - results = results.reverse(); + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy @@ -466,14 +509,18 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord) && !terms[word]) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord) && !titleTerms[word]) - arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); - }); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } } // no match but word was a required one @@ -496,9 +543,8 @@ const Search = { // create the mapping files.forEach((file) => { - if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) - fileMap.get(file).push(word); - else fileMap.set(file, [word]); + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); @@ -549,8 +595,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords) => { - const text = Search.htmlToText(htmlText); + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/docs/master/en/html/about/index.html b/docs/master/en/html/about/index.html index fae0567..0a1e021 100644 --- a/docs/master/en/html/about/index.html +++ b/docs/master/en/html/about/index.html @@ -7,9 +7,9 @@ 1. About abICS — abICS 2.1.0 documentation - + - + @@ -18,8 +18,9 @@ + + - @@ -49,7 +50,7 @@

1. About abICS -