0
+ var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
+ var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
+ var s_v = "^(" + C + ")?" + v; // vowel in stem
+
+ this.stemWord = function (w) {
+ var stem;
+ var suffix;
+ var firstch;
+ var origword = w;
+
+ if (w.length < 3)
+ return w;
+
+ var re;
+ var re2;
+ var re3;
+ var re4;
+
+ firstch = w.substr(0,1);
+ if (firstch == "y")
+ w = firstch.toUpperCase() + w.substr(1);
+
+ // Step 1a
+ re = /^(.+?)(ss|i)es$/;
+ re2 = /^(.+?)([^s])s$/;
+
+ if (re.test(w))
+ w = w.replace(re,"$1$2");
+ else if (re2.test(w))
+ w = w.replace(re2,"$1$2");
+
+ // Step 1b
+ re = /^(.+?)eed$/;
+ re2 = /^(.+?)(ed|ing)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ re = new RegExp(mgr0);
+ if (re.test(fp[1])) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1];
+ re2 = new RegExp(s_v);
+ if (re2.test(stem)) {
+ w = stem;
+ re2 = /(at|bl|iz)$/;
+ re3 = new RegExp("([^aeiouylsz])\\1$");
+ re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re2.test(w))
+ w = w + "e";
+ else if (re3.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ else if (re4.test(w))
+ w = w + "e";
+ }
+ }
+
+ // Step 1c
+ re = /^(.+?)y$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(s_v);
+ if (re.test(stem))
+ w = stem + "i";
+ }
+
+ // Step 2
+ re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step2list[suffix];
+ }
+
+ // Step 3
+ re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step3list[suffix];
+ }
+
+ // Step 4
+ re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+ re2 = /^(.+?)(s|t)(ion)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ if (re.test(stem))
+ w = stem;
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1] + fp[2];
+ re2 = new RegExp(mgr1);
+ if (re2.test(stem))
+ w = stem;
+ }
+
+ // Step 5
+ re = /^(.+?)e$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ re2 = new RegExp(meq1);
+ re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+ w = stem;
+ }
+ re = /ll$/;
+ re2 = new RegExp(mgr1);
+ if (re.test(w) && re2.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+
+ // and turn initial Y back to y
+ if (firstch == "y")
+ w = firstch.toLowerCase() + w.substr(1);
+ return w;
+ }
+}
+
diff --git a/_static/minus.png b/_static/minus.png
new file mode 100644
index 000000000..d96755fda
Binary files /dev/null and b/_static/minus.png differ
diff --git a/_static/plus.png b/_static/plus.png
new file mode 100644
index 000000000..7107cec93
Binary files /dev/null and b/_static/plus.png differ
diff --git a/_static/pygments.css b/_static/pygments.css
new file mode 100644
index 000000000..84ab3030a
--- /dev/null
+++ b/_static/pygments.css
@@ -0,0 +1,75 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #9C6500 } /* Comment.Preproc */
+.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
+.highlight .gr { color: #E40000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #008400 } /* Generic.Inserted */
+.highlight .go { color: #717171 } /* Generic.Output */
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #B00040 } /* Keyword.Type */
+.highlight .m { color: #666666 } /* Literal.Number */
+.highlight .s { color: #BA2121 } /* Literal.String */
+.highlight .na { color: #687822 } /* Name.Attribute */
+.highlight .nb { color: #008000 } /* Name.Builtin */
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+.highlight .no { color: #880000 } /* Name.Constant */
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
+.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0000FF } /* Name.Function */
+.highlight .nl { color: #767600 } /* Name.Label */
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #19177C } /* Name.Variable */
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #666666 } /* Literal.Number.Bin */
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
+.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
+.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
+.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
+.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
+.highlight .sx { color: #008000 } /* Literal.String.Other */
+.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0000FF } /* Name.Function.Magic */
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
+.highlight .vm { color: #19177C } /* Name.Variable.Magic */
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/_static/searchtools.js b/_static/searchtools.js
new file mode 100644
index 000000000..97d56a74d
--- /dev/null
+++ b/_static/searchtools.js
@@ -0,0 +1,566 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+ var Scorer = {
+ // Implement the following function to further tweak the score for each result
+ // The function takes a result array [docname, title, anchor, descr, score, filename]
+ // and returns the new score.
+ /*
+ score: result => {
+ const [docname, title, anchor, descr, score, filename] = result
+ return score
+ },
+ */
+
+ // query matches the full name of an object
+ objNameMatch: 11,
+ // or matches in the last dotted part of the object name
+ objPartialMatch: 6,
+ // Additive scores depending on the priority of the object
+ objPrio: {
+ 0: 15, // used to be importantResults
+ 1: 5, // used to be objectResults
+ 2: -5, // used to be unimportantResults
+ },
+ // Used when the priority is not in the mapping.
+ objPrioDefault: 0,
+
+ // query found in title
+ title: 15,
+ partialTitle: 7,
+ // query found in terms
+ term: 5,
+ partialTerm: 2,
+ };
+}
+
+const _removeChildren = (element) => {
+ while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+ string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms) => {
+ const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+ const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
+ const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+ const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+ const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+
+ const [docName, title, anchor, descr, score, _filename] = item;
+
+ let listItem = document.createElement("li");
+ let requestUrl;
+ let linkUrl;
+ if (docBuilder === "dirhtml") {
+ // dirhtml builder
+ let dirname = docName + "/";
+ if (dirname.match(/\/index\/$/))
+ dirname = dirname.substring(0, dirname.length - 6);
+ else if (dirname === "index/") dirname = "";
+ requestUrl = docUrlRoot + dirname;
+ linkUrl = requestUrl;
+ } else {
+ // normal html builders
+ requestUrl = docUrlRoot + docName + docFileSuffix;
+ linkUrl = docName + docLinkSuffix;
+ }
+ let linkEl = listItem.appendChild(document.createElement("a"));
+ linkEl.href = linkUrl + anchor;
+ linkEl.dataset.score = score;
+ linkEl.innerHTML = title;
+ if (descr)
+ listItem.appendChild(document.createElement("span")).innerHTML =
+ " (" + descr + ")";
+ else if (showSearchSummary)
+ fetch(requestUrl)
+ .then((responseData) => responseData.text())
+ .then((data) => {
+ if (data)
+ listItem.appendChild(
+ Search.makeSearchSummary(data, searchTerms)
+ );
+ });
+ Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+ Search.stopPulse();
+ Search.title.innerText = _("Search Results");
+ if (!resultCount)
+ Search.status.innerText = Documentation.gettext(
+ "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+ );
+ else
+ Search.status.innerText = _(
+ `Search finished, found ${resultCount} page(s) matching the search query.`
+ );
+};
+const _displayNextItem = (
+ results,
+ resultCount,
+ searchTerms
+) => {
+ // results left, load the summary and display it
+ // this is intended to be dynamic (don't sub resultsCount)
+ if (results.length) {
+ _displayItem(results.pop(), searchTerms);
+ setTimeout(
+ () => _displayNextItem(results, resultCount, searchTerms),
+ 5
+ );
+ }
+ // search finished, update title and status message
+ else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+ var splitQuery = (query) => query
+ .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+ .filter(term => term) // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+ _index: null,
+ _queued_query: null,
+ _pulse_status: -1,
+
+ htmlToText: (htmlString) => {
+ const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+ htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+ const docContent = htmlElement.querySelector('[role="main"]');
+ if (docContent !== undefined) 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."
+ );
+ return "";
+ },
+
+ init: () => {
+ const query = new URLSearchParams(window.location.search).get("q");
+ document
+ .querySelectorAll('input[name="q"]')
+ .forEach((el) => (el.value = query));
+ if (query) Search.performSearch(query);
+ },
+
+ loadIndex: (url) =>
+ (document.body.appendChild(document.createElement("script")).src = url),
+
+ setIndex: (index) => {
+ Search._index = index;
+ if (Search._queued_query !== null) {
+ const query = Search._queued_query;
+ Search._queued_query = null;
+ Search.query(query);
+ }
+ },
+
+ hasIndex: () => Search._index !== null,
+
+ deferQuery: (query) => (Search._queued_query = query),
+
+ stopPulse: () => (Search._pulse_status = -1),
+
+ startPulse: () => {
+ if (Search._pulse_status >= 0) return;
+
+ const pulse = () => {
+ Search._pulse_status = (Search._pulse_status + 1) % 4;
+ Search.dots.innerText = ".".repeat(Search._pulse_status);
+ if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+ };
+ pulse();
+ },
+
+ /**
+ * perform a search for something (or wait until index is loaded)
+ */
+ performSearch: (query) => {
+ // create the required interface elements
+ const searchText = document.createElement("h2");
+ searchText.textContent = _("Searching");
+ const searchSummary = document.createElement("p");
+ searchSummary.classList.add("search-summary");
+ searchSummary.innerText = "";
+ const searchList = document.createElement("ul");
+ searchList.classList.add("search");
+
+ const out = document.getElementById("search-results");
+ Search.title = out.appendChild(searchText);
+ Search.dots = Search.title.appendChild(document.createElement("span"));
+ Search.status = out.appendChild(searchSummary);
+ Search.output = out.appendChild(searchList);
+
+ const searchProgress = document.getElementById("search-progress");
+ // Some themes don't use the search progress node
+ if (searchProgress) {
+ searchProgress.innerText = _("Preparing search...");
+ }
+ Search.startPulse();
+
+ // index already loaded, the browser was quick!
+ if (Search.hasIndex()) Search.query(query);
+ 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;
+
+ // stem the search terms and add them to the correct list
+ const stemmer = new Stemmer();
+ const searchTerms = new Set();
+ const excludedTerms = new Set();
+ const highlightTerms = new Set();
+ const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+ splitQuery(query.trim()).forEach((queryTerm) => {
+ const queryTermLower = queryTerm.toLowerCase();
+
+ // maybe skip this "word"
+ // stopwords array is from language_data.js
+ if (
+ stopwords.indexOf(queryTermLower) !== -1 ||
+ queryTerm.match(/^\d+$/)
+ )
+ return;
+
+ // stem the word
+ let word = stemmer.stemWord(queryTermLower);
+ // select the correct list
+ if (word[0] === "-") excludedTerms.add(word.substr(1));
+ else {
+ searchTerms.add(word);
+ highlightTerms.add(queryTermLower);
+ }
+ });
+
+ if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
+ localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+ }
+
+ // console.debug("SEARCH: searching for:");
+ // console.info("required: ", [...searchTerms]);
+ // console.info("excluded: ", [...excludedTerms]);
+
+ // array of [docname, title, anchor, descr, score, filename]
+ let results = [];
+ _removeChildren(document.getElementById("search-progress"));
+
+ const queryLower = query.toLowerCase();
+ for (const [title, foundTitles] of Object.entries(allTitles)) {
+ if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+ for (const [file, id] of foundTitles) {
+ let score = Math.round(100 * queryLower.length / title.length)
+ results.push([
+ docNames[file],
+ titles[file] !== title ? `${titles[file]} > ${title}` : title,
+ id !== null ? "#" + id : "",
+ null,
+ score,
+ filenames[file],
+ ]);
+ }
+ }
+ }
+
+ // 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([
+ docNames[file],
+ titles[file],
+ id ? "#" + id : "",
+ null,
+ score,
+ filenames[file],
+ ]);
+ }
+ }
+ }
+
+ // lookup as object
+ objectTerms.forEach((term) =>
+ results.push(...Search.performObjectSearch(term, objectTerms))
+ );
+
+ // lookup as search terms in fulltext
+ results.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;
+ });
+
+ // remove duplicate search results
+ // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+ let seen = new Set();
+ results = results.reverse().reduce((acc, result) => {
+ let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+ if (!seen.has(resultStr)) {
+ acc.push(result);
+ seen.add(resultStr);
+ }
+ return acc;
+ }, []);
+
+ results = results.reverse();
+
+ // for debugging
+ //Search.lastresults = results.slice(); // a copy
+ // console.info("search results:", Search.lastresults);
+
+ // print the results
+ _displayNextItem(results, results.length, searchTerms);
+ },
+
+ /**
+ * search for object names
+ */
+ performObjectSearch: (object, objectTerms) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const objects = Search._index.objects;
+ const objNames = Search._index.objnames;
+ const titles = Search._index.titles;
+
+ const results = [];
+
+ const objectSearchCallback = (prefix, match) => {
+ const name = match[4]
+ const fullname = (prefix ? prefix + "." : "") + name;
+ const fullnameLower = fullname.toLowerCase();
+ if (fullnameLower.indexOf(object) < 0) return;
+
+ let score = 0;
+ const parts = fullnameLower.split(".");
+
+ // check for different match types: exact matches of full name or
+ // "last name" (i.e. last dotted part)
+ if (fullnameLower === object || parts.slice(-1)[0] === object)
+ score += Scorer.objNameMatch;
+ else if (parts.slice(-1)[0].indexOf(object) > -1)
+ score += Scorer.objPartialMatch; // matches in last name
+
+ const objName = objNames[match[1]][2];
+ const title = titles[match[0]];
+
+ // If more than one term searched for, we require other words to be
+ // found in the name/title/description
+ const otherTerms = new Set(objectTerms);
+ otherTerms.delete(object);
+ if (otherTerms.size > 0) {
+ const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+ if (
+ [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+ )
+ return;
+ }
+
+ let anchor = match[3];
+ if (anchor === "") anchor = fullname;
+ else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+ const descr = objName + _(", in ") + title;
+
+ // add custom score for some objects according to scorer
+ if (Scorer.objPrio.hasOwnProperty(match[2]))
+ score += Scorer.objPrio[match[2]];
+ else score += Scorer.objPrioDefault;
+
+ results.push([
+ docNames[match[0]],
+ fullname,
+ "#" + anchor,
+ descr,
+ score,
+ filenames[match[0]],
+ ]);
+ };
+ Object.keys(objects).forEach((prefix) =>
+ objects[prefix].forEach((array) =>
+ objectSearchCallback(prefix, array)
+ )
+ );
+ return results;
+ },
+
+ /**
+ * search for full-text terms in the index
+ */
+ performTermsSearch: (searchTerms, excludedTerms) => {
+ // prepare search
+ const terms = Search._index.terms;
+ const titleTerms = Search._index.titleterms;
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+
+ const scoreMap = new Map();
+ const fileMap = new Map();
+
+ // perform the search on the required terms
+ searchTerms.forEach((word) => {
+ const files = [];
+ const arr = [
+ { files: terms[word], score: Scorer.term },
+ { files: titleTerms[word], score: Scorer.title },
+ ];
+ // 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 });
+ });
+ }
+
+ // no match but word was a required one
+ if (arr.every((record) => record.files === undefined)) return;
+
+ // found search word in contents
+ arr.forEach((record) => {
+ if (record.files === undefined) return;
+
+ let recordFiles = record.files;
+ if (recordFiles.length === undefined) recordFiles = [recordFiles];
+ files.push(...recordFiles);
+
+ // set score for the word in each file
+ recordFiles.forEach((file) => {
+ if (!scoreMap.has(file)) scoreMap.set(file, {});
+ scoreMap.get(file)[word] = record.score;
+ });
+ });
+
+ // 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]);
+ });
+ });
+
+ // now check if the files don't contain excluded terms
+ const results = [];
+ for (const [file, wordList] of fileMap) {
+ // check if all requirements are matched
+
+ // as search terms with length < 3 are discarded
+ const filteredTermCount = [...searchTerms].filter(
+ (term) => term.length > 2
+ ).length;
+ if (
+ wordList.length !== searchTerms.size &&
+ wordList.length !== filteredTermCount
+ )
+ continue;
+
+ // ensure that none of the excluded terms is in the search result
+ if (
+ [...excludedTerms].some(
+ (term) =>
+ terms[term] === file ||
+ titleTerms[term] === file ||
+ (terms[term] || []).includes(file) ||
+ (titleTerms[term] || []).includes(file)
+ )
+ )
+ break;
+
+ // select one (max) score for the file.
+ const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+ // add result to the result list
+ results.push([
+ docNames[file],
+ titles[file],
+ "",
+ null,
+ score,
+ filenames[file],
+ ]);
+ }
+ return results;
+ },
+
+ /**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words.
+ */
+ makeSearchSummary: (htmlText, keywords) => {
+ const text = Search.htmlToText(htmlText);
+ if (text === "") return null;
+
+ const textLower = text.toLowerCase();
+ const actualStartPosition = [...keywords]
+ .map((k) => textLower.indexOf(k.toLowerCase()))
+ .filter((i) => i > -1)
+ .slice(-1)[0];
+ const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+ const top = startWithContext === 0 ? "" : "...";
+ const tail = startWithContext + 240 < text.length ? "..." : "";
+
+ let summary = document.createElement("p");
+ summary.classList.add("context");
+ summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+ return summary;
+ },
+};
+
+_ready(Search.init);
diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js
new file mode 100644
index 000000000..aae669d7e
--- /dev/null
+++ b/_static/sphinx_highlight.js
@@ -0,0 +1,144 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+ if (node.nodeType === Node.TEXT_NODE) {
+ const val = node.nodeValue;
+ const parent = node.parentNode;
+ const pos = val.toLowerCase().indexOf(text);
+ if (
+ pos >= 0 &&
+ !parent.classList.contains(className) &&
+ !parent.classList.contains("nohighlight")
+ ) {
+ let span;
+
+ const closestNode = parent.closest("body, svg, foreignObject");
+ const isInSVG = closestNode && closestNode.matches("svg");
+ if (isInSVG) {
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ } else {
+ span = document.createElement("span");
+ span.classList.add(className);
+ }
+
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+ parent.insertBefore(
+ span,
+ parent.insertBefore(
+ document.createTextNode(val.substr(pos + text.length)),
+ node.nextSibling
+ )
+ );
+ node.nodeValue = val.substr(0, pos);
+
+ if (isInSVG) {
+ const rect = document.createElementNS(
+ "http://www.w3.org/2000/svg",
+ "rect"
+ );
+ const bbox = parent.getBBox();
+ rect.x.baseVal.value = bbox.x;
+ rect.y.baseVal.value = bbox.y;
+ rect.width.baseVal.value = bbox.width;
+ rect.height.baseVal.value = bbox.height;
+ rect.setAttribute("class", className);
+ addItems.push({ parent: parent, target: rect });
+ }
+ }
+ } else if (node.matches && !node.matches("button, select, textarea")) {
+ node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+ }
+};
+const _highlightText = (thisNode, text, className) => {
+ let addItems = [];
+ _highlight(thisNode, addItems, text, className);
+ addItems.forEach((obj) =>
+ obj.parent.insertAdjacentElement("beforebegin", obj.target)
+ );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+ /**
+ * highlight the search words provided in localstorage in the text
+ */
+ highlightSearchWords: () => {
+ if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
+
+ // get and clear terms from localstorage
+ const url = new URL(window.location);
+ const highlight =
+ localStorage.getItem("sphinx_highlight_terms")
+ || url.searchParams.get("highlight")
+ || "";
+ localStorage.removeItem("sphinx_highlight_terms")
+ url.searchParams.delete("highlight");
+ window.history.replaceState({}, "", url);
+
+ // get individual terms from highlight string
+ const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+ if (terms.length === 0) return; // nothing to do
+
+ // There should never be more than one element matching "div.body"
+ const divBody = document.querySelectorAll("div.body");
+ const body = divBody.length ? divBody[0] : document.querySelector("body");
+ window.setTimeout(() => {
+ terms.forEach((term) => _highlightText(body, term, "highlighted"));
+ }, 10);
+
+ const searchBox = document.getElementById("searchbox");
+ if (searchBox === null) return;
+ searchBox.appendChild(
+ document
+ .createRange()
+ .createContextualFragment(
+ '' +
+ '' +
+ _("Hide Search Matches") +
+ "
"
+ )
+ );
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords: () => {
+ document
+ .querySelectorAll("#searchbox .highlight-link")
+ .forEach((el) => el.remove());
+ document
+ .querySelectorAll("span.highlighted")
+ .forEach((el) => el.classList.remove("highlighted"));
+ localStorage.removeItem("sphinx_highlight_terms")
+ },
+
+ initEscapeListener: () => {
+ // only install a listener if it is really needed
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+ document.addEventListener("keydown", (event) => {
+ // bail for input elements
+ if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+ // bail with special keys
+ if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+ if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+ SphinxHighlight.hideSearchWords();
+ event.preventDefault();
+ }
+ });
+ },
+};
+
+_ready(SphinxHighlight.highlightSearchWords);
+_ready(SphinxHighlight.initEscapeListener);
diff --git a/api.html b/api.html
new file mode 100644
index 000000000..2369d5cc9
--- /dev/null
+++ b/api.html
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+ QCEngine API — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+QCEngine API
+
+qcengine Package
+Base file for the dqm_compute module.
+
+Functions
+
+
+compute
(input_data, program[, raise_error, ...])
+Executes a single CMS program given a QCSchema input.
+
+compute_procedure
(input_data, procedure[, ...])
+Runs a procedure (a collection of the quantum chemistry executions)
+
+get_config
(*[, hostname, task_config])
+Returns the configuration key for qcengine.
+
+get_molecule
(name)
+Returns a QC JSON representation of a test molecule.
+
+get_procedure
(name)
+Returns a procedures executor class
+
+get_program
(name[, check])
+Returns a program's executor class
+
+list_all_procedures
()
+List all procedures registered by QCEngine.
+
+list_all_programs
()
+List all programs registered by QCEngine.
+
+list_available_procedures
()
+List all procedures that can be exectued (found) by QCEngine.
+
+list_available_programs
()
+List all programs that can be exectued (found) by QCEngine.
+
+register_program
(entry_point)
+Register a new ProgramHarness with QCEngine.
+
+unregister_program
(name)
+Unregisters a given program.
+
+
+
+
+
+Classes
+
+
+MDIServer
(mdi_options, program, molecule, ...)
+
+
+
+
+
+
+Class Inheritance Diagram
+
+
+
+
+
+
+qcengine.config Module
+Creates globals for the qcengine module
+
+
+
+Class Inheritance Diagram
+
+
+
+
+
+
+qcengine.util Module
+Several import utilities
+
+Functions
+
+
+compute_wrapper
([capture_output, raise_error])
+Wraps compute for timing, output capturing, and raise protection
+
+model_wrapper
(input_data, model)
+Wrap input data in the given model, or return a controlled error
+
+handle_output_metadata
(output_data, metadata)
+Fuses general metadata and output together.
+
+create_mpi_invocation
(executable, task_config)
+Create the launch command for an MPI-parallel task
+
+execute
(command[, infiles, outfiles, ...])
+Runs a process in the background until complete.
+
+
+
+
+
+
+qcengine.programs Package
+
+
+
+Class Inheritance Diagram
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.MDIServer.html b/api/qcengine.MDIServer.html
new file mode 100644
index 000000000..51e2dd540
--- /dev/null
+++ b/api/qcengine.MDIServer.html
@@ -0,0 +1,501 @@
+
+
+
+
+
+
+ MDIServer — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+MDIServer
+
+
+class qcengine. MDIServer ( mdi_options , program , molecule , model , keywords , raise_error = False , local_options = None ) [source]
+Bases: object
+Methods Summary
+
+
+recv_coords
([coords])
+Receive a set of nuclear coordinates through MDI and assign them to the atoms in the current molecule
+
+recv_elements
([elements])
+Receive a set of atomic numbers through MDI and assign them to the atoms in the current molecule
+
+recv_masses
([masses])
+Receive a set of nuclear masses through MDI and assign them to the atoms in the current molecule
+
+recv_multiplicity
([multiplicity])
+Receive the electronic multiplicity through MDI
+
+recv_natoms
([natoms])
+Receive the number of atoms in the system through MDI and create a new molecule with them
+
+recv_total_charge
([charge])
+Receive the total system charge through MDI
+
+run_energy
()
+
+rtype:
+None
+
+
+
+
+send_coords
()
+Send the nuclear coordinates through MDI
+
+send_elements
()
+Send the atomic number of each nucleus through MDI
+
+send_energy
()
+Send the total energy through MDI
+
+send_forces
()
+Send the nuclear forces through MDI
+
+send_masses
()
+Send the nuclear masses through MDI
+
+send_multiplicity
()
+Send the electronic multiplicity through MDI
+
+send_natoms
()
+Send the number of atoms through MDI
+
+send_node
()
+Send the name of the current node through MDI
+
+send_total_charge
()
+Send the total system charge through MDI
+
+start
()
+Receive commands through MDI and respond to them as defined by the MDI Standard
+
+stop
()
+Stop listening for MDI commands
+
+update_molecule
(key, value)
+Update the molecule
+
+
+
+Methods Documentation
+
+Parameters:
+
+
+
+
+
+recv_coords ( coords = None ) [source]
+Receive a set of nuclear coordinates through MDI and assign them to the atoms in the current molecule
+
+Parameters:
+coords (np.ndarray , optional ) – New nuclear coordinates. If None, receive through MDI.
+
+Return type:
+None
+
+
+
+
+
+
+recv_elements ( elements = None ) [source]
+Receive a set of atomic numbers through MDI and assign them to the atoms in the current molecule
+
+Parameters:
+elements (list
of int
, optional) – New element numbers. If None, receive through MDI.
+
+
+
+
+
+
+recv_masses ( masses = None ) [source]
+Receive a set of nuclear masses through MDI and assign them to the atoms in the current molecule
+
+Parameters:
+masses (list
of float
, optional) – New nuclear masses. If None, receive through MDI.
+
+Return type:
+None
+
+
+
+
+
+
+recv_multiplicity ( multiplicity = None ) [source]
+Receive the electronic multiplicity through MDI
+
+Parameters:
+multiplicity (int , optional ) – New multiplicity of the system. If None, receive through MDI.
+
+Return type:
+None
+
+
+
+
+
+
+recv_natoms ( natoms = None ) [source]
+Receive the number of atoms in the system through MDI and create a new molecule with them
+
+Parameters:
+natoms (int , optional ) – New number of atoms. If None, receive through MDI.
+
+Return type:
+None
+
+
+
+
+
+
+recv_total_charge ( charge = None ) [source]
+Receive the total system charge through MDI
+
+Parameters:
+charge (float , optional ) – New charge of the system. If None, receive through MDI.
+
+Return type:
+None
+
+
+
+
+
+
+run_energy ( ) [source]
+
+Return type:
+None
+
+
+
+
+
+
+send_coords ( ) [source]
+Send the nuclear coordinates through MDI
+
+Returns:
+coords – Nuclear coordinates
+
+Return type:
+np.ndarray
+
+
+
+
+
+
+send_elements ( ) [source]
+Send the atomic number of each nucleus through MDI
+
+Returns:
+elements – Element of each atom
+
+Return type:
+list
of int
+
+
+
+
+
+
+send_energy ( ) [source]
+Send the total energy through MDI
+
+Returns:
+energy – Energy of the system
+
+Return type:
+float
+
+
+
+
+
+
+send_forces ( ) [source]
+Send the nuclear forces through MDI
+
+Returns:
+forces – Forces on the nuclei
+
+Return type:
+np.ndarray
+
+
+
+
+
+
+send_masses ( ) [source]
+Send the nuclear masses through MDI
+
+Returns:
+masses – Atomic masses
+
+Return type:
+np.ndarray
+
+
+
+
+
+
+send_multiplicity ( ) [source]
+Send the electronic multiplicity through MDI
+
+Returns:
+multiplicity – Multiplicity of the system
+
+Return type:
+int
+
+
+
+
+
+
+send_natoms ( ) [source]
+Send the number of atoms through MDI
+
+Returns:
+natom – Number of atoms
+
+Return type:
+int
+
+
+
+
+
+
+send_node ( ) [source]
+Send the name of the current node through MDI
+
+Returns:
+node – Name of the current node
+
+Return type:
+str
+
+
+
+
+
+
+send_total_charge ( ) [source]
+Send the total system charge through MDI
+
+Returns:
+charge – Total charge of the system
+
+Return type:
+float
+
+
+
+
+
+
+start ( ) [source]
+Receive commands through MDI and respond to them as defined by the MDI Standard
+
+Return type:
+None
+
+
+
+
+
+
+stop ( ) [source]
+Stop listening for MDI commands
+
+Return type:
+None
+
+
+
+
+
+
+update_molecule ( key , value ) [source]
+Update the molecule
+
+Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.compute.html b/api/qcengine.compute.html
new file mode 100644
index 000000000..21fa10706
--- /dev/null
+++ b/api/qcengine.compute.html
@@ -0,0 +1,205 @@
+
+
+
+
+
+
+ compute — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+compute
+
+
+qcengine. compute ( input_data , program , raise_error = False , task_config = None , local_options = None , return_dict = False ) [source]
+Executes a single CMS program given a QCSchema input.
+
+The full specification can be found at: http://molssi-qc-schema.readthedocs.io/en/latest/index .html#
+
+
+
+Parameters:
+
+input_data (Union
[Dict
[str
, Any
], AtomicInput
] ) – A QCSchema input specification in dictionary or model from QCElemental.models
+program (str
) – The CMS program with which to execute the input.
+raise_error (bool
) – Determines if compute should raise an error or not.
+retries (int , optional ) – The number of random tries to retry for.
+task_config (Optional
[Dict
[str
, Any
]] ) – A dictionary of local configuration options corresponding to a TaskConfig object.
+local_options (Optional
[Dict
[str
, Any
]] ) – Deprecated parameter, renamed to task_config
+return_dict (bool
) – Returns a dict instead of qcelemental.models.AtomicResult
+
+
+Returns:
+AtomicResult, FailedOperation, or Dict representation of either object type
+A QCSchema representation of the requested output, type depends on return_dict key.
+
+Return type:
+result
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.compute_procedure.html b/api/qcengine.compute_procedure.html
new file mode 100644
index 000000000..c4d91a761
--- /dev/null
+++ b/api/qcengine.compute_procedure.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+ compute_procedure — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+compute_procedure
+
+
+qcengine. compute_procedure ( input_data , procedure , raise_error = False , task_config = None , local_options = None , return_dict = False ) [source]
+Runs a procedure (a collection of the quantum chemistry executions)
+
+Parameters:
+
+input_data (dict or qcelemental.models.OptimizationInput ) – A JSON input specific to the procedure executed in dictionary or model from QCElemental.models
+procedure ({"geometric" , "berny"} ) – The name of the procedure to run
+raise_error (bool , option ) – Determines if compute should raise an error or not.
+task_config (Optional
[Dict
[str
, str
]] ) – A dictionary of local configuration options corresponding to a TaskConfig object.
+local_options (Optional
[Dict
[str
, str
]] ) – Deprecated parameter, renamed to task_config
+return_dict (bool , optional , default True ) – Returns a dict instead of qcelemental.models.AtomicInput
+
+
+Returns:
+A QC Schema representation of the requested output, type depends on return_dict key.
+
+Return type:
+dict , OptimizationResult, FailedOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.config.NodeDescriptor.html b/api/qcengine.config.NodeDescriptor.html
new file mode 100644
index 000000000..5df9da280
--- /dev/null
+++ b/api/qcengine.config.NodeDescriptor.html
@@ -0,0 +1,319 @@
+
+
+
+
+
+
+ NodeDescriptor — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+NodeDescriptor
+
+
+pydantic model qcengine.config. NodeDescriptor [source]
+Description of an individual node
+
+Show JSON schema {
+ "title" : "NodeDescriptor" ,
+ "description" : "Description of an individual node" ,
+ "type" : "object" ,
+ "properties" : {
+ "hostname_pattern" : {
+ "title" : "Hostname Pattern" ,
+ "type" : "string"
+ },
+ "name" : {
+ "title" : "Name" ,
+ "type" : "string"
+ },
+ "scratch_directory" : {
+ "title" : "Scratch Directory" ,
+ "type" : "string"
+ },
+ "memory" : {
+ "title" : "Memory" ,
+ "type" : "number"
+ },
+ "memory_safety_factor" : {
+ "title" : "Memory Safety Factor" ,
+ "default" : 10 ,
+ "type" : "integer"
+ },
+ "ncores" : {
+ "title" : "Ncores" ,
+ "description" : "Number of cores accessible to each task on this node\n \n The default value, ``None``, will allow QCEngine to autodetect the number of cores." ,
+ "type" : "integer"
+ },
+ "jobs_per_node" : {
+ "title" : "Jobs Per Node" ,
+ "default" : 1 ,
+ "type" : "integer"
+ },
+ "retries" : {
+ "title" : "Retries" ,
+ "default" : 0 ,
+ "type" : "integer"
+ },
+ "is_batch_node" : {
+ "title" : "Is Batch Node" ,
+ "default" : false ,
+ "help" : "Whether the node running QCEngine is a batch node\n \n Some clusters are configured such that tasks are launched from a special \"batch\" or \"MOM\" onto the compute nodes.\n The compute nodes on such clusters often have a different CPU architecture than the batch nodes and \n often are unable to launch MPI tasks, which has two implications:\n 1) QCEngine must make *all* calls to an executable via ``mpirun`` because the executables might not\n be able to run on the batch node. \n 2) QCEngine must run on the batch node to be able to launch tasks on the more than one compute nodes \n \n ``is_batch_node`` is used when creating the task configuration as a means of determining whether\n ``mpiexec_command`` must always be used even for serial jobs (e.g., getting the version number)\n " ,
+ "type" : "boolean"
+ },
+ "mpiexec_command" : {
+ "title" : "Mpiexec Command" ,
+ "description" : "Invocation for launching node-parallel tasks with MPI\n \n The invocation need not specify the number of nodes, tasks, or cores per node.\n Information about the task configuration will be added to the command by use of\n Python's string formatting. The configuration will be supplied as the following variables:\n \n {nnodes} - Number of nodes\n {ranks_per_node} - Number of MPI ranks per node\n {cores_per_rank} - Number of cores to use for each MPI rank\n {total_ranks} - Total number of MPI ranks\n \n As examples, the ``aprun`` command on Cray systems should be similar to \n ``aprun -n {total_ranks} -N {ranks_per_node}`` and ``mpirun`` from OpenMPI should\n be similar to ``mpirun -np {total_ranks} -N {ranks_per_node}``.\n \n Programs where each MPI rank can use multiple threads (e.g., QC programs with MPI+OpenMP) can \n use the {cores_per_rank} option to control the hybrid parallelism. \n As an example, the Cray ``aprun`` command using this figure could be:\n ``aprun -n {total_ranks} -N {ranks_per_node} -d {cores_per_rank} -j 1``.\n The appropriate number of ranks per node will be determined based on the number of\n cores per node and the number of cores per rank.\n " ,
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "hostname_pattern" ,
+ "name"
+ ],
+ "additionalProperties" : false
+}
+
+
+
+Fields:
+
+
+
+
+
+field hostname_pattern : str
[Required]
+
+
+
+
+field is_batch_node : bool
= False
+
+
+
+
+field jobs_per_node : int
= 1
+
+
+
+
+field memory : Optional
[ float
] = None
+
+
+
+
+field memory_safety_factor : int
= 10
+
+
+
+
+field mpiexec_command : Optional
[ str
] = None
+Invocation for launching node-parallel tasks with MPI
+The invocation need not specify the number of nodes, tasks, or cores per node.
+Information about the task configuration will be added to the command by use of
+Python’s string formatting. The configuration will be supplied as the following variables:
+
+{nnodes} - Number of nodes
+{ranks_per_node} - Number of MPI ranks per node
+{cores_per_rank} - Number of cores to use for each MPI rank
+{total_ranks} - Total number of MPI ranks
+
+As examples, the aprun
command on Cray systems should be similar to
+aprun -n {total_ranks} -N {ranks_per_node}
and mpirun
from OpenMPI should
+be similar to mpirun -np {total_ranks} -N {ranks_per_node}
.
+Programs where each MPI rank can use multiple threads (e.g., QC programs with MPI+OpenMP) can
+use the {cores_per_rank} option to control the hybrid parallelism.
+As an example, the Cray aprun
command using this figure could be:
+aprun -n {total_ranks} -N {ranks_per_node} -d {cores_per_rank} -j 1
.
+The appropriate number of ranks per node will be determined based on the number of
+cores per node and the number of cores per rank.
+
+
+
+
+field name : str
[Required]
+
+
+
+
+field ncores : Optional
[ int
] = None
+Number of cores accessible to each task on this node
+The default value, None
, will allow QCEngine to autodetect the number of cores.
+
+
+
+
+field retries : int
= 0
+
+
+
+
+field scratch_directory : Optional
[ str
] = None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.config.get_config.html b/api/qcengine.config.get_config.html
new file mode 100644
index 000000000..112253616
--- /dev/null
+++ b/api/qcengine.config.get_config.html
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+ get_config — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_config
+
+
+qcengine.config. get_config ( * , hostname = None , task_config = None ) [source]
+Returns the configuration key for qcengine.
+
+Return type:
+TaskConfig
+
+Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.config.get_provenance_augments.html b/api/qcengine.config.get_provenance_augments.html
new file mode 100644
index 000000000..8ece655e9
--- /dev/null
+++ b/api/qcengine.config.get_provenance_augments.html
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+ get_provenance_augments — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_provenance_augments
+
+
+qcengine.config. get_provenance_augments ( ) [source]
+
+Return type:
+Dict
[str
, str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.config.global_repr.html b/api/qcengine.config.global_repr.html
new file mode 100644
index 000000000..655734c9c
--- /dev/null
+++ b/api/qcengine.config.global_repr.html
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+ global_repr — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+global_repr
+
+
+qcengine.config. global_repr ( ) [source]
+A representation of the current global configuration.
+
+Return type:
+str
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.get_config.html b/api/qcengine.get_config.html
new file mode 100644
index 000000000..10bf48f6d
--- /dev/null
+++ b/api/qcengine.get_config.html
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+ get_config — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_config
+
+
+qcengine. get_config ( * , hostname = None , task_config = None ) [source]
+Returns the configuration key for qcengine.
+
+Return type:
+TaskConfig
+
+Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.get_molecule.html b/api/qcengine.get_molecule.html
new file mode 100644
index 000000000..3e6f99e8b
--- /dev/null
+++ b/api/qcengine.get_molecule.html
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+ get_molecule — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_molecule
+
+
+qcengine. get_molecule ( name ) [source]
+Returns a QC JSON representation of a test molecule.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.get_procedure.html b/api/qcengine.get_procedure.html
new file mode 100644
index 000000000..81e11240c
--- /dev/null
+++ b/api/qcengine.get_procedure.html
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ get_procedure — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_procedure
+
+
+qcengine. get_procedure ( name ) [source]
+Returns a procedures executor class
+
+Return type:
+ProcedureHarness
+
+Parameters:
+name (str ) –
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.get_program.html b/api/qcengine.get_program.html
new file mode 100644
index 000000000..2bdcf9971
--- /dev/null
+++ b/api/qcengine.get_program.html
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+ get_program — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_program
+
+
+qcengine. get_program ( name , check = True ) [source]
+Returns a program’s executor class
+
+Parameters:
+
+
+Return type:
+ProgramHarness
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.list_all_procedures.html b/api/qcengine.list_all_procedures.html
new file mode 100644
index 000000000..42513a3b8
--- /dev/null
+++ b/api/qcengine.list_all_procedures.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+ list_all_procedures — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+list_all_procedures
+
+
+qcengine. list_all_procedures ( ) [source]
+List all procedures registered by QCEngine.
+
+Return type:
+Set
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.list_all_programs.html b/api/qcengine.list_all_programs.html
new file mode 100644
index 000000000..e2fc44d17
--- /dev/null
+++ b/api/qcengine.list_all_programs.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+ list_all_programs — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+list_all_programs
+
+
+qcengine. list_all_programs ( ) [source]
+List all programs registered by QCEngine.
+
+Return type:
+Set
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.list_available_procedures.html b/api/qcengine.list_available_procedures.html
new file mode 100644
index 000000000..e57177975
--- /dev/null
+++ b/api/qcengine.list_available_procedures.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+ list_available_procedures — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+list_available_procedures
+
+
+qcengine. list_available_procedures ( ) [source]
+List all procedures that can be exectued (found) by QCEngine.
+
+Return type:
+Set
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.list_available_programs.html b/api/qcengine.list_available_programs.html
new file mode 100644
index 000000000..97ad3e88e
--- /dev/null
+++ b/api/qcengine.list_available_programs.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+ list_available_programs — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+list_available_programs
+
+
+qcengine. list_available_programs ( ) [source]
+List all programs that can be exectued (found) by QCEngine.
+
+Return type:
+Set
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.programs.ProgramHarness.html b/api/qcengine.programs.ProgramHarness.html
new file mode 100644
index 000000000..5c61c4a79
--- /dev/null
+++ b/api/qcengine.programs.ProgramHarness.html
@@ -0,0 +1,383 @@
+
+
+
+
+
+
+ ProgramHarness — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+ProgramHarness
+
+
+pydantic model qcengine.programs. ProgramHarness [source]
+
+Show JSON schema {
+ "title" : "ProgramHarness" ,
+ "type" : "object" ,
+ "properties" : {
+ "name" : {
+ "title" : "Name" ,
+ "type" : "string"
+ },
+ "scratch" : {
+ "title" : "Scratch" ,
+ "type" : "boolean"
+ },
+ "thread_safe" : {
+ "title" : "Thread Safe" ,
+ "type" : "boolean"
+ },
+ "thread_parallel" : {
+ "title" : "Thread Parallel" ,
+ "type" : "boolean"
+ },
+ "node_parallel" : {
+ "title" : "Node Parallel" ,
+ "type" : "boolean"
+ },
+ "managed_memory" : {
+ "title" : "Managed Memory" ,
+ "type" : "boolean"
+ },
+ "extras" : {
+ "title" : "Extras" ,
+ "type" : "object"
+ }
+ },
+ "required" : [
+ "name" ,
+ "scratch" ,
+ "thread_safe" ,
+ "thread_parallel" ,
+ "node_parallel" ,
+ "managed_memory"
+ ]
+}
+
+
+
+Fields:
+
+
+
+
+
+
+
+
+
+field managed_memory : bool
[Required]
+
+
+
+
+field name : str
[Required]
+
+
+
+
+field node_parallel : bool
[Required]
+
+
+
+
+field scratch : bool
[Required]
+
+
+
+
+field thread_parallel : bool
[Required]
+
+
+
+
+field thread_safe : bool
[Required]
+
+
+
+
+build_input ( input_model , config , template = None ) [source]
+
+Return type:
+Dict
[str
, Any
]
+
+Parameters:
+
+
+
+
+
+
+
+abstract compute ( input_data , config ) [source]
+Top-level compute method to be implemented for every ProgramHarness
+:rtype: Union
[AtomicResult
, FailedOperation
]
+
+
Note
+
+This method behave in any of the following ways:
+Return AtomicResult upon successful completion of a calculation
+
+Return FailedOperation object if an operation was unsuccessful or raised an exception. This is most likely to occur if the underlying QC package has a QCSchema API that catches exceptions and
+returns them as FailedOperation objects to end users.
+
+
+
+
+Raise an exception if a computation failed. The raised exception will be handled by the qcng.compute() method and either raised or packaged as a FailedOperation object.
+
+
+
+
+
+
+
+
+Parameters:
+
+
+Return type:
+AtomicResult | FailedOperation
+
+
+
+
+
+
+execute ( inputs , extra_outfiles = None , extra_commands = None , scratch_name = None , timeout = None ) [source]
+
+Return type:
+Tuple
[bool
, Dict
[str
, Any
]]
+
+Parameters:
+
+inputs (Dict [ str , Any ] ) –
+extra_outfiles (List [ str ] | None ) –
+extra_commands (List [ str ] | None ) –
+scratch_name (str | None ) –
+timeout (int | None ) –
+
+
+
+
+
+
+
+abstract static found ( raise_error = False ) [source]
+Checks if the program can be found.
+
+Parameters:
+raise_error (bool , optional ) – If True, raises an error if the program cannot be found.
+
+Returns:
+Returns True if the program was found, False otherwise.
+
+Return type:
+bool
+
+
+
+
+
+
+get_version ( ) [source]
+Finds program, extracts version, returns normalized version string.
+
+Returns:
+Return a valid, safe python version string.
+
+Return type:
+str
+
+
+
+
+
+
+parse_output ( outfiles , input_model ) [source]
+
+Return type:
+AtomicResult
+
+Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.programs.get_program.html b/api/qcengine.programs.get_program.html
new file mode 100644
index 000000000..0a56df2e2
--- /dev/null
+++ b/api/qcengine.programs.get_program.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+ get_program — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+get_program
+
+
+qcengine.programs. get_program ( name , check = True ) [source]
+Returns a program’s executor class
+
+Parameters:
+
+
+Return type:
+ProgramHarness
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.programs.list_all_programs.html b/api/qcengine.programs.list_all_programs.html
new file mode 100644
index 000000000..ae1fb8d08
--- /dev/null
+++ b/api/qcengine.programs.list_all_programs.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+ list_all_programs — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+list_all_programs
+
+
+qcengine.programs. list_all_programs ( ) [source]
+List all programs registered by QCEngine.
+
+Return type:
+Set
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.programs.list_available_programs.html b/api/qcengine.programs.list_available_programs.html
new file mode 100644
index 000000000..ba0c7e4c8
--- /dev/null
+++ b/api/qcengine.programs.list_available_programs.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+ list_available_programs — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+list_available_programs
+
+
+qcengine.programs. list_available_programs ( ) [source]
+List all programs that can be exectued (found) by QCEngine.
+
+Return type:
+Set
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.programs.register_program.html b/api/qcengine.programs.register_program.html
new file mode 100644
index 000000000..db7b834af
--- /dev/null
+++ b/api/qcengine.programs.register_program.html
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+ register_program — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+register_program
+
+
+qcengine.programs. register_program ( entry_point ) [source]
+Register a new ProgramHarness with QCEngine.
+
+Return type:
+None
+
+Parameters:
+entry_point (ProgramHarness ) –
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.programs.unregister_program.html b/api/qcengine.programs.unregister_program.html
new file mode 100644
index 000000000..0855b5922
--- /dev/null
+++ b/api/qcengine.programs.unregister_program.html
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+ unregister_program — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+unregister_program
+
+
+qcengine.programs. unregister_program ( name ) [source]
+Unregisters a given program.
+
+Return type:
+None
+
+Parameters:
+name (str ) –
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.register_program.html b/api/qcengine.register_program.html
new file mode 100644
index 000000000..102fa4525
--- /dev/null
+++ b/api/qcengine.register_program.html
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ register_program — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+register_program
+
+
+qcengine. register_program ( entry_point ) [source]
+Register a new ProgramHarness with QCEngine.
+
+Return type:
+None
+
+Parameters:
+entry_point (ProgramHarness ) –
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.unregister_program.html b/api/qcengine.unregister_program.html
new file mode 100644
index 000000000..50d963284
--- /dev/null
+++ b/api/qcengine.unregister_program.html
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ unregister_program — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+unregister_program
+
+
+qcengine. unregister_program ( name ) [source]
+Unregisters a given program.
+
+Return type:
+None
+
+Parameters:
+name (str ) –
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.util.compute_wrapper.html b/api/qcengine.util.compute_wrapper.html
new file mode 100644
index 000000000..fe55e6dd1
--- /dev/null
+++ b/api/qcengine.util.compute_wrapper.html
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+ compute_wrapper — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+compute_wrapper
+
+
+qcengine.util. compute_wrapper ( capture_output = True , raise_error = False ) [source]
+Wraps compute for timing, output capturing, and raise protection
+
+Return type:
+Dict
[str
, Any
]
+
+Parameters:
+
+capture_output (bool ) –
+raise_error (bool ) –
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.util.create_mpi_invocation.html b/api/qcengine.util.create_mpi_invocation.html
new file mode 100644
index 000000000..469505e12
--- /dev/null
+++ b/api/qcengine.util.create_mpi_invocation.html
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+ create_mpi_invocation — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+create_mpi_invocation
+
+
+qcengine.util. create_mpi_invocation ( executable , task_config ) [source]
+Create the launch command for an MPI-parallel task
+
+Parameters:
+
+executable (str ) – Path to executable
+task_config (TaskConfig ) – Specification for number of nodes, cores per node, etc.
+
+
+Return type:
+List
[str
]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.util.execute.html b/api/qcengine.util.execute.html
new file mode 100644
index 000000000..9ec65340c
--- /dev/null
+++ b/api/qcengine.util.execute.html
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+ execute — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+execute
+
+
+qcengine.util. execute ( command , infiles = None , outfiles = None , * , as_binary = None , scratch_name = None , scratch_directory = None , scratch_suffix = None , scratch_messy = False , scratch_exist_ok = False , blocking_files = None , timeout = None , interupt_after = None , environment = None , shell = False , exit_code = 0 ) [source]
+Runs a process in the background until complete.
+Returns True if exit code <= exit_code (default 0)
+
+Parameters:
+
+command (list of str ) –
+infiles (Dict [ str ] = str ) – Input file names (names, not full paths) and contents.
+to be written in scratch dir. May be {}.
+outfiles (List [ str ] = None ) – Output file names to be collected after execution into
+values. May be {}.
+as_binary (List [ str ] = None ) – Keys of infiles or outfiles to be treated as bytes.
+scratch_name (str , optional ) – Passed to temporary_directory
+scratch_directory (str , optional ) – Passed to temporary_directory
+scratch_suffix (str , optional ) – Passed to temporary_directory
+scratch_messy (bool , optional ) – Passed to temporary_directory
+scratch_exist_ok (bool , optional ) – Passed to temporary_directory
+blocking_files (list , optional ) – Files which should stop execution if present beforehand.
+timeout (int , optional ) – Stop the process after n seconds.
+interupt_after (int , optional ) – Interupt the process (not hard kill) after n seconds.
+environment (dict , optional ) – The environment to run in
+shell (bool , optional ) – Run command through the shell.
+exit_code (int , optional ) – The exit code above which the process is considered failure.
+
+
+Raises:
+FileExistsError – If any file in blocking is present
+
+Return type:
+Tuple
[bool
, Dict
[str
, Any
]]
+
+
+Examples
+# execute multiple commands in same dir
+>>> success, dexe = qcng.util.execute([‘command_1’], infiles, [], scratch_messy=True)
+>>> success, dexe = qcng.util.execute([‘command_2’], {}, outfiles, scratch_messy=False, scratch_name=Path(dexe[‘scratch_directory’]).name, scratch_exist_ok=True)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.util.handle_output_metadata.html b/api/qcengine.util.handle_output_metadata.html
new file mode 100644
index 000000000..92d9e177e
--- /dev/null
+++ b/api/qcengine.util.handle_output_metadata.html
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+ handle_output_metadata — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/qcengine.util.model_wrapper.html b/api/qcengine.util.model_wrapper.html
new file mode 100644
index 000000000..63e80f873
--- /dev/null
+++ b/api/qcengine.util.model_wrapper.html
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+ model_wrapper — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+model_wrapper
+
+
+qcengine.util. model_wrapper ( input_data , model ) [source]
+Wrap input data in the given model, or return a controlled error
+
+Return type:
+BaseModel
+
+Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/changelog.html b/changelog.html
new file mode 100644
index 000000000..318685315
--- /dev/null
+++ b/changelog.html
@@ -0,0 +1,1269 @@
+
+
+
+
+
+
+ Changelog — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Changelog
+
+v0.30.0 / 2024-06-25
+
+
+
+
+v0.29.0 / 2023-10-31
+
+Bug Fixes
+
+(GH#427 ) Config - Once again, expand environment variables (now more flexibly) and newly expand ~
+passed into TaskConfig. Particularly relevant for scratch setting. @yueyericardo
+(GH#428 ) MDI - Ensure that molecule orientation remains fixed for MDI. @taylor-a-barnes
+(GH#405 , GH#415 , GH#417 ) Config - change default jobs_per_node
from 2 to more expected 1
+so a single job fills the node. Alter CPU count formula to return physical cores on Hyperthreading
+machines, affecting default ncores
. The net effect (both changes) for default cores running on
+Hyperthreading machines is unchanged. Nevertheless, fixes some Windows problems. @cvsik, @loriab
+(GH#433 ) Turbomole, Q-Chem - Use raw strings when needed to avoid py312 warnings. @loriab
+(GH#435 ) GAMESS - Collect the correct MP2 module in parsing for newer versions (>2021,<=2023). @loriab
+
+
+
+
+
+v0.28.1 / 2023-08-18
+
+
+
+v0.28.0 / 2023-08-15
+
+
+New Features
+
+(GH#400 ) Config - task configuration can now be set via CLI (qcengine run -h for details) or
+by environment variables beginning with QCENGINE_ . @bennybp
+(GH#393 , GH#392 ) MCTC-GCP - Adds b973c and r2scan3c methods to the gcp (mctc only, not classic) harness. @hokru
+(GH#393 ) DFTD4 - Allows ga, gc, wf parameters to be tweaked (needed for r2scan-3c). This feature requires dftd4 3.5.0. @hokru
+
+
+
+Enhancements
+
+(GH#410 , GH#408 ) TorsionDrive - silence warnings by using the task_config
argument internally. @jthorton
+(GH#409 ) Psi4 - improve no-valid-error message so classifies as a RandomError and is eligible for
+restart. @jthorton
+(GH#405 ) Turbomole - correctly enable OpenMP and environment passing. Pass SCF convergence and
+maximum iterations to define. @cvsik
+(GH#403 , GH#402 ) PyBerny - fix optimizer to respect the task_config options. @q-posev
+(GH#386 ) CI - turn on formerly LGTM now GitHub CodeQL analysis. @lgtm-migrator
+(GH#388 ) MRChem - more detailed info about the parallel setup saved to output provenance. @robertodr
+(GH#424 ) testing - update SVWN Hessian reference values from Psi4. @loriab
+(GH#423 , GH#377 ) NWChem - allow two answers for test test_atom_labels[nwchem]
to accommodate SCF
+solutions in different versions. @loriab
+
+
+
+Bug Fixes
+
+(GH#401 ) MDI - fix bug in the shape of the MDI forces structure. @taylor-a-barnes
+(GH#399 , GH#401 ) MPI - remove MPI setup for MDI. This eliminates a bug where interfering
+MPI environment variables were getting set upon import qcengine
when pymdi and mpi4py packages
+were present. @awvwgk, @taylor-a-barnes
+(GH#418 , GH#389 , GH#292 ) Psi4 - make Psi4 exe/module detection and version parsing more robust. @Flamefire, @coltonbh, @loriab
+
+
+
+
+
+v0.27.0 / 2023-08-02
+
+Bug Fixes
+
+(GH#414 ) Import pydantic.v1 from pydantic v2 so that QCEngine can work with any >=1.8.2 pydantic
+until QCEngine is updated for v2. If using v2, use QCElemental >=v0.26.0 that has a similar change.
+QCEngineRecords received similar treatment. @Lnaden, @loriab
+(GH#414 ) Versioneer - update so works with Python 3.12.
+
+(GH#414 ) Maintenance
+Sphinx - fix build errors.
+Lint - pin black to 2022 format.
+GHA - switch to mamba solver. @loriab
+
+
+
+
+(GH#394 ) Entos/Qcore - updated model environments. @loriab
+
+
+
+
+v0.26.0 / 2022-11-30
+
+Breaking Changes
+
+(GH#385 ) Dispersion - the dispersion parameters resources file has been altered so that for D3 variants there’s a
+2b set (e.g., d3bj2b) that is pure 2-body and doesn’t accept s9 (effectively fixed at 0.0) and a atm set (e.g.,
+d3zeroatm) that does accept s9 (by default 1.0 but user-variable). Previous D3 levels are aliased to 2b. Only
+downstreams that call the dispersion resources directly should be affected, and retrofits are in place for the known
+victim/instigator (Psi4). @loriab
+
+
+
+
+Enhancements
+
+(GH#380 ) MRChem - added gradient and thus geometry optimizations support. @robertodr
+(GH#385 ) dftd3 - the classic interface now accepts e.g., d3mbj2b
as a level hint. @loriab
+(GH#385 ) s-dftd3 - added keyword apply_qcengine_aliases
that when True and level_hint
present allows the
+levels and aliases in the dispersion resources (e.g., d3
, d3atm
, d32b
) to be given as level_hint
. The
+resource parameters are passed to s-dftd3 as param_tweaks. @loriab
+
+
+
+Bug Fixes
+
+(GH#383 ) yaml - uses safe loading. @mbanck, @loriab
+(GH#385 ) dftd3 - the pairwise analysis requested through AtomicInput.keywords["pair_resolved"] = True
and
+returned in AtomicResult.extras["qcvars"]["2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"]
was elementwise too
+large by a factor of 2. It now matches the s-dftd3
harness and fulfills that the sum of the array equals the
+2-body dispersion energy. @loriab
+
+
+
+
+v0.25.0 / 2022-11-11
+
+Breaking Changes
+
+(GH#376 ) GAMESS - slight breaking changes of (1) ROHF MP2 ZAPT quantities now stored in “ZAPT” variables, not “MP2”
+variables; and (2) “HF TOTAL ENERGY” no longer stores DFT energy in DFT computation. @loriab
+(GH#376 ) testing - reference quantities now indexed by “standard” or “semicanonical” orbitals since program defaults
+differ (mostly in CCSD ROHF FC). Downstream projects using the stdsuite interface will need to add an extra argument to query
+reference data. @loriab
+
+
+
+
+Enhancements
+
+(GH#376 ) Cfour - added parsing for BCCD and BCCD(T) methods. @loriab
+(GH#376 ) NWChem - B2PLYP double-hybrid can now be run and parsed. Added CC2 parsing. @loriab
+(GH#376 ) testing - added parsing contracts for ZAPT2, CEPA(1), CEPA(3), ACPF, AQCC, BCCD, BCCD(T), CC2, CC3, and DH-DFT. Added conventional references for most. @loriab
+(GH#378 ) OpenFF - Support OpenFF Toolkit v0.11+. @Yoshanuikabundi
+
+
+
+
+
+v0.24.1 / 2022-08-16
+
+Enhancements
+
+(GH#375 ) testing - in standard suite, add reference values for occ, a-ccsd(t), olccd grad, remp2, omp2, omp2.5, omp3, oremp2, density fitted ccsd, ccsd(t), a-ccsd(t). @loriab
+
+
+
+
+v0.24.0 / 2022-07-08
+
+Upcoming Breaking Changes
+
+(GH#372 ) QCSchema - changes are planned to schema layout and QCEngine API that will be outlined in an issue. These are not expected to involve detailed changes to the harnesses, and update helper functions will be provided. In preparation, QCEngine is pinned to a maximum compatible QCElemental v0.25.0 (current release). Projects using QCSchema through QCElemental are advised to pin to maximum v0.25.0 qcel and v0.24.0 to avert trouble, since this is our first experience with schema increments. @loriab
+
+
+
+New Features
+
+(GH#343 ) DFT-D3 - added the SDFTD3Harness
to handle DFT-D3 via a Python API. This has native QCSchema support and programmatic access to the parameter database. @awvwgk
+(GH#353 ) TeraChem - added the TeraChemFrontEndHarness
to handle file I/O in extension to the protocol buffer TeraChemPBSHarness
interface. @coltonbh
+
+
+
+Enhancements
+
+(GH#350 ) Rename the compute(..., local_options)
argument to compute(..., task_config)
. Former still works and will for a while. @coltonbh
+(GH#361 ) testing - in standard suite, add references for Hartree–Fock density-fitten Hessians. @loriab
+(GH#362 ) docs - update setup with theme and fuller information on Pydantic models. @loriab
+(GH#363 ) CFOUR - learned not to set DERIV_LEVEL
when atomicinput.driver=properties
. Helps properties like DBOC. @loriab
+(GH#363 ) Allow directory structure in execute(..., infiles)
argument, not just flat-level files. @loriab
+(GH#364 ) CFOUR - learned to harvest gradients when ghost atoms involved. Any CFOUR job with ghost atoms involves a hack that may go amiss when Xenon atoms in target molecule. @loriab
+(GH#364 ) NWChem - learned to handle keyword geometry__autosym
to tighten or loosen automatic symmetry detection. @loriab
+(GH#372 ) testing - 2022 OpenMopac now actively tested in GHA. Note fields and output slightly different since 2019 harness. @awvwgk, @loriab
+
+
+
+Bug Fixes
+
+(GH#301 , GH#367 ) PyBerny - learned how to fail informatively when something goes wrong instead of assuming all is well and failing misleadingly while processing success. @coltonbh
+(GH#333 ) NWChem - learned to skip writing the original atomicinput.molecule
geometry to the input file only when both (1) the job is known to be part of a restart and (2) the job originates from the NWChem “driver” (that is, the optimizer). Previously, the geometry writing was skipped under (1) circumstances, so single-point e/g/h didn’t have a geometry to work from. @WardLT
+(GH#349 ) Turbomole - learned to correctly parse Hessian files when molecule contains more than 33 atoms. @eljost
+
+
+
+
+
+v0.23.0 / 2022-03-10
+
+
+
+v0.22.0 / 2022-01-25
+
+Bug Fixes
+
+(GH#338 ) Correctly export version to tarballs created by git-archive. @mbanck, @loriab
+(GH#339 ) QCEngine now tolerant of cpuinfo failure to populate brand_raw , brand . @dotsdl, @loriab, @WardLT
+
+
+
+
+v0.21.0 / 2021-11-22
+
+Enhancements
+
+(GH#321 ) CFOUR, GAMESS, NWChem, Psi4, DFTD3, MP2D, gCP - learned to return certain native text
+files under control of the native_files
protocol. GAMESS users are strongly advised to at
+least set protocols.native_files = "input"
so that the job is reproducible. @loriab
+(GH#325 ) Torsiondrive - learned to use multiple molecules as input to torsiondrives. @jthorton
+(GH#327 ) TorchANI - learned to use GPUs if available. @kexul
+(GH#330 , GH#332 ) NWChem - learned to restart from existing scratch if QCEngine is killed. @WardLT
+
+
+
+
+v0.20.1 / 2021-10-08
+
+
+
+v0.20.0 / 2021-10-01
+
+
+Enhancements
+
+(GH#307 ) NWChem - learns to automatically increase the number of iterations when SCF, CC, etc.
+fails to converge. @WardLT
+(GH#309 ) qcengine info
learned to print the location of found CMS programs, and geometric,
+OpenMM, and RDKit learned to return their versions. @loriab
+(GH#311 ) CFOUR, GAMESS, NWChem harnesses learned to notice which internal module performs a calc
+(e.g., tce/cc for NWChem) and to store it in AtomicResult.provenance.module
. Psi4 already does
+this. @loriab
+(GH#312 ) CFOUR, GAMESS, NWChem harnesses learned to run and harvest several new methods in the
+MP, CC, CI, DFT families. @loriab
+(GH#316 ) Config - TaskConfig
learned a new field scratch_messy
to instruct a
+qcng.compute()
run to not clean up the scratch directory at the end. @loriab
+(GH#316 ) GAMESS - harness learned to obey ncores and scratch_messy local_config options. When
+ncores > 1
, the memory option is partitioned into replicated and non after exetyp=check trials. @loriab
+(GH#316 ) Psi4 - harness learned to obey scratch_messy and memory local_config options. Memory
+was previously off by a little (GB vs GiB). @loriab
+(GH#316 ) CFOUR - harness learned to obey scratch_messy and memory local_config options. Memory
+was previously off by a little. @loriab
+(GH#316 ) NWChem - harness learned to obey scratch_messy and memory local_config options. Memory
+was previously very off for v7. @loriab
+(GH#315 ) CFOUR, GAMESS, NWChem – learned to return in AtomicInput or program native orientation
+depending on fix_com & fix_orientation= T or F. Psi4 already did this. Previously these three
+always returned AtomicInput orientation. Note that when returning program native orientation, the
+molecule is overwritten, so AtomicResult is not a superset of AtomicInput. @loriab
+(GH#315 ) CFOUR, GAMESS, NWChem – learned to harvest gradients and Hessians. @loriab
+(GH#317 ) Docs - start “new harness” docs, so contributors have a coarse roadmap. @loriab
+(GH#318 ) Docs - documentation is now served from https://molssi.github.io/QCEngine/ and built
+by https://github.com/MolSSI/QCEngine/blob/master/.github/workflows/CI.yml .
+https://qcengine.readthedocs.io/en/latest/ will soon be retired. @loriab
+(GH#320 ) CFOUR, NWChem – learned to run with ghost atoms, tentatively. @loriab
+
+
+
+
+
+v0.19.0 / 2021-05-16
+
+New Features
+
+(GH#290 ) MCTC-GCP - harness for new implementation of gCP, mctc-gcp , whose cmdline interface is drop-in replacement. @loriab
+(GH#291 ) DFTD4 - new harness for standalone DFT-D4 executable. @awvwgk
+(GH#289 ) TeraChem - new harness for TeraChem Protocol Buffer Server mode. @coltonbh
+
+
+
+
+Bug Fixes
+
+(GH#288 ) Avert running model.basis = BasisSet schema even though they validate. @loriab
+(GH#294 ) NWChem - fixed bug where was retrieving only the first step in a geometry relaxation with line-search off. @WardLT
+(GH#297 ) MDI - Update interface for v1.2. @loriab
+
+
+
+
+v0.18.0 / 2021-02-16
+
+New Features
+
+(GH#206 ) OptKing - new procedure harness for OptKing optimizer. @AlexHeide
+(GH#269 ) MRChem - new multiresolution chemistry program harness. @robertodr
+(GH#277 ) ADCC - new program harness for ADC-connect. (Requires Psi4 for SCF.) @maxscheurer
+(GH#278 ) gCP - new program harness for geometric counterpoise. @hokru
+(GH#280 ) Add framework to register identifying known outfile errors, modify input schema, and rerun. @WardLT
+(GH#281 ) NWChem - new procedure harness to use NWChem’s DRIVER geometry optimizer with NWChem’s program harness gradients. @WardLT
+(GH#282 ) DFTD3 - added D3m and D3m(bj) parameters for SAPT0/HF. Allow pairwise analysis to be returned. @jeffschriber
+
+
+
+Enhancements
+
+(GH#274 ) Entos/Qcore - renamed harness and updated to new Python bindings. @dgasmith
+(GH#283 ) OpenMM - transition harness from openforcefield packages on omnia channel to openff.toolkit packages on conda-forge channel. @SimonBoothroyd
+(GH#286 , GH#287 ) CI - moves from Travis-CI to GHA for open-source testing. @loriab
+
+
+
+
+
+v0.17.0 / 2020-10-02
+
+
+
+Bug Fixes
+
+(GH#264 ) Turbomole - fix output properties handling. @eljost
+(GH#265 ) xtb - ensure extra tags are preserved in XTB harness. @WardLT
+(GH#270 ) TorchANI - now lazily loads models as requested for compute. @dotsdl
+
+
+
+
+v0.16.0 / 2020-08-19
+
+
+Enhancements
+
+(GH#241 ) NWChem - improved performance by turning on atoms_map=True
, which does seem to be true. @WardLT
+(GH#257 ) TorchANI - learned the ANI2x model and to work with v2. @farhadrgh
+(GH#259 ) Added MP2.5 & MP3 energies and HF, MP2.5, MP3, LCCD gradients reference data to stdsuite. @loriab
+(GH#261 ) Q-Chem - learned to return more informative Provenance, learned to work with v5.1. @loriab
+(GH#263 ) NWChem - learned how to turn off automatic Z-Matrix coordinates with geometry__noautoz = True
. @WardLT
+
+
+
+Bug Fixes
+
+(GH#261 ) Molpro - learned to error cleanly if version too old for XML parsing. @loriab
+(GH#261 ) Q-Chem - learned to extract version from output file instead of qchem -h
since command isn’t available
+from a source install. @loriab
+
+
+
+
+v0.15.0 / 2020-06-26
+
+New Features
+
+(GH#232 ) PyBerny - new geometry optimizer procedure harness. @jhrmnn
+(GH#238 ) Set up testing infrastructure, “stdsuite”, where method reference values and expected results names (e.g.,
+total energy and correlation energy from MP2) are stored here in QCEngine but may be used from anywhere (presently,
+Psi4). Earlier MP2 and CCSD tests here converted to new scheme, removing test_standard_suite_mp2.py
and ccsd
.
+(GH#249 , GH#254 ) XTB - new harness for xtb-python that natively speaks QCSchema. @awvwgk
+
+
+
+Enhancements
+
+(GH#230 ) NWChem - improved dipole, HOMO, LUMO harvesting.
+(GH#233 ) qcng.util.execute
learned argument exit_code
above which to fail, rather than just != 0
.
+(GH#234 ) MDI - harness updated to support release verion v1.0.0 .
+(GH#238 ) Cfour, GAMESS, NWChem – harnesses updated to collect available spin components for MP2 and CCSD.
+Also updated to set appropriate qcel.models.AtomicProperties
from collected QCVariables.
+(GH#239 ) OpenMM - OpenMM harness now looks for cmiles information in the
+molecule extras field when typing. Also we allow for the use of gaff
+forcefields. @jthorton
+(GH#243 ) NWChem - more useful stdout error return.
+(GH#244 ) Added CCSD(T), LCCD, and LCCSD reference data to stdsuite. @loriab
+(GH#246 ) TorchANI - harness does not support v2 releases.
+(GH#251 ) DFTD3 - added D3(0) and D3(BJ) parameters for PBE0-DH functional.
+
+
+
+
+
+v0.14.0 / 2020-02-06
+
+New Features
+
+(GH#212 ) NWChem - Adds CI for the NWChem harness.
+(GH#226 ) OpenMM - Moves the OpenMM harness to a canonical forcefield based method/basis language combination.
+(GH#228 ) RDKit - Adds MMFF94 force field capabilities.
+
+
+
+Enhancements
+
+(GH#201 ) Psi4 - psi4 --version
collection to only grab the last line.
+(GH#202 ) Entos - Adds wavefunction parsing.
+(GH#203 ) NWChem - Parses DFT empirical dispersion energy.
+(GH#204 ) NWChem - Allows custom DFT functionals to be run.
+(GH#205 ) NWChem - Improved gradient output and added Hessian support for NWChem.
+(GH#215 ) Psi4 - if Psi4 location can be found by either PATH or PYTHONPATH, harness sets up both subprocesses and API execution.
+(GH#215 ) get_program
shows the helpful “install this” messages from found()
rather than just saying “cannot be found”.
+
+
+
+Bug Fixes
+
+(GH#199 ) Fix typo breaking NWChem property parsing.
+(GH#215 ) NWChem complains before a calculation if the necessary networkx
package not available.
+(GH#207 ) NWChem - Minor bug fixes for NWChem when more than core per MPI rank is used.
+(GH#209 ) NWChem - Fixed missing extras tags in NWChem harness.
+
+
+
+
+v0.13.0 / 2019-12-10
+
+
+Enhancements
+
+(GH#175 ) Allows specifications for nnodes
to begin MPI support.
+(GH#177 ) NWChem - Parsing updates including Hessian abilities.
+(GH#180 ) GAMESS - Output properties improvements.
+(GH#181 ) NWChem - Output properties improvements.
+(GH#183 ) Entos - Hessian and XTB support.
+(GH#185 ) Entos - Improved subcommand support.
+(GH#187 ) QChem - Support for raw log files without the binary file requirements and improved output properties support.
+(GH#188 ) Automatic buffer reads to prevent deadlocking of process for very large outputs.
+(GH#194 ) DFTD3 - Improved error message on failed evaluations.
+(GH#195 ) Blackens the code base add GHA-based lint checks.
+
+
+
+
+
+v0.12.0 / 2019-11-13
+
+New Features
+
+(GH#159 ) Adds MolSSI Driver Interface support.
+(GH#160 ) Adds Turbomole support.
+(GH#164 ) Adds Q-Chem support.
+
+
+
+Enhancements
+
+(GH#155 ) Support for Psi4 Wavefunctions using v1.4a2 or greater.
+(GH#162 ) Adds test for geometry optimization with trajectory protocol truncation.
+(GH#167 ) CFOUR and NWChem parsing improvements for CCSD(T) properties.
+(GH#168 ) Standardizes on dispatch.out
for the common output files.
+(GH#170 ) Increases coverage and begins a common documentation page.
+(GH#171 ) Add Molpro to the standard suite.
+(GH#172 ) Models renamed according to https://github.com/MolSSI/QCElemental/issues/155 , particularly ResultInput
-> AtomicInput
, Result
-> AtomicResult
, Optimization
-> OptimizationResult
.
+
+
+
+
+
+v0.11.0 / 2019-10-01
+
+New Features
+
+(GH#162 ) Adds a test to take advantage of Elemental’s Protocols .
+Although this PR does not technically change anything in Engine, bumping the minor version here allows
+upstream programs to note when this feature was available because the minimum version dependency on Elemental
+has been bumped as well.
+
+
+
+Enhancements
+
+(GH#143 ) Updates to Entos and Molpro to allow Entos to execute functions from the Molpro Harness. Also helps
+the two drivers to conform to GH#86 .
+(GH#145 , GH#148 ) Initial CLI tests have been added to help further ensure Engine is running proper.
+(GH#149 ) The GAMESS Harness has been improved by adding testing.
+(GH#150 , GH#153 ) TorchANI has been improved by adding a Hessian driver to it and additional information
+is returned in the extra
field when energy
is the driver.
+This also bumped the minimum version of TorchANI Engine supports from 0.5 to 0.9.
+(GH#154 ) Molpro’s harness has been improved to support callinfo_X
properties, unrestricted HF and DFT
+calculations, and the initial support for parsing local correlation calculations.
+(GH#158 ) Entos’ output parsing has been improved to read the json dictionary produced by the program
+directly. Also updates the input file generation.
+(GH#161 ) Updates MOPAC to have more sensible quantum-chemistry like keywords by default.
+
+
+
+
+
+v0.10.0 / 2019-08-25
+
+New Features
+
+(GH#132 ) Expands CLI for info
, run
, and run-procedure
options.
+(GH#137 ) A new CI pipeline through Azure has been developed which uses custom, private Docker images
+to house non-public code which will enable us to test Engine through integrated CI on these codes securely.
+(GH#140 ) GAMESS, CFOUR, NWChem preliminary implementations.
+
+
+
+
+
+v0.9.0 / 2019-08-14
+
+New Features
+
+(GH#120 ) Engine now takes advantage of Elemental’s new Msgpack serialization option for Models. Serialization
+defaults to msgpack when available (conda install msgpack-python [-c conda-forge]
), falling back to JSON
+otherwise. This results in substantial speedups for both serialization and deserialization actions and should be a
+transparent replacement for users within Engine and Elemental themselves.
+
+
+
+Enhancements
+
+(GH#112 ) The MolproHarness
has been updated to handle DFT and CCSD(T) energies and gradients.
+(GH#116 ) An environment context manager has been added to catch NumPy style parallelization with Python functions.
+(GH#117 ) MOPAC and DFTD3 can now accept an extras
field which can pass around additional
+data, conforming to the rest of the Harnesses.
+(GH#119 ) Small visual improvements to the docs have been made.
+(GH#120 ) Lists inside models are now generally converted to numpy arrays for internal storage to maximize the
+benefit of the new Msgpack feature from Elemental.
+(GH#133 ) The GAMESS Harness now collects the CCSD as part of its output.
+
+
+
+Bug Fixes
+
+(GH#127 ) Removed unused imports from the NWChem Harvester module.
+(GH#129 ) Missing type hints from the MolproHarness
have been added.
+(GH#131 ) A code formatting redundancy in the GAMESS input file parser has been removed.
+
+
+
+
+
+v0.8.1 / 2019-07-22
+
+
+
+
+v0.8.0 / 2019-07-19
+
+New Features
+
+(GH#95 , GH#96 , GH#97 , and GH#98 ) The NWChem interface from QCDB has been added.
+Thanks to @vivacebelles and @jygrace for this addition!
+(GH#100 ) The MOPAC interface has now been added to QCEngine thanks help to from @godotalgorithm.
+
+
+
+Enhancements
+
+(GH#94 ) The gradient and molecule parsed from a GAMESS calculation output file are now returned in parse_output
+(GH#101 ) Enabled extra files in TeraChem scratch folder to be requested by users, collected after program
+execution, and recorded in the Result
object as extras.
+(GH#103 ) Random errors can now be retried a finite, controllable number of times (current default is zero retries).
+Geometry optimizations automatically set retries to 2. This only impacts errors which are categorized as
+RandomError
by QCEngine and all other errors are raised as normal.
+
+
+
+Bug Fixes
+
+(GH#99 ) QCEngine now manages an explicit folder for each Psi4 job to write into and passes the scratch directory
+via -s
command line. This resolves a key mismatch which could cause an error.
+(GH#102 ) DFTD3 errors are now correctly returned as a FailedOperation
instead of a raw dict
.
+
+
+
+
+
+v0.7.0 / 2019-06-17
+
+Breaking Changes
+
+(GH#85 ) The resource file programs.dftd3.dashparam.py
has relocated and renamed to
+programs.empirical_dispersion_resources.py
.
+(GH#89 ) Function util.execute
forgot str argument scratch_location
and learned scratch_directory
in
+the same role of existing directory within which temporary directories are created and cleaned up. Non-user-facing
+function util.scratch_directory
renamed to util.temporary_directory
.
+
+
+
+New Features
+
+(GH#60 ) WIP: QCEngine interface to GAMESS can run the program (after light editing of rungms)
+and parse selected output (HF, CC, FCI) into QCSchema.
+(GH#73 ) WIP: QCEngine interface to CFOUR can run the program and parse a variety of output into QCSchema.
+(GH#59 , GH#71 , GH#75 , GH#76 , GH#78 , GH#88 ) Molpro improvements: Molpro can be run by QCEngine; and
+the input generator and output parser now supports CCSD energy and gradient calculations. Large thanks to
+@sjrl for many of the improvements
+(GH#69 ) Custom Exceptions have been added to QCEngine’s returns which will make parsing and
+diagnosing them easier and more programmatic for codes which invoke QCEngine. Thanks to @dgasmith for implementation.
+(GH#82 ) QCEngine interface to entos can create input files (dft energy and gradients), run the program,
+and parse the output.
+(GH#85 ) MP2D interface switched to upstream repo (https://github.com/Chandemonium/MP2D v1.1) and now produces
+correct analytic gradients.
+
+
+
+Enhancements
+
+(GH#62 , GH#67 , GH#83 ) A large block of TeraChem improvements thanks to @ffangliu contributions.
+Changed the input parser to call qcelemental to_string method with bohr unit, improved output of parser to turn stdout
+into Result, and modified how version is parsed.
+(GH#63 ) QCEngine functions util.which
, util.which_version
, util.parse_version
, and
+util.safe_version
removed after migrating to QCElemental.
+(GH#65 ) Torchani can now handle the ANI1-x and ANI1-ccx models. Credit to @dgasmith for implementation
+(GH#74 ) Removes caching and reduces pytorch overhead from Travis CI. Credit to @dgasmith for implementation
+(GH#77 ) Rename ProgramExecutor
to ProgramHarness
and BaseProcedure
to ProcedureHarness
.
+(GH#77 ) Function util.execute(..., outfiles=[])
learned to collect output files matching a globbed filename.
+(GH#81 ) Function util.execute
learned list argument as_binary
to handle input or output
+files as binary rather than string.
+(GH#81 ) Function util.execute
learned bool argument scratch_exist_ok
to run in a preexisting directory.
+This is handy for stringing together execute calls.
+(GH#84 ) Function util.execute
learned str argument scratch_suffix
to identify temp dictionaries for debugging.
+(GH#90 ) DFTD3 now supports preliminary parameters for zero and Becke-Johnson damping to use with SAPT0-D
+
+
+
+
+
+v0.6.4 / 2019-03-21
+
+Bug Fixes
+
+(GH#54 ) Psi4’s Engine implementation now checks its key words in a case insensitive way to give the same value
+whether you called Psi4 or Engine to do the compute.
+(GH#55 ) Fixed an error handling routine in Engine to match Psi4.
+(GH#56 ) Complex inputs are now handled better through Psi4’s wrapper which caused Engine to hang while trying
+to write to stdout
.
+
+
+
+
+v0.6.3 / 2019-03-15
+
+
+
+Bug Fixes
+
+(GH#50 and GH#51 ) Executing Psi4 on a single node with multiprocessing is more stable because Psi4 temps are
+moved to scratch directories. This behavior is now better documented with an example as well.
+(GH#52 ) Psi4 calls are now executed through the subprocess
module to prevent possible multiprocessing issues
+and memory leak after thousands of runs. A trade off is this adds about 0.5 seconds to task start-up, but its safe.
+A future Psi4 release will correct this issue and the change can be reverted.
+
+
+
+
+v0.6.2 / 2019-03-07
+
+Enhancements
+
+(GH#38 and GH#39 ) Documentation now pulls from the custom QC Archive Sphinx Theme, but can fall back to the standard
+RTD theme. This allows all docs across QCA to appear consistent with each other.
+(GH#43 ) Added a base model for all Procedure
objects to derive from. This allows
+procedures’ interactions with compute programs to be more unified. This PR also ensured
+GeomeTRIC provides Provenance information.
+
+
+
+
+
+
+v0.6.0 / 2019-02-28
+
+
+New Features
+
+(GH#18 ) Add the dftd3
program to available computers.
+(GH#29 ) Adds preliminary support for the Molpro
compute engine.
+(GH#31 ) Moves all computation to ProgramExecutor
to allow for a more flexible input generation, execution, output parsing interface.
+(GH#32 ) Adds a general execute
process which safely runs subprocess jobs.
+
+
+
+Enhancements
+
+(GH#33 ) Moves the dftd3
executor to the new ProgramExecutor
interface.
+(GH#34 ) Updates models to the more strict QCElemental v0.3.0 model classes.
+(GH#35 ) Updates CI to avoid pulling CUDA libraries for torchani
.
+(GH#36 ) First pass at documentation.
+
+
+
+
+v0.5.2 / 2019-02-13
+
+Enhancements
+
+(GH#24 ) Improves load times dramatically by delaying imports and cpuutils.
+(GH#25 ) Code base linting.
+(GH#30 ) Ensures Psi4 output is already returned and Pydantic v0.20+ changes.
+
+
+
+
+
+v0.5.0 / 2019-01-28
+
+New Features
+
+(GH#8 ) Adds the TorchANI program for ANI-1 like energies and potentials.
+(GH#16 ) Adds QCElemental models based off QCSchema to QCEngine for both validation and object-based manipulation of input and output data.
+
+
+
+Enhancements
+
+(GH#14 ) Migrates option to Pydantic objects for validation and creation.
+(GH#14 ) Introduces NodeDescriptor (for individual node description) and JobConfig (individual job configuration) objects.
+(GH#17 ) NodeDescriptor overhauled to work better with Parsl/Balsam/Dask/etc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cli.html b/cli.html
new file mode 100644
index 000000000..1cb60ee9c
--- /dev/null
+++ b/cli.html
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+ Command Line Interface — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Command Line Interface
+QCEngine provides a command line interface with three commands:
+
+qcengine info
displays information about the environment detected by QCEngine.
+qcengine run
runs a program.
+qcengine run-procedure
runs a procedure.
+
+
+Info Command
+
+Command Invocation
+ qcengine info <options>
+
+
+
+
+Command Description
+This command prints information about the QCEngine environment.
+
+
+Arguments
+
+category
The information categories to show. Choices include:
+
+version
: Print version of QCEngine and QCElemental.
+programs
: Print detected and supported programs.
+procedures
: Print detected and supported procedures.
+config
: Print host, compute, and job configuration
+all
: Print all available information.
+
+By default, all available information is printed.
+
+
+
+
+
+Run Command
+
+Command Invocation
+ qcengine run <program> <data>
+
+
+
+
+Command Description
+This command runs a program on a given task and outputs the result as a JSON blob.
+
+
+Arguments
+
+program
The program to run.
+
+data
Data describing the task. One of:
+
+
+
+
+
+
+Run-Procedure Command
+
+Command Invocation
+ qcengine run-procedure <program> <data>
+
+
+
+
+Command Description
+This command runs a procedure on a given task and outputs the result as a JSON blob.
+
+
+Arguments
+
+procedure
The procedure to run.
+
+data
Data describing the task. One of:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/codemeta.json b/codemeta.json
deleted file mode 100644
index 2ae280938..000000000
--- a/codemeta.json
+++ /dev/null
@@ -1,339 +0,0 @@
-{
- "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
- "@type": "SoftwareSourceCode",
- "description": "QCEngine: computational molecular sciences program executor and IO standardizer (QCSchema)",
- "name": "QCEngine",
- "codeRepository": "https://github.com/MolSSI/QCEngine",
- "issueTracker": "https://github.com/MolSSI/QCEngine/issues",
- "license": "https://opensource.org/licenses/BSD-3-Clause",
- "version": "0.15",
- "author": [
- {
- "@type": "Person",
- "givenName": "Daniel",
- "additionalName": "G. A.",
- "familyName": "Smith",
- "affiliation": "The Molecular Sciences Software Institute",
- "@id": "https://orcid.org/0000-0001-8626-0900",
- "identifier": "https://github.com/dgasmith"
- },
- {
- "@type": "Person",
- "givenName": "Asem",
- "familyName": "Alenaizan",
- "affiliation": "Center for Computational Molecular Science and Technology, Georgia Institute of Technology",
- "@id": "https://orcid.org/0000-0002-0871-664X",
- "identifier": "https://github.com/alenaizan"
- },
- {
- "@type": "Person",
- "givenName": "Doaa",
- "familyName": "Altarawy",
- "affiliation": "The Molecular Sciences Software Institute",
- "@id": "https://orcid.org/0000-0002-7795-4422",
- "identifier": "https://github.com/doaa-altarawy"
- },
- {
- "@type": "Person",
- "givenName": "Taylor",
- "additionalName": "A.",
- "familyName": "Barnes",
- "affiliation": "The Molecular Sciences Software Institute",
- "@id": "https://orcid.org/0000-0001-9396-1094",
- "identifier": "https://github.com/taylor-a-barnes"
- },
- {
- "@type": "Person",
- "givenName": "Lori",
- "additionalName": "A.",
- "familyName": "Burns",
- "affiliation": "Center for Computational Molecular Science and Technology, Georgia Institute of Technology",
- "@id": "https://orcid.org/0000-0003-2852-5864",
- "identifier": "https://github.com/loriab"
- },
- {
- "@type": "Person",
- "givenName": "Nuwan",
- "familyName": "De Silva",
- "affiliation": "Department of Physical and Biological Sciences, Western New England University",
- "@id": "https://orcid.org/0000-0002-1443-5764",
- "identifier": "https://github.com/nuwandesilva"
- },
- {
- "@type": "Person",
- "givenName": "David",
- "additionalName": "L.",
- "familyName": "Dotson",
- "affiliation": "Open Force Field Initiative",
- "@id": "https://orcid.org/0000-0001-5879-2942",
- "identifier": "https://github.com/dotsdl"
- },
- {
- "@type": "Person",
- "givenName": "Sebastian",
- "familyName": "Ehlert",
- "affiliation": "Mulliken Center for Theoretical Chemistry, Institut für Physikalische und Theoretische Chemie, Universität Bonn",
- "@id": "https://orcid.org/0000-0001-7809-771X",
- "identifier": "https://github.com/awvwgk"
- },
- {
- "@type": "Person",
- "givenName": "Zachary",
- "additionalName": "L.",
- "familyName": "Glick",
- "affiliation": "Center for Computational Molecular Science and Technology, Georgia Institute of Technology",
- "@id": "https://orcid.org/0000-0003-0900-2849",
- "identifier": "https://github.com/zachglick"
- },
- {
- "@type": "Person",
- "givenName": "Mark",
- "additionalName": "S.",
- "familyName": "Gordon",
- "affiliation": "Department of Chemistry, Iowa State University",
- "@id": "https://orcid.org/0000-0003-2371-1318"
- },
- {
- "@type": "Person",
- "givenName": "Alex",
- "additionalName": "G.",
- "familyName": "Heide",
- "affiliation": "Center for Computational Quantum Chemistry, University of Georgia",
- "@id": "https://orcid.org/0000-0002-9780-8123",
- "identifier": "https://github.com/AlexHeide"
- },
- {
- "@type": "Person",
- "givenName": "Jan",
- "familyName": "Hermann",
- "affiliation": "Free University of Berlin",
- "@id": "https://orcid.org/0000-0002-2779-0749",
- "identifier": "https://github.com/jhrmnn"
- },
- {
- "@type": "Person",
- "givenName": "Josh",
- "familyName": "Horton",
- "affiliation": "Department of Chemistry, Lancaster University; Open Force Field Inititive",
- "@id": "https://orcid.org/0000-0001-8694-7200",
- "identifier": "https://github.com/jthorton"
- },
- {
- "@type": "Person",
- "givenName": "Adrian",
- "additionalName": "G.",
- "familyName": "Hurtado",
- "affiliation": "Institute for Advanced Computational Science, Stony Brook University",
- "@id": "https://orcid.org/0000-0002-2460-8059",
- "identifier": "https://github.com/ahurta92"
- },
- {
- "@type": "Person",
- "givenName": "Rollin",
- "additionalName": "A.",
- "familyName": "King",
- "affiliation": "Department of Chemistry, Bethel University",
- "@id": "https://orcid.org/0000-0002-1173-4187",
- "identifier": "https://github.com/psi-rking"
- },
- {
- "@type": "Person",
- "givenName": "Jiyoung",
- "familyName": "Lee",
- "affiliation": "Department of Chemistry, Iowa State University",
- "@id": "https://orcid.org/0000-0002-5216-2859",
- "identifier": "https://github.com/jygrace2"
- },
- {
- "@type": "Person",
- "givenName": "Sebastian",
- "additionalName": "J. R.",
- "familyName": "Lee",
- "affiliation": "Division of Chemistry and Chemical Engineering, California Institute of Technology",
- "@id": "https://orcid.org/0000-0001-7006-9378",
- "identifier": "https://github.com/sjrl"
- },
- {
- "@type": "Person",
- "givenName": "Fang",
- "familyName": "Liu",
- "affiliation": "Emory University",
- "@id": "https://orcid.org/0000-0003-1322-4997",
- "identifier": "https://github.com/ffangliu"
- },
- {
- "@type": "Person",
- "givenName": "Annabelle",
- "additionalName": "T.",
- "familyName": "Lolinco",
- "affiliation": "Department of Chemistry, Iowa State University",
- "@id": "https://orcid.org/0000-0002-1686-778X",
- "identifier": "https://github.com/vivacebelles"
- },
- {
- "@type": "Person",
- "givenName": "Devin",
- "additionalName": "A.",
- "familyName": "Matthews",
- "affiliation": "Department of Chemistry, Southern Methodist University",
- "@id": "https://orcid.org/0000-0003-2795-5483",
- "identifier": "https://github.com/devinamatthews"
- },
- {
- "@type": "Person",
- "givenName": "Jonathon",
- "additionalName": "P.",
- "familyName": "Misiewicz",
- "affiliation": "Center for Computational Quantum Chemistry, University of Georgia",
- "@id": "https://orcid.org/0000-0002-6425-9551",
- "identifier": "https://github.com/JonathonMisiewicz"
- },
- {
- "@type": "Person",
- "givenName": "Levi",
- "additionalName": "N.",
- "familyName": "Naden",
- "affiliation": "The Molecular Sciences Software Institute",
- "@id": "https://orcid.org/0000-0002-3692-5027",
- "identifier": "https://github.com/Lnaden"
- },
- {
- "@type": "Person",
- "givenName": "Farhad",
- "familyName": "Ramezanghorbani",
- "affiliation": "University of Florida",
- "@id": "http://orcid.org/0000-0002-7545-4416",
- "identifier": "https://github.com/farhadrgh"
- },
- {
- "@type": "Person",
- "givenName": "Jeffrey",
- "additionalName": "B.",
- "familyName": "Schriber",
- "affiliation": "Center for Computational Molecular Science and Technology, Georgia Institute of Technology",
- "@id": "https://orcid.org/0000-0001-6906-8191",
- "identifier": "https://github.com/jeffschriber"
- },
- {
- "@type": "Person",
- "givenName": "C.",
- "additionalName": "David",
- "familyName": "Sherrill",
- "affiliation": "Center for Computational Molecular Science and Technology, Georgia Institute of Technology",
- "@id": "https://orcid.org/0000-0002-5570-7666",
- "identifier": "https://github.com/CDSherrill"
- },
- {
- "@type": "Person",
- "givenName": "Andrew",
- "additionalName": "C.",
- "familyName": "Simmonett",
- "affiliation": "National Institutes of Health -- National Heart, Lung and Blood Institute",
- "@id": "https://orcid.org/0000-0002-5921-9272",
- "identifier": "https://github.com/andysim"
- },
- {
- "@type": "Person",
- "givenName": "Johannes",
- "familyName": "Steinmetzer",
- "affiliation": "Friedrich-Schiller-University Jena",
- "@id": "https://orcid.org/0000-0003-2493-6893",
- "identifier": "https://github.com/eljost"
- },
- {
- "@type": "Person",
- "givenName": "Justin",
- "additionalName": "M.",
- "familyName": "Turney",
- "affiliation": "Center for Computational Quantum Chemistry, University of Georgia",
- "@id": "https://orcid.org/0000-0003-3659-0711",
- "identifier": "https://github.com/jturney"
- },
- {
- "@type": "Person",
- "givenName": "Jeffrey",
- "additionalName": "R.",
- "familyName": "Wagner",
- "affiliation": "Open Force Field Initiative",
- "@id": "https://orcid.org/0000-0001-6448-0873",
- "identifier": "https://github.com/j-wags"
- },
- {
- "@type": "Person",
- "givenName": "Logan",
- "familyName": "Ward",
- "affiliation": "Data Science and Learning Division, Argonne National Laboratory",
- "@id": "https://orcid.org/0000-0002-1323-5939",
- "identifier": "https://github.com/WardLT"
- },
- {
- "@type": "Person",
- "givenName": "Matthew",
- "familyName": "Welborn",
- "affiliation": "Entos, Inc.",
- "identifier": "https://github.com/mattwelborn"
- },
- {
- "@type": "Person",
- "givenName": "Theresa",
- "additionalName": "L.",
- "familyName": "Windus",
- "affiliation": "Department of Chemistry, Iowa State University",
- "@id": "https://orcid.org/0000-0001-6065-3167",
- "identifier": "https://github.com/twindus"
- },
- {
- "@type": "Person",
- "givenName": "Roberto",
- "familyName": "Di Remigio",
- "affiliation": "Hylleraas Centre for Quantum Molecular Sciences, UiT -- The Arctic University of Norway",
- "@id": "https://orcid.org/0000-0002-5452-9239",
- "identifier": "https://github.com/robertodr"
- },
- {
- "@type": "Person",
- "givenName": "Maximilian",
- "familyName": "Scheurer",
- "affiliation": "Interdisciplinary Center for Scientific Computing, Heidelberg University",
- "@id": "https://orcid.org/0000-0003-0592-3464",
- "identifier": "https://github.com/maxscheurer"
- },
- {
- "@type": "Person",
- "givenName": "Michael",
- "additionalName": "F.",
- "familyName": "Herbst",
- "affiliation": "Inria Paris and CERMICS, \u00C9cole des Ponts ParisTech",
- "@id": "https://orcid.org/0000-0003-0378-7921",
- "identifier": "https://github.com/mfherbst"
- },
- {
- "@type": "Person",
- "givenName": "Holger",
- "familyName": "Kruse",
- "affiliation": "Institute of Biophysics of the CAS, v.v.i., Czech Republic",
- "@id": "https://orcid.org/0000-0002-0560-1513",
- "identifier": "https://github.com/hokru"
- },
- {
- "@type": "Person",
- "givenName": "Colton",
- "familyName": "Hicks",
- "affiliation": "Stanford University",
- "@id": "https://orcid.org/0000-0003-2834-318X",
- "identifier": "https://github.com/coltonbh"
- }
- ],
- "developmentStatus": "active",
- "downloadUrl": "https://github.com/MolSSI/QCEngine",
- "keywords": [
- "quantum-chemistry",
- "computational-chemistry",
- "chemistry",
- "physics"
- ],
- "maintainer": "https://orcid.org/0000-0002-7961-7016",
- "programmingLanguage": [
- "Python"
- ]
-}
diff --git a/dev_program_harness.html b/dev_program_harness.html
new file mode 100644
index 000000000..ae9c5b8d5
--- /dev/null
+++ b/dev_program_harness.html
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+ Adding a New Program Harness — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Adding a New Program Harness
+Program harnesses are for community CMS codes that can independently
+(or with a SCF bootstrap) compute single-point energies, derivatives,
+or properties or components thereof (e.g., dispersion corrections).
+A single CMS code generally has one program harness. However, if there
+are drastically different ways of running a code (e.g., TeraChem text
+input file and TeraChem PBS), separate harnesses may be created. Also,
+if there are specialty capabilites not fitting into “single-point
+energies …” (e.g., GAMESS makefp task), an additional procedure
+harness may be created.
+This guide is a coarse path through adding a new program harness.
+
+Open up communication with the QCEngine maintainers. Post an issue
+to GitHub and join the Slack channel (link off GH README) so you can
+get advice.
+
+
+Copy a similar harness. Choose a program that your code behaves
+roughly like (mostly consider parsed vs. API access) and copy that
+harness, renaming it as your own and commenting out all but the
+structure. Search for the (copied) harness name to register it.
+
+
+Fill in the _defaults
section with program name and characteristics.
+
+
+Fill in the def found
function using which
and
+which_import
from QCElemental. See NWChem and OpenMM for examples
+of handling additional dependencies.
+
+
+If your code’s version can be extracted short of parsing an output
+file, fill in def get_version
next. After this, > qcengine info
+should show your code (provided it’s in path).
+
+
+To get a string output of QCSchema Molecule in your code’s format,
+you may need to add a dtype
at qcelemental/molparse/to_string.py
.
+
+
+If your code’s of the common translate-QCSchema-to-input, run,
+translate-output-to-QCSchema variety, next work on the def execute
+function. This is fairly simple because it calls the powerful
+qcengine.util.execute to handle scratch, timeout, file writing and
+collection, etc. The harness function needs the names of input files
+(hard-code a string for now), the execution command, and the names
+of any scratch files to return for processing. Once ready, fill in
+def get_version
if not done above.
+
+
+Now fill in the short def compute
entirely and def build_input
+and def parse_output
skeletally. Set up a simple molecule-and-model
+AtomicInput
dictionary and run it with qcng.compute(atomicinput,
+"yourcode")
to get something to iterate on.
+
+
+Fill in def build_input
to form your code’s usual input format
+from the fields of AtomicInput
.
+
+
+Fill in def parse_output
to take results and put them
+into AtomicResult
. Most important is the return_result
+field. AtomicResultProperties
can be populated when
+convenient. WavefunctionProperties
is great but save for a later
+pass.
+
+
+At this point your harness can correctly run one or more QCSchema
+inputs of your devising. Time to put it through paces. Register your
+code in _programs
in testing.py
. Most tests will then need a
+@using("yourcode")
decorator so that they don’t run (and fail the
+test suite) when your code isn’t available.
+
+
+Add basic tests to qcengine/tests/test_harness_canonical.py
+* def test_compute_energy(program, model, keywords):
+* def test_compute_gradient(program, model, keywords):
+* def test_compute_energy_qcsk_basis(program, model, keywords):
+
+
+Add basic failure tests to qcengine/tests/test_harness_canonical.py
+* def test_compute_bad_models(program, model):
+
+
+Add tests for the runtime config and to qcengine/programs/tests/test_canonical_config.py
+
+
+For QM codes, consider adding lines to the
+qcengine/programs/tests/test_standard_suite.py to check energies,
+gradients, and Hessians against other codes.
+
+
+For codes that can produce a Hartree–Fock, add lines to the
+qcengine/program/tests/test_alignment.py to check molecular and
+properties orientation handling.
+
+
+If your code is available as a visible binary (e.g., pip, conda,
+docker download with no or trivial build), create a testing lane by
+adding to devtools/conda-envs/
and .github/workflows/CI.yml
.
+This will check your code for every PR. We’re looking into private
+testing for codes that aren’t available.
+
+
+Throughout, talk with the maintainers with questions. Error handling,
+especially, is intricate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/devtools/README.md b/devtools/README.md
deleted file mode 100644
index 2eec3da18..000000000
--- a/devtools/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Development, testing, and deployment tools
-
-This directory contains a collection of tools for running Continuous Integration (CI) tests,
-conda installation, and other development tools not directly related to the coding process.
-
-
-## Manifest
-
-### Continuous Integration
-
-You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and
-Windows testing if you only plan to deploy on specific platforms. These are just to help you get started
-
-* `travis-ci`: Linux and OSX based testing through [Travis-CI](https://about.travis-ci.com/)
- * `install.sh`: Pip/Miniconda installation script for Travis
-* `appveyor`: Windows based testing through [AppVeyor](https://www.appveyor.com/)
- * `install_conda.ps1` Powershell installation script of Conda components
-
-## How to contribute changes
-- Clone the repository if you have write access to the main repo, fork the repository if you are a collaborator.
-- Make a new branch with `git checkout -b {your branch name}`
-- Make changes and test your code
-- Push the branch to the repo (either the main or your fork) with `git push -u origin {your branch name}`
- * Note that `origin` is the default name assigned to the remote, yours may be different
-- Make a PR on GitHub with your changes
-- We'll review the changes and get your code into the repo after lively discussion!
-
-
-## Checklist for updates
-- [ ] Make sure there is an/are issue(s) opened for your specific update
-- [ ] Create the PR, referencing the issue
-- [ ] Debug the PR as needed until tests pass
-- [ ] Tag the final, debugged version
- * `git tag -a X.Y.Z [latest pushed commit] && git push --follow-tags`
-- [ ] Get the PR merged in
-
-## Conda build comments
-- `conda-build build devtools/conda-recipe --user molssi -c conda-forge --no-force-upload`
-
-## PyPI upload comments
-Asumming your `.pypirc` file is setup [correctly](https://packaging.python.org/guides/migrating-to-pypi-org/#uploading).
-- `python setup.py sdist upload`
-
-
-## Versioneer Auto-version
-[Versioneer](https://github.com/warner/python-versioneer) will automatically infer what version
-is installed by looking at the `git` tags and how many commits ahead this version is. The format follows
-[PEP 400](https://www.python.org/dev/peps/pep-0440/) and has the regular expression of:
-```regexp
-\d+.\d+.\d+(?\+\d+-[a-z0-9]+)
-```
-If the version of this commit is the same as a `git` tag, the installed version is the same as the tag,
-e.g. `QCEngine-0.1.2`, otherwise it will be appended with `+X` where `X` is the number of commits
-ahead from the last tag, and then `-YYYYYY` where the `Y`'s are replaced with the `git` commit hash.
diff --git a/devtools/azure_ci_images.md b/devtools/azure_ci_images.md
deleted file mode 100644
index 09b709ba3..000000000
--- a/devtools/azure_ci_images.md
+++ /dev/null
@@ -1,246 +0,0 @@
-# QCEngine Azure CI for Private Code
-
-
-Engine is a wrapper for many quantum chemistry codes. However, not all of those codes are public, free, or shipped
-in pre-packaged ways (e.g. conda). Testing such codes on public CI suites such as Travis, Circle, or Azure can be a
-security issue as the codes have to be reachable by the CI system. One feature that the Engine developers offer is
-a secure and private Docker repository hosted through
-[Azure Container Registry (ACR)](https://azure.microsoft.com/en-us/services/container-registry/?cdn=disable). This
-allows us to test these codes (with permission) through a mature CI suite that plugs directly into GitHub, without
-exposing the code to the outside world.
-
-The Container Registry is paid for by MolSSI and only the QCArchive developers have access to it.
-
-## Security
-
-The Azure Container Registry (ACR) is private in that only a single developer has access control to the registry. Any
-additional registry managers must be explicitly given access by the owner to take actions, and those users are
-currently limited to a select few QCArchive developers. Although more control can be given, for now, only these
-users have any permission to view, add, or pull images from the private Registry. These accounts are restricted
-to single-user email addresses. The Docker images uploaded to this registry *do not* exist on DockerHub or DockerCloud;
-they *only* live in the private Azure Container Registry.
-
-Only ACR authorized users are allowed to hook the Private Container Registry into the Azure
-Pipelines account. This must be done from the administration panels of Azure DevOps, and even then can only be done
-if said user is first invited (by an administrator) into the DevOps Pipeline Group. Within DevOps, accessing the
-ACR can only be done if the following conditions are met:
-
-* The user with access to the ACR is considered an "Owner" by the ACR security, this permission can only be
- authorized by the ACR administrator
-* The user with access to the ACR is a member of the Azure DevOps Pipeline team which is wanting to queue up the build.
-* The user with access to the ACR is an Administrator on the DevOps Pipeline team
-* The user with access to the ACR is signed into DevOps and approves using their credentials for the Pipeline team
- to access the ACR.
-* The user with access to the ACR approves specific builds to have access to the ACR.
-
-Then, and only then, can a Pipeline build access images in the ACR. Further, no unauthorized user can see, manage,
-or change these credentials.
-
-## CI Runtime Security (When the builds trigger)
-
-Engine is, itself, a public code base, even though the codes it wraps may be private. Similarly, the Azure YAML file
-which has the build and test instructions exist inside the Engine code and could be edited by anyone. In order to
-block malicious edits from running and exposing the proprietary code by triggering the CI, the Engine developers only
-allow builds to trigger on code which has been reviewed and approved, and merged into the code base already. No
-outside user can propose a change which will automatically trigger the CI and execute unapproved code.
-
-The trade off to this level of security is that benign PRs which would actually benefit from said testing cannot
-trigger tests on the secure ACR images. The code will be tested on merge into master, and we are working on a better
-manual trigger on request system to let us test PRs which the administrators deem safe. @QCArchiveBot may make an
-appearance as well through a manual trigger phrase.
-
-## Authenticating a new users for ACR and Pipelines
-
-These are instructions for allowing a new user permission to use the private ACR instance paid for by MolSSI/VT. These
-are a one time thing and if you cannot meet these criteria, skip down to section on "Adding a new code to the CI" and
-coordinate with one of the approved users who can upload your custom Docker image (or help you make one) to the private
-ACR.
-
-1. Have an [Azure Portal](https://azure.microsoft.com/en-us/account/) account through a Virginia Tech email address
- (this is something which has to be authorized by VT so we can allow access to the ACR, this may be relaxed in the
- future.)
-2. Create an [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/?nav=min) account with the same email
- address. These are different login nodes, even though they both run through Azure. This will be for access to the
- Pipelines team.
-3. Request access to the QCArchive DevOps team. This will require reaching out to one of the QCArchive developers.
-4. Request access to the QCArchive ACR. This will require reaching out to one of the QCArchive developers, this is
- also a smaller group.
-
-*If you only want to upload images to the ACR (i.e. the Pipeline is already connected to the ACR)*
-
-* Request that you be made a "Contributor" in the ACR administration.
-
-*If you want to manage account connections between the ACR and Pipelines*
-
-* Request that you be made an "Owner" in the ACR administration.
-* Request that you be made an "Administrator" in the Pipelines team.
-
-## Connecting ACR to Pipelines
-
-See also (its missing details about the security setup)
-
-https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml
-
-*Note: This only has to be done once per ACR (not per image) and Pipelines Team (not per build).*
-
-### Pre-requisites
-
-* Do everything in the previous section
-* Be made an "Owner" of ACR and an "Administrator" of the Pipelines team
-* Be signed into the account which meets these criteria.
-
-### Linking the services
-
-1. Sign into the account which meets the pre-requisites through the DevOps login.
-2. From the DevOps team, go to the group account, and then go to the "Project settings" blade.
- * If you are not an "Administrator" of the Pipelines team, you will not see this button.
-3. Go to the "Service Connections" menu.
-4. Choose "+ New Service Connection" and then "Docker Registry"
-5. Select the "Azure Container Registry" radio button.
-6. Choose a "Connection Name" which is easy to recognize and human readable (arbitrary).
- * Make note of this, you will use it when referencing images.
-7. Select the "Azure Subscription" drop down, and choose the Azure Subscription which is linked to the ACR you want to
- make available to this Pipeline group.
- * This will auto-fill if there is only 1 connected Azure Subscription. If nothing appears, the account you are
- signed in with is missing permissions and likely not associated with the Azure Subscription (e.g. you are using the
- wrong account).
-8. Select the "Azure Container Registry" drop down and follow the authentication before selecting which ACR (if there
- are several) you want to get authorization to.
-9. Click "OK" and this Pipeline will now have access to the ACR through this Service Connection. All authorization
- will be handled by Azure DevOps invisibly and not exposed in the builds.
- * If the user is not an "Owner" of the ACR, this will throw an authentication error before the window is closed.
-
-See also:
-
-https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#sep-docreg
-
-## Creating and uploading a new image to the ACR
-
-### Pre-requisites
-
-* Docker
-* Access to the private software you want to include for CI testing
-* (For uploading) Be a "Contributor" (or otherwise Push access) to the ACR in question. See some of the "Authenticating
- a new users for ACR and Pipelines" for more details.
-* (For uploading) Install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)
-
-### Creating the Image
-
-1. Start a new [Dockerfile](https://docs.docker.com/engine/reference/builder/) with the following one line header:
- ```Dockerfile
- FROM condaforge/linux-anvil-comp7
-
- ```
-2. Build the rest of your docker file as normal to include your code.
-3. Use `docker build` but importantly add `-t qcarchive.azurecr.io/{IMAGE NAME}:{TAG}` to the build command.
- * The `{IMAGE NAME}` and `{TAG}` are developer choices, but the repository location is exact.
-
-See also (for general ACR manipulation). Use the above instructions for making production CI images
-
-https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal
-
-### Uploading the image
-
-Note: There is likely better way to authenticate, but this work for now.
-
-See also:
-
-https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication
-
-1. Using the AZ CLI, sign into the QCArchive ACR with `az acr login --name QCArchive`
- * This targets the repository name from the "Access keys" of the Azure Portal->ACR page inside the container
- service.
- * You will be prompted with a window to authenticate with your Azure Portal account. Use the one which
- has access to the ACR.
-2. You now have access to ACR to take `docker` based actions against it for 60 minutes by default.
-3. Ensure the image you want to push (`docker image ls`) is correctly tagged such that its REPOSITORY location starts
- with `qcarchive.azurecr.io` and then is given a formal name and TAG as well.
-4. `docker push` your image, and it should be pushed to the private ACR.
-
-## Adding a new container to the CI Pipeline
-
-These instructions are for adding new codes to the CI suite.
-
-### Pre-requisites
-
-* ACR and the Pipeline are linked services and you know the `Connection Name` inside the DevOps Pipeline
- (see "Linking the services").
-* The Docker image has been uploaded to the private ACR and you know the image name and tag you want to use
- (see "Creating and uploading a new image to the ACR")
-* You have access to edit the `.azure-pipelines.yml` file of the Engine repository.
-
-### Adding the Custom Image to the YAML Pipeline Container Resource
-
-Assuming you have met the prerequisites, you can request that the CI use the private docker images in its process by
-specifying they [run as a container](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops&tabs=yaml)
-inside the host agent itself. However, we first have to indicate that this container *can* be used by the builds.
-In the `.azure-pipelines.yml` file, there is a header called `resources:` and a sub-header called `containers:` within
-it. This sub-header defines all the containers we want to use and will look like this:
-
-```yaml
-resources:
- containers:
- - container: 'qcengineci' # Arbitrary name for reference in pipelines
- image: qcarchive.azurecr.io/qcengineci:latest # pointer to the Image in our Azure CR
- endpoint: "QCArchive Azure Container Registry" # Name of the Service Connection the pipeline is configured with
- - container: 'waffleiron'
- image: qcarchive.azurecr.io/something_about_waffles:maple_syrup
- endpoint: "QCArchive Azure Container Registry" # Name of the Service Connection the pipeline is configured with
-```
-
-In this file, you need to specify each custom image in the ACR you want to use as an entry in the list. So for this
-example, we have 2 images, one which we call `qcengineci` and the other `waffleiron`. The names after the
-`container:` directive are arbitrary, but used later, so keep those in mind.
-
-Next we have the `image:` directive which is the pointer to the image in the ACR of the form
-`qcarchive.azurecr.io/{IMAGE_NAME}:{TAG}`. Even if you did not not upload the image yourself, if you know the name, you
-can request the CI fetch it. In these examples, there are two images we reference, both in the `qcarchive.azureacr.io`
-registry, one image called `qcengineci` with the tag `latest`, and one image called `something_about_waffles` with the
-tag `maple_syrup`.
-
-Finally, and most importantly, we have the `endpoint:` directive. This is the human-defined name when the ACR and the
-Pipeline were linked through a "Service connection" in the `Connection Name` field. The specification of this field
-instructs Azure Pipelines to authenticate through that named service when attempting to pull down the image, but only
-in its own Pipeline, i.e. there is no way to reverse engineer that service hook outside of the Pipeline CI, its just a
-string everywhere else. Without this field, Azure Pipeline will try to pull the repository in the `image`
-field, but fail because it has nothing to authenticate against. No passwords/usernames are exposed through this since
-its a string reference to an authentication which can only be seen, created, or edited by administrators though several
-layers of permissions (see "Security").
-
-Once the containers have been requisitioned, they can be used in jobs later.
-
-### Using a custom image in a CI job
-
-To use a previously allocated container (see "Adding the Custom Image to the YAML Pipeline Container Resource"), we
-need to tell the worker Agent to run its job though it. For example:
-
-```yaml
-jobs:
-- job: proprietary_ci
- displayName: 'CI with Proprietary Code'
- pool:
- vmImage: 'ubuntu-latest'
- container: qcengineci
-```
-
-Everything about this should look like a normal Azure Pipelines job, but we have an additional `container` field which
-matches the `container` filed from the `resources: {containers: [{container:...}]` field from above. This effectively
-says that this job, and all actual `steps`, will be run inside this container.
-
-There are some caveats for this. We use Docker images which are derivatives of the Conda-Forge Anvil, which define an
-`ENTRYPOINT` and a `CMD` directive in their `Dockerfile`. Unfortunately,
-[Azure does things which bypasses those directives](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops&tabs=yaml#linux-based-containers),
-so we have to add something in each of our `steps` which tells the container to provision, i.e.
-
-```yaml
- steps:
- - script: |
- source /opt/conda/etc/profile.d/conda.sh
- # The rest of the script...
-```
-
-### Running against multiple images
-
-One avenue for future improvements is having multiple images on the ACR we want to reference. For that, we can
-[take advantage of the `strategy` directive](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops&tabs=yaml#multiple-jobs)
-of Azure YAML files to auto-queue up multiple jobs.
diff --git a/devtools/conda-envs/README.md b/devtools/conda-envs/README.md
deleted file mode 100644
index 7000ac7db..000000000
--- a/devtools/conda-envs/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# QCEngine Pre-built Conda Environments
-
-base.yaml
-nwchem.yaml
-openmm.yaml
-psi-nightly.yaml
-psi.yaml
-rdkit.yaml
-README.md
-torchani.yaml
-
-The QCEngine program has few requirements on its own `meta.yaml` file, however,
-you may want to emulate the server side of things on your own. To help make that
-possible, we have provided the various YAML files here which can be used
-to quickly and mostly automatically build a working environment for to emulate
-the server.
-
-These use the `conda env create` commands (examples below) instead of the
-more common `conda create` (the commands are slightly different as of writing,
-circa Conda 4.3), so note the difference in commands.
-
-* `base.yaml` is environment specification for general use.
-* `psi-nightly.yaml` additionally installs the latest development Psi4 and anything it needs.
-* `nwchem.yaml` doesn't install NWChem (no conda package), but it installs QCEngine and
- NWChem dependencies.
-
-Similarly, other environments are tailored for other CMS harnesses. These
-are in active use in CI and so should be reliable.
-
-## Requirements to use Environments
-
-1. `git`
-2. `conda`
-3. `conda` installed `pip` (pretty much always available unless you are in
- some custom Python-less Conda environment such as an `R`-based env.)
-4. Network access
-
-## Setup/Install
-
-Run the following command to configure a new environment with the replacements:
-
-* `{name}`: Replace with whatever you want to call the new env
-* `{file}`: Replace with target file
-
-```bash
-conda env create -n {name} -f {file}
-```
-
-To access the new environment:
-```bash
-conda activate {name}
-```
-
diff --git a/devtools/conda-envs/adcc.yaml b/devtools/conda-envs/adcc.yaml
deleted file mode 100644
index 421a2afee..000000000
--- a/devtools/conda-envs/adcc.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: test
-channels:
- #- adcc
- - conda-forge
- - nodefaults
-dependencies:
- - adcc>=0.15.7
- - psi4>=1.8.1
-
- # Core
- - python
- - py-cpuinfo
- - psutil
- - qcelemental >=0.24.0
- - pydantic=1
- - msgpack-python
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
-
diff --git a/devtools/conda-envs/aimnet2.yaml b/devtools/conda-envs/aimnet2.yaml
deleted file mode 100644
index 511d7a0d1..000000000
--- a/devtools/conda-envs/aimnet2.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
-
- # Core
- - python
- - pip
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.12.0
- - pydantic>=1.0.0
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
- - pyaimnet2
diff --git a/devtools/conda-envs/base.yaml b/devtools/conda-envs/base.yaml
deleted file mode 100644
index 2a74047f9..000000000
--- a/devtools/conda-envs/base.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.12.0
- - pydantic>=1.0.0
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/docs-cf.yaml b/devtools/conda-envs/docs-cf.yaml
deleted file mode 100644
index 19b37fa32..000000000
--- a/devtools/conda-envs/docs-cf.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: docs
-channels:
- - conda-forge
- - nodefaults
-dependencies:
- - python
- - networkx
- - pydantic=1
- - numpy
- - pint
-
- # qc
- - qcelemental
-
- # docs
- - python-graphviz
- - sphinx
- - sphinx-autodoc-typehints
- - sphinx-automodapi
- - sphinx_rtd_theme
- - autodoc-pydantic
-
- # testing
- - pytest>=4.0.0
- - pytest-cov
- - codecov
-
- #- pip:
- # - git+https://github.com/MolSSI/qcarchive-sphinx-theme#egg=qcarchive_sphinx_theme
diff --git a/devtools/conda-envs/mace.yaml b/devtools/conda-envs/mace.yaml
deleted file mode 100644
index 7d7abb698..000000000
--- a/devtools/conda-envs/mace.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: mace
-channels:
- - conda-forge
-dependencies:
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.12.0
- - pydantic>=1.0.0
-
- # mace deps
- - pymace
- - numpy<2.0 # until conda package imposes
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/mrchem.yaml b/devtools/conda-envs/mrchem.yaml
deleted file mode 100644
index d0d0b752b..000000000
--- a/devtools/conda-envs/mrchem.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
- - mrchem >=1.1=*openmpi*
- - geometric
- - optking
-
- # Core
- - python
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental>=0.24
- - pydantic
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
-
- - pip
- - pip:
- - pyberny
diff --git a/devtools/conda-envs/nwchem-cf.yaml b/devtools/conda-envs/nwchem-cf.yaml
deleted file mode 100644
index 8f4683fcc..000000000
--- a/devtools/conda-envs/nwchem-cf.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
- - nwchem
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.24.0
- - pydantic>=1.0.0
- - networkx>=2.4.0
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/nwchem.yaml b/devtools/conda-envs/nwchem.yaml
deleted file mode 100644
index e86623e79..000000000
--- a/devtools/conda-envs/nwchem.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.24.0
- - pydantic>=1.0.0
- - networkx>=2.4.0
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/openmm.yaml b/devtools/conda-envs/openmm.yaml
deleted file mode 100644
index ddd49e3b4..000000000
--- a/devtools/conda-envs/openmm.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
- - rdkit
- - openmm
- - openff-toolkit
- - openff-forcefields
- - openmmforcefields
- - geometric
- - torsiondrive
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.11.1
- - pydantic >=1.8.2
- - pint <0.22
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/opt-disp-cf.yaml b/devtools/conda-envs/opt-disp-cf.yaml
deleted file mode 100644
index 0a54cd77f..000000000
--- a/devtools/conda-envs/opt-disp-cf.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: test
-channels:
- - conda-forge
- - nodefaults
-dependencies:
- - psi4=1.9.1
- - rdkit
- - mopac
-
- # Mixed Tests
- - dftd3-python
- - dftd4-python
- - gcp-correction
- - geometric
- - optking
- - pymdi
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.26.0
- - pydantic=1.10.13
- - msgpack-python
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
-
- - pip
- - pip:
- - pyberny
diff --git a/devtools/conda-envs/opt-disp.yaml b/devtools/conda-envs/opt-disp.yaml
deleted file mode 100644
index 15cb53fe3..000000000
--- a/devtools/conda-envs/opt-disp.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: test
-channels:
- - conda-forge
- - defaults
- - psi4/label/dev # for old dftd3 and mp2d
-dependencies:
- - psi4=1.9.1
- - blas=*=mkl # not needed but an example of disuading solver from openblas and old psi
- #- intel-openmp!=2019.5
- - rdkit
- - mopac
-
- # Mixed Tests
- - dftd3 3.2.1
- - dftd4-python=3.3.0
- - mp2d >=1.1
- - gcp
- - geometric
- - optking
- - pymdi
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.26.0
- - msgpack-python
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
-
- - pip
- - pip:
- - pyberny
diff --git a/devtools/conda-envs/psi-cf.yaml b/devtools/conda-envs/psi-cf.yaml
deleted file mode 100644
index c96032546..000000000
--- a/devtools/conda-envs/psi-cf.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: test
-channels:
- - conda-forge
- - conda-forge/label/libint_dev
-dependencies:
- - psi4=1.8
- - numpy<2
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - msgpack-python
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/psi-nightly.yaml b/devtools/conda-envs/psi-nightly.yaml
deleted file mode 100644
index 04d408993..000000000
--- a/devtools/conda-envs/psi-nightly.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: test
-channels:
- - psi4/label/dev
- - conda-forge
-dependencies:
- - psi4=1.6
- - blas=*=mkl # not needed but an example of disuading solver from openblas and old psi
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.26.0
- - pydantic>=1.0.0
- - msgpack-python
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/psi.yaml b/devtools/conda-envs/psi.yaml
deleted file mode 100644
index dcff46c1e..000000000
--- a/devtools/conda-envs/psi.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: test
-channels:
- - psi4
- - conda-forge
-dependencies:
- - psi4=1.5
- - libint2=*=hc9558a2_9
- - dftd3
- - geometric
- - intel-openmp!=2019.5
- - pymdi
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental=0.24.0
- - pydantic=1.8.2 # test minimun stated version.
- - msgpack-python
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
-
- - pip
- - pip:
- - pyberny
diff --git a/devtools/conda-envs/qcore.yaml b/devtools/conda-envs/qcore.yaml
deleted file mode 100644
index 8e848bc27..000000000
--- a/devtools/conda-envs/qcore.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: test
-channels:
- - entos
- - conda-forge
-dependencies:
- - py-qcore
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.24
- - pydantic >=1.8.2
- - tbb<2021
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/rdkit.yaml b/devtools/conda-envs/rdkit.yaml
deleted file mode 100644
index 1ed05aff9..000000000
--- a/devtools/conda-envs/rdkit.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: test
-channels:
- - conda-forge
- - rdkit
-dependencies:
- - rdkit
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.12.0
- - pydantic>=1.0.0
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/conda-envs/torchani.yaml b/devtools/conda-envs/torchani.yaml
deleted file mode 100644
index 40ba67d10..000000000
--- a/devtools/conda-envs/torchani.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: test
-channels:
- - conda-forge
- - pytorch-nightly
-dependencies:
-
- # Core
- - python
- - pip
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.12.0
- - pydantic>=1.0.0
-
- - pytorch
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
- - pip:
- - torchani
diff --git a/devtools/conda-envs/xtb.yaml b/devtools/conda-envs/xtb.yaml
deleted file mode 100644
index fb710e50d..000000000
--- a/devtools/conda-envs/xtb.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: test
-channels:
- - conda-forge
-dependencies:
- - xtb
- - xtb-python
-
- # Core
- - python
- - pyyaml
- - py-cpuinfo
- - psutil
- - qcelemental >=0.11.1
- - pydantic >=1.8.2
-
- # Extras
- - gcp-correction
- - dftd3-python >=0.5.1
-
- # Testing
- - pytest
- - pytest-cov
- - codecov
diff --git a/devtools/scripts/conda_env.py b/devtools/scripts/conda_env.py
deleted file mode 100644
index 53332f0fe..000000000
--- a/devtools/scripts/conda_env.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import argparse
-import os
-import shutil
-import subprocess as sp
-
-# Args
-parser = argparse.ArgumentParser(description='Creates a conda environment from file for a given Python version.')
-parser.add_argument('-n', '--name', type=str, nargs=1, help='The name of the created Python environment')
-parser.add_argument('-p', '--python', type=str, nargs=1, help='The version of the created Python environment')
-parser.add_argument('conda_file', nargs='*', help='The file for the created Python environment')
-
-args = parser.parse_args()
-
-with open(args.conda_file[0], "r") as handle:
- script = handle.read()
-
-tmp_file = "tmp_env.yaml"
-script = script.replace("- python", "- python {}*".format(args.python[0]))
-
-with open(tmp_file, "w") as handle:
- handle.write(script)
-
-conda_path = shutil.which("conda")
-
-print("CONDA ENV NAME {}".format(args.name[0]))
-print("PYTHON VERSION {}".format(args.python[0]))
-print("CONDA FILE NAME {}".format(args.conda_file[0]))
-print("CONDA path {}".format(conda_path))
-
-sp.call("{} env create -n {} -f {}".format(conda_path, args.name[0], tmp_file), shell=True)
-os.unlink(tmp_file)
diff --git a/devtools/travis-ci/before_install.sh b/devtools/travis-ci/before_install.sh
deleted file mode 100755
index 86a4c2de2..000000000
--- a/devtools/travis-ci/before_install.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-# Temporarily change directory to $HOME to install software
-pushd .
-cd "$HOME"
-
-# Install Miniconda
-if [ "$TRAVIS_OS_NAME" == "osx" ]; then
- # Make OSX md5 mimic md5sum from linux, alias does not work
- md5sum () {
- command md5 -r "$@"
- }
- MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
-else
- MINICONDA=Miniconda3-latest-Linux-x86_64.sh
-fi
-MINICONDA_HOME=$HOME/miniconda
-
-echo "-- Installing latest Miniconda"
-if [ -d "$MINICONDA_HOME/bin" ]; then
- echo "-- Miniconda latest version FOUND in cache"
-
- # Config settings are not saved in the cache
- export PIP_ARGS="-U"
- export PATH=$MINICONDA_HOME/bin:$PATH
-
- conda config --set always_yes yes --set changeps1 no
-else
- MINICONDA_MD5=$(wget -qO- https://repo.anaconda.com/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *\(.*\)<\/td> */\1/p')
- echo "-- Miniconda latest version NOT FOUND in cache"
- wget -q https://repo.continuum.io/miniconda/$MINICONDA
- if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then
- echo "Miniconda MD5 mismatch"
- exit 1
- fi
- # Travis creates the cached directories for us.
- # This is problematic when wanting to install Anaconda for the first time...
- rm -rf "$MINICONDA_HOME"
- bash $MINICONDA -b -p "$MINICONDA_HOME"
-
- # Configure miniconda
- export PIP_ARGS="-U"
- export PATH=$MINICONDA_HOME/bin:$PATH
-
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
-
- rm -f $MINICONDA
-fi
-echo "-- Done with latest Miniconda"
-
-# Restore original directory
-popd
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644
index 2b1c9a53f..000000000
--- a/docs/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# Minimal makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-SPHINXPROJ = QCEngine
-SOURCEDIR = source
-BUILDDIR = build
-
-# Put it first so that "make" without argument is like "make help".
-help:
- @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
-.PHONY: help Makefile
-
-# Catch-all target: route all unknown targets to Sphinx using the new
-# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/README.md b/docs/README.md
deleted file mode 100644
index efbd5912c..000000000
--- a/docs/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Compiling QCEngine's Documentation
-
-The docs for this project are built with Sphinx. To compile the docs, first ensure that Sphinx and the ReadTheDocs theme are installed.
-
-```
-conda install sphinx sphinx_rtd_theme
-```
-
-Once installed, you can use the Makefile in this directory to compile static HTML pages by
-
-```
-make html
-```
-
-The compiled docs will be in the _build directory and can be viewed by opening index.html (which may itself be inside a directory called html/ depending on what version of Sphinx is installed).
diff --git a/docs/requirements.yml b/docs/requirements.yml
deleted file mode 100644
index e1ff1a1f2..000000000
--- a/docs/requirements.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: qcengine-docs
-channels:
- - defaults
- - conda-forge
-dependencies:
- - python=3
- - sphinx <4
- - sphinx_rtd_theme
- - sphinx-automodapi
- - graphviz
-
- # QCEngine depends
- - numpy
- - pydantic >=0.30.1
- - qcelemental >=0.9.0
-
- - pip:
- - git+git://github.com/MolSSI/qcarchive-sphinx-theme#egg=qcarchive_sphinx_theme
diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html
deleted file mode 100644
index acf5c8e37..000000000
--- a/docs/source/_templates/layout.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "!layout.html" %}
-
-{% block extrahead %}
-
-
-
-{{ super() }}
-{% endblock %}
-
-{% block extrabody %}
-
-
-
-{{ super() }}
-{% endblock %}
diff --git a/docs/source/conf.py b/docs/source/conf.py
deleted file mode 100644
index 1d210f1ff..000000000
--- a/docs/source/conf.py
+++ /dev/null
@@ -1,212 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Configuration file for the Sphinx documentation builder.
-#
-# This file does only contain a selection of the most common options. For a
-# full list see the documentation:
-# http://www.sphinx-doc.org/en/master/config
-
-import datetime
-import os
-import sys
-
-sys.path.insert(0, os.path.abspath('../..'))
-import qcengine
-
-# -- Path setup --------------------------------------------------------------
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
-# import os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
-
-
-# -- Project information -----------------------------------------------------
-
-project = 'QCEngine'
-copyright = f'2018-{datetime.datetime.today().year}, The Molecular Sciences Software Institute'
-author = 'The QCArchive Development Team'
-
-# The short X.Y version
-version = qcengine.__version__
-# The full version, including alpha/beta/rc tags
-release = qcengine.__version__
-
-
-# -- General configuration ---------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#
-# needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.doctest',
- 'sphinx.ext.todo',
- 'sphinx.ext.coverage',
- 'sphinx.ext.mathjax',
- 'sphinx.ext.viewcode',
- 'sphinx.ext.extlinks',
- 'sphinx.ext.graphviz',
- 'sphinx.ext.autosummary',
- 'sphinx.ext.napoleon',
- 'sphinx_automodapi.automodapi',
- 'sphinx_automodapi.automodsumm',
- 'sphinx_automodapi.smart_resolver',
- "sphinx_autodoc_typehints",
- "sphinxcontrib.autodoc_pydantic",
-]
-
-autosummary_generate = True
-automodapi_toctreedirnm = 'api'
-autodoc_typehints = "description"
-napoleon_use_param = True
-napoleon_use_rtype = True
-autodoc_pydantic_model_hide_paramlist = True
-autodoc_pydantic_model_show_config_summary = False
-autodoc_pydantic_field_swap_name_and_alias = True
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix(es) of source filenames.
-# You can specify multiple suffix as a list of string:
-#
-# source_suffix = ['.rst', '.md']
-source_suffix = '.rst'
-
-# The master toctree document.
-master_doc = 'index'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = "en"
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This pattern also affects html_static_path and html_extra_path .
-exclude_patterns = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'default'
-
-
-# -- Options for HTML output -------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-#
-html_theme = 'sphinx_rtd_theme'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#
-# html_theme_options = {}
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Custom sidebar templates, must be a dictionary that maps document names
-# to template names.
-#
-# The default sidebars (for documents that don't match any pattern) are
-# defined by theme itself. Builtin themes are using these templates by
-# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
-# 'searchbox.html']``.
-#
-# html_sidebars = {}
-
-
-# -- Options for HTMLHelp output ---------------------------------------------
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'QCEnginedoc'
-
-
-# -- Options for LaTeX output ------------------------------------------------
-
-latex_elements = {
- # The paper size ('letterpaper' or 'a4paper').
- #
- # 'papersize': 'letterpaper',
-
- # The font size ('10pt', '11pt' or '12pt').
- #
- # 'pointsize': '10pt',
-
- # Additional stuff for the LaTeX preamble.
- #
- # 'preamble': '',
-
- # Latex figure (float) alignment
- #
- # 'figure_align': 'htbp',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- (master_doc, 'QCEngine.tex', 'QCEngine Documentation',
- 'The QCArchive Development Team', 'manual'),
-]
-
-
-# -- Options for manual page output ------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- (master_doc, 'qcengine', 'QCEngine Documentation',
- [author], 1)
-]
-
-
-# -- Options for Texinfo output ----------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- (master_doc, 'QCEngine', 'QCEngine Documentation',
- author, 'QCEngine', 'One line description of project.',
- 'Miscellaneous'),
-]
-
-
-# -- Extension configuration -------------------------------------------------
-
-extlinks = {
- 'issue': ('https://github.com/MolSSI/QCEngine/issues/%s', 'GH#%s'),
- 'pr': ('https://github.com/MolSSI/QCEngine/pull/%s', 'GH#%s')
-}
-
-# -- Options for intersphinx extension ---------------------------------------
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'python': ('https://docs.python.org/3.10', None),
- "numpy": ("https://numpy.org/doc/stable/", None),
- 'scipy': ('https://docs.scipy.org/doc/scipy/', None),
- 'matplotlib': ('https://matplotlib.org/stable/', None),
- "qcelemental": ("http://docs.qcarchive.molssi.org/projects/QCElemental/en/latest/", None),
- "qcportal": ("http://docs.qcarchive.molssi.org/projects/QCPortal/en/latest/", None),
- "qcfractal": ("http://docs.qcarchive.molssi.org/projects/QCFractal/en/latest/", None),
- }
-
-# -- Options for todo extension ----------------------------------------------
-
-# If true, `todo` and `todoList` produce output, else they produce nothing.
-todo_include_todos = True
diff --git a/environment.html b/environment.html
new file mode 100644
index 000000000..27db71730
--- /dev/null
+++ b/environment.html
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+ Environment Detection — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Environment Detection
+QCEngine can inspect the current compute environment to determine the resources available to it.
+
+Node Description
+QCEngine can detect node descriptions to obtain general information about the current node.
+>>> qcng . config . get_node_descriptor ()
+<NodeDescriptor hostname_pattern='*' name='default' scratch_directory=None
+ memory=5.568 memory_safety_factor=10 ncores=4 jobs_per_node=2>
+
+
+
+
+Config
+The configuration file operated based on the current node descriptor and can be overridden:
+>>> qcng . get_config ()
+<JobConfig ncores=2 memory=2.506 scratch_directory=None>
+
+>>> qcng . get_config ( task_config = { "scratch_directory" : "/tmp" })
+<JobConfig ncores=2 memory=2.506 scratch_directory='/tmp'>
+
+>>> os . environ [ "SCRATCH" ] = "/my_scratch"
+>>> qcng . get_config ( task_config = { "scratch_directory" : "$SCRATCH" })
+<JobConfig ncores=2 memory=2.506 scratch_directory='/my_scratch'>
+
+
+
+
+Global Environment
+The global environment can also be inspected directly.
+>>> qcng . config . get_global ()
+{
+ 'hostname': 'qcarchive.molssi.org',
+ 'memory': 5.568,
+ 'username': 'user',
+ 'ncores': 4,
+ 'cpuinfo': {
+ 'python_version': '3.6.7.final.0 (64 bit)',
+ 'brand': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',
+ 'hz_advertised': '2.9000 GHz',
+ ...
+ },
+ 'cpu_brand': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz'
+}
+
+
+
+
+Configuration Files
+The computational environment defaults can be overridden by configuration files.
+Configuration files must be named qcengine.yaml
and stored either in the directory
+from which you run QCEngine, a folder named .qcarchive
in your home directory,
+or in a folder specified by the DQM_CONFIG_PATH
environmental variable.
+Only one configuration file will be used if multiple are available.
+The DQM_CONFIG_PATH
configuration file takes precedence over the current directory,
+which takes precedence over the .qcarchive
folder.
+The configuration file is a YAML file that contains a dictionary of different node configurations.
+The keys in the YAML file are human-friendly names for the configurations.
+The values are dictionaries that define configurations for different nodes,
+following the NodeDescription
schema:
+
+
+pydantic model qcengine.config. NodeDescriptor [source]
+Description of an individual node
+
+Show JSON schema {
+ "title" : "NodeDescriptor" ,
+ "description" : "Description of an individual node" ,
+ "type" : "object" ,
+ "properties" : {
+ "hostname_pattern" : {
+ "title" : "Hostname Pattern" ,
+ "type" : "string"
+ },
+ "name" : {
+ "title" : "Name" ,
+ "type" : "string"
+ },
+ "scratch_directory" : {
+ "title" : "Scratch Directory" ,
+ "type" : "string"
+ },
+ "memory" : {
+ "title" : "Memory" ,
+ "type" : "number"
+ },
+ "memory_safety_factor" : {
+ "title" : "Memory Safety Factor" ,
+ "default" : 10 ,
+ "type" : "integer"
+ },
+ "ncores" : {
+ "title" : "Ncores" ,
+ "description" : "Number of cores accessible to each task on this node\n \n The default value, ``None``, will allow QCEngine to autodetect the number of cores." ,
+ "type" : "integer"
+ },
+ "jobs_per_node" : {
+ "title" : "Jobs Per Node" ,
+ "default" : 1 ,
+ "type" : "integer"
+ },
+ "retries" : {
+ "title" : "Retries" ,
+ "default" : 0 ,
+ "type" : "integer"
+ },
+ "is_batch_node" : {
+ "title" : "Is Batch Node" ,
+ "default" : false ,
+ "help" : "Whether the node running QCEngine is a batch node\n \n Some clusters are configured such that tasks are launched from a special \"batch\" or \"MOM\" onto the compute nodes.\n The compute nodes on such clusters often have a different CPU architecture than the batch nodes and \n often are unable to launch MPI tasks, which has two implications:\n 1) QCEngine must make *all* calls to an executable via ``mpirun`` because the executables might not\n be able to run on the batch node. \n 2) QCEngine must run on the batch node to be able to launch tasks on the more than one compute nodes \n \n ``is_batch_node`` is used when creating the task configuration as a means of determining whether\n ``mpiexec_command`` must always be used even for serial jobs (e.g., getting the version number)\n " ,
+ "type" : "boolean"
+ },
+ "mpiexec_command" : {
+ "title" : "Mpiexec Command" ,
+ "description" : "Invocation for launching node-parallel tasks with MPI\n \n The invocation need not specify the number of nodes, tasks, or cores per node.\n Information about the task configuration will be added to the command by use of\n Python's string formatting. The configuration will be supplied as the following variables:\n \n {nnodes} - Number of nodes\n {ranks_per_node} - Number of MPI ranks per node\n {cores_per_rank} - Number of cores to use for each MPI rank\n {total_ranks} - Total number of MPI ranks\n \n As examples, the ``aprun`` command on Cray systems should be similar to \n ``aprun -n {total_ranks} -N {ranks_per_node}`` and ``mpirun`` from OpenMPI should\n be similar to ``mpirun -np {total_ranks} -N {ranks_per_node}``.\n \n Programs where each MPI rank can use multiple threads (e.g., QC programs with MPI+OpenMP) can \n use the {cores_per_rank} option to control the hybrid parallelism. \n As an example, the Cray ``aprun`` command using this figure could be:\n ``aprun -n {total_ranks} -N {ranks_per_node} -d {cores_per_rank} -j 1``.\n The appropriate number of ranks per node will be determined based on the number of\n cores per node and the number of cores per rank.\n " ,
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "hostname_pattern" ,
+ "name"
+ ],
+ "additionalProperties" : false
+}
+
+
+
+Fields:
+
+
+
+
+
+field hostname_pattern : str
[Required]
+
+
+
+
+field is_batch_node : bool
= False
+
+
+
+
+field jobs_per_node : int
= 1
+
+
+
+
+field memory : Optional
[ float
] = None
+
+
+
+
+field memory_safety_factor : int
= 10
+
+
+
+
+field mpiexec_command : Optional
[ str
] = None
+Invocation for launching node-parallel tasks with MPI
+The invocation need not specify the number of nodes, tasks, or cores per node.
+Information about the task configuration will be added to the command by use of
+Python’s string formatting. The configuration will be supplied as the following variables:
+
+{nnodes} - Number of nodes
+{ranks_per_node} - Number of MPI ranks per node
+{cores_per_rank} - Number of cores to use for each MPI rank
+{total_ranks} - Total number of MPI ranks
+
+As examples, the aprun
command on Cray systems should be similar to
+aprun -n {total_ranks} -N {ranks_per_node}
and mpirun
from OpenMPI should
+be similar to mpirun -np {total_ranks} -N {ranks_per_node}
.
+Programs where each MPI rank can use multiple threads (e.g., QC programs with MPI+OpenMP) can
+use the {cores_per_rank} option to control the hybrid parallelism.
+As an example, the Cray aprun
command using this figure could be:
+aprun -n {total_ranks} -N {ranks_per_node} -d {cores_per_rank} -j 1
.
+The appropriate number of ranks per node will be determined based on the number of
+cores per node and the number of cores per rank.
+
+
+
+
+field name : str
[Required]
+
+
+
+
+field ncores : Optional
[ int
] = None
+Number of cores accessible to each task on this node
+The default value, None
, will allow QCEngine to autodetect the number of cores.
+
+
+
+
+field retries : int
= 0
+
+
+
+
+field scratch_directory : Optional
[ str
] = None
+
+
+
+
+When running QCEngine, the proper configuration for a node is determined based on the hostname of the node
+and matching the hostname_pattern
to each of the configurations defined in qcengine.yaml
.
+An example qcengine.yaml
file that sets the scratch directory for all nodes is as follows:
+all :
+ hostname_pattern : "*"
+ scratch_directory : ./scratch
+
+
+
+
+Cluster Configuration
+A node configuration file is required when using node-parallel tasks on a compute cluster.
+The configuration file must contain a description of the command used to launch MPI tasks and,
+in some cases, the designation that a certain node is a compute node.
+See the descriptions for mpiexec_command
and is_batch_node
in the NodeDescriptor
+documentation for further details.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Examples.ipynb b/examples/Examples.ipynb
deleted file mode 100644
index b1d071d3a..000000000
--- a/examples/Examples.ipynb
+++ /dev/null
@@ -1,729 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [],
- "source": [
- "import qcelemental\n",
- "import qcengine\n",
- "import json"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## A simple quantum chemistry task\n",
- "\n",
- "A single task can be written"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {},
- "outputs": [],
- "source": [
- "mol = qcelemental.models.Molecule.from_data(\"\"\"\n",
- " O 0.000000000000 0.000000000000 -0.068516245955\n",
- " H 0.000000000000 -0.790689888800 0.543701278274\n",
- " H 0.000000000000 0.790689888800 0.543701278274\n",
- "\"\"\")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'schema_name': 'qcschema_input',\n",
- " 'schema_version': 1,\n",
- " 'molecule': < Geometry (in Angstrom), charge = 0.0, multiplicity = 1:\n",
- " \n",
- " Center X Y Z \n",
- " ------------ ----------------- ----------------- -----------------\n",
- " O 0.000000000000 0.000000000000 -0.068516245955\n",
- " H 0.000000000000 -0.790689888800 0.543701278274\n",
- " H 0.000000000000 0.790689888800 0.543701278274\n",
- " \n",
- " >,\n",
- " 'driver': 'energy',\n",
- " 'model': {'method': 'SCF', 'basis': 'sto-3g'},\n",
- " 'keywords': {'scf_type': 'df'},\n",
- " 'return_output': False}"
- ]
- },
- "execution_count": 14,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "psi4_task = {\n",
- " \"schema_name\": \"qcschema_input\",\n",
- " \"schema_version\": 1,\n",
- " \"molecule\": mol,\n",
- " \"driver\": \"energy\",\n",
- " \"model\": {\"method\": \"SCF\", \"basis\": \"sto-3g\"},\n",
- " \"keywords\": {\"scf_type\": \"df\"},\n",
- " \"return_output\": False\n",
- "}\n",
- "\n",
- "psi4_task"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12947694,\n",
- " 0.0,\n",
- " -1.49418734,\n",
- " 1.02744651,\n",
- " 0.0,\n",
- " 1.49418734,\n",
- " 1.02744651],\n",
- " 'name': 'H2O',\n",
- " 'molecular_charge': 0.0,\n",
- " 'molecular_multiplicity': 1,\n",
- " 'masses': [15.99491461957, 1.00782503223, 1.00782503223],\n",
- " 'real': [True, True, True],\n",
- " 'atom_labels': ['', '', ''],\n",
- " 'atomic_numbers': [8, 1, 1],\n",
- " 'mass_numbers': [16, 1, 1],\n",
- " 'fragments': [[0, 1, 2]],\n",
- " 'fragment_charges': [0.0],\n",
- " 'fragment_multiplicities': [1],\n",
- " 'fix_com': False,\n",
- " 'fix_orientation': False,\n",
- " 'provenance': {'creator': 'QCElemental',\n",
- " 'version': 'v0.2.6',\n",
- " 'routine': 'qcelemental.molparse.from_string'}},\n",
- " 'driver': 'energy',\n",
- " 'model': {'method': 'SCF', 'basis': 'sto-3g'},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {'scf_type': 'df'},\n",
- " 'provenance': {'creator': 'Psi4',\n",
- " 'version': '1.2.1',\n",
- " 'routine': 'psi4.json.run_json',\n",
- " 'nthreads': 2,\n",
- " 'memory': 2.363,\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 0.39830708503723145,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': -74.96475169983995,\n",
- " 'properties': {'calcinfo_nbasis': 7,\n",
- " 'calcinfo_nmo': 7,\n",
- " 'calcinfo_nalpha': 5,\n",
- " 'calcinfo_nbeta': 5,\n",
- " 'calcinfo_natom': 3,\n",
- " 'nuclear_repulsion_energy': 8.80146205625184,\n",
- " 'return_energy': -74.96475169983995,\n",
- " 'scf_one_electron_energy': -121.67648822135493,\n",
- " 'scf_two_electron_energy': 37.91027446526314,\n",
- " 'scf_dipole_moment': [0.0, 0.0, 1.6686844760157988],\n",
- " 'scf_total_energy': -74.96475169983995,\n",
- " 'scf_iterations': 6},\n",
- " 'error': None,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'psi4:qcvars': {'CURRENT DIPOLE X': 0.0,\n",
- " 'CURRENT DIPOLE Y': 0.0,\n",
- " 'CURRENT DIPOLE Z': 1.6686844760157988,\n",
- " 'CURRENT ENERGY': -74.96475169983995,\n",
- " 'CURRENT REFERENCE ENERGY': -74.96475169983995,\n",
- " 'HF TOTAL ENERGY': -74.96475169983995,\n",
- " 'NUCLEAR REPULSION ENERGY': 8.80146205625184,\n",
- " 'ONE-ELECTRON ENERGY': -121.67648822135493,\n",
- " 'PCM POLARIZATION ENERGY': 0.0,\n",
- " 'SCF DIPOLE X': 0.0,\n",
- " 'SCF DIPOLE Y': 0.0,\n",
- " 'SCF DIPOLE Z': 1.6686844760157988,\n",
- " 'SCF ITERATION ENERGY': -74.96475169983995,\n",
- " 'SCF ITERATIONS': 6.0,\n",
- " 'SCF N ITERS': 6.0,\n",
- " 'SCF TOTAL ENERGY': -74.96475169983995,\n",
- " 'TWO-ELECTRON ENERGY': 37.91027446526314},\n",
- " 'stdout': '\\n Memory set to 2.363 GiB by Python driver.\\n\\n*** tstart() called on Daniels-MacBook-Pro.local\\n*** at Thu Feb 21 14:26:27 2019\\n\\n => Loading Basis Set <=\\n\\n Name: STO-3G\\n Role: ORBITAL\\n Keyword: BASIS\\n atoms 1 entry O line 81 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/sto-3g.gbs \\n atoms 2-3 entry H line 19 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/sto-3g.gbs \\n\\n\\n ---------------------------------------------------------\\n SCF\\n by Justin Turney, Rob Parrish, Andy Simmonett\\n and Daniel Smith\\n RHF Reference\\n 2 Threads, 2419 MiB Core\\n ---------------------------------------------------------\\n\\n ==> Geometry <==\\n\\n Molecular point group: c2v\\n Full point group: C2v\\n\\n Geometry (in Bohr), charge = 0, multiplicity = 1:\\n\\n Center X Y Z Mass \\n ------------ ----------------- ----------------- ----------------- -----------------\\n O 0.000000000000 0.000000000000 -0.129476941311 15.994914619570\\n H 0.000000000000 -1.494187340000 1.027446508689 1.007825032230\\n H -0.000000000000 1.494187340000 1.027446508689 1.007825032230\\n\\n Running in c2v symmetry.\\n\\n Rotational constants: A = 25.12553 B = 13.37732 C = 8.72954 [cm^-1]\\n Rotational constants: A = 753244.47078 B = 401041.84756 C = 261705.04616 [MHz]\\n Nuclear repulsion = 8.801462056251840\\n\\n Charge = 0\\n Multiplicity = 1\\n Electrons = 10\\n Nalpha = 5\\n Nbeta = 5\\n\\n ==> Algorithm <==\\n\\n SCF Algorithm Type is DF.\\n DIIS enabled.\\n MOM disabled.\\n Fractional occupation disabled.\\n Guess Type is SAD.\\n Energy threshold = 1.00e-06\\n Density threshold = 1.00e-06\\n Integral threshold = 0.00e+00\\n\\n ==> Primary Basis <==\\n\\n Basis Set: STO-3G\\n Blend: STO-3G\\n Number of shells: 5\\n Number of basis function: 7\\n Number of Cartesian functions: 7\\n Spherical Harmonics?: true\\n Max angular momentum: 1\\n\\n => Loading Basis Set <=\\n\\n Name: (STO-3G AUX)\\n Role: JKFIT\\n Keyword: DF_BASIS_SCF\\n atoms 1 entry O line 323 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/def2-svp-jkfit.gbs \\n atoms 2-3 entry H line 23 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/def2-svp-jkfit.gbs \\n\\n ==> Pre-Iterations <==\\n\\n -------------------------------------------------------\\n Irrep Nso Nmo Nalpha Nbeta Ndocc Nsocc\\n -------------------------------------------------------\\n A1 4 4 0 0 0 0\\n A2 0 0 0 0 0 0\\n B1 1 1 0 0 0 0\\n B2 2 2 0 0 0 0\\n -------------------------------------------------------\\n Total 7 7 5 5 5 0\\n -------------------------------------------------------\\n\\n ==> Integral Setup <==\\n\\n DFHelper Memory: AOs need 0.000 [GiB]; user supplied 1.772 [GiB]. Using in-core AOs.\\n\\n ==> MemDFJK: Density-Fitted J/K Matrices <==\\n\\n J tasked: Yes\\n K tasked: Yes\\n wK tasked: No\\n OpenMP threads: 2\\n Memory (MB): 1814\\n Algorithm: Core\\n Schwarz Cutoff: 1E-12\\n Mask sparsity (%): 0.0000\\n Fitting Condition: 1E-12\\n\\n => Auxiliary Basis Set <=\\n\\n Basis Set: (STO-3G AUX)\\n Blend: DEF2-SVP-JKFIT\\n Number of shells: 37\\n Number of basis function: 113\\n Number of Cartesian functions: 133\\n Spherical Harmonics?: true\\n Max angular momentum: 4\\n\\n Minimum eigenvalue in the overlap matrix is 3.7028426405E-01.\\n Using Symmetric Orthogonalization.\\n\\n SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF.\\n\\n ==> Iterations <==\\n\\n Total Energy Delta E RMS |[F,P]|\\n\\n @DF-RHF iter 0: -74.69402902983985 -7.46940e+01 2.97675e-01 \\n @DF-RHF iter 1: -74.91405389559668 -2.20025e-01 5.19907e-02 \\n @DF-RHF iter 2: -74.96251196514112 -4.84581e-02 9.52327e-03 DIIS\\n @DF-RHF iter 3: -74.96429870282233 -1.78674e-03 3.64833e-03 DIIS\\n @DF-RHF iter 4: -74.96474887540938 -4.50173e-04 3.39468e-04 DIIS\\n @DF-RHF iter 5: -74.96475167030835 -2.79490e-06 3.89206e-05 DIIS\\n @DF-RHF iter 6: -74.96475169983995 -2.95316e-08 8.30820e-07 DIIS\\n\\n ==> Post-Iterations <==\\n\\n Orbital Energies [Eh]\\n ---------------------\\n\\n Doubly Occupied: \\n\\n 1A1 -20.247493 2A1 -1.247793 1B2 -0.595851 \\n 3A1 -0.447885 1B1 -0.388958 \\n\\n Virtual: \\n\\n 4A1 0.564174 2B2 0.693043 \\n\\n Final Occupation by Irrep:\\n A1 A2 B1 B2 \\n DOCC [ 3, 0, 1, 1 ]\\n\\n Energy converged.\\n\\n @DF-RHF Final Energy: -74.96475169983995\\n\\n => Energetics <=\\n\\n Nuclear Repulsion Energy = 8.8014620562518395\\n One-Electron Energy = -121.6764882213549299\\n Two-Electron Energy = 37.9102744652631429\\n Total Energy = -74.9647516998399510\\n\\n\\n\\nProperties will be evaluated at 0.000000, 0.000000, 0.000000 [a0]\\n\\nProperties computed using the SCF density matrix\\n\\n Nuclear Dipole Moment: [e a0]\\n X: 0.0000 Y: 0.0000 Z: 1.0191\\n\\n Electronic Dipole Moment: [e a0]\\n X: 0.0000 Y: 0.0000 Z: -0.3626\\n\\n Dipole Moment: [e a0]\\n X: 0.0000 Y: 0.0000 Z: 0.6565 Total: 0.6565\\n\\n Dipole Moment: [D]\\n X: 0.0000 Y: 0.0000 Z: 1.6687 Total: 1.6687\\n\\n\\n*** tstop() called on Daniels-MacBook-Pro.local at Thu Feb 21 14:26:27 2019\\nModule time:\\n\\tuser time = 0.44 seconds = 0.01 minutes\\n\\tsystem time = 0.02 seconds = 0.00 minutes\\n\\ttotal time = 0 seconds = 0.00 minutes\\nTotal time:\\n\\tuser time = 1.23 seconds = 0.02 minutes\\n\\tsystem time = 0.17 seconds = 0.00 minutes\\n\\ttotal time = 259 seconds = 4.32 minutes\\n'}"
- ]
- },
- "execution_count": 15,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "qcengine.compute(psi4_task, \"psi4\")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12947694,\n",
- " 0.0,\n",
- " -1.49418734,\n",
- " 1.02744651,\n",
- " 0.0,\n",
- " 1.49418734,\n",
- " 1.02744651],\n",
- " 'name': 'H2O',\n",
- " 'molecular_charge': 0.0,\n",
- " 'molecular_multiplicity': 1,\n",
- " 'masses': [15.99491461957, 1.00782503223, 1.00782503223],\n",
- " 'real': [True, True, True],\n",
- " 'atom_labels': ['', '', ''],\n",
- " 'atomic_numbers': [8, 1, 1],\n",
- " 'mass_numbers': [16, 1, 1],\n",
- " 'fragments': [[0, 1, 2]],\n",
- " 'fragment_charges': [0.0],\n",
- " 'fragment_multiplicities': [1],\n",
- " 'fix_com': False,\n",
- " 'fix_orientation': False,\n",
- " 'provenance': {'creator': 'QCElemental',\n",
- " 'version': 'v0.2.6',\n",
- " 'routine': 'qcelemental.molparse.from_string'}},\n",
- " 'driver': 'gradient',\n",
- " 'model': {'method': 'SCF', 'basis': 'sto-3g'},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {'scf_type': 'df'},\n",
- " 'provenance': {'creator': 'Psi4',\n",
- " 'version': '1.2.1',\n",
- " 'routine': 'psi4.json.run_json',\n",
- " 'nthreads': 2,\n",
- " 'memory': 2.363,\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 0.5595040321350098,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': [1.9894085953542391e-29,\n",
- " 0.0,\n",
- " 0.00177377357460623,\n",
- " 5.930424637099778e-19,\n",
- " -0.019370236843236188,\n",
- " -0.0008868867872527386,\n",
- " -5.930424637297979e-19,\n",
- " 0.019370236843236188,\n",
- " -0.0008868867872527386],\n",
- " 'properties': {'calcinfo_nbasis': 7,\n",
- " 'calcinfo_nmo': 7,\n",
- " 'calcinfo_nalpha': 5,\n",
- " 'calcinfo_nbeta': 5,\n",
- " 'calcinfo_natom': 3,\n",
- " 'nuclear_repulsion_energy': 8.80146205625184,\n",
- " 'return_energy': -74.96475169985098,\n",
- " 'scf_one_electron_energy': -121.6764697280917,\n",
- " 'scf_two_electron_energy': 37.91025597198889,\n",
- " 'scf_dipole_moment': [0.0, 0.0, 1.668684982939947],\n",
- " 'scf_total_energy': -74.96475169985098,\n",
- " 'scf_iterations': 8},\n",
- " 'error': None,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'psi4:qcvars': {'CURRENT DIPOLE X': 0.0,\n",
- " 'CURRENT DIPOLE Y': 0.0,\n",
- " 'CURRENT DIPOLE Z': 1.668684982939947,\n",
- " 'CURRENT ENERGY': -74.96475169985098,\n",
- " 'CURRENT REFERENCE ENERGY': -74.96475169985098,\n",
- " 'HF TOTAL ENERGY': -74.96475169985098,\n",
- " 'NUCLEAR REPULSION ENERGY': 8.80146205625184,\n",
- " 'ONE-ELECTRON ENERGY': -121.6764697280917,\n",
- " 'PCM POLARIZATION ENERGY': 0.0,\n",
- " 'SCF DIPOLE X': 0.0,\n",
- " 'SCF DIPOLE Y': 0.0,\n",
- " 'SCF DIPOLE Z': 1.668684982939947,\n",
- " 'SCF ITERATION ENERGY': -74.96475169985098,\n",
- " 'SCF ITERATIONS': 8.0,\n",
- " 'SCF N ITERS': 8.0,\n",
- " 'SCF TOTAL ENERGY': -74.96475169985098,\n",
- " 'TWO-ELECTRON ENERGY': 37.91025597198889},\n",
- " 'stdout': '\\n Memory set to 2.363 GiB by Python driver.\\ngradient() will perform analytic gradient computation.\\n\\n*** tstart() called on Daniels-MacBook-Pro.local\\n*** at Thu Feb 21 14:26:30 2019\\n\\n => Loading Basis Set <=\\n\\n Name: STO-3G\\n Role: ORBITAL\\n Keyword: BASIS\\n atoms 1 entry O line 81 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/sto-3g.gbs \\n atoms 2-3 entry H line 19 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/sto-3g.gbs \\n\\n\\n ---------------------------------------------------------\\n SCF\\n by Justin Turney, Rob Parrish, Andy Simmonett\\n and Daniel Smith\\n RHF Reference\\n 2 Threads, 2419 MiB Core\\n ---------------------------------------------------------\\n\\n ==> Geometry <==\\n\\n Molecular point group: c2v\\n Full point group: C2v\\n\\n Geometry (in Bohr), charge = 0, multiplicity = 1:\\n\\n Center X Y Z Mass \\n ------------ ----------------- ----------------- ----------------- -----------------\\n O 0.000000000000 0.000000000000 -0.129476941311 15.994914619570\\n H 0.000000000000 -1.494187340000 1.027446508689 1.007825032230\\n H -0.000000000000 1.494187340000 1.027446508689 1.007825032230\\n\\n Running in c2v symmetry.\\n\\n Rotational constants: A = 25.12553 B = 13.37732 C = 8.72954 [cm^-1]\\n Rotational constants: A = 753244.47078 B = 401041.84756 C = 261705.04616 [MHz]\\n Nuclear repulsion = 8.801462056251840\\n\\n Charge = 0\\n Multiplicity = 1\\n Electrons = 10\\n Nalpha = 5\\n Nbeta = 5\\n\\n ==> Algorithm <==\\n\\n SCF Algorithm Type is DF.\\n DIIS enabled.\\n MOM disabled.\\n Fractional occupation disabled.\\n Guess Type is SAD.\\n Energy threshold = 1.00e-08\\n Density threshold = 1.00e-08\\n Integral threshold = 0.00e+00\\n\\n ==> Primary Basis <==\\n\\n Basis Set: STO-3G\\n Blend: STO-3G\\n Number of shells: 5\\n Number of basis function: 7\\n Number of Cartesian functions: 7\\n Spherical Harmonics?: true\\n Max angular momentum: 1\\n\\n => Loading Basis Set <=\\n\\n Name: (STO-3G AUX)\\n Role: JKFIT\\n Keyword: DF_BASIS_SCF\\n atoms 1 entry O line 323 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/def2-svp-jkfit.gbs \\n atoms 2-3 entry H line 23 file /Users/daniel/anaconda3/envs/qcf/share/psi4/basis/def2-svp-jkfit.gbs \\n\\n ==> Pre-Iterations <==\\n\\n -------------------------------------------------------\\n Irrep Nso Nmo Nalpha Nbeta Ndocc Nsocc\\n -------------------------------------------------------\\n A1 4 4 0 0 0 0\\n A2 0 0 0 0 0 0\\n B1 1 1 0 0 0 0\\n B2 2 2 0 0 0 0\\n -------------------------------------------------------\\n Total 7 7 5 5 5 0\\n -------------------------------------------------------\\n\\n ==> Integral Setup <==\\n\\n DFHelper Memory: AOs need 0.000 [GiB]; user supplied 1.772 [GiB]. Using in-core AOs.\\n\\n ==> MemDFJK: Density-Fitted J/K Matrices <==\\n\\n J tasked: Yes\\n K tasked: Yes\\n wK tasked: No\\n OpenMP threads: 2\\n Memory (MB): 1814\\n Algorithm: Core\\n Schwarz Cutoff: 1E-12\\n Mask sparsity (%): 0.0000\\n Fitting Condition: 1E-12\\n\\n => Auxiliary Basis Set <=\\n\\n Basis Set: (STO-3G AUX)\\n Blend: DEF2-SVP-JKFIT\\n Number of shells: 37\\n Number of basis function: 113\\n Number of Cartesian functions: 133\\n Spherical Harmonics?: true\\n Max angular momentum: 4\\n\\n Minimum eigenvalue in the overlap matrix is 3.7028426405E-01.\\n Using Symmetric Orthogonalization.\\n\\n SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF.\\n\\n ==> Iterations <==\\n\\n Total Energy Delta E RMS |[F,P]|\\n\\n @DF-RHF iter 0: -74.69402902983985 -7.46940e+01 2.97675e-01 \\n @DF-RHF iter 1: -74.91405389559664 -2.20025e-01 5.19907e-02 \\n @DF-RHF iter 2: -74.96251196514109 -4.84581e-02 9.52327e-03 DIIS\\n @DF-RHF iter 3: -74.96429870282233 -1.78674e-03 3.64833e-03 DIIS\\n @DF-RHF iter 4: -74.96474887540941 -4.50173e-04 3.39468e-04 DIIS\\n @DF-RHF iter 5: -74.96475167030833 -2.79490e-06 3.89206e-05 DIIS\\n @DF-RHF iter 6: -74.96475169983995 -2.95316e-08 8.30820e-07 DIIS\\n @DF-RHF iter 7: -74.96475169985094 -1.09850e-11 2.29675e-08 DIIS\\n @DF-RHF iter 8: -74.96475169985098 -4.26326e-14 1.44914e-10 DIIS\\n\\n ==> Post-Iterations <==\\n\\n Orbital Energies [Eh]\\n ---------------------\\n\\n Doubly Occupied: \\n\\n 1A1 -20.247493 2A1 -1.247793 1B2 -0.595851 \\n 3A1 -0.447885 1B1 -0.388958 \\n\\n Virtual: \\n\\n 4A1 0.564173 2B2 0.693043 \\n\\n Final Occupation by Irrep:\\n A1 A2 B1 B2 \\n DOCC [ 3, 0, 1, 1 ]\\n\\n Energy converged.\\n\\n @DF-RHF Final Energy: -74.96475169985098\\n\\n => Energetics <=\\n\\n Nuclear Repulsion Energy = 8.8014620562518395\\n One-Electron Energy = -121.6764697280917034\\n Two-Electron Energy = 37.9102559719888887\\n Total Energy = -74.9647516998509786\\n\\n\\n\\nProperties will be evaluated at 0.000000, 0.000000, 0.000000 [a0]\\n\\nProperties computed using the SCF density matrix\\n\\n Nuclear Dipole Moment: [e a0]\\n X: 0.0000 Y: 0.0000 Z: 1.0191\\n\\n Electronic Dipole Moment: [e a0]\\n X: 0.0000 Y: 0.0000 Z: -0.3626\\n\\n Dipole Moment: [e a0]\\n X: 0.0000 Y: 0.0000 Z: 0.6565 Total: 0.6565\\n\\n Dipole Moment: [D]\\n X: 0.0000 Y: 0.0000 Z: 1.6687 Total: 1.6687\\n\\n\\n*** tstop() called on Daniels-MacBook-Pro.local at Thu Feb 21 14:26:30 2019\\nModule time:\\n\\tuser time = 0.51 seconds = 0.01 minutes\\n\\tsystem time = 0.03 seconds = 0.00 minutes\\n\\ttotal time = 0 seconds = 0.00 minutes\\nTotal time:\\n\\tuser time = 1.78 seconds = 0.03 minutes\\n\\tsystem time = 0.20 seconds = 0.00 minutes\\n\\ttotal time = 262 seconds = 4.37 minutes\\n\\n*** tstart() called on Daniels-MacBook-Pro.local\\n*** at Thu Feb 21 14:26:30 2019\\n\\n\\n ------------------------------------------------------------\\n SCF GRAD \\n Rob Parrish, Justin Turney, \\n Andy Simmonett, and Alex Sokolov \\n ------------------------------------------------------------\\n\\n ==> Geometry <==\\n\\n Molecular point group: c2v\\n Full point group: C2v\\n\\n Geometry (in Bohr), charge = 0, multiplicity = 1:\\n\\n Center X Y Z Mass \\n ------------ ----------------- ----------------- ----------------- -----------------\\n O 0.000000000000 0.000000000000 -0.129476941311 15.994914619570\\n H 0.000000000000 -1.494187340000 1.027446508689 1.007825032230\\n H -0.000000000000 1.494187340000 1.027446508689 1.007825032230\\n\\n Nuclear repulsion = 8.801462056251840\\n\\n ==> Basis Set <==\\n\\n Basis Set: STO-3G\\n Blend: STO-3G\\n Number of shells: 5\\n Number of basis function: 7\\n Number of Cartesian functions: 7\\n Spherical Harmonics?: true\\n Max angular momentum: 1\\n\\n ==> DFJKGrad: Density-Fitted SCF Gradients <==\\n\\n Gradient: 1\\n J tasked: Yes\\n K tasked: Yes\\n wK tasked: No\\n OpenMP threads: 2\\n Integrals threads: 2\\n Memory (MB): 1814\\n Schwarz Cutoff: 0E+00\\n Fitting Condition: 1E-12\\n\\n => Auxiliary Basis Set <=\\n\\n Basis Set: (STO-3G AUX)\\n Blend: DEF2-SVP-JKFIT\\n Number of shells: 37\\n Number of basis function: 113\\n Number of Cartesian functions: 133\\n Spherical Harmonics?: true\\n Max angular momentum: 4\\n\\n\\n -Total Gradient:\\n Atom X Y Z\\n ------ ----------------- ----------------- -----------------\\n 1 0.000000000000 0.000000000000 0.001773773575\\n 2 0.000000000000 -0.019370236843 -0.000886886787\\n 3 -0.000000000000 0.019370236843 -0.000886886787\\n\\n\\n*** tstop() called on Daniels-MacBook-Pro.local at Thu Feb 21 14:26:30 2019\\nModule time:\\n\\tuser time = 0.17 seconds = 0.00 minutes\\n\\tsystem time = 0.01 seconds = 0.00 minutes\\n\\ttotal time = 0 seconds = 0.00 minutes\\nTotal time:\\n\\tuser time = 1.95 seconds = 0.03 minutes\\n\\tsystem time = 0.21 seconds = 0.00 minutes\\n\\ttotal time = 262 seconds = 4.37 minutes\\n'}"
- ]
- },
- "execution_count": 16,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "psi4_task[\"driver\"] = \"gradient\"\n",
- "qcengine.compute(psi4_task, \"psi4\")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12947694,\n",
- " 0.0,\n",
- " -1.49418734,\n",
- " 1.02744651,\n",
- " 0.0,\n",
- " 1.49418734,\n",
- " 1.02744651],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]]},\n",
- " 'driver': 'gradient',\n",
- " 'model': {'method': 'UFF', 'basis': None},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {'scf_type': 'df'},\n",
- " 'provenance': {'creator': 'rdkit',\n",
- " 'version': '2018.03.4',\n",
- " 'routine': 'rdkit.Chem.AllChem.UFFGetMoleculeForceField',\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 0.5387258529663086,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': [0.0,\n",
- " 0.0,\n",
- " -0.009643868612805792,\n",
- " 0.0,\n",
- " -0.006202887227922877,\n",
- " 0.004821934306402896,\n",
- " 0.0,\n",
- " 0.006202887227922877,\n",
- " 0.004821934306402896],\n",
- " 'properties': {'return_energy': 4.05209848561957e-05},\n",
- " 'error': None,\n",
- " 'return_output': False,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'stdout': 'No stdout recieved.'}"
- ]
- },
- "execution_count": 17,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "rdkit_task = {\n",
- " \"schema_name\": \"qcschema_input\",\n",
- " \"schema_version\": 1,\n",
- " \"molecule\": qcengine.get_molecule(\"water\"),\n",
- " \"driver\": \"gradient\",\n",
- " \"model\": {\"method\": \"UFF\", \"basis\": None},\n",
- " \"keywords\": {\"scf_type\": \"df\"},\n",
- " \"return_output\": False}\n",
- "qcengine.compute(rdkit_task, \"rdkit\")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12947694,\n",
- " 0.0,\n",
- " -1.49418734,\n",
- " 1.02744651,\n",
- " 0.0,\n",
- " 1.49418734,\n",
- " 1.02744651],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]]},\n",
- " 'driver': 'gradient',\n",
- " 'model': {'method': 'ani1', 'basis': None},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {'scf_type': 'df'},\n",
- " 'provenance': {'creator': 'torchani',\n",
- " 'version': 'unknown',\n",
- " 'routine': 'torchani.builtin.aev_computer',\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 6.07636284828186,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': [0.0,\n",
- " 0.0,\n",
- " -0.1136966422200203,\n",
- " 0.0,\n",
- " -0.09969407320022583,\n",
- " 0.056848324835300446,\n",
- " 0.0,\n",
- " 0.09969407320022583,\n",
- " 0.056848324835300446],\n",
- " 'properties': {'return_energy': -76.38631439208984},\n",
- " 'error': None,\n",
- " 'return_output': False,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'stdout': 'No stdout recieved.'}"
- ]
- },
- "execution_count": 18,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "torch_task = {\n",
- " \"schema_name\": \"qcschema_input\",\n",
- " \"schema_version\": 1,\n",
- " \"molecule\": qcengine.get_molecule(\"water\"),\n",
- " \"driver\": \"gradient\",\n",
- " \"model\": {\"method\": \"ani1\", \"basis\": None},\n",
- " \"keywords\": {\"scf_type\": \"df\"},\n",
- " \"return_output\": False}\n",
- "qcengine.compute(torch_task, \"torchani\")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'input_specification': {'driver': 'gradient',\n",
- " 'model': {'method': 'UFF', 'basis': None},\n",
- " 'schema_name': 'qcschema_input',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {}},\n",
- " 'initial_molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12947694,\n",
- " 0.0,\n",
- " -1.49418734,\n",
- " 1.02744651,\n",
- " 0.0,\n",
- " 1.49418734,\n",
- " 1.02744651],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]]},\n",
- " 'schema_name': 'qcschema_optimization_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {'coordsys': 'tric', 'maxiter': 100, 'program': 'rdkit'},\n",
- " 'final_molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.1218741,\n",
- " 0.0,\n",
- " -1.47972431,\n",
- " 1.02364509,\n",
- " 0.0,\n",
- " 1.47972431,\n",
- " 1.02364509],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]],\n",
- " 'fix_com': True,\n",
- " 'fix_orientation': True},\n",
- " 'success': True,\n",
- " 'id': None,\n",
- " 'trajectory': [{'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12947694,\n",
- " 0.0,\n",
- " -1.49418734,\n",
- " 1.02744651,\n",
- " 0.0,\n",
- " 1.49418734,\n",
- " 1.02744651],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]],\n",
- " 'fix_com': True,\n",
- " 'fix_orientation': True},\n",
- " 'driver': 'gradient',\n",
- " 'model': {'method': 'UFF', 'basis': None},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {},\n",
- " 'provenance': {'creator': 'rdkit',\n",
- " 'version': '2018.03.4',\n",
- " 'routine': 'rdkit.Chem.AllChem.UFFGetMoleculeForceField',\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 0.003949165344238281,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': [0.0,\n",
- " 0.0,\n",
- " -0.009643868612805792,\n",
- " 0.0,\n",
- " -0.006202887227922877,\n",
- " 0.004821934306402896,\n",
- " 0.0,\n",
- " 0.006202887227922877,\n",
- " 0.004821934306402896],\n",
- " 'properties': {'return_energy': 4.05209848561957e-05},\n",
- " 'error': None,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'stdout': 'No stdout recieved.'},\n",
- " {'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.12266448,\n",
- " 0.0,\n",
- " -1.48126327,\n",
- " 1.02404028,\n",
- " 0.0,\n",
- " 1.48126327,\n",
- " 1.02404028],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]],\n",
- " 'fix_com': True,\n",
- " 'fix_orientation': True},\n",
- " 'driver': 'gradient',\n",
- " 'model': {'method': 'UFF', 'basis': None},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {},\n",
- " 'provenance': {'creator': 'rdkit',\n",
- " 'version': '2018.03.4',\n",
- " 'routine': 'rdkit.Chem.AllChem.UFFGetMoleculeForceField',\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 0.0019562244415283203,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': [0.0,\n",
- " 0.0,\n",
- " -0.0010139850382173455,\n",
- " 0.0,\n",
- " -0.0006555212879753362,\n",
- " 0.0005069925191086728,\n",
- " 0.0,\n",
- " 0.0006555212879753362,\n",
- " 0.0005069925191086728],\n",
- " 'properties': {'return_energy': 4.508152898762255e-07},\n",
- " 'error': None,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'stdout': 'No stdout recieved.'},\n",
- " {'molecule': {'symbols': ['O', 'H', 'H'],\n",
- " 'geometry': [0.0,\n",
- " 0.0,\n",
- " -0.1218741,\n",
- " 0.0,\n",
- " -1.47972431,\n",
- " 1.02364509,\n",
- " 0.0,\n",
- " 1.47972431,\n",
- " 1.02364509],\n",
- " 'connectivity': [[0, 1, 1.0], [0, 2, 1.0]],\n",
- " 'fix_com': True,\n",
- " 'fix_orientation': True},\n",
- " 'driver': 'gradient',\n",
- " 'model': {'method': 'UFF', 'basis': None},\n",
- " 'id': None,\n",
- " 'schema_name': 'qcschema_output',\n",
- " 'schema_version': 1,\n",
- " 'keywords': {},\n",
- " 'provenance': {'creator': 'rdkit',\n",
- " 'version': '2018.03.4',\n",
- " 'routine': 'rdkit.Chem.AllChem.UFFGetMoleculeForceField',\n",
- " 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'wall_time': 0.0016818046569824219,\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'username': 'daniel',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local'},\n",
- " 'success': True,\n",
- " 'return_result': [0.0,\n",
- " 0.0,\n",
- " -8.404315685295723e-08,\n",
- " 0.0,\n",
- " 3.598898529188213e-08,\n",
- " 4.2021578426478616e-08,\n",
- " 0.0,\n",
- " -3.598898529188213e-08,\n",
- " 4.2021578426478616e-08],\n",
- " 'properties': {'return_energy': 9.14109548708188e-15},\n",
- " 'error': None,\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'stdout': 'No stdout recieved.'}],\n",
- " 'energies': [4.05209848561957e-05,\n",
- " 4.508152898762255e-07,\n",
- " 9.14109548708188e-15],\n",
- " 'error': None,\n",
- " 'provenance': {'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local',\n",
- " 'username': 'daniel',\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'wall_time': 0.6345179080963135,\n",
- " 'creator': 'QCEngine',\n",
- " 'version': 'v0.5.2+23.g6c46911'},\n",
- " 'stderr': 'No stderr recieved.',\n",
- " 'stdout': \"9 internal coordinates being used (instead of 9 Cartesians)\\nInternal coordinate system (atoms numbered from 1):\\nDistance 1-2\\nDistance 1-3\\nAngle 2-1-3\\nTranslation-X 1-3\\nTranslation-Y 1-3\\nTranslation-Z 1-3\\nRotation-A 1-3\\nRotation-B 1-3\\nRotation-C 1-3\\n : 2\\n : 1\\n : 1\\n : 1\\n : 1\\n : 1\\n : 1\\n : 1\\nStep 0 : Gradient = 8.494e-03/9.644e-03 (rms/max) Energy = 0.0000405210\\nHessian Eigenvalues: 5.00000e-02 5.00000e-02 5.00000e-02 ... 1.60000e-01 4.76883e-01 4.76883e-01\\nStep 1 : Displace = \\x1b[0m6.138e-03\\x1b[0m/\\x1b[0m7.073e-03\\x1b[0m (rms/max) Trust = 1.000e-01 (=) Grad = \\x1b[0m8.947e-04\\x1b[0m/\\x1b[0m1.014e-03\\x1b[0m (rms/max) E (change) = 0.0000004508 (\\x1b[0m-4.007e-05\\x1b[0m) Quality = \\x1b[0m0.310\\x1b[0m\\nHessian Eigenvalues: 5.00000e-02 5.00000e-02 5.00000e-02 ... 1.60001e-01 4.26582e-01 4.76883e-01\\nStep 2 : Displace = \\x1b[92m7.277e-04\\x1b[0m/\\x1b[92m8.408e-04\\x1b[0m (rms/max) Trust = 1.000e-01 (=) Grad = \\x1b[92m6.630e-08\\x1b[0m/\\x1b[92m8.404e-08\\x1b[0m (rms/max) E (change) = 0.0000000000 (\\x1b[92m-4.508e-07\\x1b[0m) Quality = \\x1b[0m0.280\\x1b[0m\\nConverged! =D\\n\"}"
- ]
- },
- "execution_count": 22,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "geometric_task = {\n",
- " \"schema_name\": \"qcschema_optimization_input\",\n",
- " \"schema_version\": 1,\n",
- " \"keywords\": {\n",
- " \"coordsys\": \"tric\",\n",
- " \"maxiter\": 100,\n",
- " \"program\": \"rdkit\"\n",
- " },\n",
- " \"input_specification\": {\n",
- " \"schema_name\": \"qcschema_input\",\n",
- " \"schema_version\": 1,\n",
- " \"driver\": \"gradient\",\n",
- " \"model\": {\"method\": \"UFF\", \"basis\": None},\n",
- " \"keywords\": {},\n",
- " },\n",
- " \"initial_molecule\": qcengine.get_molecule(\"water\"),\n",
- "}\n",
- "ret = qcengine.compute_procedure(geometric_task, \"geometric\")\n",
- "ret"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "9 internal coordinates being used (instead of 9 Cartesians)\n",
- "Internal coordinate system (atoms numbered from 1):\n",
- "Distance 1-2\n",
- "Distance 1-3\n",
- "Angle 2-1-3\n",
- "Translation-X 1-3\n",
- "Translation-Y 1-3\n",
- "Translation-Z 1-3\n",
- "Rotation-A 1-3\n",
- "Rotation-B 1-3\n",
- "Rotation-C 1-3\n",
- " : 2\n",
- " : 1\n",
- " : 1\n",
- " : 1\n",
- " : 1\n",
- " : 1\n",
- " : 1\n",
- " : 1\n",
- "Step 0 : Gradient = 8.494e-03/9.644e-03 (rms/max) Energy = 0.0000405210\n",
- "Hessian Eigenvalues: 5.00000e-02 5.00000e-02 5.00000e-02 ... 1.60000e-01 4.76883e-01 4.76883e-01\n",
- "Step 1 : Displace = \u001b[0m6.138e-03\u001b[0m/\u001b[0m7.073e-03\u001b[0m (rms/max) Trust = 1.000e-01 (=) Grad = \u001b[0m8.947e-04\u001b[0m/\u001b[0m1.014e-03\u001b[0m (rms/max) E (change) = 0.0000004508 (\u001b[0m-4.007e-05\u001b[0m) Quality = \u001b[0m0.310\u001b[0m\n",
- "Hessian Eigenvalues: 5.00000e-02 5.00000e-02 5.00000e-02 ... 1.60001e-01 4.26582e-01 4.76883e-01\n",
- "Step 2 : Displace = \u001b[92m7.277e-04\u001b[0m/\u001b[92m8.408e-04\u001b[0m (rms/max) Trust = 1.000e-01 (=) Grad = \u001b[92m6.630e-08\u001b[0m/\u001b[92m8.404e-08\u001b[0m (rms/max) E (change) = 0.0000000000 (\u001b[92m-4.508e-07\u001b[0m) Quality = \u001b[0m0.280\u001b[0m\n",
- "Converged! =D\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print(ret[\"stdout\"])"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz',\n",
- " 'hostname': 'Daniels-MacBook-Pro.local',\n",
- " 'username': 'daniel',\n",
- " 'qcengine_version': 'v0.5.2+23.g6c46911',\n",
- " 'wall_time': 0.6345179080963135,\n",
- " 'creator': 'QCEngine',\n",
- " 'version': 'v0.5.2+23.g6c46911'}"
- ]
- },
- "execution_count": 24,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "ret[\"provenance\"]"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "{'creator': 'rdkit', 'version': '2018.03.4', 'routine': 'rdkit.Chem.AllChem.UFFGetMoleculeForceField', 'cpu': 'Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz', 'wall_time': 0.003949165344238281, 'qcengine_version': 'v0.5.2+23.g6c46911', 'username': 'daniel', 'hostname': 'Daniels-MacBook-Pro.local'}\n",
- "{'return_energy': 4.05209848561957e-05}\n"
- ]
- }
- ],
- "source": [
- "print(ret[\"trajectory\"][0][\"provenance\"])\n",
- "print(ret[\"trajectory\"][0][\"properties\"])"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.6.7"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}
diff --git a/examples/README.md b/examples/README.md
deleted file mode 100644
index 35db5675e..000000000
--- a/examples/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-Examples
-========
-
-Work in progress!
-
-This folder contains a collection of working examples.
-
-
diff --git a/examples/terachem_pbs.py b/examples/terachem_pbs.py
deleted file mode 100644
index a2e041d65..000000000
--- a/examples/terachem_pbs.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import os
-import qcengine as qcng
-import qcelemental as qcel
-
-os.environ["TERACHEM_PBS_HOST"] = "127.0.0.1"
-os.environ["TERACHEM_PBS_PORT"] = "11111"
-
-prog = qcng.get_program("terachem_pbs")
-
-
-mol = qcel.models.Molecule.from_data(
- """
- O 0.0 0.000 -0.129
- H 0.0 -1.494 1.027
- H 0.0 1.494 1.027
-"""
-)
-
-inp = qcel.models.AtomicInput(
- molecule=mol,
- driver="energy",
- model={"method": "pbe0", "basis": "6-31g"},
-)
-ret = prog.compute(inp)
-print(ret)
\ No newline at end of file
diff --git a/genindex.html b/genindex.html
new file mode 100644
index 000000000..cb0808a25
--- /dev/null
+++ b/genindex.html
@@ -0,0 +1,483 @@
+
+
+
+
+
+ Index — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+
Index
+
+
+
B
+ |
C
+ |
E
+ |
F
+ |
G
+ |
H
+ |
I
+ |
J
+ |
L
+ |
M
+ |
N
+ |
P
+ |
Q
+ |
R
+ |
S
+ |
T
+ |
U
+
+
+
B
+
+
+
C
+
+
+
E
+
+
+
F
+
+
+
G
+
+
+
H
+
+
+
I
+
+
+
J
+
+
+
L
+
+
+
M
+
+
+
N
+
+
+
P
+
+
+
Q
+
+
+
+ qcengine
+
+
+
+ qcengine.config
+
+
+
+
+
+ qcengine.programs
+
+
+
+ qcengine.util
+
+
+
+
+
+
R
+
+
+
S
+
+
+
T
+
+
+
U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 000000000..07657cb5d
--- /dev/null
+++ b/index.html
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+ QCEngine — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+QCEngine
+Quantum chemistry program executor and IO standardizer (QCSchema) for quantum chemistry.
+
+Program Execution
+A simple example of QCEngine’s capabilities is as follows:
+>>> import qcengine as qcng
+>>> import qcelemental as qcel
+
+>>> mol = qcel . models . Molecule . from_data ( """
+>>> O 0.0 0.000 -0.129
+>>> H 0.0 -1.494 1.027
+>>> H 0.0 1.494 1.027
+>>> """ )
+
+>>> model = qcel . models . AtomicInput (
+>>> molecule = mol ,
+>>> driver = "energy" ,
+>>> model = { "method" : "SCF" , "basis" : "sto-3g" },
+>>> keywords = { "scf_type" : "df" }
+>>> )
+
+
+These input specifications can be executed with the compute
syntax along with a program specifier:
+>>> ret = qcng . compute ( model , "psi4" )
+
+
+The results contain a complete record of the computation:
+>>> ret . return_result
+-74.45994963230625
+
+>>> ret . properties . scf_dipole_moment
+[0.0, 0.0, 0.6635967188869244]
+
+>>> ret . provenance . cpu
+Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
+
+
+
+
+Backends
+Currently available compute backends for single results are as follow:
+
+Quantum Chemistry:
+
+
+Semi-Emperical:
+
+
+AI Potential:
+
+
+Molecular Mechanics:
+
+
+Analytical Corrections:
+
+
+
+In addition, several procedures are available:
+
+Geometry Optimization:
+
+
+
+
+
+Configuration Determination
+In addition, QCEngine can automatically determine the following quantites:
+
+The number of physical cores on the system and to use.
+The amount of physical memory on the system and the amount to use.
+The provenance of a computation (hardware, software versions, and compute resources).
+Location of scratch disk space.
+Location of quantum chemistry programs binaries or Python modules.
+
+Each of these options can be specified by the user as well.
+>>> qcng . get_config ()
+<JobConfig ncores=2 memory=2.506 scratch_directory=None>
+
+>>> qcng . get_config ( task_config = { "scratch_directory" : "/tmp" })
+<JobConfig ncores=2 memory=2.506 scratch_directory='/tmp'>
+
+>>> os . environ [ "SCRATCH" ] = "/my_scratch"
+>>> qcng . get_config ( task_config = { "scratch_directory" : "$SCRATCH" })
+<JobConfig ncores=2 memory=2.506 scratch_directory='/my_scratch'>
+
+
+
+
+
+
+Index
+Getting Started
+
+
+
+User Interface
+
+
+
+Programs
+
+
+
+Developer Documentation
+
+
+
Developer Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/install.html b/install.html
new file mode 100644
index 000000000..3ab65205d
--- /dev/null
+++ b/install.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+ Install QCEngine — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Install QCEngine
+You can install qcengine with conda
or with pip
.
+
+Conda
+You can install qcengine using conda :
+>>> conda install qcengine -c conda-forge
+
+
+This installs QCEngine and its dependencies. The qcengine package is maintained on the
+conda-forge channel .
+
+
+Pip
+You can also install QCEngine using pip
:
+>>> pip install qcengine
+
+
+
+
+Test the Installation
+
+
Note
+
QCEngine is a wrapper for other quantum chemistry codes. The tests for QCEngine will only test the wrapper for a
+given code if its detected in the $PATH
or current Python Environment, otherwise the tests for that package are
+skipped. Keep this in mind if you see many skip
or s
codes output from PyTest.
+
+You can test to make sure that Engine is installed correctly by first installing pytest
.
+From conda
:
+>>> conda install pytest -c conda-forge
+
+
+From pip
:
+
+Then, run the following command:
+>>> pytest -- pyargs qcengine
+
+
+
+
+Developing from Source
+If you are a developer and want to make contributions Engine, you can access the source code from
+github .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/objects.inv b/objects.inv
new file mode 100644
index 000000000..b39ab7302
Binary files /dev/null and b/objects.inv differ
diff --git a/program_overview.html b/program_overview.html
new file mode 100644
index 000000000..2d8bf0698
--- /dev/null
+++ b/program_overview.html
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+ Program Overview — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Program Overview
+The general capabilities available through QCEngine for each program can be
+found below:
+
+Quantum Chemistry
+
+
+Program
+Production
+E
+G
+H
+Properties
+Wavefunction
+
+
+
+adcc
+✘
+✓
+✘
+✘
+✓
+✘
+
+CFOUR
+✘
+✓
+✓
+✘
+✓
+✘
+
+Qcore (Entos)
+✘
+✓
+✓
+✓
+✘
+✓
+
+GAMESS
+✘
+✓
+✓
+✘
+✓
+✘
+
+MRChem
+✓
+✓
+✓
+✘
+✓
+✘
+
+Molpro
+✓
+✓
+✓
+✘
+✓
+✘
+
+NWChem
+✘
+✓
+✓
+✓
+✓
+✘
+
+Psi4
+✓
+✓
+✓
+✓
+✓
+✓
+
+Q-Chem
+✘
+✓
+✓
+✓
+✘
+✘
+
+Terachem
+✘
+✓
+✓
+✘
+✘
+✘
+
+Terachem PBS
+✘
+✓
+✓
+✘
+✘
+✘
+
+Turbomole
+✘
+✓
+✓
+✘
+✘
+✘
+
+
+
+
+
+Semi-Empirical
+
+
+Program
+Production
+E
+G
+H
+Properties
+Wavefunction
+
+
+
+
+MOPAC
+✓
+✓
+✓
+✘
+✓
+✘
+
+xtb
+✘
+✓
+✓
+✘
+✓
+✘
+
+
+
+
+
+AI Potential
+
+
+Program
+Production
+E
+G
+H
+Properties
+
+
+
+TorchANI
+✓
+✓
+✓
+✘
+✓
+
+
+
+
+
+Molecular Mechanics
+
+
+Program
+Production
+E
+G
+H
+Properties
+
+
+
+OpenMM
+✘
+✓
+✓
+✘
+✓
+
+RDKit
+✓
+✓
+✓
+✘
+✓
+
+
+
+
+
+Analytical Corrections
+
+
+Program
+Production
+E
+G
+H
+Properties
+
+
+
+DFTD3
+✓
+✓
+✓
+✘
+✘
+
+s-DFTD3
+✓
+✓
+✓
+✘
+✘
+
+DFTD4
+✓
+✓
+✓
+✘
+✘
+
+gCP
+✘
+✓
+✓
+✘
+✘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/programs_molecular_mechanics.html b/programs_molecular_mechanics.html
new file mode 100644
index 000000000..846afdffa
--- /dev/null
+++ b/programs_molecular_mechanics.html
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+ Molecular Mechanics — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Molecular Mechanics
+For Molecular Mechanics (MM) engines to fit the AtomicInput/Result schema
+the following convention is used:
+
+Method: The force field used such as MMFF94, GAFF, OpenFF-1.0.0.
+Basis: The typing engine used to find the required paramters.
+
+For all MM computations the input Molecule object must have connectivity and this will not be automatically assigned for you.
+
+Example
+>>> mol = qcel . models . Molecule (
+>>> symbols = [ "O" , "H" , "H" ],
+>>> geometry = [[ 0 , 0 , 0 ], [ 0 , 0 , 2 ], [ 0 , 2 , 0 ]],
+>>> connectivity = [[ 0 , 1 , 1 ], [ 0 , 2 , 1 ]],
+>>> )
+
+>>> model = qcel . models . AtomicInput (
+>>> molecule = mol ,
+>>> driver = "energy" ,
+>>> model = { "method" : "openff-1.0.0" , "basis" : "smirnoff" },
+>>> )
+>>> ret = qcng . compute ( model , "openmm" )
+>>> ret . return_result
+0.011185654397410195
+
+
+
+
+OpenMM
+Currently OpenMM only supports the smirnoff typing engine from the
+openff-toolkit
. Currently available force fields are the following:
+
+
+Method
+Basis
+
+
+
+smirnoff99Frosst-1.1.0
+smirnoff
+
+openff-1.0.0
+smirnoff
+
+openff_unconstrained-1.0.0
+smirnoff
+
+
+
+Other forcefields may be available depending on your version of the openff-toolkit
, see their docs for more information.
+
+
+RDKit
+RDKit force fields currently do not require a typing engine and the basis is omitted in all computations. Currently available force fields are the following:
+
+
+Method
+Basis
+
+
+
+UFF
+None
+
+MMFF94
+None
+
+MMFF94s
+None
+
+
+
+
+
+xtb
+Experimental access to force fields are available with the xtb
engine.
+Note that the xtb
engine will not require nor use a topology information provided in the input schema.
+
+
+Method
+Basis
+Reference
+
+
+
+GFN-FF
+None
+10.1002/anie.202004239
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/programs_semiempirical.html b/programs_semiempirical.html
new file mode 100644
index 000000000..7a5ca8b03
--- /dev/null
+++ b/programs_semiempirical.html
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+ Semiempirical Quantum Mechanics — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Semiempirical Quantum Mechanics
+For semiempirical quantum mechanics (SQM) engines to fit the AtomicInput/Result schema the following convention is used:
+
+As for quantum mechanical methods a minimal Molecule object is sufficient as input.
+
+
Note
+
Semiemprical engines might not handle the concept of ghost atoms correctly, check carefully how the used engine handles ghost atoms.
+To be sure remove ghost atoms from input to semiempirical engines beforehand.
+
+
+Example
+For example, running a calculation with the GFN2-xTB method using the xtb
engine would work like any other QM engine with
+>>> import qcelemental as qcel
+>>> mol = qcel . models . Molecule (
+... symbols = [ "O" , "H" , "H" ],
+... geometry = [
+... [ 0.00000000000000 , 0.00000000000000 , - 0.73578586109551 ],
+... [ 1.44183152868459 , 0.00000000000000 , 0.36789293054775 ],
+... [ - 1.44183152868459 , 0.00000000000000 , 0.36789293054775 ],
+... ],
+... )
+...
+>>> model = qcel . models . AtomicInput (
+... molecule = mol ,
+... driver = "energy" ,
+... model = { "method" : "GFN2-xTB" },
+... )
+...
+>>> import qcengine as qcng
+>>> ret = qcng . compute ( model , "xtb" )
+>>> ret . return_result
+-5.070451354836705
+
+
+
+
+MOPAC
+The following semiempirical Hamiltonians are supported with the MOPAC engine.
+
+
+Method
+Basis
+
+
+
+mndo
+None
+
+am1
+None
+
+pm3
+None
+
+rm1
+None
+
+mndod
+None
+
+pm6
+None
+
+pm6-d3
+None
+
+pm6-dh+
+None
+
+pm6-dh2
+None
+
+pm6-dh2x
+None
+
+pm6-d3h4
+None
+
+pm6-3dh4x
+None
+
+pm7
+None
+
+pm7-ts
+None
+
+
+
+
+
+xtb
+The following extended tight binding Hamiltonians are available with the xtb
engine.
+
+
+Method
+Basis
+Reference
+
+
+
+GFN2-xTB
+None
+10.1021/acs.jctc.8b01176
+
+GFN1-xTB
+None
+10.1021/acs.jctc.7b00118
+
+GFN0-xTB
+None
+10.26434/chemrxiv.8326202.v1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/py-modindex.html b/py-modindex.html
new file mode 100644
index 000000000..3ddbd10f9
--- /dev/null
+++ b/py-modindex.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Python Module Index — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+ Python Module Index
+
+
+
+
+
+
+
+
+
+
Python Module Index
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
deleted file mode 100644
index 2fa981a2d..000000000
--- a/pyproject.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-[tool.black]
-line-length = 120
-target-version = ['py37', 'py38']
diff --git a/qcengine/__init__.py b/qcengine/__init__.py
deleted file mode 100644
index 69af126aa..000000000
--- a/qcengine/__init__.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""
-Base file for the dqm_compute module.
-"""
-
-from . import config, exceptions
-from .compute import compute, compute_procedure
-from .config import get_config
-from .extras import get_information
-from .mdi_server import MDIServer
-from .procedures import get_procedure, list_all_procedures, list_available_procedures
-from .programs import get_program, list_all_programs, list_available_programs, register_program, unregister_program
-from .stock_mols import get_molecule
-
-# Handle versioneer
-__version__ = get_information("version")
-__git_revision__ = get_information("git_revision")
-del get_information
diff --git a/qcengine/__main__.py b/qcengine/__main__.py
deleted file mode 100644
index 5a13729a8..000000000
--- a/qcengine/__main__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-import qcengine.cli
-
-qcengine.cli.main()
diff --git a/qcengine/_version.py b/qcengine/_version.py
deleted file mode 100644
index 8321564da..000000000
--- a/qcengine/_version.py
+++ /dev/null
@@ -1,533 +0,0 @@
-# This file helps to compute a version number in source trees obtained from
-# git-archive tarball (such as those provided by githubs download-from-tag
-# feature). Distribution tarballs (built by setup.py sdist) and build
-# directories (produced by setup.py build) will contain a much shorter file
-# that just contains the computed version number.
-
-# This file is released into the public domain. Generated by
-# versioneer-0.18 (https://github.com/warner/python-versioneer)
-"""Git implementation of _version.py."""
-
-import errno
-import os
-import re
-import subprocess
-import sys
-
-
-def get_keywords():
- """Get the keywords needed to look up the version information."""
- # these strings will be replaced by git during git-archive.
- # setup.py/versioneer.py will grep for the variable names, so they must
- # each be defined on a line of their own. _version.py will just call
- # get_keywords().
- git_refnames = "$Format:%d$"
- git_full = "$Format:%H$"
- git_date = "$Format:%ci$"
- keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
- return keywords
-
-
-class VersioneerConfig:
- """Container for Versioneer configuration parameters."""
-
-
-def get_config():
- """Create, populate and return the VersioneerConfig() object."""
- # these strings are filled in when 'setup.py versioneer' creates
- # _version.py
- cfg = VersioneerConfig()
- cfg.VCS = "git"
- cfg.style = "pep440"
- cfg.tag_prefix = ""
- cfg.parentdir_prefix = "None"
- cfg.versionfile_source = "qcengine/_version.py"
- cfg.verbose = False
- return cfg
-
-
-class NotThisMethod(Exception):
- """Exception raised if a method is not valid for the current scenario."""
-
-
-LONG_VERSION_PY = {}
-HANDLERS = {}
-
-
-def register_vcs_handler(vcs, method): # decorator
- """Decorator to mark a method as the handler for a particular VCS."""
-
- def decorate(f):
- """Store f in HANDLERS[vcs][method]."""
- if vcs not in HANDLERS:
- HANDLERS[vcs] = {}
- HANDLERS[vcs][method] = f
- return f
-
- return decorate
-
-
-def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=None):
- """Call the given command(s)."""
- assert isinstance(commands, list)
- p = None
- for c in commands:
- try:
- dispcmd = str([c] + args)
- # remember shell=False, so use git.cmd on windows, not just git
- p = subprocess.Popen(
- [c] + args, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=(subprocess.PIPE if hide_stderr else None)
- )
- break
- except EnvironmentError:
- e = sys.exc_info()[1]
- if e.errno == errno.ENOENT:
- continue
- if verbose:
- print("unable to run %s" % dispcmd)
- print(e)
- return None, None
- else:
- if verbose:
- print("unable to find command, tried %s" % (commands,))
- return None, None
- stdout = p.communicate()[0].strip()
- if sys.version_info[0] >= 3:
- stdout = stdout.decode()
- if p.returncode != 0:
- if verbose:
- print("unable to run %s (error)" % dispcmd)
- print("stdout was %s" % stdout)
- return None, p.returncode
- return stdout, p.returncode
-
-
-def versions_from_parentdir(parentdir_prefix, root, verbose):
- """Try to determine the version from the parent directory name.
-
- Source tarballs conventionally unpack into a directory that includes both
- the project name and a version string. We will also support searching up
- two directory levels for an appropriately named parent directory
- """
- rootdirs = []
-
- for i in range(3):
- dirname = os.path.basename(root)
- if dirname.startswith(parentdir_prefix):
- return {
- "version": dirname[len(parentdir_prefix) :],
- "full-revisionid": None,
- "dirty": False,
- "error": None,
- "date": None,
- }
- else:
- rootdirs.append(root)
- root = os.path.dirname(root) # up a level
-
- if verbose:
- print("Tried directories %s but none started with prefix %s" % (str(rootdirs), parentdir_prefix))
- raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
-
-
-@register_vcs_handler("git", "get_keywords")
-def git_get_keywords(versionfile_abs):
- """Extract version information from the given file."""
- # the code embedded in _version.py can just fetch the value of these
- # keywords. When used from setup.py, we don't want to import _version.py,
- # so we do it with a regexp instead. This function is not used from
- # _version.py.
- keywords = {}
- try:
- f = open(versionfile_abs, "r")
- for line in f.readlines():
- if line.strip().startswith("git_refnames ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["refnames"] = mo.group(1)
- if line.strip().startswith("git_full ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["full"] = mo.group(1)
- if line.strip().startswith("git_date ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["date"] = mo.group(1)
- f.close()
- except EnvironmentError:
- pass
- return keywords
-
-
-@register_vcs_handler("git", "keywords")
-def git_versions_from_keywords(keywords, tag_prefix, verbose):
- """Get version information from git keywords."""
- if not keywords:
- raise NotThisMethod("no keywords at all, weird")
- date = keywords.get("date")
- if date is not None:
- # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant
- # datestamp. However we prefer "%ci" (which expands to an "ISO-8601
- # -like" string, which we must then edit to make compliant), because
- # it's been around since git-1.5.3, and it's too difficult to
- # discover which version we're using, or to work around using an
- # older one.
- date = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
- refnames = keywords["refnames"].strip()
- if refnames.startswith("$Format"):
- if verbose:
- print("keywords are unexpanded, not using")
- raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
- refs = set([r.strip() for r in refnames.strip("()").split(",")])
- # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
- # just "foo-1.0". If we see a "tag: " prefix, prefer those.
- TAG = "tag: "
- tags = set([r[len(TAG) :] for r in refs if r.startswith(TAG)])
- if not tags:
- # Either we're using git < 1.8.3, or there really are no tags. We use
- # a heuristic: assume all version tags have a digit. The old git %d
- # expansion behaves like git log --decorate=short and strips out the
- # refs/heads/ and refs/tags/ prefixes that would let us distinguish
- # between branches and tags. By ignoring refnames without digits, we
- # filter out many common branch names like "release" and
- # "stabilization", as well as "HEAD" and "master".
- tags = set([r for r in refs if re.search(r"\d", r)])
- if verbose:
- print("discarding '%s', no digits" % ",".join(refs - tags))
- if verbose:
- print("likely tags: %s" % ",".join(sorted(tags)))
- for ref in sorted(tags):
- # sorting will prefer e.g. "2.0" over "2.0rc1"
- if ref.startswith(tag_prefix):
- r = ref[len(tag_prefix) :]
- if verbose:
- print("picking %s" % r)
- return {
- "version": r,
- "full-revisionid": keywords["full"].strip(),
- "dirty": False,
- "error": None,
- "date": date,
- }
- # no suitable tags, so version is "0+unknown", but full hex is still there
- if verbose:
- print("no suitable tags, using unknown + full revision id")
- return {
- "version": "0+unknown",
- "full-revisionid": keywords["full"].strip(),
- "dirty": False,
- "error": "no suitable tags",
- "date": None,
- }
-
-
-@register_vcs_handler("git", "pieces_from_vcs")
-def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
- """Get version from 'git describe' in the root of the source tree.
-
- This only gets called if the git-archive 'subst' keywords were *not*
- expanded, and _version.py hasn't already been rewritten with a short
- version string, meaning we're inside a checked out source tree.
- """
- GITS = ["git"]
- if sys.platform == "win32":
- GITS = ["git.cmd", "git.exe"]
-
- out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True)
- if rc != 0:
- if verbose:
- print("Directory %s not under git control" % root)
- raise NotThisMethod("'git rev-parse --git-dir' returned error")
-
- # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
- # if there isn't one, this yields HEX[-dirty] (no NUM)
- describe_out, rc = run_command(
- GITS, ["describe", "--tags", "--dirty", "--always", "--long", "--match", "%s*" % tag_prefix], cwd=root
- )
- # --long was added in git-1.5.5
- if describe_out is None:
- raise NotThisMethod("'git describe' failed")
- describe_out = describe_out.strip()
- full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
- if full_out is None:
- raise NotThisMethod("'git rev-parse' failed")
- full_out = full_out.strip()
-
- pieces = {}
- pieces["long"] = full_out
- pieces["short"] = full_out[:7] # maybe improved later
- pieces["error"] = None
-
- # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
- # TAG might have hyphens.
- git_describe = describe_out
-
- # look for -dirty suffix
- dirty = git_describe.endswith("-dirty")
- pieces["dirty"] = dirty
- if dirty:
- git_describe = git_describe[: git_describe.rindex("-dirty")]
-
- # now we have TAG-NUM-gHEX or HEX
-
- if "-" in git_describe:
- # TAG-NUM-gHEX
- mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
- if not mo:
- # unparseable. Maybe git-describe is misbehaving?
- pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out
- return pieces
-
- # tag
- full_tag = mo.group(1)
- if not full_tag.startswith(tag_prefix):
- if verbose:
- fmt = "tag '%s' doesn't start with prefix '%s'"
- print(fmt % (full_tag, tag_prefix))
- pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % (full_tag, tag_prefix)
- return pieces
- pieces["closest-tag"] = full_tag[len(tag_prefix) :]
-
- # distance: number of commits since tag
- pieces["distance"] = int(mo.group(2))
-
- # commit: short hex revision ID
- pieces["short"] = mo.group(3)
-
- else:
- # HEX: no tags
- pieces["closest-tag"] = None
- count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"], cwd=root)
- pieces["distance"] = int(count_out) # total number of commits
-
- # commit date: see ISO-8601 comment in git_versions_from_keywords()
- date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip()
- pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
-
- return pieces
-
-
-def plus_or_dot(pieces):
- """Return a + if we don't already have one, else return a ."""
- if "+" in pieces.get("closest-tag", ""):
- return "."
- return "+"
-
-
-def render_pep440(pieces):
- """Build up version string, with post-release "local version identifier".
-
- Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
- get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
-
- Exceptions:
- 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += plus_or_dot(pieces)
- rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
- if pieces["dirty"]:
- rendered += ".dirty"
- else:
- # exception #1
- rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"])
- if pieces["dirty"]:
- rendered += ".dirty"
- return rendered
-
-
-def render_pep440_pre(pieces):
- """TAG[.post.devDISTANCE] -- No -dirty.
-
- Exceptions:
- 1: no tags. 0.post.devDISTANCE
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"]:
- rendered += ".post.dev%d" % pieces["distance"]
- else:
- # exception #1
- rendered = "0.post.dev%d" % pieces["distance"]
- return rendered
-
-
-def render_pep440_post(pieces):
- """TAG[.postDISTANCE[.dev0]+gHEX] .
-
- The ".dev0" means dirty. Note that .dev0 sorts backwards
- (a dirty tree will appear "older" than the corresponding clean one),
- but you shouldn't be releasing software with -dirty anyways.
-
- Exceptions:
- 1: no tags. 0.postDISTANCE[.dev0]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += ".post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- rendered += plus_or_dot(pieces)
- rendered += "g%s" % pieces["short"]
- else:
- # exception #1
- rendered = "0.post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- rendered += "+g%s" % pieces["short"]
- return rendered
-
-
-def render_pep440_old(pieces):
- """TAG[.postDISTANCE[.dev0]] .
-
- The ".dev0" means dirty.
-
- Eexceptions:
- 1: no tags. 0.postDISTANCE[.dev0]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += ".post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- else:
- # exception #1
- rendered = "0.post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- return rendered
-
-
-def render_git_describe(pieces):
- """TAG[-DISTANCE-gHEX][-dirty].
-
- Like 'git describe --tags --dirty --always'.
-
- Exceptions:
- 1: no tags. HEX[-dirty] (note: no 'g' prefix)
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"]:
- rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
- else:
- # exception #1
- rendered = pieces["short"]
- if pieces["dirty"]:
- rendered += "-dirty"
- return rendered
-
-
-def render_git_describe_long(pieces):
- """TAG-DISTANCE-gHEX[-dirty].
-
- Like 'git describe --tags --dirty --always -long'.
- The distance/hash is unconditional.
-
- Exceptions:
- 1: no tags. HEX[-dirty] (note: no 'g' prefix)
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
- else:
- # exception #1
- rendered = pieces["short"]
- if pieces["dirty"]:
- rendered += "-dirty"
- return rendered
-
-
-def render(pieces, style):
- """Render the given version pieces into the requested style."""
- if pieces["error"]:
- return {
- "version": "unknown",
- "full-revisionid": pieces.get("long"),
- "dirty": None,
- "error": pieces["error"],
- "date": None,
- }
-
- if not style or style == "default":
- style = "pep440" # the default
-
- if style == "pep440":
- rendered = render_pep440(pieces)
- elif style == "pep440-pre":
- rendered = render_pep440_pre(pieces)
- elif style == "pep440-post":
- rendered = render_pep440_post(pieces)
- elif style == "pep440-old":
- rendered = render_pep440_old(pieces)
- elif style == "git-describe":
- rendered = render_git_describe(pieces)
- elif style == "git-describe-long":
- rendered = render_git_describe_long(pieces)
- else:
- raise ValueError("unknown style '%s'" % style)
-
- return {
- "version": rendered,
- "full-revisionid": pieces["long"],
- "dirty": pieces["dirty"],
- "error": None,
- "date": pieces.get("date"),
- }
-
-
-def get_versions():
- """Get version information or return default if unable to do so."""
- # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
- # __file__, we can work backwards from there to the root. Some
- # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
- # case we can only use expanded keywords.
-
- cfg = get_config()
- verbose = cfg.verbose
-
- try:
- return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose)
- except NotThisMethod:
- pass
-
- try:
- root = os.path.realpath(__file__)
- # versionfile_source is the relative path from the top of the source
- # tree (where the .git directory might live) to this file. Invert
- # this to find the root from __file__.
- for i in cfg.versionfile_source.split("/"):
- root = os.path.dirname(root)
- except NameError:
- return {
- "version": "0+unknown",
- "full-revisionid": None,
- "dirty": None,
- "error": "unable to find root of source tree",
- "date": None,
- }
-
- try:
- pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
- return render(pieces, cfg.style)
- except NotThisMethod:
- pass
-
- try:
- if cfg.parentdir_prefix:
- return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
- except NotThisMethod:
- pass
-
- return {
- "version": "0+unknown",
- "full-revisionid": None,
- "dirty": None,
- "error": "unable to compute version",
- "date": None,
- }
diff --git a/qcengine/cli.py b/qcengine/cli.py
deleted file mode 100644
index 70e0e39f3..000000000
--- a/qcengine/cli.py
+++ /dev/null
@@ -1,220 +0,0 @@
-"""
-Provides a CLI for QCEngine
-"""
-
-import argparse
-import json
-import os.path
-import sys
-from typing import Any, Dict
-
-from . import get_program # run and run-procedure; info
-from . import (
- __version__,
- compute,
- compute_procedure,
- get_procedure,
- list_all_procedures,
- list_all_programs,
- list_available_procedures,
- list_available_programs,
-)
-from .config import global_repr # info
-
-__all__ = ["main"]
-
-info_choices = frozenset(["version", "programs", "procedures", "config", "all"])
-
-
-def parse_args():
- parser = argparse.ArgumentParser(description="A CLI for the QCEngine.")
- parser.add_argument("--version", action="version", version=f"{__version__}")
-
- parent_parser = argparse.ArgumentParser(add_help=False)
- task_group = parent_parser.add_argument_group(
- "Task Configuration", "Extra configuration related to running the computation"
- )
- task_group.add_argument("--ncores", type=int, help="The number of cores to use for the task")
- task_group.add_argument("--nnodes", type=int, help="The number of nodes to use")
- task_group.add_argument("--memory", type=float, help="The amount of memory (in GiB) to use")
- task_group.add_argument("--scratch-directory", type=str, help="Where to store temporary files")
- task_group.add_argument("--retries", type=int, help="Number of retries for random failures")
- task_group.add_argument("--mpiexec-command", type=str, help="Command used to launch MPI tasks")
- task_group.add_argument(
- "--use-mpiexec",
- action="store_true",
- default=None,
- help="Whether it is necessary to use MPI to run an executable",
- )
- task_group.add_argument("--cores-per-rank", type=int, help="Number of cores per MPI rank")
- task_group.add_argument(
- "--scratch-messy",
- action="store_true",
- default=None,
- help="Leave the scratch directory and contents on disk after completion",
- )
-
- subparsers = parser.add_subparsers(dest="command")
-
- info = subparsers.add_parser("info", help="Print information about QCEngine setup, version, and environment.")
- info.add_argument(
- "category", nargs="*", default="all", choices=info_choices, help="The information categories to show."
- )
-
- run = subparsers.add_parser(
- "run", parents=[parent_parser], help="Run a program on a given task. Output is printed as a JSON blob."
- )
- run.add_argument("program", type=str, help="The program to run.")
- run.add_argument(
- "data",
- type=str,
- help="Data describing the task to run. "
- "One of: (i) A JSON blob, "
- "(ii) A file name, "
- "(iii) '-', indicating data will be read from STDIN.",
- )
-
- run_procedure = subparsers.add_parser(
- "run-procedure",
- parents=[parent_parser],
- help="Run a procedure on a given task. Output is printed as a JSON blob.",
- )
- run_procedure.add_argument("procedure", type=str, help="The procedure to run.")
- run_procedure.add_argument(
- "data",
- type=str,
- help="Data describing the task to run. "
- "One of: (i) A JSON blob, "
- "(ii) A file name, "
- "(iii) '-', indicating data will be read from STDIN.",
- )
-
- args = vars(parser.parse_args())
- if args["command"] is None:
- parser.print_help(sys.stderr)
- exit(1)
-
- return args
-
-
-def info_cli(args):
- def info_version():
- import qcelemental
-
- print(">>> Version information")
- print(f"QCEngine: {__version__}")
- print(f"QCElemental: {qcelemental.__version__}")
- print()
-
- def info_programs(): # lgtm: [py/similar-function]
- print(">>> Program information")
- all_progs = list_all_programs()
- avail_progs = list_available_programs()
- print("Available programs:")
- for prog_name in sorted(avail_progs):
- program = get_program(prog_name)
- version = program.get_version()
- for loc, ver in program.version_cache.items():
- if ver == version:
- which = loc
- break
- else:
- which = "???"
- if version is None:
- version = "???"
- print(f"{prog_name + ':':12} v{version:20} {which}")
-
- print()
- print("Other supported programs:")
- print(" ".join(sorted(all_progs - avail_progs)))
- print()
- print(
- """If you think available programs are missing, query for details: `python -c "import qcengine as qcng; qcng.get_program('')"`"""
- )
- print()
-
- def info_procedures(): # lgtm: [py/similar-function]
- print(">>> Procedure information")
- all_procs = list_all_procedures()
- avail_procs = list_available_procedures()
- print("Available procedures:")
- for proc_name in sorted(avail_procs):
- version = get_procedure(proc_name).get_version()
- if version is None:
- version = "???"
- print(f"{proc_name} v{version}")
-
- print()
- print("Other supported procedures:")
- print(" ".join(sorted(all_procs - avail_procs)))
- print()
-
- # default=["all"] does is not allowed by argparse
- if not isinstance(args["category"], list):
- args["category"] = [args["category"]]
- cat = set(args["category"])
-
- if "version" in cat or "all" in cat:
- info_version()
- if "programs" in cat or "all" in cat:
- info_programs()
- if "procedures" in cat or "all" in cat:
- info_procedures()
- if "config" in cat or "all" in cat:
- print(">>> Configuration information")
- print()
- print(global_repr())
-
-
-def data_arg_helper(data_arg: str) -> Dict[str, Any]:
- """
- Converts the data argument of run and run-procedure commands to a dict for compute or compute_procedure
-
- Parameters
- ----------
- data_arg: str
- Either a data blob or file name or '-' for STDIN
-
- Returns
- -------
- Dict[str, Any]
- An input for compute or compute_procedure.
- """
- if data_arg == "-":
- return json.load(sys.stdin)
- elif os.path.isfile(data_arg):
- return json.load(open(data_arg))
- else:
- return json.loads(data_arg)
-
-
-def main(args=None):
- # Grab CLI args if not present
- if args is None:
- args = parse_args()
-
- # Break out a task config
- task_config = {
- "ncores": args.pop("ncores", None),
- "memory": args.pop("memory", None),
- "nnodes": args.pop("nnodes", None),
- "scratch_directory": args.pop("scratch_directory", None),
- "retries": args.pop("retries", None),
- "mpiexec_command": args.pop("mpiexec_command", None),
- "use_mpiexec": args.pop("use_mpiexec", None),
- "cores_per_rank": args.pop("cores_per_rank", None),
- "scratch_messy": args.pop("scratch_messy", None),
- }
-
- # Prune None values and let other config functions handle defaults
- task_config = {k: v for k, v in task_config.items() if v is not None}
-
- command = args.pop("command")
- if command == "info":
- info_cli(args)
- elif command == "run":
- ret = compute(data_arg_helper(args["data"]), args["program"], task_config=task_config)
- print(ret.json())
- elif command == "run-procedure":
- ret = compute_procedure(data_arg_helper(args["data"]), args["procedure"], task_config=task_config)
- print(ret.json())
diff --git a/qcengine/compute.py b/qcengine/compute.py
deleted file mode 100644
index 00e94a329..000000000
--- a/qcengine/compute.py
+++ /dev/null
@@ -1,181 +0,0 @@
-"""
-Integrates the computes together
-"""
-import warnings
-from typing import TYPE_CHECKING, Any, Dict, Optional, Union
-
-from qcelemental.models import AtomicInput, AtomicResult, FailedOperation, OptimizationResult
-
-from .config import get_config
-from .exceptions import InputError, RandomError
-from .procedures import get_procedure
-from .programs import get_program
-from .util import compute_wrapper, environ_context, handle_output_metadata, model_wrapper
-
-if TYPE_CHECKING:
- try:
- from pydantic.v1.main import BaseModel
- except ImportError:
- from pydantic.main import BaseModel
- from qcelemental.models import AtomicResult
-
-
-__all__ = ["compute", "compute_procedure"]
-
-
-def _process_failure_and_return(model, return_dict, raise_error):
- if isinstance(model, FailedOperation):
- if raise_error:
- raise InputError(model.error.error_message)
- elif return_dict:
- return model.dict()
- else:
- return model
- else:
- return False
-
-
-def compute(
- input_data: Union[Dict[str, Any], "AtomicInput"],
- program: str,
- raise_error: bool = False,
- task_config: Optional[Dict[str, Any]] = None,
- local_options: Optional[Dict[str, Any]] = None,
- return_dict: bool = False,
-) -> Union["AtomicResult", "FailedOperation", Dict[str, Any]]:
- """Executes a single CMS program given a QCSchema input.
-
- The full specification can be found at:
- http://molssi-qc-schema.readthedocs.io/en/latest/index.html#
-
- Parameters
- ----------
- input_data
- A QCSchema input specification in dictionary or model from QCElemental.models
- program
- The CMS program with which to execute the input.
- raise_error
- Determines if compute should raise an error or not.
- retries : int, optional
- The number of random tries to retry for.
- task_config
- A dictionary of local configuration options corresponding to a TaskConfig object.
- local_options
- Deprecated parameter, renamed to ``task_config``
- return_dict
- Returns a dict instead of qcelemental.models.AtomicResult
-
- Returns
- -------
- result
- AtomicResult, FailedOperation, or Dict representation of either object type
- A QCSchema representation of the requested output, type depends on return_dict key.
- """
-
- output_data = input_data.copy() # lgtm [py/multiple-definition]
- with compute_wrapper(capture_output=False, raise_error=raise_error) as metadata:
-
- # Grab the executor and build the input model
- executor = get_program(program)
-
- # Build the model and validate
- input_data = model_wrapper(input_data, AtomicInput)
-
- # Build out task_config
- if task_config is None:
- task_config = {}
-
- if local_options:
- warnings.warn(
- "Using the `local_options` keyword argument is deprecated in favor of using `task_config`, "
- "in version 0.30.0 it will stop working.",
- category=FutureWarning,
- stacklevel=2,
- )
- task_config = {**local_options, **task_config}
-
- input_engine_options = input_data.extras.pop("_qcengine_local_config", {})
-
- task_config = {**task_config, **input_engine_options}
- config = get_config(task_config=task_config)
-
- # Set environment parameters and execute
- with environ_context(config=config):
-
- # Handle optional retries
- for x in range(config.retries + 1):
- try:
- output_data = executor.compute(input_data, config)
- break
- except RandomError as e:
-
- if x == config.retries:
- raise e
- else:
- metadata["retries"] += 1
- except:
- raise
-
- return handle_output_metadata(output_data, metadata, raise_error=raise_error, return_dict=return_dict)
-
-
-def compute_procedure(
- input_data: Union[Dict[str, Any], "BaseModel"],
- procedure: str,
- raise_error: bool = False,
- task_config: Optional[Dict[str, str]] = None,
- local_options: Optional[Dict[str, str]] = None,
- return_dict: bool = False,
-) -> Union["OptimizationResult", "FailedOperation", Dict[str, Any]]:
- """Runs a procedure (a collection of the quantum chemistry executions)
-
- Parameters
- ----------
- input_data : dict or qcelemental.models.OptimizationInput
- A JSON input specific to the procedure executed in dictionary or model from QCElemental.models
- procedure : {"geometric", "berny"}
- The name of the procedure to run
- raise_error : bool, option
- Determines if compute should raise an error or not.
- task_config
- A dictionary of local configuration options corresponding to a TaskConfig object.
- local_options
- Deprecated parameter, renamed to ``task_config``
- return_dict : bool, optional, default True
- Returns a dict instead of qcelemental.models.AtomicInput
-
- Returns
- ------
- dict, OptimizationResult, FailedOperation
- A QC Schema representation of the requested output, type depends on return_dict key.
- """
- # Build out task_config
- if task_config is None:
- task_config = {}
-
- if local_options:
- warnings.warn(
- "Using the `local_options` keyword argument is depreciated in favor of using `task_config`, "
- "in version 0.30.0 it will stop working.",
- category=FutureWarning,
- stacklevel=2,
- )
- task_config = {**local_options, **task_config}
-
- output_data = input_data.copy() # lgtm [py/multiple-definition]
- with compute_wrapper(capture_output=False, raise_error=raise_error) as metadata:
-
- # Grab the executor and build the input model
- executor = get_procedure(procedure)
-
- config = get_config(task_config=task_config)
- input_data = executor.build_input_model(input_data)
-
- # Create a base output data in case of errors
- output_data = input_data.copy() # lgtm [py/multiple-definition]
-
- # Set environment parameters and execute
- with environ_context(config=config):
- output_data = executor.compute(input_data, config)
-
- return handle_output_metadata(output_data, metadata, raise_error=raise_error, return_dict=return_dict)
diff --git a/qcengine/config.py b/qcengine/config.py
deleted file mode 100644
index a836ddbe9..000000000
--- a/qcengine/config.py
+++ /dev/null
@@ -1,362 +0,0 @@
-"""
-Creates globals for the qcengine module
-"""
-
-import fnmatch
-import getpass
-import logging
-import os
-import socket
-from typing import Any, Dict, Optional, Union
-
-try:
- import pydantic.v1 as pydantic
-except ImportError:
- import pydantic
-
-from .extras import get_information
-
-__all__ = ["get_config", "get_provenance_augments", "global_repr", "NodeDescriptor"]
-
-# Start a globals dictionary with small starting values
-_global_values = None
-NODE_DESCRIPTORS = {}
-LOGGER = logging.getLogger("QCEngine")
-LOGGER.setLevel(logging.CRITICAL)
-
-
-# Generic globals
-def get_global(key: Optional[str] = None) -> Union[str, Dict[str, Any]]:
- import cpuinfo
- import psutil
-
- # TODO (wardlt): Implement a means of getting CPU information from compute nodes on clusters for MPI tasks
- # The QC code runs on a different node than the node running this Python function, which may have different info
-
- global _global_values
- if _global_values is None:
- _global_values = {}
- _global_values["hostname"] = socket.gethostname()
- _global_values["memory"] = round(psutil.virtual_memory().available / (1024**3), 3)
- _global_values["username"] = getpass.getuser()
-
- # Work through VMs and logical cores.
- if hasattr(psutil.Process(), "cpu_affinity"):
- cpu_cnt = len(psutil.Process().cpu_affinity())
- full_physical_cnt = psutil.cpu_count(logical=False)
- full_logical_cnt = psutil.cpu_count(logical=True)
- if (cpu_cnt == full_logical_cnt) and (full_physical_cnt is not None):
- # cpu_affinity isn't capturing deliberate setting but just VMs, so use physical
- cpu_cnt = full_physical_cnt
- else:
- cpu_cnt = psutil.cpu_count(logical=False)
- if cpu_cnt is None:
- cpu_cnt = psutil.cpu_count(logical=True)
-
- _global_values["ncores"] = cpu_cnt
- _global_values["nnodes"] = 1
-
- _global_values["cpuinfo"] = cpuinfo.get_cpu_info()
- try:
- _global_values["cpu_brand"] = _global_values["cpuinfo"]["brand_raw"]
- except KeyError:
- # Remove this if py-cpuinfo is pinned to >=6.0.0
- _global_values["cpu_brand"] = _global_values["cpuinfo"].get("brand", "(unknown)")
-
- if key is None:
- return _global_values.copy()
- else:
- return _global_values[key]
-
-
-class NodeDescriptor(pydantic.BaseModel):
- """
- Description of an individual node
- """
-
- # Host data
- hostname_pattern: str
- name: str
- scratch_directory: Optional[str] = None # What location to use as scratch
-
- memory: Optional[float] = None
- memory_safety_factor: int = 10 # Percentage of memory as a safety factor
-
- # Specifications
- ncores: Optional[int] = pydantic.Field(
- None,
- description="""Number of cores accessible to each task on this node
-
- The default value, ``None``, will allow QCEngine to autodetect the number of cores.""",
- )
- jobs_per_node: int = 1
- retries: int = 0
-
- # Cluster options
- is_batch_node: bool = pydantic.Field(
- False,
- help="""Whether the node running QCEngine is a batch node
-
- Some clusters are configured such that tasks are launched from a special "batch" or "MOM" onto the compute nodes.
- The compute nodes on such clusters often have a different CPU architecture than the batch nodes and
- often are unable to launch MPI tasks, which has two implications:
- 1) QCEngine must make *all* calls to an executable via ``mpirun`` because the executables might not
- be able to run on the batch node.
- 2) QCEngine must run on the batch node to be able to launch tasks on the more than one compute nodes
-
- ``is_batch_node`` is used when creating the task configuration as a means of determining whether
- ``mpiexec_command`` must always be used even for serial jobs (e.g., getting the version number)
- """,
- )
- mpiexec_command: Optional[str] = pydantic.Field(
- None,
- description="""Invocation for launching node-parallel tasks with MPI
-
- The invocation need not specify the number of nodes, tasks, or cores per node.
- Information about the task configuration will be added to the command by use of
- Python's string formatting. The configuration will be supplied as the following variables:
-
- {nnodes} - Number of nodes
- {ranks_per_node} - Number of MPI ranks per node
- {cores_per_rank} - Number of cores to use for each MPI rank
- {total_ranks} - Total number of MPI ranks
-
- As examples, the ``aprun`` command on Cray systems should be similar to
- ``aprun -n {total_ranks} -N {ranks_per_node}`` and ``mpirun`` from OpenMPI should
- be similar to ``mpirun -np {total_ranks} -N {ranks_per_node}``.
-
- Programs where each MPI rank can use multiple threads (e.g., QC programs with MPI+OpenMP) can
- use the {cores_per_rank} option to control the hybrid parallelism.
- As an example, the Cray ``aprun`` command using this figure could be:
- ``aprun -n {total_ranks} -N {ranks_per_node} -d {cores_per_rank} -j 1``.
- The appropriate number of ranks per node will be determined based on the number of
- cores per node and the number of cores per rank.
- """,
- )
-
- def __init__(self, **data: Dict[str, Any]):
- data = parse_environment(data)
- super().__init__(**data)
-
- if self.mpiexec_command is not None:
- # Ensure that the mpiexec_command contains necessary information
- if not ("{total_ranks}" in self.mpiexec_command or "{nnodes}" in self.mpiexec_command):
- raise ValueError("mpiexec_command must contain either {total_ranks} or {nnodes}")
- if "{ranks_per_node}" not in self.mpiexec_command:
- raise ValueError("mpiexec_command must explicitly state the number of ranks per node")
-
- class Config:
- extra = "forbid"
-
-
-class TaskConfig(pydantic.BaseSettings):
- """Description of the configuration used to launch a task."""
-
- # Specifications
- ncores: int = pydantic.Field(None, description="Number cores per task on each node")
- nnodes: int = pydantic.Field(None, description="Number of nodes per task")
- memory: float = pydantic.Field(
- None, description="Amount of memory in GiB (2^30 bytes; not GB = 10^9 bytes) per node."
- )
- scratch_directory: Optional[str] # What location to use as scratch
- retries: int # Number of retries on random failures
- mpiexec_command: Optional[str] # Command used to launch MPI tasks, see NodeDescriptor
- use_mpiexec: bool = False # Whether it is necessary to use MPI to run an executable
- cores_per_rank: int = pydantic.Field(1, description="Number of cores per MPI rank")
- scratch_messy: bool = pydantic.Field(
- False, description="Leave scratch directory and contents on disk after completion."
- )
-
- class Config(pydantic.BaseSettings.Config):
- extra = "forbid"
- env_prefix = "QCENGINE_"
-
-
-def _load_defaults() -> None:
- """
- Pulls the defaults from the QCA folder
- """
-
- # Find the config
- load_path = None
- test_paths = [os.getcwd(), os.path.join(os.path.expanduser("~"), ".qcarchive")]
-
- if "DQM_CONFIG_PATH" in os.environ:
- test_paths.insert(0, os.environ["DQM_CONFIG_PATH"])
-
- for path in test_paths:
- path = os.path.join(path, "qcengine.yaml")
- if os.path.exists(path):
- load_path = path
- break
-
- if load_path is None:
- LOGGER.info("Could not find 'qcengine.yaml'. Searched the following paths: {}".format(", ".join(test_paths)))
- LOGGER.info("Using default options...")
-
- else:
- import yaml
-
- LOGGER.info("Found 'qcengine.yaml' at path: {}".format(load_path))
- with open(load_path, "r") as stream:
- user_config = yaml.load(stream, Loader=yaml.SafeLoader)
-
- for k, v in user_config.items():
- NODE_DESCRIPTORS[k] = NodeDescriptor(name=k, **v)
-
-
-def global_repr() -> str:
- """
- A representation of the current global configuration.
- """
-
- ret = ""
- ret += "Host information:\n"
- ret += "-" * 80 + "\n"
-
- prov = get_provenance_augments()
- for k in ["username", "hostname", "cpu"]:
- ret += "{:<30} {:<30}\n".format(k, prov[k])
-
- ret += "\nNode information:\n"
- ret += "-" * 80 + "\n"
- for k, v in get_node_descriptor():
- ret += " {:<28} {}\n".format(k, v)
-
- if k in ["scratch_directory", "memory_per_job"]:
- ret += "\n"
-
- ret += "\nJob information:\n"
- ret += "-" * 80 + "\n"
- for k, v in get_config():
- ret += " {:<28} {}\n".format(k, v)
-
- ret += "-" * 80 + "\n"
-
- return ret
-
-
-def get_node_descriptor(hostname: Optional[str] = None) -> NodeDescriptor:
- """
- Find the correct NodeDescriptor based off current hostname
- """
- if isinstance(hostname, NodeDescriptor):
- return hostname
-
- if hostname is None:
- hostname = get_global("hostname")
-
- # Find a match
- for name, node in NODE_DESCRIPTORS.items():
-
- if fnmatch.fnmatch(hostname, node.hostname_pattern):
- config = node
- break
- else:
- config = NodeDescriptor(
- name="default", hostname_pattern="*", memory=get_global("memory"), ncores=get_global("ncores")
- )
-
- return config
-
-
-def parse_environment(data: Dict[str, Any]) -> Dict[str, Any]:
- """Collects local environment variable values into ``data`` for any keys with RHS starting with ``$``."""
- ret = {}
- for k, var in data.items():
- if isinstance(var, str):
- var = os.path.expanduser(os.path.expandvars(var))
- if var.startswith("$"):
- var = None
-
- ret[k] = var
-
- return ret
-
-
-def read_qcengine_task_environment() -> Dict[str, Any]:
- """
- Reads the qcengine task-related environment variables and returns a dictionary of the values.
- """
-
- ret = {}
- for k, v in os.environ.items():
- if k.startswith("QCENGINE_"):
- ret[k[9:].lower()] = v
-
- return ret
-
-
-def get_config(*, hostname: Optional[str] = None, task_config: Dict[str, Any] = None) -> TaskConfig:
- """
- Returns the configuration key for qcengine.
- """
-
- if task_config is None:
- task_config = {}
-
- task_config_env = read_qcengine_task_environment()
- task_config = {**task_config_env, **parse_environment(task_config)}
-
- config = {}
-
- # Node data
- node = get_node_descriptor(hostname)
- ncores = node.ncores or get_global("ncores")
- config["scratch_directory"] = task_config.pop("scratch_directory", node.scratch_directory)
- config["retries"] = task_config.pop("retries", node.retries)
-
- # Jobs per node
- jobs_per_node = int(task_config.pop("jobs_per_node", None) or node.jobs_per_node)
-
- # Handle memory
- memory = task_config.pop("memory", None)
- if memory is None:
- memory = node.memory or get_global("memory")
- memory_coeff = 1 - node.memory_safety_factor / 100
- memory = round(memory * memory_coeff / jobs_per_node, 3)
-
- config["memory"] = memory
-
- # Get the number of cores available to each task
- ncores = int(task_config.pop("ncores", int(ncores / jobs_per_node)))
- if ncores < 1:
- raise KeyError("Number of jobs per node exceeds the number of available cores.")
-
- config["ncores"] = ncores
- config["nnodes"] = int(task_config.pop("nnodes", 1))
-
- # Add in the MPI launch command template
- config["mpiexec_command"] = node.mpiexec_command
- config["use_mpiexec"] = node.is_batch_node or config["nnodes"] > 1
- config["cores_per_rank"] = task_config.get("cores_per_rank", 1)
-
- # Override any settings
- if task_config is not None:
- config.update(task_config)
-
- # Make sure mpirun command is defined if needed
- if config["use_mpiexec"] and config["mpiexec_command"] is None:
- raise ValueError(
- "You need to define the mpiexec command for this node. "
- "See: https://qcengine.readthedocs.io/en/stable/environment.html"
- )
-
- return TaskConfig(**config)
-
-
-def get_provenance_augments() -> Dict[str, str]:
- return {
- "cpu": get_global("cpu_brand"),
- "hostname": get_global("hostname"),
- "username": get_global("username"),
- "qcengine_version": get_information("version"),
- }
-
-
-def get_logger() -> "Logger":
- return LOGGER
-
-
-# Pull in the local variables
-_load_defaults()
diff --git a/qcengine/exceptions.py b/qcengine/exceptions.py
deleted file mode 100644
index 1ac56b098..000000000
--- a/qcengine/exceptions.py
+++ /dev/null
@@ -1,137 +0,0 @@
-import traceback
-from typing import Any, Dict, Optional
-
-from qcelemental.models import AtomicInput
-
-
-class QCEngineException(Exception):
- """
- Base QCEngine exception, should never be called explicitly.
- """
-
- error_type = "base_error"
- header = "QCEngine Base Error"
-
- def __init__(self, message: str):
-
- # Call the base class constructor with the parameters it needs
- super().__init__(message)
-
- # Now for your custom code...
- self.raw_message = message
- self.traceback = traceback.format_exc()
-
- @property
- def error_message(self) -> str:
- return f"{self.header}: {self.raw_message}"
-
-
-class UnknownError(QCEngineException):
- """
- Unknown QCEngine error, the type was not able to be specified.
- """
-
- error_type = "unknown_error"
- header = "QCEngine Unknown Error"
-
-
-class InputError(QCEngineException):
- """
- Incorrect user parameters, not recoverable. Also may indicate a version issue.
- """
-
- error_type = "input_error"
- header = "QCEngine Input Error"
-
-
-class ResourceError(QCEngineException):
- """
- Not enough resources for computation such as not enough memory, cores, or disk was not available.
- Recoverable on different compute hardware.
- """
-
- error_type = "resource_error"
- header = "QCEngine Resource Error"
-
-
-class ConvergenceError(QCEngineException):
- """
- Failed iteration convergence error, likely recoverable with tweaked parameters.
- """
-
- error_type = "convergence_error"
- header = "QCEngine Convergence Error"
-
-
-class RandomError(QCEngineException):
- """
- Likely recoverable errors such as segmentation faults or disk io problems.
- """
-
- error_type = "random_error"
- header = "QCEngine Random Error"
-
-
-class KnownErrorException(QCEngineException):
- """Base class for detecting errors in the output of a ProgramHarness
-
- Subclasses for this class must define `error_name` and `description`, which provide
- a short name for the error used in the error correction code and a human-readable
- description of the error and how it is corrected.
-
- Subclasses for this exception must fulfill the `detect_error` class method,
- which detects if an error has occurred and raises an exception if one was detected.
- When raising the exception, the `detect_error` routine can optionally provide details
- about the error that are needed to correction.
- """
-
- error_type = "known_error"
- header = "QCEngine Known Error"
-
- error_name: str # Unique name for this error. Used in autodetection logic
- description: str # Human-readable description of the error.
- details: Optional[Dict[str, Any]] # Any details for this error. Used for user feedback and autocorrection logic
-
- def __init__(self, details: Optional[dict] = None):
- super().__init__(self.description)
- self.details = details
-
- @classmethod
- def detect_error(cls, outputs: Dict[str, str]):
- """Detect whether this operation throws an error
- Args:
- outputs (dict): Output files needed to check for errors
- Raises:
- KnownErrorException: Error, if one was detected
- """
- raise NotImplementedError()
-
- def create_keyword_update(self, input_data: AtomicInput) -> Dict[str, Any]:
- """Create an keyword used to the update the dictionary given observed error
-
- Parameters
- ----------
- input_data
- Input specification used to perform the calculation that failed
-
- Returns
- -------
- Dictionary used to update the keywords field of ``input_data``
- """
- raise NotImplementedError()
-
-
-class SimpleKnownErrorException(KnownErrorException):
- """Subclass for errors with simple detection logic.
-
- Most useful for error types that do not need any additional details to correct."""
-
- @classmethod
- def detect_error(cls, outputs: Dict[str, str]):
- if cls._detect(outputs):
- raise cls()
-
- @classmethod
- def _detect(cls, outputs: Dict[str, str]) -> bool:
- """Detect whether an error is present"""
- raise NotImplementedError()
diff --git a/qcengine/extras.py b/qcengine/extras.py
deleted file mode 100644
index b55130aee..000000000
--- a/qcengine/extras.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Misc information and runtime information.
-"""
-
-import re
-
-from . import _version
-
-__all__ = ["get_information", "provenance_stamp"]
-
-versions = _version.get_versions()
-
-__info = {"version": versions["version"], "git_revision": versions["full-revisionid"]}
-
-
-def get_information(key):
- """
- Obtains a variety of runtime information about QCEngine.
- """
- key = key.lower()
- if key not in __info:
- raise KeyError("Information key '{}' not understood.".format(key))
-
- return __info[key]
-
-
-def provenance_stamp(routine):
- """Return dictionary satisfying QCSchema,
- https://github.com/MolSSI/QCSchema/blob/master/qcschema/dev/definitions.py#L23-L41
- with QCEngine's credentials for creator and version. The
- generating routine's name is passed in through `routine`.
-
- """
- return {"creator": "QCEngine", "version": get_information("version"), "routine": routine}
-
-
-_yes = re.compile(r"^(yes|true|on|1)", re.IGNORECASE)
-_no = re.compile(r"^(no|false|off|0)", re.IGNORECASE)
-_der0th = re.compile(r"^(0|none|energy)", re.IGNORECASE)
-_der1st = re.compile(r"^(1|first|gradient)", re.IGNORECASE)
-_der2nd = re.compile(r"^(2|second|hessian)", re.IGNORECASE)
-_der3rd = re.compile(r"^(3|third)", re.IGNORECASE)
-_der4th = re.compile(r"^(4|fourth)", re.IGNORECASE)
-_der5th = re.compile(r"^(5|fifth)", re.IGNORECASE)
diff --git a/qcengine/mdi_server.py b/qcengine/mdi_server.py
deleted file mode 100644
index 90fff9e32..000000000
--- a/qcengine/mdi_server.py
+++ /dev/null
@@ -1,487 +0,0 @@
-"""Support for using QCEngine as an MDI engine.
-For details regarding MDI, see https://molssi.github.io/MDI_Library/html/index.html.
-
-"""
-from typing import Any, Dict, List, Optional
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.util import which_import
-
-from .compute import compute
-
-try:
- from mdi import (
- MDI_CHAR,
- MDI_COMMAND_LENGTH,
- MDI_DOUBLE,
- MDI_INT,
- MDI_MAJOR_VERSION,
- MDI_Accept_Communicator,
- MDI_Init,
- MDI_MPI_get_world_comm,
- MDI_Recv,
- MDI_Recv_Command,
- MDI_Register_Command,
- MDI_Register_Node,
- MDI_Send,
- )
-
- use_mdi = True
-except ImportError:
- use_mdi = False
-
-
-class MDIServer:
- def __init__(
- self,
- mdi_options: str,
- program: str,
- molecule,
- model,
- keywords,
- raise_error: bool = False,
- local_options: Optional[Dict[str, Any]] = None,
- ):
- """Initialize an MDIServer object for communication with MDI
-
- Parameters
- ----------
- mdi_options: str
- Options used during MDI initialization.
- program : str
- The program to execute the input with.
- molecule
- The initial state of the molecule.
- model
- The simulation model to use.
- keywords
- Program-specific keywords.
- raise_error : bool, optional
- Determines if compute should raise an error or not.
- local_options : Optional[Dict[str, Any]], optional
- A dictionary of local configuration options
- """
-
- if not use_mdi:
- raise Exception("Trying to run as an MDI engine, but the MDI Library was not found")
-
- if MDI_MAJOR_VERSION < 1:
- raise Exception("QCEngine requires version 1.0.0 or higher of the MDI Library")
-
- # Confirm that the MDI library has been located
- which_import("mdi", raise_error=True, raise_msg="Please install via 'conda install pymdi -c conda-forge'")
-
- # Initialize MDI
- MDI_Init(mdi_options)
-
- # Input variables
- self.molecule = molecule
- self.model = model
- self.keywords = keywords
- self.program = program
- self.raise_error = raise_error
- self.local_options = local_options
-
- # The MDI interface does not currently support multiple fragments
- if len(self.molecule.fragments) != 1:
- raise Exception("The MDI interface does not support multiple fragments")
-
- # Molecule charge and multiplicity
- self.total_charge = self.molecule.molecular_charge
- self.multiplicity = self.molecule.molecular_multiplicity
-
- # Flag to track whether the latest molecule specification has been validated
- self.molecule_validated = True
-
- # Output of most recent compute call
- self.compute_return = None
-
- # Set whether the current energy is valid
- self.energy_is_current = False
-
- # MPI variables
- self.mpi_world = None
- self.world_rank = 0
-
- # Flag to stop listening for MDI commands
- self.stop_listening = False
-
- # Dictionary of all supported MDI commands
- self.commands = {
- "<@": self.send_node,
- "NATOMS": self.recv_natoms,
- "COORDS": self.recv_coords,
- "SCF": self.run_energy,
- "ELEMENTS": self.recv_elements,
- "MASSES": self.recv_masses,
- "TOTCHARGE": self.recv_total_charge,
- "ELEC_MULT": self.recv_multiplicity,
- "EXIT": self.stop,
- }
-
- # Register the @DEFAULT node
- MDI_Register_Node("@DEFAULT")
-
- # Register all supported commands
- for c in self.commands.keys():
- MDI_Register_Command("@DEFAULT", c)
-
- # Set the current node
- self.current_node = "@DEFAULT"
-
- # Accept a communicator to the driver code
- self.comm = MDI_Accept_Communicator()
-
- def update_molecule(self, key: str, value):
- """Update the molecule
-
- Parameters
- ----------
- key : str
- Key of the molecular element to update
- value
- Update value
- """
- if key == "molecular_charge" or key == "molecular_multiplicity":
- # In order to validate correctly, the charges and multiplicities must be set simultaneously
- try:
- self.molecule = qcel.models.Molecule(
- **{
- **self.molecule.dict(),
- **{
- "molecular_charge": self.total_charge,
- "fragment_charges": [self.total_charge],
- "molecular_multiplicity": self.multiplicity,
- "fragment_multiplicities": [self.multiplicity],
- },
- }
- )
- self.molecule_validated = True
- except qcel.exceptions.ValidationError:
- # The molecule didn't validate correctly, but a future >TOTCHARGE or >ELEC_MULT command might fix it
- self.molecule_validated = False
- else:
- try:
- self.molecule = qcel.models.Molecule(**{**self.molecule.dict(), **{key: value}})
- self.molecule_validated = True
- except qcel.exceptions.ValidationError:
- if self.molecule_validated:
- # This update caused the validation error
- raise Exception("MDI command caused a validation error")
-
- # Respond to the <@ command
- def send_node(self) -> str:
- """Send the name of the current node through MDI
-
- Returns
- -------
- node : str
- Name of the current node
- """
- node = self.current_node
- MDI_Send(node, MDI_COMMAND_LENGTH, MDI_CHAR, self.comm)
- return node
-
- # Respond to the int:
- """Send the number of atoms through MDI
-
- Returns
- -------
- natom : int
- Number of atoms
- """
- natom = len(self.molecule.geometry)
- MDI_Send(natom, 1, MDI_INT, self.comm)
- return natom
-
- # Respond to the >NATOMS command
- def recv_natoms(self, natoms: Optional[int] = None) -> None:
- """Receive the number of atoms in the system through MDI and create a new molecule with them
-
- Parameters
- ----------
- natoms : int, optional
- New number of atoms. If None, receive through MDI.
- """
- natom = len(self.molecule.geometry)
- if natoms is None:
- natoms = MDI_Recv(1, MDI_INT, self.comm)
-
- mol_string = ""
- for iatom in range(natoms):
- mol_string += "He " + str(1.0 * iatom) + " 0.0 0.0\n"
- self.molecule = qcel.models.Molecule.from_data(mol_string)
-
- self.energy_is_current = False
-
- # Respond to the np.ndarray:
- """Send the nuclear coordinates through MDI
-
- Returns
- -------
- coords : np.ndarray
- Nuclear coordinates
- """
- natom = len(self.molecule.geometry)
-
- coords = np.reshape(self.molecule.geometry, (3 * natom))
- MDI_Send(coords, 3 * natom, MDI_DOUBLE, self.comm)
-
- return coords
-
- # Respond to the >COORDS command
- def recv_coords(self, coords: Optional[np.ndarray] = None) -> None:
- """Receive a set of nuclear coordinates through MDI and assign them to the atoms in the current molecule
-
- Parameters
- ----------
- coords : np.ndarray, optional
- New nuclear coordinates. If None, receive through MDI.
- """
- natom = len(self.molecule.geometry)
- if coords is None:
- coords = np.zeros(3 * natom)
- MDI_Recv(3 * natom, MDI_DOUBLE, self.comm, buf=coords)
- new_geometry = np.reshape(coords, (-1, 3))
- self.molecule = qcel.models.Molecule(**{**self.molecule.dict(), **{"geometry": new_geometry}})
- self.energy_is_current = False
-
- # Respond to the float:
- """Send the total energy through MDI
-
- Returns
- -------
- energy : float
- Energy of the system
- """
- # Ensure that the molecule currently passes validation
- if not self.molecule_validated:
- raise Exception("MDI attempting to compute energy on an unvalidated molecule")
- self.run_energy()
-
- # Confirm that the calculation completed successfully
- if not hasattr(self.compute_return, "properties"):
- raise Exception("MDI Calculation failed: \n\n" + str(self.compute_return.error.error_message))
-
- properties = self.compute_return.properties.dict()
- energy = properties["return_energy"]
- MDI_Send(energy, 1, MDI_DOUBLE, self.comm)
- return energy
-
- # Respond to the np.ndarray:
- """Send the nuclear forces through MDI
-
- Returns
- -------
- forces : np.ndarray
- Forces on the nuclei
- """
- # Ensure that the molecule currently passes validation
- if not self.molecule_validated:
- raise Exception("MDI attempting to compute gradients on an unvalidated molecule")
- self.run_energy()
- properties = self.compute_return.properties.dict()
-
- forces = np.reshape(-1.0 * properties["return_gradient"], (-1,))
-
- if len(forces) != 3 * len(self.molecule.geometry):
- raise Exception(
- "MDI: The length of the forces is not what was expected. Expected: "
- + str(3 * len(self.molecule.geometry))
- + " Actual: "
- + str(len(forces))
- )
-
- MDI_Send(forces, len(forces), MDI_DOUBLE, self.comm)
- return forces
-
- # Respond to the SCF command
- def run_energy(self) -> None:
- if not self.energy_is_current:
- """Ensure that the orientation of the molecule remains fixed"""
- self.update_molecule("fix_com", True)
- self.update_molecule("fix_orientation", True)
-
- """Run an energy calculation"""
- input = qcel.models.AtomicInput(
- molecule=self.molecule, driver="gradient", model=self.model, keywords=self.keywords
- )
- self.compute_return = compute(
- input_data=input, program=self.program, raise_error=self.raise_error, local_options=self.local_options
- )
-
- # If there is an error message, print it out
- if hasattr(self.compute_return, "error"):
- if self.compute_return.error is not None:
- print("---------------- QCEngine Compute Error ----------------\n\n")
- print(str(self.compute_return.error.error_message))
- print("\n\n-------------- End QCEngine Compute Error --------------", flush=True)
-
- self.energy_is_current = True
-
- # Respond to the ELEMENTS command
- def recv_elements(self, elements: Optional[List[int]] = None):
- """Receive a set of atomic numbers through MDI and assign them to the atoms in the current molecule
-
- Parameters
- ----------
- elements : :obj:`list` of :obj:`int`, optional
- New element numbers. If None, receive through MDI.
- """
- natom = len(self.molecule.geometry)
- if elements is None:
- elements = MDI_Recv(natom, MDI_INT, self.comm)
-
- for iatom in range(natom):
- self.molecule.symbols[iatom] = qcel.periodictable.to_symbol(elements[iatom])
-
- return elements
-
- # Respond to the np.ndarray:
- """Send the nuclear masses through MDI
-
- Returns
- -------
- masses : np.ndarray
- Atomic masses
- """
- natom = len(self.molecule.geometry)
- masses = self.molecule.masses
- MDI_Send(masses, natom, MDI_DOUBLE, self.comm)
- return masses
-
- # Respond to the >MASSES command
- def recv_masses(self, masses: Optional[List[float]] = None) -> None:
- """Receive a set of nuclear masses through MDI and assign them to the atoms in the current molecule
-
- Parameters
- ----------
- masses : :obj:`list` of :obj:`float`, optional
- New nuclear masses. If None, receive through MDI.
- """
- natom = len(self.molecule.geometry)
- if masses is None:
- masses = MDI_Recv(natom, MDI_DOUBLE, self.comm)
- self.update_molecule("masses", masses)
- self.energy_is_current = False
-
- # Respond to the float:
- """Send the total system charge through MDI
-
- Returns
- -------
- charge : float
- Total charge of the system
- """
- charge = self.molecule.molecular_charge
- MDI_Send(charge, 1, MDI_DOUBLE, self.comm)
- return charge
-
- # Respond to the >TOTCHARGE command
- def recv_total_charge(self, charge: Optional[float] = None) -> None:
- """Receive the total system charge through MDI
-
- Parameters
- ----------
- charge : float, optional
- New charge of the system. If None, receive through MDI.
- """
- if charge is None:
- charge = MDI_Recv(1, MDI_DOUBLE, self.comm)
- self.total_charge = charge
- self.energy_is_current = False
-
- # Allow a validation error here, because a future >ELEC_MULT command might resolve it
- try:
- self.update_molecule("molecular_charge", self.total_charge)
- except qcel.exceptions.ValidationError:
- pass
-
- # Respond to the int:
- """Send the electronic multiplicity through MDI
-
- Returns
- -------
- multiplicity : int
- Multiplicity of the system
- """
- multiplicity = self.molecule.molecular_multiplicity
- MDI_Send(multiplicity, 1, MDI_INT, self.comm)
- return multiplicity
-
- # Respond to the >ELEC_MULT command
- def recv_multiplicity(self, multiplicity: Optional[int] = None) -> None:
- """Receive the electronic multiplicity through MDI
-
- Parameters
- ----------
- multiplicity : int, optional
- New multiplicity of the system. If None, receive through MDI.
- """
- if multiplicity is None:
- multiplicity = MDI_Recv(1, MDI_INT, self.comm)
- self.multiplicity = multiplicity
- self.energy_is_current = False
-
- # Allow a validation error here, because a future >TOTCHARGE command might resolve it
- try:
- self.update_molecule("molecular_multiplicity", self.multiplicity)
- except qcel.exceptions.ValidationError:
- pass
-
- # Respond to the EXIT command
- def stop(self) -> None:
- """Stop listening for MDI commands"""
- self.stop_listening = True
-
- # Enter server mode, listening for commands from the driver
- def start(self) -> None:
- """Receive commands through MDI and respond to them as defined by the MDI Standard"""
-
- while not self.stop_listening:
- if self.world_rank == 0:
- command = MDI_Recv_Command(self.comm)
- else:
- command = None
- if self.world_rank == 0:
- print("MDI command received: " + str(command))
-
- # Search for this command in self.commands
- found_command = False
- for supported_command in self.commands:
- if not found_command and command == supported_command:
- # Run the function corresponding to this command
- self.commands[supported_command]()
- found_command = True
- if not found_command:
- raise Exception("Unrecognized command: " + str(command))
diff --git a/qcengine/procedures/__init__.py b/qcengine/procedures/__init__.py
deleted file mode 100644
index b5e0e0266..000000000
--- a/qcengine/procedures/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .base import get_procedure, list_all_procedures, list_available_procedures, register_procedure
diff --git a/qcengine/procedures/base.py b/qcengine/procedures/base.py
deleted file mode 100644
index 2e9979d4a..000000000
--- a/qcengine/procedures/base.py
+++ /dev/null
@@ -1,73 +0,0 @@
-"""
-Imports the various procedure backends
-"""
-
-from typing import Set
-
-from ..exceptions import InputError, ResourceError
-from .berny import BernyProcedure
-from .geometric import GeometricProcedure
-from .nwchem_opt import NWChemDriverProcedure
-from .optking import OptKingProcedure
-from .torsiondrive import TorsionDriveProcedure
-from .model import ProcedureHarness
-
-__all__ = ["register_procedure", "get_procedure", "list_all_procedures", "list_available_procedures"]
-
-procedures = {}
-
-
-def register_procedure(entry_point: ProcedureHarness) -> None:
- """
- Register a new ProcedureHarness with QCEngine
- """
-
- name = entry_point.name
- if name.lower() in procedures.keys():
- raise ValueError("{} is already a registered procedure.".format(name))
-
- procedures[name.lower()] = entry_point
-
-
-def get_procedure(name: str) -> ProcedureHarness:
- """
- Returns a procedures executor class
- """
-
- name = name.lower()
-
- if name not in procedures:
- raise InputError(f"Procedure {name} is not registered to QCEngine.")
-
- ret = procedures[name]
- if not ret.found():
- raise ResourceError(f"Procedure {name} is registered with QCEngine, but cannot be found.")
-
- return ret
-
-
-def list_all_procedures() -> Set[str]:
- """
- List all procedures registered by QCEngine.
- """
- return set(procedures.keys())
-
-
-def list_available_procedures() -> Set[str]:
- """
- List all procedures that can be exectued (found) by QCEngine.
- """
-
- ret = set()
- for k, p in procedures.items():
- if p.found():
- ret.add(k)
-
- return ret
-
-
-register_procedure(GeometricProcedure())
-register_procedure(OptKingProcedure())
-register_procedure(BernyProcedure())
-register_procedure(NWChemDriverProcedure())
-register_procedure(TorsionDriveProcedure())
diff --git a/qcengine/procedures/berny.py b/qcengine/procedures/berny.py
deleted file mode 100644
index 84345f203..000000000
--- a/qcengine/procedures/berny.py
+++ /dev/null
@@ -1,96 +0,0 @@
-import logging
-from qcengine.exceptions import UnknownError
-import sys
-import traceback
-from io import StringIO
-from typing import Any, Dict, Union
-
-import numpy as np
-from qcelemental.models import OptimizationInput, OptimizationResult, FailedOperation
-from qcelemental.util import which_import
-
-import qcengine
-
-from ..config import TaskConfig
-from .model import ProcedureHarness
-
-
-class BernyProcedure(ProcedureHarness):
- _defaults = {"name": "Berny", "procedure": "optimization"}
-
- def found(self, raise_error: bool = False) -> bool:
- return which_import(
- "berny",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `pip install pyberny`.",
- )
-
- def build_input_model(self, data: Union[Dict[str, Any], "OptimizationInput"]) -> "OptimizationInput":
- return self._build_model(data, OptimizationInput)
-
- def compute(
- self, input_data: "OptimizationInput", config: "TaskConfig"
- ) -> Union["OptimizationResult", "FailedOperation"]:
- try:
- import berny
- except ModuleNotFoundError:
- raise ModuleNotFoundError("Could not find Berny in the Python path.")
-
- # Get berny version from the installed package, use setuptools'
- # pkg_resources for python < 3.8
- if sys.version_info >= (3, 8):
- from importlib.metadata import distribution
- else:
- from pkg_resources import get_distribution as distribution
- berny_version = distribution("pyberny").version
-
- # Berny uses the stdlib logging module and by default uses per-module
- # loggers. For QCEngine, we create one logger per BernyProcedure
- # instance, by using the instance's id(), and send all logging messages
- # to a string stream
- log_stream = StringIO()
- log = logging.getLogger(f"{__name__}.{id(self)}")
- log.addHandler(logging.StreamHandler(log_stream))
- log.setLevel("INFO")
-
- input_data = input_data.dict()
- geom_qcng = input_data["initial_molecule"]
- comput = {**input_data["input_specification"], "molecule": geom_qcng}
- program = input_data["keywords"].pop("program")
- task_config = config.dict()
- trajectory = []
- output_data = input_data.copy()
- try:
- # Pyberny uses angstroms for the Cartesian geometry, but atomic
- # units for everything else, including the gradients (hartree/bohr).
- geom_berny = berny.Geometry(geom_qcng["symbols"], geom_qcng["geometry"] / berny.angstrom)
- opt = berny.Berny(geom_berny, logger=log, **input_data["keywords"])
- for geom_berny in opt:
- geom_qcng["geometry"] = np.stack(geom_berny.coords * berny.angstrom)
- ret = qcengine.compute(comput, program, task_config=task_config)
- if ret.success:
- trajectory.append(ret.dict())
- opt.send((ret.properties.return_energy, ret.return_result))
- else:
- # qcengine.compute returned FailedOperation
- raise UnknownError("Gradient computation failed")
-
- except UnknownError:
- error = ret.error.dict() # ComputeError
- except Exception:
- error = {"error_type": "unknown", "error_message": f"Berny error:\n{traceback.format_exc()}"}
- else:
- output_data["success"] = True
- output_data.update(
- {
- "schema_name": "qcschema_optimization_output",
- "final_molecule": trajectory[-1]["molecule"],
- "energies": [r["properties"]["return_energy"] for r in trajectory],
- "trajectory": trajectory,
- "provenance": {"creator": "Berny", "routine": "berny.Berny", "version": berny_version},
- "stdout": log_stream.getvalue(), # collect logged messages
- }
- )
- return OptimizationResult(**output_data)
- return FailedOperation(input_data=input_data, error=error)
diff --git a/qcengine/procedures/geometric.py b/qcengine/procedures/geometric.py
deleted file mode 100644
index 59bc26c86..000000000
--- a/qcengine/procedures/geometric.py
+++ /dev/null
@@ -1,70 +0,0 @@
-from typing import Any, Dict, Union
-
-from qcelemental.models import OptimizationInput, OptimizationResult
-from qcelemental.util import safe_version, which_import
-
-from .model import ProcedureHarness
-
-
-class GeometricProcedure(ProcedureHarness):
-
- _defaults = {"name": "geomeTRIC", "procedure": "optimization"}
-
- version_cache: Dict[str, str] = {}
-
- class Config(ProcedureHarness.Config):
- pass
-
- def found(self, raise_error: bool = False) -> bool:
- return which_import(
- "geometric",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install geometric -c conda-forge`.",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which_import("geometric")
- if which_prog not in self.version_cache:
- import geometric
-
- self.version_cache[which_prog] = safe_version(geometric.__version__)
-
- return self.version_cache[which_prog]
-
- def build_input_model(self, data: Union[Dict[str, Any], "OptimizationInput"]) -> "OptimizationInput":
- return self._build_model(data, OptimizationInput)
-
- def compute(self, input_model: "OptimizationInput", config: "TaskConfig") -> "OptimizationResult":
- try:
- import geometric
- except ModuleNotFoundError:
- raise ModuleNotFoundError("Could not find geomeTRIC in the Python path.")
-
- input_data = input_model.dict()
-
- # Temporary patch for geomeTRIC
- input_data["initial_molecule"]["symbols"] = list(input_data["initial_molecule"]["symbols"])
-
- # Set retries to two if zero while respecting local_config
- local_config = config.dict()
- local_config["retries"] = local_config.get("retries", 2) or 2
- input_data["input_specification"]["extras"]["_qcengine_local_config"] = local_config
-
- # Run the program
- output_data = geometric.run_json.geometric_run_json(input_data)
-
- output_data["provenance"] = {
- "creator": "geomeTRIC",
- "routine": "geometric.run_json.geometric_run_json",
- "version": geometric.__version__,
- }
-
- output_data["schema_name"] = "qcschema_optimization_output"
- output_data["input_specification"]["extras"].pop("_qcengine_local_config", None)
- if output_data["success"]:
- output_data = OptimizationResult(**output_data)
-
- return output_data
diff --git a/qcengine/procedures/model.py b/qcengine/procedures/model.py
deleted file mode 100644
index 0e540114d..000000000
--- a/qcengine/procedures/model.py
+++ /dev/null
@@ -1,70 +0,0 @@
-import abc
-from typing import Any, Dict, Union
-
-try:
- from pydantic.v1 import BaseModel
-except ImportError:
- from pydantic import BaseModel
-
-from ..util import model_wrapper
-
-
-class ProcedureHarness(BaseModel, abc.ABC):
-
- name: str
- procedure: str
-
- class Config:
- allow_mutation: False
- extra: "forbid"
-
- def __init__(self, **kwargs):
- super().__init__(**{**self._defaults, **kwargs})
-
- @abc.abstractmethod
- def build_input_model(self, data: Union[Dict[str, Any], "BaseModel"], raise_error: bool = True) -> "BaseModel":
- """
- Build and validate the input model, passes if the data was a normal BaseModel input.
-
- Parameters
- ----------
- data : Union[Dict[str, Any], 'BaseModel']
- A data blob to construct the model from or the input model itself
- raise_error : bool, optional
- Raise an error or not if the operation failed.
-
- Returns
- -------
- BaseModel
- The input model for the procedure.
- """
-
- @abc.abstractmethod
- def compute(self, input_data: "BaseModel", config: "TaskConfig") -> "BaseModel":
- pass
-
- @abc.abstractmethod
- def found(self, raise_error: bool = False) -> bool:
- """
- Checks if the program can be found.
-
- Returns
- -------
- bool
- If the proceudre was found or not.
- """
-
- def _build_model(self, data: Dict[str, Any], model: "BaseModel") -> "BaseModel":
- """
- Quick wrapper around util.model_wrapper for inherited classes
- """
-
- return model_wrapper(data, model)
-
- def get_version(self) -> str:
- """Finds procedure, extracts version, returns normalized version string.
- Returns
- -------
- str
- Return a valid, safe python version string.
- """
diff --git a/qcengine/procedures/nwchem_opt/__init__.py b/qcengine/procedures/nwchem_opt/__init__.py
deleted file mode 100644
index 08baabc50..000000000
--- a/qcengine/procedures/nwchem_opt/__init__.py
+++ /dev/null
@@ -1,104 +0,0 @@
-from typing import Union, Dict, Any
-
-from qcelemental.models import OptimizationInput, AtomicInput, OptimizationResult, Provenance
-
-from qcengine.config import TaskConfig
-from qcengine.exceptions import UnknownError, InputError
-from qcengine.procedures.nwchem_opt.harvester import harvest_as_atomic_result
-from qcengine.programs.nwchem.runner import NWChemHarness
-from qcengine.procedures.model import ProcedureHarness
-
-
-class NWChemDriverProcedure(ProcedureHarness):
- """Structural relaxation using NWChem's optimizer"""
-
- _defaults = {"name": "NWChemDriver", "procedure": "optimization"}
-
- class Config(ProcedureHarness.Config):
- pass
-
- def found(self, raise_error: bool = False) -> bool:
- nwc_harness = NWChemHarness()
- return nwc_harness.found(raise_error)
-
- def get_version(self) -> str:
- nwc_harness = NWChemHarness()
- return nwc_harness.get_version()
-
- def build_input_model(self, data: Union[Dict[str, Any], "OptimizationInput"]) -> OptimizationInput:
- return self._build_model(data, OptimizationInput)
-
- def compute(self, input_data: OptimizationInput, config: TaskConfig) -> "BaseModel":
- nwc_harness = NWChemHarness()
- self.found(raise_error=True)
-
- # Unify the keywords from the OptimizationInput and QCInputSpecification
- # Optimization input will override, but don't tell users this as it seems unnecessary
- keywords = input_data.keywords.copy()
- keywords.update(input_data.input_specification.keywords)
- if keywords.get("program", "nwchem").lower() != "nwchem":
- raise InputError("NWChemDriver procedure only works with NWChem")
-
- # Add a flag to the atomic input that tells the NWChemHarness we are calling it from driver
- # This is needed for the NWCHarness to make some changes to the input file
- input_data.input_specification.extras["is_driver"] = True
-
- # Make an atomic input
- atomic_input = AtomicInput(
- molecule=input_data.initial_molecule,
- driver="energy",
- keywords=keywords,
- **input_data.input_specification.dict(exclude={"driver", "keywords"}),
- )
-
- # Build the inputs for the job
- job_inputs = nwc_harness.build_input(atomic_input, config)
-
- # Replace the last line with a "task {} optimize"
- input_file: str = job_inputs["infiles"]["nwchem.nw"].strip()
- beginning, last_line = input_file.rsplit("\n", 1)
- assert last_line.startswith("task")
- last_line = f"task {last_line.split(' ')[1]} optimize"
- job_inputs["infiles"]["nwchem.nw"] = f"{beginning}\n{last_line}"
-
- # Run it!
- success, dexe = nwc_harness.execute(job_inputs)
-
- # Check for common errors
- if "There is an error in the input file" in dexe["stdout"]:
- raise InputError(dexe["stdout"])
- if "not compiled" in dexe["stdout"]:
- # recoverable with a different compilation with optional modules
- raise InputError(dexe["stdout"])
-
- # Parse it
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- return self.parse_output(dexe["outfiles"], input_data)
- else:
- raise UnknownError(dexe["stdout"])
-
- def parse_output(self, outfiles: Dict[str, str], input_model: OptimizationInput) -> OptimizationResult:
-
- # Get the stdout from the calculation (required)
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- # Parse out the atomic results from the file
- atomic_results = harvest_as_atomic_result(input_model, stdout)
-
- # Isolate the converged result
- final_step = atomic_results[-1]
-
- return OptimizationResult(
- initial_molecule=input_model.initial_molecule,
- input_specification=input_model.input_specification,
- final_molecule=final_step.molecule,
- trajectory=atomic_results,
- energies=[float(r.extras["qcvars"]["CURRENT ENERGY"]) for r in atomic_results],
- stdout=stdout,
- stderr=stderr,
- success=True,
- provenance=Provenance(creator="NWChemRelax", version=self.get_version(), routine="nwchem_opt"),
- )
diff --git a/qcengine/procedures/nwchem_opt/harvester.py b/qcengine/procedures/nwchem_opt/harvester.py
deleted file mode 100644
index 76ba2abb2..000000000
--- a/qcengine/procedures/nwchem_opt/harvester.py
+++ /dev/null
@@ -1,98 +0,0 @@
-import re
-from decimal import Decimal
-from typing import List, Tuple
-
-from qcelemental.models import AtomicResult, Molecule, OptimizationInput, Provenance
-from qcelemental.util import unnp
-
-from qcengine.programs.nwchem.harvester import harvest_outfile_pass
-from qcengine.programs.qcvar_identities_resources import build_atomicproperties, build_out
-from qcengine.programs.util import PreservingDict
-
-
-def harvest_output(outtext: str) -> Tuple[List[PreservingDict], List[Molecule], List[list], str, str]:
- """Function to read an entire NWChem output file.
-
- Reads all of the different "line search" segments of a file and returns
- values from up to last segment for which a geometry was written.
-
- Args:
- outtext (str): Output written to stdout
- Returns:
- - Variables extracted from the output file in each optimization step
- - Molecules from the each complete step
- - Gradients from the each complete step
- - (str): Version string
- - (str): Error message, if any
- """
-
- # Loop over all steps
- # TODO (wardlt): Is it only necessary to read the last two steps?
- pass_psivar = []
- pass_coord = []
- pass_grad = []
- version = error = None
- for outpass in re.split(r"Step +\d", outtext, re.MULTILINE)[1:]:
- psivar, nwcoord, nwgrad, version, module, error = harvest_outfile_pass(outpass)
- pass_psivar.append(psivar)
- pass_coord.append(nwcoord)
- pass_grad.append(nwgrad)
-
- # Ensure last segment contains the last geometry
- if not pass_coord[-1]:
- pass_psivar.pop()
- pass_coord.pop()
- pass_grad.pop()
-
- return pass_psivar, pass_coord, pass_grad, version, module, error
-
-
-def harvest_as_atomic_result(input_model: OptimizationInput, nwout: str) -> List[AtomicResult]:
- """Parse each step in the geometry relaxation as a separate AtomicResult
-
- Args:
- input_model: Input specification for the relaxation
- nwout: Standard out from the NWChem simulation
- Returns:
- A list of the results at each step
- """
- # Parse the files
- out_psivars, out_mols, out_grads, version, module, error = harvest_output(nwout)
-
- # Make atomic results
- results = []
- for qcvars, nwgrad, out_mol in zip(out_psivars, out_grads, out_mols):
- if nwgrad is not None:
- qcvars[f"{input_model.input_specification.model.method.upper()[4:]} TOTAL GRADIENT"] = nwgrad
- qcvars["CURRENT GRADIENT"] = nwgrad
-
- # Get the formatted properties
- build_out(qcvars)
- atprop = build_atomicproperties(qcvars)
-
- provenance = Provenance(creator="NWChem", version=version, routine="nwchem_opt").dict()
- if module is not None:
- provenance["module"] = module
-
- # Format them inout an output
- output_data = {
- "schema_version": 1,
- "molecule": out_mol,
- "driver": "gradient",
- "extras": input_model.extras.copy(),
- "model": input_model.input_specification.model,
- "keywords": input_model.input_specification.keywords,
- "properties": atprop,
- "provenance": provenance,
- "return_result": nwgrad,
- "success": True,
- }
-
- # got to even out who needs plump/flat/Decimal/float/ndarray/list
- # Decimal --> str preserves precision
- output_data["extras"]["qcvars"] = {
- k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in unnp(qcvars, flat=True).items()
- }
-
- results.append(AtomicResult(**output_data))
- return results
diff --git a/qcengine/procedures/optking.py b/qcengine/procedures/optking.py
deleted file mode 100644
index 34139a3f3..000000000
--- a/qcengine/procedures/optking.py
+++ /dev/null
@@ -1,59 +0,0 @@
-from typing import Any, Dict, Union
-
-from qcelemental.models import OptimizationInput, OptimizationResult
-from qcelemental.util import safe_version, which_import
-
-from .model import ProcedureHarness
-
-
-class OptKingProcedure(ProcedureHarness):
-
- _defaults = {"name": "OptKing", "procedure": "optimization"}
-
- version_cache: Dict[str, str] = {}
-
- class Config(ProcedureHarness.Config):
- pass
-
- def found(self, raise_error: bool = False) -> bool:
- return which_import(
- "optking",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install optking -c conda-forge`.",
- )
-
- def build_input_model(self, data: Union[Dict[str, Any], "OptimizationInput"]) -> "OptimizationInput":
- return self._build_model(data, OptimizationInput)
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which_import("optking")
- if which_prog not in self.version_cache:
- import optking
-
- self.version_cache[which_prog] = safe_version(optking.__version__)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "OptimizationInput", config: "TaskConfig") -> "Optimization":
- if self.found(raise_error=True):
- import optking
-
- input_data = input_model.dict()
-
- # Set retries to two if zero while respecting local_config
- local_config = config.dict()
- local_config["retries"] = local_config.get("retries", 2) or 2
- input_data["input_specification"]["extras"]["_qcengine_local_config"] = local_config
-
- # Run the program
- output_data = optking.optwrapper.optimize_qcengine(input_data)
-
- output_data["schema_name"] = "qcschema_optimization_output"
- output_data["input_specification"]["extras"].pop("_qcengine_local_config", None)
- if output_data["success"]:
- output_data = OptimizationResult(**output_data)
-
- return output_data
diff --git a/qcengine/procedures/torsiondrive.py b/qcengine/procedures/torsiondrive.py
deleted file mode 100644
index 0fc1327d7..000000000
--- a/qcengine/procedures/torsiondrive.py
+++ /dev/null
@@ -1,232 +0,0 @@
-import io
-from collections import defaultdict
-from contextlib import redirect_stderr, redirect_stdout
-from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Union
-
-import numpy as np
-from qcelemental.models import FailedOperation, Molecule
-from qcelemental.models.procedures import OptimizationInput, OptimizationResult, TorsionDriveInput, TorsionDriveResult
-from qcelemental.util import which_import
-
-from .model import ProcedureHarness
-
-if TYPE_CHECKING:
- from ..config import TaskConfig
-
-
-class TorsionDriveProcedure(ProcedureHarness):
-
- _defaults = {"name": "TorsionDrive", "procedure": "torsiondrive"}
-
- class Config(ProcedureHarness.Config):
- pass
-
- def found(self, raise_error: bool = False) -> bool:
- return which_import(
- "torsiondrive",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install torsiondrive -c conda-forge`.",
- )
-
- def build_input_model(self, data: Union[Dict[str, Any], "TorsionDriveInput"]) -> "TorsionDriveInput":
- return self._build_model(data, TorsionDriveInput)
-
- def _compute(self, input_model: "TorsionDriveInput", config: "TaskConfig"):
-
- self.found(raise_error=True)
-
- import torsiondrive.td_api
-
- dihedrals = input_model.keywords.dihedrals
- grid_spacing = input_model.keywords.grid_spacing
-
- dihedral_ranges = input_model.keywords.dihedral_ranges
-
- energy_decrease_thresh = input_model.keywords.energy_decrease_thresh
- energy_upper_limit = input_model.keywords.energy_upper_limit
-
- state = torsiondrive.td_api.create_initial_state(
- dihedrals=dihedrals,
- grid_spacing=grid_spacing,
- elements=input_model.initial_molecule[0].symbols,
- init_coords=[molecule.geometry.flatten().tolist() for molecule in input_model.initial_molecule],
- dihedral_ranges=dihedral_ranges,
- energy_upper_limit=energy_upper_limit,
- energy_decrease_thresh=energy_decrease_thresh,
- )
-
- optimization_results = defaultdict(list)
- error = None
-
- # Spawn new optimizations at each grid points until convergence / an error.
- while True:
-
- next_jobs = torsiondrive.td_api.next_jobs_from_state(state, verbose=False)
-
- if len(next_jobs) == 0:
- break
-
- grid_point_results = self._spawn_optimizations(next_jobs=next_jobs, input_model=input_model, config=config)
-
- for grid_point, results in grid_point_results.items():
-
- failed_results = [result for result in results if not result.success]
-
- if len(failed_results) > 0:
-
- error_message = failed_results[0].error.error_message
- error = {
- "error_type": "unknown",
- "error_message": f"TorsionDrive error at {grid_point}:\n{error_message}",
- }
- break
-
- optimization_results[grid_point].extend(results)
-
- if error is not None:
- break
-
- task_results = {
- grid_point: [
- (
- result.initial_molecule.geometry.flatten().tolist(),
- result.final_molecule.geometry.flatten().tolist(),
- result.energies[-1],
- )
- for result in results
- ]
- for grid_point, results in grid_point_results.items()
- }
-
- torsiondrive.td_api.update_state(state, {**task_results})
-
- output_data = input_model.dict()
- output_data["provenance"] = {
- "creator": "TorsionDrive",
- "routine": "torsiondrive.td_api.next_jobs_from_state",
- "version": torsiondrive.__version__,
- }
- output_data["success"] = error is None
-
- # even if we hit an error during the torsiondrive, we output what we can
- output_data["final_energies"], output_data["final_molecules"] = {}, {}
-
- for grid_point, results in optimization_results.items():
-
- final_energy, final_molecule = self._find_final_results(results)
-
- output_data["final_energies"][grid_point] = final_energy
- output_data["final_molecules"][grid_point] = final_molecule
-
- output_data["optimization_history"] = optimization_results
-
- if error is not None:
- output_data["error"] = error
-
- return output_data
-
- def compute(self, input_model: "TorsionDriveInput", config: "TaskConfig") -> "TorsionDriveResult":
-
- # Capture the stdout and err here to avoid too much nesting in the _compute function
- with io.StringIO() as stdout:
- with io.StringIO() as stderr:
-
- with redirect_stdout(stdout):
- with redirect_stderr(stderr):
-
- output_data = self._compute(input_model, config)
-
- output_data["stdout"] = str(stdout.getvalue())
- output_data["stderr"] = str(stderr.getvalue())
-
- # these will get populated by the model below
- output_data.pop("schema_name", None)
- output_data.pop("schema_version", None)
-
- output_data = TorsionDriveResult(**output_data)
-
- return output_data
-
- @staticmethod
- def _spawn_optimization(
- grid_point: str, job: List[float], input_model: "TorsionDriveInput", config: "TaskConfig"
- ) -> Union[FailedOperation, OptimizationResult]:
- """Spawns an optimization at a particular grid point and returns the result.
-
- Parameters
- ----------
- grid_point
- A string of the form 'dihedral_1_angle ... dihedral_n_angle' that encodes
- the current dihedrals angles to optimize at.
- job
- The flattened conformer of the molecule to start the optimization at with
- length=(n_atoms * 3)
- input_model
- The input model containing the relevant settings for how to optimize the
- structure.
- config
- The configuration to launch the task using.
-
- Returns
- -------
- The result of the optimization if successful, otherwise an error containing
- object.
- """
-
- from qcengine import compute_procedure
-
- input_molecule = input_model.initial_molecule[0].copy(deep=True).dict()
- input_molecule["geometry"] = np.array(job).reshape(len(input_molecule["symbols"]), 3)
- input_molecule = Molecule.from_data(input_molecule)
-
- dihedrals = input_model.keywords.dihedrals
- angles = grid_point.split()
-
- keywords = {
- **input_model.optimization_spec.keywords,
- "constraints": {
- "set": [
- {
- "type": "dihedral",
- "indices": dihedral,
- "value": int(angle),
- }
- for dihedral, angle in zip(dihedrals, angles)
- ]
- },
- }
-
- input_data = OptimizationInput(
- keywords=keywords,
- extras={},
- protocols=input_model.optimization_spec.protocols,
- input_specification=input_model.input_specification,
- initial_molecule=input_molecule,
- )
-
- return compute_procedure(
- input_data, procedure=input_model.optimization_spec.procedure, task_config=config.dict()
- )
-
- @staticmethod
- def _find_final_results(
- optimization_results: List[OptimizationResult],
- ) -> Tuple[float, Molecule]:
- """Returns the energy and final molecule of the lowest energy optimization
- in a set."""
-
- final_energies = np.array([result.energies[-1] for result in optimization_results])
- lowest_energy_idx = final_energies.argmin()
-
- return float(final_energies[lowest_energy_idx]), optimization_results[lowest_energy_idx].final_molecule
-
- def _spawn_optimizations(
- self, next_jobs: Dict[str, List[float]], input_model: "TorsionDriveInput", config: "TaskConfig"
- ) -> Dict[str, List[Union[FailedOperation, OptimizationResult]]]:
-
- grid_point_results = {
- grid_point: [self._spawn_optimization(grid_point, job, input_model, config) for job in jobs]
- for grid_point, jobs in next_jobs.items()
- }
- return grid_point_results
diff --git a/qcengine/programs/__init__.py b/qcengine/programs/__init__.py
deleted file mode 100644
index e2b830ff6..000000000
--- a/qcengine/programs/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from .base import get_program, list_all_programs, list_available_programs, register_program, unregister_program
-from .model import ProgramHarness
diff --git a/qcengine/programs/adcc.py b/qcengine/programs/adcc.py
deleted file mode 100644
index ff641c5ef..000000000
--- a/qcengine/programs/adcc.py
+++ /dev/null
@@ -1,136 +0,0 @@
-"""
-Calls adcc
-"""
-from typing import TYPE_CHECKING, Dict
-
-from qcelemental.models import AtomicResult, BasisSet, Provenance
-from qcelemental.util import safe_version, which_import
-
-from ..exceptions import InputError, UnknownError
-from .model import ProgramHarness
-from .qcvar_identities_resources import build_atomicproperties
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-#
-
-
-class AdccHarness(ProgramHarness):
- _defaults = {
- "name": "adcc",
- "scratch": False,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Whether adcc harness is ready for operation.
- Parameters
- ----------
- raise_error: bool
- Passed on to control negative return between False and ModuleNotFoundError raised.
- Returns
- -------
- bool
- If adcc and psi4 are found, returns True.
- If raise_error is False and adcc or psi4 is missing, returns False.
- If raise_error is True and adcc or psi4 are missing, the error message is raised.
- """
- found_adcc = which_import(
- "adcc",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install adcc -c conda-forge`.",
- )
- found_psi4 = which_import(
- "psi4",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install psi4 for adcc harness via `conda install psi4 -c conda-forge/label/libint_dev -c conda-forge`.",
- )
- return found_adcc and found_psi4
-
- def get_version(self) -> str:
- """Return the currently used version of adcc"""
- self.found(raise_error=True)
-
- which_prog = which_import("adcc")
- if which_prog not in self.version_cache:
- import adcc
-
- self.version_cache[which_prog] = safe_version(adcc.__version__)
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Runs adcc
- """
- self.found(raise_error=True)
-
- import adcc
- import psi4
-
- mol = input_model.molecule
- model = input_model.model
- conv_tol = input_model.keywords.get("conv_tol", 1e-6)
-
- if input_model.driver not in ["energy", "properties"]:
- raise InputError(f"Driver {input_model.driver} not implemented for ADCC.")
-
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
- if not input_model.model.basis:
- raise InputError("Model must contain a basis set.")
-
- psi4_molecule = psi4.core.Molecule.from_schema(dict(mol.dict(), fix_symmetry="c1"))
- psi4.core.clean()
- psi4.core.be_quiet()
- psi4.set_options(
- {
- "basis": model.basis,
- "scf_type": "pk",
- "e_convergence": conv_tol / 100,
- "d_convergence": conv_tol / 10,
- # 'maxiter': max_iter,
- "reference": "RHF" if mol.molecular_multiplicity == 1 else "UHF",
- }
- )
- _, wfn = psi4.energy("HF", return_wfn=True, molecule=psi4_molecule)
- adcc.set_n_threads(config.ncores)
- compute_success = False
- try:
- adcc_state = adcc.run_adc(wfn, method=model.method, **input_model.keywords)
- compute_success = adcc_state.converged
- except adcc.InputError as e:
- raise InputError(str(e))
- except Exception as e:
- raise UnknownError(str(e))
-
- input_data = input_model.dict(encoding="json")
- output_data = input_data.copy()
- output_data["success"] = compute_success
-
- if compute_success:
- output_data["return_result"] = adcc_state.excitation_energy[0]
-
- extract_props = input_model.driver == "properties"
- qcvars = adcc_state.to_qcvars(recurse=True, properties=extract_props)
- atprop = build_atomicproperties(qcvars)
- output_data["extras"]["qcvars"] = qcvars
- output_data["properties"] = atprop
-
- provenance = Provenance(creator="adcc", version=self.get_version(), routine="adcc").dict()
- provenance["nthreads"] = adcc.get_n_threads()
- output_data["provenance"] = provenance
-
- return AtomicResult(**output_data)
diff --git a/qcengine/programs/aimnet2.py b/qcengine/programs/aimnet2.py
deleted file mode 100644
index 4f91b5951..000000000
--- a/qcengine/programs/aimnet2.py
+++ /dev/null
@@ -1,122 +0,0 @@
-from typing import TYPE_CHECKING, Dict
-from qcengine.programs.model import ProgramHarness
-from qcelemental.util import safe_version, which_import
-from qcelemental.models import AtomicResult, Provenance
-from qcengine.exceptions import InputError
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
- from qcengine.config import TaskConfig
-
-
-class AIMNET2Harness(ProgramHarness):
- """A harness to run AIMNET2 models """
-
- _CACHE = {}
-
- _defaults = {
- "name": "AIMNET2",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
-
- version_cache: Dict[str, str] = {}
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which_import(
- "pyaimnet2",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `pip install git+https://github.com/jthorton/AIMNet2.git@main`",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which_import("pyaimnet2")
- if which_prog not in self.version_cache:
- import pyaimnet2
-
- self.version_cache[which_prog] = safe_version(pyaimnet2.__version__)
-
- return self.version_cache[which_prog]
-
- def load_model(self, name: str):
- model_name = name.lower()
- if model_name in self._CACHE:
- return self._CACHE[model_name]
-
- from pyaimnet2 import load_model
-
- model = load_model(model_name=model_name)
- self._CACHE[model_name] = model
- return self._CACHE[model_name]
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig"):
- self.found(raise_error=True)
- import torch
- from qcengine.units import ureg
-
- # check we can run on the set of elements
- known_elements = {"H", "B", "C", "N", "O", "F", "Si", "P", "S", "Cl", "As", "Se", "Br", "I"}
- target_elements = set(input_data.molecule.symbols)
-
- unknown_elements = target_elements - known_elements
- if unknown_elements:
- raise InputError(f"AIMNET2 model {input_data.model.method} does not support elements {unknown_elements}.")
-
- method = input_data.model.method
- # load the model using the method as the file name
- model = self.load_model(name=method)
-
- # build the required input data
- aimnet_input = {
- "coord": torch.tensor(
- [input_data.molecule.geometry * ureg.conversion_factor("bohr", "angstrom")],
- dtype=torch.float64,
- device="cpu",
- ),
- "numbers": torch.tensor([input_data.molecule.atomic_numbers], dtype=torch.long, device="cpu"),
- "charge": torch.tensor([input_data.molecule.molecular_charge], dtype=torch.float64, device="cpu"),
- }
-
- if input_data.driver == "gradient":
- aimnet_input["coord"].requires_grad_(True)
- out = model(aimnet_input)
-
- ret_data = {
- "success": False,
- "properties": {
- "return_energy": out["energy"].item() * ureg.conversion_factor("eV", "hartree"),
- "return_gradient": (
- -1.0 * out["forces"][0].detach().numpy() * ureg.conversion_factor("eV / angstrom", "hartree / bohr")
- ),
- "calcinfo_natom": len(input_data.molecule.atomic_numbers),
- },
- "extras": input_data.extras.copy(),
- }
- # update with calculated extras
- ret_data["extras"]["aimnet2"] = {
- "charges": out["charges"].detach()[0].cpu().numpy(),
- "ensemble_charges_std": out["charges_std"].detach()[0].cpu().numpy(),
- "ensemble_energy_std": out["energy_std"].item(),
- "ensemble_forces_std": out["forces_std"].detach()[0].cpu().numpy(),
- }
- if input_data.driver == "energy":
- ret_data["return_result"] = ret_data["properties"]["return_energy"]
- elif input_data.driver == "gradient":
- ret_data["return_result"] = ret_data["properties"]["return_gradient"]
- else:
- raise InputError(
- f"AIMNET2 can only compute energy and gradients driver methods. Requested {input_data.driver} not supported."
- )
-
- ret_data["provenance"] = Provenance(creator="pyaimnet2", version=self.get_version(), routine="load_model")
-
- ret_data["success"] = True
-
- return AtomicResult(**{**input_data.dict(), **ret_data})
diff --git a/qcengine/programs/base.py b/qcengine/programs/base.py
deleted file mode 100644
index c72687f4c..000000000
--- a/qcengine/programs/base.py
+++ /dev/null
@@ -1,143 +0,0 @@
-"""
-Imports the various compute backends
-"""
-
-from typing import Set
-
-from ..exceptions import InputError, ResourceError
-from .model import ProgramHarness
-from .adcc import AdccHarness
-from .cfour import CFOURHarness
-from .dftd3 import DFTD3Harness
-from .dftd_ng import DFTD4Harness, SDFTD3Harness
-from .gamess import GAMESSHarness
-from .gcp import GCPHarness, MCTCGCPHarness
-from .molpro import MolproHarness
-from .mopac import MopacHarness
-from .mp2d import MP2DHarness
-from .mrchem import MRChemHarness
-from .nwchem import NWChemHarness
-from .openmm import OpenMMHarness
-from .psi4 import Psi4Harness
-from .qchem import QChemHarness
-from .qcore import EntosHarness, QcoreHarness
-from .rdkit import RDKitHarness
-from .terachem import TeraChemHarness
-from .terachem_frontend import TeraChemFrontEndHarness
-from .terachem_pbs import TeraChemPBSHarness
-from .torchani import TorchANIHarness
-from .turbomole import TurbomoleHarness
-from .xtb import XTBHarness
-from .mace import MACEHarness
-from .aimnet2 import AIMNET2Harness
-
-__all__ = ["register_program", "get_program", "list_all_programs", "list_available_programs"]
-
-programs = {}
-
-
-def register_program(entry_point: ProgramHarness) -> None:
- """
- Register a new ProgramHarness with QCEngine.
- """
-
- name = entry_point.name
- if name.lower() in programs.keys():
- raise ValueError("{} is already a registered program.".format(name))
-
- programs[name.lower()] = entry_point
-
-
-def unregister_program(name: str) -> None:
- """
- Unregisters a given program.
- """
-
- ret = programs.pop(name.lower(), None)
- if ret is None:
- raise KeyError(f"Program {name} is not registered with QCEngine")
-
-
-def get_program(name: str, check: bool = True) -> ProgramHarness:
- """
- Returns a program's executor class
-
- Parameters
- ----------
- check
- ``True`` Do raise error if program not found. ``False`` is handy for
- the specialized case of calling non-execution methods (like parsing for testing)
- on the returned ``Harness``.
-
- """
- name = name.lower()
-
- if name not in programs:
- raise InputError(f"Program {name} is not registered to QCEngine.")
-
- ret = programs[name]
- if check:
- try:
- ret.found(raise_error=True)
- except ModuleNotFoundError as err:
- raise ResourceError(f"Program {name} is registered with QCEngine, but cannot be found.") from err
-
- return ret
-
-
-def list_all_programs() -> Set[str]:
- """
- List all programs registered by QCEngine.
- """
- return set(programs.keys())
-
-
-def list_available_programs() -> Set[str]:
- """
- List all programs that can be exectued (found) by QCEngine.
- """
-
- ret = set()
- for k, p in programs.items():
- if p.found():
- ret.add(k)
-
- return ret
-
-
-# Quantum
-register_program(AdccHarness())
-register_program(CFOURHarness())
-register_program(EntosHarness()) # Duplicate of Qcore harness to transition the namespace, to be deprecated
-register_program(GAMESSHarness())
-register_program(MRChemHarness())
-register_program(MolproHarness())
-register_program(NWChemHarness())
-register_program(Psi4Harness())
-register_program(QChemHarness())
-register_program(QcoreHarness())
-register_program(TeraChemHarness())
-register_program(TurbomoleHarness())
-register_program(TeraChemFrontEndHarness())
-register_program(TeraChemPBSHarness())
-
-# Semi-empirical
-register_program(MopacHarness())
-register_program(XTBHarness())
-
-# AI
-register_program(TorchANIHarness())
-register_program(MACEHarness())
-register_program(AIMNET2Harness())
-
-# Molecular Mechanics
-register_program(RDKitHarness())
-register_program(OpenMMHarness())
-
-# Analytical Corrections
-register_program(DFTD3Harness())
-register_program(DFTD4Harness())
-register_program(SDFTD3Harness())
-register_program(GCPHarness())
-register_program(MCTCGCPHarness())
-register_program(MP2DHarness())
diff --git a/qcengine/programs/cfour/__init__.py b/qcengine/programs/cfour/__init__.py
deleted file mode 100644
index d4a48dbb4..000000000
--- a/qcengine/programs/cfour/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .runner import CFOURHarness
diff --git a/qcengine/programs/cfour/germinate.py b/qcengine/programs/cfour/germinate.py
deleted file mode 100644
index 72d8917a5..000000000
--- a/qcengine/programs/cfour/germinate.py
+++ /dev/null
@@ -1,72 +0,0 @@
-from typing import Any, Dict
-
-from qcengine.exceptions import InputError
-
-
-def muster_modelchem(method: str, driver: "DriverEnum") -> Dict[str, Any]:
- """Converts the QC method into CFOUR keywords."""
-
- method = method.lower()
- opts = {}
-
- if driver == "properties":
- pass
- else:
- derint = driver.derivative_int()
-
- if derint == 0:
- if method == "cfour":
- pass # permit clean operation of sandwich mode
- else:
- opts["deriv_level"] = "zero"
-
- elif derint == 1:
- opts["deriv_level"] = "first"
-
- elif derint == 2:
- opts["vibration"] = "exact"
-
- if method == "cfour":
- pass
-
- elif method in ["scf", "hf"]:
- opts["calc_level"] = "scf"
-
- elif method == "mp2":
- opts["calc_level"] = "mp2"
-
- elif method == "mp3":
- opts["calc_level"] = "mp3"
-
- elif method == "mp4(sdq)":
- opts["calc_level"] = "sdq-mp4"
-
- elif method == "mp4":
- opts["calc_level"] = "mp4"
-
- elif method == "bccd":
- opts["calc_level"] = "b-ccd"
-
- elif method == "cc2":
- opts["calc_level"] = "cc2"
-
- elif method == "ccsd":
- opts["calc_level"] = "ccsd"
-
- elif method == "cc3":
- opts["calc_level"] = "cc3"
-
- elif method == "ccsd(t)":
- # Can't use (T) b/c bug in xsymcor lops it off
- opts["calc_level"] = "ccsd[t]"
-
- elif method == "bccd(t)":
- opts["calc_level"] = "b-ccd(t)"
-
- elif method == "ccsdt":
- opts["calc_level"] = "ccsdt"
-
- else:
- raise InputError(f"Method not recognized: {method}")
-
- return opts
diff --git a/qcengine/programs/cfour/harvester.py b/qcengine/programs/cfour/harvester.py
deleted file mode 100644
index 773d6d3d3..000000000
--- a/qcengine/programs/cfour/harvester.py
+++ /dev/null
@@ -1,1389 +0,0 @@
-import logging
-import re
-from decimal import Decimal
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.models import Molecule
-from qcelemental.molparse import regex
-
-from ..util import PreservingDict, load_hessian
-
-logger = logging.getLogger(__name__)
-
-
-def harvest_output(outtext):
- """Function to separate portions of a CFOUR output file *outtest*,
- divided by xjoda.
-
- """
- pass_psivar = []
- pass_coord = []
- pass_grad = []
-
- # for outpass in re.split(r'--invoking executable xjoda', outtext, re.MULTILINE):
- for outpass in re.split(r"JODA beginning optimization cycle", outtext, re.MULTILINE):
- psivar, c4coord, c4grad, version, module, error = harvest_outfile_pass(outpass)
- pass_psivar.append(psivar)
- pass_coord.append(c4coord)
- pass_grad.append(c4grad)
-
- # print('\n\nXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n')
- # print(outpass)
- # print(psivar, c4coord, c4grad, version, error)
- # print('\n\nxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n')
-
- retindx = -1 if pass_coord[-1] else -2
-
- # print ' <<< C4 PSIVAR >>>'
- # for item in pass_psivar[retindx]:
- # print(' %30s %16.8f' % (item, pass_psivar[retindx][item]))
- # print ' <<< C4 COORD >>>'
- # for item in pass_coord[retindx]:
- # print(' %16.8f %16.8f %16.8f' % (item[0], item[1], item[2]))
- # print ' <<< C4 GRAD >>>'
- # for item in pass_grad[retindx]:
- # print(' %16.8f %16.8f %16.8f' % (item[0], item[1], item[2]))
-
- return pass_psivar[retindx], pass_coord[retindx], pass_grad[retindx], version, module, error
-
-
-def harvest_outfile_pass(outtext):
- """Function to read CFOUR output file *outtext* and parse important
- quantum chemical information from it in
-
- """
- psivar = PreservingDict()
- psivar_coord = None
- psivar_grad = None
- version = ""
- module = None
- error = ""
-
- # TODO: CI
- # other ROHF tests
-
- NUMBER = r"(?x:" + regex.NUMBER + ")"
- DECIMAL = r"(?x:" + regex.DECIMAL + ")"
-
- # Process version
- mobj = re.search(r"^\s*" + r"Version" + r"\s+" + r"(?P[\w.]+)" + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched version")
- version = mobj.group("version")
-
- # Process NRE
- mobj = re.search(
- r"^\s+" + r"(?:Nuclear repulsion energy :)" + r"\s+" + NUMBER + r"\s+a\.u\.\s*$",
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj:
- logger.debug("matched nre")
- psivar["NUCLEAR REPULSION ENERGY"] = mobj.group(1)
-
- # Process calcinfo
- mobj = re.search(
- r"^\s*" + r"There are" + r"\s+" + r"(?P\d+)" + r"\s+" + r"functions in the AO basis." + r"\s*$",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched nbf", mobj.groups())
- psivar["N BASIS FUNCTIONS"] = mobj.group("nbf")
- psivar["N MOLECULAR ORBITALS"] = mobj.group("nbf") # TODO BAD
-
- mobj = re.search(
- # fmt: off
- r"^\s*" + "Alpha population by irrep:" + r"(?P[\d\s]+)" + r"\s*" +
- r"^\s*" + "Beta population by irrep:" + r"(?P[\d\s]+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched occupied", mobj.groups())
- psivar["N ALPHA ELECTRONS"] = sum([int(d) for d in mobj.group("aocc").split()])
- psivar["N BETA ELECTRONS"] = sum([int(d) for d in mobj.group("bocc").split()])
-
- # Process SCF
- mobj = re.search(r"^\s+" + r"(?:E\(SCF\))" + r"\s+=\s+" + NUMBER + r"\s+a\.u\.\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched scf1")
- psivar["SCF TOTAL ENERGY"] = mobj.group(1)
-
- mobj = re.search(r"^\s+" + r"(?:E\(SCF\)=)" + r"\s+" + NUMBER + r"\s+" + NUMBER + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched scf2")
- mobj5 = re.search(r"BRUECKNER\s+IBRKNR\s+ON", outtext)
- if not mobj5:
- # interferes with ROHF BCCD
- psivar["SCF TOTAL ENERGY"] = mobj.group(1)
-
- if "SCF TOTAL ENERGY" not in psivar:
- # can be too greedy and match across scf cycles
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:SCF has converged.)' + r'\s*$' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:\d+)' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched scf3")
- psivar["SCF TOTAL ENERGY"] = mobj.group(1)
-
- mobj = re.search(r"^\s+" + r"(?:E\(ROHF\)=)" + r"\s+" + NUMBER + r"\s+" + NUMBER + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched scf4")
- psivar["SCF TOTAL ENERGY"] = mobj.group(1)
-
- # Process MP2
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:E2\(AA\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(AB\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(TOT\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:Total MP2 energy)' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2r")
- psivar["MP2 SAME-SPIN CORRELATION ENERGY"] = 2 * Decimal(mobj.group(1))
- psivar["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(2)
- psivar["MP2 CORRELATION ENERGY"] = 2 * Decimal(mobj.group(1)) + Decimal(mobj.group(2))
- psivar["MP2 TOTAL ENERGY"] = mobj.group(4)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:E2\(AA\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(BB\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(AB\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(TOT\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:Total MP2 energy)' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2u")
- psivar["MP2 SAME-SPIN CORRELATION ENERGY"] = Decimal(mobj.group(1)) + Decimal(mobj.group(2))
- psivar["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(3)
- psivar["MP2 CORRELATION ENERGY"] = Decimal(mobj.group(1)) + Decimal(mobj.group(2)) + Decimal(mobj.group(3))
- psivar["MP2 TOTAL ENERGY"] = mobj.group(5)
-
- mobj = re.search(
- # particularly, want to avoid capture when following line present:
- # "MP2 energies are correct only for semicanonical orbitals."
- # fmt: off
- r'Singles contribution will be calculated.' + r'\s*' +
- r'^\s+' + r'-*' + r'\s*' +
- r'^\s+' + r'(?:E\(SCF\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(AA\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(BB\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(AB\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(SINGLE\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:E2\(TOT\))' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'(?:Total MP2 energy)' + r'\s+=\s+' + NUMBER + r'\s+a.u.\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2ro")
- psivar["MP2 SAME-SPIN CORRELATION ENERGY"] = Decimal(mobj.group(2)) + Decimal(mobj.group(3))
- psivar["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(4)
- psivar["MP2 SINGLES ENERGY"] = mobj.group(5)
- psivar["MP2 CORRELATION ENERGY"] = (
- Decimal(mobj.group(5)) + Decimal(mobj.group(2)) + Decimal(mobj.group(3)) + Decimal(mobj.group(4))
- )
- psivar["MP2 TOTAL ENERGY"] = mobj.group(7)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:S-MBPT\(2\))' + r'\s+' + r'(?P' + NUMBER + r')' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(2\))' + r'\s+' + r'(?P' + NUMBER + r')' + r'\s+' +
- r'(?P' + NUMBER + r')' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2ro2")
- # psivar['MP2 SAME-SPIN CORRELATION ENERGY'] = Decimal(mobj.group(1)) + Decimal(mobj.group(2))
- # psivar['MP2 OPPOSITE-SPIN CORRELATION ENERGY'] = mobj.group(3)
- psivar["MP2 SINGLES ENERGY"] = mobj.group("sgl")
- psivar["MP2 CORRELATION ENERGY"] = Decimal(mobj.group("sgl")) + Decimal(mobj.group("dbl"))
- psivar["MP2 TOTAL ENERGY"] = mobj.group("mp2tot")
-
- # Process MP3
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:D-MBPT\(2\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(3\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp3r")
- dmp2 = Decimal(mobj.group(1))
- dmp3 = Decimal(mobj.group(3))
- psivar["MP2 CORRELATION ENERGY"] = dmp2
- psivar["MP2 TOTAL ENERGY"] = mobj.group(2)
- psivar["MP3 CORRELATION ENERGY"] = dmp2 + dmp3
- psivar["MP3 TOTAL ENERGY"] = mobj.group(4)
- psivar["MP2.5 CORRELATION ENERGY"] = dmp2 + Decimal("0.500000000000") * dmp3
- psivar["MP2.5 TOTAL ENERGY"] = psivar["MP2.5 CORRELATION ENERGY"] + psivar["SCF TOTAL ENERGY"]
- psivar["MP3 SINGLES ENERGY"] = Decimal("0.0")
- psivar["MP3 DOUBLES ENERGY"] = dmp2 + dmp3
- module = "vcc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:S-MBPT\(2\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(2\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:S-MBPT\(3\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(3\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp3ro")
- dmp2 = Decimal(mobj.group(1)) + Decimal(mobj.group(3))
- dmp3 = Decimal(mobj.group(5)) + Decimal(mobj.group(7))
- psivar["MP3 CORRELATION ENERGY"] = dmp2 + dmp3
- psivar["MP3 TOTAL ENERGY"] = mobj.group(8)
- psivar["MP2.5 CORRELATION ENERGY"] = dmp2 + Decimal("0.500000000000") * dmp3
- psivar["MP2.5 TOTAL ENERGY"] = psivar["MP2.5 CORRELATION ENERGY"] + psivar["SCF TOTAL ENERGY"]
- psivar["MP3 SINGLES ENERGY"] = Decimal(mobj.group(1)) + Decimal(mobj.group(5))
- psivar["MP3 DOUBLES ENERGY"] = Decimal(mobj.group(3)) + Decimal(mobj.group(7))
- module = "vcc"
-
- mobj = re.search(
- # fmt: off
- r"^\s*" + r"(?:MP2 correlation energy:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:MP3 correction:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:MP3 correlation energy:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"(?:.*?)" +
- r"^\s*" + r"(?:Non-iterative calculation of MP3)" + r".*" +
- r"(?:.*?)" +
- r"^\s*" + r"(?:Total MP3 energy:)" + r"\s+" + r"(?P" + NUMBER + ")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp3 ncc")
- # psivar["MP2 CORRELATION ENERGY"] = mobj.group("mp2corl")
- psivar["MP3 CORRELATION ENERGY"] = mobj.group("mp3corl")
- psivar["MP3 CORRECTION ENERGY"] = mobj.group("mp3corr")
- psivar["MP3 TOTAL ENERGY"] = mobj.group("mp3tot")
- # looks like ncc is rhf-only
- # psivar["MP2 DOUBLES ENERGY"] = mobj.group("mp2corl")
- psivar["MP3 DOUBLES ENERGY"] = mobj.group("mp3corl")
- module = "ncc"
-
- # Process MP4
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:D-MBPT\(2\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(3\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:Q-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:S-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp4r")
- dmp2 = Decimal(mobj.group(1))
- dmp3 = Decimal(mobj.group(3))
- dmp4sdq = Decimal(mobj.group(5)) + Decimal(mobj.group(7)) + Decimal(mobj.group(9))
- psivar["MP2 CORRELATION ENERGY"] = dmp2
- psivar["MP2 TOTAL ENERGY"] = mobj.group(2)
- psivar["MP3 CORRELATION ENERGY"] = dmp2 + dmp3
- psivar["MP3 TOTAL ENERGY"] = mobj.group(4)
- psivar["MP2.5 CORRELATION ENERGY"] = dmp2 + Decimal("0.500000000000") * dmp3
- psivar["MP2.5 TOTAL ENERGY"] = psivar["MP2.5 CORRELATION ENERGY"] + psivar["SCF TOTAL ENERGY"]
- psivar["MP4(SDQ) CORRELATION ENERGY"] = dmp2 + dmp3 + dmp4sdq
- psivar["MP4(SDQ) TOTAL ENERGY"] = mobj.group(10)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:S-MBPT\(2\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(2\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:S-MBPT\(3\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:D-MBPT\(3\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:L-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:NL-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp4ro")
- module = "vcc"
- dmp2 = Decimal(mobj.group(1)) + Decimal(mobj.group(3))
- dmp3 = Decimal(mobj.group(5)) + Decimal(mobj.group(7))
- dmp4sdq = Decimal(mobj.group(9)) + Decimal(mobj.group(11))
- psivar["MP2 CORRELATION ENERGY"] = dmp2
- psivar["MP2 TOTAL ENERGY"] = mobj.group(4)
- psivar["MP3 CORRELATION ENERGY"] = dmp2 + dmp3
- psivar["MP3 TOTAL ENERGY"] = mobj.group(8)
- psivar["MP2.5 CORRELATION ENERGY"] = dmp2 + Decimal("0.500000000000") * dmp3
- psivar["MP2.5 TOTAL ENERGY"] = psivar["MP2.5 CORRELATION ENERGY"] + psivar["SCF TOTAL ENERGY"]
- psivar["MP4(SDQ) CORRELATION ENERGY"] = dmp2 + dmp3 + dmp4sdq
- psivar["MP4(SDQ) TOTAL ENERGY"] = mobj.group(12)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:D-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:Q-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:S-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:T-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp4tr")
- dmp4sdq = Decimal(mobj.group(1)) + Decimal(mobj.group(3)) + Decimal(mobj.group(5))
- dmp4t = Decimal(mobj.group(7))
- psivar["MP4(SDQ) CORRELATION ENERGY"] = psivar["MP3 CORRELATION ENERGY"] + dmp4sdq
- psivar["MP4(SDQ) TOTAL ENERGY"] = mobj.group(6)
- psivar["MP4(T) CORRECTION ENERGY"] = dmp4t
- psivar["MP4 CORRELATION ENERGY"] = psivar["MP3 CORRELATION ENERGY"] + dmp4sdq + dmp4t
- psivar["MP4 TOTAL ENERGY"] = mobj.group(8)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:L-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:NL-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:WT12-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'(?:T-MBPT\(4\))' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp4tro")
- module = "vcc"
- dmp4sdq = Decimal(mobj.group(1)) + Decimal(mobj.group(3))
- dmp4t = Decimal(mobj.group(5)) + Decimal(mobj.group(7)) # WT12 with T, not SDQ
- psivar["MP4(SDQ) CORRELATION ENERGY"] = psivar["MP3 CORRELATION ENERGY"] + dmp4sdq
- psivar["MP4(SDQ) TOTAL ENERGY"] = mobj.group(4)
- psivar["MP4(T) CORRECTION ENERGY"] = dmp4t
- psivar["MP4 CORRELATION ENERGY"] = psivar["MP3 CORRELATION ENERGY"] + dmp4sdq + dmp4t
- psivar["MP4 TOTAL ENERGY"] = mobj.group(8)
-
- mobj = re.search(
- # fmt: off
- r"^\s*" + r"(?:MP2 correlation energy:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:MP3 correction:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:MP3 correlation energy:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:SDQ-MP4 correction:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:SDQ-MP4 correlation energy:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"(" +
- r"^\s*" + r"(?:T-MP4 correction:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:Total MP4 correction:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:MP4 correlation energy:)\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r")?" +
- r"(?:.*?)" +
- r"^\s*" + r"(?:Non-iterative calculation of (MP4|SDQ-MP4))" + r".*" +
- r"(?:.*?)" +
- r"^\s*" + r"(?:Total (?P(MP4|SDQ-MP4)) energy:)" + r"\s+" + r"(?P" + NUMBER + ")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mp4 ncc")
- # psivar["MP2 CORRELATION ENERGY"] = mobj.group("mp2corl")
- module = "ncc"
- mtd = {"MP4": "MP4", "SDQ-MP4": "MP4(SDQ)"}[mobj.group("mp4flavor")]
- psivar["MP3 CORRELATION ENERGY"] = mobj.group("mp3corl")
- psivar["MP3 CORRECTION ENERGY"] = mobj.group("mp3corr")
- psivar["MP4(SDQ) CORRELATION ENERGY"] = mobj.group("mp4sdqcorl")
- # looks like ncc is rhf-only
- # psivar["MP2 DOUBLES ENERGY"] = mobj.group("mp2corl")
- psivar["MP3 DOUBLES ENERGY"] = mobj.group("mp3corl")
- if mtd == "MP4(SDQ)":
- psivar["MP4(SDQ) TOTAL ENERGY"] = mobj.group("mp4flavortot")
- elif mtd == "MP4":
- psivar["MP4(T) CORRECTION ENERGY"] = mobj.group("mp4tcorr")
- psivar["MP4 CORRECTION ENERGY"] = mobj.group("mp4corr")
- psivar["MP4 TOTAL ENERGY"] = mobj.group("mp4flavortot")
- psivar["MP4 CORRELATION ENERGY"] = mobj.group("mp4sdtqcorl")
-
- # Process CI Iterations
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?P(?PQ?CI(?:\w+))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:\d+)' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s+' + r"(?P" + NUMBER + r")" + r'\s+DIIS\s*' +
- r'^\s*(?:-+)\s*' +
- # CI iterations for CISD, CC iterations for QCISD
- r'^\s*(?:A miracle (?Phas come|come) to pass. The (CI|CC) iterations have converged.)\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ci with full %s iterating %s" % (mobj.group("fullCI"), mobj.group("iterCI")))
- module = {"has come": "vcc", "come": "ecc"}[mobj.group("ccprog")]
-
- mtd = mobj.group("iterCI").upper()
- psivar[f"{mtd} CORRELATION ENERGY"] = mobj.group("corl")
- psivar[f"{mtd} TOTAL ENERGY"] = mobj.group("tot")
-
- mobj2 = re.search(
- # fmt: off
- r"^\s+" + r"E\(QCISD\)\s+=\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s+" + r"E\(QCISD\(T\)\)\s+=\s+" + r"(?P" + NUMBER + r")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj2 and mobj.group("fullCI") == "QCISD(T)":
- logger.debug("matched qcisd(t)")
- psivar["QCISD(T) TOTAL ENERGY"] = mobj2.group("qcisdt")
- psivar["QCISD(T) CORRECTION ENERGY"] = Decimal(mobj2.group("qcisdt")) - Decimal(mobj2.group("qcisd"))
- psivar["QCISD(T) CORRELATION ENERGY"] = psivar["QCISD(T) TOTAL ENERGY"] - psivar["SCF TOTAL ENERGY"]
-
- # Process CC Iterations
- cciterations = re.compile(
- # fmt: off
- r'^\s+' + r'(?P(?PL?CC(?:\w+(?:-(?:1|1b|2|3))?))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:\d+)' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s+' + r"(?P" + NUMBER + r")" + r'\s+DIIS\s*' +
- r'^\s*(?:-+)\s*' +
- r'^\s*(?:A miracle (?Phas come|come) to pass. The CC iterations have converged.)\s*$',
- # fmt: on
- re.MULTILINE
- | re.DOTALL,
- )
- mobj_list = [m.groupdict() for m in cciterations.finditer(outtext)]
- if mobj_list:
- first_match = mobj_list[0]
- last_match = mobj_list[-1]
-
- logger.debug("matched cc with full %s iterating %s" % (last_match["fullCC"], last_match["iterCC"]))
- module = {"has come": "vcc", "come": "ecc"}[last_match["ccprog"]]
-
- mobj4 = re.search(r"CALCLEVEL\s+ICLLVL\s+CCSDT-1b", outtext)
- mtd = last_match["iterCC"].upper()
- if mtd == "CCSDT-1":
- if mobj4 and module == "vcc":
- mtd = "CCSDT-1B"
- else:
- mtd = "CCSDT-1A"
- elif mtd == "CCSDT-1b":
- mtd = "CCSDT-1B"
-
- mobj5 = re.search(r"BRUECKNER\s+IBRKNR\s+ON", outtext)
- if mobj5 and mtd == "CCSD":
- # BCCD corl = last Brueckner iter total E - first Brueckner iter HF E
- psivar[f"BCCD CORRELATION ENERGY"] = Decimal(last_match["tot"]) - psivar["SCF TOTAL ENERGY"]
- psivar[f"BCCD TOTAL ENERGY"] = last_match["tot"]
- logger.debug("matched Brueckner iter")
- else:
- psivar[f"{mtd} CORRELATION ENERGY"] = last_match["corl"]
- psivar[f"{mtd} TOTAL ENERGY"] = last_match["tot"]
-
- mobj3 = re.search(r"SCF reference function: RHF", outtext)
- if mobj3 and mtd not in ["CCSDT-1A", "CCSDT-1B", "CCSDT-2", "CCSDT-3", "CCSDT"]:
- psivar[f"{mtd} DOUBLES ENERGY"] = last_match["corl"]
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:\d+)' + r'\s+' + r'(?P' + NUMBER + r')\s+' +
- NUMBER + r'\s+' + NUMBER + r'\s+' +
- NUMBER + r'\s+' + NUMBER + r'\s+' +
- r'(' + NUMBER + r')?' + r'(' + r'\s+' + NUMBER + r')?' + r'\s*' +
- r'^\s*' +
- r'^\s*' + r'(?:\w+(?:-(1a|1b|2|3))? iterations converged .*?)' +
- r'^\s*' +
- r'^\s*' + r'(?:Total (?P\w+(?:-(1a|1b|2|3))?) energy:)' + r'\s+' + r'(?P' + NUMBER + r')\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ncc cc iter")
- # looks like ncc is rhf-only
- mtd = mobj.group("iterCC").upper()
- psivar[f"{mtd} CORRELATION ENERGY"] = mobj.group("corl")
- if mtd not in ["CCSDT-1A", "CCSDT-1B", "CCSDT-2", "CCSDT-3", "CCSDT"]:
- psivar[f"{mtd} DOUBLES ENERGY"] = mobj.group("corl")
- psivar[f"{mtd} TOTAL ENERGY"] = mobj.group("tot")
- module = "ncc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r"Beginning iterative solution of (?P\w+(?:-\d)?) equations" + r"\s*" +
- r'(?P.*)' +
- r'^\s*' + r"It\." + r"\s+" + "Correlation Energy" + r".*" +
- r'^\s*(?:-+)\s*' +
- r'^\s*' +
- r'^\s*' + r'(?:\w+(?:-\d)? iterations converged .*?)' +
- r'^\s*' +
- r'^\s*' + r'(?:Total \1 energy:)' + r'\s+' + r'(?P' + NUMBER + r')\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- mobj2 = re.findall(
- # fmt: off
- r"(\d+)" + r"\s+" + r"(?P" + DECIMAL + r")\s+" +
- DECIMAL + r"\s+" + DECIMAL + r"\s+" + DECIMAL + r"\s+" + DECIMAL + r"\s+" + r"(" + DECIMAL + r")?" + r"(" + r"\s+" + DECIMAL + r")?",
- # fmt: on
- mobj.group("iterations"),
- )
- if mobj2:
- logger.debug("matched ncc cc iter mod5", mobj.groupdict(), mobj2[-1])
- mtd = mobj.group("iterCC").upper()
- psivar[f"{mtd} CORRELATION ENERGY"] = mobj2[-1][2]
- if mtd not in ["CCSDT-1A", "CCSDT-1B", "CCSDT-2", "CCSDT-3", "CCSDT"]:
- psivar[f"{mtd} DOUBLES ENERGY"] = mobj2[-1][2]
- psivar[f"{mtd} TOTAL ENERGY"] = mobj.group("tot")
- module = "ncc"
-
- # Process CC(T)
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:E\(SCF\))' + r'\s+=\s+' + NUMBER + r'\s+a\.u\.\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:E\(CCSD\))' + r'\s+=\s+' + NUMBER + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:E\(CCSD\(T\)\))' + r'\s+=\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) vcc")
- psivar["SCF TOTAL ENERGY"] = mobj.group(1)
- mobj5 = re.search(r"BRUECKNER\s+IBRKNR\s+ON", outtext)
- if not mobj5:
- psivar["CCSD TOTAL ENERGY"] = mobj.group(2)
- psivar["(T) CORRECTION ENERGY"] = Decimal(mobj.group(3)) - Decimal(mobj.group(2))
- psivar["CCSD(T) CORRELATION ENERGY"] = Decimal(mobj.group(3)) - Decimal(mobj.group(1))
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group(3)
- module = "vcc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:E\(CCSD\))' + r'\s+=\s+' + NUMBER + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:E\(CCSD\(T\)\))' + r'\s+=\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) vcc v2")
- mobj5 = re.search(r"BRUECKNER\s+IBRKNR\s+ON", outtext)
- if mobj5:
- psivar["B(T) CORRECTION ENERGY"] = Decimal(mobj.group(2)) - Decimal(mobj.group(1))
- psivar["BCCD(T) TOTAL ENERGY"] = mobj.group(2)
- psivar["BCCD(T) CORRELATION ENERGY"] = psivar["BCCD CORRELATION ENERGY"] + psivar["B(T) CORRECTION ENERGY"]
- else:
- psivar["CCSD TOTAL ENERGY"] = mobj.group(1)
- psivar["(T) CORRECTION ENERGY"] = Decimal(mobj.group(2)) - Decimal(mobj.group(1))
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group(2)
- module = "vcc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:E\(SCF\))' + r'\s+=\s*' + NUMBER + r'\s+a\.u\.\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:CCSD energy)' + r'\s+' + NUMBER + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:Total perturbative triples energy:)' + r'\s+' + NUMBER + r'\s*' +
- r'^\s*(?:-+)\s*' +
- r'^\s+' + r'(?:CCSD\(T\) energy)' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) ecc")
- psivar["SCF TOTAL ENERGY"] = mobj.group(1)
- psivar["CCSD TOTAL ENERGY"] = mobj.group(2)
- psivar["(T) CORRECTION ENERGY"] = mobj.group(3)
- psivar["CCSD(T) CORRELATION ENERGY"] = Decimal(mobj.group(4)) - Decimal(mobj.group(1))
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group(4)
- module = "ecc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:HF-SCF energy)' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:CCSD energy)' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:E4T to CCSD\(T\))' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:E4T \+ E5ST)' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'(?:.*?)' +
- r'^\s*(?:-+)\s*' +
- r'^\s+' + r'(?:CCSD\(T\) energy)' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) ecc v2")
- psivar["SCF TOTAL ENERGY"] = mobj.group("hf")
- psivar["CCSD TOTAL ENERGY"] = mobj.group("ccsd")
- psivar["T(CCSD) CORRECTION ENERGY"] = mobj.group("e4t")
- psivar["(T) CORRECTION ENERGY"] = mobj.group("e4te5st")
- psivar["CCSD(T) CORRELATION ENERGY"] = Decimal(mobj.group("ccsd_t_")) - Decimal(mobj.group("hf"))
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group("ccsd_t_")
- psivar["CCSD+T(CCSD) CORRELATION ENERGY"] = (
- psivar["CCSD CORRELATION ENERGY"] + psivar["T(CCSD) CORRECTION ENERGY"]
- )
- psivar["CCSD+T(CCSD) TOTAL ENERGY"] = psivar["CCSD TOTAL ENERGY"] + psivar["T(CCSD) CORRECTION ENERGY"]
- module = "ecc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:CCSD energy)' + r'\s+' + NUMBER + r'\s*' +
- r'^\s*(?:-+)\s*' +
- r'^\s+' + r'(?:CCSD\(T\) energy)' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) lamb")
- psivar["CCSD TOTAL ENERGY"] = mobj.group(1)
- psivar["(T) CORRECTION ENERGY"] = Decimal(mobj.group(2)) - Decimal(mobj.group(1))
- psivar["CCSD(T) CORRELATION ENERGY"] = Decimal(mobj.group(2)) - psivar["SCF TOTAL ENERGY"]
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group(2)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?:CCSD\(T\) contribution:)\s+' + r'(?P' + NUMBER + ')' + r'\s*'
- r'^\s*' + r'(?:CCSD\[T\] contribution:)\s+' + r'(?P' + NUMBER + ')' + r'\s*'
- r'^\s*' + r'(?:Total CCSD\(T\) energy:)\s+' + r'(?P' + NUMBER + ')' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) ncc")
- psivar["(T) CORRECTION ENERGY"] = mobj.group("tcorr")
- psivar["T(CCSD) CORRECTION ENERGY"] = mobj.group("bkttcorr")
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group("ttot")
- module = "ncc"
-
- mobj = re.search(
- # fmt: off
- r'^\s*' + r'(?:CCSD\[T\] correlation energy:)\s+' + r'(?P' + NUMBER + ')' + r'\s*'
- r'^\s*' + r'(?:CCSD\(T\) correlation energy:)\s+' + r'(?P' + NUMBER + ')' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd(t) ncc v2")
- psivar["(T) CORRECTION ENERGY"] = mobj.group("tcorr")
- psivar["T(CCSD) CORRECTION ENERGY"] = mobj.group("bkttcorr")
- psivar["CCSD+T(CCSD) TOTAL ENERGY"] = psivar["T(CCSD) CORRECTION ENERGY"] + psivar["CCSD TOTAL ENERGY"]
- psivar["CCSD+T(CCSD) CORRELATION ENERGY"] = (
- psivar["T(CCSD) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
- )
- psivar["CCSD(T) TOTAL ENERGY"] = psivar["(T) CORRECTION ENERGY"] + psivar["CCSD TOTAL ENERGY"]
- psivar["CCSD(T) CORRELATION ENERGY"] = psivar["(T) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
- module = "ncc"
-
- mobj = re.search(
- # fmt: off
- r"^\s*" + r"(?:Lambda-CCSD iterations converged .*)" +
- r'(?:.*?)' +
- r"^\s*" + r"(?:CCSD\[T\] correlation energy:)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD\(T\) correlation energy:)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD\[T\]_L correlation energy:)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD\(T\)_L correlation energy:)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r'(?:.*?)' +
- r"^\s*" + r"(?:Non-iterative calculation of CCSD\(T\)_L .*)" +
- r'(?:.*?)' +
- r"^\s*" + r"(?:Total CCSD\(T\)_L energy:)\s+" + r"(?P" + NUMBER + r")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched a-ccsd(t) ncc")
- psivar["(T) CORRECTION ENERGY"] = mobj.group("tcorr")
- psivar["T(CCSD) CORRECTION ENERGY"] = mobj.group("bkttcorr")
- psivar["A-(T) CORRECTION ENERGY"] = mobj.group("atcorr")
- psivar["CCSD+T(CCSD) TOTAL ENERGY"] = psivar["T(CCSD) CORRECTION ENERGY"] + psivar["CCSD TOTAL ENERGY"]
- psivar["CCSD+T(CCSD) CORRELATION ENERGY"] = (
- psivar["T(CCSD) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
- )
- psivar["CCSD(T) TOTAL ENERGY"] = psivar["(T) CORRECTION ENERGY"] + psivar["CCSD TOTAL ENERGY"]
- psivar["CCSD(T) CORRELATION ENERGY"] = psivar["(T) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
- psivar["A-CCSD(T) TOTAL ENERGY"] = mobj.group("accsdttot")
- psivar["A-CCSD(T) CORRELATION ENERGY"] = psivar["A-(T) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
- module = "ncc"
-
- mobj = re.search(
- # fmt: off
- r"^\s*" + r"(?:A miracle come to pass. The CC iterations have converged.)" + r"\s*" +
- r'(?:.*?)' +
- r"^\s*" + r"(?:HF-SCF energy )\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:MP2 correlation energy )\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:MP2 energy )\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD correlation energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD energy )\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:Delta ET to CCSD\[T\]_L)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD\[T\]_L energy )\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:Delta ET to CCSD\(T\)_L)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD\(T\)_L energy )\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r'(?:.*?)' +
- r"^\s*" + r"(?:Non-iterative perturbative treatment of triple)" + r"\s*" +
- r"^\s*" + r"(?:excitations using the CCSD\(T\)_L method:)" + r"\s*" +
- r'(?:.*?)' +
- r"^\s*" + r"(?:HF-SCF energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:MP2 correlation energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:MP2 energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD correlation energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:Delta ET to CCSD\(T\)_L)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"^\s*" + r"(?:CCSD\(T\)_L energy)\s+" + r"(?P" + NUMBER + r")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched a-ccsd(t) ecc")
- psivar["HF TOTAL ENERGY"] = mobj.group("hf")
- psivar["MP2 CORRELATION ENERGY"] = mobj.group("mp2corl")
- psivar["CCSD CORRELATION ENERGY"] = mobj.group("ccsdcorl")
- psivar["A-(T) CORRECTION ENERGY"] = mobj.group("atcorr")
- psivar["A-CCSD(T) TOTAL ENERGY"] = mobj.group("accsdt")
- psivar["A-CCSD(T) CORRELATION ENERGY"] = psivar["A-(T) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
-
- mobj3 = re.search(r"SCF reference function: (R|U)HF", outtext)
- if mobj3:
- psivar["CCSD SINGLES ENERGY"] = Decimal("0.0")
- module = "ecc"
-
- mobj = re.search(
- # fmt: off
- r"^\s*" + r"(?:E\(CCSD\))" + r"\s+=\s+" + r"(?P" + NUMBER + ")" + r"\s*" +
- r"^\s*" + r"(?:E\(CCSD \+ T\(CCSD\)\))" + r"\s*=\s*" + r"(?P" + NUMBER + ")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd+t(ccsd) vcc")
- psivar["CCSD TOTAL ENERGY"] = mobj.group("ccsdtot")
- psivar["CCSD+T(CCSD) TOTAL ENERGY"] = mobj.group("ccsdtccsdtot")
- psivar["CCSD+T(CCSD) CORRELATION ENERGY"] = psivar["CCSD+T(CCSD) TOTAL ENERGY"] - psivar["SCF TOTAL ENERGY"]
- mobj3 = re.search(r"Reference function is (R|U)HF Hartree-Fock", outtext)
- if mobj3:
- psivar["CCSD SINGLES ENERGY"] = Decimal("0.0")
- module = "vcc"
-
- mobj = re.search(
- # fmt: off
- r'^\s*' + r'(?:CCSDT\[Q\] correlation energy:)\s+' + r'(?P' + NUMBER + ')' + r'\s*'
- r'^\s*' + r'(?:CCSDT\(Q\) correlation energy:)\s+' + r'(?P' + NUMBER + ')' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsdt(q) ncc")
- psivar["(Q) CORRECTION ENERGY"] = mobj.group("tcorr")
- psivar["[Q] CORRECTION ENERGY"] = mobj.group("bkttcorr")
- psivar["CCSDT(Q) TOTAL ENERGY"] = psivar["(Q) CORRECTION ENERGY"] + psivar["CCSDT TOTAL ENERGY"]
- psivar["CCSDT(Q) CORRELATION ENERGY"] = psivar["(Q) CORRECTION ENERGY"] + psivar["CCSDT CORRELATION ENERGY"]
- module = "ncc"
-
- # Process DBOC
- mobj = re.search(
- # fmt: off
- r'^\s*' + r'(?:The total diagonal Born-Oppenheimer correction \(DBOC\) is:)\s+' +
- r'(?P' + NUMBER + ')' + r'\s*a.u.\s*',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched dboc ecc")
- psivar["CCSD DBOC ENERGY"] = mobj.group("dboc")
- module = "ecc"
-
- # Process SCS-CC
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?P(?PCC(?:\w+))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- r'(?:.*?)' +
- r'^\s*' + r'(?:@CCENRG-I, Correlation energies.)' + r'\s+(?:ECCAA)\s+' + NUMBER + r'\s*' +
- r'^\s+(?:ECCBB)\s+' + NUMBER + r'\s*' +
- r'^\s+(?:ECCAB)\s+' + NUMBER + r'\s*' +
- r'^\s+(?:Total)\s+' + NUMBER + r'\s*',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj: # PRINT=2 to get SCS-CC components
- logger.debug("matched scscc")
- if float(mobj.group(4)) == 0.0:
- ss = 2 * Decimal(mobj.group(3))
- else:
- ss = Decimal(mobj.group(3)) + Decimal(mobj.group(4))
-
- mobj5 = re.search(r"BRUECKNER\s+IBRKNR\s+ON", outtext)
- if not mobj5:
- if not (
- re.search(r"executable xvcc finished", outtext)
- and re.search(r"The reference state is a ROHF wave function.", outtext)
- ):
- psivar["%s SAME-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = ss
- psivar["%s OPPOSITE-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group(5)
- psivar["%s CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group(6)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?P(?PCC(?:\w+))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'Amplitude equations converged in' + r'\s*\d+\s*' + r'iterations.\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'The AA contribution to the correlation energy is:\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'The BB contribution to the correlation energy is:\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'The AB contribution to the correlation energy is:\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'The total correlation energy is\s+' + NUMBER + r'\s+a.u.\s*' +
- r'(?:.*?)' +
- # r'^\s+' + r'The CC iterations have converged.' + r'\s*$',
- r'^\s+' + r'(?:A miracle come to pass. )?' + r'The CC iterations have converged.' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj: # PRINT=2 to get SCS components
- logger.debug("matched scscc2")
- iterCC = mobj.group("iterCC")
- mobj3 = re.search(r"The reference state is a ROHF wave function.", outtext)
- mobj4 = re.search(r"executable xvcc finished", outtext)
- if mobj4: # vcc
- if not (iterCC == "CCD" and mobj3):
- # uncertain if ROHF CCD correct
- psivar[f"{iterCC} OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(5)
- if not mobj3:
- psivar[f"{iterCC} SAME-SPIN CORRELATION ENERGY"] = Decimal(mobj.group(3)) + Decimal(mobj.group(4))
- else: # ecc
- psivar[f"{iterCC} SAME-SPIN CORRELATION ENERGY"] = Decimal(mobj.group(3)) + Decimal(mobj.group(4))
- if not mobj3:
- psivar[f"{iterCC} OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(5)
- psivar[f"{iterCC} CORRELATION ENERGY"] = mobj.group(6)
-
- mobj = re.search(
- # fmt: off
- #r'^\s+' + r'(?P(?PL?CC(?:\w+))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- # better one for LCC and one for CC, right?
- r'^\s+' + r'(?P(?PLCC(?:\w+))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'Amplitude equations converged in' + r'\s*\d+\s*' + r'iterations.\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'The AA contribution to the correlation energy is:\s+' + r"(?P" + NUMBER + r")" + r'\s+a.u.\s*' +
- r'(^\s+' + r'The BB contribution to the correlation energy is:\s+' + r"(?P" + NUMBER + r")" + r'\s+a.u.\s*' + r")?" +
- r'^\s+' + r'The AB contribution to the correlation energy is:\s+' + r"(?P" + NUMBER + r")" + r'\s+a.u.\s*' +
- r'^\s+' + r'The total correlation energy is\s+' + r"(?P" + NUMBER + r")" + r'\s+a.u.\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'(?:A miracle come to pass. )?' + r'The CC iterations have converged.' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj: # PRINT=2 to get SCS components
- logger.debug("matched scslccd")
- mobj3 = re.search(r"The reference state is a ROHF wave function.", outtext)
- mobj4 = re.search(r"executable xvcc finished", outtext)
- iterCC = mobj.group("iterCC")
- if mobj4: # vcc
- if mobj.group("BB"):
- aabb = Decimal(mobj.group("AA")) + Decimal(mobj.group("BB"))
- else:
- aabb = Decimal("2") * Decimal(mobj.group("AA"))
- psivar[f"{iterCC} OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group("AB")
- if not mobj3:
- psivar[f"{iterCC} SAME-SPIN CORRELATION ENERGY"] = aabb
- psivar["%s CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group("corl")
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'(?P(?PCC(?:\w+))(?:\(T\))?)' + r'\s+(?:energy will be calculated.)\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'Amplitude equations converged in' + r'\s*\d+\s*' + r'iterations.\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'The AA contribution to the correlation energy is:\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'The AB contribution to the correlation energy is:\s+' + NUMBER + r'\s+a.u.\s*' +
- r'^\s+' + r'The total correlation energy is\s+' + NUMBER + r'\s+a.u.\s*' +
- r'(?:.*?)' +
- # r'^\s+' + r'The CC iterations have converged.' + r'\s*$',
- r'^\s+' + r'(?:A miracle come to pass. )?' + r'The CC iterations have converged.' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj: # PRINT=2 to get SCS components
- logger.debug("matched scscc rhf", mobj.groups())
- psivar["%s SAME-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = 2 * Decimal(mobj.group(3))
- psivar["%s OPPOSITE-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group(4)
- psivar["%s CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group(5)
-
- # Process gradient
- mobj = re.search(
- # fmt: off
- r'\s+' + r'Molecular gradient' + r'\s*' +
- r'\s+' + r'------------------' + r'\s*' +
- r'\s+' + r'\n' +
- r'(?:(?:\s+[A-Z]+\s*#\d+\s+[xyz]\s+[-+]?\d+\.\d+\s*\n)+)' + # optional, it seems
- r'\n\n' + # optional, it seems
- r'((?:\s+[A-Z]+\s*#\d+\s+\d?\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s*\n)+)' +
- r'\n\n' +
- r'\s+' + 'Molecular gradient norm',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched molgrad")
- atoms = []
- psivar_grad = []
- for line in mobj.group(1).splitlines():
- lline = line.split()
- atoms.append(lline[0])
- # psivar_gradient.append([Decimal(lline[-3]), Decimal(lline[-2]), Decimal(lline[-1])])
- psivar_grad.append([float(lline[-3]), float(lline[-2]), float(lline[-1])])
-
- # Process geometry
- mobj = re.search(
- # fmt: off
- # r'\s+(?:-+)\s*' +
- # r'^\s+' + r'Z-matrix Atomic Coordinates (in bohr)' + r'\s*' +
- r'^\s+' + r'Symbol Number X Y Z' + r'\s*' +
- r'^\s+(?:-+)\s*' +
- r'((?:\s+[A-Z]+\s+([0-9]+|\*\*\*)\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s*\n)+)' + # allows ghosts
- r'^\s+(?:-+)\s*',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched geom")
- molxyz = "%d bohr\n\n" % len(mobj.group(1).splitlines())
- for line in mobj.group(1).splitlines():
- lline = line.split()
- if lline[1] == "***":
- tag = "@Xe" # potentially dangerous bypass
- else:
- tag = lline[0]
- molxyz += "%s %16s %16s %16s\n" % (tag, lline[-3], lline[-2], lline[-1])
- # Rather a dinky Molecule as no ghost, charge, or multiplicity
- psivar_coord = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"], dtype=2
- ),
- )
-
- # Process atom geometry
- mobj = re.search(r"^\s+" + r"@GETXYZ-I, 1 atoms read from ZMAT." + r"\s*$", outtext, re.MULTILINE)
- mobj2 = re.search(
- r"^([A-Z]+)#1" + r"\s+" + NUMBER + r"\s+" + NUMBER + r"\s+" + NUMBER + r"\s*$", outtext, re.MULTILINE
- )
- if mobj and mobj2:
- logger.debug("matched atom2") # unsavory for when atom never printed except for basis file
- # Dinky Molecule
- molxyz = "1 bohr\n\n%s 0.0 0.0 0.0\n" % (mobj2.group(1))
- psivar_coord = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"], dtype=2
- ),
- )
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'@GETXYZ-I, 1 atoms read from ZMAT.' + r'\s*' +
- r'^\s+' + r'[0-9]+\s+([A-Z]+)\s+[0-9]+\s+' + NUMBER + r'\s*',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched atom")
- # Dinky Molecule
- molxyz = "1 bohr\n\n%s 0.0 0.0 0.0\n" % (mobj.group(1))
- psivar_coord = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"], dtype=2
- ),
- )
-
- # Process error codes
- mobj = re.search(
- # fmt: off
- r"^\s*" + r"--executable " + r"(?P\w+)" + r" finished with status" + r"\s+" + r"(?P[1-9][0-9]*)",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched error")
- # psivar['CFOUR ERROR CODE'] = mobj.group(2)
- c4exe = mobj.group("c4exe")
- errcode = int(mobj.group("errcode"))
- if errcode != 0:
- error += f"--executable {c4exe} finished with status {errcode}"
- if c4exe in ["xvcc", "xecc", "xncc"]:
- module = c4exe[1:]
-
- # Process CURRENT energies (TODO: needs better way)
- if "SCF TOTAL ENERGY" in psivar:
- psivar["CURRENT REFERENCE ENERGY"] = psivar["SCF TOTAL ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["SCF TOTAL ENERGY"]
- psivar["HF TOTAL ENERGY"] = psivar["SCF TOTAL ENERGY"]
-
- if "MP2 TOTAL ENERGY" in psivar and "MP2 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP2 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP2 TOTAL ENERGY"]
-
- if "MP3 TOTAL ENERGY" in psivar and "MP3 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP3 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP3 TOTAL ENERGY"]
-
- if "MP4(SDQ) TOTAL ENERGY" in psivar and "MP4(SDQ) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP4(SDQ) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP4(SDQ) TOTAL ENERGY"]
-
- if "MP4 TOTAL ENERGY" in psivar and "MP4 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP4 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP4 TOTAL ENERGY"]
-
- if "CISD TOTAL ENERGY" in psivar and "CISD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CISD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CISD TOTAL ENERGY"]
-
- if "QCISD TOTAL ENERGY" in psivar and "QCISD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["QCISD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["QCISD TOTAL ENERGY"]
-
- if "QCISD(T) TOTAL ENERGY" in psivar and "QCISD(T) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["QCISD(T) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["QCISD(T) TOTAL ENERGY"]
-
- if "LCCD TOTAL ENERGY" in psivar and "LCCD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["LCCD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["LCCD TOTAL ENERGY"]
-
- if "LCCSD TOTAL ENERGY" in psivar and "LCCSD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["LCCSD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["LCCSD TOTAL ENERGY"]
-
- # if ('%s TOTAL ENERGY' % (mobj.group('fullCC')) in psivar) and \
- # ('%s CORRELATION ENERGY' % (mobj.group('fullCC')) in psivar):
- # psivar['CURRENT CORRELATION ENERGY'] = psivar['%s CORRELATION ENERGY' % (mobj.group('fullCC')]
- # psivar['CURRENT ENERGY'] = psivar['%s TOTAL ENERGY' % (mobj.group('fullCC')]
-
- if "CC2 TOTAL ENERGY" in psivar and "CC2 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CC2 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CC2 TOTAL ENERGY"]
-
- if "CCD TOTAL ENERGY" in psivar and "CCD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCD TOTAL ENERGY"]
-
- if "BCCD TOTAL ENERGY" in psivar and "BCCD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["BCCD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["BCCD TOTAL ENERGY"]
-
- if "CCSD TOTAL ENERGY" in psivar and "CCSD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSD TOTAL ENERGY"]
-
- if "CCSD+T(CCSD) TOTAL ENERGY" in psivar and "CCSD+T(CCSD) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSD+T(CCSD) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSD+T(CCSD) TOTAL ENERGY"]
-
- if "CCSD(T) TOTAL ENERGY" in psivar and "CCSD(T) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSD(T) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSD(T) TOTAL ENERGY"]
-
- if "A-CCSD(T) TOTAL ENERGY" in psivar and "A-CCSD(T) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["A-CCSD(T) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["A-CCSD(T) TOTAL ENERGY"]
-
- if "BCCD(T) TOTAL ENERGY" in psivar and "BCCD(T) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["BCCD(T) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["BCCD(T) TOTAL ENERGY"]
-
- if "CC3 TOTAL ENERGY" in psivar and "CC3 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CC3 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CC3 TOTAL ENERGY"]
-
- if "CCSDT TOTAL ENERGY" in psivar and "CCSDT CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT TOTAL ENERGY"]
-
- if "CCSDT-1A TOTAL ENERGY" in psivar and "CCSDT-1A CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT-1A CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT-1A TOTAL ENERGY"]
-
- if "CCSDT-1B TOTAL ENERGY" in psivar and "CCSDT-1B CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT-1B CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT-1B TOTAL ENERGY"]
-
- if "CCSDT-2 TOTAL ENERGY" in psivar and "CCSDT-2 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT-2 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT-2 TOTAL ENERGY"]
-
- if "CCSDT-3 TOTAL ENERGY" in psivar and "CCSDT-3 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT-3 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT-3 TOTAL ENERGY"]
-
- if "CCSDT(Q) TOTAL ENERGY" in psivar and "CCSDT(Q) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT(Q) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT(Q) TOTAL ENERGY"]
-
- if "CCSDTQ TOTAL ENERGY" in psivar and "CCSDTQ CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDTQ CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDTQ TOTAL ENERGY"]
-
- psivar[f"N ATOMS"] = len(psivar_coord.symbols)
-
- return psivar, psivar_coord, psivar_grad, version, module, error
-
-
-def harvest(in_mol: Molecule, method: str, c4out, **largs):
- """Parses all the pieces of output from Cfour: the stdout in
- *c4out* and the contents of various scratch files like GRD stored
- in their namesake keys in *largs*. Since all Cfour output uses
- its own orientation and atom ordering for the given molecule,
- a qcdb.Molecule *in_mol*, if supplied, is used to transform the
- Cfour output back into consistency with *in_mol*.
-
- """
- # Collect results from output file and subsidiary files
- qcvars, out_mol, outGrad, version, module, error = harvest_output(c4out)
-
- if largs.get("GRD"):
- grdMol, grdGrad = harvest_GRD(largs["GRD"])
- else:
- grdMol, grdGrad = None, None
-
- if largs.get("FCMFINAL"):
- fcmHess = load_hessian(largs["FCMFINAL"], dtype="fcmfinal")
- if np.count_nonzero(fcmHess) == 0:
- fcmHess = None
- else:
- fcmHess = None
-
- if largs.get("DIPOL"):
- dipolDip = harvest_DIPOL(largs["DIPOL"])
- else:
- dipolDip = None
-
- # Sometimes the hierarchical setting of CURRENT breaks down
- if method == "ccsd+t(ccsd)":
- qcvars["CURRENT CORRELATION ENERGY"] = qcvars["CCSD+T(CCSD) CORRELATION ENERGY"]
- qcvars["CURRENT ENERGY"] = qcvars["CCSD+T(CCSD) TOTAL ENERGY"]
-
- if fcmHess is not None and method in ["hf", "scf"]:
- # MP2 available in HF Hessian so need to counteract
- qcvars.pop("CURRENT CORRELATION ENERGY")
- qcvars["CURRENT ENERGY"] = qcvars["HF TOTAL ENERGY"]
-
- # Reconcile the coordinate information: several cases
- # Case p4Mol GRD Check consistency Apply orientation? ReturnMol (1-19-2014)
- # sp with mol thru cfour {} None None outMol N.C. outMol
- # opt with mol thru cfour {} None grdMol outMol && grdMol N.C. grdMol
- # sp with mol thru molecule {} p4Mol None p4Mol && outMol p4Mol <-- outMol p4Mol (same as input arg)
- # opt with mol thru molecule {} p4Mol grdMol p4Mol && outMol && grdMol p4Mol <-- grdMol p4Mol (same as input arg)
- # Jul 2021: above describes longtime orientation strategy. Now, mol through cfour {} no longer allowed, and fix_* signal whether input (T) or cfour native (F) frames for returned data.
-
- if out_mol:
- if grdMol:
- if abs(out_mol.nuclear_repulsion_energy() - grdMol.nuclear_repulsion_energy()) > 1.0e-3:
- raise ValueError(
- f"""CFOUR outfile (NRE: {out_mol.nuclear_repulsion_energy()} inconsistent with CFOUR GRD (NRE: {grdMol.nuclear_repulsion_energy()})."""
- )
- if in_mol:
- if abs(out_mol.nuclear_repulsion_energy() - in_mol.nuclear_repulsion_energy()) > 1.0e-3:
- raise ValueError(
- f"""CFOUR outfile (NRE: {out_mol.nuclear_repulsion_energy()}) inconsistent with AtomicInput.molecule (NRE: {in_mol.nuclear_repulsion_energy()})."""
- )
- else:
- raise ValueError("""No coordinate information extracted from CFOUR output.""")
-
- # Set up array reorientation object(s)
- if in_mol and out_mol and grdMol:
- # Jul 2021: apparently GRD and FCMFINAL can have different atom orderings :-)
-
- _, data = grdMol.align(out_mol, atoms_map=False, mols_align=True, verbose=0)
- g2o_mill = data["mill"]
-
- oriCoord = g2o_mill.align_coordinates(grdMol.geometry)
- oriGrad = g2o_mill.align_gradient(np.array(grdGrad))
-
- if dipolDip is None:
- oriDip = None
- else:
- oriDip = g2o_mill.align_vector(dipolDip)
-
- if fcmHess is None:
- oriHess = None
- else:
- oriHess = fcmHess
-
- # Frame considerations
- if in_mol.fix_com and in_mol.fix_orientation:
- # Impose input frame if important as signalled by fix_*=T
- return_mol = in_mol
- _, data = out_mol.align(in_mol, atoms_map=False, mols_align=True, generic_ghosts=True, verbose=0)
- mill = data["mill"]
-
- else:
- return_mol, _ = in_mol.align(out_mol, atoms_map=False, mols_align=True, generic_ghosts=True, verbose=0)
- mill = qcel.molutil.compute_scramble(
- len(in_mol.symbols), do_resort=False, do_shift=False, do_rotate=False, do_mirror=False
- ) # identity AlignmentMill
-
- # _, data = out_mol.align(in_mol, atoms_map=False, mols_align=True, verbose=0)
- # o2i_mill = data["mill"]
- #
- # oriCoord = o2i_mill.align_coordinates(oriCoord)
- # oriGrad = o2i_mill.align_gradient(oriGrad)
- # if oriDip is not None:
- # oriDip = o2i_mill.align_vector(oriDip)
- # if oriHess is not None:
- # oriHess = o2i_mill.align_hessian(oriHess)
-
- oriCoord = mill.align_coordinates(oriCoord)
- oriGrad = mill.align_gradient(oriGrad)
- if oriDip is not None:
- oriDip = mill.align_vector(oriDip)
- if oriHess is not None:
- oriHess = mill.align_hessian(oriHess)
-
- elif in_mol and out_mol:
- # TODO watch out - haven't seen atom_map=False yet
-
- if in_mol.fix_com and in_mol.fix_orientation:
- # Impose input frame if important as signalled by fix_*=T
- return_mol = in_mol
- _, data = out_mol.align(in_mol, atoms_map=True, mols_align=True, generic_ghosts=True, verbose=0)
- mill = data["mill"]
-
- else:
- return_mol, _ = in_mol.align(out_mol, atoms_map=False, mols_align=True, generic_ghosts=True, verbose=0)
- mill = qcel.molutil.compute_scramble(
- len(in_mol.symbols), do_resort=False, do_shift=False, do_rotate=False, do_mirror=False
- ) # identity AlignmentMill
-
- oriCoord = mill.align_coordinates(out_mol.geometry) # (np_out=True))
- oriGrad = None
- oriHess = None # I don't think we ever get FCMFINAL w/o GRAD
- if dipolDip is None:
- oriDip = None
- else:
- oriDip = mill.align_vector(np.array(dipolDip))
- # p4c4 = OrientMols(in_mol, out_mol)
- # oriCoord = p4c4.transform_coordinates2(out_mol)
- # oriGrad = None
- # oriDip = None if dipolDip is None else p4c4.transform_vector(dipolDip)
-
- elif out_mol:
- oriGrad = None
- oriHess = None
- oriDip = None if dipolDip is None else dipolDip
-
- # not sure of purpose but it interferes now that return_mol overwrites atres.mol
- # return_mol = None if in_mol else grdMol
-
- if oriDip is not None:
- qcvars["CURRENT DIPOLE"] = oriDip
- oriDip *= qcel.constants.dipmom_au2debye
- # outPsivar["CURRENT DIPOLE X"] = oriDip[0]
- # outPsivar["CURRENT DIPOLE Y"] = oriDip[1]
- # outPsivar["CURRENT DIPOLE Z"] = oriDip[2]
- # outPsivar['CURRENT DIPOLE X'] = str(oriDip[0] * psi_dipmom_au2debye)
- # outPsivar['CURRENT DIPOLE Y'] = str(oriDip[1] * psi_dipmom_au2debye)
- # outPsivar['CURRENT DIPOLE Z'] = str(oriDip[2] * psi_dipmom_au2debye)
-
- if oriGrad is not None:
- return_grad = oriGrad
- elif grdGrad is not None:
- return_grad = grdGrad
- else:
- return_grad = None
-
- if oriHess is not None:
- return_hess = oriHess
- else:
- return_hess = None
-
- # if oriCoord is not None:
- # retCoord = oriCoord
- # else:
- # retCoord = None
-
- return qcvars, return_hess, return_grad, return_mol, version, module, error
-
-
-def harvest_GRD(grd):
- """Parses the contents *grd* of the Cfour GRD file into the gradient
- array and coordinate information. The coordinate info is converted
- into a rather dinky Molecule (no charge, multiplicity, or fragment),
- but this is these coordinates that govern the reading of molecule
- orientation by Cfour. Return qcel.models.Molecule and gradient array.
-
- """
- grd = grd.splitlines()
- Nat = int(grd[0].split()[0])
- molxyz = f"{Nat} bohr\n\n"
-
- grad = []
- for at in range(Nat):
- mline = grd[at + 1].split()
-
- # "@Xe" is potentially dangerous bypass for ghosts
- el = "@Xe" if int(float(mline[0])) == 0 else qcel.periodictable.to_E(int(float(mline[0])))
- molxyz += "%s %16s %16s %16s\n" % (el, mline[-3], mline[-2], mline[-1])
- lline = grd[at + 1 + Nat].split()
- grad.append([float(lline[-3]), float(lline[-2]), float(lline[-1])])
- grad = np.array(grad).reshape((-1, 3))
-
- mol = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"], dtype=2
- ),
- )
-
- return mol, grad
-
-
-def harvest_DIPOL(dipol):
- """Parses the contents *dipol* of the Cfour DIPOL file into a dipol vector."""
- dipol = dipol.splitlines()
- lline = dipol[0].split()
- dip = np.array([float(lline[0]), float(lline[1]), float(lline[2])])
-
- # return None if empty else dip
- return dip
diff --git a/qcengine/programs/cfour/keywords.py b/qcengine/programs/cfour/keywords.py
deleted file mode 100644
index 41f323554..000000000
--- a/qcengine/programs/cfour/keywords.py
+++ /dev/null
@@ -1,70 +0,0 @@
-from typing import Any, Dict, Tuple
-
-from qcengine.exceptions import InputError
-
-
-def format_keywords(keywords: Dict[str, Any]) -> str:
- """Form keywords deck from dictionary `keywords` where keys are CFOUR keyword ("__" separating
- any nested-module keywords) strings and values are Python formatted.
-
- """
- text = []
-
- keywords = {k.upper(): v for k, v in keywords.items()}
- for key, val in sorted(keywords.items()):
- text.append("=".join(format_keyword(key, val)))
-
- text = "\n".join(text)
- text = "\n\n*CFOUR(" + text + ")\n\n"
-
- return text
-
-
-def format_keyword(keyword: str, val: Any) -> Tuple[str, str]:
- """Reformat keyword's value from Python into CFOUR-speak. Arrays are the primary target."""
- keyword = keyword.upper()
-
- # Transform booleans into integers
- if val is True:
- text = "1"
- elif val is False:
- text = "0"
-
- # Transform list from [[3, 0, 1, 1], [2, 0, 1, 0]] --> 3-0-1-1/2-0-1-0
- elif isinstance(val, list):
- if type(val[0]).__name__ == "list":
- if type(val[0][0]).__name__ == "list":
- raise InputError("Option has level of array nesting inconsistent with CFOUR.")
- else:
- # option is 2D array
- text = "/".join("-".join(map(str, no)) for no in val)
- else:
- # option is plain 1D array
- if keyword in ["ESTATE_SYM", "CFOUR_ESTATE_SYM"]:
- # [3, 1, 0, 2] --> 3/1/0/2
- text = "/".join(map(str, val))
- else:
- # [3, 1, 0, 2] --> 3-1-0-2
- text = "-".join(map(str, val))
-
- # Transform the basis sets that *must* be lowercase
- elif keyword in ["CFOUR_BASIS", "BASIS"] and val.upper() in [
- "SVP",
- "DZP",
- "TZP",
- "TZP2P",
- "QZ2P",
- "PZ3D2F",
- "13S9P4D3F",
- ]:
- text = str(val.lower())
-
- # Transform the methods that *must* be mixed case
- elif keyword in ["CFOUR_CALC_LEVEL", "CALC_LEVEL"] and val.upper() == "CCSDT-1B":
- text = "CCSDT-1b"
-
- # No Transform
- else:
- text = str(val).upper()
-
- return keyword, text
diff --git a/qcengine/programs/cfour/runner.py b/qcengine/programs/cfour/runner.py
deleted file mode 100644
index 6fe67e2b6..000000000
--- a/qcengine/programs/cfour/runner.py
+++ /dev/null
@@ -1,230 +0,0 @@
-"""Compute quantum chemistry using Mainz-Austin-Budapest-Gainesville's CFOUR executable."""
-
-import copy
-import pprint
-from decimal import Decimal
-from pathlib import Path
-from typing import Any, Dict, Optional, Tuple
-
-import numpy as np
-from qcelemental.models import AtomicInput, AtomicResult, BasisSet, Provenance
-from qcelemental.util import safe_version, which
-
-from ...exceptions import InputError, UnknownError
-from ...util import execute
-from ..model import ProgramHarness
-from ..qcvar_identities_resources import build_atomicproperties, build_out
-from ..util import error_stamp
-from .germinate import muster_modelchem
-from .harvester import harvest
-from .keywords import format_keywords
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-
-
-class CFOURHarness(ProgramHarness):
- """
-
- Notes
- -----
- * Looks for basis set file ``../basis/GENBAS`` from ``xcfour`` executable. If this doesn't work, file an issue.
-
- """
-
- _defaults = {
- "name": "CFOUR",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "xcfour", return_bool=True, raise_error=raise_error, raise_msg="Please install via http://cfour.de/"
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("xcfour")
- if which_prog not in self.version_cache:
- success, output = execute([which_prog, "ZMAT"], {"ZMAT": "\nHe\n\n"})
-
- if success:
- for line in output["stdout"].splitlines():
- if "Version" in line:
- branch = " ".join(line.strip().split()[1:])
- self.version_cache[which_prog] = safe_version(branch)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: AtomicInput, config: "TaskConfig") -> AtomicResult:
- self.found(raise_error=True)
-
- job_inputs = self.build_input(input_model, config)
- success, dexe = self.execute(job_inputs)
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- dexe["outfiles"]["input"] = job_inputs["infiles"]["ZMAT"]
- return self.parse_output(dexe["outfiles"], input_model)
-
- def build_input(
- self, input_model: AtomicInput, config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
- cfourrec = {
- "infiles": {},
- "scratch_directory": config.scratch_directory,
- "scratch_messy": config.scratch_messy,
- }
-
- opts = copy.deepcopy(input_model.keywords)
-
- # Handle memory
- # for cfour, [GiB] --> [QW]
- opts["memory_size"] = int(config.memory * (1024**3) / 8)
- opts["mem_unit"] = "integerwords"
-
- # Handle molecule
- molcmd, moldata = input_model.molecule.to_string(dtype="cfour", units="Bohr", return_data=True)
- opts.update(moldata["keywords"])
-
- # Handle calc type and quantum chemical method
- mdcopts = muster_modelchem(input_model.model.method, input_model.driver)
- opts.update(mdcopts)
-
- # Handle basis set
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
- if input_model.model.basis is None:
- raise InputError("None for model.basis is not useable.")
-
- # * why, yes, this is highly questionable
- # * assuming relative file location between xcfour exe and GENBAS file
- # * reading a multi MB file into the inputs dict
- if all(input_model.molecule.real):
- opts["basis"] = input_model.model.basis
- bascmd = ""
- else:
- # * note not getting per-basis casing like if it passed through format_keywords
- opts["basis"] = "SPECIAL"
- text = [
- (
- f"""H:6-31G"""
- if (elem == "H" and input_model.model.basis.upper() == "6-31G*")
- else f"""{elem.upper()}:{input_model.model.basis.upper()}"""
- )
- for iat, elem in enumerate(input_model.molecule.symbols)
- ]
- text.append("")
- text.append("")
- bascmd = "\n".join(text)
-
- # Handle conversion from schema (flat key/value) keywords into local format
- optcmd = format_keywords(opts)
-
- xcfour = which("xcfour")
- genbas = Path(xcfour).parent.parent / "basis" / "GENBAS"
- cfourrec["infiles"]["ZMAT"] = molcmd + optcmd + bascmd
- cfourrec["infiles"]["GENBAS"] = genbas.read_text()
- cfourrec["command"] = [xcfour]
-
- return cfourrec
-
- def execute(
- self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None
- ) -> Tuple[bool, Dict]:
-
- # llel works b/c util.environ_context sets OMP_NUM_THREADS = config.ncores
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- ["GRD", "FCMFINAL", "DIPOL"],
- # "DIPDER", "POLAR", "POLDER"],
- scratch_messy=inputs["scratch_messy"],
- scratch_directory=inputs["scratch_directory"],
- )
- return success, dexe
-
- def parse_output(
- self, outfiles: Dict[str, str], input_model: AtomicInput
- ) -> AtomicResult: # lgtm: [py/similar-function]
-
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- method = input_model.model.method.lower()
- method = method[3:] if method.startswith("c4-") else method
-
- # c4mol, if it exists, is dinky, just a clue to geometry of cfour results
- try:
- # July 2021: c4mol & vector returns now atin/outfile orientation depending on fix_com,orientation=T/F. previously always atin orientation
- qcvars, c4hess, c4grad, c4mol, version, module, errorTMP = harvest(
- input_model.molecule, method, stdout, **outfiles
- )
- except Exception:
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- if errorTMP != "":
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- try:
- if c4grad is not None:
- qcvars["CURRENT GRADIENT"] = c4grad
- qcvars[f"{method.upper()} TOTAL GRADIENT"] = c4grad
-
- if c4hess is not None:
- qcvars[f"{method.upper()} TOTAL HESSIAN"] = c4hess
- qcvars["CURRENT HESSIAN"] = c4hess
-
- if input_model.driver.upper() == "PROPERTIES":
- retres = qcvars[f"CURRENT ENERGY"]
- else:
- retres = qcvars[f"CURRENT {input_model.driver.upper()}"]
- except KeyError:
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- # TODO: "xalloc(): memory allocation failed!"
-
- if isinstance(retres, Decimal):
- retres = float(retres)
- elif isinstance(retres, np.ndarray):
- retres = retres.ravel().tolist()
-
- build_out(qcvars)
- atprop = build_atomicproperties(qcvars)
-
- provenance = Provenance(creator="CFOUR", version=self.get_version(), routine="xcfour").dict()
- if module is not None:
- provenance["module"] = module
-
- output_data = {
- "schema_version": 1,
- "molecule": c4mol, # overwrites with outfile Cartesians in case fix_*=F
- "extras": {**input_model.extras},
- "native_files": {k: v for k, v in outfiles.items() if v is not None},
- "properties": atprop,
- "provenance": provenance,
- "return_result": retres,
- "stderr": stderr,
- "stdout": stdout,
- "success": True,
- }
-
- # got to even out who needs plump/flat/Decimal/float/ndarray/list
- # Decimal --> str preserves precision
- # * formerly unnp(qcvars, flat=True).items()
- output_data["extras"]["qcvars"] = {
- k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in qcvars.items()
- }
-
- return AtomicResult(**{**input_model.dict(), **output_data})
diff --git a/qcengine/programs/dftd3.py b/qcengine/programs/dftd3.py
deleted file mode 100644
index 2f67fcfee..000000000
--- a/qcengine/programs/dftd3.py
+++ /dev/null
@@ -1,361 +0,0 @@
-"""Compute dispersion correction using Grimme's DFTD3 executable."""
-
-import os
-import pathlib
-import pprint
-import re
-import socket
-import sys
-from decimal import Decimal
-from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.models import AtomicResult, FailedOperation, Provenance
-from qcelemental.util import safe_version, which
-
-from ..exceptions import InputError, ResourceError, UnknownError
-from ..util import execute
-from . import empirical_dispersion_resources
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-
-
-class DFTD3Harness(ProgramHarness):
-
- _defaults = {
- "name": "DFTD3",
- "scratch": True,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "dftd3",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install dftd3 -c psi4`.",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("dftd3")
- if which_prog not in self.version_cache:
- # Note: anything below v3.2.1 will return the help menu here. but that's fine as version compare evals to False.
- command = [which_prog, "-version"]
- import subprocess
-
- proc = subprocess.run(command, stdout=subprocess.PIPE)
- self.version_cache[which_prog] = safe_version(proc.stdout.decode("utf-8").strip())
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- self.found(raise_error=True)
-
- job_inputs = self.build_input(input_model, config)
-
- success, dexe = self.execute(job_inputs)
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- dexe["outfiles"]["input"] = job_inputs["infiles"][".dftd3par.local"]
- dexe["outfiles"]["dftd3_geometry.xyz"] = job_inputs["infiles"]["dftd3_geometry.xyz"]
- output_model = self.parse_output(dexe["outfiles"], input_model)
-
- else:
- output_model = FailedOperation(
- success=False,
- error={"error_type": "execution_error", "error_message": dexe["stderr"]},
- input_data=input_model.dict(),
- )
-
- return output_model
-
- def execute(
- self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None
- ) -> Tuple[bool, Dict]:
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- inputs["outfiles"],
- scratch_messy=inputs["scratch_messy"],
- # env=inputs["env"],
- scratch_directory=inputs["scratch_directory"],
- blocking_files=inputs["blocking_files"],
- )
- return success, dexe
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
-
- # strip engine hint
- mtd = input_model.model.method
- if mtd.startswith("d3-"):
- mtd = mtd[3:]
-
- if (input_model.driver.derivative_int() > 1) or (input_model.driver == "properties"):
- raise InputError(f"Driver {input_model.driver} not implemented for DFTD3.")
-
- # temp until actual options object
- input_model.extras["info"] = empirical_dispersion_resources.from_arrays(
- name_hint=mtd,
- level_hint=input_model.keywords.get("level_hint", None),
- param_tweaks=input_model.keywords.get("params_tweaks", None),
- dashcoeff_supplement=input_model.keywords.get("dashcoeff_supplement", None),
- )
-
- # this is what the dftd3 program needs, not what the job needs
- # * form dftd3_parameters string that governs dispersion calc
- # * form dftd3_geometry string that supplies geometry to dispersion calc
- # * form command and arguments
-
- # Need 'real' field later and that's only guaranteed for molrec
- molrec = qcel.molparse.from_schema(input_model.molecule.dict())
- # jobrec['molecule']['real'] = molrec['real']
-
- command = ["dftd3", "dftd3_geometry.xyz"]
- if input_model.driver == "gradient":
- command.append("-grad")
- if input_model.extras["info"]["dashlevel"] == "atmgr":
- command.append("-abc")
-
- # Append `-anal` for pairwise atomic analysis
- if input_model.keywords.get("pair_resolved", False):
- command.append("-anal")
-
- infiles = {
- ".dftd3par.local": dftd3_coeff_formatter(
- input_model.extras["info"]["dashlevel"], input_model.extras["info"]["dashparams"]
- ),
- "dftd3_geometry.xyz": qcel.molparse.to_string(molrec, dtype="xyz", units="Angstrom", ghost_format=""),
- }
-
- return {
- "command": command,
- "infiles": infiles,
- "outfiles": ["dftd3_gradient", "dftd3_abc_gradient"],
- "scratch_messy": config.scratch_messy,
- "scratch_directory": config.scratch_directory,
- "input_result": input_model.copy(deep=True),
- "blocking_files": [os.path.join(pathlib.Path.home(), ".dftd3par." + socket.gethostname())],
- }
-
- # Notes
- # -----
- # Central to harvesting is the fact (to the planting, not to the DFTD3
- # program) that 2-body and 3-body are run separately. Because of how
- # damping functions work (see GH:psi4/psi4#1407), some 2-body damping
- # schemes can give wrong answers for 3-body. And because 3-body is
- # set to run with some dummy values, the 2-body values are no good.
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
- Grimme_h2kcal = 627.509541
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- for fl, contents in outfiles.items():
- if contents is not None:
- # LOG text += f'\n DFTD3 scratch file {fl} has been read.\n'
- pass
-
- # parse energy output (could go further and break into E6, E8, E10 and Cn coeff)
- real = np.array(input_model.molecule.real)
- full_nat = real.shape[0]
- real_nat = np.sum(real)
- for ln in stdout.splitlines():
- if re.match(" Edisp /kcal,au", ln):
- ene = Decimal(ln.split()[3])
- elif re.match(r" E6\(ABC\) \" :", ln): # c. v3.2.0
- raise ResourceError("Cannot process ATM results from DFTD3 prior to v3.2.1.")
- elif re.match(r""" E6\(ABC\) /kcal,au:""", ln):
- atm = Decimal(ln.split()[-1])
- elif re.match(" analysis of pair-wise terms", ln):
- D3pairs = np.zeros((full_nat, full_nat))
- # Iterate over block
- start = stdout.splitlines().index(ln) + 2
- for l in stdout.splitlines()[start:]:
- data = l.replace("-", " -").split()
- # print(data)
- if len(data) == 0:
- break
- atom1 = int(data[0]) - 1
- atom2 = int(data[1]) - 1
- Edisp = Decimal(data[-1])
- D3pairs[atom1, atom2] = Decimal(0.5) * Edisp / Decimal(Grimme_h2kcal)
- D3pairs[atom2, atom1] = D3pairs[atom1, atom2]
-
- elif re.match(" normal termination of dftd3", ln):
- break
- else:
- if not ((real_nat == 1) and (input_model.driver == "gradient")):
- raise UnknownError(
- f"Unsuccessful run. Check input, particularly geometry in [a0]. Model: {input_model.model}"
- )
-
- # parse gradient output
- # * DFTD3 crashes on one-atom gradients. Avoid the error (above) and just force the correct result (below).
- if outfiles["dftd3_gradient"] is not None:
- srealgrad = outfiles["dftd3_gradient"].replace("D", "E")
- realgrad = np.fromstring(srealgrad, count=3 * real_nat, sep=" ").reshape((-1, 3))
- elif real_nat == 1:
- realgrad = np.zeros((1, 3))
-
- if outfiles["dftd3_abc_gradient"] is not None:
- srealgrad = outfiles["dftd3_abc_gradient"].replace("D", "E")
- realgradabc = np.fromstring(srealgrad, count=3 * real_nat, sep=" ").reshape((-1, 3))
- elif real_nat == 1:
- realgradabc = np.zeros((1, 3))
-
- if input_model.driver == "gradient":
- ireal = np.argwhere(real).reshape((-1))
- fullgrad = np.zeros((full_nat, 3))
- rg = realgradabc if (input_model.extras["info"]["dashlevel"] == "atmgr") else realgrad
- try:
- fullgrad[ireal, :] = rg
- except NameError as exc:
- raise UnknownError("Unsuccessful gradient collection.") from exc
-
- qcvkey = input_model.extras["info"]["fctldash"].upper()
-
- calcinfo = []
- if input_model.extras["info"]["dashlevel"] == "atmgr":
- calcinfo.append(qcel.Datum("CURRENT ENERGY", "Eh", atm))
- calcinfo.append(qcel.Datum("DISPERSION CORRECTION ENERGY", "Eh", atm))
- calcinfo.append(qcel.Datum("3-BODY DISPERSION CORRECTION ENERGY", "Eh", atm))
- calcinfo.append(qcel.Datum("AXILROD-TELLER-MUTO 3-BODY DISPERSION CORRECTION ENERGY", "Eh", atm))
-
- if input_model.driver == "gradient":
- calcinfo.append(qcel.Datum("CURRENT GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("3-BODY DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(
- qcel.Datum("AXILROD-TELLER-MUTO 3-BODY DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad)
- )
-
- else:
- calcinfo.append(qcel.Datum("CURRENT ENERGY", "Eh", ene))
- calcinfo.append(qcel.Datum("DISPERSION CORRECTION ENERGY", "Eh", ene))
- calcinfo.append(qcel.Datum("2-BODY DISPERSION CORRECTION ENERGY", "Eh", ene))
- if qcvkey:
- calcinfo.append(qcel.Datum(f"{qcvkey} DISPERSION CORRECTION ENERGY", "Eh", ene))
-
- if input_model.driver == "gradient":
- calcinfo.append(qcel.Datum("CURRENT GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("2-BODY DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
- if qcvkey:
- calcinfo.append(qcel.Datum(f"{qcvkey} DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
-
- # LOGtext += qcel.datum.print_variables({info.label: info for info in calcinfo})
- calcinfo = {info.label: info.data for info in calcinfo}
-
- # Decimal --> str preserves precision
- calcinfo = {k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in calcinfo.items()}
-
- # jobrec['properties'] = {"return_energy": ene}
- # jobrec["molecule"]["real"] = list(jobrec["molecule"]["real"])
-
- retres = calcinfo[f"CURRENT {input_model.driver.upper()}"]
- if isinstance(retres, Decimal):
- retres = float(retres)
- elif isinstance(retres, np.ndarray):
- retres = retres.ravel().tolist()
-
- output_data = {
- "extras": input_model.extras,
- "native_files": {k: v for k, v in outfiles.items() if v is not None},
- "properties": {
- "return_energy": calcinfo[f"CURRENT ENERGY"],
- },
- "provenance": Provenance(
- creator="DFTD3", version=self.get_version(), routine=__name__ + "." + sys._getframe().f_code.co_name
- ),
- "return_result": retres,
- "stderr": stderr,
- "stdout": stdout,
- }
- output_data["extras"]["local_keywords"] = input_model.extras["info"]
- output_data["extras"]["qcvars"] = calcinfo
- if input_model.keywords.get("pair_resolved", False):
- assert (
- abs(D3pairs.sum() - float(retres)) < 1.0e-6
- ), f"pairwise sum {D3pairs.sum()} != energy {float(retres)}"
- output_data["extras"]["qcvars"]["2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"] = D3pairs
- output_data["success"] = True
-
- return AtomicResult(**{**input_model.dict(), **output_data})
-
-
-def dftd3_coeff_formatter(dashlvl: str, dashcoeff: Dict) -> str:
- """Return strings for DFTD3 program parameter file.
-
- s6 rs6 s18 rs8 alpha6 version
- ------------------------------------------------------
- d2: s6 sr6 s8=0.0 a2=None alpha6 version=2
- d3zero: s6 sr6 s8 a2=sr8 alpha6 version=3
- d3bj: s6 a1 s8 a2 alpha6=None version=4
- d3mzero: s6 sr6 s8 beta alpha6=14.0 version=5
- d3mbj: s6 a1 s8 a2 alpha6=None version=6
- atmgr: s6=1.0 sr6=None s8=None a2=None alpha6 version=3 (needs -abc, too)
-
- 2-body variant here. that is, d3zero2b
-
- Parameters
- ----------
- dashlvl : {'d2', 'd3zero', d3bj', 'd3mzero', 'd3mbj', 'atmgr'}
- Level of dispersion correction.
- dashcoeff : dict
- Dictionary fully specifying non-fixed parameters (table above) for `dashlvl` to drive DFTD3.
-
- Notes
- -----
- The `atmgr` dashlvl is intended for use only to get the three-body Axilrod-Teller-Muto
- three body dispersion correction. Therefore, dummy parameters are passed for two-body damping
- function, and it will give garbage for two-body component of dispersion correction.
-
- Returns
- -------
- str
- Suitable for `.dftd3par` file.
-
- """
- dashformatter = """{:12.6f} {:12.6f} {:12.6f} {:12.6f} {:12.6f} {:6}\n"""
-
- dashlvl = dashlvl.lower()
- if dashlvl == "d2":
- return dashformatter.format(dashcoeff["s6"], dashcoeff["sr6"], 0.0, 0.0, dashcoeff["alpha6"], 2)
- elif dashlvl == "d3zero2b":
- return dashformatter.format(
- dashcoeff["s6"], dashcoeff["sr6"], dashcoeff["s8"], dashcoeff["sr8"], dashcoeff["alpha6"], 3
- )
- elif dashlvl == "d3bj2b":
- return dashformatter.format(dashcoeff["s6"], dashcoeff["a1"], dashcoeff["s8"], dashcoeff["a2"], 0.0, 4)
- elif dashlvl == "d3mzero2b":
- return dashformatter.format(dashcoeff["s6"], dashcoeff["sr6"], dashcoeff["s8"], dashcoeff["beta"], 14.0, 5)
- elif dashlvl == "d3mbj2b":
- return dashformatter.format(dashcoeff["s6"], dashcoeff["a1"], dashcoeff["s8"], dashcoeff["a2"], 0.0, 6)
- elif dashlvl == "atmgr":
- # need to set first four parameters to something other than None, otherwise DFTD3 gets mad or a bit wrong
- return dashformatter.format(1.0, 0.0, 0.0, 0.0, dashcoeff["alpha6"], 3)
- else:
- raise InputError(f"""-D correction level {dashlvl} is not available. Choose among {dashcoeff.keys()}.""")
diff --git a/qcengine/programs/dftd_ng.py b/qcengine/programs/dftd_ng.py
deleted file mode 100644
index 8fe0af980..000000000
--- a/qcengine/programs/dftd_ng.py
+++ /dev/null
@@ -1,313 +0,0 @@
-"""
-Harness for the DFT-D dispersion correction.
-This implementation interfaces with the dftd3 and dftd4 Python-API, which provides
-native support for QCSchema.
-
-Therefore, this harness only has to provide a thin wrapper to integrate the
-respective dispersion correction.
-"""
-
-from typing import Dict
-
-from qcelemental.models import AtomicInput, AtomicResult
-from qcelemental.util import parse_version, safe_version, which_import
-
-from ..config import TaskConfig
-from ..exceptions import InputError
-from .empirical_dispersion_resources import from_arrays, get_dispersion_aliases
-from .model import ProgramHarness
-
-
-class DFTD4Harness(ProgramHarness):
- """Calculation harness for the DFT-D4 dispersion correction."""
-
- _defaults = {
- "name": "dftd4",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Check for the availability of the Python API of dftd4"""
-
- return which_import(
- "dftd4",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install a dftd4 version with enabled Python API"
- + " (e.g. conda install dftd4-python -c conda-forge)",
- )
-
- def get_version(self) -> str:
- """Return the currently used version of dftd4"""
- self.found(raise_error=True)
-
- which_prog = which_import("dftd4")
- if which_prog not in self.version_cache:
- import dftd4
-
- self.version_cache[which_prog] = safe_version(dftd4.__version__)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: AtomicInput, config: TaskConfig) -> AtomicResult:
- """
- Actual interface to the dftd4 package. The compute function is just a thin
- wrapper around the native QCSchema interface of the dftd4 Python-API.
- """
-
- self.found(raise_error=True)
-
- import dftd4
- from dftd4.qcschema import run_qcschema
-
- # strip engine hint
- input_data = input_model.dict()
- method = input_model.model.method
- if method.startswith("d4-"):
- method = method[3:]
- input_data["model"]["method"] = method
- qcvkey = method.upper() if method is not None else None
-
- # send `from_arrays` the dftd4 behavior of functional specification overrides explicit parameters specification
- # * differs from dftd4 harness behavior where parameters extend or override functional
- # * stash the resolved plan in extras or, if errored, leave it for the proper dftd4 api to reject
- param_tweaks = None if method else input_model.keywords.get("params_tweaks", None)
- try:
- planinfo = from_arrays(
- verbose=1,
- name_hint=method,
- level_hint=input_model.keywords.get("level_hint", None),
- param_tweaks=param_tweaks,
- dashcoeff_supplement=input_model.keywords.get("dashcoeff_supplement", None),
- )
- except InputError:
- pass
- else:
- input_data["extras"]["info"] = planinfo
-
- # strip dispersion level from method
- for alias, d4 in get_dispersion_aliases().items():
- if d4 == "d4bjeeqatm" and method.lower().endswith(alias):
- method = method[: -(len(alias) + 1)]
- input_data["model"]["method"] = method
-
- # consolidate dispersion level aliases
- level_hint = input_model.keywords.get("level_hint", None)
- if level_hint and get_dispersion_aliases()[level_hint.lower()] == "d4bjeeqatm":
- level_hint = "d4"
- input_data["keywords"]["level_hint"] = level_hint
-
- input_model = AtomicInput(**input_data)
-
- # Run the Harness
- output = run_qcschema(input_model)
-
- if "info" in output.extras:
- qcvkey = output.extras["info"]["fctldash"].upper()
-
- calcinfo = {}
- energy = output.properties.return_energy
- calcinfo["CURRENT ENERGY"] = energy
- calcinfo["DISPERSION CORRECTION ENERGY"] = energy
- if qcvkey:
- calcinfo[f"{qcvkey} DISPERSION CORRECTION ENERGY"] = energy
-
- if output.driver == "gradient":
- gradient = output.return_result
- calcinfo["CURRENT GRADIENT"] = gradient
- calcinfo["DISPERSION CORRECTION GRADIENT"] = gradient
- if qcvkey:
- calcinfo[f"{qcvkey} DISPERSION CORRECTION GRADIENT"] = gradient
-
- if output.keywords.get("pair_resolved", False):
- pw2 = output.extras["dftd4"]["additive pairwise energy"]
- pw3 = output.extras["dftd4"]["non-additive pairwise energy"]
- assert abs(pw2.sum() + pw3.sum() - energy) < 1.0e-8, f"{pw2.sum()} + {pw3.sum()} != {energy}"
- calcinfo["2-BODY DISPERSION CORRECTION ENERGY"] = pw2.sum()
- calcinfo["3-BODY DISPERSION CORRECTION ENERGY"] = pw3.sum()
- calcinfo["2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"] = pw2
- calcinfo["3-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"] = pw3
-
- output.extras["qcvars"] = calcinfo
-
- return output
-
-
-class SDFTD3Harness(ProgramHarness):
- """
- Calculation harness for the DFT-D3 dispersion correction.
-
- This implementation of DFT-D3 supports the several damping functions, which
- are selected via the *level_hint* keyword. Damping parameter can be specified
- via the *param_tweaks* dictionary. If no *param_tweaks* are provided the
- functional parameters are obtained from the internal database of the library.
-
- The following damping function are available via *level_hint*:
-
- - ``d3bj``:
- Rational damping function for DFT-D3. The original scheme was proposed by
- Becke and Johnson and implemented in a slightly adjusted form using only
- the C8/C6 ratio in the critical radius for DFT-D3.
- Requires at least three parameters: *s8*, *a1*, and *a2*.
- The parameters *s6*, *s9*, and *alpha6* can be adjusted as well.
- - ``d3zero``:
- Original DFT-D3 damping function, based on a variant proposed by Chai and Head-Gordon.
- Requires at least two parameters: *s8* and *sr6*.
- The parameters *s6*, *s9*, *sr8*, and *alpha6* can be adjusted as well.
- - ``d3mbj``:
- Modified version of the rational damping parameters. The functional form of the
- damping function is *unmodified* with respect to the original rational damping scheme.
- However, for a number of functionals new parameters were introduced.
- Requires at least three parameters: *s8*, *a1*, and *a2*.
- The parameters *s6*, *s9*, and *alpha6* can be adjusted as well.
- - ``d3mzero``:
- Modified zero damping function for DFT-D3. This scheme adds an additional offset
- parameter to the zero damping scheme of the original DFT-D3.
- Requires at least three parameters: *s8*, *sr6*, and *beta*.
- The parameters *s6*, *s9*, *sr8*, and *alpha6* can be adjusted as well.
- - ``d3op``:
- Optimized power version of the rational damping function for DFT-D3.
- The functional form of the damping function is modified by adding an additional
- zero-damping like power function.
- Requires at least four parameters: *s8*, *a1*, *a2*, and *beta*.
- The parameters *s6*, *s9*, and *alpha6* can be adjusted as well.
-
- All damping functions by default *include* the ATM three-body contributions,
- it must be explicitly disabled by setting the *s9* value to zero.
- """
-
- _defaults = {
- "name": "s-dftd3",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Check for the availability of the Python API of dftd3"""
-
- return which_import(
- "dftd3",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install a dftd3 version with enabled Python API"
- + " (e.g. conda install dftd3-python -c conda-forge)",
- )
-
- def get_version(self) -> str:
- """Return the currently used version of dftd3"""
- self.found(raise_error=True)
-
- which_prog = which_import("dftd3")
- if which_prog not in self.version_cache:
- import dftd3
-
- self.version_cache[which_prog] = safe_version(dftd3.__version__)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: AtomicInput, config: TaskConfig) -> AtomicResult:
- """
- Actual interface to the dftd3 package. The compute function is just a thin
- wrapper around the native QCSchema interface of the dftd3 Python-API.
- """
- self.found(raise_error=True)
- if parse_version(self.get_version()) < parse_version("0.5.1"):
- raise ResourceError("QCEngine's dftd3 wrapper requires version 0.5.1 or greater.")
-
- import dftd3
- from dftd3.qcschema import run_qcschema
-
- # strip engine hint
- input_data = input_model.dict()
- method = input_model.model.method
- if method.startswith("d3-"):
- method = method[3:]
- input_data["model"]["method"] = method
- qcvkey = method.upper() if method is not None else None
-
- # send `from_arrays` the s-dftd3 behavior of functional specification overrides explicit parameters specification
- # * differs from dftd3 harness behavior where parameters extend or override functional
- # * stash the resolved plan in extras or, if errored, leave it for the proper dftd3 api to reject
- param_tweaks = None if method else input_model.keywords.get("params_tweaks", None)
- try:
- planinfo = from_arrays(
- verbose=1,
- name_hint=method,
- level_hint=input_model.keywords.get("level_hint", None),
- param_tweaks=param_tweaks,
- dashcoeff_supplement=input_model.keywords.get("dashcoeff_supplement", None),
- )
- except InputError:
- pass
- else:
- input_data["extras"]["info"] = planinfo
-
- # strip dispersion level from method
- for alias, d3 in get_dispersion_aliases().items():
- if d3.startswith("d3") and method.lower().endswith(alias):
- method = method[: -(len(alias) + 1)]
- input_data["model"]["method"] = method
-
- # consolidate dispersion level aliases
- if input_model.keywords.pop("apply_qcengine_aliases", False):
- level_hint = input_model.keywords.get("level_hint", None)
- if level_hint:
- level_hint = get_dispersion_aliases()[level_hint.lower()]
- if level_hint.endswith("atm"):
- level_hint = level_hint[:-3]
- if level_hint.endswith("2b"):
- level_hint = level_hint[:-2]
- input_data["keywords"]["params_tweaks"] = {**planinfo["dashparams"], "s9": 0.0}
- input_data["keywords"]["level_hint"] = level_hint
-
- input_model = AtomicInput(**input_data)
-
- # Run the Harness
- output = run_qcschema(input_model)
-
- if "info" in output.extras:
- qcvkey = output.extras["info"]["fctldash"].upper()
-
- calcinfo = {}
- energy = output.properties.return_energy
- calcinfo["CURRENT ENERGY"] = energy
- calcinfo["DISPERSION CORRECTION ENERGY"] = energy
- if qcvkey:
- calcinfo[f"{qcvkey} DISPERSION CORRECTION ENERGY"] = energy
-
- if output.driver == "gradient":
- gradient = output.return_result
- calcinfo["CURRENT GRADIENT"] = gradient
- calcinfo["DISPERSION CORRECTION GRADIENT"] = gradient
- if qcvkey:
- calcinfo[f"{qcvkey} DISPERSION CORRECTION GRADIENT"] = gradient
-
- if output.keywords.get("pair_resolved", False):
- pw2 = output.extras["dftd3"]["additive pairwise energy"]
- pw3 = output.extras["dftd3"]["non-additive pairwise energy"]
- assert abs(pw2.sum() + pw3.sum() - energy) < 1.0e-8, f"{pw2.sum()} + {pw3.sum()} != {energy}"
- calcinfo["2-BODY DISPERSION CORRECTION ENERGY"] = pw2.sum()
- calcinfo["3-BODY DISPERSION CORRECTION ENERGY"] = pw3.sum()
- calcinfo["2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"] = pw2
- calcinfo["3-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"] = pw3
-
- output.extras["qcvars"] = calcinfo
-
- return output
diff --git a/qcengine/programs/empirical_dispersion_resources.py b/qcengine/programs/empirical_dispersion_resources.py
deleted file mode 100644
index c6f60ecc7..000000000
--- a/qcengine/programs/empirical_dispersion_resources.py
+++ /dev/null
@@ -1,1368 +0,0 @@
-"""Collect empirical dispersion parameters."""
-
-import collections
-import copy
-from typing import Dict, List, Optional, Union
-
-from ..exceptions import InputError
-from qcelemental.util import parse_version
-
-## ==> Dispersion Aliases and Parameters <== ##
-
-# The dashcoeff dict below defines the -D parameters for most of the DFT methods. Some 'd2' are
-# taken from already defined functionals in psi4. Other parameters taken from the
-# references indicated in the "citation" parameter. The remainder of the parameters are
-# from http://toc.uni-muenster.de/DFTD3/ on September 25, 2012, with the dict keys
-# translated from Turbomole to Psi4 functional names.
-# Note: most DSD-functionals have their dispersion correction defined in dict_dh_funcs.py
-dashcoeff = {
- "d2": {
- "formal": "D2",
- "alias": ["d"],
- "description": " Grimme's -D2 Dispersion Correction",
- "citation": " Grimme, S. (2006), J. Comp. Chem., 27: 1787-1799\n",
- "bibtex": "Grimme:2006:1787",
- "default": collections.OrderedDict([("s6", 1.0), ("alpha6", 20.0), ("sr6", 1.1)]),
- "definitions": {
- "blyp": {"params": {"s6": 1.2, "alpha6": 20.0, "sr6": 1.1}},
- "bp86": {"params": {"s6": 1.05, "alpha6": 20.0, "sr6": 1.1}},
- "b97": {"params": {"s6": 1.25, "alpha6": 20.0, "sr6": 1.1}}, # formerly b97-d
- "revpbe": {
- "params": {"s6": 1.25, "alpha6": 20.0, "sr6": 1.1},
- "citation": " S. Grimme, J. Antony, S. Ehrlich, H. Krieg, J. Chem. Phys 132, 154104, 2010\n",
- },
- "pbe": {"params": {"s6": 0.75, "alpha6": 20.0, "sr6": 1.1}},
- "tpss": {"params": {"s6": 1.0, "alpha6": 20.0, "sr6": 1.1}},
- "b3lyp": {"params": {"s6": 1.05, "alpha6": 20.0, "sr6": 1.1}},
- "pbe0": {"params": {"s6": 0.6, "alpha6": 20.0, "sr6": 1.1}},
- "pw6b95": {"params": {"s6": 0.5, "alpha6": 20.0, "sr6": 1.1}},
- "tpss0": {
- "params": {"s6": 0.85, "alpha6": 20.0, "sr6": 1.1},
- "citation": " S. Grimme, J. Antony, S. Ehrlich, H. Krieg, J. Chem. Phys 132, 154104, 2010\n",
- },
- "b2plyp": {"params": {"s6": 0.55, "alpha6": 20.0, "sr6": 1.1}},
- "b2gpplyp": {"params": {"s6": 0.4, "alpha6": 20.0, "sr6": 1.1}},
- "dsd-blyp": {"params": {"s6": 0.41, "alpha6": 60.0, "sr6": 1.1}},
- "core-dsd-blyp": {"params": {"s6": 0.41, "alpha6": 60.0, "sr6": 1.1}},
- },
- },
- "d3zeroatm": {
- "formal": "D3ATM",
- "alias": [],
- "description": " Grimme's -D3 (zero-damping) Dispersion Correction with ATM",
- "citation": " Grimme S.; Antony J.; Ehrlich S.; Krieg H. (2010), J. Chem. Phys., 132: 154104\n",
- "bibtex": "Grimme:2010:154104",
- "default": collections.OrderedDict(
- [("s6", 1.0), ("s8", 0.0), ("sr6", 1.0), ("alpha6", 14.0), ("sr8", 1.0), ("s9", 1.0)]
- ),
- "definitions": {
- # D3 parameters loaded from d3zero2b and from authoritative source below and s9 parameter added
- },
- },
- "d3zero2b": {
- "formal": "D3",
- "alias": ["d3", "d3zero", "d32b"],
- "description": " Grimme's -D3 (zero-damping) Dispersion Correction",
- "citation": " Grimme S.; Antony J.; Ehrlich S.; Krieg H. (2010), J. Chem. Phys., 132: 154104\n",
- "bibtex": "Grimme:2010:154104",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 0.0), ("sr6", 1.0), ("alpha6", 14.0), ("sr8", 1.0)]),
- "definitions": {
- # S. Grimme, J. Antony, S. Ehrlich, H. Krieg, J. Chem. Phys 132, 154104, 2010
- # 'b2plyp' : {'s6': 0.5, 's8': 1.000, 'sr6': 1.332, 'alpha6': 14.0}, # superseded by a value below.
- "pw6b95": {"params": {"s6": 1.0, "s8": 0.862, "sr6": 1.532, "alpha6": 14.0, "sr8": 1.000}},
- "b97": {"params": {"s6": 1.0, "s8": 0.909, "sr6": 0.892, "alpha6": 14.0, "sr8": 1.000}}, # formerly b97-d
- "b3lyp": {"params": {"s6": 1.0, "s8": 1.703, "sr6": 1.261, "alpha6": 14.0, "sr8": 1.000}},
- "blyp": {"params": {"s6": 1.0, "s8": 1.682, "sr6": 1.094, "alpha6": 14.0, "sr8": 1.000}},
- "tpss0": {"params": {"s6": 1.0, "s8": 1.242, "sr6": 1.252, "alpha6": 14.0, "sr8": 1.000}},
- "pbe0": {"params": {"s6": 1.0, "s8": 0.928, "sr6": 1.287, "alpha6": 14.0, "sr8": 1.000}},
- "tpss": {"params": {"s6": 1.0, "s8": 1.105, "sr6": 1.166, "alpha6": 14.0, "sr8": 1.000}},
- "pbe": {"params": {"s6": 1.0, "s8": 0.722, "sr6": 1.217, "alpha6": 14.0, "sr8": 1.000}},
- "bp86": {"params": {"s6": 1.0, "s8": 1.683, "sr6": 1.139, "alpha6": 14.0, "sr8": 1.000}},
- # Later references
- "rpw86pbe": {
- "params": {"s6": 1.0, "s8": 0.901, "sr6": 1.224, "alpha6": 14.0, "sr8": 1.000},
- "citation": " S. Grimme, S. Ehrlich, L. Goerigk, J. Comput. Chem. 32, 1456-1465, 2011\n",
- },
- "b2plyp": {
- "params": {"s6": 0.64, "s8": 1.022, "sr6": 1.427, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, J. Chem. Theory Comput. 7, 291-309, 2011\n",
- },
- "b2gpplyp": {
- "params": {"s6": 0.56, "s8": 0.760, "sr6": 1.586, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, J. Chem. Theory Comput. 7, 291-309, 2011\n",
- },
- "pwpb95": {
- "params": {"s6": 0.82, "s8": 0.705, "sr6": 1.557, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, J. Chem. Theory Comput. 7, 291-309, 2011\n",
- },
- "dsd-blyp": {
- "params": {"s6": 0.50, "s8": 0.705, "sr6": 1.569, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, J. Chem. Theory Comput. 7, 291-309, 2011\n",
- },
- "bpbe": {
- "params": {"s6": 1.0, "s8": 2.033, "sr6": 1.087, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "opbe": {
- "params": {"s6": 1.0, "s8": 2.055, "sr6": 0.837, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "olyp": {
- "params": {"s6": 1.0, "s8": 1.764, "sr6": 0.806, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "mpwlyp": {
- "params": {"s6": 1.0, "s8": 1.098, "sr6": 1.239, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "bmk": {
- "params": {"s6": 1.0, "s8": 2.168, "sr6": 1.931, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "m05-2x": {
- "params": {"s6": 1.0, "s8": 0.00, "sr6": 1.417, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "m05": {
- "params": {"s6": 1.0, "s8": 0.595, "sr6": 1.373, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "m06-2x": {
- "params": {"s6": 1.0, "s8": 0.00, "sr6": 1.619, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "m06": {
- "params": {"s6": 1.0, "s8": 0.00, "sr6": 1.325, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "m06-l": {
- "params": {"s6": 1.0, "s8": 0.00, "sr6": 1.581, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "b3pw91": {
- "params": {"s6": 1.0, "s8": 1.775, "sr6": 1.176, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "bhlyp": {
- "params": {"s6": 1.0, "s8": 1.442, "sr6": 1.370, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "b1b95": {
- "params": {"s6": 1.0, "s8": 1.868, "sr6": 1.613, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "mpw1b95": {
- "params": {"s6": 1.0, "s8": 1.118, "sr6": 1.605, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "mpwb1k": {
- "params": {"s6": 1.0, "s8": 1.061, "sr6": 1.671, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "tpssh": {
- "params": {"s6": 1.0, "s8": 1.219, "sr6": 1.223, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "scan": {
- "params": {"s6": 1.0, "s8": 0.000, "sr6": 1.324, "alpha6": 14.0, "sr8": 1.000},
- "citation": " J.G. Brandenburg, J. E. Bates, J. Sun, J.P. Perdew, Phys. Rev. B 94, 115144, 2016\n",
- },
- "m11-l": {
- "params": {"s6": 1.0, "s8": 1.1129, "sr6": 2.3933, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "mn12-l": {
- "params": {"s6": 1.0, "s8": 0.9622, "sr6": 2.2329, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "n12": {
- "params": {"s6": 1.0, "s8": 2.3916, "sr6": 1.3493, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "sogga11-x": {
- "params": {"s6": 1.0, "s8": 1.8151, "sr6": 1.5431, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "m11": {
- "params": {"s6": 1.0, "s8": 0.6244, "sr6": 2.2300, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "mn12-sx": {
- "params": {"s6": 1.0, "s8": 0.8205, "sr6": 1.9572, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "n12-sx": {
- "params": {"s6": 1.0, "s8": 1.4713, "sr6": 1.4597, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "hse06": {
- "params": {"s6": 1.0, "s8": 0.1090, "sr6": 1.1290, "alpha6": 14.0, "sr8": 1.000},
- "citation": " J. Moellmann, S. Grimme, J. Chem. Phys. C 118, 7615-7621, 2014\n",
- },
- "wb97x": {
- "params": {"s6": 1.0, "s8": 1.0, "sr6": 1.281, "alpha6": 14.0, "sr8": 1.094},
- "citation": " Y.-S. Lin, G.-D. Li, S.-P. Mao, J.-D. Chai, Chem. Theory Comput. 9, 263-272, 2013\n",
- },
- "pbehpbe": {
- "params": {"s6": 1.0, "s8": 1.4010, "sr6": 1.5703, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "rpbe": {
- "params": {"s6": 1.0, "s8": 0.5140, "sr6": 0.8720, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "xlyp": {
- "params": {"s6": 1.0, "s8": 0.7447, "sr6": 0.9384, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pw91p86": {
- "params": {"s6": 1.0, "s8": 0.8747, "sr6": 2.1040, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpwpw91": {
- "params": {"s6": 1.0, "s8": 1.9467, "sr6": 1.3725, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "hcth407": {
- "params": {"s6": 1.0, "s8": 2.7694, "sr6": 4.0426, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pkzb": {
- "params": {"s6": 1.0, "s8": 0.0000, "sr6": 0.6327, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "revtpss": {
- "params": {"s6": 1.0, "s8": 1.3666, "sr6": 1.3491, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "thcth": {
- "params": {"s6": 1.0, "s8": 0.5662, "sr6": 0.9320, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mn15-l": {
- "params": {"s6": 1.0, "s8": 0.0000, "sr6": 3.3388, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b3p86": {
- "params": {"s6": 1.0, "s8": 1.1961, "sr6": 1.1897, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b1p96": {
- "params": {"s6": 1.0, "s8": 1.1209, "sr6": 1.1815, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b1lyp": {
- "params": {"s6": 1.0, "s8": 1.9467, "sr6": 1.3725, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw1lyp": {
- "params": {"s6": 1.0, "s8": 1.9529, "sr6": 2.0512, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw1pw91": {
- "params": {"s6": 1.0, "s8": 1.4758, "sr6": 1.2892, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pw1pw": {
- "params": {"s6": 1.0, "s8": 1.1786, "sr6": 1.4968, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw1kcis": {
- "params": {"s6": 1.0, "s8": 2.2917, "sr6": 1.7231, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpwkcis1k": {
- "params": {"s6": 1.0, "s8": 1.7553, "sr6": 1.4853, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pbeh1pbe": {
- "params": {"s6": 1.0, "s8": 1.0430, "sr6": 1.3719, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pbe1kcis": {
- "params": {"s6": 1.0, "s8": 1.7934, "sr6": 3.6355, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "x3lyp": {
- "params": {"s6": 1.0, "s8": 0.2990, "sr6": 1.0000, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "o3lyp": {
- "params": {"s6": 1.0, "s8": 1.8058, "sr6": 1.4060, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b97-1": {
- "params": {"s6": 1.0, "s8": 1.6418, "sr6": 3.7924, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b97-2": {
- "params": {"s6": 1.0, "s8": 2.4661, "sr6": 1.7066, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b98": {
- "params": {"s6": 1.0, "s8": 1.9078, "sr6": 2.6895, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "hiss": {
- "params": {"s6": 1.0, "s8": 0.7615, "sr6": 1.3338, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "hse03": {
- "params": {"s6": 1.0, "s8": 1.0156, "sr6": 1.3944, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "revtpssh": {
- "params": {"s6": 1.0, "s8": 1.2504, "sr6": 1.3224, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "revtpss0": {
- "params": {"s6": 1.0, "s8": 1.0649, "sr6": 1.2881, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "tpss1kcis": {
- "params": {"s6": 1.0, "s8": 2.0902, "sr6": 1.7729, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "thcthhyb": {
- "params": {"s6": 1.0, "s8": 1.6302, "sr6": 1.5001, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "m08-hx": {
- "params": {"s6": 1.0, "s8": 0.0000, "sr6": 1.6247, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "lcwhpbe": {
- "params": {"s6": 1.0, "s8": 1.2797, "sr6": 1.3846, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw2plyp": {
- "params": {"s6": 0.66, "s8": 0.7529, "sr6": 1.5527, "alpha6": 14.0, "sr8": 1.000},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pbe0-dh": {
- "params": {"s6": 0.840, "s8": 0.748, "sr6": 1.394, "alpha6": 14.0, "sr8": 1.000},
- "citation": " D. Bousquet, E. Bremond, J. C. Sancho-Garcia, I. Ciofini, C. Adamo, Theor. Chem. Acc. 134, 1602, 2015\n",
- },
- # https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/functionals
- "pwb6k": {"params": {"s6": 1.0, "s8": 0.550, "sr6": 1.660, "alpha6": 14.0, "sr8": 1.000}},
- "revpbe": {"params": {"s6": 1.0, "s8": 1.010, "sr6": 0.923, "alpha6": 14.0, "sr8": 1.000}},
- "bop": {"params": {"s6": 1.0, "s8": 1.975, "sr6": 0.929, "alpha6": 14.0, "sr8": 1.000}},
- "otpss": {"params": {"s6": 1.0, "s8": 1.494, "sr6": 1.128, "alpha6": 14.0, "sr8": 1.000}},
- "pbe38": {"params": {"s6": 1.0, "s8": 0.998, "sr6": 1.333, "alpha6": 14.0, "sr8": 1.000}},
- "pbesol": {"params": {"s6": 1.0, "s8": 0.612, "sr6": 1.345, "alpha6": 14.0, "sr8": 1.000}},
- "revssb": {"params": {"s6": 1.0, "s8": 0.560, "sr6": 1.221, "alpha6": 14.0, "sr8": 1.000}},
- "ssb": {"params": {"s6": 1.0, "s8": 0.663, "sr6": 1.215, "alpha6": 14.0, "sr8": 1.000}},
- "cam-b3lyp": {"params": {"s6": 1.0, "s8": 1.217, "sr6": 1.378, "alpha6": 14.0, "sr8": 1.000}},
- "wpbe": {"params": {"s6": 1.0, "s8": 1.279, "sr6": 1.355, "alpha6": 14.0, "sr8": 1.000}}, # formerly lcwpbe
- "m06-hf": {"params": {"s6": 1.0, "s8": 0.00, "sr6": 1.446, "alpha6": 14.0, "sr8": 1.000}},
- "hcth120": {"params": {"s6": 1.0, "s8": 1.206, "sr6": 1.221, "alpha6": 14.0, "sr8": 1.000}},
- "ptpss": {"params": {"s6": 0.75, "s8": 0.879, "sr6": 1.541, "alpha6": 14.0, "sr8": 1.000}},
- "revpbe0": {"params": {"s6": 1.0, "s8": 0.792, "sr6": 0.949, "alpha6": 14.0, "sr8": 1.000}},
- "revpbe38": {"params": {"s6": 1.0, "s8": 0.862, "sr6": 1.021, "alpha6": 14.0, "sr8": 1.000}},
- # unreferenced
- "hf": {"params": {"s6": 1.0, "s8": 1.746, "sr6": 1.158, "alpha6": 14.0, "sr8": 1.000}},
- },
- },
- "d3bjatm": {
- "formal": "D3(BJ)ATM",
- "alias": [],
- "description": " Grimme's -D3 (BJ-damping) Dispersion Correction with ATM",
- "citation": " Grimme S.; Ehrlich S.; Goerigk L. (2011), J. Comput. Chem., 32: 1456\n",
- "bibtex": "Grimme:2011:1456",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 1.0), ("a1", 0.0), ("a2", 1.0), ("s9", 1.0)]),
- "definitions": {
- # D3 parameters loaded from d3bj2b and from authoritative source below and s9 parameter added
- },
- },
- "d3bj2b": {
- "formal": "D3(BJ)",
- "alias": ["d3bj"],
- "description": " Grimme's -D3 (BJ-damping) Dispersion Correction",
- "citation": " Grimme S.; Ehrlich S.; Goerigk L. (2011), J. Comput. Chem., 32: 1456\n",
- "bibtex": "Grimme:2011:1456",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 1.0), ("a1", 0.0), ("a2", 1.0)]),
- "definitions": {
- # S. Grimme, S. Ehrlich, L. Goerigk, J. Comput. Chem. 7, 3297-3305, 2011
- "pbe": {"params": {"s6": 1.000, "s8": 0.7875, "a1": 0.4289, "a2": 4.4407}},
- "revpbe": {"params": {"s6": 1.000, "s8": 2.3550, "a1": 0.5238, "a2": 3.5016}},
- "blyp": {"params": {"s6": 1.000, "s8": 2.6996, "a1": 0.4298, "a2": 4.2359}},
- "bp86": {"params": {"s6": 1.000, "s8": 3.2822, "a1": 0.3946, "a2": 4.8516}},
- "rpw86pbe": {"params": {"s6": 1.000, "s8": 1.3845, "a1": 0.4613, "a2": 4.5062}},
- "b97": {"params": {"s6": 1.000, "s8": 2.2609, "a1": 0.5545, "a2": 3.2297}}, # formerly b97-d
- "tpss": {"params": {"s6": 1.000, "s8": 1.9435, "a1": 0.4535, "a2": 4.4752}},
- "b3lyp": {"params": {"s6": 1.000, "s8": 1.9889, "a1": 0.3981, "a2": 4.4211}},
- "pw6b95": {"params": {"s6": 1.000, "s8": 0.7257, "a1": 0.2076, "a2": 6.3750}},
- "pbe0": {"params": {"s6": 1.000, "s8": 1.2177, "a1": 0.4145, "a2": 4.8593}},
- "tpss0": {"params": {"s6": 1.000, "s8": 1.2576, "a1": 0.3768, "a2": 4.5865}},
- # 'b2plyp' : {'params': {'s6': 0.500, 's8': 1.0860, 'a1': 0.3451, 'a2': 4.7735}}, # superseded by a value below.
- "hf": {"params": {"s6": 1.000, "s8": 0.9171, "a1": 0.3385, "a2": 2.8830}},
- # Later references
- "bpbe": {
- "params": {"s6": 1.000, "s8": 4.0728, "a1": 0.4567, "a2": 4.3908},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "opbe": {
- "params": {"s6": 1.000, "s8": 3.3816, "a1": 0.5512, "a2": 2.9444},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "olyp": {
- "params": {"s6": 1.000, "s8": 2.6205, "a1": 0.5299, "a2": 2.8065},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "mpwlyp": {
- "params": {"s6": 1.000, "s8": 2.0077, "a1": 0.4831, "a2": 4.5323},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "b3pw91": {
- "params": {"s6": 1.000, "s8": 2.8524, "a1": 0.4312, "a2": 4.4693},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "bhlyp": {
- "params": {"s6": 1.000, "s8": 1.0354, "a1": 0.2793, "a2": 4.9615},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "b1b95": {
- "params": {"s6": 1.000, "s8": 1.4507, "a1": 0.2092, "a2": 5.5545},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "mpw1b95": {
- "params": {"s6": 1.000, "s8": 1.0508, "a1": 0.1955, "a2": 6.4177},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "mpwb1k": {
- "params": {"s6": 1.000, "s8": 0.9499, "a1": 0.1474, "a2": 6.6223},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "tpssh": {
- "params": {"s6": 1.000, "s8": 2.2382, "a1": 0.4529, "a2": 4.6550},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "bmk": {
- "params": {"s6": 1.000, "s8": 2.0860, "a1": 0.1940, "a2": 5.9197},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "b2plyp": {
- "params": {"s6": 0.640, "s8": 0.9147, "a1": 0.3065, "a2": 5.0570},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "b2gpplyp": {
- "params": {"s6": 0.560, "s8": 0.2597, "a1": 0.0000, "a2": 6.3332},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "pwpb95": {
- "params": {"s6": 0.820, "s8": 0.2904, "a1": 0.0000, "a2": 7.3141},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "dsd-blyp": {
- "params": {"s6": 0.500, "s8": 0.2130, "a1": 0.0000, "a2": 6.0519},
- "citation": " L. Goerigk, S. Grimme, Phys. Chem. Chem. Phys. 13, 6670-6688, 2011\n",
- },
- "hse06": {
- "params": {"s6": 1.000, "s8": 2.3100, "a1": 0.3830, "a2": 5.6850},
- "citation": " J. Moellmann, S. Grimme, J. Chem. Phys. C 118, 7615-7621, 2014\n",
- },
- "pw91": {
- "params": {"s6": 1.000, "s8": 1.9598, "a1": 0.6319, "a2": 4.5718},
- "citation": " J.R. Reimers et al., Proc. Natl. Acad. Sci. USA 112, E6101-E6110, 2015\n",
- },
- "m11-l": {
- "params": {"s6": 1.000, "s8": 0.4446, "a1": 0.0000, "a2": 7.2496},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "mn12-l": {
- "params": {"s6": 1.000, "s8": 2.2674, "a1": 0.0000, "a2": 9.1494},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "n12": {
- "params": {"s6": 1.000, "s8": 4.8491, "a1": 0.3842, "a2": 5.3545},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "sogga11-x": {
- "params": {"s6": 1.000, "s8": 1.1426, "a1": 0.1330, "a2": 5.7381},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "m11": {
- "params": {"s6": 1.000, "s8": 2.8112, "a1": 0.0000, "a2": 10.1389},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "mn12-sx": {
- "params": {"s6": 1.000, "s8": 1.1674, "a1": 0.0983, "a2": 8.0259},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "n12-sx": {
- "params": {"s6": 1.000, "s8": 2.4900, "a1": 0.3283, "a2": 5.7898},
- "citation": " L. Goerigk, J. Phys. Chem. Lett. 6, 3891-3896, 2015\n",
- },
- "scan": {
- "params": {"s6": 1.000, "s8": 0.0000, "a1": 0.5380, "a2": 5.4200},
- "citation": " J.G. Brandenburg, J. E. Bates, J. Sun, J.P. Perdew, Phys. Rev. B 94, 115144, 2016\n",
- },
- "pbehpbe": {
- "params": {"s6": 1.000, "s8": 1.1152, "a1": 0.0000, "a2": 4.4407},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "rpbe": {
- "params": {"s6": 1.000, "s8": 0.8318, "a1": 0.1820, "a2": 4.0094},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "xlyp": {
- "params": {"s6": 1.000, "s8": 1.5669, "a1": 0.0809, "a2": 5.3166},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpwpw91": {
- "params": {"s6": 1.000, "s8": 0.3168, "a1": 0.3168, "a2": 4.7732},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "hcth407": {
- "params": {"s6": 1.000, "s8": 0.6490, "a1": 0.0000, "a2": 4.8162},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "revtpss": {
- "params": {"s6": 1.000, "s8": 1.4023, "a1": 0.4426, "a2": 4.4723},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "thcth": {
- "params": {"s6": 1.000, "s8": 1.2626, "a1": 0.0000, "a2": 5.6162},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b3p86": {
- "params": {"s6": 1.000, "s8": 3.3211, "a1": 0.4601, "a2": 4.9294},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b1p86": {
- "params": {"s6": 1.000, "s8": 3.5681, "a1": 0.4724, "a2": 4.9858},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b1lyp": {
- "params": {"s6": 1.000, "s8": 2.1167, "a1": 0.1986, "a2": 5.3875},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw1pw91": {
- "params": {"s6": 1.000, "s8": 1.8744, "a1": 0.3342, "a2": 4.9819},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw1kcis": {
- "params": {"s6": 1.000, "s8": 1.0893, "a1": 0.0576, "a2": 5.5314},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpwkcis1k": {
- "params": {"s6": 1.000, "s8": 1.2875, "a1": 0.0855, "a2": 5.8961},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pbeh1pbe": {
- "params": {"s6": 1.000, "s8": 1.4877, "a1": 0.0000, "a2": 7.0385},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pbe1kcis": {
- "params": {"s6": 1.000, "s8": 0.7688, "a1": 0.0000, "a2": 6.2794},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "x3lyp": {
- "params": {"s6": 1.000, "s8": 1.5744, "a1": 0.2022, "a2": 5.4184},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "o3lyp": {
- "params": {"s6": 1.000, "s8": 1.8171, "a1": 0.0963, "a2": 5.9940},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b97-1": {
- "params": {"s6": 1.000, "s8": 0.4814, "a1": 0.0000, "a2": 6.2279},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b97-2": {
- "params": {"s6": 1.000, "s8": 0.9448, "a1": 0.0000, "a2": 5.4603},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "b98": {
- "params": {"s6": 1.000, "s8": 0.7086, "a1": 0.0000, "a2": 6.0672},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "hiss": {
- "params": {"s6": 1.000, "s8": 1.6112, "a1": 0.0000, "a2": 7.3539},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "hse03": {
- "params": {"s6": 1.000, "s8": 1.1243, "a1": 0.0000, "a2": 6.8889},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "revtpssh": {
- "params": {"s6": 1.000, "s8": 1.4076, "a1": 0.2660, "a2": 5.3761},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "revtpss0": {
- "params": {"s6": 1.000, "s8": 1.6151, "a1": 0.2218, "a2": 5.7985},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "tpss1kcis": {
- "params": {"s6": 1.000, "s8": 1.0542, "a1": 0.0000, "a2": 6.0201},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "thcthhyb": {
- "params": {"s6": 1.000, "s8": 0.9585, "a1": 0.0000, "a2": 6.2303},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mn15": {
- "params": {"s6": 1.000, "s8": 2.0971, "a1": 0.7862, "a2": 7.5923},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "lcwhpbe": {
- "params": {"s6": 1.000, "s8": 1.1908, "a1": 0.2746, "a2": 5.3157},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "mpw2plyp": {
- "params": {"s6": 1.000, "s8": 0.6223, "a1": 0.4105, "a2": 5.0136},
- "citation": " L. Goerigk, A. Hansen, C. Bauer, S. Ehrlich, A. Najibi, S. Grimme, Phys. Chem. Chem. Phys. 19, 32184-32215, 2017\n",
- },
- "pbe0-dh": {
- "params": {"s6": 0.840, "s8": 0.095, "a1": 0.000, "a2": 6.102},
- "citation": " D. Bousquet, E. Bremond, J. C. Sancho-Garcia, I. Ciofini, C. Adamo, Theor. Chem. Acc. 134, 1602, 2015\n",
- },
- # https://www.chemie.u{'params': ni-bonn.de/pctc/mulliken-center/software/dft-d3/functiona}lsbj
- "bop": {"params": {"s6": 1.000, "s8": 3.295, "a1": 0.4870, "a2": 3.5043}},
- "cam-b3lyp": {"params": {"s6": 1.000, "s8": 2.0674, "a1": 0.3708, "a2": 5.4743}},
- "wpbe": {"params": {"s6": 1.000, "s8": 1.8541, "a1": 0.3919, "a2": 5.0897}}, # formerly lcwpbe
- "otpss": {"params": {"s6": 1.000, "s8": 2.7495, "a1": 0.4634, "a2": 4.3153}},
- "pbe38": {"params": {"s6": 1.000, "s8": 1.4623, "a1": 0.3995, "a2": 5.1405}},
- "pbesol": {"params": {"s6": 1.000, "s8": 2.9491, "a1": 0.4466, "a2": 6.1742}},
- "ptpss": {"params": {"s6": 0.750, "s8": 0.2804, "a1": 0.000, "a2": 6.5745}},
- "pwb6k": {"params": {"s6": 1.000, "s8": 0.9383, "a1": 0.1805, "a2": 7.7627}},
- "revssb": {"params": {"s6": 1.000, "s8": 0.4389, "a1": 0.4720, "a2": 4.0986}},
- "ssb": {"params": {"s6": 1.000, "s8": -0.1744, "a1": -0.0952, "a2": 5.2170}},
- "hcth120": {"params": {"s6": 1.000, "s8": 1.0821, "a1": 0.3563, "a2": 4.3359}},
- "revpbe0": {"params": {"s6": 1.000, "s8": 1.7588, "a1": 0.4679, "a2": 3.7619}},
- "revpbe38": {"params": {"s6": 1.000, "s8": 1.4760, "a1": 0.4309, "a2": 3.9446}},
- # unreferenced
- # special HF/DFT with eBSSE correction
- "hf/mixed": {"params": {"s6": 1.000, "s8": 3.9027, "a1": 0.5607, "a2": 4.5622}},
- "hf/sv": {"params": {"s6": 1.000, "s8": 2.1849, "a1": 0.4249, "a2": 4.2783}},
- "hf/minis": {"params": {"s6": 1.000, "s8": 0.9841, "a1": 0.1702, "a2": 3.8506}},
- "b3lyp/6-31gd": {"params": {"s6": 1.000, "s8": 4.0672, "a1": 0.5014, "a2": 4.8409}},
- # special HF-D3-gCP-SRB/MINIX parametrization
- "hf3c": {"params": {"s6": 1.000, "s8": 0.8777, "a1": 0.4171, "a2": 2.9149}},
- # special HF-D3-gCP-SRB2/ECP-2G parametrization
- "hf3cv": {"params": {"s6": 1.000, "s8": 0.5022, "a1": 0.3063, "a2": 3.9856}},
- # special PBEh-D3-gCP/def2-mSVP parametrization
- "pbeh3c": {"params": {"s6": 1.000, "s8": 0.0000, "a1": 0.4860, "a2": 4.5000}},
- "core-dsd-blyp": {"params": {"s6": 0.500, "s8": 0.2130, "a1": 0.0000, "a2": 6.0519}},
- },
- },
- "d3mzeroatm": {
- "formal": "D3MATM",
- "alias": [],
- "description": " Grimme's -D3 (zero-damping, short-range refitted) Dispersion Correction with ATM",
- "citation": " Grimme S.; Antony J.; Ehrlich S.; Krieg H. (2010), J. Chem. Phys., 132: 154104\n"
- + " Smith, D. G. A.; Burns, L. A.; Patkowski, K.; Sherrill, C. D. (2016), J. Phys. Chem. Lett.; 7: 2197\n",
- "bibtex": "Grimme:2010:154104",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 1.0), ("sr6", 1.0), ("beta", 1.0), ("s9", 1.0)]),
- "definitions": {
- # D3 parameters loaded from d3mzero2b and from authoritative source below and s9 parameter added
- },
- },
- "d3mzero2b": {
- "formal": "D3M",
- "alias": ["d3m", "d3mzero", "d3m2b"],
- "description": " Grimme's -D3 (zero-damping, short-range refitted) Dispersion Correction",
- "citation": " Grimme S.; Antony J.; Ehrlich S.; Krieg H. (2010), J. Chem. Phys., 132: 154104\n"
- + " Smith, D. G. A.; Burns, L. A.; Patkowski, K.; Sherrill, C. D. (2016), J. Phys. Chem. Lett.; 7: 2197\n",
- "bibtex": "Grimme:2010:154104",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 1.0), ("sr6", 1.0), ("beta", 1.0)]),
- "definitions": {
- "b2plyp": {"params": {"s6": 0.640, "s8": 0.717543, "sr6": 1.313134, "beta": 0.016035}},
- "b3lyp": {"params": {"s6": 1.000, "s8": 1.532981, "sr6": 1.338153, "beta": 0.013988}},
- "b97": {"params": {"s6": 1.000, "s8": 1.020078, "sr6": 1.151808, "beta": 0.035964}}, # formerly b97-d
- "blyp": {"params": {"s6": 1.000, "s8": 1.841686, "sr6": 1.279637, "beta": 0.014370}},
- "bp86": {"params": {"s6": 1.000, "s8": 1.945174, "sr6": 1.233460, "beta": 0.000000}},
- "pbe": {"params": {"s6": 1.000, "s8": 0.000000, "sr6": 2.340218, "beta": 0.129434}},
- "pbe0": {"params": {"s6": 1.000, "s8": 0.000081, "sr6": 2.077949, "beta": 0.116755}},
- "wpbe": {"params": {"s6": 1.000, "s8": 1.280619, "sr6": 1.366361, "beta": 0.003160}}, # formerly lcwpbe
- "sapt0": {"params": {"s6": 1.000, "s8": 0.885517, "sr6": 1.383214, "beta": 0.075488}}, # JBS 01/2021
- "hf": {"params": {"s6": 1.000, "s8": 0.885517, "sr6": 1.383214, "beta": 0.075488}}, # JBS 01/2021
- },
- },
- "d3mbjatm": {
- "formal": "D3M(BJ)ATM",
- "alias": [],
- "description": " Grimme's -D3 (BJ-damping, short-range refitted) Dispersion Correction with ATM",
- "citation": " Grimme S.; Ehrlich S.; Goerigk L. (2011), J. Comput. Chem., 32: 1456\n"
- + " Smith, D. G. A.; Burns, L. A.; Patkowski, K.; Sherrill, C. D. (2016), J. Phys. Chem. Lett.; 7: 2197\n",
- "bibtex": "Grimme:2011:1456",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("s9", 1.0)]),
- "definitions": {
- # D3 parameters loaded from d3mbj2b and from authoritative source below and s9 parameter added
- },
- },
- "d3mbj2b": {
- "formal": "D3M(BJ)",
- "alias": ["d3mbj"],
- "description": " Grimme's -D3 (BJ-damping, short-range refitted) Dispersion Correction",
- "citation": " Grimme S.; Ehrlich S.; Goerigk L. (2011), J. Comput. Chem., 32: 1456\n"
- + " Smith, D. G. A.; Burns, L. A.; Patkowski, K.; Sherrill, C. D. (2016), J. Phys. Chem. Lett.; 7: 2197\n",
- "bibtex": "Grimme:2011:1456",
- "default": collections.OrderedDict([("s6", 1.0), ("s8", 1.0), ("a1", 1.0), ("a2", 1.0)]),
- "definitions": {
- "b2plyp": {"params": {"s6": 0.640, "s8": 0.672820, "a1": 0.486434, "a2": 3.656466}},
- "b3lyp": {"params": {"s6": 1.000, "s8": 1.466677, "a1": 0.278672, "a2": 4.606311}},
- "b97": {"params": {"s6": 1.000, "s8": 1.206988, "a1": 0.240184, "a2": 3.864426}}, # formerly b97-d
- "blyp": {"params": {"s6": 1.000, "s8": 1.875007, "a1": 0.448486, "a2": 3.610679}},
- "bp86": {"params": {"s6": 1.000, "s8": 3.140281, "a1": 0.821850, "a2": 2.728151}},
- "pbe": {"params": {"s6": 1.000, "s8": 0.358940, "a1": 0.012092, "a2": 5.938951}},
- "pbe0": {"params": {"s6": 1.000, "s8": 0.528823, "a1": 0.007912, "a2": 6.162326}},
- "wpbe": {"params": {"s6": 1.000, "s8": 0.906564, "a1": 0.563761, "a2": 3.593680}}, # formerly lcwpbe
- "sapt0": {"params": {"s6": 1.000, "s8": 0.713190, "a1": 0.079541, "a2": 3.627854}}, # JBS 01/2021
- "hf": {"params": {"s6": 1.000, "s8": 0.713190, "a1": 0.079541, "a2": 3.627854}}, # JBS 01/2021
- },
- },
- "d3opatm": {
- "formal": "D3(op)ATM",
- "alias": [],
- "description": " D3 dispersion correction with optimized power damping function with ATM. Based on rational damping function and additional zero-damping like power function.",
- "citation": " S. Grimme, S. Ehrlich, and L. Goerigk., Comput. Chem., 32:1456–1465, 2011. doi:10.1002/jcc.21759.\n"
- + " Jonathon Witte, Narbe Mardirossian, Jeffrey B Neaton, and Martin Head-Gordon., J. Chem. Theory Comput., 13(5):2043–2052, 2017. doi:10.1021/acs.jctc.7b00176.\n",
- "bibtex": "Grimme:2011:1456",
- "default": collections.OrderedDict(
- [("s6", 1.0), ("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("beta", 0.0), ("s9", 1.0)]
- ),
- "definitions": {
- # D3 parameters loaded from d3op2b and from authoritative source below and s9 parameter added
- },
- },
- "d3op2b": {
- "formal": "D3(op)",
- "alias": ["d3op"],
- "description": " D3 dispersion correction with optimized power damping function. Based on rational damping function and additional zero-damping like power function.",
- "citation": " S. Grimme, S. Ehrlich, and L. Goerigk., Comput. Chem., 32:1456–1465, 2011. doi:10.1002/jcc.21759.\n"
- + " Jonathon Witte, Narbe Mardirossian, Jeffrey B Neaton, and Martin Head-Gordon., J. Chem. Theory Comput., 13(5):2043–2052, 2017. doi:10.1021/acs.jctc.7b00176.\n",
- "bibtex": "Grimme:2011:1456",
- "default": collections.OrderedDict(
- [("s6", 1.0), ("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("beta", 0.0)],
- ),
- "definitions": {
- # will be loaded later
- # From https://github.com/dftd3/simple-dftd3/blob/main/assets/parameters.toml
- },
- },
- "nl": {
- "formal": "NL",
- "alias": [],
- "description": " Grimme's -NL (DFT plus VV10 correlation) ",
- "citation": " Hujo, W.; Grimme, S; (2011), J. Chem. Theory Comput.; 7:3866\n",
- "bibtex": "Hujo:2011:3866",
- "default": collections.OrderedDict([("b", 1.0), ("c", 0.0093)]),
- "definitions": {
- "blyp": {
- "params": {"b": 4.000, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- },
- "hf": {
- "params": {"b": 3.900, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- }, # not implemented
- "revpbe": {
- "params": {"b": 3.700, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- },
- "revpbe38": {
- "params": {"b": 4.700, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- },
- "b3lyp": {
- "params": {"b": 4.800, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- },
- "b3pw91": {
- "params": {"b": 4.500, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- },
- "revpbe0": {
- "params": {"b": 4.300, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme J. Chem. Theory Comput. 7, 3866-3871, 2011\n",
- },
- "bp86": {
- "params": {"b": 4.400, "c": 0.0093},
- "citation": " M. K. Kesharwani, A. Karton, J.M. L. Martin, J. Chem. Theory Comput. 12, 444-454, 2016\n",
- }, # unclear if this is the real origin
- "pbe0": {
- "params": {"b": 6.900, "c": 0.0093},
- "citation": " M. K. Kesharwani, A. Karton, J.M. L. Martin, J. Chem. Theory Comput. 12, 444-454, 2016\n",
- }, # unclear if this is the real origin
- "pbe": {
- "params": {"b": 6.400, "c": 0.0093},
- "citation": " M. K. Kesharwani, A. Karton, J.M. L. Martin, J. Chem. Theory Comput. 12, 444-454, 2016\n",
- }, # unclear if this is the real origin
- "tpss0": {
- "params": {"b": 5.500, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme, J. Chem. Theory Comput. 9, 308-315, 2013\n",
- },
- "tpss": {
- "params": {"b": 5.000, "c": 0.0093},
- "citation": " W. Hujo, S. Grimme, J. Chem. Theory Comput. 9, 308-315, 2013\n",
- },
- "b2gpplyp": {
- "params": {"b": 9.900, "c": 0.0093},
- "citation": " M. K. Kesharwani, A. Karton, J.M. L. Martin, J. Chem. Theory Comput. 12, 444-454, 2016\n",
- },
- "b2plyp": {
- "params": {"b": 7.800, "c": 0.0093},
- "citation": " J. Calbo, E. Orti, J. C. Sancho-Garcia, J. Arago, J. Chem. Theory Comput. 11, 932-939, 1015\n",
- },
- "pwpb95": {
- "params": {"b": 11.100, "c": 0.0093},
- "citation": " F. Yu J. Chem. Theory Comput. 10, 4400-4407, 2014\n",
- },
- "revtpss": {
- "params": {"b": 5.465, "c": 0.0093},
- "citation": " H. Kruse, P. Banas, J. Sponer, JCTC 2018, 10.1021/acs.jctc.8b00643 \n",
- }, # "just accepted"
- },
- },
- "d1": {
- "formal": "D1",
- "alias": [],
- "description": " Grimme's -D1 Dispersion Correction",
- "citation": " Grimme, S. (2004), J. Comp. Chem., 25: 1463-1473\n",
- "bibtex": "Grimme:2004:1463",
- "default": collections.OrderedDict([("s6", 1.0)]),
- "definitions": {"***": {"params": {"s6": 1.0}}},
- },
- "chg": {
- "formal": "CHG",
- "alias": [],
- "description": " Chai and Head-Gordon Dispersion Correction",
- "citation": " Chai, J.-D.; Head-Gordon, M. (2010), J. Chem. Phys., 132: 6615-6620\n",
- "bibtex": "Chai:2010:6615",
- "default": collections.OrderedDict([("s6", 1.0)]),
- "definitions": {"***": {"params": {"s6": 1.0}}}, # disp->d_ = 6.0;
- },
- "das2009": {
- "formal": "DAS2009",
- "alias": [],
- "description": " Podeszwa and Szalewicz Dispersion Correction",
- "citation": " Pernal, K.; Podeszwa, R.; Patkowski, K.; Szalewicz, K. (2009), Phys. Rev. Lett., 103: 263201\n",
- "bibtex": "Pernal:2009:263201",
- "default": collections.OrderedDict([("s6", 1.0)]),
- "definitions": {"***": {"params": {"s6": 1.0}}},
- },
- "das2010": {
- "formal": "DAS2010",
- "alias": [],
- "description": " Podeszwa and Szalewicz Dispersion Correction",
- "citation": " Podeszwa, R.; Pernal, K.; Patkowski, K.; Szalewicz, K. (2010), J. Phys. Chem. Lett., 1: 550\n",
- "bibtex": "Podeszwa:2010:550",
- "default": collections.OrderedDict([("s6", 1.0)]),
- "definitions": {"***": {"params": {"s6": 1.0}}},
- },
- "atmgr": {
- "formal": "ATM(GR)",
- "alias": [],
- "description": " Grimme approximate Axilrod-Teller-Muto 3-body Dispersion Correction",
- "citation": " Grimme S.; Antony J.; Ehrlich S.; Krieg H. (2010), J. Chem. Phys., 132: 154104\n",
- "bibtex": "Grimme:2010:154104",
- "default": collections.OrderedDict([("alpha6", 14.0)]),
- "definitions": {
- "***": {"params": {"alpha6": 14.0}, "citation": ""} # alpha6 = 14 => damping parameter used is alp8 = 16
- },
- },
- "dmp2": {
- "formal": "DMP2",
- "alias": [],
- "description": " Beran's MP2D Dispersion Correction for MP2",
- "citation": " Rezac, J.; Greenwell, C.; Beran, G. (2018), J. Chem. Theory Comput., 14: 4711-4721\n",
- "bibtex": "Rezac:2018:4711",
- "doi": "10.1021/acs.jctc.8b00548",
- "default": collections.OrderedDict([("s8", 1.187), ("a1", 0.944), ("a2", 0.480), ("rcut", 0.72), ("w", 0.20)]),
- "definitions": {
- "mp2": {"params": {"s8": 1.187, "a1": 0.944, "a2": 0.480, "rcut": 0.72, "w": 0.20}} # Rezac:2018:4711
- },
- },
- "d4bjeeqatm": {
- "formal": "D4(BJ,EEQ)ATM",
- "alias": ["d4", "d4bj", "d4(bj)"],
- "description": " Grimme's -D4 (BJ-damping) Dispersion Correction with ATM",
- "citation": " Caldeweyher, E.; Ehlert, S.; Hansen, A.; Neugebauer, H.; Spicher, S.; Bannwarth, C.; Grimmme, S., J. Chem. Phys. 150, 154122 (2019)\n",
- "bibtex": "Caldeweyher:2019:154122",
- "doi": "10.1063/1.5090222150",
- "default": collections.OrderedDict(
- [
- ("a1", 1.0),
- ("a2", 1.0),
- ("alp", 16.0),
- ("s6", 1.0),
- ("s8", 1.0),
- ("s9", 1.0),
- ("ga", 3.0),
- ("gc", 2.0),
- ("wf", 6.0),
- ]
- ),
- "definitions": {
- # D4 parameters loaded below from authoritative source below. Keep a couple for reference
- # "b3lyp": {"params": {"a1": 0.40868035, "a2": 4.53807137, "alp": 16.0, "s6": 1.0, "s8": 2.02929367, "s9": 1.0}},
- # "pbe": {"params": {"a1": 0.38574991, "a2": 4.80688534, "alp": 16.0, "s6": 1.0, "s8": 0.95948085, "s9": 1.0}},
- },
- },
-}
-
-try:
- from dftd4 import __version__ as d4_version
-
- new_d4_api = parse_version(d4_version) >= parse_version("3.5.0")
-except (ModuleNotFoundError, ImportError):
- new_d4_api = False
-
-# different defaults for dftd4 versions < 3.5.0
-if not new_d4_api:
- dashcoeff["d4bjeeqatm"]["default"] = collections.OrderedDict(
- [("a1", 1.0), ("a2", 1.0), ("alp", 16.0), ("s6", 1.0), ("s8", 1.0), ("s9", 1.0)]
- )
-
-# for d3*atm, only skeleton entries with metadata defined above. below copies in parameters from d3*2b
-for d in ["d3zero", "d3bj", "d3mzero", "d3mbj", "d3op"]:
- for k, v in dashcoeff[d + "2b"]["definitions"].items():
- dashcoeff[d + "atm"]["definitions"][k] = copy.deepcopy(dashcoeff[d + "2b"]["definitions"][k])
- dashcoeff[d + "atm"]["definitions"][k]["params"][
- "s9"
- ] = 1.0 # set twice: this one adds s9 to the params list for atm
-
-
-def _get_d4bj_definitions() -> dict:
- """DFTD4 provides access to damping parameters on per functional basis.
- But we want all of them.
-
- We let DFTD4 take care of finding and loading the parameter file,
- but to get all parameters, we implement the logic to read those
- parameters ourselves again.
-
- This method is upstreamed in dftd4 >3.3.0 and could be replaced in the future.
- """
-
- try:
- from dftd4.parameters import get_data_file_name, load_data_base
- except ModuleNotFoundError:
- return {}
-
- def get_params(entry: dict, base: dict, defaults: list) -> dict:
- """Retrive the parameters from the data base, make sure the default
- values are applied correctly in the process. In case we have multiple
- defaults search for the first of the list defined for this method."""
-
- for default in defaults:
- try:
- params = base[default].copy()
- params.update(**entry[default])
- params.pop("mbd", None)
- params.pop("damping", None)
- return params
- except KeyError:
- continue
-
- raise KeyError("No entry for " + method + " in parameter data base")
-
- try:
- _data_base = load_data_base(get_data_file_name())
- except FileNotFoundError:
- return {}
-
- try:
- _defaults = _data_base["default"]["d4"]
- _base = _data_base["default"]["parameter"]["d4"]
- _parameters = _data_base["parameter"]
- except KeyError:
- return {}
-
- definitions = {}
-
- for method in _parameters:
- try:
- _entry = _parameters[method]["d4"]
- params = get_params(_entry, _base, _defaults)
-
- citation = params.pop("doi", None)
- # Make Psi4's citation style checker happy
- if citation is not None:
- citation = " " + citation + "\n"
- definitions[method] = dict(
- params=params,
- citation=citation,
- )
- except KeyError:
- continue
-
- # defaults ga, gc, wf are not in the toml parameter file and need to be provided by qcengine
- if new_d4_api:
- for entry in definitions.keys():
- definitions[entry]["params"]["ga"] = 3.0
- definitions[entry]["params"]["gc"] = 2.0
- definitions[entry]["params"]["wf"] = 6.0
-
- return definitions
-
-
-dashcoeff["d4bjeeqatm"]["definitions"].update(_get_d4bj_definitions())
-
-try:
-
- def _get_d3_definitions(dashlevel: str) -> dict:
- """
- Lucky for us dftd3 provides access to all damping parameters directly.
-
- However, we are not happy with the structure of the dict and
- therefore do some restructuring. The below solution tries to bend
- the data returned by dftd3 into the right shape to make qcng happy.
- """
-
- from dftd3.parameters import get_all_damping_params
-
- # The names here are the subset allowed by qcng with the names used in dftd3
- allowed = {
- "bj": ["a1", "a2", "s6", "s8", "s9"],
- "zero": ["rs6", "rs8", "alp", "s6", "s8", "s9"],
- "mbj": ["a1", "a2", "s6", "s8", "s9"],
- "mzero": ["rs6", "rs8", "alp", "s6", "s8", "bet", "s9"],
- "op": ["a1", "a2", "s6", "s8", "bet", "s9"],
- }
- # mapping from dftd3 to qcng names, also, we have to reverse it later again
- rename = {
- "rs6": "sr6",
- "rs8": "sr8",
- "alp": "alpha6",
- "bet": "beta",
- }
-
- # FIXME: dict comprehension at its finest
- #
- # 1. insert an additional level each method
- # 2. filter parameter names accepted by qcng
- # 3. map from dftd3 to qcng names
- # 4. return the whole mess
- return {
- key: {
- "params": {
- rename.get(param, param): value for param, value in params.items() if param in allowed[dashlevel]
- }
- }
- for key, params in get_all_damping_params([dashlevel]).items()
- }
-
- dashcoeff["d3bjatm"]["definitions"].update(_get_d3_definitions("bj"))
- dashcoeff["d3zeroatm"]["definitions"].update(_get_d3_definitions("zero"))
- dashcoeff["d3mbjatm"]["definitions"].update(_get_d3_definitions("mbj"))
- dashcoeff["d3mzeroatm"]["definitions"].update(_get_d3_definitions("mzero"))
- dashcoeff["d3opatm"]["definitions"].update(_get_d3_definitions("op"))
-
- for d in ["d3zero", "d3bj", "d3mzero", "d3mbj", "d3op"]:
- for k, v in dashcoeff[d + "atm"]["definitions"].items():
- dashcoeff[d + "atm"]["definitions"][k]["params"][
- "s9"
- ] = 1.0 # set twice: this one establishes 1.0 if upstream is still 0.0 (pre v0.7.0 simple-dftd3)
-
-except ModuleNotFoundError:
- pass
-
-
-def get_dispersion_aliases():
- """Returns dict where keys are all (lowercased) strings that are
- interpretable as dashlevels, and values are the keys dealiased
- (d->d2) and deformalized (d3(bj)->d3bj) into valid dashcoeff keys.
-
- """
- alias = {}
- for dash, ddash in dashcoeff.items():
- alias[dash] = dash
- alias[ddash["formal"].lower()] = dash
- for al in ddash["alias"]:
- alias[al] = dash
-
- return alias
-
-
-def from_arrays(
- name_hint: Optional[str] = None,
- level_hint: Optional[str] = None,
- param_tweaks: Union[List[float], Dict[str, float]] = None,
- dashcoeff_supplement: Optional[Dict[str, Dict]] = None,
- verbose: int = 1,
-):
- """Use the three paths of empirical dispersion parameter information
- (DFT functional, dispersion correction level, and particular
- parameters) to populate the parameter array and validate a
- "functional-dispersion" label.
-
- Parameters
- ----------
- name_hint
- Name of functional (func only, func & disp, or disp only) for
- which to compute dispersion (e.g., blyp, BLYP-D2, blyp-d3bj,
- blyp-d3(bj), hf+d). Any or all parameters initialized from
- `dashcoeff[dashlevel][functional-without-dashlevel]` or
- `dashcoeff_supplement[dashlevel][functional-with-dashlevel]
- can be overwritten via `param_tweaks`.
- level_hint
- Name of dispersion correction to be applied (e.g., d, D2,
- d3(bj), das2010). Must be key in `dashcoeff` or "alias" or
- "formal" to one.
- param_tweaks
- Values for the same keys as `dashcoeff[dashlevel]['default']`
- (and same order if list) used to override any or all values
- initialized by `name_hint`. Extra parameters will error.
- dashcoeff_supplement
- Dictionary of the same structure as `dashcoeff` that contains
- in "definitions" field full functional names, rather than
- fctl less dashlvl. Used to validate dict_builder fctls with
- dispersion or identify disp level from just `name_hint`.
- verbose
- Amount of printing.
-
- Returns
- -------
- dict
- Metadata defining dispersion calculation.
-
- dashlevel : {'d1', 'd2', 'd3zero2b', 'd3bj2b', 'd3mzero2b', 'd3mbj2b', 'd3op2b', 'd3zeroatm', 'd3bjatm', 'd3mzeroatm', 'd3mbjatm', 'd3opatm', 'chg', 'das2009', 'das2010', 'nl', "d4bjeeqatm"}
- Name (de-aliased, de-formalized, lowercase) of dispersion
- correction -- atom data, dispersion model, damping functional
- form -- to be applied. Resolved from `name_hint` and/or
- `level_hint` into a key of `dashparam.dashcoeff`.
- dashparams : dict
- Complete (number and parameter names vary by `dashlevel`)
- set of parameter values defining the flexible parts
- of `dashlevel`. Resolved into a complete set (keys of
- dashcoeff[dashlevel]['default']) from `name_hint` and/or
- `dashcoeff_supplement` and/or user `param_tweaks`.
- fctldash : str
- If `dashparams` for `dashlevel` corresponds to a defined,
- named, untweaked "functional-dashlevel" set, then that
- label. Otherwise, empty string.
- dashparams_citation : str
- If `dashparams` for `dashlevel` corresponds to a defined,
- named, untweaked "functional-dashlevel" set, and that
- parameter set has a literature citation, then that
- citation. Otherwise, empty string.
-
- Notes
- -----
- * No parameter is required, but somewhere the dispersion level and
- intended parameters must be clear. Explicit contradictory info will
- cause an error.
- * Function intended to be idempotent.
-
- """
- try:
- # try/except block retrofits Psi4 for pre-2b/atm-split in dashcoeff
- import psi4
-
- if "d3bj" in psi4.procrouting.empirical_dispersion._engine_can_do["dftd3"]:
- psi4.procrouting.empirical_dispersion._engine_can_do["dftd3"] = [
- "d2",
- "d3zero2b",
- "d3bj2b",
- "d3mzero2b",
- "d3mbj2b",
- ]
- for d in ["d3zero", "d3bj", "d3mzero", "d3mbj"]:
- psi4.procrouting.empirical_dispersion._capable_engines_for_disp[
- d + "2b"
- ] = psi4.procrouting.empirical_dispersion._capable_engines_for_disp.pop(d)
- except ImportError:
- pass
-
- if verbose > 1:
- print(
- "empirical_dispersion_resources.from_arrays HINTS:",
- name_hint,
- level_hint,
- param_tweaks,
- bool(dashcoeff_supplement),
- )
-
- # << 0 >> prep
- if dashcoeff_supplement is not None:
- supplement_dashlevel_lookup = {}
- for disp, ddisp in dashcoeff_supplement.copy().items():
- for func, params in ddisp["definitions"].items():
- try:
- dashcoeff[disp]
- except KeyError:
- # try/except block accommodates dashcoeff_supplement from pre-2b/atm-split in dashcoeff
- disp = get_dispersion_aliases()[disp]
- dashcoeff_supplement[disp] = ddisp
- if params["params"].keys() != dashcoeff[disp]["default"].keys():
- if verbose > 2:
- print(
- "Warning: trouble in dict_builder def:",
- func,
- params["params"].keys(),
- "!=",
- dashcoeff[disp]["default"].keys(),
- )
- else:
- supplement_dashlevel_lookup[func] = disp
-
- # << 1 >> use name_hint and/or level_hint to determine intended dispersion level
- if name_hint is None and level_hint is None:
- raise InputError(
- """Can't guess -D level without name_hint ({}) or level_hint ({})""".format(name_hint, level_hint)
- )
-
- if level_hint is None:
- dashlevel_candidate_1 = None
- else:
- level_hint = level_hint.lower()
- try:
- dashlevel_candidate_1 = get_dispersion_aliases()[level_hint]
- except KeyError:
- raise InputError(
- """Requested -D correction level ({}) not among ({})""".format(level_hint, dashcoeff.keys())
- )
-
- if name_hint is None:
- dashlevel_candidate_2 = None
- name_key = None
- disp_params = {}
- else:
- name_hint = name_hint.lower()
- trial_split = name_hint.rsplit("-", 1)
-
- if name_hint in get_dispersion_aliases():
- dashlevel_candidate_2 = get_dispersion_aliases()[name_hint]
- if list(dashcoeff[dashlevel_candidate_2]["definitions"]) == ["***"]:
- # case disp-only fctl-indep: chg, atmgr
- name_key = "***"
- disp_params = dashcoeff[dashlevel_candidate_2]["definitions"][name_key]["params"]
- else:
- # case disp-only: d3, d3zero, d3(bj)
- name_key = None
- disp_params = {}
- elif (dashcoeff_supplement is not None) and name_hint in supplement_dashlevel_lookup:
- # case fctldisp: wb97x-d, hf+d
- dashlevel_candidate_2 = supplement_dashlevel_lookup[name_hint]
- name_key = name_hint
- disp_params = dashcoeff_supplement[dashlevel_candidate_2]["definitions"][name_hint]["params"]
- elif (
- len(trial_split) == 2
- and trial_split[1] in get_dispersion_aliases()
- and trial_split[0] in dashcoeff[get_dispersion_aliases()[trial_split[1]]]["definitions"]
- ):
- # case fctldisp: b3lyp-d3, b3lyp-d3zero, b3lyp-d3(bj)
- dashlevel_candidate_2 = get_dispersion_aliases()[trial_split[1]]
- name_key = trial_split[0]
- disp_params = dashcoeff[dashlevel_candidate_2]["definitions"][trial_split[0]]["params"]
- elif (
- len(trial_split) == 2
- and trial_split[1] in get_dispersion_aliases()
- and list(dashcoeff[get_dispersion_aliases()[trial_split[1]]]["definitions"]) == ["***"]
- ):
- # case fctldisp: asdf-chg, pbe-atmgr
- dashlevel_candidate_2 = get_dispersion_aliases()[trial_split[1]]
- name_key = "***"
- disp_params = dashcoeff[dashlevel_candidate_2]["definitions"][name_key]["params"]
- elif (level_hint is not None) and name_hint in dashcoeff[dashlevel_candidate_1]["definitions"]:
- # case fctl: b3lyp
- dashlevel_candidate_2 = None
- name_key = name_hint
- disp_params = dashcoeff[dashlevel_candidate_1]["definitions"][name_hint]["params"]
- elif name_hint == "":
- dashlevel_candidate_2 = None
- name_key = None
- disp_params = {}
- # elif ((level_hint is not None) and list(dashcoeff[get_dispersion_aliases()[level_hint]]['definitions']) == ['***']):
- # dashlevel_candidate_2 = get_dispersion_aliases()[level_hint]
- # name_key = '***'
- # disp_params = dashcoeff[dashlevel_candidate_2]['definitions'][name_key]['params']
- else:
- # dashlevel_candidate_2 = None
- raise InputError("""Can't guess -D correction level from ({})""".format(name_hint))
-
- disp_params = copy.deepcopy(disp_params)
-
- if dashlevel_candidate_1 is None and dashlevel_candidate_2 is None:
- raise InputError(
- f"""Can't guess -D correction level from name_hint ({name_hint}) and level_hint ({level_hint})"""
- )
- elif dashlevel_candidate_1 is not None and dashlevel_candidate_2 is not None:
- if dashlevel_candidate_1 != dashlevel_candidate_2:
- raise InputError(
- f"""Inconsistent -D correction level ({dashlevel_candidate_2} != {dashlevel_candidate_1}) from name_hint ({name_hint}) and level_hint ({level_hint})"""
- )
- dashleveleff = dashlevel_candidate_1 or dashlevel_candidate_2
-
- allowed_params = dashcoeff[dashleveleff]["default"].keys()
-
- # << 2 >> use name_hint and/or param_tweaks to determine intended dispersion parameters
- if name_hint is None and param_tweaks is None:
- raise InputError(
- """Can't guess -D parameters without name_hint ({}) or param_tweaks ({})""".format(name_hint, param_tweaks)
- )
-
- if isinstance(param_tweaks, list):
- param_tweaks = dict(zip(allowed_params, param_tweaks))
-
- if param_tweaks is None:
- param_tweaks = {}
-
- if not set(param_tweaks.keys()).issubset(allowed_params):
- raise InputError(
- "Requested keys ({}) not among allowed ({}) for dispersion level ({})".format(
- list(param_tweaks.keys()), list(allowed_params), dashleveleff
- )
- )
-
- disp_params.update(param_tweaks)
-
- if disp_params.keys() != allowed_params:
- raise InputError(
- "Requested keys ({}) insufficient ({}) for dispersion level ({})".format(
- list(param_tweaks.keys()), list(allowed_params), dashleveleff
- )
- )
-
- # << 3 >> use final dashlevel and disp_params to determine if a defined "fctl-disp" label exists
- # * plucks any citation for the parameters from definition source
- # * if/elif chooses right label when some fctls have identical param sets
- if (
- (name_hint is not None)
- and (dashcoeff_supplement is not None)
- and (name_key in dashcoeff_supplement[dashleveleff]["definitions"])
- and (disp_params == dashcoeff_supplement[dashleveleff]["definitions"][name_key]["params"])
- ):
- citeff = dashcoeff_supplement[dashleveleff]["definitions"][name_key].get("citation", "")
- if name_key == "***":
- fctldasheff = ""
- else:
- fctldasheff = name_key
- elif name_hint not in [None, ""] and (disp_params == dashcoeff[dashleveleff]["definitions"][name_key]["params"]):
- citeff = dashcoeff[dashleveleff]["definitions"][name_key].get("citation", "")
- if name_key == "***":
- fctldasheff = dashcoeff[dashleveleff]["formal"].lower()
- else:
- fctldasheff = "-".join([name_key, dashcoeff[dashleveleff]["formal"].lower()])
- else:
- if dashcoeff_supplement is not None:
- for func, params in dashcoeff_supplement[dashleveleff]["definitions"].items():
- if disp_params == params["params"]:
- fctldasheff = func
- citeff = params.get("citation", "")
- break
-
- for func, params in dashcoeff[dashleveleff]["definitions"].items():
- if disp_params == params["params"]:
- fctldasheff = "-".join([func, dashcoeff[dashleveleff]["formal"].lower()])
- citeff = params.get("citation", "")
- break
- else:
- fctldasheff = ""
- citeff = ""
-
- # TODO right now fctldasheff is empty if undefined. use '-dash' or 'custom dash' instead?
- # TODO right now citation is empty if undefined. remove key or use None or False instead?
-
- if verbose > 1:
- print(
- f"empirical_dispersion_resources.from_arrays RESOLVED: dashlevel={dashleveleff}, dashparams={disp_params}, fctldash={fctldasheff}, dashparams_citation={citeff}"
- )
-
- return {
- "dashlevel": dashleveleff,
- "dashparams": disp_params,
- "fctldash": fctldasheff,
- "dashparams_citation": citeff,
- }
diff --git a/qcengine/programs/gamess/__init__.py b/qcengine/programs/gamess/__init__.py
deleted file mode 100644
index daacff7f3..000000000
--- a/qcengine/programs/gamess/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .runner import GAMESSHarness
diff --git a/qcengine/programs/gamess/germinate.py b/qcengine/programs/gamess/germinate.py
deleted file mode 100644
index a653b784d..000000000
--- a/qcengine/programs/gamess/germinate.py
+++ /dev/null
@@ -1,58 +0,0 @@
-from typing import Any, Dict
-
-from qcengine.exceptions import InputError
-
-
-def muster_modelchem(method: str, derint: int) -> Dict[str, Any]:
- """Converts the QC method into GAMESS keywords."""
-
- method = method.lower()
- opts = {}
-
- runtyp = {
- 0: "energy",
- 1: "gradient",
- 2: "hessian",
- #'properties': 'prop',
- }[derint]
-
- opts["contrl__runtyp"] = runtyp
-
- if method == "gamess":
- pass
-
- elif method in ["scf", "hf"]:
- pass
-
- # opts['contrl__mplevl'] = 0
- # opts['contrl__cityp'] = 'none'
- # opts['contrl__cctyp'] = 'none'
-
- elif method == "mp2":
- opts["contrl__mplevl"] = 2
-
- elif method == "lccd":
- opts["contrl__cctyp"] = "lccd"
-
- elif method == "ccd":
- opts["contrl__cctyp"] = "ccd"
-
- elif method == "ccsd":
- opts["contrl__cctyp"] = "ccsd"
-
- elif method in ["ccsd+t(ccsd)", "ccsd(t)"]:
- opts["contrl__cctyp"] = "ccsd(t)"
-
- elif method == "pbe":
- opts["contrl__dfttyp"] = "pbe"
-
- elif method == "b3lyp":
- opts["contrl__dfttyp"] = "b3lypv1r"
-
- elif method == "b3lyp5":
- opts["contrl__dfttyp"] = "b3lyp"
-
- else:
- raise InputError(f"Method not recognized: {method}")
-
- return opts
diff --git a/qcengine/programs/gamess/harvester.py b/qcengine/programs/gamess/harvester.py
deleted file mode 100644
index 1597dbd05..000000000
--- a/qcengine/programs/gamess/harvester.py
+++ /dev/null
@@ -1,680 +0,0 @@
-"""Compute quantum chemistry using Iowa State's GAMESS executable."""
-
-import logging
-import pprint
-import re
-from decimal import Decimal
-from typing import Dict, Optional, Tuple
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.models import Molecule
-from qcelemental.molparse import regex
-
-from ..util import PreservingDict, load_hessian
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-logger = logging.getLogger(__name__)
-
-
-def harvest(
- in_mol: Molecule, method: str, gamessout: str, **outfiles
-) -> Tuple[PreservingDict, Optional[np.ndarray], Optional[np.ndarray], Molecule]:
- """Parses all the pieces of output from gamess: the stdout in
- *gamessout* Scratch files are not yet considered at this moment.
- """
- qcvars, calc_mol, calc_grad, module = harvest_output(gamessout)
-
- datasections = {}
- if outfiles.get("gamess.dat"):
- datasections = harvest_datfile(outfiles["gamess.dat"])
-
- calc_hess = None
- if "$HESS" in datasections:
- calc_hess = load_hessian(datasections["$HESS"], dtype="gamess")
- if np.count_nonzero(calc_hess) == 0:
- calc_hess = None
-
- # Sometimes the hierarchical setting of CURRENT breaks down
- if method == "ccsd+t(ccsd)":
- qcvars["CURRENT CORRELATION ENERGY"] = qcvars["CCSD+T(CCSD) CORRELATION ENERGY"]
- qcvars["CURRENT ENERGY"] = qcvars["CCSD+T(CCSD) TOTAL ENERGY"]
-
- if calc_mol:
- qcvars["NUCLEAR REPULSION ENERGY"] = str(round(calc_mol.nuclear_repulsion_energy(), 8))
- if in_mol:
- if abs(calc_mol.nuclear_repulsion_energy() - in_mol.nuclear_repulsion_energy()) > 1.0e-3:
- raise ValueError(
- f"""GAMESS outfile (NRE: {calc_mol.nuclear_repulsion_energy()}) inconsistent with AtomicInput.molecule (NRE: {in_mol.nuclear_repulsion_energy()})."""
- )
-
- # Frame considerations
- # * `in_mol` built with deliberation and with all fields accessible.
- # * `calc_mol` has the internally consistent geometry frame but otherwise dinky (geom & symbols & maybe chgmult).
- if in_mol.fix_com and in_mol.fix_orientation:
- # Impose input frame if important as signalled by fix_*=T
- return_mol = in_mol
- _, data = calc_mol.align(in_mol, atoms_map=False, mols_align=True, run_mirror=True, verbose=0)
- mill = data["mill"]
-
- else:
- return_mol, _ = in_mol.align(calc_mol, atoms_map=False, mols_align=True, run_mirror=True, verbose=0)
- mill = qcel.molutil.compute_scramble(
- len(in_mol.symbols), do_resort=False, do_shift=False, do_rotate=False, do_mirror=False
- ) # identity AlignmentMill
-
- return_grad = None
- if calc_grad is not None:
- return_grad = mill.align_gradient(calc_grad)
-
- return_hess = None
- if calc_hess is not None:
- return_hess = mill.align_hessian(np.array(calc_hess))
-
- else:
- raise ValueError("""No coordinate information extracted from gamess output.""")
-
- return qcvars, return_hess, return_grad, return_mol, module
-
-
-def harvest_datfile(datfile: str) -> Dict[str, str]:
- sections = datfile.split(r"$END")
- goodies = {}
-
- for i, sec in enumerate(sections):
- lsec = sec.split("\n")
- for iln, ln in enumerate(lsec):
- if ln.strip():
- key = ln.strip()
- break
- goodies[key] = "\n".join(lsec[iln + 1 :])
-
- return goodies
-
-
-def harvest_output(outtext):
- """Function to separate portions of a gamess output file *outtext*,
- divided by "Step".
- """
- pass_qcvar = []
- pass_coord = []
- pass_grad = []
-
- for outpass in re.split(
- # fmt: off
- r"^\s+" + r"--------" + r"NSERCH:" + r"([1-9][0-9][0-9][0-9]*)" + r"\s*" +
- r"^\s+" + r"--------",
- # fmt: on
- outtext,
- re.MULTILINE,
- ):
- qcvar, gamesscoord, gamessgrad, module = harvest_outfile_pass(outpass)
- pass_qcvar.append(qcvar)
- pass_coord.append(gamesscoord)
- pass_grad.append(gamessgrad)
-
- retindx = -1 if pass_coord[-1] else -2
- return pass_qcvar[retindx], pass_coord[retindx], pass_grad[retindx], module
-
-
-def harvest_outfile_pass(outtext):
- """Function to read gamess output file *outtext* and parse important
- quantum chemical information from it in
- """
- qcvar = PreservingDict()
- qcvar_coord = None
- qcvar_grad = None
- module = None
-
- NUMBER = r"(?x:" + regex.NUMBER + ")"
-
- # If calculation fail to converge
- mobj = re.search(r"^\s+" + r"(?:GAMESS TERMINATED ABNORMALLY)" + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("GAMESS TERMINATED ABNORMALLY")
-
- # If calculation converged
- else:
- mobj = re.search(
- r"^\s+" + r"(?: TOTAL ENERGY)" + r"\s+=\s*" + NUMBER + r"s*$", outtext, re.MULTILINE
- )
- if mobj:
- logger.debug("matched gamess_RHF energy")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["SCF TOTAL ENERGY"] = mobj.group(1)
-
- # Process NRE
- mobj = re.search(
- r"^\s+" + r"(?: NUCLEAR REPULSION ENERGY)" + r"\s+=\s*" + NUMBER + r"\s*$", outtext, re.MULTILINE
- )
- if mobj:
- logger.debug("matched NRE")
- qcvar["NUCLEAR REPULSION ENERGY"] = mobj.group(1)
-
- # Process calcinfo
- mobj = re.search(
- # fmt: off
- r"^\s+" + r"NUMBER OF OCCUPIED ORBITALS \(ALPHA\)" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"NUMBER OF OCCUPIED ORBITALS \(BETA \)" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"TOTAL NUMBER OF ATOMS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched calcinfo")
- qcvar["N ALPHA ELECTRONS"] = mobj.group("nao")
- qcvar["N BETA ELECTRONS"] = mobj.group("nbo")
-
- mobj = re.search(
- # fmt: off
- r"^\s+" + r"TOTAL NUMBER OF MOS IN VARIATION SPACE=" + r"\s+" + r"(?P\d+)" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched calcinfo 2")
- qcvar["N MOLECULAR ORBITALS"] = mobj.group("nmo")
- qcvar["N BASIS FUNCTIONS"] = mobj.group("nmo") # TODO BAD
- else:
- mobj2 = re.search(
- # fmt: off
- r"^\s+" + r"NUMBER OF CORE -A- ORBITALS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"NUMBER OF CORE -B- ORBITALS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"NUMBER OF OCC. -A- ORBITALS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"NUMBER OF OCC. -B- ORBITALS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"NUMBER OF MOLECULAR ORBITALS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"NUMBER OF BASIS FUNCTIONS" + r"\s+=\s+" + r"(?P\d+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj2:
- logger.debug("matched calcinfo 3")
- qcvar["N ALPHA ELECTRONS"] = mobj2.group("occ_nao")
- qcvar["N BETA ELECTRONS"] = mobj2.group("occ_nbo")
- qcvar["N MOLECULAR ORBITALS"] = mobj2.group("nmo")
- qcvar["N BASIS FUNCTIONS"] = mobj2.group("nbf")
-
- # Process MP2
- mobj = re.search(
- # fmt: off
- r"^\s+" + r"MP2 CONTROL INFORMATION" + r"\s*" +
- r"^\s+" + r"-+" + r"\s*" +
- r"^\s+" + r"NACORE" + r"\s+=\s+" + r"\d+" + r"\s+" + r"NBCORE" + r"\s+=\s+" + r"\d+" + r"\s*" +
- r"^\s+" + r"LMOMP2" + r"\s+=\s+" + r"\w+" + r"\s+" + r"AOINTS" + r"\s+=\s+" + r"\w+" + r"\s*" +
- r"^\s+" + r"METHOD" + r"\s+=\s+" + r"\d+" + r"\s+" + r"NWORD" + r"\s+=\s+" + r"\d+" + r"\s*" +
- r"^\s+" + r"MP2PRP" + r"\s+=\s+" + r"\w+" + r"\s+" + r"OSPT" + r"\s+=\s+" + r"\w+"+ r"\s*" +
- r"^\s+" + r"CUTOFF" + r"\s+=\s+" + NUMBER + r"\s+" + r"CPHFBS" + r"\s+=\s+" + r"\w+"+ r"\s*" +
- r"^\s+" + r"CODE" + r"\s+=\s+" + r"(?P\w+)" + r"\s*",
- # Oct 2023: terminating `$` removed from `+ r"\s*$",` to allow it to match gamess 2021
- # and gamess 2023 that has both `CODE` and `SCSPT` on the line.
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 module")
- module = mobj.group("code").lower()
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'RESULTS OF MOLLER-PLESSET 2ND ORDER CORRECTION ARE\n'
- r'^\s+' + r'E\(0\)' + r'=\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(1\)' + r'=\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2\)' + r'=\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(MP2\)' + r'=\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 a")
- qcvar["MP2 CORRELATION ENERGY"] = mobj.group(3)
- qcvar["MP2 TOTAL ENERGY"] = mobj.group(4)
- mobj3 = re.search(r"\s+[RU]HF\s*SCF\s*CALCULATION", outtext, re.MULTILINE)
- if mobj3:
- qcvar[f"MP2 DOUBLES ENERGY"] = mobj.group(3)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'RESULTS OF 2ND-ORDER ZAPT CORRECTION' + r'\s*' +
- r'^\s+' + r'E\(HF\) ' + r'=\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(ZAPT\) ' + r'=\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'-----------------------------------' + r'\s*' +
- r'^\s+' + r'E\(MP2\) ' + r'=\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 b")
- qcvar["ZAPT2 CORRELATION ENERGY"] = mobj.group(2)
- qcvar["ZAPT2 TOTAL ENERGY"] = mobj.group(3)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'RESULTS OF MOLLER-PLESSET 2ND ORDER CORRECTION ARE\n'
- r'^\s+' + r'E\(0\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(1\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(MP2\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'SPIN-COMPONENT-SCALED MP2 RESULTS ARE' + r'\s*' +
- r'^\s+' + r'E\(2S\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2T\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2ST\)=' + r'\s+' + NUMBER + r'\s*',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 rhf c")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["MP2 SINGLES ENERGY"] = mobj.group(2)
- qcvar["MP2 DOUBLES ENERGY"] = mobj.group(3)
- qcvar["MP2 TOTAL ENERGY"] = mobj.group(4)
- qcvar["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(5)
- qcvar["MP2 SAME-SPIN CORRELATION ENERGY"] = mobj.group(6)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'SINGLE EXCITATION CONTRIBUTION' + r'\s*' +
- r'^\s+' + r'ALPHA' + r'\s*' + NUMBER + r'\s*' +
- r'^\s+' + r'BETA' + r'\s*' + NUMBER + r'\s*' +
- r'^\s+' + r'DOUBLE EXCITATION CONTRIBUTION' + r'\s*' +
- r'^\s+' + NUMBER + r'\s*' +
- r'^\s+' +
- r'^\s+' + r'RESULTS OF MOLLER-PLESSET 2ND ORDER CORRECTION ARE' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 rohf d")
- qcvar["MP2 SINGLES ENERGY"] = Decimal(mobj.group(1)) + Decimal(mobj.group(2))
- qcvar["MP2 DOUBLES ENERGY"] = mobj.group(3)
-
- mobj = re.search(r"^\s+" + "UHF-MP2 CALCULATION", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched mp2 uhf e")
- qcvar["MP2 SINGLES ENERGY"] = "0.0"
-
- mobj = re.search(
- # fmt: off
- r"^\s+" + r"E\(SCF\)" + r"\s*=\s+" + NUMBER + r"\s*" +
- r"^\s+" + r"ZAPT E\(2\)" + r"\s*=\s+" + NUMBER + r"\s*" +
- r"^\s+" + r"E\(MP2\)" + r"\s*=\s+" + NUMBER + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 rohf f")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["MP2 CORRELATION ENERGY"] = mobj.group(2)
- qcvar["MP2 TOTAL ENERGY"] = mobj.group(3)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'RESULTS OF MOLLER-PLESSET 2ND ORDER CORRECTION ARE\n'
- r'^\s+' + r'E\(SCF\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(1\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(MP2\)=' + r'\s+' + NUMBER + r'\s*',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 g llel")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["MP2 SINGLES ENERGY"] = mobj.group(2)
- qcvar["MP2 DOUBLES ENERGY"] = mobj.group(3)
- qcvar["MP2 CORRELATION ENERGY"] = mobj.group(3)
- qcvar["MP2 TOTAL ENERGY"] = mobj.group(4)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'RESULTS OF MOLLER-PLESSET 2ND ORDER CORRECTION ARE\n'
- r'^\s+' + r'E\(SCF\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(MP2\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'SPIN-COMPONENT-SCALED MP2 RESULTS ARE' + r'\s*' +
- r'^\s+' + r'E\(2S\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2T\)=' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'E\(2ST\)=' + r'\s+' + NUMBER + r'\s*',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched mp2 rhf h llel")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["MP2 SINGLES ENERGY"] = "0.0"
- qcvar["MP2 DOUBLES ENERGY"] = mobj.group(2)
- qcvar["MP2 CORRELATION ENERGY"] = mobj.group(2)
- qcvar["MP2 TOTAL ENERGY"] = mobj.group(3)
- qcvar["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(4)
- qcvar["MP2 SAME-SPIN CORRELATION ENERGY"] = mobj.group(5)
-
- # Process CCSD
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'SUMMARY OF RESULTS' + r'\s+' + r'\n' +
- r'^\s+' + r'REFERENCE ENERGY:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'MBPT\(2\) ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r"(?PCCSD|LCCD|CCD)" + r"\s+" r'ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched rhf ccsd/lccd/ccd")
- mtd = mobj.group("mtd")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["SCF TOTAL ENERGY"] = mobj.group(1)
- qcvar["MP2 CORRELATION ENERGY"] = mobj.group(3)
- qcvar["MP2 DOUBLES ENERGY"] = mobj.group(3)
- qcvar["MP2 TOTAL ENERGY"] = mobj.group(2)
- qcvar[f"{mtd} DOUBLES ENERGY"] = mobj.group(6)
- qcvar[f"{mtd} CORRELATION ENERGY"] = mobj.group(6)
- qcvar[f"{mtd} TOTAL ENERGY"] = mobj.group(5)
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'SUMMARY OF CCSD RESULTS' + r'\s+' + r'\n' +
- r'^\s+' + r'REFERENCE ENERGY:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CCSD ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR. E=\s+' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched rohf ccsd")
- qcvar["SCF TOTAL ENERGY"] = mobj.group(1)
- qcvar["CCSD CORRELATION ENERGY"] = mobj.group(3)
- qcvar["CCSD TOTAL ENERGY"] = mobj.group(2)
-
- # Process CR-CC(2,3)
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'CCSD ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CR-CC\(2,3\),A OR CCSD\(2\)_T ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CR-CC\(2,3\) OR CR-CCSD\(T\)_L ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched cc-cr(2,3)")
- qcvar["CCSD TOTAL ENERGY"] = mobj.group(1)
- qcvar["CCSD CORRELATION ENERGY"] = mobj.group(2)
- qcvar["CR-CC(2,3),A TOTAL ENERGY"] = mobj.group(3)
- qcvar["CR-CC(2,3),A CORRELATION ENERGY"] = mobj.group(4)
- qcvar["CR-CC(2,3) TOTAL ENERGY"] = mobj.group(5)
- qcvar["CR-CC(2,3) CORRELATION ENERGY"] = mobj.group(6)
-
- # Process CCSD(T)
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'SUMMARY OF RESULTS' + r'\s+' + r'\n' +
- r'^\s+' + r'REFERENCE ENERGY:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'MBPT\(2\) ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CCSD ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CCSD\[T\] ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CCSD\(T\) ENERGY:' + r'\s+' + NUMBER + r'\s*' + r'CORR.E=\s+' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched ccsd(t)")
- qcvar["HF TOTAL ENERGY"] = mobj.group(1)
- qcvar["SCF TOTAL ENERGY"] = mobj.group(1)
- qcvar["CCSD CORRELATION ENERGY"] = mobj.group(5)
- qcvar["CCSD TOTAL ENERGY"] = mobj.group(4)
- qcvar["(T) CORRECTION ENERGY"] = Decimal(mobj.group(8)) - Decimal(mobj.group(4))
- # qcvar['CCSD(T) CORRELATION ENERGY'] = Decimal(mobj.group(5)) - qcvar['SCF TOTAL ENERGY']
- qcvar["CCSD+T(CCSD) CORRELATION ENERGY"] = mobj.group(7)
- qcvar["CCSD+T(CCSD) TOTAL ENERGY"] = mobj.group(6)
- qcvar["CCSD(T) CORRELATION ENERGY"] = mobj.group(9)
- qcvar["CCSD(T) TOTAL ENERGY"] = mobj.group(8)
-
- # Process CISD
- mobj = re.search(
- # fmt: off
- r"^\s+" + r"PROPERTY VALUES FOR THE " + r"(RHF|ROHF)" + r"\s+" + r"SELF-CONSISTENT FIELD WAVEFUNCTION" + r"\s*" +
- r"(?:.*?)" +
- r"^\s+" + r"ENERGY COMPONENTS" + r"\s*" +
- r"(?:.*?)" +
- r"^\s*" + r"(TOTAL ENERGY =)\s+" + r"(?P" + NUMBER + r")" + r"\s*" +
- r"(?:.*?)" +
- r"^\s+" + r"(?P(FSOCI|GUGA))" + r"\s+" + r"CI PROPERTIES...FOR THE WAVEFUNCTION OF STATE 1" + r"\s*" +
- r"(?:.*?)" +
- r"^\s+" + r"ENERGY COMPONENTS" + r"\s*" +
- r"(?:.*?)" +
- r"^\s*" + r"(TOTAL ENERGY =)\s+" + r"(?P" + NUMBER + r")" + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched cisd fsoci/guga", mobj.groupdict())
- module = mobj.group("module").lower()
- qcvar["CISD CORRELATION ENERGY"] = Decimal(mobj.group("ci")) - Decimal(mobj.group("hf"))
- qcvar["CISD TOTAL ENERGY"] = mobj.group("ci")
- qcvar["CI TOTAL ENERGY"] = mobj.group("ci")
-
- # Process FCI
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'ALDET CI PROPERTIES...FOR THE WAVEFUNCTION OF STATE' + r'\s+' + r'(?P\d+)' + r'\s*' +
- r'^\s+' + r'USING THE EXPECTATION VALUE DENSITY' + r'\s*' +
- r'(?:.*?)' +
- r'^\s+' + r'TOTAL ENERGY =' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched fci")
- qcvar["FCI TOTAL ENERGY"] = mobj.group(2)
- qcvar["CI TOTAL ENERGY"] = mobj.group(2)
-
- # Process EOM-CCSD
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'---- SUMMARY OF EOM-CCSD CALCULATIONS ----' +
- r'\s+' + r'\n' +
- r'^\s+' + r'EXCITATION EXCITATION TOTAL' + r'\s*' +
- r'^\s+' + r'SYMMETRY ENERGY \(H\) ENERGY \(EV\) ENERGY \(H\) ITERATIONS' + r'\s*' +
- r'^\s+' + r'A' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + r'CONVERGED\s+' +
- r'^\s+' + r'A' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + r'CONVERGED\s+' +
- r'^\s+' + r'A' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + r'CONVERGED\s+' +
- r'^\s+' + r'A' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + r'CONVERGED\s+',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched eom-ccsd")
- qcvar["EOM-CCSD ROOT 1 EXCITATION ENERGY"] = mobj.group(1)
- qcvar["EOM-CCSD ROOT 2 EXCITATION ENERGY"] = mobj.group(4)
- qcvar["EOM-CCSD ROOT 3 EXCITATION ENERGY"] = mobj.group(7)
- qcvar["EOM-CCSD ROOT 4 EXCITATION ENERGY"] = mobj.group(10)
- qcvar["EOM-CCSD ROOT 1 TOTAL ENERGY"] = mobj.group(3)
- qcvar["EOM-CCSD ROOT 2 TOTAL ENERGY"] = mobj.group(6)
- qcvar["EOM-CCSD ROOT 3 TOTAL ENERGY"] = mobj.group(9)
- qcvar["EOM-CCSD ROOT 4 TOTAL ENERGY"] = mobj.group(12)
-
- # Process DFT
- # mobj = re.search(
- # r'^\s+' + r'DFT EXCHANGE + CORRELATION ENERGY' + r'=\s+' + NUMBER + r'\s*$'
- # ,outtext, re.MULTILINE)
- mobj = re.search(
- r"^\s+" + r"DFT EXCHANGE \+ CORRELATION ENERGY" + r"\s+=\s*" + NUMBER + r"\s*$", outtext, re.MULTILINE
- )
- if mobj:
- logger.debug("matched dft xc")
- qcvar["DFT XC ENERGY"] = mobj.group(1)
-
- # Process Geometry
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'ATOM ATOMIC COORDINATES \(BOHR\)' + r'\s*' +
- r'^\s+' + r'CHARGE X Y Z'+ r'\s*' +
- r'((?:\s+([A-Za-z]\w*)\s+\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s*\n)+)' +
- r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj:
- logger.debug("matched geom")
- molxyz = "%d bohr\n\n" % len(mobj.group(1).splitlines())
- for line in mobj.group(1).splitlines():
- lline = line.split()
- chg_on_center = int(float(lline[-4]))
- if chg_on_center > 0:
- tag = f"{lline[-5]}"
- else:
- tag = f"@{lline[-5].strip()}"
- molxyz += "%s %16s %16s %16s\n" % (tag, lline[-3], lline[-2], lline[-1])
- qcvar_coord = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"], dtype=2
- ),
- )
-
- # Process Gradient
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'GRADIENT OF THE ENERGY' + r'\s*'+
- r'^\s+' + r'----------------------' + r'\s*'+
- r'\s+' + r'\n'+
- r'^\s+' + r'UNITS ARE HARTREE/BOHR E\'X E\'Y E\'Z' + r'\s*' +
- r'((?:\s+([1-9][0-9]*)+\s+([A-Za-z]\w*)+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s*\n)+)' +
- r'\s*$',
- # fmt: off
- outtext, re.MULTILINE
- )
- if mobj:
- logger.debug("matched gradient - after")
- atoms = []
- qcvar_grad = []
- for line in mobj.group(1).splitlines():
- lline = line.split()
- if lline == []:
- pass
- else:
- logger.debug("printing gradient")
- atoms.append(lline[1])
- qcvar_grad.append([float(lline[-3]), float(lline[-2]), float(lline[-1])])
- qcvar_grad = np.array(qcvar_grad).reshape((-1, 3))
-
- # Process SCF blocks
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'PROPERTIES FOR THE .* DFT FUNCTIONAL .* DENSITY MATRIX' +
- r'(.*)' +
- r'\.\.\.\.\.\. END OF PROPERTY EVALUATION \.\.\.\.\.\.',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched dft props")
- prop_block = mobj.group(1)
- mobj_energy = re.search(
- # fmt: off
- r'\s+ENERGY COMPONENTS\s*\n' +
- r'\s+-----------------\s*\n' +
- r'\s*\n' +
- r'\s+WAVEFUNCTION NORMALIZATION =.*\n' +
- r'\s*\n' +
- r'\s+ONE ELECTRON ENERGY =\s+' + NUMBER + r'\n' +
- r'\s+TWO ELECTRON ENERGY =\s+' + NUMBER + r'\n' +
- r'\s+NUCLEAR REPULSION ENERGY =\s+' + NUMBER + r'\n' +
- r'\s+------------------\s*\n' +
- r'\s+TOTAL ENERGY =\s+' + NUMBER+r'\n',
- # fmt: on
- prop_block
- )
- if mobj_energy:
- qcvar["ONE-ELECTRON ENERGY"] = mobj_energy.group(1)
- qcvar["TWO-ELECTRON ENERGY"] = mobj_energy.group(2)
- qcvar["SCF TOTAL ENERGY"] = mobj_energy.group(4)
- qcvar["DFT TOTAL ENERGY"] = mobj_energy.group(4)
-
- mobj_dipole = re.search(
- # fmt: off
- r'\s+ELECTROSTATIC MOMENTS\s*\n'
- r'\s+---------------------\s*\n'
- r'\s*\n'
- r'\s*POINT\s+1\s+X\s+Y\s+Z\s+\(BOHR\)\s+CHARGE\s*\n'
- r'.*\n'
- r'\s*DX\s+DY\s+DZ\s+/D/\s+\(DEBYE\)\s*\n'
- r'\s*' + NUMBER + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*\n',
- # fmt: on
- prop_block
- )
- if mobj_dipole:
- d2au = Decimal(qcel.constants.conversion_factor("debye", "e * bohr"))
- qcvar["SCF DIPOLE"] = d2au * np.array(
- [Decimal(mobj_dipole.group(1)), Decimal(mobj_dipole.group(2)), Decimal(mobj_dipole.group(3))]
- )
-
- # Process CURRENT Energies
- if "HF TOTAL ENERGY" in qcvar:
- qcvar["CURRENT REFERENCE ENERGY"] = qcvar["HF TOTAL ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["HF TOTAL ENERGY"]
-
- if "MP2 TOTAL ENERGY" in qcvar and "MP2 CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["MP2 CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["MP2 TOTAL ENERGY"]
-
- if "ZAPT2 TOTAL ENERGY" in qcvar and "ZAPT2 CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["ZAPT2 CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["ZAPT2 TOTAL ENERGY"]
-
- if "CISD TOTAL ENERGY" in qcvar and "CISD CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["CISD CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["CISD TOTAL ENERGY"]
-
- if "LCCD TOTAL ENERGY" in qcvar and "LCCD CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["LCCD CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["LCCD TOTAL ENERGY"]
-
- if "CCD TOTAL ENERGY" in qcvar and "CCD CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["CCD CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["CCD TOTAL ENERGY"]
-
- if "CCSD TOTAL ENERGY" in qcvar and "CCSD CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["CCSD CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["CCSD TOTAL ENERGY"]
-
- if "CR-CC(2,3) TOTAL ENERGY" in qcvar and "CR-CC(2,3) CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["CR-CC(2,3) CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["CR-CC(2,3) TOTAL ENERGY"]
-
- if "CCSD+T(CCSD) TOTAL ENERGY" in qcvar and "CCSD+T(CCSD) CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["CCSD+T(CCSD) CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["CCSD+T(CCSD) TOTAL ENERGY"]
-
- if "CCSD(T) TOTAL ENERGY" in qcvar and "CCSD(T) CORRELATION ENERGY" in qcvar:
- qcvar["CURRENT CORRELATION ENERGY"] = qcvar["CCSD(T) CORRELATION ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["CCSD(T) TOTAL ENERGY"]
-
- if "DFT TOTAL ENERGY" in qcvar:
- qcvar["CURRENT REFERENCE ENERGY"] = qcvar["DFT TOTAL ENERGY"]
- qcvar["CURRENT ENERGY"] = qcvar["DFT TOTAL ENERGY"]
- qcvar.pop("HF TOTAL ENERGY")
-
- if "FCI TOTAL ENERGY" in qcvar: # and 'FCI CORRELATION ENERGY' in qcvar:
- qcvar["CURRENT ENERGY"] = qcvar["FCI TOTAL ENERGY"]
-
- qcvar[f"N ATOMS"] = len(qcvar_coord.symbols)
-
- return qcvar, qcvar_coord, qcvar_grad, module
diff --git a/qcengine/programs/gamess/keywords.py b/qcengine/programs/gamess/keywords.py
deleted file mode 100644
index eb127617c..000000000
--- a/qcengine/programs/gamess/keywords.py
+++ /dev/null
@@ -1,44 +0,0 @@
-import collections
-import textwrap
-from typing import Any, Dict, Tuple
-
-
-def format_keyword(keyword: str, val: Any, lop_off: bool = True) -> Tuple[str, str]:
- """Reformat value `val` for `keyword` from python into GAMESS-speak."""
-
- text = ""
-
- # Transform booleans into Fortran booleans
- if str(val) == "True":
- text += ".true."
- elif str(val) == "False":
- text += ".false."
-
- # No Transform
- else:
- text += str(val).lower()
-
- if lop_off:
- return keyword[7:].lower(), text
- else:
- return keyword.lower(), text
-
-
-def format_keywords(keywords: Dict[str, Any]) -> str:
- """From GAMESS-directed, non-default `keywords` dictionary, write a GAMESS deck."""
-
- grouped_options = collections.defaultdict(dict)
- for group_key, val in keywords.items():
- group, key = group_key.split("__")
- grouped_options[group.lower()][key.lower()] = val
-
- grouped_lines = {}
- for group, opts in sorted(grouped_options.items()):
- line = []
- line.append(f"${group.lower()}")
- for key, val in sorted(grouped_options[group].items()):
- line.append("=".join(format_keyword(key, val, lop_off=False)))
- line.append("$end\n")
- grouped_lines[group] = textwrap.fill(" ".join(line), initial_indent=" ", subsequent_indent=" ")
-
- return "\n".join(grouped_lines.values()) + "\n"
diff --git a/qcengine/programs/gamess/runner.py b/qcengine/programs/gamess/runner.py
deleted file mode 100644
index b456dbc4d..000000000
--- a/qcengine/programs/gamess/runner.py
+++ /dev/null
@@ -1,303 +0,0 @@
-"""Compute quantum chemistry using Iowa State's GAMESS executable."""
-
-import copy
-import pprint
-from decimal import Decimal
-from typing import Any, Dict, Optional, Tuple
-
-from qcelemental.models import AtomicInput, AtomicResult, BasisSet, Provenance
-from qcelemental.util import safe_version, which
-
-from ...exceptions import InputError, UnknownError
-from ...util import execute
-from ..model import ProgramHarness
-from ..qcvar_identities_resources import build_atomicproperties, build_out
-from ..util import error_stamp
-from .germinate import muster_modelchem
-from .harvester import harvest
-from .keywords import format_keywords
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-
-
-class GAMESSHarness(ProgramHarness):
- """
-
- Notes
- -----
- Required edits to the ``rungms`` script are as follows::
- set SCR=./ # will be managed by QCEngine instead
- set USERSCR=./ # ditto
- set GMSPATH=/home/psilocaluser/gits/gamess # full path to installation
-
- """
-
- _defaults = {
- "name": "GAMESS",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": True,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "rungms",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via https://www.msg.chem.iastate.edu/GAMESS/GAMESS.html",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("rungms")
- if which_prog not in self.version_cache:
- success, output = execute([which_prog, "v.inp"], {"v.inp": ""})
-
- if success:
- for line in output["stdout"].splitlines():
- if "GAMESS VERSION" in line:
- branch = " ".join(line.strip(" *\t").split()[3:])
- self.version_cache[which_prog] = safe_version(branch)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: AtomicInput, config: "TaskConfig") -> AtomicResult:
- self.found(raise_error=True)
-
- job_inputs = self.build_input(input_model, config)
- success, dexe = self.execute(job_inputs)
-
- if "INPUT HAS AT LEAST ONE SPELLING OR LOGIC MISTAKE" in dexe["stdout"]:
- raise InputError(error_stamp(job_inputs["infiles"]["gamess.inp"], dexe["stdout"], dexe["stderr"]))
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- dexe["outfiles"]["input"] = job_inputs["infiles"]["gamess.inp"]
- return self.parse_output(dexe["outfiles"], input_model)
-
- def build_input(
- self, input_model: AtomicInput, config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
- gamessrec = {
- "infiles": {},
- "scratch_directory": config.scratch_directory,
- "scratch_messy": config.scratch_messy,
- }
-
- opts = copy.deepcopy(input_model.keywords)
-
- # Handle molecule
- if not all(input_model.molecule.real):
- raise InputError("GAMESS+QCEngine can't handle ghost atoms yet.")
-
- molcmd, moldata = input_model.molecule.to_string(dtype="gamess", units="Bohr", return_data=True)
- opts.update(moldata["keywords"])
-
- # Handle calc type and quantum chemical method
- opts.update(muster_modelchem(input_model.model.method, input_model.driver.derivative_int()))
-
- # Handle basis set
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
- if input_model.model.basis is None:
- raise InputError("None for model.basis is not useable.")
-
- # * for gamess, usually insufficient b/c either ngauss or ispher needed
- opts["basis__gbasis"] = input_model.model.basis
-
- # Handle memory
- # * [GiB] --> [M QW]
- # * docs on mwords: "This is given in units of 1,000,000 words (as opposed to 1024*1024 words)"
- # * docs: "the memory required on each processor core for a run using p cores is therefore MEMDDI/p + MWORDS."
- # * int() rounds down
- mwords_total = int(config.memory * (1024**3) / 8e6)
-
- for mem_frac_replicated in (1, 0.5, 0.1, 0.75):
- mwords, memddi = self._partition(mwords_total, mem_frac_replicated, config.ncores)
- # DEBUG print(f"loop {mwords_total=} {mem_frac_replicated=} {config.ncores=} -> repl: {mwords=} dist: {memddi=} -> percore={memddi/config.ncores + mwords} tot={memddi + config.ncores * mwords}\n")
- trial_opts = copy.deepcopy(opts)
- trial_opts["contrl__exetyp"] = "check"
- trial_opts["system__parall"] = not (config.ncores == 1)
- trial_opts["system__mwords"] = mwords
- trial_opts["system__memddi"] = memddi
- trial_inp = format_keywords(trial_opts) + molcmd
- trial_gamessrec = {
- "infiles": {"trial_gamess.inp": trial_inp},
- "command": [which("rungms"), "trial_gamess"],
- "scratch_messy": False,
- "scratch_directory": config.scratch_directory,
- }
- success, dexe = self.execute(trial_gamessrec)
-
- # TODO: switch to KnownError and better handle clobbering of user ncores
- # when the "need serial exe" messages show up compared to mem messages isn't clear
- # this would be a lot cleaner if there was a unique or list of memory error strings
- # if (
- # ("ERROR: ONLY CCTYP=CCSD OR CCTYP=CCSD(T) CAN RUN IN PARALLEL." in dexe["stdout"])
- # or ("ERROR: ROHF'S CCTYP MUST BE CCSD OR CR-CCL, WITH SERIAL EXECUTION" in dexe["stdout"])
- # or ("CI PROGRAM CITYP=FSOCI DOES NOT RUN IN PARALLEL." in dexe["stdout"])
- # ):
- # print("RESTETTITNG TO 1")
- # config.ncores = 1
- # break
- if "INPUT HAS AT LEAST ONE SPELLING OR LOGIC MISTAKE" in dexe["stdout"]:
- raise InputError(error_stamp(trial_inp, dexe["stdout"], dexe["stderr"]))
- elif "EXECUTION OF GAMESS TERMINATED -ABNORMALLY-" in dexe["stdout"]:
- pass
- else:
- opts["system__mwords"] = mwords
- opts["system__memddi"] = memddi
- break
-
- # TODO: "semget errno=ENOSPC -- check system limit for sysv semaphores." `ipcs -l`, can fix if too many gamess tests run at once by config.ncores = 4
-
- # ERROR: ROHF'S CCTYP MUST BE CCSD OR CR-CCL, WITH SERIAL EXECUTION
- if opts.get("contrl__cctyp", "").lower() == "ccsd" and opts.get("contrl__scftyp", "").lower() == "rohf":
- config.ncores = 1
-
- # Handle conversion from schema (flat key/value) keywords into local format
- optcmd = format_keywords(opts)
-
- gamessrec["infiles"]["gamess.inp"] = optcmd + molcmd
- gamessrec["command"] = [
- which("rungms"),
- "gamess",
- "00",
- str(config.ncores),
- ] # rungms JOB VERNO NCPUS >& JOB.log &
-
- return gamessrec
-
- # Note decr MEMORY=100000 to get
- # ***** ERROR: MEMORY REQUEST EXCEEDS AVAILABLE MEMORY
- # to test gms fail
-
- # $CONTRL SCFTYP=ROHF MULT=3 RUNTYP=GRADIENT COORD=CART $END
- # $SYSTEM TIMLIM=1 MEMORY=800000 $END
- # $SCF DIRSCF=.TRUE. $END
- # $BASIS GBASIS=STO NGAUSS=2 $END
- # $GUESS GUESS=HUCKEL $END
- # $DATA
- # Methylene...3-B-1 state...ROHF/STO-2G
- # Cnv 2
- #
- # Hydrogen 1.0 0.82884 0.7079 0.0
- # Carbon 6.0
- # Hydrogen 1.0 -0.82884 0.7079 0.0
- # $END
-
- def execute(self, inputs, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None):
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- ["gamess.dat"],
- scratch_messy=inputs["scratch_messy"],
- scratch_directory=inputs["scratch_directory"],
- )
- return success, dexe
-
- def parse_output(self, outfiles: Dict[str, str], input_model: AtomicInput) -> AtomicResult:
-
- # Get the stdout from the calculation (required)
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- method = input_model.model.method.lower()
- method = method[4:] if method.startswith("gms-") else method
-
- # gamessmol, if it exists, is dinky, just a clue to geometry of gamess results
- try:
- # July 2021: gamessmol & vector returns now atin/outfile orientation depending on fix_com,orientation=T/F. previously always outfile orientation
- qcvars, gamesshess, gamessgrad, gamessmol, module = harvest(
- input_model.molecule, method, stdout, **outfiles
- )
- # TODO: "EXECUTION OF GAMESS TERMINATED -ABNORMALLY-" in dexe["stdout"]:
-
- except Exception:
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- try:
- if gamessgrad is not None:
- qcvars[f"{method.upper()} TOTAL GRADIENT"] = gamessgrad
- qcvars["CURRENT GRADIENT"] = gamessgrad
-
- if gamesshess is not None:
- qcvars[f"{method.upper()} TOTAL HESSIAN"] = gamesshess
- qcvars["CURRENT HESSIAN"] = gamesshess
-
- if input_model.driver.upper() == "PROPERTIES":
- retres = qcvars[f"CURRENT ENERGY"]
- else:
- retres = qcvars[f"CURRENT {input_model.driver.upper()}"]
- except KeyError:
- if "EXETYP=CHECK" in stdout and "EXECUTION OF GAMESS TERMINATED NORMALLY" in stdout:
- # check run that completed normally
- # * on one hand, it's still an error return_result-wise
- # * but on the other hand, often the reason for the job is to get gamessmol, so let it return success=T below
- retres = 0.0
- else:
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- build_out(qcvars)
- atprop = build_atomicproperties(qcvars)
-
- provenance = Provenance(creator="GAMESS", version=self.get_version(), routine="rungms").dict()
- if module is not None:
- provenance["module"] = module
-
- output_data = {
- "schema_version": 1,
- "molecule": gamessmol, # overwrites with outfile Cartesians in case fix_*=F
- "extras": {**input_model.extras},
- "native_files": {k: v for k, v in outfiles.items() if v is not None},
- "properties": atprop,
- "provenance": provenance,
- "return_result": retres,
- "stderr": stderr,
- "stdout": stdout,
- "success": True,
- }
-
- # got to even out who needs plump/flat/Decimal/float/ndarray/list
- # * formerly unnp(qcvars, flat=True).items()
- output_data["extras"]["qcvars"] = {
- k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in qcvars.items()
- }
-
- return AtomicResult(**{**input_model.dict(), **output_data})
-
- @staticmethod
- def _partition(total: float, fraction_replicated: float, ncores: int) -> Tuple[int, int]:
- """Compute memory keyword values from memory and core parameters.
-
- Parameters
- ----------
- total
- Total memory per node in mwords.
- fraction_replicated
- Portion on interval (0, 1] to be replicated memory, as opposed to distributed memory.
- ncores
- Number of cores needing replicated memory.
-
- Returns
- -------
- mwords, memddi
- Return mwords and memddi values for ``total`` memory (already in mwords) partitioned so (0, 1]
- ``fraction_replicated`` is replicated over ``ncores`` and remainder distributed.
-
- """
- replicated_summed = total * fraction_replicated
- replicated_each = int(max(1, replicated_summed / ncores))
- distributed = int(total - replicated_summed)
-
- return replicated_each, distributed
diff --git a/qcengine/programs/gcp.py b/qcengine/programs/gcp.py
deleted file mode 100644
index 368f82521..000000000
--- a/qcengine/programs/gcp.py
+++ /dev/null
@@ -1,316 +0,0 @@
-"""Compute geometrical counterpoise correction using Kruse & Grimme's GCP executable."""
-
-import os
-import pathlib
-import pprint
-import re
-import socket
-import sys
-from decimal import Decimal
-from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.models import AtomicResult, FailedOperation, Provenance
-from qcelemental.util import safe_version, which
-
-from ..exceptions import InputError, UnknownError
-from ..util import execute
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-
-
-class GCPHarness(ProgramHarness):
-
- _defaults = {
- "name": "GCP",
- "scratch": True,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "gcp",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install gcp -c psi4`.",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- version = None
- which_prog = which("gcp")
- if which_prog not in self.version_cache:
- # option not (yet) available, instead find in help output
- command = [which_prog, "-version"]
- import subprocess
-
- proc = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- for ln in proc.stdout.decode("utf-8").splitlines():
- if re.match(".*Version", ln):
- version = ln.split()[2]
-
- if version is None:
- raise UnknownError(f"Could not identify GCP version")
- # pending upcoming gcp update
- # self.version_cache[which_prog] = safe_version(
- # proc.stdout.decode("utf-8").strip())
- self.version_cache[which_prog] = safe_version(version)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- self.found(raise_error=True)
-
- job_inputs = self.build_input(input_model, config)
-
- success, dexe = self.execute(job_inputs)
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- dexe["outfiles"]["input"] = " ".join(job_inputs["command"]) # stretch to call this input
- dexe["outfiles"]["gcp_geometry.xyz"] = job_inputs["infiles"]["gcp_geometry.xyz"]
- output_model = self.parse_output(dexe["outfiles"], input_model)
-
- else:
- output_model = FailedOperation(
- success=False,
- error={"error_type": "execution_error", "error_message": dexe["stderr"]},
- input_data=input_model.dict(),
- )
-
- return output_model
-
- def execute(
- self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None
- ) -> Tuple[bool, Dict]:
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- inputs["outfiles"],
- scratch_messy=inputs["scratch_messy"],
- scratch_directory=inputs["scratch_directory"],
- blocking_files=inputs["blocking_files"],
- )
- return success, dexe
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
-
- if (input_model.driver.derivative_int() > 1) or (input_model.driver == "properties"):
- raise InputError(f"Driver {input_model.driver} not implemented for GCP.")
-
- # live somewhere else?
- available_levels = [
- "HF/MINIS",
- "DFT/MINIS",
- "HF/MINIX",
- "DFT/MINIX",
- "HF/SV",
- "DFT/SV",
- "HF/def2-SV(P)",
- "DFT/def2-SV(P)",
- "HF/def2-SVP",
- "DFT/def2-SVP",
- "HF/DZP",
- "DFT/DZP",
- "HF/def-TZVP",
- "DFT/def-TZVP",
- "HF/def2-TZVP",
- "DFT/def2-TZVP",
- "HF/631Gd",
- "DFT/631Gd",
- "HF/cc-pVDZ",
- "DFT/cc-pVDZ",
- "HF/aug-cc-pVDZ",
- "DFT/aug-cc-pVDZ",
- # DFT only
- "DFT/SVX", # = def2-SV(P/h,c)
- "DFT/LANL",
- "DFT/pobTZVP",
- # HF only, needs update
- # 'HF/631G',
- # functional specific
- "TPSS/def2-SVP",
- "PW6B95/def2-SVP",
- # 3c specials
- "hf3c",
- "pbeh3c",
- # custom
- # will need gcp code changes if $HOME is to be avoided
- # thus code blocks with FILE below are not used yet.
- # 'file',
- ]
- # some methods not available in legacy version
- mctc_gcp_levels = ["B973C", "R2SCAN3C"]
-
- executable = self._defaults["name"].lower()
- if executable == "mctc-gcp":
- available_levels.extend(mctc_gcp_levels)
-
- available_levels = [f.upper() for f in available_levels]
- # temp until actual options object
- method = input_model.model.method.upper()
- if method not in available_levels:
- if method in mctc_gcp_levels and executable == "gcp":
- raise InputError(f"GCP does not have method {method} but MCTC-GCP does.")
- else:
- raise InputError(f"GCP does not have method: {method}")
-
- # Need 'real' field later and that's only guaranteed for molrec
- molrec = qcel.molparse.from_schema(input_model.molecule.dict())
-
- calldash = {"gcp": "-", "mctc-gcp": "--"}[executable]
-
- command = [executable, "gcp_geometry.xyz", calldash + "level", method]
-
- if input_model.driver == "gradient":
- command.append(calldash + "grad")
-
- infiles = {
- "gcp_geometry.xyz": qcel.molparse.to_string(molrec, dtype="xyz", units="Angstrom", ghost_format=""),
- }
- if method == "FILE":
- infiles[".gcppar"] = input_model.extras["parameters"]
-
- return {
- "command": command,
- "infiles": infiles,
- "outfiles": ["gcp_gradient"],
- "scratch_messy": config.scratch_messy,
- "scratch_directory": config.scratch_directory,
- "input_result": input_model.copy(deep=True),
- "blocking_files": [os.path.join(pathlib.Path.home(), ".gcppar." + socket.gethostname())],
- }
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- # parse energy output (could go further and break into E6, E8, E10 and Cn coeff)
- real = np.array(input_model.molecule.real)
- full_nat = real.shape[0]
- real_nat = np.sum(real)
-
- for ln in stdout.splitlines():
- if re.match(" Egcp:", ln):
- ene = Decimal(ln.split()[1])
- elif re.match(" normal termination of gCP", ln):
- break
- else:
- if self._defaults["name"] == "GCP" and not ((real_nat == 1) and (input_model.driver == "gradient")):
- raise UnknownError(
- f"Unsuccessful run. Check input, particularly geometry in [a0]. Model: {input_model.model}"
- )
-
- # parse gradient output
- if outfiles["gcp_gradient"] is not None:
- srealgrad = outfiles["gcp_gradient"].replace("D", "E")
- realgrad = np.fromstring(srealgrad, count=3 * real_nat, sep=" ").reshape((-1, 3))
- elif real_nat == 1:
- realgrad = np.zeros((1, 3))
-
- if input_model.driver == "gradient":
- ireal = np.argwhere(real).reshape((-1))
- fullgrad = np.zeros((full_nat, 3))
- try:
- fullgrad[ireal, :] = realgrad
- except NameError as exc:
- raise UnknownError("Unsuccessful gradient collection.") from exc
-
- qcvkey = input_model.model.method.upper()
-
- calcinfo = []
-
- calcinfo.append(qcel.Datum("CURRENT ENERGY", "Eh", ene))
- calcinfo.append(qcel.Datum("GCP CORRECTION ENERGY", "Eh", ene))
- if qcvkey:
- calcinfo.append(qcel.Datum(f"{qcvkey} GCP CORRECTION ENERGY", "Eh", ene))
-
- if input_model.driver == "gradient":
- calcinfo.append(qcel.Datum("CURRENT GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("GCP CORRECTION GRADIENT", "Eh/a0", fullgrad))
- if qcvkey:
- calcinfo.append(qcel.Datum(f"{qcvkey} GCP CORRECTION GRADIENT", "Eh/a0", fullgrad))
-
- calcinfo = {info.label: info.data for info in calcinfo}
-
- # Decimal --> str preserves precision
- calcinfo = {k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in calcinfo.items()}
-
- retres = calcinfo[f"CURRENT {input_model.driver.upper()}"]
- if isinstance(retres, Decimal):
- retres = float(retres)
- elif isinstance(retres, np.ndarray):
- retres = retres.ravel().tolist()
-
- output_data = {
- "extras": input_model.extras,
- "native_files": {k: v for k, v in outfiles.items() if v is not None},
- "properties": {},
- "provenance": Provenance(
- creator="GCP", version=self.get_version(), routine=__name__ + "." + sys._getframe().f_code.co_name
- ),
- "return_result": retres,
- "stderr": stderr,
- "stdout": stdout,
- }
-
- output_data["extras"]["qcvars"] = calcinfo
-
- output_data["success"] = True
- return AtomicResult(**{**input_model.dict(), **output_data})
-
-
-class MCTCGCPHarness(GCPHarness):
-
- _defaults = {
- "name": "MCTC-GCP",
- "scratch": True,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "mctc-gcp",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install gcp-correction -c conda-forge`.",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("mctc-gcp")
- if which_prog not in self.version_cache:
- command = [which_prog, "--version"]
- import subprocess
-
- proc = subprocess.run(command, stdout=subprocess.PIPE)
- self.version_cache[which_prog] = safe_version(proc.stdout.decode("utf-8").strip().split()[-1])
-
- return self.version_cache[which_prog]
diff --git a/qcengine/programs/mace.py b/qcengine/programs/mace.py
deleted file mode 100644
index 8ef5400df..000000000
--- a/qcengine/programs/mace.py
+++ /dev/null
@@ -1,139 +0,0 @@
-from typing import TYPE_CHECKING, Dict, Union
-from qcelemental.models import AtomicResult, Provenance, FailedOperation
-from qcelemental.util import safe_version, which_import
-from qcengine.exceptions import InputError
-from qcengine.programs.model import ProgramHarness
-from qcengine.units import ureg
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput, FailedOperation
- from qcengine.config import TaskConfig
-
-
-class MACEHarness(ProgramHarness):
- """Can be used to execute a published MACE-OFF23 model or local mace model.
- For more info on the MACE-OFF23 models see .
- The models can be found at
- """
-
- _CACHE = {}
-
- _defaults = {
- "name": "MACE",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- def found(self, raise_error: bool = False) -> bool:
- return which_import(
- "mace",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `mamba install pymace -c conda-forge`",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which_import("mace")
- if which_prog not in self.version_cache:
- import mace
-
- self.version_cache[which_prog] = safe_version(mace.__version__)
-
- return self.version_cache[which_prog]
-
- def load_model(self, name: str):
- """Compile and cache the model to make it faster when calling many times in serial"""
- model_name = name.lower()
- if model_name in self._CACHE:
- return self._CACHE[model_name]
-
- import torch
- from e3nn.util import jit
-
- if model_name in ["small", "medium", "large"]:
- from mace.calculators.foundations_models import mace_off
-
- model = mace_off(model=model_name, return_raw_model=True)
- else:
- try:
- model = torch.load(name, map_location=torch.device("cpu"))
- except FileNotFoundError:
- raise InputError(
- "The mace harness can only run local models or a MACE-OFF23 model (`small`, `medium`, `large`)"
- )
- comp_mod = jit.compile(model)
- self._CACHE[model_name] = (comp_mod, float(model.r_max), model.atomic_numbers)
- return self._CACHE[model_name]
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig") -> Union["AtomicResult", "FailedOperation"]:
-
- self.found(raise_error=True)
-
- import mace
- import numpy as np
- import torch
- from mace.data import AtomicData
- from mace.data.utils import AtomicNumberTable, Configuration
- from mace.tools.torch_geometric import DataLoader
-
- torch.set_default_dtype(torch.float64)
-
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
- # Failure flag
- ret_data = {"success": False}
-
- # Build model
- method = input_data.model.method
-
- # load the torch model which can be a MACE-OFF23 or local model
- model, r_max, atomic_numbers = self.load_model(name=method)
-
- z_table = AtomicNumberTable([int(z) for z in atomic_numbers])
- atomic_numbers = input_data.molecule.atomic_numbers
- pbc = (False, False, False)
- # set the cell as None and mace will automatically create a cell big enough to include all atoms
- cell = None
-
- config = Configuration(
- atomic_numbers=atomic_numbers,
- positions=input_data.molecule.geometry * ureg.conversion_factor("bohr", "angstrom"),
- pbc=pbc,
- cell=cell,
- )
-
- data_loader = DataLoader(
- dataset=[AtomicData.from_config(config, z_table=z_table, cutoff=r_max)],
- batch_size=1,
- shuffle=False,
- drop_last=False,
- )
- input_dict = next(iter(data_loader)).to_dict()
- model.to(device)
- mace_data = model(input_dict, compute_force=True)
- ret_data["properties"] = {"return_energy": mace_data["energy"] * ureg.conversion_factor("eV", "hartree")}
-
- if input_data.driver == "energy":
- ret_data["return_result"] = ret_data["properties"]["return_energy"]
- elif input_data.driver == "gradient":
- ret_data["return_result"] = (
- np.asarray(-1.0 * mace_data["forces"] * ureg.conversion_factor("eV / angstrom", "hartree / bohr"))
- .ravel()
- .tolist()
- )
-
- else:
- raise InputError("MACE only supports the energy and gradient driver methods.")
-
- ret_data["extras"] = input_data.extras.copy()
- ret_data["provenance"] = Provenance(creator="mace", version=mace.__version__, routine="mace")
- ret_data["schema_name"] = "qcschema_output"
- ret_data["success"] = True
-
- # Form up a dict first, then sent to BaseModel to avoid repeat kwargs which don't override each other
- return AtomicResult(**{**input_data.dict(), **ret_data})
diff --git a/qcengine/programs/model.py b/qcengine/programs/model.py
deleted file mode 100644
index 96e953d10..000000000
--- a/qcengine/programs/model.py
+++ /dev/null
@@ -1,164 +0,0 @@
-import abc
-import logging
-from typing import Any, Dict, List, Optional, Tuple, Union
-
-try:
- from pydantic.v1 import BaseModel
-except ImportError:
- from pydantic import BaseModel
-from qcelemental.models import AtomicInput, AtomicResult, FailedOperation
-
-from qcengine.exceptions import KnownErrorException
-from qcengine.config import TaskConfig
-
-logger = logging.getLogger(__name__)
-
-
-class ProgramHarness(BaseModel, abc.ABC):
-
- _defaults: Dict[str, Any] = {}
- name: str
- scratch: bool
- thread_safe: bool
- thread_parallel: bool
- node_parallel: bool
- managed_memory: bool
- extras: Optional[Dict[str, Any]]
-
- class Config:
- allow_mutation: False
- extra: "forbid"
-
- def __init__(self, **kwargs):
- super().__init__(**{**self._defaults, **kwargs})
-
- @abc.abstractmethod
- def compute(self, input_data: AtomicInput, config: TaskConfig) -> Union[AtomicResult, FailedOperation]:
- """Top-level compute method to be implemented for every ProgramHarness
-
- Note:
- This method behave in any of the following ways:
- 1. Return AtomicResult upon successful completion of a calculation
- 2. Return FailedOperation object if an operation was unsuccessful or raised an exception. This is most
- likely to occur if the underlying QC package has a QCSchema API that catches exceptions and
- returns them as FailedOperation objects to end users.
- 3. Raise an exception if a computation failed. The raised exception will be handled by the
- qcng.compute() method and either raised or packaged as a FailedOperation object.
- """
- pass
-
- @staticmethod
- @abc.abstractmethod
- def found(raise_error: bool = False) -> bool:
- """
- Checks if the program can be found.
-
- Parameters
- ----------
- raise_error : bool, optional
- If True, raises an error if the program cannot be found.
-
- Returns
- -------
- bool
- Returns True if the program was found, False otherwise.
- """
-
- ## Utility
-
- def get_version(self) -> str:
- """Finds program, extracts version, returns normalized version string.
-
- Returns
- -------
- str
- Return a valid, safe python version string.
- """
-
- ## Computers
-
- def build_input(
- self, input_model: AtomicInput, config: TaskConfig, template: Optional[str] = None
- ) -> Dict[str, Any]:
- raise ValueError("build_input is not implemented for {}.", self.__class__)
-
- def execute(
- self,
- inputs: Dict[str, Any],
- extra_outfiles: Optional[List[str]] = None,
- extra_commands: Optional[List[str]] = None,
- scratch_name: Optional[str] = None,
- timeout: Optional[int] = None,
- ) -> Tuple[bool, Dict[str, Any]]:
- raise ValueError("execute is not implemented for {}.", self.__class__)
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
- raise ValueError("parse_output is not implemented for {}.", self.__class__)
-
-
-class ErrorCorrectionProgramHarness(ProgramHarness, abc.ABC):
- """Base class for Harnesses that include logic to correct common errors
-
- Classes which implement this Harness must override the :meth:`_compute` method
- rather than :meth:`compute`. The ``compute`` method from this class will make
- calls to ``_compute`` with different actions as it attempts to correct errors in the
- input files.
-
- The error corrections are defined by first implementing a :class:`KnownErrorException`
- that contains logic to determine if a certain error occurs and returns an appropriate
- update to the keywords of an AtomicInput.
-
- Then, modify the ``_compute`` method of your Harness to run the ``detect_error`` method
- of each ``KnownErrorException`` for the Harness after it finishes performing the computation.
- The ``detect_error`` method will raise an exception that is caught by the
- ``ErrorCorrectionProgramHarness`` and used to determine if/how to re-run the computation.
- """
-
- def _compute(self, input_data: AtomicInput, config: TaskConfig) -> AtomicResult:
- raise NotImplementedError()
-
- def compute(self, input_data: AtomicInput, config: TaskConfig) -> AtomicResult:
- # Get the error correction configuration
- error_policy = input_data.protocols.error_correction
-
- # Create a local copy of the input data
- local_input_data = input_data
-
- # Run the method and, if it fails, assess if the failure is restartable
- observed_errors = {} # Errors that have been observed previously
- while True:
- try:
- result = self._compute(local_input_data, config)
- break
- except KnownErrorException as e:
- logger.info(f"Caught a {type(e)} error.")
-
- # Determine whether this specific type of error is allowed
- correction_allowed = error_policy.allows(e.error_name)
- if not correction_allowed:
- logger.info(f'Error correction for "{e.error_name}" is not allowed')
- raise e
- logger.info(f'Error correction for "{e.error_name}" is allowed')
-
- # Check if it has run before
- # TODO (wardlt): Should we allow errors to be run >1 time?
- previously_run = e.error_name in observed_errors
- if previously_run:
- logger.info(
- "Error has been observed before and mitigation did not fix the issue. Raising exception"
- )
- raise e
-
- # Generate and apply the updated keywords
- keyword_updates = e.create_keyword_update(local_input_data)
- new_keywords = local_input_data.keywords.copy()
- new_keywords.update(keyword_updates)
- local_input_data = AtomicInput(**local_input_data.dict(exclude={"keywords"}), keywords=new_keywords)
-
- # Store the error details and mitigations employed
- observed_errors[e.error_name] = {"details": e.details, "keyword_updates": keyword_updates}
-
- # Add the errors observed and corrected for, if any
- if len(observed_errors) > 0:
- result.extras["observed_errors"] = observed_errors
- return result
diff --git a/qcengine/programs/molpro.py b/qcengine/programs/molpro.py
deleted file mode 100644
index 0025ae0f4..000000000
--- a/qcengine/programs/molpro.py
+++ /dev/null
@@ -1,451 +0,0 @@
-"""
-Calls the Molpro executable.
-"""
-
-import string
-from typing import Any, Dict, List, Optional, Set, Tuple
-from xml.etree import ElementTree as ET
-
-from qcelemental.models import AtomicResult
-from qcelemental.util import parse_version, safe_version, which
-
-from ..exceptions import InputError, UnknownError
-from ..util import execute
-from .model import ProgramHarness
-
-
-class MolproHarness(ProgramHarness):
- _defaults: Dict[str, Any] = {
- "name": "Molpro",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- # Set of implemented dft functionals in Molpro according to dfunc.registry (version 2019.2)
- # fmt: off
- _dft_functionals: Set[str] = {
- "B86MGC", "B86R", "B86", "B88C", "B88", "B95", "B97DF", "B97RDF", "BR", "BRUEG", "BW", "CS1", "CS2", "DIRAC",
- "ECERFPBE", "ECERF", "EXACT", "EXERFPBE", "EXERF", "G96", "HCTH120", "HCTH147", "HCTH93", "HJSWPBEX", "LTA",
- "LYP", "M052XC", "M052XX", "M05C", "M05X", "M062XC", "M062XX", "M06C", "M06HFC", "M06HFX", "M06LC", "M06LX",
- "M06X", "M12C", "MK00B", "MK00", "P86", "PBEC", "PBESOLC", "PBESOLX", "PBEXREV", "PBEX", "PW86", "PW91C",
- "PW91X", "PW92C", "STEST", "TFKE", "TH1", "TH2", "TH3", "TH4", "THGFCFO", "THGFCO", "THGFC", "THGFL", "TPSSC",
- "TPSSX", "VSXC", "VW", "VWN3", "VWN5", "XC-M05-2X", "XC-M05", "XC-M06-2X", "XC-M06-HF", "XC-M06-L", "XC-M06",
- "XC-M08-HX", "XC-M08-SO", "XC-M11-L", "XC-SOGGA11", "XC-SOGGA11-X", "XC-SOGGA", "FRMTST", "LHF", "TLHF",
- "LXBECKE", "ELP", "NULL", "YTEST", "TREF2", "TREF", "TTEST", "GLE", "GREEN", "SRB88", "SRLYP", "LB94", "EI",
- "SAOP", "USER", "INE", "ECERF2", "ECERFINTER", "ECERFLOCAL2", "ECERFLOCAL", "EXERFLOCAL", "FC", "FCFO", "FCO",
- "FL", "XC-M11", "PBEXANAL", "PBECANAL", "PBESOLCANAL", "PBESOLXANAL", "EXSRLDA", "EXSRLPBE", "ECSRLPBE",
- "ECSRLLPBE", "ECSQRTLPBE", "ECMUDIVLPBE", "EXERFPHS", "ECLERFMUPBE", "ECERFERFCPBE", "ECSQRTLDA", "REVPBEX",
- "B", "B-LYP", "BLYP", "B-P", "BP86", "B-VWN", "B3LYP", "B3LYP3", "B3LYP5", "B88X", "B97", "B97R", "BECKE",
- "BH-LYP", "CS", "D", "HFB", "HFS", "LDA", "LSDAC", "LSDC", "KYP88", "MM05", "MM05-2X", "MM06", "MM06-2X",
- "MM06-L", "MM06-HF", "PBE", "PBE0", "PBE0MOL", "PBEREV", "PW91", "S", "S-VWN", "SLATER", "VS99", "VWN",
- "VWN80", 'M05', "M05-2X", "M06", "M06-2X", "M06-L", "M06-HF", "M08-HX", "M08-SO", "M11-L", "TPSS", "TPSSH",
- "M12HFC", "HJSWPBE", "HJSWPBEH", "TCSWPBE", "PBESOL"
- }
- # fmt: on
-
- # Different open-shell scenarios:
- # - Restricted references
- # RHF-RMP2 (like RHF-UMP2 using Molpro's naming convention for CC methods)
- # RHF-UCCSD
- # RHF-UCCSD(T)
- # RHF-RCCSD
- # RHF-RCCSD(T)
- # - Unrestricted references (Only supported up to UMP2, no CC support)
- # UHF-UMP2
- # NOTE: Unrestricted SCF methods must be specified by using keyword reference
- _hf_methods: Set[str] = {"HF", "RHF"}
- _restricted_post_hf_methods: Set[str] = {"MP2", "CCSD", "CCSD(T)"} # RMP2, RCCSD, RCCSD(T)}
- # TODO Add keyword to specify unrestricted for WF method
- # _unrestricted_post_hf_methods: Set[str] = {"UMP2", "UCCSD", "UCCSD(T)"}
- _post_hf_methods: Set[str] = {*_restricted_post_hf_methods}
-
- class Config(ProgramHarness.Config):
- pass
-
- def found(self, raise_error: bool = False) -> bool:
- return which(
- "molpro", return_bool=True, raise_error=raise_error, raise_msg="Please install via https://www.molpro.net/"
- )
-
- # TODO Consider changing this to use molpro --version instead of performing a full execute
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- name_space = {"molpro_uri": "http://www.molpro.net/schema/molpro-output"}
- which_prog = which("molpro")
- if which_prog not in self.version_cache:
- success, output = execute(
- [which_prog, "version.inp", "-d", ".", "-W", "."],
- infiles={"version.inp": ""},
- outfiles=["version.out", "version.xml"],
- )
-
- if success:
- tree = ET.ElementTree(ET.fromstring(output["outfiles"]["version.xml"]))
- root = tree.getroot()
- version_tree = root.find("molpro_uri:job/molpro_uri:platform/molpro_uri:version", name_space)
- if version_tree is None:
- # some older schema
- name_space = {"molpro_uri": "http://www.molpro.net/schema/molpro2006"}
- version_tree = root.find("molpro_uri:job//molpro_uri:version", name_space)
- if version_tree is None:
- return safe_version("0.0.0")
- year = version_tree.attrib["major"]
- minor = version_tree.attrib["minor"]
- molpro_version = year + "." + minor
- self.version_cache[which_prog] = safe_version(molpro_version)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Run Molpro
- """
- # Check if Molpro executable is found
- self.found(raise_error=True)
-
- # Check Molpro version
- if parse_version(self.get_version()) < parse_version("2018.1"):
- raise TypeError("Molpro version '{}' not supported".format(self.get_version()))
-
- # Setup the job
- job_inputs = self.build_input(input_data, config)
-
- # Run Molpro
- exe_success, proc = self.execute(job_inputs)
-
- # Determine whether the calculation succeeded
- if exe_success:
- # If execution succeeded, collect results
- result = self.parse_output(proc["outfiles"], input_data)
- return result
- else:
- # Return UnknownError for error propagation
- return UnknownError(proc["stderr"])
-
- def execute(
- self,
- inputs: Dict[str, Any],
- extra_infiles: Optional[Dict[str, str]] = None,
- extra_outfiles: Optional[List[str]] = None,
- as_binary: Optional[List[str]] = None,
- extra_commands: Optional[List[str]] = None,
- scratch_name: Optional[str] = None,
- scratch_messy: bool = False,
- timeout: Optional[int] = None,
- ) -> Tuple[bool, Dict[str, Any]]:
- """
- For option documentation go look at qcengine/util.execute
- """
-
- # Collect all input files and update with extra_infiles
- infiles = inputs["infiles"]
- if extra_infiles is not None:
- infiles.update(extra_infiles)
-
- # Collect all output files and update with extra_outfiles
- outfiles = ["dispatch.out", "dispatch.xml"]
- if extra_outfiles is not None:
- outfiles.extend(extra_outfiles)
-
- # Replace commands with extra_commands if present
- commands = inputs["commands"]
- if extra_commands is not None:
- commands = extra_commands
-
- # Run the Molpro program
- exe_success, proc = execute(
- commands,
- infiles=infiles,
- outfiles=outfiles,
- as_binary=as_binary,
- scratch_name=scratch_name,
- scratch_directory=inputs["scratch_directory"],
- scratch_messy=scratch_messy,
- timeout=timeout,
- )
- return exe_success, proc
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
- if template is None:
- input_file = []
-
- # Resolving keywords
- caseless_keywords = {k.lower(): v for k, v in input_model.keywords.items()}
- unrestricted = False
- # Following Molpro default that ROHF is done for open-shell calculations unless unrestricted is specified
- if "reference" in caseless_keywords and caseless_keywords["reference"] == "unrestricted":
- unrestricted = True
-
- # Memory is in megawords per core for Molpro
- memory_mw_core = int(config.memory * (1024**3) / 8e6 / config.ncores)
- input_file.append("memory,{},M".format(memory_mw_core))
- input_file.append("")
-
- # Write the geom
- xyz_block = input_model.molecule.to_string(dtype="molpro", units="Bohr")
- input_file.append(xyz_block)
-
- # Write the basis set
- input_file.append("basis={")
- input_file.append(f"default,{input_model.model.basis}")
- input_file.append("}")
- input_file.append("")
-
- # Determine what SCF type (restricted vs. unrestricted)
- hf_type = "RHF"
- dft_type = "RKS"
- if unrestricted:
- hf_type = "UHF"
- dft_type = "UKS"
-
- # Write energy call
- energy_call = []
- # If post-hf method is called then make sure to write a HF call first
- if input_model.model.method.upper() in self._post_hf_methods: # post SCF case
- energy_call.append(f"{{{hf_type}}}")
- energy_call.append("")
- energy_call.append(f"{{{input_model.model.method}}}")
- # If DFT call make sure to write {rks,method}
- elif input_model.model.method.upper() in self._dft_functionals: # DFT case
- energy_call.append(f"{{{dft_type},{input_model.model.method}}}")
- elif input_model.model.method.upper() in self._hf_methods: # HF case
- energy_call.append(f"{{{hf_type}}}")
- else:
- raise InputError(f"Method {input_model.model.method} not implemented for Molpro.")
-
- # Write appropriate driver call
- if input_model.driver == "energy":
- input_file.extend(energy_call)
- elif input_model.driver == "gradient":
- input_file.extend(energy_call)
- input_file.append("")
- input_file.append("{force}")
- else:
- raise InputError(f"Driver {input_model.driver} not implemented for Molpro.")
-
- input_file = "\n".join(input_file)
- else:
- # Some of the potential different template options
- # (A) ordinary build_input (need to define a base template)
- # (B) user wants to add stuff after normal template (A)
- # (C) user knows their domain language (doesn't use any QCSchema quantities)
-
- # # Build dictionary for substitute
- # sub_dict = {
- # "method": input_model.model.method,
- # "basis": input_model.model.basis,
- # "charge": input_model.molecule.molecular_charge
- # }
-
- # Perform substitution to create input file
- str_template = string.Template(template)
- input_file = str_template.substitute()
-
- return {
- "commands": ["molpro", "dispatch.mol", "-d", ".", "-W", ".", "-n", str(config.ncores)],
- "infiles": {"dispatch.mol": input_file},
- "scratch_directory": config.scratch_directory,
- "input_result": input_model.copy(deep=True),
- }
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
- tree = ET.ElementTree(ET.fromstring(outfiles["dispatch.xml"]))
- root = tree.getroot()
- # print(root.tag)
-
- # TODO Read information from molecule tag
- # - cml:molecule, cml:atomArray (?)
- # - basisSet
- # - Be aware of symmetry. Might only be able to support if symmetry,nosym
- # - orbitals
- # - Be aware of symmetry. Might only be able to support if symmetry,nosym
- # NOTE: Spherical basis set ordering in Molpro (with no symmetry)
- # S --> 0
- # P --> +1, -1, 0
- # D --> 0, -2, +1, +2, -1
- # F --> +1, -1, 0, +3, -2, -3, +2
- # G --> 0, -2, +1, +4, -1, +2, -4, +3, -3
- # H --> +1, -1, +2, +3, -4, -3, +4, -5, 0, +5, -2
- # I --> +6, -2, +5, +4, -5, +2, -6, +3, -4, 0, -3, -1, +1
- properties = {}
- extras = {}
- name_space = {"molpro_uri": "http://www.molpro.net/schema/molpro-output"}
-
- # Molpro commands map
- molpro_map = {
- "Energy": {
- "HF": "scf_total_energy",
- "RHF": "scf_total_energy",
- "UHF": "scf_total_energy",
- "KS": "scf_total_energy",
- "RKS": "scf_total_energy",
- "UKS": "scf_total_energy",
- },
- "total energy": {
- "MP2": "mp2_total_energy",
- "CCSD": "ccsd_total_energy",
- "CCSD(T)": "ccsd_prt_pr_total_energy",
- },
- "correlation energy": {
- "MP2": "mp2_correlation_energy",
- "CCSD": "ccsd_correlation_energy",
- "CCSD(T)": "ccsd_prt_pr_correlation_energy", # Need both CCSD(T) and Total
- "Total": "ccsd_prt_pr_correlation_energy", # Total corresponds to CCSD(T) correlation energy
- },
- "singlet pair energy": {"MP2": "mp2_singlet_pair_energy", "CCSD": "ccsd_singlet_pair_energy"},
- "triplet pair energy": {"MP2": "mp2_triplet_pair_energy", "CCSD": "ccsd_triplet_pair_energy"},
- "Dipole moment": {
- "HF": "scf_dipole_moment",
- "RHF": "scf_dipole_moment",
- "UHF": "scf_dipole_moment",
- "KS": "scf_dipole_moment",
- "RKS": "scf_dipole_moment",
- "UKS": "scf_dipole_moment",
- "MP2": "mp2_dipole_moment",
- "CCSD": "ccsd_dipole_moment",
- "CCSD(T)": "ccsd_prt_pr_dipole_moment",
- },
- }
-
- # Started adding basic support for local correlation methods in Molpro
- molpro_extras_map = {
- "total energy": {
- "LMP2": "local_mp2_total_energy",
- "LCCSD": "local_ccsd_total_energy",
- "LCCSD(T0)": "local_ccsd_prt0_pr_total_energy",
- "LCCSD(T)": "local_ccsd_prt_pr_total_energy",
- },
- "correlation energy": {"LMP2": "local_mp2_correlation_energy", "LCCSD": "local_ccsd_correlation_energy"},
- "singlet pair energy": {"LMP2": "local_mp2_singlet_pair_energy", "LCCSD": "local_ccsd_singlet_pair_energy"},
- "triplet pair energy": {"LMP2": "local_mp2_triplet_pair_energy", "LCCSD": "local_ccsd_triplet_pair_energy"},
- "singles energy": {"LCCSD": "local_ccsd_singles_energy"},
- # "strong pair energy": {
- # "LCCSD": "local_ccsd_strong_pair_energy"
- # },
- # "weak pair energy": {
- # "LMP2": "local_mp2_weak_pair_energy"
- # }
- }
-
- # Molpro variables map used for quantities not found in the command map
- molpro_variable_map = {
- "_ENUC": "nuclear_repulsion_energy",
- "_DFTFUN": "scf_xc_energy",
- "_NELEC": ["calcinfo_nalpha", "calcinfo_nbeta"]
- # "_EMP2_SCS": "scs_mp2_total_energy"
- }
-
- # Process data in molpro_map by looping through each jobstep
- # The jobstep tag in Molpro contains output from commands (e.g. {HF}, {force})
- for jobstep in root.findall("molpro_uri:job/molpro_uri:jobstep", name_space):
- command = jobstep.attrib["command"]
- if "FORCE" in command: # Grab gradient
- for child in jobstep.findall("molpro_uri:gradient", name_space):
- # Stores gradient as a single list where the ordering is [1x, 1y, 1z, 2x, 2y, 2z, ...]
- properties["gradient"] = [float(x) for x in child.text.split()]
- else: # Grab energies and dipole moment
- for child in jobstep.findall("molpro_uri:property", name_space):
- property_name = child.attrib["name"]
- property_method = child.attrib["method"]
- value = child.attrib["value"]
- if property_name in molpro_map and property_method in molpro_map[property_name]:
- if property_name == "Dipole moment":
- properties[molpro_map[property_name][property_method]] = [float(x) for x in value.split()]
- else:
- properties[molpro_map[property_name][property_method]] = float(value)
- elif property_name in molpro_extras_map and property_method in molpro_extras_map[property_name]:
- extras[molpro_extras_map[property_name][property_method]] = float(value)
-
- # Convert triplet and singlet pair correlation energies to opposite-spin and same-spin correlation energies
- if "mp2_singlet_pair_energy" in properties and "mp2_triplet_pair_energy" in properties:
- properties["mp2_same_spin_correlation_energy"] = (2.0 / 3.0) * properties["mp2_triplet_pair_energy"]
- properties["mp2_opposite_spin_correlation_energy"] = (1.0 / 3.0) * properties[
- "mp2_triplet_pair_energy"
- ] + properties["mp2_singlet_pair_energy"]
- del properties["mp2_singlet_pair_energy"]
- del properties["mp2_triplet_pair_energy"]
-
- if "ccsd_singlet_pair_energy" in properties and "ccsd_triplet_pair_energy" in properties:
- properties["ccsd_same_spin_correlation_energy"] = (2.0 / 3.0) * properties["ccsd_triplet_pair_energy"]
- properties["ccsd_opposite_spin_correlation_energy"] = (1.0 / 3.0) * properties[
- "ccsd_triplet_pair_energy"
- ] + properties["ccsd_singlet_pair_energy"]
- del properties["ccsd_singlet_pair_energy"]
- del properties["ccsd_triplet_pair_energy"]
-
- # Process data in molpro_variable_map
- # Note: For the DFT case molecule_method is the name of the functional plus R or U in front
- molecule = root.find("molpro_uri:job/molpro_uri:molecule", name_space)
- molecule_method = molecule.attrib["method"]
- molecule_final_energy = float(molecule.attrib["energy"]) # Energy from the molecule tag in case its needed
- # Loop over each variable under the variables tag to grab additional info from molpro_variable_map
- for variable in molecule.findall("molpro_uri:variables/molpro_uri:variable", name_space):
- variable_name = variable.attrib["name"]
- if variable_name in molpro_variable_map:
- if variable_name == "_NELEC":
- nelec = int(float(variable[0].text))
- nunpaired = input_model.molecule.molecular_multiplicity - 1
- nbeta = (nelec - nunpaired) // 2
- nalpha = nelec - nbeta
- properties[molpro_variable_map[variable_name][0]] = nalpha
- properties[molpro_variable_map[variable_name][1]] = nbeta
- else:
- properties[molpro_variable_map[variable_name]] = float(variable[0].text)
-
- # Process basis set data
- basis_set = root.find("molpro_uri:job/molpro_uri:molecule/molpro_uri:basisSet", name_space)
- nbasis = int(basis_set.attrib["length"])
- # angular_type = basis_set.attrib['angular'] # cartesian vs spherical
- properties["calcinfo_nbasis"] = nbasis
-
- # Grab the method from input
- method = input_model.model.method.upper()
-
- # Determining the final energy
- # Throws an error if the energy isn't found for the method specified from the input_model.
- if method in molpro_map["total energy"].keys() and molpro_map["total energy"][method] in properties:
- final_energy = properties[molpro_map["total energy"][method]]
- elif method in molpro_map["Energy"].keys() and molpro_map["Energy"][method] in properties:
- final_energy = properties[molpro_map["Energy"][method]]
- else:
- # Back up method for determining final energy if not already present in properties
- # Use the total energy from the molecule tag if it matches the input method
- # if input_model.model.method.upper() in molecule_method:
- if method in molecule_method:
- final_energy = molecule_final_energy
- if method in self._post_hf_methods:
- properties[molpro_map["total energy"][method]] = molecule_final_energy
- properties[molpro_map["correlation energy"][method]] = (
- molecule_final_energy - properties["scf_total_energy"]
- )
- elif method in self._dft_functionals:
- properties[molpro_map["Energy"]["KS"]] = molecule_final_energy
- elif method in self._hf_methods:
- properties[molpro_map["Energy"][method]] = molecule_final_energy
- else:
- raise KeyError(f"Could not find {method} total energy")
-
- # Initialize output_data by copying over input_model.dict()
- output_data = input_model.dict()
-
- # Determining return_result
- if input_model.driver == "energy":
- output_data["return_result"] = final_energy
- elif input_model.driver == "gradient":
- output_data["return_result"] = properties.pop("gradient")
-
- # Final output_data assignments needed for the AtomicResult object
- output_data["properties"] = properties
- output_data["extras"].update(extras)
- output_data["schema_name"] = "qcschema_output"
- output_data["stdout"] = outfiles["dispatch.out"]
- output_data["success"] = True
-
- return AtomicResult(**output_data)
diff --git a/qcengine/programs/mopac.py b/qcengine/programs/mopac.py
deleted file mode 100644
index e97a319c8..000000000
--- a/qcengine/programs/mopac.py
+++ /dev/null
@@ -1,299 +0,0 @@
-"""
-Calls the Psi4 executable.
-"""
-import os
-from typing import Any, Dict, List, Optional, Tuple
-
-from qcelemental.models import AtomicResult
-from qcelemental.util import which
-
-from ..exceptions import InputError, UnknownError
-from ..util import execute
-from .model import ProgramHarness
-
-
-class MopacHarness(ProgramHarness):
-
- _defaults = {
- "name": "MOPAC",
- "scratch": True, # Input/output file
- "thread_safe": True,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- def __init__(self, **kwargs):
- extras = { # All units taken from within MOPAC
- "bohr_to_angstroms": 0.5291772083,
- "hartree_to_ev": 27.2113834,
- "ev_to_kcalmol": 23.060529,
- }
- extras["au_to_debye"] = 2.99792458e10 * 1.602176462e0 * 1e-10 * extras["bohr_to_angstroms"]
- extras["hartree_to_kcalmol"] = extras["hartree_to_ev"] * extras["ev_to_kcalmol"]
-
- kwargs["extras"] = extras
- super().__init__(**kwargs)
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "mopac",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install -c conda-forge mopac`",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- # Not really possible to pull at the moment, MolSSI will add a version ability
- return "2016"
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- self.found(raise_error=True)
-
- exec_command = self.build_input(input_model, config)
-
- success, output = self.execute(exec_command)
-
- ret = self.parse_output(output["outfiles"], input_model)
-
- # Determine whether the calculation succeeded
- if success:
- # raise Exception()
- return ret
- else:
- return UnknownError(ret["stderr"])
-
- def execute(
- self,
- inputs: Dict[str, Any],
- extra_infiles: Optional[Dict[str, str]] = None,
- extra_outfiles: Optional[List[str]] = None,
- extra_commands: Optional[List[str]] = None,
- scratch_name: Optional[str] = None,
- scratch_messy: bool = False,
- timeout: Optional[int] = None,
- ) -> Tuple[bool, Dict[str, Any]]:
- """
- For option documentation go look at qcengine/util.execute
- """
-
- infiles = inputs["infiles"]
- if extra_infiles is not None:
- infiles.update(extra_infiles)
-
- outfiles = inputs["outfiles"]
- if extra_outfiles is not None:
- outfiles.extend(extra_outfiles)
-
- command = inputs["command"]
- if extra_commands is not None:
- command.extend(extra_commands)
-
- exe_success, proc = execute(
- command,
- infiles=infiles,
- outfiles=outfiles,
- scratch_directory=inputs["scratch_directory"],
- scratch_name=scratch_name,
- scratch_messy=scratch_messy,
- timeout=timeout,
- environment=inputs.get("environment", None),
- )
- return exe_success, proc
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
-
- if template is not None:
- raise KeyError("MOPAC does not currently support input templates.")
-
- method = input_model.model.method.lower()
- if method not in {
- "mndo",
- "am1",
- "pm3",
- "rm1",
- "mndod",
- "pm6",
- "pm6-d3",
- "pm6-dh+",
- "pm6-dh2",
- "pm6-dh2x",
- "pm6-d3h4",
- "pm6-3dh4x",
- "pm7",
- "pm7-ts",
- }:
- raise InputError(f"MOPAC does not have method: {method.upper()}")
-
- if input_model.driver not in ["energy", "gradient"]:
- raise InputError(f"Driver {input_model.driver} not implemented for MOPAC.")
-
- input_file = []
-
- keywords = {"ITER": 100, "PULAY": True}
- keywords.update({k.upper(): v for k, v in input_model.keywords.items()})
-
- if keywords["PULAY"]:
- pulay = " PULAY"
- else:
- pulay = " "
-
- unknown_keywords = keywords.keys() - {"ITER", "PULAY"}
- if unknown_keywords:
- raise InputError(f"Unknown keywords given to MOPAC: {unknown_keywords}")
-
- # 1SCF says not to compute a geometry optimization, always compute a gradient (free), and dump the aux file
- input_file.append(
- f"{method.upper()} "
- f"CHARGE={input_model.molecule.molecular_charge} "
- f"MS={(input_model.molecule.molecular_multiplicity-1)/2}&"
- )
- input_file.append(f"1SCF GRADIENTS AUX(PRECISION=9, XP, XS, XW) A0{pulay} ITER={keywords['ITER']}&")
-
- # input_file[-1] = input_file[-1][:-1]
- input_file.append("")
-
- mol = input_model.molecule
-
- for x in range(len(mol.symbols)):
- input_file.append(
- f"{mol.symbols[x]} {mol.geometry[x, 0]:17.12f} {mol.geometry[x, 1]:17.12f} {mol.geometry[x, 2]:17.12f}"
- )
-
- env = os.environ.copy()
- env["MKL_NUM_THREADS"] = str(config.ncores)
- env["OMP_NUM_THREADS"] = str(config.ncores)
-
- return {
- "command": ["mopac", "dispatch.mop"],
- "infiles": {"dispatch.mop": "\n".join(input_file)},
- "outfiles": {"dispatch.out", "dispatch.aux"},
- "scratch_directory": config.scratch_directory,
- "environment": env,
- }
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
-
- keep_keys = {
- "heat_of_formation",
- "energy_electronic",
- "energy_nuclear",
- "gradient_norm",
- "dip_vec",
- "spin_component",
- "total_spin",
- "molecular_weight",
- "molecular_weight",
- "total_energy",
- "gradients",
- "mopac_version",
- "atom_charges",
- "point_group",
- }
-
- # Convert back to atomic units
- conversions = {
- "KCAL/MOL": 1 / self.extras["hartree_to_kcalmol"],
- "KCAL/MOL/ANGSTROM": self.extras["bohr_to_angstroms"] / self.extras["hartree_to_kcalmol"],
- "EV": 1 / self.extras["hartree_to_ev"],
- "DEBYE": 1 / self.extras["au_to_debye"],
- "AMU": 1,
- None: 1,
- }
-
- data = {}
- last_key = None
-
- # Parse the weird structure
- if outfiles["dispatch.aux"] is None:
- error = "An unknown error occured and no results were captured."
- if outfiles["dispatch.out"] is not None:
- error = outfiles["dispatch.out"]
- raise UnknownError(error)
-
- for line in outfiles["dispatch.aux"].splitlines():
- if ("START" in line) or ("END" in line) or ("#" in line):
- continue
-
- if "=" in line:
-
- # Primary split
- key, value = line.split("=", 1)
-
- # Format key, may have units
- # IONIZATION_POTENTIAL:EV
- # GRADIENTS:KCAL/MOL/ANGSTROM[09]
- key_list = key.split(":", 1)
- if len(key_list) == 1:
- key, units = key_list[0], None
- else:
- key, units = key.split(":", 1)
-
- # Pop off [xx] items
- if units and "[" in units:
- units, _ = units.split("[", 1)
-
- if "[" in key:
- key, _ = key.split("[", 1)
-
- key = key.strip().lower()
- last_key = key
-
- # Skip keys that are not useful
- if key not in keep_keys:
- last_key = None
- continue
-
- # 1D+3 -> 1E3 conversion
- cf = conversions[units]
-
- value = value.strip().replace("D+", "E+").replace("D-", "E-")
- if ("E+" in value) or ("E-" in value):
- if value.count("E") > 1:
- value = [float(x) * cf for x in value.split()]
- else:
- value = float(value) * cf
-
- if value == "":
- value = []
-
- data[key] = (cf, value)
- else:
- if last_key is None:
- continue
-
- cf = data[last_key][0]
- data[last_key][1].extend([float(x) * cf for x in line.split()])
-
- data = {k: v[1] for k, v in data.items()}
- if ("gradients" not in data) or ("mopac_version" not in data):
- raise UnknownError("Could not correctly parse the MOPAC output file.")
-
- gradient = data.pop("gradients")
-
- output = input_model.dict()
- output["provenance"] = {"creator": "mopac", "version": data.pop("mopac_version")}
-
- output["properties"] = {}
- output["properties"]["return_energy"] = data["heat_of_formation"]
-
- output["extras"].update(data)
-
- if input_model.driver == "energy":
- output["return_result"] = data["heat_of_formation"]
- else:
- output["return_result"] = gradient
-
- output["stdout"] = outfiles["dispatch.out"]
- output["success"] = True
-
- return AtomicResult(**output)
diff --git a/qcengine/programs/mp2d.py b/qcengine/programs/mp2d.py
deleted file mode 100644
index 2fd08c8aa..000000000
--- a/qcengine/programs/mp2d.py
+++ /dev/null
@@ -1,234 +0,0 @@
-"""Compute dispersion correction using Greenwell & Beran's MP2D executable."""
-
-import pprint
-import re
-import sys
-from decimal import Decimal
-from typing import Any, Dict, Optional, Tuple
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.models import AtomicResult, Provenance
-from qcelemental.util import safe_version, which
-
-from ..exceptions import InputError, ResourceError, UnknownError
-from ..util import execute
-from . import empirical_dispersion_resources
-from .model import ProgramHarness
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-
-
-class MP2DHarness(ProgramHarness):
-
- _defaults = {
- "name": "MP2D",
- "scratch": True,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "mp2d",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install mp2d -c psi4`",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("mp2d")
- if which_prog not in self.version_cache:
- # Note: anything below v1.1 will return an input error message here. but that's fine as version compare evals to False.
- command = [which_prog, "--version"]
- import subprocess
-
- proc = subprocess.run(command, stdout=subprocess.PIPE)
- self.version_cache[which_prog] = safe_version(proc.stdout.decode("utf-8").strip())
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- from ..testing import is_program_new_enough
-
- self.found(raise_error=True)
-
- if not is_program_new_enough("mp2d", "1.1"):
- raise ResourceError(f"MP2D version '{self.get_version()}' too old. Please update to at least '1.1'.")
-
- job_inputs = self.build_input(input_model, config)
-
- success, dexe = self.execute(job_inputs)
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- dexe["outfiles"]["input"] = " ".join(job_inputs["command"])
- dexe["outfiles"]["mp2d_geometry"] = job_inputs["infiles"]["mp2d_geometry"]
- output_model = self.parse_output(dexe["outfiles"], input_model)
-
- else:
- output_model = input_model
- output_model["error"] = {"error_type": "execution_error", "error_message": dexe["stderr"]}
-
- return output_model
-
- def execute(
- self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None
- ) -> Tuple[bool, Dict]:
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- inputs["outfiles"],
- scratch_messy=inputs["scratch_messy"],
- scratch_directory=inputs["scratch_directory"],
- )
- return success, dexe
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
-
- # strip engine hint
- mtd = input_model.model.method
- if mtd.startswith("mp2d-"):
- mtd = mtd[5:]
-
- if input_model.driver.derivative_int() > 1:
- raise InputError(f"Driver {input_model.driver} not implemented for MP2D.")
-
- # temp until actual options object
- input_model.extras["info"] = empirical_dispersion_resources.from_arrays(
- name_hint=mtd,
- level_hint=input_model.keywords.get("level_hint", None),
- param_tweaks=input_model.keywords.get("params_tweaks", None),
- dashcoeff_supplement=input_model.keywords.get("dashcoeff_supplement", None),
- )
-
- # Need 'real' field later and that's only guaranteed for molrec
- molrec = qcel.molparse.from_schema(input_model.molecule.dict())
- xyz = qcel.molparse.to_string(molrec, dtype="xyz", units="Angstrom", ghost_format="")
- infiles = {"mp2d_geometry": xyz}
- # jobrec['molecule']['real'] = molrec['real']
-
- # env = {
- # 'HOME': os.environ.get('HOME'),
- # 'PATH': os.environ.get('PATH'),
- # #'PATH': os.pathsep.join([os.path.abspath(x) for x in os.environ.get('PSIPATH', '').split(os.pathsep) if x != '']) + \
- # # os.pathsep + os.environ.get('PATH'),
- # #'LD_LIBRARY_PATH': os.environ.get('LD_LIBRARY_PATH'),
- # }
-
- command = ["mp2d", "mp2d_geometry"]
- command.extend(
- """--TT_a1={a1} --TT_a2={a2} --rcut={rcut} --w={w} --s8={s8}""".format(
- **input_model.extras["info"]["dashparams"]
- ).split()
- )
- if input_model.driver == "gradient":
- command.append("--gradient")
-
- return {
- "command": command,
- "infiles": infiles,
- "outfiles": ["mp2d_gradient"],
- "scratch_messy": config.scratch_messy,
- "scratch_directory": config.scratch_directory,
- "input_result": input_model.copy(deep=True),
- }
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- for fl, contents in outfiles.items():
- if contents is not None:
- # LOG text += f'\n MP2D scratch file {fl} has been read.\n'
- pass
-
- # parse energy output (could go further and break into UCHF, CKS)
- real = np.array(input_model.molecule.real)
- full_nat = real.shape[0]
- real_nat = np.sum(real)
-
- for ln in stdout.splitlines():
- if re.match(" MP2D dispersion correction Eh", ln):
- ene = Decimal(ln.split()[4])
- elif re.match("Atomic Coordinates in Angstroms", ln):
- break
- else:
- if not ((real_nat == 1) and (input_model.driver == "gradient")):
- raise UnknownError("Unknown issue occured.")
-
- # parse gradient output
- if outfiles["mp2d_gradient"] is not None:
- srealgrad = outfiles["mp2d_gradient"]
- realgrad = np.fromstring(srealgrad, count=3 * real_nat, sep=" ").reshape((-1, 3))
-
- if input_model.driver == "gradient":
- ireal = np.argwhere(real).reshape((-1))
- fullgrad = np.zeros((full_nat, 3))
- try:
- fullgrad[ireal, :] = realgrad
- except NameError as exc:
- raise UnknownError("Unsuccessful gradient collection.") from exc
-
- qcvkey = input_model.extras["info"]["fctldash"].upper()
-
- calcinfo = []
- calcinfo.append(qcel.Datum("CURRENT ENERGY", "Eh", ene))
- calcinfo.append(qcel.Datum("DISPERSION CORRECTION ENERGY", "Eh", ene))
- calcinfo.append(qcel.Datum("2-BODY DISPERSION CORRECTION ENERGY", "Eh", ene))
- if qcvkey:
- calcinfo.append(qcel.Datum(f"{qcvkey} DISPERSION CORRECTION ENERGY", "Eh", ene))
-
- if input_model.driver == "gradient":
- calcinfo.append(qcel.Datum("CURRENT GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
- calcinfo.append(qcel.Datum("2-BODY DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
- if qcvkey:
- calcinfo.append(qcel.Datum(f"{qcvkey} DISPERSION CORRECTION GRADIENT", "Eh/a0", fullgrad))
-
- # LOGtext += qcel.datum.print_variables({info.label: info for info in calcinfo})
- calcinfo = {info.label: info.data for info in calcinfo}
- # calcinfo = qcel.util.unnp(calcinfo, flat=True)
-
- # got to even out who needs plump/flat/Decimal/float/ndarray/list
- # Decimal --> str preserves precision
- calcinfo = {k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in calcinfo.items()}
-
- # jobrec['properties'] = {"return_energy": ene}
- # jobrec["molecule"]["real"] = list(jobrec["molecule"]["real"])
-
- retres = calcinfo[f"CURRENT {input_model.driver.upper()}"]
- if isinstance(retres, Decimal):
- retres = float(retres)
- elif isinstance(retres, np.ndarray):
- retres = retres.ravel().tolist()
-
- output_data = {
- "extras": input_model.extras,
- "native_files": {k: v for k, v in outfiles.items() if v is not None},
- "properties": {},
- "provenance": Provenance(
- creator="MP2D", version=self.get_version(), routine=__name__ + "." + sys._getframe().f_code.co_name
- ),
- "return_result": retres,
- "stderr": stderr,
- "stdout": stdout,
- }
- output_data["extras"]["local_keywords"] = input_model.extras["info"]
- output_data["extras"]["qcvars"] = calcinfo
-
- output_data["success"] = True
- return AtomicResult(**{**input_model.dict(), **output_data})
diff --git a/qcengine/programs/mrchem.py b/qcengine/programs/mrchem.py
deleted file mode 100644
index e52c889ee..000000000
--- a/qcengine/programs/mrchem.py
+++ /dev/null
@@ -1,339 +0,0 @@
-"""
-Calls the MRChem executable.
-"""
-import copy
-import json
-import logging
-import pprint
-import sys
-from collections import Counter
-from functools import reduce
-from pathlib import Path
-from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple
-
-from qcelemental.models import AtomicResult
-from qcelemental.util import safe_version, which
-
-from ..exceptions import InputError, RandomError, UnknownError
-from ..util import create_mpi_invocation, execute, popen, temporary_directory
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-logger = logging.getLogger(__name__)
-
-
-class MRChemHarness(ProgramHarness):
-
- _defaults = {
- "name": "MRChem",
- "scratch": False,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": True,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Whether MRChem harness is ready for operation.
-
- Parameters
- ----------
- raise_error: bool
- Passed on to control negative return between False and ModuleNotFoundError raised.
-
- Returns
- -------
- bool
- If mrchem and mrchem.x are found, returns True.
- If raise_error is False and MRChem is missing, returns False.
- If raise_error is True and MRChem is missing, the error message is raised.
-
- """
- mrchem_x = which(
- "mrchem.x",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via https://mrchem.readthedocs.io",
- )
- mrchem = which(
- "mrchem",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via https://mrchem.readthedocs.io",
- )
-
- return mrchem and mrchem_x
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("mrchem.x")
- if which_prog not in self.version_cache:
- with popen([which_prog, "--version"]) as exc:
- exc["proc"].wait(timeout=30)
- self.version_cache[which_prog] = safe_version(exc["stdout"].split()[-1])
-
- candidate_version = self.version_cache[which_prog]
-
- return candidate_version
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Runs MRChem in executable mode
- """
- self.found(raise_error=True)
-
- # Location resolution order config.scratch_dir, /tmp
- parent = config.scratch_directory
-
- error_message = None
- compute_success = False
-
- job_input = self.build_input(input_model, config)
- input_data = copy.deepcopy(job_input["mrchem_json"])
-
- output_data = {
- "keywords": input_data,
- "schema_name": "qcschema_output",
- "schema_version": 1,
- "model": input_model.model,
- "molecule": input_model.molecule,
- "driver": input_model.driver,
- "extras": input_model.extras,
- }
-
- with temporary_directory(parent=parent, suffix="_mrchem_scratch") as tmpdir:
- # create folders
- for d in job_input["folders"]:
- if not Path(d).exists():
- Path(d).mkdir()
-
- # Execute the program
- success, output = execute(
- command=job_input["command"] + ["data.json"],
- infiles={"data.json": json.dumps(job_input["mrchem_json"])},
- outfiles=["data.json"],
- scratch_directory=tmpdir,
- )
-
- if success:
- output_data["stdout"] = output["stdout"]
- # get data from the MRChem JSON output and transfer it to the QCSchema output
- mrchem_json = json.loads(output["outfiles"]["data.json"])
- mrchem_output = mrchem_json["output"]
- output_data["success"] = mrchem_output["success"]
- output_data["provenance"] = mrchem_output["provenance"]
- # parallel set up
- output_data["provenance"].update(job_input["parallel"])
- # remove nthreads, above info is more detailed anyway
- output_data["provenance"].pop("nthreads")
- # update the "routine" under "provenance"
- output_data["provenance"]["routine"] = " ".join(job_input["command"])
-
- # fill up properties
- output_data["properties"] = extract_properties(mrchem_output)
-
- # prepare a list of computed response properties
- known_rsp_props = [
- ("dipole_moment", "vector"),
- ("quadrupole_moment", "tensor"),
- ("polarizability", "tensor"),
- ("magnetizability", "tensor"),
- ("nmr_shielding", "tensor"),
- ]
- computed_rsp_props = [
- ("properties", x, y, z)
- for x, z in known_rsp_props
- if x in mrchem_output["properties"]
- for y in mrchem_output["properties"][x].keys()
- ]
-
- # fill up extras:
- # * under "raw_output" the whole JSON output from MRChem
- # * under "properties" all the properties computed by MRChem
- output_data["extras"].update(
- {
- "raw_output": mrchem_json,
- "properties": {
- f"{ks[1]}": {f"{ks[2]}": _nested_get(mrchem_output, ks)} for ks in computed_rsp_props
- },
- }
- )
-
- # fill up return_result
- if input_model.driver == "energy":
- output_data["return_result"] = mrchem_output["properties"]["scf_energy"]["E_tot"]
- elif input_model.driver == "gradient":
- output_data["return_result"] = mrchem_output["properties"]["geometric_derivative"]["geom-1"][
- "total"
- ]
- elif input_model.driver == "properties":
- output_data["return_result"] = {
- f"{ks[1]}": {f"{ks[2]}": _nested_get(mrchem_output, ks)} for ks in computed_rsp_props
- }
- else:
- raise InputError(f"Driver {input_model.driver} not implemented for MRChem.")
-
- compute_success = mrchem_output["success"]
-
- else:
- output_data["stderr"] = output["stderr"]
- output_data["error"] = {
- "error_message": output["stderr"],
- "error_type": "execution_error",
- }
-
- # Dispatch errors, PSIO Errors are not recoverable for future runs
- if compute_success is False:
-
- if ("SIGSEV" in error_message) or ("SIGSEGV" in error_message) or ("segmentation fault" in error_message):
- raise RandomError(error_message)
- else:
- raise UnknownError(error_message)
-
- return AtomicResult(**output_data)
-
- def build_input(self, input_model: "AtomicInput", config: "TaskConfig") -> Dict[str, Any]:
- with popen([which("mrchem"), "--module"]) as exc:
- exc["proc"].wait(timeout=30)
- sys.path.append(exc["stdout"].split()[-1])
- from mrchem import translate_input, validate
-
- ranks_per_node = config.ncores // config.cores_per_rank if config.use_mpiexec else 1
- mrchemrec = {
- "scratch_directory": config.scratch_directory,
- # parallel set up
- "parallel": {
- "ncores": config.ncores,
- "nnodes": config.nnodes,
- "ranks_per_node": ranks_per_node,
- "cores_per_rank": config.cores_per_rank,
- "total_cores": config.nnodes * ranks_per_node * config.cores_per_rank,
- "total_ranks": config.nnodes * ranks_per_node,
- },
- }
-
- opts = copy.deepcopy(input_model.keywords)
-
- # Handle molecule
- _, moldict = input_model.molecule.to_string(
- dtype="mrchem", units=opts.get("world_unit", "bohr"), return_data=True
- )
- opts["Molecule"] = moldict["keywords"]
-
- if "WaveFunction" in opts.keys():
- opts["WaveFunction"]["method"] = input_model.model.method
- else:
- opts["WaveFunction"] = {"method": input_model.model.method}
-
- # The molecular gradient is just a first-order property for MRChem
- if input_model.driver == "gradient":
- opts.update({"Properties": {"geometric_derivative": True}})
-
- # Log the job settings as constructed from the input model
- logger.debug("JOB_OPTS from InputModel")
- logger.debug(pp.pformat(opts))
-
- try:
- opts = validate(ir_in=opts)
- except Exception as e:
- raise InputError(f"Failure preparing input to MRChem\n {str(e)}")
- # Log the validated job settings
- logger.debug("JOB_OPTS after validation")
- logger.debug(pp.pformat(opts))
- mrchemrec["folders"] = [
- opts["SCF"]["path_checkpoint"],
- opts["SCF"]["path_orbitals"],
- opts["Response"]["path_checkpoint"],
- opts["Response"]["path_orbitals"],
- opts["Plotter"]["path"],
- ]
-
- try:
- opts = translate_input(opts)
- except Exception as e:
- raise InputError(f"Failure preparing input to MRChem\n {str(e)}")
- opts["printer"]["file_name"] = "data.inp"
- # Log the final job settings
- logger.debug("JOB_OPTS after translation")
- logger.debug(pp.pformat(opts))
-
- mrchemrec["mrchem_json"] = {
- "input": opts,
- }
-
- # Determine the command
- if config.use_mpiexec:
- mrchemrec["command"] = create_mpi_invocation(which("mrchem.x"), config)
- logger.info(f"Launching with mpiexec: {' '.join(mrchemrec['command'])}")
- else:
- mrchemrec["command"] = [which("mrchem.x")]
-
- return mrchemrec
-
-
-def extract_properties(mrchem_output: Dict[str, Any]) -> Dict[str, Any]:
- """Translate MRChem output to QCSChema properties.
-
- Parameters
- ----------
-
- Returns
- -------
- """
-
- occs = Counter(mrchem_output["properties"]["orbital_energies"]["spin"])
- properties = {
- "calcinfo_nmo": 2 * occs["p"] + occs["a"] + occs["b"],
- "calcinfo_nalpha": occs["p"] + occs["a"],
- "calcinfo_nbeta": occs["p"] + occs["b"],
- "calcinfo_natom": len(mrchem_output["properties"]["geometry"]),
- "return_energy": mrchem_output["properties"]["scf_energy"]["E_tot"],
- "scf_one_electron_energy": mrchem_output["properties"]["scf_energy"]["E_kin"]
- + mrchem_output["properties"]["scf_energy"]["E_en"]
- + mrchem_output["properties"]["scf_energy"]["E_next"]
- + mrchem_output["properties"]["scf_energy"]["E_eext"],
- "scf_two_electron_energy": mrchem_output["properties"]["scf_energy"]["E_ee"]
- + mrchem_output["properties"]["scf_energy"]["E_x"]
- + mrchem_output["properties"]["scf_energy"]["E_xc"],
- "nuclear_repulsion_energy": mrchem_output["properties"]["scf_energy"]["E_nn"],
- "scf_xc_energy": mrchem_output["properties"]["scf_energy"]["E_xc"],
- "scf_total_energy": mrchem_output["properties"]["scf_energy"]["E_tot"],
- "scf_iterations": len(mrchem_output["scf_calculation"]["scf_solver"]["cycles"]),
- "scf_dipole_moment": mrchem_output["properties"]["dipole_moment"]["dip-1"]["vector"],
- }
-
- return properties
-
-
-def _nested_get(d: Dict[str, Any], ks: Tuple[str, ...]) -> Optional[Any]:
- """Get value from a nested dictionary.
-
- Parameters
- ----------
- d : Dict[str, Any]
- ks : str
-
- Returns
- -------
- v : Optional[Any]
-
- Notes
- -----
- Adapted from: https://stackoverflow.com/a/40675868/2528668
- """
-
- def _func(x: Dict[str, Any], k: str) -> Optional[Dict[str, Any]]:
- return x.get(k, None) if isinstance(x, dict) else None
-
- return reduce(_func, ks, d) # type: ignore
diff --git a/qcengine/programs/nwchem/__init__.py b/qcengine/programs/nwchem/__init__.py
deleted file mode 100644
index 5a9766069..000000000
--- a/qcengine/programs/nwchem/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .runner import NWChemHarness
diff --git a/qcengine/programs/nwchem/errors.py b/qcengine/programs/nwchem/errors.py
deleted file mode 100644
index e1c214d14..000000000
--- a/qcengine/programs/nwchem/errors.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""Known errors for NWChem"""
-import logging
-from typing import Any, Dict
-
-from qcelemental.models import AtomicInput
-
-from qcengine.exceptions import SimpleKnownErrorException
-from qcengine.programs.nwchem.germinate import xc_functionals
-
-logger = logging.getLogger(__name__)
-
-
-class GeomBinvrError(SimpleKnownErrorException):
- """GeomBinvr Error"""
-
- error_name = "geom_binvr"
- description = "Error when generating redundant atomic coordinates. Often fixed by turning autoz off (`noautoz`)"
-
- @classmethod
- def _detect(cls, outputs: Dict[str, str]) -> bool:
- return "geom_binvr: #indep variables incorrect" in outputs["stdout"]
-
- def create_keyword_update(self, input_data: AtomicInput) -> Dict[str, Any]:
- return {"geometry__noautoz": True}
-
-
-class ConvergenceFailedError(SimpleKnownErrorException):
- """Failed to converge on electronic steps. This will increase the limit by 4x"""
-
- error_name = "convergence_failed"
- description = "The computation failed to converge."
-
- @classmethod
- def _detect(cls, outputs: Dict[str, str]) -> bool:
- return (
- "This type of error is most commonly" in outputs["stdout"] and "convergence criteria" in outputs["stdout"]
- )
-
- def create_keyword_update(self, input_data: AtomicInput) -> Dict[str, Any]:
- # Fit the correct keyword we are looking to update is different for different methods
- method = input_data.model.method
- use_tce = input_data.keywords.get("qc_module", False)
-
- if method == "dft" or method.split()[0] in xc_functionals:
- if "dft__iterations" in input_data.keywords:
- kwd = "dft__iterations"
- cur_iter = input_data.keywords["dft__iterations"]
- elif "dft__maxiter" in input_data.keywords:
- kwd = "dft__maxiter"
- cur_iter = input_data.keywords["dft__maxiter"]
- else:
- kwd = "dft__maxiter"
- cur_iter = 20 # The NWChem default
- elif method in ["scf", "hf", "mp2"]:
- kwd = "scf__maxiter"
- cur_iter = input_data.keywords.get(kwd, 8)
- elif method.startswith("ccsd") and not use_tce:
- kwd = "ccsd__maxiter"
- cur_iter = input_data.keywords.get(kwd, 20)
- elif method.startswith("ccsd") and use_tce:
- kwd = "tce__maxiter"
- cur_iter = input_data.keywords.get(kwd, 100)
- else:
- raise ValueError(f'Method "{method}" is not yet supported')
-
- return {kwd: cur_iter * 4}
-
-
-# List of all the known errors
-all_errors = [GeomBinvrError, ConvergenceFailedError]
diff --git a/qcengine/programs/nwchem/germinate.py b/qcengine/programs/nwchem/germinate.py
deleted file mode 100644
index 2ccc62b40..000000000
--- a/qcengine/programs/nwchem/germinate.py
+++ /dev/null
@@ -1,204 +0,0 @@
-from typing import Any, Dict, Tuple
-
-from qcengine.exceptions import InputError
-
-# List of XC functionals known to NWChem
-xc_functionals = [
- "acm",
- "b3lyp",
- "beckehandh",
- "pbe0",
- "becke97",
- "becke97-1",
- "becke97-2",
- "becke97-3",
- "becke97-d",
- "becke98",
- "hcth",
- "hcth120",
- "hcth147",
- "hcth407",
- "becke97gga1",
- "hcth407p",
- "mpw91",
- "mpw1k",
- "xft97",
- "cft97",
- "ft97",
- "op",
- "bop",
- "pbeop",
- "xpkzb99",
- "cpkzb99",
- "xtpss03",
- "ctpss03",
- "xctpssh",
- "b1b95",
- "bb1k",
- "mpw1b95",
- "mpwb1k",
- "pw6b95",
- "pwb6k",
- "m05",
- "m05-2x",
- "vs98",
- "m06",
- "m06-hf",
- "m06-L",
- "m06-2x",
- "hfexch",
- "becke88",
- "xperdew91",
- "xpbe96",
- "gill96",
- "lyp",
- "perdew81",
- "perdew86",
- "perdew91",
- "cpbe96",
- "pw91lda",
- "slater",
- "vwn_1",
- "vwn_2",
- "vwn_3",
- "vwn_4",
- "vwn_5",
- "vwn_1_rpa",
- "xtpss03",
- "ctpss03",
- "bc95",
- "xpw6b95",
- "xpwb6k",
- "xm05",
- "xm05-2x",
- "cpw6b95",
- "cpwb6k",
- "cm05",
- "cm05-2x",
- "xvs98",
- "cvs98",
- "xm06-L",
- "xm06-hf",
- "xm06",
- "xm06-2x",
- "cm06-L",
- "cm06-hf",
- "cm06",
- "cm06-2x",
-]
-
-
-def muster_modelchem(method: str, derint: int, use_tce: bool) -> Tuple[str, Dict[str, Any]]:
- """Converts the QC method into NWChem keywords
-
- Args:
- method (str): Name of the QC method to use
- derint (str): Index of the run type
- use_tce (bool): Whether to use the Tensor Contraction Engine
- Returns:
- (str): Task command for NWChem
- (dict): Any options for NWChem
- """
-
- # Standardize the method name
- method = method.lower()
- opts = {}
-
- # Map the run type to
- runtyp = {"energy": "energy", "gradient": "gradient", "hessian": "hessian", "properties": "property"}[derint]
-
- # Write out the theory directive
- if method == "nwchem":
- mdccmd = ""
-
- elif method in ["scf", "hf"]:
- mdccmd = f"task scf {runtyp}\n\n"
-
- elif method == "mp2":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__mp2"] = True
- else:
- mdccmd = f"task mp2 {runtyp}\n\n"
-
- elif method == "mp3":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__mp3"] = True
-
- elif method == "mp4":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__mp4"] = True
-
- elif method == "ccd":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__ccd"] = True
-
- elif method == "ccsd":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__ccsd"] = True
- else:
- mdccmd = f"task ccsd {runtyp}\n\n"
-
- elif method == "ccsd+t(ccsd)":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__ccsd(t)"] = True
- else:
- mdccmd = f"task ccsd+t(ccsd) {runtyp}\n\n"
-
- elif method == "ccsd(t)":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__ccsd(t)"] = True
- else:
- mdccmd = f"task ccsd(t) {runtyp}\n\n"
-
- elif method == "ccsdt":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__ccsdt"] = True
- else:
- mdccmd = f"task ccsdt {runtyp}\n\n"
-
- elif method == "tddft":
- mdccmd = f"task tddft {runtyp}\n\n"
-
- elif method in ["sodft", "direct_mp2", "rimp2", "mcscf", "selci", "md", "pspw", "band"]:
- raise InputError(f'Method "{method}" not yet supported by QCEngine')
-
- elif method == "tce":
- raise InputError(
- f"Do not specify TCE as a method. Instead specify the desired method " f'as a keyword and "qc_module=True".'
- )
-
- elif method.split()[0] in xc_functionals:
- opts["dft__xc"] = method
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__"] = "dft"
- else:
- mdccmd = f"task dft {runtyp}\n\n"
-
- elif method == "pbe":
- opts["dft__xc"] = "xpbe96 cpbe96"
- mdccmd = f"task dft {runtyp}\n\n"
-
- elif method == "b3lyp5":
- opts["dft__xc"] = "hfexch 0.2 slater 0.8 becke88 nonlocal 0.72 vwn_5 0.190 lyp 0.81"
- mdccmd = f"task dft {runtyp}\n\n"
-
- elif method == "dft":
- if use_tce:
- mdccmd = f"task tce {runtyp}\n\n"
- opts["tce__"] = "dft"
- else:
- mdccmd = f"task dft {runtyp}\n\n"
-
- else:
- raise InputError(f"Method not recognized: {method}")
-
- return mdccmd, opts
diff --git a/qcengine/programs/nwchem/harvester.py b/qcengine/programs/nwchem/harvester.py
deleted file mode 100644
index 94425ba9a..000000000
--- a/qcengine/programs/nwchem/harvester.py
+++ /dev/null
@@ -1,1232 +0,0 @@
-import json
-import logging
-import re
-from decimal import Decimal
-from typing import Optional, Tuple
-
-import numpy as np
-import qcelemental as qcel
-from qcelemental.models import Molecule
-from qcelemental.molparse import regex
-
-from ..util import PreservingDict
-
-logger = logging.getLogger(__name__)
-
-
-def harvest_output(outtext: str) -> Tuple[PreservingDict, Molecule, list, str, str]:
- """Function to read an entire NWChem output file.
-
- Reads all of the different "line search" segments of a file and returns
- values from the last segment for which a geometry was written.
-
- Args:
- outtext (str): Output written to stdout
- Returns:
- - (PreservingDict) Variables extracted from the output file in the last complete step
- - (Molecule): Molecule from the last complete step
- - (list): Gradient from the last complete step
- - (str): Version string
- - (str): Error message, if any
- """
-
- # Loop over all steps
- # TODO (wardlt): Is it only necessary to read the last two steps?
- pass_psivar = []
- pass_coord = []
- pass_grad = []
- for outpass in re.split(r" Line search:", outtext, re.MULTILINE):
- psivar, nwcoord, nwgrad, version, module, error = harvest_outfile_pass(outpass)
- pass_psivar.append(psivar)
- pass_coord.append(nwcoord)
- pass_grad.append(nwgrad)
-
- # Determine which segment contained the last geometry
- retindx = -1 if pass_coord[-1] else -2
-
- return pass_psivar[retindx], pass_coord[retindx], pass_grad[retindx], version, module, error
-
-
-def harvest_outfile_pass(outtext):
- """Function to read NWChem output file *outtext* and parse important
- quantum chemical information from it in
-
- """
- psivar = PreservingDict()
- psivar_coord = None
- psivar_grad = None
- version = ""
- module = None
- error = "" # TODO (wardlt): The error string is never used.
-
- NUMBER = r"(?x:" + regex.NUMBER + ")"
-
- # Process version
- mobj = re.search(
- r"^\s+" + r"Northwest Computational Chemistry Package (NWChem)" + r"\s+" + r"(?:\d+.\d+)" + r"\s*$",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched version")
- version = mobj.group("version")
-
- # Process SCF
- # 1)Fail to converge
- mobj = re.search(r"^\s+" + r"(?:Calculation failed to converge)" + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("failed to converge")
-
- # 2)Calculation converged
- else:
- mobj = re.search(r"^\s+" + r"(?:Total SCF energy)" + r"\s+=\s*" + NUMBER + r"s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched HF")
- psivar["HF TOTAL ENERGY"] = mobj.group(1)
-
- # Process Effective nuclear repulsion energy (a.u.)
- mobj = re.search(
- r"^\s+" + r"Effective nuclear repulsion energy \(a\.u\.\)" + r"\s+" + NUMBER + r"\s*$",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched NRE")
- # logger.debug (mobj.group(1))
- psivar["NUCLEAR REPULSION ENERGY"] = mobj.group(1)
-
- # Process DFT dispersion energy (a.u.)
- mobj = re.search(r"^\s+" + r"(?:Dispersion correction)" + r"\s+=\s*" + NUMBER + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched Dispersion")
- logger.debug(mobj.group(1))
- psivar["DISPERSION CORRECTION ENERGY"] = mobj.group(1)
-
- # Process DFT (RDFT, RODFT,UDFT, SODFT [SODFT for nwchem versions before nwchem 6.8])
-
- mobj = re.search(r"^\s+" + r"(?:Total DFT energy)" + r"\s+=\s*" + NUMBER + r"\s*$", outtext, re.MULTILINE)
- if mobj:
- logger.debug("matched DFT")
- logger.debug(mobj.group(1))
- psivar["DFT TOTAL ENERGY"] = mobj.group(1)
-
- # SODFT [for nwchem 6.8+]
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Total SO-DFT energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Nuclear repulsion energy' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched DFT")
- # print (mobj.group(1))
- psivar["DFT TOTAL ENERGY"] = mobj.group(1)
- psivar["NUCLEAR REPULSION ENERGY"] = mobj.group(2)
-
- # MCSCF
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Total MCSCF energy' + r'\s+=\s+' + NUMBER + r'\s*$',
- # fmt: off
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched mcscf 2") # MCSCF energy calculation
- psivar["MCSCF TOTAL ENERGY"] = mobj.group(1)
-
- mobj = re.findall(
- # fmt: off
- r'^\s+' + r'Total SCF energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'One-electron energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Two-electron energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total MCSCF energy' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
-
- # for mobj_list in mobj:
-
- if mobj: # Need to change to accommodate find all instances
- logger.debug("matched mcscf") # MCSCF energy calculation
- psivar["HF TOTAL ENERGY"] = mobj.group(1)
- psivar["ONE-ELECTRON ENERGY"] = mobj.group(2)
- psivar["TWO-ELECTRON ENERGY"] = mobj.group(3)
- psivar["MCSCF TOTAL ENERGY"] = mobj.group(4)
- # for mobj_list in mobj:
- # for i in mobj_list:
- # count += 0
- # logger.debug('matched mcscf iteration %i', count)
- # psivar['HF TOTAL ENERGY'] = mobj.group(1)
- # psivar['ONE-ELECTRON ENERGY'] = mobj.group(2)
- # psivar['TWO-ELECTRON ENERGY'] = mobj.group(3)
- # psivar['MCSCF TOTAL ENERGY'] = mobj.group(4)
-
- # Process MP2 (Restricted, Unrestricted(RO n/a))
- # 1)SCF-MP2
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'SCF energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Correlation energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Singlet pairs' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Triplet pairs' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total MP2 energy' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- ) # MP2
- if mobj:
- logger.debug("matched scf-mp2")
- module = "mp2grad"
- psivar["HF TOTAL ENERGY"] = mobj.group(1)
- psivar["MP2 CORRELATION ENERGY"] = mobj.group(2)
- psivar["MP2 TOTAL ENERGY"] = mobj.group(5)
- # SCS-MP2
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Same spin pairs' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Same spin scaling factor' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Opposite spin pairs' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Opposite spin scaling fact.' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'SCS-MP2 correlation energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total SCS-MP2 energy' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched scs-mp2", mobj.groups())
- psivar["MP2 SAME-SPIN CORRELATION ENERGY"] = mobj.group(1)
- psivar["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(3)
-
- logger.debug(mobj.group(1)) # ess
- logger.debug(mobj.group(2)) # fss
- logger.debug(mobj.group(3)) # eos
- logger.debug(mobj.group(4)) # fos
- logger.debug(mobj.group(5)) # scs corl
- logger.debug(mobj.group(6)) # scs-mp2
-
- # 2) DFT-MP2
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'DFT energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Unscaled MP2 energy' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total DFT\+MP2 energy' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched dft-mp2")
- psivar.pop("DFT TOTAL ENERGY") # remove previously defined DFT energy w/o DH contribution
- psivar["DFT FUNCTIONAL TOTAL ENERGY"] = mobj.group(1)
- psivar["CURRENT REFERENCE ENERGY"] = mobj.group(1)
- psivar["DFT TOTAL ENERGY"] = mobj.group(3)
-
- # 3) MP2 with CCSD or CCSD(T) calculation (through CCSD(T) directive)
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'MP2 Energy \(coupled cluster initial guess\)' + r'\s*' +
- r'^\s+' + r'------------------------------------------' + r'\s*' +
- r'^\s+' + r'Reference energy:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'MP2 Corr\. energy:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total MP2 energy:' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched coupled cluster-mp2")
- psivar["MP2 CORRELATION ENERGY"] = mobj.group(2)
- psivar["MP2 TOTAL ENERGY"] = mobj.group(3)
-
- mobj3 = re.search(r"Final RHF results", outtext)
- if mobj3:
- psivar["MP2 DOUBLES ENERGY"] = mobj.group(2)
-
- # 4) Direct MP2
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'SCF energy' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'^\s+' + r'Correlation energy' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'^\s+' + r'Total MP2 energy' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- mobj2 = re.search(r"Direct MP2", outtext)
- if mobj and mobj2:
- logger.debug("matched direct-mp2")
- module = "directmp2"
- psivar["HF TOTAL ENERGY"] = mobj.group("hf")
- psivar["MP2 CORRELATION ENERGY"] = mobj.group("mp2corl")
- psivar["MP2 TOTAL ENERGY"] = mobj.group("mp2")
- # direct-mp2 is RHF only
- psivar["MP2 DOUBLES ENERGY"] = mobj.group("mp2corl")
-
- # 5) RI-MP2
-
- # Process calculation through tce [dertype] command
- tce_cumm_corl = 0.0
- for cc_name in [r"MBPT\(2\)", r"MBPT\(3\)", r"MBPT\(4\)"]:
- mobj = re.search(
- # fmt: off
- r'^\s+' + cc_name + r'\s+' + r'correlation energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*' +
- r'^\s+' + cc_name + r'\s+' + r'total energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- mobj3 = re.search(r"Wavefunction type : Restricted open-shell Hartree-Fock", outtext, re.MULTILINE)
-
- if mobj:
- mbpt_plain = cc_name.replace("\\", "").replace("MBPT", "MP").replace("(", "").replace(")", "")
- logger.debug(f"matched tce mbpt {mbpt_plain}", mobj.groups())
- tce_cumm_corl += float(mobj.group(1))
-
- if mbpt_plain == "MP2":
- mobj3 = re.search(r"Wavefunction type : Restricted open-shell Hartree-Fock", outtext, re.MULTILINE)
- if mobj3:
- psivar[f"{mbpt_plain} DOUBLES ENERGY"] = mobj.group(1)
- psivar[f"CURRENT CORRELATION ENERGY"] = mobj.group(1)
- psivar[f"CURRENT ENERGY"] = Decimal(mobj.group(1)) + psivar[f"HF TOTAL ENERGY"]
- else:
- psivar[f"{mbpt_plain} DOUBLES ENERGY"] = mobj.group(1)
- psivar[f"{mbpt_plain} CORRELATION ENERGY"] = mobj.group(1)
- else:
- psivar[f"{mbpt_plain} CORRECTION ENERGY"] = mobj.group(1)
- if not mobj3 and mbpt_plain not in ["MP4"]:
- psivar[f"{mbpt_plain} DOUBLES ENERGY"] = tce_cumm_corl
- psivar[f"{mbpt_plain} TOTAL ENERGY"] = mobj.group(2)
- module = "tce"
-
- # TCE dipole- MBPT(n)
- mobj2 = re.search(
- # fmt: off
- r"^\s*" + cc_name + r"\s+" + r"dipole moments \/ hartree & Debye" + r"\s*" +
- r"^\s*" + r"-+" + r"\s*" +
- r'^\s*' + r'X' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Y' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Z' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Total' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- if mobj2:
- mbpt_plain = cc_name.replace("\\", "").replace("MBPT", "MP").replace("(", "").replace(")", "")
- logger.debug(f"matched tce {mbpt_plain} dipole moment")
- # only pulling Debye
- dipole = np.array([float(mobj2.group(2)), float(mobj2.group(4)), float(mobj2.group(6))])
- psivar[f"{mbpt_plain} DIPOLE"] = dipole
-
- # TCE with () or []
- for cc_name in [
- r"CCSD\(T\)",
- r"CCSD\[T\]",
- r"CCSD\(2\)_T",
- r"CCSD\(2\)",
- r"CCSDT\(2\)_Q",
- r"CR-CCSD\[T\]",
- r"CR-CCSD\(T\)",
- r"LR-CCSD\(T\)",
- r"LR-CCSD\(TQ\)-1",
- r"CREOMSD\(T\)",
- ]:
- mobj = re.search(
- # fmt: off
- r'^\s+' + cc_name + r'\s+' + r'correction energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*' +
- r'^\s+' + cc_name + r'\s+' + r'correlation energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*' +
- r'^\s+' + cc_name + r'\s+' + r'total energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- cc_plain = cc_name.replace("\\", "")
- cc_plain.replace("CCSD", "")
- logger.debug(f"matched tce cc {cc_plain}")
-
- if cc_plain == "CCSD[T]":
- psivar[f"CCSD+T(CCSD) CORRELATION ENERGY"] = mobj.group(2)
- psivar[f"CCSD+T(CCSD) TOTAL ENERGY"] = mobj.group(3)
- else:
- # psivar[f"{cc_corr} CORRECTION ENERGY"] = mobj.group(1)
- psivar[f"{cc_plain} CORRELATION ENERGY"] = mobj.group(2)
- psivar[f"{cc_plain} TOTAL ENERGY"] = mobj.group(3)
- module = "tce"
-
- # TCE dipole with () or []
- mobj2 = re.search(
- # fmt: off
- r"^\s*" + cc_name + r"\s+" + r"dipole moments \/ hartree & Debye" + r"\s*" +
- r"^\s*" + r"-+" + r"\s*" +
- r'^\s*' + r'X' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Y' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Z' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Total' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- if mobj2:
- cc_plain = cc_name.replace("\\", "")
- cc_plain.replace("CCSD", "")
- logger.debug(f"matched tce {cc_plain} dipole moment")
-
- # only pulling Debye
- dipole = np.array([float(mobj2.group(2)), float(mobj2.group(4)), float(mobj2.group(6))])
- psivar[f"{cc_plain} DIPOLE"] = dipole
-
- # Process other TCE cases
- for cc_name in [
- r"CISD",
- r"QCISD",
- r"CISDT",
- r"CISDTQ",
- r"CCD",
- r"CC2",
- r"CCSD",
- r"CCSDT",
- r"CCSDTQ",
- r"LCCSD",
- r"LCCD",
- r"CCSDTA",
- ]:
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Iterations converged' + r'\s*' +
- r'^\s+' + cc_name + r'\s+' + r'correlation energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*' +
- r'^\s+' + cc_name + r'\s+' + r'total energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- if mobj:
- mobj3 = re.search(r"Wavefunction type : Restricted open-shell Hartree-Fock", outtext, re.MULTILINE)
- logger.debug(f"matched {cc_name}", mobj.groups())
- if mobj3:
- pass
- else:
- if cc_name in ["MP2", "MP3", "LCCD", "LCCSD", "CCD", "CCSD"]:
- psivar[f"{cc_name} DOUBLES ENERGY"] = mobj.group(1)
- psivar[f"{cc_name} CORRELATION ENERGY"] = mobj.group(1)
- psivar[f"{cc_name} TOTAL ENERGY"] = mobj.group(2)
- module = "tce"
-
- # TCE dipole
- mobj2 = re.search(
- # fmt: off
- r"^\s*" + cc_name + r"\s+" + r"dipole moments \/ hartree & Debye" + r"\s*" +
- r"^\s*" + r"-+" + r"\s*" +
- r'^\s*' + r'X' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Y' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Z' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*' +
- r'^\s*' + r'Total' + r'\s+' + NUMBER + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj2:
- logger.debug(f"matched tce dipole moment")
-
- # only pulling Debye
- dipole = np.array([float(mobj2.group(2)), float(mobj2.group(4)), float(mobj2.group(6))])
- psivar[f"{cc_name} DIPOLE"] = dipole
- psivar[f"CURRENT DIPOLE"] = dipole
-
- # Process CCSD/CCSD(T) using nwchem CCSD/CCSD(T) [dertype] command
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'-----------' + r'\s*' +
- r'^\s+' + r'CCSD Energy' + r'\s*' +
- r'^\s+' + r'-----------' + r'\s*' +
- r'^\s+' + r'Reference energy:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'CCSD corr\. energy:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total CCSD energy:' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
-
- if mobj:
- logger.debug("matched ccsd")
- psivar["CCSD CORRELATION ENERGY"] = mobj.group(2)
- psivar["CCSD TOTAL ENERGY"] = mobj.group(3)
- module = "cc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'T\(CCSD\) corr\. energy:' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*' +
- r'^\s+' + r'Total CCSD\+T\(CCSD\) energy:' + r'\s+' + r"(?P" + NUMBER + r")" + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- if mobj:
- logger.debug("matched ccsd+t(ccsd)")
- psivar["T(CCSD) CORRECTION ENERGY"] = mobj.group("tccsdcorr")
- psivar["CCSD+T(CCSD) CORRELATION ENERGY"] = Decimal(mobj.group("tccsdtot")) - psivar["HF TOTAL ENERGY"]
- psivar["CCSD+T(CCSD) TOTAL ENERGY"] = mobj.group("tccsdtot")
- module = "cc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'--------------' + r'\s*' +
- r'^\s+' + r'CCSD\(T\) Energy' + r'\s*' +
- r'^\s+' + r'--------------' + r'\s*' + r'(?:.*?)' +
- r'^\s+' + r'\(T\) corr\. energy:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total CCSD\(T\) energy:' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
-
- if mobj:
- logger.debug("matched ccsd(t)")
- psivar["(T) CORRECTION ENERGY"] = mobj.group(1)
- psivar["CCSD(T) CORRELATION ENERGY"] = Decimal(mobj.group(2)) - psivar["HF TOTAL ENERGY"]
- psivar["CCSD(T) TOTAL ENERGY"] = mobj.group(2)
- module = "cc"
-
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Spin Component Scaled \(SCS\) CCSD' + r'\s*' +
- r'^\s+' + r'-*' + r'\s*' +
- r'^\s+' + r'Same spin contribution:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Same spin scaling factor:' + r'\s+' + NUMBER + r'\s*'
- r'^\s+' + r'Opposite spin contribution:' + r'\s+' + NUMBER + r'\s*' +
- #r'^\s+' + r'Opposite spin scaling factor' + r'\s+' + NUMBER + r'\s*'
- r'^\s+' + r'Opposite spin scaling fact.:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'SCS-CCSD correlation energy:' + r'\s+' + NUMBER + r'\s*' +
- r'^\s+' + r'Total SCS-CCSD energy:' + r'\s+' + NUMBER + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- # SCS-CCSD included
- if mobj:
- logger.debug("matched scs-ccsd", mobj.groups())
- psivar["CCSD SAME-SPIN CORRELATION ENERGY"] = mobj.group(1)
- psivar["CCSD OPPOSITE-SPIN CORRELATION ENERGY"] = mobj.group(3)
- # psivar['CCSD SAME-SPIN CORRELATION ENERGY'] = psivar['SCS-CCSD SAME-SPIN CORRELATION ENERGY'] = (
- # Decimal(mobj.group(1)) * Decimal(mobj.group(2)))
- # psivar['CCSD OPPOSITE-SPIN CORRELATION ENERGY'] = psivar['SCS-CCSD OPPOSITE-SPIN CORRELATION ENERGY'] = (
- # Decimal(mobj.group(4)) * Decimal(mobj.group(3)))
- # psivar['SCS-CCSD CORRELATION ENERGY'] = mobj.group(5)
- # psivar['SCS-CCSD TOTAL ENERGY'] = mobj.group(6)
- # psivar['CUSTOM SCS-CCSD CORRELATION ENERGY'] = 0.5 * (float(
- # psivar['CCSD SAME-SPIN CORRELATION ENERGY']) + float(psivar['CCSD OPPOSITE-SPIN CORRELATION ENERGY']))
- # psivar['CUSTOM SCS-CCSD TOTAL ENERGY'] = float(mobj.group(6)) + float(
- # psivar['CUSTOM SCS-CCSD CORRERLATION ENERGY'])
-
- # Process EOM-[cc_name] #nwchem_tce_dipole = false
- # Parsed information: each symmetry, root excitation energy in eV and total energy in hartree
- # psivar name might need to be fixed
- # each root excitation energy is extracted from the last iteration of right hand side
- mobj = re.findall(
- # fmt: off
- r'^\s+(?:Excited-state calculation \( )(.*)\s+(?:symmetry\))\s+(?:.*\n)*^\s+EOM-' + cc_name +
- # (..) captures symmetry
- r'right-hand side iterations\s+(?:.*\n)*(?:Excited state root)\s+' + NUMBER + #root
- r'\s*(?:Excitation energy / hartree)\s+.\s+' + NUMBER + #excitation energy hartree
- r'\s*(?:/ eV)\s+.\s+' + NUMBER + r'\s*$',
- # excitation energy eV
- # fmt: on
- outtext,
- re.MULTILINE | re.DOTALL,
- )
- # regex should be more dynamic in finding values, need to revisit
- # mobj.group(0) = symmetry value
- # mobj.group(1) = cc_name
- # mobj.group(2) = root number
- # mobj.group(3) = excitation energy (hartree)
- # mobj.group(4) = excitation energy (eV)
-
- if mobj:
- logger.debug(mobj)
- ext_energy = {} # dic
-
- ext_energy_list = []
- logger.debug(f"matched eom-{cc_name}")
- for mobj_list in mobj:
- logger.debug("matched EOM-%s - %s symmetry" % (cc_name, mobj_list[0])) # cc_name, symmetry
- logger.debug(mobj_list)
- count = 0
- for line in mobj_list[1].splitlines():
- lline = line.split()
- logger.debug(lline[1]) # in hartree
- logger.debug(lline[2]) # in eV
- count += 1
-
- logger.debug("matched excitation energy #%d - %s symmetry" % (count, mobj_list[0]))
-
- ext_energy_list.append(lline[1]) # Collect all excitation energies
-
- sym = str(mobj_list[0])
- ext_energy.setdefault(sym, [])
- ext_energy[sym].append(lline[1]) # Dictionary: symmetries(key), energies(value)
-
- ext_energy_list.sort(key=float)
-
- for nroot in range(len(ext_energy_list)):
- for k, e_val in ext_energy.items():
- if ext_energy_list[nroot] in e_val:
- symm = k
- # in hartree
- psivar[
- f"EOM-{cc_name} ROOT 0 -> ROOT {nroot + 1} EXCITATION ENERGY - {symm} SYMMETRY"
- ] = ext_energy_list[nroot]
- psivar[f"EOM-{cc_name} ROOT 0 -> ROOT {nroot + 1} TOTAL ENERGY - {symm} SYMMETRY"] = psivar[
- f"{cc_name} TOTAL ENERGY"
- ] + Decimal(ext_energy_list[nroot])
- gssym = ""
- gs = re.search(r"^\s+" + r"Ground-state symmetry is" + gssym + r"\s*$", outtext, re.MULTILINE)
-
- if gs:
- logger.debug("matched ground-state symmetry")
- psivar["GROUND-STATE SYMMETRY"] = gssym.group(1)
-
- # Process TDDFT
- # 1) Spin allowed
- mobj = re.findall(
- # fmt: off
- r'^\s+(?:Root)\s+(\d+)\s+(.*?)\s+' + NUMBER + r'\s+(?:a\.u\.)\s+' + NUMBER + r"\s+eV\s*" +
- r"^\s+" + r"\s+=\s+" + NUMBER + r"\s*"
- #Root | symmetry | a.u. | eV
- # unkn units for dip/quad
- + r'\s+(?:.*\n)\s+Transition Moments\s+X\s+'+ NUMBER + r'\s+Y\s+'+ NUMBER+ r'\s+Z\s+'+ NUMBER #dipole
- + r'\s+Transition Moments\s+XX\s+'+ NUMBER + r'\s+XY\s+'+ NUMBER+ r'\s+XZ\s+'+ NUMBER #quadrople
- + r'\s+Transition Moments\s+YY\s+'+ NUMBER + r'\s+YZ\s+'+ NUMBER+ r'\s+ZZ\s+'+ NUMBER #quadrople
- + r"\s+" + r"Dipole Oscillator Strength" + r"\s+" + NUMBER + r"\s*$",
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- if mobj:
- logger.debug("matched TDDFT with transition moments")
- for mobj_list in mobj:
- logger.debug(mobj_list)
- iroot = mobj_list[0]
- sym = mobj_list[1]
-
- # in eV
- psivar[f"TDDFT ROOT {iroot} EXCITATION ENERGY - {sym} SYMMETRY"] = mobj_list[2]
- psivar[f"TDDFT ROOT {iroot} EXCITED STATE ENERGY - {sym} SYMMETRY"] = psivar[
- "DFT TOTAL ENERGY"
- ] + Decimal(mobj_list[2])
- psivar[f"TDDFT ROOT 0 -> ROOT {iroot} DIPOLE"] = [
- float(mobj_list[5]),
- float(mobj_list[6]),
- float(mobj_list[7]),
- ]
- psivar[f"TDDFT ROOT 0 -> ROOT {iroot} QUADRUPOLE"] = [
- float(mobj_list[8]),
- float(mobj_list[9]),
- float(mobj_list[10]),
- float(mobj_list[9]),
- float(mobj_list[11]),
- float(mobj_list[12]),
- float(mobj_list[10]),
- float(mobj_list[12]),
- float(mobj_list[13]),
- ]
- psivar[f"TDDFT ROOT 0 -> ROOT {iroot} OSCILLATOR STRENGTH (LEN)"] = mobj_list[14]
-
- # 2) Spin forbidden
- mobj = re.findall(
- # fmt: off
- r'^\s+(?:Root)\s+(\d+)\s+(.*?)\s+' + NUMBER + r'\s(?:a\.u\.)\s+' + NUMBER + r'\s+(?:\w+)' # Root | symmetry | a.u. | eV
- + r'\s+(?:.\w+.\s+.\s+\d+.\d+)' # s2 value
- + r'\s+Transition Moments\s+(?:Spin forbidden)' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- # mobj.group(0) = Root
- # mobj.group(1) = symmetry
- # mobj.group(2) a.u.
- # mobj.group(3) e.V
- # mobj.group(4) Excitation energy
- # mobj.group(5) Excited state energy
-
- if mobj:
- logger.debug("matched TDDFT - spin forbidden")
- for mobj_list in mobj:
- #### temporary psivars ####
- # in eV
- psivar[f"TDDFT ROOT {mobj_list[0]} EXCITATION ENERGY - {mobj_list[2]} SYMMETRY"] = mobj_list[4]
- psivar[f"TDDFT ROOT {mobj_list[0]} EXCITED STATE ENERGY - {mobj_list[2]} SYMMETRY"] = psivar[
- "DFT TOTAL ENERGY"
- ] + qcel.constants.converstion_factor("eV", "hartree") * Decimal(mobj_list[4])
-
- # psivar['TDDFT ROOT %s %s %s EXCITATION ENERGY' %
- # (mobj_list[0], mobj_list[1], mobj_list[2])] = mobj_list[3] # in a.u.
- # psivar['TDDFT ROOT %s %s %s EXCITED STATE ENERGY' %(mobj_list[0], mobj_list[1], mobj_list[2])] = \
- # psivar['DFT TOTAL ENERGY'] + Decimal(mobj_list[3])
- if mobj:
- logger.debug("Non-variation initial energy") # prints out energy, 5 counts
-
- # Process geometry
- # 1) CHARGE
- # Read charge from SCF module
- mobj = re.search(
- r"^\s+" + r"charge =" + r"\s+" + NUMBER + r"\s*$", outtext, re.MULTILINE | re.IGNORECASE
- )
-
- if mobj:
- logger.debug("matched charge")
- out_charge = int(float(mobj.group(1)))
-
- # Read charge from General information (not scf module)
- mobj = re.search(
- r"^\s+" + r"Charge :" + r"\s+" + r"(-?\d+)" + r"\s*$", outtext, re.MULTILINE | re.IGNORECASE
- )
-
- if mobj:
- logger.debug("matched charge")
- out_charge = int(float(mobj.group(1)))
-
- # 2) MULTIPLICITY
- # Read multiplicity from SCF module
- mobj = re.search(
- r"^\s+" + r"open shells =" + r"\s+" + r"(\d+)" + r"\s*$", outtext, re.MULTILINE | re.IGNORECASE
- )
-
- calcinfo = False
-
- if mobj:
- logger.debug("matched multiplicity")
- out_mult = int(mobj.group(1)) + 1
-
- # Read multiplicity from SCF module through alpha, beta electrons
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'alpha electrons =' + r'\s+' + r'(\d+)' + r'\s*' +
- r'^\s+' + r'beta electrons =' + r'\s+' + r'(\d+)' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj:
- logger.debug("matched multiplicity via alpha and beta electrons 0")
- out_mult = int(mobj.group(1)) - int(mobj.group(2)) + 1 # nopen + 1
- psivar["N ALPHA ELECTRONS"] = mobj.group(1)
- psivar["N BETA ELECTRONS"] = mobj.group(2)
-
- mobj = re.search(
- # fmt: off
- r"^\s+" + r"Basis functions" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Molecular orbitals" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Frozen core" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Frozen virtuals" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Active alpha occupied" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Active beta occupied" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Active alpha virtual" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + r"Active beta virtual" + r"\s+=\s+" + r"(?P\d+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj:
- logger.debug("matched alpha and beta electrons 1", mobj.groups())
- calcinfo = True
- psivar["N BASIS FUNCTIONS"] = mobj.group("nbf")
- psivar["N MOLECULAR ORBITALS"] = mobj.group("nmo")
- psivar["N ALPHA ELECTRONS"] = int(mobj.group("nao")) + int(mobj.group("nfc"))
- psivar["N BETA ELECTRONS"] = int(mobj.group("nbo")) + int(mobj.group("nfc"))
-
- mobj = re.search(
- # fmt: off
- r"^\s+" + "No. of electrons" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Alpha electrons" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Beta electrons" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "No. of orbitals" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Alpha orbitals" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Beta orbitals" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Alpha frozen cores" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Beta frozen cores" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Alpha frozen virtuals" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Beta frozen virtuals" + r"\s+:\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "Spin multiplicity" + r"\s+:\s+\w+" + r"\s*" +
- r"^\s+" + "Number of AO functions" + r"\s+:\s+" + r"(?P\d+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj and not calcinfo:
- logger.debug("matched alpha and beta electrons 2", mobj.groups())
- calcinfo = True
- psivar["N BASIS FUNCTIONS"] = mobj.group("nbf")
- psivar["N MOLECULAR ORBITALS"] = (int(mobj.group("namo")) + int(mobj.group("nbmo"))) / 2
- psivar["N ALPHA ELECTRONS"] = mobj.group("nae")
- psivar["N BETA ELECTRONS"] = mobj.group("nbe")
-
- mobj = re.search(
- # fmt: off
- r"^\s+" + "functions" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "atoms" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "alpha electrons" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "beta electrons" + r"\s+=\s+" + r"(?P\d+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj and not calcinfo:
- logger.debug("matched alpha and beta electrons 3", mobj.groups())
- calcinfo = True
- psivar["N BASIS FUNCTIONS"] = mobj.group("nbf")
- psivar["N MOLECULAR ORBITALS"] = mobj.group("nbf")
- psivar["N ALPHA ELECTRONS"] = mobj.group("nae")
- psivar["N BETA ELECTRONS"] = mobj.group("nbe")
-
- mobj = re.search(
- # fmt: off
- r"^\s+" + "functions" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "atoms" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "closed shells" + r"\s+=\s+" + r"(?P\d+)" + r"\s*" +
- r"^\s+" + "open shells" + r"\s+=\s+" + r"(?P\d+)" + r"\s*",
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
- if mobj and not calcinfo:
- logger.debug("matched alpha and beta electrons 4", mobj.groups())
- calcinfo = True
- psivar["N BASIS FUNCTIONS"] = mobj.group("nbf")
- psivar["N MOLECULAR ORBITALS"] = mobj.group("nbf") # BAD! TODO
- psivar["N ALPHA ELECTRONS"] = int(mobj.group("ncl")) + int(mobj.group("nop"))
- psivar["N BETA ELECTRONS"] = mobj.group("ncl")
-
- # Read multiplicity from General information (not scf module)
- mobj = re.search(
- r"^\s+" + r"Spin multiplicity:" + r"\s+" + r"(\d+)" + r"\s*$", outtext, re.MULTILINE | re.IGNORECASE
- )
-
- if mobj:
- logger.debug("matched multiplicity")
- out_mult = int(mobj.group(1))
-
- # 3) Initial geometry
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Geometry' + r'.*' + r'\s*' +
- r'^\s+' + r'(?:-+)\s*' + r'\s+' + r'\n' +
- r'^\s' + r'Output coordinates in ' + r'(.*?)' + r'\s' + r'\(scale by' + r'.*' + r'\s' + r'to convert to a\.u\.\)' + r'\s+' + r'\n' +
- r'^\s+' + r'No\.\ Tag Charge X Y Z' + r'\s*' +
- r'^\s+' + r'---- ---------------- ---------- -------------- -------------- --------------' + r'\s*' +
- r'((?:\s+([1-9][0-9]*)+\s+(bq)?([A-Z]{1,3})((_\w+)|(\d+))?\s+\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s*\n)+)' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE | re.IGNORECASE,
- )
-
- if mobj:
- logger.debug("matched geom")
-
- # dinky molecule w/ charge and multiplicity
- if mobj.group(1) == "angstroms":
- molxyz = "%d \n%d %d tag\n" % (len(mobj.group(2).splitlines()), out_charge, out_mult) # unit = angstrom
- for line in mobj.group(2).splitlines():
- lline = line.split()
- molxyz += "%s %16s %16s %16s\n" % (lline[-5], lline[-3], lline[-2], lline[-1])
- # Jiyoung was collecting charge (-4)? see if this is ok for ghosts
- # Tag , X, Y, Z
- psivar_coord = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"],
- dtype=2,
- ),
- )
-
- else: # unit = a.u.
- molxyz = "%d au\n%d %d tag\n" % (len(mobj.group(2).splitlines()), out_charge, out_mult)
- for line in mobj.group(2).splitlines():
- lline = line.split()
- chg_on_center = int(float(lline[-4]))
- if chg_on_center > 0:
- tag = f"{lline[-5]}"
- else:
- tag = lline[-5].strip()
- if tag.startswith("bq"):
- tag = tag[2:]
- tag = f"@{tag}"
- molxyz += "%s %16s %16s %16s\n" % (tag, lline[-3], lline[-2], lline[-1])
- # Tag , X, Y, Z
- psivar_coord = Molecule(
- validate=False,
- **qcel.molparse.to_schema(
- qcel.molparse.from_string(molxyz, dtype="xyz+", fix_com=True, fix_orientation=True)["qm"],
- dtype=2,
- ),
- )
-
- # Process gradient
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'.*' + r'ENERGY GRADIENTS' + r'\s*' + r'\s+' + r'\n' +
- r'^\s+' + r'atom coordinates gradient' + r'\s*' +
- r'^\s+' + r'x y z x y z' + r'\s*' +
- r'((?:\s+([1-9][0-9]*)+\s+([A-Z][a-x]*)(\d+)?\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s+[-+]?\d+\.\d+\s*\n)+)' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- if mobj:
- logger.debug("matched molgrad")
- atoms = []
- psivar_grad = []
- for line in mobj.group(1).splitlines():
- lline = line.split() # Num, Tag, coord x, coord y, coord z, grad x, grad y, grad z
- # print (lline)
- if lline == []:
- pass
- else:
- atoms.append(lline[1]) # Tag
- psivar_grad.append([float(lline[-3]), float(lline[-2]), float(lline[-1])])
- psivar_grad = np.array(psivar_grad).reshape((-1, 3))
-
- # Process dipole (Properties)
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'Dipole moment' + r'\s+' + NUMBER + r'\s+' + r'A\.U\.' + r'\s*' +
- r'^\s+' + r'DMX' + r'\s+' + NUMBER + r'.*' +
- r'^\s+' + r'DMY' + r'\s+' + NUMBER + r'.*' +
- r'^\s+' + r'DMZ' + r'\s+' + NUMBER + r'.*' +
- r'^\s+' + r'.*' +
- r'^\s+' + r'Total dipole' + r'\s+' + NUMBER + r'\s+' + r'A\.U\.' + r'\s*' +
- r'^\s+' + r'Dipole moment' + r'\s+' + NUMBER + r'\s' + r'Debye\(s\)' + r'\s*' +
- r'^\s+' + r'DMX' + r'\s+' + NUMBER + r'.*' +
- r'^\s+' + r'DMY' + r'\s+' + NUMBER + r'.*' +
- r'^\s+' + r'DMZ' + r'\s+' + NUMBER + r'.*' +
- r'^\s+' + r'.*' +
- r'^\s+' + r'Total dipole' + r'\s+' + NUMBER + r'\s' + r'DEBYE\(S\)' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
-
- if mobj:
- logger.debug("matched total dipole")
-
- # UNIT = DEBYE(S)
- psivar[f"CURRENT DIPOLE"] = d2au * np.array([mobj.group(7), mobj.group(8), mobj.group(9)])
- # total?
-
- # Process error code
- mobj = re.search(
- # fmt: off
- r'^\s+' + r'current input line \:' + r'\s*' +
- r'^\s+' + r'([1-9][0-9]*)' + r'\:' + r'\s+' + r'(.*)' + r'\s*' +
- r'^\s+' r'------------------------------------------------------------------------' + r'\s*' +
- r'^\s+' r'------------------------------------------------------------------------' + r'\s*' +
- r'^\s+' + r'There is an error in the input file' + r'\s*$',
- # fmt: on
- outtext,
- re.MULTILINE,
- )
- if mobj:
- logger.debug("matched error")
- # print (mobj.group(1)) #error line number
- # print (mobj.group(2)) #error reason
- psivar["NWCHEM ERROR CODE"] = mobj.group(1)
- # TODO process errors into error var
-
- # Get the size of the basis sets, etc
- mobj = re.search(r"No. of atoms\s+:\s+(\d+)", outtext, re.MULTILINE)
- if mobj:
- psivar["N ATOMS"] = mobj.group(1)
- mobj = re.search(
- r"No. of electrons\s+:\s+(\d+)\s+Alpha electrons\s+:\s+(\d+)\s+Beta electrons\s+:\s+(\d+)",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- psivar["N ALPHA ELECTRONS"] = mobj.group(2)
- psivar["N BETA ELECTRONS"] = mobj.group(3)
- if psivar["N ALPHA ELECTRONS"] == psivar["N BETA ELECTRONS"]:
- # get HOMO and LUMO energy
- mobj = re.search(
- r"Vector"
- + r"\s+"
- + r"%d" % (psivar["N ALPHA ELECTRONS"])
- + r"\s+"
- + r"Occ="
- + r".*"
- + r"\s+"
- + r"E="
- + r"([+-]?\s?\d+[.]\d+)"
- + r"[D]"
- + r"([+-]0\d)",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- homo = float(mobj.group(1)) * (10 ** (int(mobj.group(2))))
- psivar["HOMO"] = np.array([round(homo, 10)])
- mobj = re.search(
- r"Vector"
- + r"\s+"
- + r"%d" % (psivar["N ALPHA ELECTRONS"] + 1)
- + r"\s+"
- + r"Occ="
- + r".*"
- + r"\s+"
- + r"E="
- + r"([+-]?\s?\d+[.]\d+)"
- + r"[D]"
- + r"([+-]0\d)",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- lumo = float(mobj.group(1)) * (10 ** (int(mobj.group(2))))
- psivar["LUMO"] = np.array([round(lumo, 10)])
-
- mobj = re.search(r"AO basis - number of functions:\s+(\d+)\s+number of shells:\s+(\d+)", outtext, re.MULTILINE)
- if mobj:
- psivar["N MOLECULAR ORBITALS"] = mobj.group(1)
- psivar["N BASIS FUNCTIONS"] = mobj.group(1)
-
- # Search for Center of charge
- mobj = re.search(
- r"Center of charge \(in au\) is the expansion point"
- + r"\n"
- + r"\s+"
- + r"X\s+=\s+([+-]?\d+[.]\d+)"
- + r"\s+"
- + r"Y\s+=\s+([+-]?\d+[.]\d+)"
- + r"\s+"
- + r"Z\s+=\s+([+-]?\d+[.]\d+)",
- outtext,
- re.MULTILINE,
- )
- if mobj:
- psivar["CENTER OF CHARGE"] = np.array([mobj.group(1), mobj.group(2), mobj.group(3)])
-
- mobj = re.search(
- r"Dipole moment"
- + r".*?"
- + r"A\.U\."
- + r"\s+"
- + r"DMX\s+([+-]?\d+[.]\d+)\s+"
- + r"DMXEFC\s+[+-]?\d+[.]\d+\s+"
- + r"DMY\s+([+-]?\d+[.]\d+)\s+"
- + r"DMYEFC\s+[+-]?\d+[.]\d+\s+"
- + r"DMZ\s+([+-]?\d+[.]\d+)\s+"
- + r"DMZEFC\s+[+-]?\d+[.]\d+\s+"
- + r"\-EFC\-"
- + r".*?"
- + r"A\.U\.\s+"
- + r"Total dipole\s+([+-]?\d+[.]\d+\s+)",
- outtext,
- re.MULTILINE,
- )
- # + r"DMY\s+" + r"([+-]?\d+[.]\d+)", outtext, re.MULTILINE)
- if mobj:
- psivar["DIPOLE MOMENT"] = np.array([mobj.group(1), mobj.group(2), mobj.group(3)])
- psivar["TOTAL DIPOLE MOMENT"] = mobj.group(4)
- # Process CURRENT energies (TODO: needs better way)
- if "HF TOTAL ENERGY" in psivar:
- psivar["SCF TOTAL ENERGY"] = psivar["HF TOTAL ENERGY"]
- psivar["CURRENT REFERENCE ENERGY"] = psivar["HF TOTAL ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["HF TOTAL ENERGY"]
-
- if "MCSCF TOTAL ENERGY" in psivar:
- psivar["CURRENT REFERENCE ENERGY"] = psivar["MCSCF TOTAL ENERGY"]
- psivar["CURRENT CORRELATION ENERGY"] = 0.0
- psivar["CURRENT ENERGY"] = psivar["MCSCF TOTAL ENERGY"]
-
- if "MP2 TOTAL ENERGY" in psivar and "MP2 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP2 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP2 TOTAL ENERGY"]
-
- if "MP3 TOTAL ENERGY" in psivar and "MP3 CORRECTION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP3 TOTAL ENERGY"] - psivar["HF TOTAL ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP3 TOTAL ENERGY"]
-
- if "MP4 TOTAL ENERGY" in psivar and "MP4 CORRECTION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["MP4 TOTAL ENERGY"] - psivar["HF TOTAL ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["MP4 TOTAL ENERGY"]
-
- if "CISD TOTAL ENERGY" in psivar and "CISD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CISD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CISD TOTAL ENERGY"]
-
- if "QCISD TOTAL ENERGY" in psivar and "QCISD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["QCISD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["QCISD TOTAL ENERGY"]
-
- if "LCCD TOTAL ENERGY" in psivar and "LCCD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["LCCD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["LCCD TOTAL ENERGY"]
-
- if "LCCSD TOTAL ENERGY" in psivar and "LCCSD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["LCCSD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["LCCSD TOTAL ENERGY"]
-
- if "DFT TOTAL ENERGY" in psivar:
- if "CURRENT REFERENCE ENERGY" not in psivar:
- # already set for DH-DFT
- psivar["CURRENT REFERENCE ENERGY"] = psivar["DFT TOTAL ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["DFT TOTAL ENERGY"]
-
- # Process TCE CURRENT energies
- # Need to be fixed
- # HOW TO KNOW options['NWCHEM']['NWCHEM_TCE']['value']?
- # TODO: CURRENT ENERGY = TCE ENERGY
- if "%s TOTAL ENERGY" % (cc_name) in psivar and ("%s CORRELATION ENERGY" % (cc_name) in psivar):
- psivar["CURRENT CORRELATION ENERGY"] = psivar["%s CORRELATION ENERGY" % (cc_name)]
- psivar["CURRENT ENERGY"] = psivar["%s TOTAL ENERGY" % (cc_name)]
-
- if "CCD TOTAL ENERGY" in psivar and "CCD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCD TOTAL ENERGY"]
-
- if "CC2 TOTAL ENERGY" in psivar and "CC2 CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CC2 CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CC2 TOTAL ENERGY"]
-
- if "CCSD TOTAL ENERGY" in psivar and "CCSD CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSD CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSD TOTAL ENERGY"]
-
- if "CCSD+T(CCSD) TOTAL ENERGY" in psivar and "CCSD+T(CCSD) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSD+T(CCSD) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSD+T(CCSD) TOTAL ENERGY"]
-
- if "CCSD(T) TOTAL ENERGY" in psivar and "CCSD(T) CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSD(T) CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSD(T) TOTAL ENERGY"]
-
- if "CCSDT TOTAL ENERGY" in psivar and "CCSDT CORRELATION ENERGY" in psivar:
- psivar["CURRENT CORRELATION ENERGY"] = psivar["CCSDT CORRELATION ENERGY"]
- psivar["CURRENT ENERGY"] = psivar["CCSDT TOTAL ENERGY"]
-
- if ("EOM-%s TOTAL ENERGY" % (cc_name) in psivar) and ("%s EXCITATION ENERGY" % (cc_name) in psivar):
- psivar["CURRENT ENERGY"] = psivar["EOM-%s TOTAL ENERGY" % (cc_name)]
- psivar["CURRENT EXCITATION ENERGY"] = psivar["%s EXCITATION ENERGY" % (cc_name)]
-
- psivar[f"N ATOMS"] = len(psivar_coord.symbols)
-
- return psivar, psivar_coord, psivar_grad, version, module, error
-
-
-def harvest_hessian(hess: str) -> np.ndarray:
- """Parses the contents of the NWChem hess file into a hessian array.
-
- Args:
- hess (str): Contents of the hess file
- Returns:
- (np.ndarray) Hessian matrix as a 2D array
- """
-
- # Change the "D[+-]" notation of Fortran output to "E[+-]" used by Python
- hess_conv = hess.replace("D", "E")
-
- # Parse all of the float values
- hess_tri = [float(x) for x in hess_conv.strip().splitlines()]
-
- # The value in the Hessian matrix is the lower triangle printed row-wise (e.g., 0,0 -> 1,0 -> 1,1 -> ...)
- n = int(np.sqrt(8 * len(hess_tri) + 1) - 1) // 2 # Size of the 2D matrix
-
- # Add the lower diagonal
- hess_arr = np.zeros((n, n))
- hess_arr[np.tril_indices(n)] = hess_tri
-
- # Transpose and then set the lower diagonal again
- hess_arr = np.transpose(hess_arr) # Numpy implementations might only change the ordering to column-major
- hess_arr[np.tril_indices(n)] = hess_tri
-
- return hess_arr.T # So that the array is listed in C-order, needed by some alignment routines
-
-
-def harvest(
- in_mol: Molecule, method: str, nwout: str, **outfiles
-) -> Tuple[PreservingDict, Optional[np.ndarray], list, Molecule, str, str]:
- """Parses all the pieces of output from NWChem: the stdout in
- *nwout* Scratch files are not yet considered at this moment.
-
- Args:
- in_mol (Molecule): Input molecule
- nwout (str): NWChem output molecule
- outfiles (dict): Dictionary of outfile files and their contents
- Returns:
- - (PreservingDict) Variables extracted from the output file in the last complete step
- - (None): Hessian from the last complete step (Not yet implemented)
- - (list): Gradient from the last complete step
- - (Molecule): Molecule from the last complete step
- - (str): Version string
- - (str): Error message, if any
- """
-
- # Parse the NWChem output
- qcvars, calc_mol, calc_grad, version, module, error = harvest_output(nwout)
-
- # If available, read higher-accuracy gradients from rtdb commissioned by NWC Python Task
- if outfiles.get("nwchem.grad") is not None:
- logger.debug("Reading higher-accuracy gradients")
- calc_grad = json.loads(outfiles.get("nwchem.grad"))
- calc_grad = np.array(calc_grad).reshape((-1, 3))
-
- # If available, read the hessian
- out_hess = None
- if outfiles.get("nwchem.hess") is not None:
- out_hess = harvest_hessian(outfiles.get("nwchem.hess"))
-
- # Sometimes the hierarchical setting of CURRENT breaks down
- if method == "ccsd+t(ccsd)":
- qcvars["CURRENT CORRELATION ENERGY"] = qcvars["CCSD+T(CCSD) CORRELATION ENERGY"]
- qcvars["CURRENT ENERGY"] = qcvars["CCSD+T(CCSD) TOTAL ENERGY"]
-
- # Make sure the input and output molecules are the same
- if calc_mol:
- if in_mol:
- if abs(calc_mol.nuclear_repulsion_energy() - in_mol.nuclear_repulsion_energy()) > 1.0e-3:
- raise ValueError(
- f"""NWChem outfile (NRE: {calc_mol.nuclear_repulsion_energy()}) inconsistent with AtomicInput.molecule (NRE: {in_mol.nuclear_repulsion_energy()})."""
- )
- else:
- raise ValueError("""No coordinate information extracted from NWChem output.""")
-
- # Frame considerations
- # * `in_mol` built with deliberation and with all fields accessible.
- # * `calc_mol` has the internally consistent geometry frame but otherwise dinky (geom & symbols & maybe chgmult).
- if in_mol.fix_com and in_mol.fix_orientation:
- # Impose input frame if important as signalled by fix_*=T
- # If present, align the gradients and hessian with the original molecular coordinates
- # NWChem rotates the coordinates of the input molecule. `calc_mol` contains the coordinates for the
- # rotated molecule, which we can use to determine how to rotate the gradients/hessian
- # Beware the loose symmetrizer that can noticably change the input geometry.
- # `geometry__autosym = 1d-4` tightens.
- return_mol = in_mol
- _, data = calc_mol.align(in_mol, atoms_map=True, verbose=0, mols_align=0.01)
- mill = data["mill"]
-
- else:
- return_mol, _ = in_mol.align(calc_mol, atoms_map=True, verbose=0, mols_align=0.01)
- mill = qcel.molutil.compute_scramble(
- len(in_mol.symbols), do_resort=False, do_shift=False, do_rotate=False, do_mirror=False
- ) # identity AlignmentMill
-
- return_grad = None
- if calc_grad is not None:
- return_grad = mill.align_gradient(calc_grad)
-
- return_hess = None
- if out_hess is not None:
- return_hess = mill.align_hessian(np.array(out_hess))
-
- return qcvars, return_hess, return_grad, return_mol, version, module, error
diff --git a/qcengine/programs/nwchem/keywords.py b/qcengine/programs/nwchem/keywords.py
deleted file mode 100644
index baaac3d50..000000000
--- a/qcengine/programs/nwchem/keywords.py
+++ /dev/null
@@ -1,98 +0,0 @@
-import collections
-from typing import Any, Dict, Tuple
-
-
-def format_keyword(keyword: str, val: Any, lop_off: bool = True, preserve_case: bool = False) -> Tuple[str, str]:
- """Function to reformat value `val` for `keyword` from python into nwchem-speak."""
-
- if preserve_case:
- key = keyword
- else:
- key = keyword.lower()
-
- # Transform string booleans into " "
- if val is True:
- return key, ""
- elif val is False:
- return "", ""
-
- # complete hack
- if keyword.upper() == "MEMORY":
- return key, f"{val} double"
-
- elif isinstance(val, list):
- text = " ".join([str(v) for v in val])
- elif isinstance(val, dict):
- text = []
- for k, v in val.items():
- merge = [k]
- merge.extend(str(v) if isinstance(v, (int, float)) else list(map(str, v)))
- text.append(" ".join(merge))
- text = " ".join(text)
- else:
- text = str(val)
-
- if lop_off:
- return key[7:], text
- else:
- return key, text
-
-
-def format_keywords(keywords: Dict[str, Any]) -> str:
- """From NWCHEM-directed, non-default `keywords` dictionary, write a NWCHEM deck."""
-
- def rec_dd():
- return collections.defaultdict(rec_dd)
-
- grouped_options = rec_dd()
-
- for group_key, val in keywords.items():
- nesting = group_key.split("__")
- if len(nesting) == 1:
- key = nesting[0]
- grouped_options["aaaglobal"][key] = val
- elif len(nesting) == 2:
- g1, key = nesting
- grouped_options[g1][key] = val
- elif len(nesting) == 3:
- g1, g2, key = nesting
- grouped_options[g1][g2][key] = val
- else:
- raise ValueError("Nesting N!")
-
- grouped_lines = {}
- for group, opts in sorted(grouped_options.items()):
- lines = []
- group_level_lines = []
- for key, val in grouped_options[group].items():
- if isinstance(val, dict):
- g2_level_lines = []
- g2_level_lines.append(key.lower())
- for k2, v2 in val.items():
- line2 = " ".join(format_keyword(k2, v2, lop_off=False))
- g2_level_lines.append(line2)
- g2_level_lines = " ".join(g2_level_lines)
- lines.append(g2_level_lines)
- else:
- preserve_case = False
- try:
- preserve_case = val.startswith("library ")
- except AttributeError:
- pass
- line = " ".join(format_keyword(key, val, lop_off=False, preserve_case=preserve_case))
- if group.lower() == "basis" and any(
- [word in line for word in ["spherical", "cartesian", "print", "noprint", "rel"]]
- ):
- group_level_lines.append(line)
- else:
- lines.append(line)
- if group == "aaaglobal":
- grouped_lines[group] = "\n".join(lines) + "\n"
- elif group.lower() == "set":
- grouped_lines[group] = "\n".join(f"set {l}" for l in lines) + "\n"
- else:
- grouped_lines[group] = (
- f"{group.lower()} " + " ".join(group_level_lines) + "\n " + "\n ".join(lines) + "\nend\n"
- )
-
- return "\n".join(grouped_lines.values()) + "\n"
diff --git a/qcengine/programs/nwchem/runner.py b/qcengine/programs/nwchem/runner.py
deleted file mode 100644
index 65a08aa05..000000000
--- a/qcengine/programs/nwchem/runner.py
+++ /dev/null
@@ -1,349 +0,0 @@
-"""
-Calls the NWChem executable.
-"""
-import copy
-import hashlib
-import logging
-import pprint
-import re
-from decimal import Decimal
-from typing import Any, Dict, Optional, Tuple
-
-import numpy as np
-from qcelemental.models import AtomicInput, AtomicResult, BasisSet, Provenance
-from qcelemental.util import safe_version, which, which_import
-
-from qcengine.config import TaskConfig, get_config
-from qcengine.exceptions import UnknownError
-
-from ...exceptions import InputError
-from ...util import create_mpi_invocation, execute, temporary_directory
-from ..model import ErrorCorrectionProgramHarness
-from ..qcvar_identities_resources import build_atomicproperties, build_out
-from ..util import error_stamp
-from .errors import all_errors
-from .germinate import muster_modelchem
-from .harvester import harvest
-from .keywords import format_keywords
-
-pp = pprint.PrettyPrinter(width=120, compact=True, indent=1)
-logger = logging.getLogger(__name__)
-
-
-class NWChemHarness(ErrorCorrectionProgramHarness):
- """
-
- Notes
- -----
- * To use the TCE, specify ``AtomicInput.model.method`` as usual, then also include ``qc_module = True`` in ``AtomicInput.keywords``.
-
- """
-
- _defaults = {
- "name": "NWChem",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": False,
- "node_parallel": True,
- "managed_memory": True,
- }
- # ATL: OpenMP only >=6.6 and only for Phi; potential for Mac using MKL and Intel compilers
- version_cache: Dict[str, str] = {}
-
- class Config(ErrorCorrectionProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Whether NWChem harness is ready for operation, with both the QC program and any particular dependencies found.
-
- Parameters
- ----------
- raise_error: bool
- Passed on to control negative return between False and ModuleNotFoundError raised.
-
- Returns
- -------
- bool
- If both nwchem and its harness dependency networkx are found, returns True.
- If raise_error is False and nwchem or networkx are missing, returns False.
- If raise_error is True and nwchem or networkx are missing, the error message for the first missing one is raised.
-
- """
- qc = which(
- "nwchem",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via http://www.nwchem-sw.org/index.php/Download",
- )
-
- dep = which_import(
- "networkx",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="For NWChem harness, please install via `conda install networkx -c conda-forge`.",
- )
-
- return qc and dep
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- # Get the node configuration
- config = get_config()
-
- # Run NWChem
- which_prog = which("nwchem")
- if config.use_mpiexec:
- command = create_mpi_invocation(which_prog, config)
- else:
- command = [which_prog]
- command.append("v.nw")
-
- if which_prog not in self.version_cache:
- success, output = execute(command, {"v.nw": ""}, scratch_directory=config.scratch_directory)
-
- if success:
- for line in output["stdout"].splitlines():
- if "nwchem branch" in line:
- branch = line.strip().split()[-1]
- if "nwchem revision" in line:
- revision = line.strip().split()[-1]
- self.version_cache[which_prog] = safe_version(branch + "+" + revision)
- else:
- raise UnknownError(output["stderr"])
-
- return self.version_cache[which_prog]
-
- def _compute(self, input_model: AtomicInput, config: "TaskConfig") -> AtomicResult:
- """
- Runs NWChem in executable mode
- """
- self.found(raise_error=True)
-
- job_inputs = self.build_input(input_model, config)
- success, dexe = self.execute(job_inputs)
-
- stdin = job_inputs["infiles"]["nwchem.nw"]
- if "There is an error in the input file" in dexe["stdout"]:
- raise InputError(error_stamp(stdin, dexe["stdout"], dexe["stderr"]))
- if "not compiled" in dexe["stdout"]:
- # recoverable with a different compilation with optional modules
- raise InputError(error_stamp(stdin, dexe["stdout"], dexe["stderr"]))
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- dexe["outfiles"]["input"] = stdin
- return self.parse_output(dexe["outfiles"], input_model)
- else:
- # Check if any of the errors are known
- for error in all_errors:
- error.detect_error(dexe)
- raise UnknownError(error_stamp(stdin, dexe["stdout"], dexe["stderr"]))
-
- def build_input(
- self, input_model: AtomicInput, config: TaskConfig, template: Optional[str] = None
- ) -> Dict[str, Any]:
- # Define the controller for th e
- nwchemrec = {
- "infiles": {},
- "scratch_directory": config.scratch_directory,
- "scratch_messy": config.scratch_messy,
- }
-
- # Prepare to write out the options
- opts = copy.deepcopy(input_model.keywords)
- opts = {k.lower(): v for k, v in opts.items()}
-
- # Determine the command to use to launch the code
- if config.use_mpiexec:
- nwchemrec["command"] = create_mpi_invocation(which("nwchem"), config)
- logger.info(f"Launching with mpiexec: {' '.join(nwchemrec['command'])}")
- else:
- nwchemrec["command"] = [which("nwchem")]
-
- # Handle memory
- # * [GiB] --> [QW]
- # * int() rounds down
- # * was [GiB] --> [B] c. v6.6 but fails in v7.0 probably b/c https://github.com/nwchemgit/nwchem/commit/fca382eab477c3e85548457bfceb1fc9be31b47c#diff-7baaf4807cc9b853af14d9127f63db47d706e12f697a98560bc98bb647ef8326
- # * memory_size = int(config.memory * (1024 ** 3))
- memory_size = int(config.memory * (1024**3) / 8)
- if config.use_mpiexec: # It is the memory per MPI rank
- memory_size //= config.nnodes * config.ncores // config.cores_per_rank
- opts["memory"] = memory_size
-
- # Handle molecule
- molcmd, moldata = input_model.molecule.to_string(dtype="nwchem", units="Bohr", return_data=True)
- opts.update(moldata["keywords"])
-
- if opts.pop("geometry__noautoz", False):
- molcmd = re.sub(r"geometry ([^\n]*)", r"geometry \1 noautoz", molcmd)
- # someday when minimum >=py38 `if val := opts.pop("geometry__autosym", False):`
- if opts.get("geometry__autosym", False):
- val = opts.pop("geometry__autosym")
- molcmd = re.sub(r"geometry ([^\n]*)", rf"geometry \1 autosym {val}", molcmd)
-
- # Handle calc type and quantum chemical method
- mdccmd, mdcopts = muster_modelchem(input_model.model.method, input_model.driver, opts.pop("qc_module", False))
- opts.update(mdcopts)
-
- # Handle basis set
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
-
- # * for nwchem, still needs sph and ghost
- for el in set(input_model.molecule.symbols):
- opts[f"basis__{el}"] = f"library {input_model.model.basis}"
- opts[f"basis__bq{el}"] = f"library {el} {input_model.model.basis}"
-
- # Log the job settings
- logger.debug("JOB_OPTS")
- logger.debug(pp.pformat(opts))
-
- # Handle conversion from schema (flat key/value) keywords into local format
- optcmd = format_keywords(opts)
-
- # Combine the molecule description, options and method command together
- nwchemrec["infiles"]["nwchem.nw"] = "echo\n" + molcmd + optcmd + mdccmd
-
- # Now that we know the computation, check if we want a restart
- # TODO (wardlt): Store the restart information in the local_options configuration
- if input_model.extras.get("allow_restarts", False):
- # use the input file as a source for a hash that is used to set the directory name
- input_hash = hashlib.sha256(nwchemrec["infiles"]["nwchem.nw"].encode()).hexdigest()[:12]
- scr_name = input_model.extras.get("scratch_name")
- if scr_name is None:
- scr_name = "nwc_" + input_hash
- nwchemrec["scratch_name"] = scr_name
-
- # We call the "temporary_directory" to get the eventual name of the run directory
- # and then see if nwchem.db exists to determine whether
- with temporary_directory(
- parent=config.scratch_directory, child=scr_name, exist_ok=True, messy=True
- ) as tmpdir:
- restart = tmpdir.joinpath("nwchem.db").is_file()
-
- # If computation is a restart and you are calling from the NWChem Driver module, remove the input geometry
- # This will ensure the computation will pick up from the last geometry
- if restart:
- logger.info(f"Restarting from {tmpdir}")
- if input_model.extras.get("is_driver", False):
- nwchemrec["infiles"]["nwchem.nw"] = "echo\n" + optcmd + mdccmd
- else:
- logger.warning(f"Existing files found in {tmpdir}. Your computation will restart")
-
- # For gradient methods, add a Python command to save the gradients in higher precision
- # Note: The Hessian is already stored in high precision in a file named "*.hess"
- if input_model.driver == "gradient":
- # Get the name of the theory used for computing the gradients
- theory = re.search(r"^task\s+(.+)\s+grad", mdccmd, re.MULTILINE).group(1)
- if theory == "ccsd(t)":
- theory = "ccsd"
- logger.debug(f"Adding a Python task to retrieve gradients. Theory: {theory}")
-
- # Create a Python function to get the gradient from NWChem's checkpoint file (rtdb)
- # and save it to a JSON file. The stdout for NWChem only prints 6 _decimal places_
- # (not 6 significant figures)
- pycmd = f"""
-python
- grad = rtdb_get('{theory}:gradient')
- if ga_nodeid() == 0:
- import json
- with open('nwchem.grad', 'w') as fp:
- json.dump(grad, fp)
-end
-
-task python
- """
- nwchemrec["infiles"]["nwchem.nw"] += pycmd
-
- return nwchemrec
-
- def execute(
- self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None
- ) -> Tuple[bool, Dict]:
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- ["nwchem.hess", "nwchem.grad"],
- scratch_messy=inputs["scratch_messy"],
- scratch_exist_ok=True,
- scratch_name=inputs.get("scratch_name", None),
- scratch_directory=inputs["scratch_directory"],
- )
- return success, dexe
-
- def parse_output(
- self, outfiles: Dict[str, str], input_model: "AtomicInput"
- ) -> AtomicResult: # lgtm: [py/similar-function]
-
- # Get the stdout from the calculation (required)
- stdout = outfiles.pop("stdout")
- stderr = outfiles.pop("stderr")
-
- method = input_model.model.method.lower()
- method = method[4:] if method.startswith("nwc-") else method
-
- # Read the NWChem stdout file and, if needed, the hess or grad files
- # July 2021: nwmol & vector returns now atin/outfile orientation depending on fix_com,orientation=T/F. previously always atin orientation
- try:
- qcvars, nwhess, nwgrad, nwmol, version, module, errorTMP = harvest(
- input_model.molecule, method, stdout, **outfiles
- )
- except Exception:
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- try:
- if nwgrad is not None:
- qcvars[f"{method.upper()} TOTAL GRADIENT"] = nwgrad
- qcvars["CURRENT GRADIENT"] = nwgrad
-
- if nwhess is not None:
- qcvars[f"{method.upper()} TOTAL HESSIAN"] = nwhess
- qcvars["CURRENT HESSIAN"] = nwhess
-
- # Normalize the output as a float or list of floats
- if input_model.driver.upper() == "PROPERTIES":
- retres = qcvars[f"CURRENT ENERGY"]
- else:
- retres = qcvars[f"CURRENT {input_model.driver.upper()}"]
- except KeyError:
- raise UnknownError(error_stamp(outfiles["input"], stdout, stderr))
-
- if isinstance(retres, Decimal):
- retres = float(retres)
- elif isinstance(retres, np.ndarray):
- retres = retres.tolist()
-
- # Get the formatted properties
- build_out(qcvars)
- atprop = build_atomicproperties(qcvars)
-
- provenance = Provenance(creator="NWChem", version=self.get_version(), routine="nwchem").dict()
- if module is not None:
- provenance["module"] = module
-
- # Format them inout an output
- output_data = {
- "schema_version": 1,
- "molecule": nwmol, # overwrites with outfile Cartesians in case fix_*=F
- "extras": {**input_model.extras},
- "native_files": {k: v for k, v in outfiles.items() if v is not None},
- "properties": atprop,
- "provenance": provenance,
- "return_result": retres,
- "stderr": stderr,
- "stdout": stdout,
- "success": True,
- }
-
- # got to even out who needs plump/flat/Decimal/float/ndarray/list
- # Decimal --> str preserves precision
- # * formerly unnp(qcvars, flat=True).items()
- output_data["extras"]["qcvars"] = {
- k.upper(): str(v) if isinstance(v, Decimal) else v for k, v in qcvars.items()
- }
-
- return AtomicResult(**{**input_model.dict(), **output_data})
diff --git a/qcengine/programs/openmm.py b/qcengine/programs/openmm.py
deleted file mode 100644
index bb54567b3..000000000
--- a/qcengine/programs/openmm.py
+++ /dev/null
@@ -1,338 +0,0 @@
-"""
-Calls the OpenMM executable.
-
-Requires RDKit
-"""
-import datetime
-import hashlib
-import os
-from typing import TYPE_CHECKING, Dict
-
-import numpy as np
-from qcelemental.models import AtomicResult, BasisSet, Provenance
-from qcelemental.util import safe_version, which_import
-
-from ..exceptions import InputError
-from ..util import capture_stdout
-from .model import ProgramHarness
-from .rdkit import RDKitHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-class OpenMMHarness(ProgramHarness):
-
- _CACHE = {}
- _CACHE_MAX_SIZE = 10
-
- _defaults = {
- "name": "OpenMM",
- "scratch": True,
- "thread_safe": True, # true if we use separate `openmm.Context` objects per thread
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
-
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- # def _get_off_forcefield(self, hashstring, offxml):
- #
- # from openff.toolkit.typing.engines import smirnoff
- #
- # key = hashlib.sha256(hashstring.encode()).hexdigest()
- #
- # # get forcefield from cache, build new one if not present
- # off_forcefield = self._get_cache(key) if key in self._CACHE else smirnoff.ForceField(offxml)
- #
- # # cache forcefield, no matter what
- # # handles updating time touched, dropping items if cache too large
- # self._cache_it(key, off_forcefield)
- #
- # return off_forcefield
-
- # def _get_openmm_system(self, off_forcefield, off_top):
- #
- # # key = f"{mol_hash}-{input_model.method}-{hash(forcefield_schema)}"
- #
- # openmm_system = off_forcefield.create_openmm_system(off_top)
- #
- # return openmm_system
-
- def _get_cache(self, key):
- return self._CACHE[key]["value"]
-
- def _cache_it(self, key, value):
- """Add to our LRU cache, possibly popping off least used key."""
- self._CACHE[key] = {"value": value, "last_used": datetime.datetime.utcnow()}
-
- # if cache is beyond max size, whittle it down by dropping entry least
- # recently used
- while len(self._CACHE) > self._CACHE_MAX_SIZE:
- for i, (key, value) in enumerate(self._CACHE.items()):
- if i == 0:
- oldest = value["last_used"]
- oldest_key = key
- else:
- oldest, oldest_key = (
- (value["last_used"], key) if (value["last_used"] < oldest) else oldest,
- oldest_key,
- )
-
- self._CACHE.pop(oldest_key)
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- # this harness requires RDKit as well, so this needs checking too
- rdkit_found = RDKitHarness.found(raise_error=raise_error)
-
- openff_found = which_import(
- "openff.toolkit",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install -c conda-forge openff-toolkit`",
- )
-
- # for openmm, try new import, then old import if not found
- openmm_found = which_import(
- "openmm",
- return_bool=True,
- raise_error=False,
- )
- if not openmm_found:
- openmm_found = which_import(
- ".openmm",
- return_bool=True,
- raise_error=raise_error,
- package="simtk",
- raise_msg="Please install via `conda install -c conda-forge openmm`",
- )
-
- openmmff_found = which_import(
- ".generators",
- return_bool=True,
- raise_error=raise_error,
- package="openmmforcefields",
- raise_msg="Please install via `conda install -c conda-forge openmmforcefields`",
- )
-
- return rdkit_found and openff_found and openmm_found and openmmff_found
-
- def get_version(self) -> str:
- """Return the currently used version of OpenMM."""
- self.found(raise_error=True)
-
- # we have to do some gymnastics for OpenMM pre-7.6 import support
- # we know it exists due to succesful `found` above
- which_prog = which_import("openmm")
- if which_prog is None:
- which_prog = which_import(".openmm", package="simtk")
-
- if which_prog not in self.version_cache:
- try:
- import openmm
- except ImportError:
- from simtk import openmm
-
- self.version_cache[which_prog] = safe_version(openmm.version.short_version)
-
- return self.version_cache[which_prog]
-
- def _generate_openmm_system(
- self, molecule: "offtop.Molecule", method: str, keywords: Dict = None
- ) -> "openmm.System":
- """
- Generate an OpenMM System object from the input molecule method and basis.
- """
- from openmmforcefields.generators import SystemGenerator
-
- try:
- from openmm import app, unit
- except ImportError:
- from simtk import unit
- from simtk.openmm import app
-
- # create a hash based on the input options
- hashstring = molecule.to_smiles(isomeric=True, explicit_hydrogens=True, mapped=True) + method
- for value in keywords.values():
- hashstring += str(value)
- key = hashlib.sha256(hashstring.encode()).hexdigest()
-
- # now look for the system?
- if key in self._CACHE:
- system = self._get_cache(key)
- else:
- # make the system from the inputs
- # set up available options for openmm
- _constraint_types = {"hbonds": app.HBonds, "allbonds": app.AllBonds, "hangles": app.HAngles}
- _periodic_nonbond_types = {"ljpme": app.LJPME, "pme": app.PME, "ewald": app.Ewald}
- _non_periodic_nonbond_types = {"nocutoff": app.NoCutoff, "cutoffnonperiodic": app.CutoffNonPeriodic}
-
- if "constraints" in keywords:
- constraints = keywords["constraints"]
- try:
- forcefield_kwargs = {"constraints": _constraint_types[constraints.lower()]}
- except (KeyError, AttributeError):
- raise ValueError(
- f"constraint '{constraints}' not supported, valid constraints are {_constraint_types.keys()}"
- )
- else:
- forcefield_kwargs = None
-
- nonbondedmethod = keywords.get("nonbondedMethod", None)
- if nonbondedmethod is not None:
- if nonbondedmethod.lower() in _periodic_nonbond_types:
- periodic_forcefield_kwargs = {"nonbondedMethod": _periodic_nonbond_types[nonbondedmethod.lower()]}
- nonperiodic_forcefield_kwargs = None
- elif nonbondedmethod.lower() in _non_periodic_nonbond_types:
- periodic_forcefield_kwargs = None
- nonperiodic_forcefield_kwargs = {
- "nonbondedMethod": _non_periodic_nonbond_types[nonbondedmethod.lower()]
- }
- else:
- raise ValueError(
- f"nonbondedmethod '{nonbondedmethod}' not supported, valid nonbonded methods are periodic: {_periodic_nonbond_types.keys()}"
- f" or non_periodic: {_non_periodic_nonbond_types.keys()}."
- )
- else:
- periodic_forcefield_kwargs = None
- nonperiodic_forcefield_kwargs = None
-
- # now start the system generator
- system_generator = SystemGenerator(
- small_molecule_forcefield=method,
- forcefield_kwargs=forcefield_kwargs,
- nonperiodic_forcefield_kwargs=nonperiodic_forcefield_kwargs,
- periodic_forcefield_kwargs=periodic_forcefield_kwargs,
- )
- topology = molecule.to_topology()
-
- system = system_generator.create_system(topology=topology.to_openmm(), molecules=[molecule])
- self._cache_it(key, system)
- return system
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Runs OpenMM on given structure, inputs, in vacuum.
- """
- self.found(raise_error=True)
-
- try:
- import openmm
- from openmm import unit
- except ImportError:
- from simtk import openmm, unit
-
- with capture_stdout():
- from openff.toolkit import topology as offtop
-
- # Failure flag
- ret_data = {"success": False}
-
- # generate basis, not given
- if not input_model.model.basis:
- raise InputError("Method must contain a basis set.")
-
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented since not suitable for OpenMM.")
-
- # Make sure we are using smirnoff or antechamber
- basis = input_model.model.basis.lower()
- if basis in ["smirnoff", "antechamber"]:
-
- with capture_stdout():
- # try and make the molecule from the cmiles
- cmiles = None
- if input_model.molecule.extras:
- cmiles = input_model.molecule.extras.get("canonical_isomeric_explicit_hydrogen_mapped_smiles", None)
- if cmiles is None:
- cmiles = input_model.molecule.extras.get("cmiles", {}).get(
- "canonical_isomeric_explicit_hydrogen_mapped_smiles", None
- )
-
- if cmiles is not None:
- off_mol = offtop.Molecule.from_mapped_smiles(mapped_smiles=cmiles)
- # add the conformer
- conformer = unit.Quantity(value=np.array(input_model.molecule.geometry), unit=unit.bohr)
- off_mol.add_conformer(conformer)
- else:
- # Process molecule with RDKit
- rdkit_mol = RDKitHarness._process_molecule_rdkit(input_model.molecule)
-
- # Create an Open Force Field `Molecule` from the RDKit Molecule
- off_mol = offtop.Molecule(rdkit_mol)
-
- # now we need to create the system
- openmm_system = self._generate_openmm_system(
- molecule=off_mol, method=input_model.model.method, keywords=input_model.keywords
- )
- else:
- raise InputError("Accepted bases are: {'smirnoff', 'antechamber', }")
-
- # Need an integrator for simulation even if we don't end up using it really
- integrator = openmm.VerletIntegrator(1.0 * unit.femtoseconds)
-
- # Set platform to CPU explicitly
- platform = openmm.Platform.getPlatformByName("CPU")
-
- # Set number of threads to use
- # if `nthreads` is `None`, OpenMM default of all logical cores on
- # processor will be used
- nthreads = config.ncores
- if nthreads is None:
- nthreads = os.environ.get("OPENMM_CPU_THREADS")
-
- if nthreads:
- properties = {"Threads": str(nthreads)}
- else:
- properties = {}
-
- # Initialize context
- context = openmm.Context(openmm_system, integrator, platform, properties)
-
- # Set positions from our Open Force Field `Molecule`
- try:
- context.setPositions(off_mol.conformers[0])
- except ValueError:
- context.setPositions(off_mol.conformers[0].to_openmm())
-
- # Compute the energy of the configuration
- state = context.getState(getEnergy=True)
-
- # Get the potential as a unit.Quantity, put into units of hartree
- q = state.getPotentialEnergy() / unit.hartree / unit.AVOGADRO_CONSTANT_NA
-
- ret_data["properties"] = {"return_energy": q}
-
- # Execute driver
- if input_model.driver == "energy":
- ret_data["return_result"] = ret_data["properties"]["return_energy"]
-
- elif input_model.driver == "gradient":
- # Compute the forces
- state = context.getState(getForces=True)
-
- # Get the gradient as a unit.Quantity with shape (n_atoms, 3)
- gradient = state.getForces(asNumpy=True)
-
- # Convert to hartree/bohr and reformat as 1D array
- q = (gradient / (unit.hartree / unit.bohr)).reshape(-1) / unit.AVOGADRO_CONSTANT_NA
-
- # Force to gradient
- ret_data["return_result"] = -1 * q
- else:
- raise InputError(f"Driver {input_model.driver} not implemented for OpenMM.")
-
- ret_data["success"] = True
- ret_data["extras"] = input_model.extras
-
- # Move several pieces up a level
- ret_data["provenance"] = Provenance(creator="openmm", version=openmm.version.short_version, nthreads=nthreads)
-
- return AtomicResult(**{**input_model.dict(), **ret_data})
diff --git a/qcengine/programs/psi4.py b/qcengine/programs/psi4.py
deleted file mode 100644
index 1ba3d7fac..000000000
--- a/qcengine/programs/psi4.py
+++ /dev/null
@@ -1,308 +0,0 @@
-"""
-Calls the Psi4 executable.
-"""
-import json
-import os
-import sys
-from pathlib import Path
-from typing import TYPE_CHECKING, Dict
-
-from qcelemental.models import AtomicResult, BasisSet
-from qcelemental.util import deserialize, parse_version, safe_version, which, which_import
-
-from ..exceptions import InputError, RandomError, ResourceError, UnknownError
-from ..util import execute, popen, temporary_directory
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-class Psi4Harness(ProgramHarness):
-
- _defaults = {
- "name": "Psi4",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Whether Psi4 harness is ready for operation.
-
- Parameters
- ----------
- raise_error: bool
- Passed on to control negative return between False and ModuleNotFoundError raised.
-
- Returns
- -------
- bool
- If psi4 (psithon or psiapi) is found, returns True.
- If raise_error is False and psi4 is missing, returns False.
- If raise_error is True and psi4 is missing, the error message is raised.
-
- """
- psithon = which("psi4", return_bool=True)
- psiapi = which_import("psi4", return_bool=True)
- error_msg = ""
- error_which = which
-
- if psithon and not psiapi:
- with popen([which("psi4"), "--module"]) as exc:
- exc["proc"].wait(timeout=30)
- if "module does not exist" in exc["stderr"]:
- psiapi = True # --module argument only in Psi4 DDD branch (or >=1.6) so grandfathered in
- else:
- so, se, rc = exc["stdout"].strip(), exc["stderr"], exc["proc"].returncode
- error_msg = f" In particular, psi4 command found but unable to load psi4 module into sys.path. stdout: {so}, stderr: {se}"
- error_which = which_import
- if (so) and (not se) and (rc == 0):
- psimod = Path(so)
- if psimod.exists():
- sys.path.append(str(psimod))
- psiapi = which_import("psi4", return_bool=True)
-
- if psiapi and not psithon:
- with popen(["python", "-c", "import psi4; print(psi4.executable)"]) as exc:
- exc["proc"].wait(timeout=30)
- so, se, rc = exc["stdout"].strip(), exc["stderr"], exc["proc"].returncode
- error_msg = f" In particular, psi4 module found but unable to load psi4 command into PATH. stdout: {so}, stderr: {se}"
- # yes, everthing up to here could be got from `import psi4; psiexe = psi4.executable`. but, we try not to
- # load programs/modules in the `def found` fns.
- if (so) and (not se) and (rc == 0):
- psiexe = Path(so)
- if psiexe.exists():
- os.environ["PATH"] += os.pathsep + str(psiexe.parent)
- psithon = which("psi4", return_bool=True)
-
- if psithon and psiapi:
- return True
-
- return error_which(
- "psi4",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install psi4 -c conda-forge/label/libint_dev -c conda-forge`. Check it's in your PATH with `which psi4`."
- + error_msg,
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("psi4")
- if which_prog not in self.version_cache:
- with popen([which_prog, "--version"]) as exc:
- exc["proc"].wait(timeout=30)
- so, se, rc = exc["stdout"].strip(), exc["stderr"], exc["proc"].returncode
- if (so) and (not se) and (rc == 0):
- # Windows echos the command, so split stdout to collect response
- self.version_cache[which_prog] = safe_version(so.split()[-1])
- else:
- raise TypeError(f"Error {rc} retrieving Psi4 version: stdout: {so}, stderr: {se}")
-
- candidate_version = self.version_cache[which_prog]
-
- if "undef" in candidate_version:
- raise TypeError(
- """Using custom build without tags. Please pull git tags with `git pull origin master --tags`. If building from source, `git fetch upstream "refs/tags/*:refs/tags/*"`."""
- )
-
- return candidate_version
-
- def _handle_errors(self, output_data):
- if "error" in output_data:
- if "error_message" not in output_data["error"]:
- error_message = output_data["error"]
- error_type = "internal_error"
- else:
- error_message = output_data["error"]["error_message"]
- error_type = output_data["error"].get("error_type", "unknown_error")
- else:
- error_message = "Unknown error, error message is not found, possible segmentation fault!"
- error_type = "internal_error"
-
- return error_message, error_type
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Runs Psi4 in API mode
- """
- self.found(raise_error=True)
- pversion = parse_version(self.get_version())
-
- if pversion < parse_version("1.2"):
- raise ResourceError("Psi4 version '{}' not understood.".format(self.get_version()))
-
- # Location resolution order config.scratch_dir, $PSI_SCRATCH, /tmp
- parent = config.scratch_directory
- if parent is None:
- parent = os.environ.get("PSI_SCRATCH", None)
-
- error_type = None
- error_message = None
- compute_success = False
-
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
-
- # Basis must not be None for HF3c
- old_basis = input_model.model.basis
- input_model.model.__dict__["basis"] = old_basis or ""
-
- with temporary_directory(parent=parent, suffix="_psi_scratch", messy=config.scratch_messy) as tmpdir:
-
- caseless_keywords = {k.lower(): v for k, v in input_model.keywords.items()}
- if (input_model.molecule.molecular_multiplicity != 1) and ("reference" not in caseless_keywords):
- input_model.keywords["reference"] = "uhf"
-
- # Old-style JSON-based command line
- if pversion < parse_version("1.4a2.dev160"):
-
- # Setup the job
- input_data = input_model.dict(encoding="json")
- input_data["nthreads"] = config.ncores
- input_data["memory"] = int(config.memory * 1024 * 1024 * 1024 * 0.95) # Memory in bytes
- input_data["success"] = False
- input_data["return_output"] = True
-
- if input_data["schema_name"] == "qcschema_input":
- input_data["schema_name"] = "qc_schema_input"
-
- # Execute the program
- success, output = execute(
- [which("psi4"), "--scratch", tmpdir, "--json", "data.json"],
- {"data.json": json.dumps(input_data)},
- ["data.json"],
- scratch_directory=tmpdir,
- )
-
- output_data = input_data.copy()
- if success:
- output_data = json.loads(output["outfiles"]["data.json"])
- if "extras" not in output_data:
- output_data["extras"] = {}
-
- # Check QCVars
- local_qcvars = output_data.pop("psi4:qcvars", None)
- if local_qcvars:
- # Edge case where we might already have qcvars, should not happen
- if "qcvars" in output_data["extras"]:
- output_data["extras"]["local_qcvars"] = local_qcvars
- else:
- output_data["extras"]["qcvars"] = local_qcvars
-
- if output_data.get("success", False) is False:
- error_message, error_type = self._handle_errors(output_data)
- else:
- compute_success = True
-
- else:
- error_message = output.get("stderr", "No STDERR output")
- error_type = "execution_error"
-
- # Reset the schema if required
- output_data["schema_name"] = "qcschema_output"
- output_data.pop("memory", None)
- output_data.pop("nthreads", None)
- output_data["stdout"] = output_data.pop("raw_output", None)
-
- else:
-
- if input_model.extras.get("psiapi", False):
- import psi4
-
- orig_scr = psi4.core.IOManager.shared_object().get_default_path()
- psi4.core.set_num_threads(config.ncores, quiet=True)
- psi4.set_memory(f"{config.memory}GiB", quiet=True)
- # psi4.core.IOManager.shared_object().set_default_path(str(tmpdir))
- if pversion < parse_version("1.6"): # adjust to where DDD merged
- # slightly dangerous in that if `qcng.compute({..., psiapi=True}, "psi4")` called *from psi4
- # session*, session could unexpectedly get its own files cleaned away.
- output_data = psi4.schema_wrapper.run_qcschema(input_model).dict()
- else:
- output_data = psi4.schema_wrapper.run_qcschema(input_model, postclean=False).dict()
- # success here means execution returned. output_data may yet be qcel.models.AtomicResult or qcel.models.FailedOperation
- success = True
- if output_data.get("success", False):
- output_data["extras"]["psiapi_evaluated"] = True
- psi4.core.IOManager.shared_object().set_default_path(orig_scr)
- else:
- run_cmd = [
- which("psi4"),
- "--scratch",
- str(tmpdir),
- "--nthread",
- str(config.ncores),
- "--memory",
- f"{config.memory}GiB",
- "--qcschema",
- "data.msgpack",
- ]
- if config.scratch_messy:
- run_cmd.append("--messy")
- input_files = {"data.msgpack": input_model.serialize("msgpack-ext")}
- success, output = execute(
- run_cmd, input_files, ["data.msgpack"], as_binary=["data.msgpack"], scratch_directory=tmpdir
- )
- if success:
- output_data = deserialize(output["outfiles"]["data.msgpack"], "msgpack-ext")
- else:
- output_data = input_model.dict()
-
- if success:
- if output_data.get("success", False) is False:
- error_message, error_type = self._handle_errors(output_data)
- else:
- compute_success = True
- else:
- error_message = output.get("stderr", "No STDERR output")
- error_type = "execution_error"
-
- # Dispatch errors, PSIO Errors are not recoverable for future runs
- if compute_success is False:
-
- if "PSIO Error" in error_message:
- if "scratch directory" in error_message:
- # Psi4 cannot access the folder or file
- raise ResourceError(error_message)
- else:
- # Likely a random error, worth retrying
- raise RandomError(error_message)
- elif ("SIGSEV" in error_message) or ("SIGSEGV" in error_message) or ("segmentation fault" in error_message):
- raise RandomError(error_message)
- elif (
- # Missing and Managed cover same category of error pre- and post-DDD
- ("TypeError: set_global_option" in error_message)
- or (error_type in ["ValidationError", "MissingMethodError", "ManagedMethodError"])
- ):
- raise InputError(error_message)
- elif "RHF reference is only for singlets" in error_message:
- raise InputError(error_message)
- else:
- raise UnknownError(error_message)
-
- # Reset basis
- output_data["model"]["basis"] = old_basis
-
- # Move several pieces up a level
- output_data["provenance"]["memory"] = round(config.memory, 3)
- output_data["provenance"]["nthreads"] = config.ncores
- if output_data.get("native_files", None) is None:
- output_data["native_files"] = {
- "input": json.dumps(json.loads(input_model.json()), indent=1),
- }
-
- # Delete keys
- output_data.pop("return_output", None)
-
- return AtomicResult(**output_data)
diff --git a/qcengine/programs/qchem.py b/qcengine/programs/qchem.py
deleted file mode 100644
index 0a743e115..000000000
--- a/qcengine/programs/qchem.py
+++ /dev/null
@@ -1,681 +0,0 @@
-"""
-Calls the Q-Chem executable.
-"""
-
-import os
-import re
-import tempfile
-import warnings
-from collections import defaultdict
-from typing import Any, Dict, List, Optional, Tuple
-
-import numpy as np
-from qcelemental import constants
-from qcelemental.models import AtomicInput, AtomicResult, Molecule, Provenance
-from qcelemental.molparse import regex
-from qcelemental.util import parse_version, safe_version, which
-
-from qcengine.config import TaskConfig, get_config
-
-from ..exceptions import InputError, UnknownError
-from ..util import disk_files, execute, temporary_directory
-from .model import ProgramHarness
-
-NUMBER = r"(?x:" + regex.NUMBER + ")"
-
-
-class QChemHarness(ProgramHarness):
- _defaults: Dict[str, Any] = {
- "name": "QChem",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- def found(self, raise_error: bool = False) -> bool:
- return which(
- "qchem",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install by visiting the Q-Chem website. Check it's in your PATH with `which qchem'.",
- )
-
- def _get_qc_path(self, config: Optional["TaskConfig"] = None):
- paths = os.environ.copy()
- paths["QCSCRATCH"] = tempfile.gettempdir()
- if config and config.scratch_directory:
- paths["QCSCRATCH"] = config.scratch_directory
-
- # Nothing else to pass in
- if "QC" in os.environ:
- return paths
-
- # Assume QC path is
- qchem_path = which("qchem")
- if qchem_path:
- paths["QC"] = os.path.dirname(os.path.dirname(qchem_path))
-
- return paths
-
- def get_version(self) -> str:
- # excuse missing Q-Chem for QCEngineRecords tests
- found = self.found()
- if not found:
- return safe_version("0.0.0")
-
- self.found(raise_error=True)
-
- # Get the node configuration
- config = get_config()
-
- which_prog = which("qchem")
- if which_prog not in self.version_cache:
- success, exc = execute(
- [which_prog, "v.in"],
- {"v.in": "$rem\n"},
- scratch_directory=config.scratch_directory,
- environment=self._get_qc_path(),
- timeout=15,
- )
-
- mobj = re.search(r"Q-Chem\s+([\d.]+)\s+for", exc["stdout"])
- if not mobj:
- mobj = re.search(r"Q-Chem version:\s+([\d.]+)\s+", exc["stdout"])
-
- if mobj:
- self.version_cache[which_prog] = safe_version(mobj.group(1))
-
- # if "QC not defined" in exc["stdout"]:
- else:
- return safe_version("0.0.0")
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: TaskConfig) -> "AtomicResult":
- """
- Run qchem
- """
- # Check if qchem executable is found
- self.found(raise_error=True)
-
- # Check qchem version
- qceng_ver = "5.1"
- if parse_version(self.get_version()) < parse_version(qceng_ver):
- raise TypeError(f"Q-Chem version <{qceng_ver} not supported (found version {self.get_version()})")
-
- # Setup the job
- job_inputs = self.build_input(input_model, config)
-
- # Run qchem
- exe_success, proc = self.execute(job_inputs)
-
- # Determine whether the calculation succeeded
- if exe_success:
- # If execution succeeded, collect results
- result = self.parse_output(proc["outfiles"], input_model)
- return result
- else:
- outfile = proc["outfiles"]["dispatch.out"]
- if "fatal error occurred in module qparser" in outfile:
- raise InputError(proc["outfiles"]["dispatch.out"])
- else:
- # Return UnknownError for error propagation
- raise UnknownError(proc["outfiles"]["dispatch.out"])
-
- def execute(
- self,
- inputs: Dict[str, Any],
- *,
- extra_infiles: Optional[Dict[str, str]] = None,
- extra_outfiles: Optional[List[str]] = None,
- extra_commands: Optional[List[str]] = None,
- scratch_name: Optional[str] = None,
- scratch_messy: bool = False,
- timeout: Optional[int] = None,
- ) -> Tuple[bool, Dict[str, Any]]:
- """
- For option documentation go look at qcengine/util.execute
- """
-
- # Collect all input files and update with extra_infiles
- infiles = inputs["infiles"]
- if extra_infiles is not None:
- infiles.update(extra_infiles)
-
- binary_files = [os.path.join("savepath", x) for x in ["99.0", "131.0", "132.0"]]
-
- # Collect all output files and extend with with extra_outfiles
- outfiles = ["dispatch.out"]
- if extra_outfiles is not None:
- outfiles.extend(extra_outfiles)
-
- # Replace commands with extra_commands if present
- commands = inputs["commands"] + ["savepath"]
- if extra_commands is not None:
- commands = extra_commands
-
- envs = self._get_qc_path()
-
- with temporary_directory(parent=inputs["scratch_directory"], suffix="_qchem_scratch") as tmpdir:
- envs["QCSCRATCH"] = tmpdir
- bdict = {x: None for x in binary_files}
-
- with disk_files({}, bdict, cwd=tmpdir, as_binary=binary_files):
- exe_success, proc = execute(
- commands,
- infiles=infiles,
- outfiles=outfiles,
- scratch_name=scratch_name,
- scratch_directory=tmpdir,
- scratch_messy=scratch_messy,
- timeout=timeout,
- environment=envs,
- )
-
- proc["outfiles"].update({os.path.split(k)[-1]: v for k, v in bdict.items()})
-
- if (proc["outfiles"]["dispatch.out"] is None) or (
- "Thank you very much for using Q-Chem" not in proc["outfiles"]["dispatch.out"]
- ):
- exe_success = False
-
- # QChem does not create an output file and only prints to stdout
- return exe_success, proc
-
- def build_input(
- self, input_model: "AtomicInput", config: TaskConfig, template: Optional[str] = None
- ) -> Dict[str, Any]:
-
- # Check some bounds on what cannot be parsed
- if "ccsd" in input_model.model.method.lower() or "ccd" in input_model.model.method.lower():
- raise InputError("Cannot handle CC* methods currently.")
-
- # Build keywords
- keywords = {k.upper(): v for k, v in input_model.keywords.items()}
- keywords["INPUT_BOHR"] = "TRUE"
- keywords["MEM_TOTAL"] = str(int(config.memory * 1024)) # In MB
-
- if input_model.driver == "energy":
- keywords["JOBTYPE"] = "sp"
- elif input_model.driver == "gradient":
- keywords["JOBTYPE"] = "force"
- elif input_model.driver == "hessian":
- keywords["JOBTYPE"] = "freq"
- else:
- raise InputError(f"Driver {input_model.driver} not implemented for Q-Chem.")
-
- if input_model.molecule.fix_com or input_model.molecule.fix_orientation:
- keywords["SYM_IGNORE"] = "TRUE"
-
- keywords["METHOD"] = input_model.model.method
- if input_model.model.basis:
- keywords["BASIS"] = input_model.model.basis
-
- # Begin the input file
- input_file = []
- input_file.append(
- f"""$comment
-Automatically generated Q-Chem input file by QCEngine
-$end
- """
- )
-
- # Add Molecule, TODO: Add to QCElemental
- mol = input_model.molecule
- input_file.append("$molecule")
- input_file.append(f"""{int(mol.molecular_charge)} {mol.molecular_multiplicity}""")
-
- for real, sym, geom in zip(mol.real, mol.symbols, mol.geometry):
- if real is False:
- raise InputError("Cannot handle ghost atoms yet.")
- input_file.append(f"{sym} {geom[0]:14.8f} {geom[1]:14.8f} {geom[2]:14.8f}")
-
- input_file.append("$end\n")
-
- # Write out the keywords
- input_file.append("$rem")
- for k, v in keywords.items():
- input_file.append(f"{k:20s} {v}")
- input_file.append("$end\n")
-
- ret = {
- "infiles": {"dispatch.in": "\n".join(input_file)},
- "commands": [which("qchem"), "-nt", str(config.ncores), "dispatch.in", "dispatch.out"],
- "scratch_directory": config.scratch_directory,
- }
-
- return ret
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> AtomicResult:
-
- output_data = {}
-
- bdata = {}
- outtext = ""
- for k, v in outfiles.items():
- if k == "dispatch.out":
- outtext = v
- continue
- if v is None:
- continue
- bdata[k] = np.frombuffer(v)
-
- if input_model.driver == "energy":
- output_data["return_result"] = bdata["99.0"][-1]
- elif input_model.driver == "gradient":
- output_data["return_result"] = bdata["131.0"]
- elif input_model.driver == "hessian":
- output_data["return_result"] = bdata["132.0"]
- else:
- raise ValueError(f"Could not parse driver of type {input_model.driver}.")
-
- properties = {
- "nuclear_repulsion_energy": bdata["99.0"][0],
- "scf_total_energy": bdata["99.0"][1],
- "return_energy": bdata["99.0"][-1],
- }
-
- qcvars = {}
- _mp2_methods = {"mp2", "rimp2"}
- if input_model.model.method.lower() in _mp2_methods:
- emp2 = bdata["99.0"][-1]
- properties["mp2_total_energy"] = emp2
- qcvars["MP2 TOTAL ENERGY"] = emp2
- qcvars["CURRENT ENERGY"] = emp2
- ehf = bdata["99.0"][1]
- qcvars["HF TOTAL ENERGY"] = ehf
- qcvars["SCF TOTAL ENERGY"] = ehf
- qcvars["CURRENT REFERENCE ENERGY"] = ehf
- qcvars["MP2 CORRELATION ENERGY"] = emp2 - ehf
- qcvars["CURRENT CORRELATION ENERGY"] = emp2 - ehf
- properties["mp2_correlation_energy"] = emp2 - ehf
-
- # Correct CCSD because its odd?
- # if input_model.model.method.lower() == "ccsd":
- # m1 = re.findall(" CCSD correlation energy.+=.+\d+\.\d+", outfiles["dispatch.out"])
- # m2 = re.findall(" CCSD total energy.+=.+\d+\.\d+", outfiles["dispatch.out"])
-
- props, prov = self._parse_logfile_common(outtext, input_model.dict())
- output_data["provenance"] = prov
- output_data["properties"] = properties
- output_data["properties"].update(props)
- output_data["stdout"] = outfiles["dispatch.out"]
- output_data["success"] = True
-
- merged_data = {**input_model.dict(), **output_data}
- merged_data["extras"]["qcvars"] = qcvars
-
- return AtomicResult(**merged_data)
-
- def _parse_logfile_common(self, outtext: str, input_dict: Dict[str, Any]):
- """
- Parses fields from log file that are not parsed from QCSCRATCH in parse_output
- """
-
- properties = {}
- provenance = Provenance(creator="QChem", version=self.get_version(), routine="qchem").dict()
- mobj = re.search(r"This is a multi-thread run using ([0-9]+) threads", outtext)
- if mobj:
- provenance["nthreads"] = int(mobj.group(1))
-
- mobj = re.search(r"Total job time:\s*" + NUMBER + r"s\(wall\)", outtext)
- if mobj:
- provenance["wall_time"] = float(mobj.group(1))
-
- mobj = re.search(r"Archival summary:\s*\n[0-9]+\\[0-9+]\\([\w\.\-]+)\\", outtext)
- if mobj:
- provenance["hostname"] = mobj.group(1)
-
- mobj = re.search(r"\n\s*There are\s+(\d+) alpha and\s+(\d+) beta electrons\s*\n", outtext)
- if mobj:
- properties["calcinfo_nalpha"] = int(mobj.group(1))
- properties["calcinfo_nbeta"] = int(mobj.group(2))
-
- mobj = re.search(r"\n\s*There are\s+\d+ shells and\s+(\d+) basis functions\s*\n", outtext)
- if mobj:
- properties["calcinfo_nbasis"] = int(mobj.group(1))
-
- mobj = re.search(r"\n\s*RI-MP2 CORRELATION ENERGY\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- if mobj:
- properties["mp2_correlation_energy"] = float(mobj.group(1))
-
- mobj = re.search(r"\n\s*RI-MP2 SINGLES ENERGY\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- if mobj:
- properties["mp2_singles_energy"] = float(mobj.group(1))
-
- mobj_aaaa = re.search(r"\n\s*RI-MP2 ENERGY \(aa\|aa\)\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- mobj_bbbb = re.search(r"\n\s*RI-MP2 ENERGY \(bb\|bb\)\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- if mobj_aaaa and mobj_bbbb:
- properties["mp2_same_spin_correlation_energy"] = float(mobj_aaaa.group(1)) + float(mobj_bbbb.group(1))
-
- mobj_aabb = re.search(r"\n\s*RI-MP2 ENERGY \(aa\|bb\)\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- mobj_bbaa = re.search(r"\n\s*RI-MP2 ENERGY \(bb\|aa\)\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- if mobj_aaaa and mobj_bbbb:
- properties["mp2_opposite_spin_correlation_energy"] = float(mobj_aabb.group(1)) + float(mobj_bbaa.group(1))
-
- properties["calcinfo_natom"] = len(input_dict["molecule"]["symbols"])
-
- mobj = re.search(r"\n\s*(\d+)\s+" + NUMBER + r"\s+" + NUMBER + r"\s+Convergence criterion met\s*\n", outtext)
- if mobj:
- properties["scf_iterations"] = int(mobj.group(1))
-
- mobj = re.search(
- r"\n\s+Dipole Moment \(Debye\)\s*\n\s+X\s+" + NUMBER + r"\s+Y\s+" + NUMBER + r"\s+Z\s+" + NUMBER + r"\s*\n",
- outtext,
- )
- if mobj:
- cf = constants.conversion_factor("debye", "e * bohr")
- properties["scf_dipole_moment"] = [float(mobj.group(i)) * cf for i in range(1, 4)]
-
- return properties, provenance
-
- def parse_logfile(self, outfiles: Dict[str, str]) -> AtomicResult:
- """
- Parses a log file.
- """
- warnings.warn(
- "parse_logfile will result in precision loss for some fields due to trunctation in " "Q-Chem output files."
- )
-
- outtext = outfiles["dispatch.out"]
-
- mobj = re.search(r"(?:User input\:|Running Job?)\s+\d+\s+of\s+(\d+)", outtext)
- if mobj:
- if int(mobj.group(1)) > 1:
- raise InputError("Multi-job Q-Chem log files not supported.")
-
- input_dict = {}
- mobj = re.search(r"\n-{20,}\nUser input:\n-{20,}\n(.+)\n-{20,}", outtext, re.DOTALL)
- if mobj:
- inputtext = mobj.group(1)
-
- rem_match = re.search(r"\$rem\s*\n([^\$]+)\n\s*\$end", inputtext, re.DOTALL | re.IGNORECASE)
- if rem_match:
- rem_text = rem_match.group(1)
- lines = rem_text.split("\n")
- keywords = {}
- for line in lines:
- s = re.sub(r"(^|[^\\])!.*", "", line).split()
- if len(s) == 0:
- continue
- keywords[s[0].lower()] = s[1].lower()
- input_dict["model"] = {}
- input_dict["model"]["method"] = keywords.pop("method").lower()
- input_dict["model"]["basis"] = keywords.pop("basis").lower()
- if "jobtype" in keywords:
- jobtype = keywords.pop("jobtype")
- else:
- jobtype = "sp"
- _jobtype_to_driver = {
- "sp": "energy",
- "force": "gradient",
- "freq": "hessian",
- } # optimization intentionally not supported
- try:
- input_dict["driver"] = _jobtype_to_driver[jobtype]
- except KeyError:
- raise KeyError(f"Jobtype {jobtype} not supported in qchem log file parser.")
-
- for key in keywords:
- if keywords[key] == "false":
- keywords[key] = False
- if keywords[key] == "true":
- keywords[key] = True
- input_dict["keywords"] = keywords
-
- molecule_match = re.search(r"\$molecule\s*\n([^\$]+)\n\s*\$end", inputtext, re.DOTALL | re.IGNORECASE)
- if molecule_match:
- molecule_text = molecule_match.group(1)
- if keywords.get("input_bohr", False):
- molecule_text += "\nunits au"
- molecule = Molecule.from_data(molecule_text, dtype="psi4")
- input_dict["molecule"] = molecule.dict()
-
- _excluded_rem = {
- "input_bohr",
- "mem_total",
- "mem_static",
- } # parts of the rem normally written by build_input, and which do not affect results
- for item in _excluded_rem:
- if item in input_dict["keywords"]:
- input_dict["keywords"].pop(item)
-
- try:
- qcscr_result = self.parse_output(outfiles, AtomicInput(**input_dict)).dict()
- except KeyError:
- props, prov = self._parse_logfile_common(outtext, input_dict)
- qcscr_result = {"properties": props, "provenance": prov, **input_dict}
-
- mobj = re.search(r"\n\s*Total\s+energy in the final basis set =\s+" + NUMBER + r"\s*\n", outtext)
- if mobj and qcscr_result["properties"].get("scf_total_energy", None) is None:
- qcscr_result["properties"]["scf_total_energy"] = float(mobj.group(1))
-
- mobj = re.search(r"\n\s*Nuclear Repulsion Energy =\s+" + NUMBER + r"\s+hartrees\s*\n", outtext)
- if mobj and qcscr_result["properties"].get("nuclear_repulsion_energy", None) is None:
- qcscr_result["properties"]["nuclear_repulsion_energy"] = float(mobj.group(1))
-
- mobj = re.search(r"\n\s*RI-MP2 TOTAL ENERGY\s+=\s+" + NUMBER + r"\s+au\s*\n", outtext)
- if mobj and qcscr_result["properties"].get("mp2_total_energy", None) is None:
- qcscr_result["properties"]["mp2_total_energy"] = float(mobj.group(1))
-
- _scf_methods = {
- "hf",
- "spw92",
- "lda",
- "svwn5",
- "b97-d3(0)",
- "b97-d",
- "pbe",
- "blyp",
- "revpbe",
- "beef-vdw",
- "bop",
- "bp86",
- "bp86vwn",
- "bpbe",
- "edf1",
- "edf2",
- "gam",
- "hcth93",
- "hcth120",
- "hcth147",
- "hcth407",
- "hle16",
- "kt1",
- "kt2",
- "kt3",
- "mpw91",
- "n12",
- "olyp",
- "pbeop",
- "pbesol",
- "pw91",
- "rpbe",
- "rvv10",
- "sogga",
- "sogga11",
- "vv10",
- "b97m-v",
- "b97m-rv",
- "m06-l",
- "tpss",
- "revtpss",
- "bloc",
- "m11-l",
- "mbeef",
- "mgga_ms0",
- "mgga_ms1",
- "mgga_ms2",
- "mgga_mvs",
- "mn12-l",
- "mn15-l",
- "otpss",
- "pkzb",
- "scan",
- "t-hcth",
- "tm",
- "vsxc",
- "b3lyp",
- "pbe0",
- "revpbe0",
- "b97",
- "b1lyp",
- "b1pw91",
- "b3lyp5",
- "b3p86",
- "b1lyp",
- "b1pw91",
- "b3lyp5",
- "b3p86",
- "b3pw91",
- "b5050lyp",
- "b97-1",
- "b97-2",
- "b97-3",
- "b97-k",
- "bhhlyp",
- "hflyp",
- "mpw1k",
- "mpw1lyp",
- "mpw1pbe",
- "mpw1pw91",
- "o3lyp",
- "pbeh-3c",
- "pbe50",
- "sogga11-x",
- "wc04",
- "wp04",
- "x3lyp",
- "m06-2x",
- "m08-hx",
- "tpssh",
- "revtpssh",
- "b1b95",
- "b3tlap",
- "bb1k",
- "bmk",
- "dldf",
- "m05",
- "m05-2x",
- "m06",
- "m06-hf",
- "m08-so",
- "mgga_ms2h",
- "mgga_mvsh",
- "mn15",
- "mpw1b95",
- "mpwb1k",
- "pw6b95",
- "pwb6k",
- "scan0",
- "t-hcthh",
- "tpss0",
- "wb97x-v",
- "wb97x-d3",
- "wb97x-d",
- "cam-b3lyp",
- "cam-qtp00",
- "cam-qtp01",
- "hse-hjs",
- "lc-rvv10",
- "lc-vv10",
- "lc-wpbe08",
- "lrc-bop",
- "lrc-wpbe",
- "lrc-wpbeh",
- "n12-sx",
- "rcam-b3lyp",
- "wb97",
- "wb97x",
- "wb97x-rv",
- "wb97m-v",
- "m11",
- "mn12-sx",
- "wb97m-rv",
- "wm05-d",
- "wm06-d3",
- "dsd-pbepbe-d3",
- "wb97x-2(lp)",
- "wb97x-2(tqz)",
- "xyg3",
- "xygj-os",
- "b2plyp",
- "b2gpplyp",
- "dsd-pbep86-d3",
- "ls1dh-pbe",
- "pbe-qidh",
- "pbe0-2",
- "pbe0-dh",
- "ptpss-d3",
- "dsd-pbeb95-d3",
- "pwpb95-d3",
- }
- _mp2_methods = {"rimp2"}
-
- method = input_dict["model"]["method"].lower()
- if qcscr_result["properties"].get("return_energy", None) is None:
- if method in _mp2_methods:
- qcscr_result["properties"]["return_energy"] = qcscr_result["properties"]["mp2_total_energy"]
- elif method in _scf_methods:
- qcscr_result["properties"]["return_energy"] = qcscr_result["properties"]["scf_total_energy"]
- else:
- raise NotImplementedError(f"Method {method} not supported by logfile parser for energy driver.")
-
- if input_dict["driver"] == "gradient" and qcscr_result.get("return_result", None) is None:
-
- def read_matrix(text):
- lines = text.split("\n")
- i = 0
- mdict = defaultdict(dict)
- maxcol = 0
- maxrow = 0
- while i < len(lines):
- cols = [int(idx) for idx in lines[i].split()]
- maxcol = max(maxcol, *cols)
- i += 1
- while i < len(lines):
- s = lines[i].split()
- if len(s) <= len(cols):
- break
- assert len(s) == len(cols) + 1, s
- row = int(s[0])
- maxrow = max(maxrow, row)
- data = [float(field) for field in s[1:]]
- for col_idx, col in enumerate(cols):
- mdict[row - 1][col - 1] = data[col_idx]
- i += 1
-
- ret = np.zeros((maxrow, maxcol))
- for row in mdict:
- for col in mdict[row]:
- ret[row, col] = mdict[row][col]
- return ret
-
- if method in _mp2_methods:
- mobj = re.search(
- r"\n\s+Full Analytical Gradient of MP2 Energy \(in au.\)\s*\n"
- r"([\s\d\.EDed\+\-]+)\n"
- r"\s*Gradient time:",
- outtext,
- )
-
- elif method in _scf_methods:
- mobj = re.search(
- r"\n\s+Gradient of SCF Energy\s*\n([\s\d\.EDed\+\-]+)\n\s*Max gradient component =", outtext
- )
-
- else:
- raise NotImplementedError(f"Method {method} not supported by the logfile parser for gradient driver.")
-
- if mobj:
- qcscr_result["return_result"] = read_matrix(mobj.group(1)).T
-
- qcscr_result["success"] = True # XXX: have a nice day?
- qcscr_result["stdout"] = outtext
- if input_dict["driver"] == "energy" and qcscr_result.get("return_result", None) is None:
- qcscr_result["return_result"] = qcscr_result["properties"]["return_energy"]
-
- return AtomicResult(**qcscr_result)
diff --git a/qcengine/programs/qcore.py b/qcengine/programs/qcore.py
deleted file mode 100644
index 172f8dbb7..000000000
--- a/qcengine/programs/qcore.py
+++ /dev/null
@@ -1,260 +0,0 @@
-"""
-The qcore QCEngine Harness
-"""
-
-from typing import TYPE_CHECKING, Any, Dict, List, Set
-
-import numpy as np
-from qcelemental.models import AtomicResult, BasisSet
-from qcelemental.util import parse_version, safe_version, which_import
-
-from ..exceptions import InputError, UnknownError
-from .model import ProgramHarness
-from .util import (
- cca_ao_order_spherical,
- get_ao_conversion,
- reorder_column_ao_indices,
- reorder_row_and_column_ao_indices,
-)
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-def qcore_ao_order_spherical(max_angular_momentum: int) -> Dict[int, List[int]]:
- ao_order = {}
- for ang_mom in range(max_angular_momentum):
- ao_order[ang_mom] = [x for x in range(ang_mom, -1 * ang_mom - 1, -1)]
- return ao_order
-
-
-class QcoreHarness(ProgramHarness):
- _defaults: Dict[str, Any] = {
- "name": "Qcore",
- "scratch": False,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- # List of DFT functionals
- _dft_functionals: Set[str] = {
- "SLATER",
- "DIRAC",
- "SLATERD3",
- "DIRACD3",
- "VWN5",
- "VWN",
- "VWN1",
- "SVWN",
- "LDA",
- "BLYP",
- "BPW91",
- "BLYPD3",
- "B88",
- "PBEX",
- "PBERX",
- "PBEC",
- "LYP",
- "PW91",
- "P86",
- "PBE",
- "PBER",
- "PBED3",
- "PBERD3",
- "B3LYP3",
- "B3LYP",
- "B3LYP5",
- "PBE0",
- "PBE1PBE",
- "B3LYP3D3",
- "B3LYPD3",
- "B3LYP5D3",
- "PBE0D3",
- "PBE1PBED3",
- "CAMB3LYP",
- "WB97X",
- "CAMB3LYPD3",
- "WB97XD3",
- }
-
- _xtb_models: Set[str] = {"GFN1", "GFN0"}
-
- # This map order converts qcore ordering to CCA ordering
- # Entos spherical basis ordering for each angular momentum. Follows reverse order of CCA.
- _qcore_to_cca_ao_order = {"spherical": get_ao_conversion(cca_ao_order_spherical(10), qcore_ao_order_spherical(10))}
-
- class Config(ProgramHarness.Config):
- pass
-
- def found(self, raise_error: bool = False) -> bool:
- return which_import(
- "qcore",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install py-qcore -c entos -c conda-forge`.",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which_import("qcore")
- if which_prog not in self.version_cache:
- import qcore
-
- self.version_cache[which_prog] = safe_version(qcore.__version__)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Run qcore
- """
- # Check if qcore executable is found
- self.found(raise_error=True)
-
- # Check qcore version
- if parse_version(self.get_version()) < parse_version("0.8.9"):
- raise TypeError(f"qcore version {self.get_version()} not supported")
-
- import qcore
-
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
-
- method = input_model.model.method.upper()
- if method in self._dft_functionals:
- method = {"kind": "dft", "xc": method, "ao": input_model.model.basis}
- elif method == "HF":
- method = {"kind": "hf", "ao": input_model.model.basis}
- elif method in self._xtb_models:
- method = {"kind": "xtb", "model": method}
- else:
- raise InputError(f"Method is not valid: {method}")
-
- method["details"] = input_model.keywords
-
- qcore_input = {
- # "schema_name": "single_input",
- "molecule": {
- "geometry": input_model.molecule.geometry,
- "atomic_numbers": input_model.molecule.atomic_numbers,
- "charge": input_model.molecule.molecular_charge,
- "multiplicity": input_model.molecule.molecular_multiplicity,
- },
- "method": method,
- "result_contract": {"wavefunction": "all"},
- "result_type": input_model.driver,
- }
- try:
- result = qcore.run(qcore_input, ncores=config.ncores)
- except Exception as exc:
- return UnknownError(str(exc))
-
- return self.parse_output(result.dict(), input_model)
-
- def parse_output(self, output: Dict[str, Any], input_model: "AtomicInput") -> "AtomicResult":
-
- wavefunction_map = {
- "orbitals_alpha": "scf_orbitals_a",
- "orbitals_beta": "scf_orbitals_b",
- "density_alpha": "scf_density_a",
- "density_beta": "scf_density_b",
- "fock_alpha": "scf_fock_a",
- "fock_beta": "scf_fock_b",
- "eigenvalues_alpha": "scf_eigenvalues_a",
- "eigenvalues_beta": "scf_eigenvalues_b",
- "occupations_alpha": "scf_occupations_a",
- "occupations_beta": "scf_occupations_b",
- }
-
- output_data = input_model.dict()
-
- output_data["return_result"] = output[input_model.driver.value]
-
- # Always build a wavefunction, it will be stripped
- obas = output["wavefunction"]["ao_basis"]
- for k, center in obas["center_data"].items():
- # Convert basis set, cannot handle arrays
- for shell in center["electron_shells"]:
- shell.pop("normalized_primitives", None)
- for el_k in ["coefficients", "exponents", "angular_momentum"]:
- shell[el_k] = shell[el_k].tolist()
-
- if center["ecp_potentials"] is not None:
- for shell in center["ecp_potentials"]:
- shell.pop("ecp_potentials", None)
- for ecp_k in ["angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"]:
- shell[ecp_k] = shell[ecp_k].tolist()
-
- basis_set = BasisSet(
- name=str(input_model.model.basis), center_data=obas["center_data"], atom_map=obas["atom_map"]
- )
-
- wavefunction = {"basis": basis_set}
- for key, qcschema_key in wavefunction_map.items():
- qcore_data = output["wavefunction"].get(key, None)
- if qcore_data is None:
- continue
-
- if ("density" in key) or ("fock" in key):
- qcore_data = reorder_row_and_column_ao_indices(qcore_data, basis_set, self._qcore_to_cca_ao_order)
- # Handles orbitals and 1D
- elif "orbitals" in key:
- qcore_data = reorder_column_ao_indices(qcore_data, basis_set, self._qcore_to_cca_ao_order)
- elif "eigenvalues" in key:
- qcore_data = reorder_column_ao_indices(
- qcore_data.reshape(1, -1), basis_set, self._qcore_to_cca_ao_order
- ).ravel()
-
- elif "occupations" in key:
- tmp = np.zeros(basis_set.nbf)
- tmp[: qcore_data.shape[0]] = qcore_data
- qcore_data = reorder_column_ao_indices(
- tmp.reshape(1, -1), basis_set, self._qcore_to_cca_ao_order
- ).ravel()
- else:
- raise KeyError("Wavefunction conversion key not understood")
-
- wavefunction[qcschema_key] = qcore_data
-
- wavefunction["restricted"] = True
- if "scf_eigenvalues_b" in wavefunction:
- wavefunction["restricted"] = False
-
- output_data["wavefunction"] = wavefunction
-
- # Handle remaining top level keys
- properties = {
- "calcinfo_nbasis": basis_set.nbf,
- "calcinfo_nmo": basis_set.nbf,
- "calcinfo_nalpha": np.sum(wavefunction["scf_occupations_a"] > 0),
- "calcinfo_natom": input_model.molecule.symbols.shape[0],
- "return_energy": output["energy"],
- }
- if wavefunction["restricted"]:
- properties["calcinfo_nbeta"] = properties["calcinfo_nalpha"]
- else:
- properties["calcinfo_nbeta"] = np.sum(wavefunction["scf_occupations_b"] > 0)
-
- output_data["properties"] = properties
-
- output_data["schema_name"] = "qcschema_output"
- output_data["success"] = True
-
- return AtomicResult(**output_data)
-
-
-class EntosHarness(QcoreHarness):
- _defaults: Dict[str, Any] = {
- "name": "Entos",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
diff --git a/qcengine/programs/qcvar_identities_resources.py b/qcengine/programs/qcvar_identities_resources.py
deleted file mode 100644
index 24e0257c8..000000000
--- a/qcengine/programs/qcvar_identities_resources.py
+++ /dev/null
@@ -1,449 +0,0 @@
-import logging
-from decimal import Decimal as Dm
-from typing import Any, Dict, List
-
-import numpy as np
-from qcelemental.models import AtomicResultProperties
-
-from .util import PreservingDict
-
-logger = logging.getLogger(__name__)
-
-
-def _difference(args):
- minuend, subtrahend = args
- return minuend - subtrahend
-
-
-def _product(args):
- multiplicand, multiplier = args
- return multiplicand * multiplier
-
-
-def _spin_component_scaling_wsing(args):
- os_scale, ss_scale, tot_corl, ss_corl, s_corl = args
- return os_scale * (tot_corl - ss_corl - s_corl) + ss_scale * ss_corl + s_corl
-
-
-def _dispersion_weighting_wsing(args):
- omega, hb_mtd, dd_mtd, s_corl = args
- return omega * hb_mtd + (1.0 - omega) * dd_mtd + s_corl
-
-
-def omega(args):
- alpha, beta, ratio = args
- return 0.5 * (1.0 + np.tanh(alpha + beta * ratio))
-
-
-def _linear(args):
- return sum(c * v for c, v in zip(args))
-
-
-def _solve_in_turn(args: List, coeff: List) -> List[Dict[str, Any]]:
- """Expands a description of a linear equation of variables `args` and weights `coeff` into all rearrangements of the equation."""
-
- assert len(args) == len(coeff)
- pv0 = []
-
- for itgt in range(len(args)):
- non_target_args = args[:]
- non_target_args.pop(itgt)
-
- non_target_coeff = coeff[:]
- non_target_coeff.pop(itgt)
- solve_by = -1 // coeff[itgt]
- non_target_coeff = [solve_by * c for c in non_target_coeff]
-
- pv0.append(
- {
- "form": args[itgt],
- "func": lambda vv, cc=non_target_coeff: sum(c * v for c, v in zip(vv, cc)),
- "args": non_target_args,
- }
- )
-
- return pv0
-
-
-def qcvar_identities() -> List[Dict[str, Any]]:
- """Define QCVariable identity equations (e.g., method total = method correlation + HF)."""
-
- pv0 = []
-
- # MP2
- pv0.extend(_solve_in_turn(args=["MP2 TOTAL ENERGY", "HF TOTAL ENERGY", "MP2 CORRELATION ENERGY"], coeff=[-1, 1, 1]))
- pv0.extend(
- _solve_in_turn(
- args=["MP2 DOUBLES ENERGY", "MP2 SAME-SPIN CORRELATION ENERGY", "MP2 OPPOSITE-SPIN CORRELATION ENERGY"],
- coeff=[-1, 1, 1],
- )
- )
- pv0.extend(
- _solve_in_turn(args=["MP2 CORRELATION ENERGY", "MP2 DOUBLES ENERGY", "MP2 SINGLES ENERGY"], coeff=[-1, 1, 1])
- )
-
- pv0.extend(
- _solve_in_turn(
- args=["CUSTOM SCS-MP2 TOTAL ENERGY", "CUSTOM SCS-MP2 CORRELATION ENERGY", "HF TOTAL ENERGY"],
- coeff=[-1, 1, 1],
- )
- )
-
- # SCS-MP2
- pv0.append(
- {
- "form": "SCS-MP2 CORRELATION ENERGY",
- "func": _spin_component_scaling_wsing,
- "args": [
- Dm(6) / Dm(5),
- Dm(1) / Dm(3),
- "MP2 CORRELATION ENERGY",
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- ],
- }
- ) # yapf: disable
- pv0.append({"form": "SCS-MP2 TOTAL ENERGY", "func": sum, "args": ["HF TOTAL ENERGY", "SCS-MP2 CORRELATION ENERGY"]})
-
- # SCS(N)-MP2
- pv0.append(
- {
- "form": "SCS(N)-MP2 CORRELATION ENERGY",
- "func": _spin_component_scaling_wsing,
- "args": [
- Dm(0),
- Dm(1.76),
- "MP2 CORRELATION ENERGY",
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- ],
- }
- ) # yapf: disable
- pv0.append(
- {"form": "SCS(N)-MP2 TOTAL ENERGY", "func": sum, "args": ["HF TOTAL ENERGY", "SCS(N)-MP2 CORRELATION ENERGY"]}
- )
-
- # SCS-MP2-VDW
- # * https://doi.org/10.1080/00268970802641242
- pv0.append(
- {
- "form": "SCS-MP2-VDW CORRELATION ENERGY",
- "func": _spin_component_scaling_wsing,
- "args": [
- Dm(1.28),
- Dm(0.50),
- "MP2 CORRELATION ENERGY",
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- ],
- }
- ) # yapf: disable
- pv0.append(
- {"form": "SCS-MP2-VDW TOTAL ENERGY", "func": sum, "args": ["HF TOTAL ENERGY", "SCS-MP2-VDW CORRELATION ENERGY"]}
- )
-
- # DW-MP2
- # only defined at the (IE) reaction level (like SAPT)
- # dwmp2['DW-MP2 OMEGA'][mt] = \
- # rxnm_contract_expand(df.xs('HF TOTAL ENERGY', level='qcvar').xs(mtl[0], level='meta')) / \
- # rxnm_contract_expand(df.xs('MP2 TOTAL ENERGY', level='qcvar').xs(mtl[1], level='meta'))
- # df_omega = omega([0.15276, 1.89952, df_omega])
-
- # pv0.append({
- # 'form': 'DW-MP2 CORRELATION ENERGY',
- # 'func': _dispersion_weighting_wsing,
- # 'args': ['DW_MP2 OMEGA', 'MP2 CORRELATION ENERGY', 'SCS-MP2 CORRELATION ENERGY', 'MP2 SINGLES ENERGY']})
- # pv0.append({
- # 'form': 'DW-MP2 TOTAL ENERGY',
- # 'func': sum,
- # 'args': ['HF TOTAL ENERGY', 'DW-MP2 CORRELATION ENERGY']})
-
- # MP3
- pv0.extend(_solve_in_turn(args=["MP3 TOTAL ENERGY", "HF TOTAL ENERGY", "MP3 CORRELATION ENERGY"], coeff=[-1, 1, 1]))
- pv0.extend(
- _solve_in_turn(
- args=["MP3 DOUBLES ENERGY", "MP3 SAME-SPIN CORRELATION ENERGY", "MP3 OPPOSITE-SPIN CORRELATION ENERGY"],
- coeff=[-1, 1, 1],
- )
- )
- pv0.extend(
- _solve_in_turn(args=["MP3 CORRELATION ENERGY", "MP3 DOUBLES ENERGY", "MP3 SINGLES ENERGY"], coeff=[-1, 1, 1])
- )
-
- # MPN
- for mpn in range(4, 20):
- pv0.extend(
- _solve_in_turn(
- args=["MP{} TOTAL ENERGY".format(mpn), "HF TOTAL ENERGY", "MP{} CORRELATION ENERGY".format(mpn)],
- coeff=[-1, 1, 1],
- )
- )
-
- # CCSD
- pv0.extend(
- _solve_in_turn(args=["CCSD TOTAL ENERGY", "HF TOTAL ENERGY", "CCSD CORRELATION ENERGY"], coeff=[-1, 1, 1])
- )
- pv0.extend(
- _solve_in_turn(
- args=["CCSD DOUBLES ENERGY", "CCSD SAME-SPIN CORRELATION ENERGY", "CCSD OPPOSITE-SPIN CORRELATION ENERGY"],
- coeff=[-1, 1, 1],
- )
- )
- pv0.extend(
- _solve_in_turn(args=["CCSD CORRELATION ENERGY", "CCSD DOUBLES ENERGY", "CCSD SINGLES ENERGY"], coeff=[-1, 1, 1])
- )
-
- # CCSD(T)
- pv0.extend(
- _solve_in_turn(
- args=["CCSD(T) CORRELATION ENERGY", "CCSD CORRELATION ENERGY", "(T) CORRECTION ENERGY"], coeff=[-1, 1, 1]
- )
- )
- pv0.extend(
- _solve_in_turn(args=["CCSD(T) TOTAL ENERGY", "HF TOTAL ENERGY", "CCSD(T) CORRELATION ENERGY"], coeff=[-1, 1, 1])
- )
- pv0.extend(
- _solve_in_turn(
- args=["CCSD(T) CORRELATION ENERGY", "CCSD CORRELATION ENERGY", "(T) CORRECTION ENERGY"], coeff=[-1, 1, 1]
- )
- ) # duplicate of first so that all minimal combinations covered
-
- # CCSD[T]
- pv0.extend(
- _solve_in_turn(args=["CCSD[T] TOTAL ENERGY", "HF TOTAL ENERGY", "CCSD[T] CORRELATION ENERGY"], coeff=[-1, 1, 1])
- )
- pv0.extend(
- _solve_in_turn(
- args=["CCSD[T] CORRELATION ENERGY", "CCSD CORRELATION ENERGY", "[T] CORRECTION ENERGY"], coeff=[-1, 1, 1]
- )
- )
-
- # FCI
- pv0.extend(_solve_in_turn(args=["FCI TOTAL ENERGY", "HF TOTAL ENERGY", "FCI CORRELATION ENERGY"], coeff=[-1, 1, 1]))
-
- # Generics
- pv0.extend(_solve_in_turn(args=["CC TOTAL ENERGY", "HF TOTAL ENERGY", "CC CORRELATION ENERGY"], coeff=[-1, 1, 1]))
- pv0.extend(_solve_in_turn(args=["CI TOTAL ENERGY", "HF TOTAL ENERGY", "CI CORRELATION ENERGY"], coeff=[-1, 1, 1]))
-
- # DFT
-
- # fctl
- # TODO want B97 here?
- for fctl in [
- "B3LYP",
- "B3LYP5",
- "WPBE",
- "PBE",
- "CAM-B3LYP",
- "B97",
- "WB97X",
- "SVWN",
- "PW91",
- "BLYP",
- "PW86PBE",
- "FT97",
- "BOP",
- "MPWPW",
- "SOGGA11",
- "BP86",
- "B86BPBE",
- "PW6B95",
- "PBE0",
- "SOGGA11-X",
- "MN15",
- ]:
- pv0.extend(
- _solve_in_turn(
- args=["{} TOTAL ENERGY".format(fctl), "{} FUNCTIONAL TOTAL ENERGY".format(fctl)], coeff=[-1, 1]
- )
- )
-
- # fctl + D
- for dash in ["-D2", "-D3", "-D3(BJ)", "-D3M", "-D3M(BJ)"]:
- for fctl in ["B3LYP", "B3LYP5", "PBE", "B97", "BLYP", "BP86", "PBE0", "WPBE"]:
- pv0.extend(
- _solve_in_turn(
- args=[
- "{}{} TOTAL ENERGY".format(fctl, dash),
- "{} FUNCTIONAL TOTAL ENERGY".format("B97-D" if fctl == "B97" else fctl),
- "{}{} DISPERSION CORRECTION ENERGY".format(fctl, dash),
- ],
- coeff=[-1, 1, 1],
- )
- )
-
- # fctl + DH
- for fctl in ["B2PLYP", "DSD-PBEP86", "PBE0-2", "B2GPPLYP", "PTPSS", "PWPB95", "DSD-BLYP", "PBE0-DH"]:
- pv0.extend(
- _solve_in_turn(
- args=[
- "{} TOTAL ENERGY".format(fctl),
- "{} FUNCTIONAL TOTAL ENERGY".format(fctl),
- "{} DOUBLE-HYBRID CORRECTION ENERGY".format(fctl),
- ],
- coeff=[-1, 1, 1],
- )
- )
-
- # fctl + D + DH
- # no qcvar for fctl + dh, which would be the more restrictive def
- for dash in ["-D2", "-D3", "-D3(BJ)", "-D3M", "-D3M(BJ)"]:
- for fctl in ["B2PLYP"]:
- pv0.extend(
- _solve_in_turn(
- args=[
- "{}{} TOTAL ENERGY".format(fctl, dash),
- "{} TOTAL ENERGY".format(fctl),
- "{}{} DISPERSION CORRECTION ENERGY".format(fctl, dash),
- ],
- coeff=[-1, 1, 1],
- )
- )
-
- # misc.
- pv0.extend(
- _solve_in_turn(
- args=[
- "DLDF+D09 TOTAL ENERGY",
- "DLDF+D09 FUNCTIONAL TOTAL ENERGY",
- "DLDF-DAS2009 DISPERSION CORRECTION ENERGY",
- ],
- coeff=[-1, 1, 1],
- )
- )
-
- pv0.extend(
- _solve_in_turn(
- args=["WB97X-D TOTAL ENERGY", "WB97X FUNCTIONAL TOTAL ENERGY", "WB97-CHG DISPERSION CORRECTION ENERGY"],
- coeff=[-1, 1, 1],
- )
- )
-
- # misc.
- pv0.extend(
- _solve_in_turn(
- args=["CURRENT ENERGY", "CURRENT REFERENCE ENERGY", "CURRENT CORRELATION ENERGY"], coeff=[-1, 1, 1]
- )
- )
-
- return pv0
-
-
-def build_out(rawvars: Dict[str, Any], verbose: int = 1) -> None:
- """Apply standard QC identities to QCVariables `rawvars` to build more (e.g., correlation from total and HF energies).
-
- Dictionary `qcvar_identities` has keys with names of QCVariables to be created and values with dictionary of two
- keys: `args`, the QCVariables that contribute to the key and `func`, a functional (or lambda) to combine them.
- This function builds that key QCVariables if all the contributors are available in `rawvars`. Updates internally
- so multiple passes not needed.
-
- Parameters
- ----------
- verbose : int, optional
- Controls print level. Per-var printing with >=2.
-
- Returns
- -------
- None
- But input dictionary `rawvars` is updated.
-
- """
- for action in qcvar_identities():
- pvar = action["form"]
- buildline = """building {} {}""".format(pvar, "." * (50 - len(pvar)))
-
- data_rich_args = []
-
- for pv in action["args"]:
- if isinstance(pv, str):
- if pv in rawvars:
- data_rich_args.append(rawvars[pv])
- else:
- if verbose >= 2:
- logger.debug("""{}EMPTY, missing {}""".format(buildline, pv))
- break
- else:
- data_rich_args.append(pv)
- else:
- result = action["func"](data_rich_args)
- # rawvars[pvar] = result
- # with data coming from file --> variable, looks more precise than it is. hack
- rawvars.__setitem__(pvar, result, 6)
- if verbose >= 1:
- logger.debug("""{}SUCCESS""".format(buildline))
-
- if pvar == "CURRENT CORRELATION ENERGY" and abs(float(rawvars[pvar])) < 1.0e-16:
- rawvars.pop(pvar)
-
-
-qcvars_to_atomicproperties = {
- # calcinfo
- "N BASIS FUNCTIONS": "calcinfo_nbasis",
- "N MOLECULAR ORBITALS": "calcinfo_nmo",
- "N ATOMS": "calcinfo_natom",
- "N ALPHA ELECTRONS": "calcinfo_nalpha",
- "N BETA ELECTRONS": "calcinfo_nbeta",
- "NUCLEAR REPULSION ENERGY": "nuclear_repulsion_energy",
- # pre keywords
- "ONE-ELECTRON ENERGY": "scf_one_electron_energy",
- "TWO-ELECTRON ENERGY": "scf_two_electron_energy",
- "CURRENT ENERGY": "return_energy",
- "CURRENT GRADIENT": "return_gradient",
- "CURRENT HESSIAN": "return_hessian",
- # HF keywords
- "HF DIPOLE": "scf_dipole_moment",
- "HF QUADRUPOLE": "scf_quadrupole_moment",
- "HF TOTAL ENERGY": "scf_total_energy",
- "HF ITERATIONS": "scf_iterations",
- "HF TOTAL GRADIENT": "scf_total_gradient",
- "HF TOTAL HESSIAN": "scf_total_hessian",
- # MP2 keywords
- "MP2 SAME-SPIN CORRELATION ENERGY": "mp2_same_spin_correlation_energy",
- "MP2 OPPOSITE-SPIN CORRELATION ENERGY": "mp2_opposite_spin_correlation_energy",
- "MP2 SINGLES ENERGY": "mp2_singles_energy",
- "MP2 DOUBLES ENERGY": "mp2_doubles_energy",
- "MP2 CORRELATION ENERGY": "mp2_correlation_energy",
- "MP2 TOTAL ENERGY": "mp2_total_energy",
- "MP2 DIPOLE": "mp2_dipole_moment",
- # CCSD keywords
- "CCSD SAME-SPIN CORRELATION ENERGY": "ccsd_same_spin_correlation_energy",
- "CCSD OPPOSITE-SPIN CORRELATION ENERGY": "ccsd_opposite_spin_correlation_energy",
- "CCSD SINGLES ENERGY": "ccsd_singles_energy",
- "CCSD DOUBLES ENERGY": "ccsd_doubles_energy",
- "CCSD CORRELATION ENERGY": "ccsd_correlation_energy",
- "CCSD TOTAL ENERGY": "ccsd_total_energy",
- "CCSD DIPOLE": "ccsd_dipole_moment",
- "CCSD ITERATIONS": "ccsd_iterations",
- # CCSD(T) keywords
- "CCSD(T) CORRELATION ENERGY": "ccsd_prt_pr_correlation_energy",
- "CCSD(T) TOTAL ENERGY": "ccsd_prt_pr_total_energy",
- "CCSD(T) DIPOLE": "ccsd_prt_pr_dipole_moment",
- # informal keywords
- # scf_vv10_energy
- "DFT XC ENERGY": "scf_xc_energy",
- "DFT DISPERSION ENERGY": "scf_dispersion_correction_energy",
- # multi-definition
- "SCF TOTAL ENERGY": "scf_total_energy",
-}
-
-
-def build_atomicproperties(qcvars: "PreservingDict") -> AtomicResultProperties:
- """For results extracted from QC output in QCDB terminology, translate to QCSchema terminology.
-
- Parameters
- ----------
- qcvars : PreservingDict
- Dictionary of calculation information in QCDB QCVariable terminology.
-
- Returns
- -------
- atprop : AtomicResultProperties
- Object of calculation information in QCSchema AtomicResultProperties terminology.
-
- """
- atprop = {}
- for pv, dpv in qcvars.items():
- if pv in qcvars_to_atomicproperties:
- atprop[qcvars_to_atomicproperties[pv]] = dpv
-
- return AtomicResultProperties(**atprop)
diff --git a/qcengine/programs/rdkit.py b/qcengine/programs/rdkit.py
deleted file mode 100644
index 1a01a0253..000000000
--- a/qcengine/programs/rdkit.py
+++ /dev/null
@@ -1,149 +0,0 @@
-"""
-Calls the RDKit package.
-"""
-
-from typing import TYPE_CHECKING, Dict
-
-from qcelemental.models import AtomicResult, Provenance
-from qcelemental.util import safe_version, which_import
-
-from ..exceptions import InputError
-from ..units import ureg
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-class RDKitHarness(ProgramHarness):
-
- _defaults = {
- "name": "RDKit",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
-
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def _process_molecule_rdkit(jmol):
- from rdkit import Chem
-
- # Handle errors
- if abs(jmol.molecular_charge) > 1.0e-6:
- raise InputError("RDKit does not currently support charged molecules.")
-
- if not jmol.connectivity: # Check for empty list
- raise InputError("RDKit requires molecules to have a connectivity graph.")
-
- # Build out the base molecule
- base_mol = Chem.Mol()
- rw_mol = Chem.RWMol(base_mol)
- for sym in jmol.symbols:
- rw_mol.AddAtom(Chem.Atom(sym.title()))
-
- # Add in connectivity
- bond_types = {1: Chem.BondType.SINGLE, 2: Chem.BondType.DOUBLE, 3: Chem.BondType.TRIPLE}
- for atom1, atom2, bo in jmol.connectivity:
- rw_mol.AddBond(atom1, atom2, bond_types[bo])
-
- mol = rw_mol.GetMol()
-
- # Write out the conformer
- natom = len(jmol.symbols)
- conf = Chem.Conformer(natom)
- bohr2ang = ureg.conversion_factor("bohr", "angstrom")
- for line in range(natom):
- conf.SetAtomPosition(
- line,
- (
- bohr2ang * jmol.geometry[line, 0],
- bohr2ang * jmol.geometry[line, 1],
- bohr2ang * jmol.geometry[line, 2],
- ),
- )
-
- mol.AddConformer(conf)
- Chem.rdmolops.SanitizeMol(mol)
-
- return mol
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which_import(
- "rdkit",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install rdkit -c conda-forge`.",
- )
-
- def get_version(self) -> str:
- """Return the currently used version of RDKit."""
- self.found(raise_error=True)
-
- which_prog = which_import("rdkit")
- if which_prog not in self.version_cache:
- import rdkit
-
- self.version_cache[which_prog] = safe_version(rdkit.__version__)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Runs RDKit in FF typing
- """
-
- self.found(raise_error=True)
- import rdkit
- from rdkit.Chem import AllChem
-
- # Failure flag
- ret_data = {"success": False}
-
- # Build the Molecule
- jmol = input_data.molecule
- mol = self._process_molecule_rdkit(jmol)
-
- if input_data.model.method.lower() == "uff":
- ff = AllChem.UFFGetMoleculeForceField(mol)
- all_params = AllChem.UFFHasAllMoleculeParams(mol)
- elif input_data.model.method.lower() in ["mmff94", "mmff94s"]:
- props = AllChem.MMFFGetMoleculeProperties(mol, mmffVariant=input_data.model.method)
- ff = AllChem.MMFFGetMoleculeForceField(mol, props)
- all_params = AllChem.MMFFHasAllMoleculeParams(mol)
- else:
- raise InputError("RDKit only supports the UFF, MMFF94, and MMFF94s methods currently.")
-
- if all_params is False:
- raise InputError("RDKit parameters not found for all atom types in molecule.")
-
- ff.Initialize()
-
- ret_data["properties"] = {"return_energy": ff.CalcEnergy() * ureg.conversion_factor("kJ / mol", "hartree")}
-
- if input_data.driver == "energy":
- ret_data["return_result"] = ret_data["properties"]["return_energy"]
- elif input_data.driver == "gradient":
- coef = ureg.conversion_factor("kJ / mol", "hartree") * ureg.conversion_factor("angstrom", "bohr")
- ret_data["return_result"] = [x * coef for x in ff.CalcGrad()]
- else:
- raise InputError(f"Driver {input_model.driver} not implemented for RDKit.")
-
- ret_data["provenance"] = Provenance(
- creator="rdkit", version=rdkit.__version__, routine="rdkit.Chem.AllChem.UFFGetMoleculeForceField"
- )
-
- ret_data["schema_name"] = "qcschema_output"
- ret_data["success"] = True
-
- # Form up a dict first, then sent to BaseModel to avoid repeat kwargs which don't override each other
- return AtomicResult(**{**input_data.dict(), **ret_data})
diff --git a/qcengine/programs/terachem.py b/qcengine/programs/terachem.py
deleted file mode 100644
index 98dfcaabe..000000000
--- a/qcengine/programs/terachem.py
+++ /dev/null
@@ -1,212 +0,0 @@
-"""
-Calls the TeraChem executable.
-"""
-
-import re
-from typing import Any, Dict, Optional
-
-from qcelemental.models import AtomicResult, FailedOperation
-from qcelemental.molparse.regex import DECIMAL, NUMBER
-from qcelemental.util import parse_version, safe_version, which
-
-from qcengine import util as uti
-
-from ..exceptions import UnknownError
-from ..util import popen
-from .model import ProgramHarness
-
-
-class TeraChemHarness(ProgramHarness):
-
- _defaults = {
- "name": "TeraChem",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": True,
- "node_parallel": False,
- "managed_memory": True,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "terachem",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via http://www.petachem.com/index.html",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which("terachem")
- if which_prog not in self.version_cache:
- with popen([which_prog, "--version"]) as exc:
- exc["proc"].wait(timeout=5)
- mobj = re.search(NUMBER, exc["stdout"], re.VERBOSE)
- version = mobj.group(0)
- self.version_cache[which_prog] = safe_version(version)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Run TeraChem
- """
- self.found(raise_error=True)
-
- # Check TeraChem version
- if parse_version(self.get_version()) < parse_version("1.5"):
- raise TypeError("TeraChem version '{}' not understood".format(self.get_version()))
-
- # Setup the job
- job_inputs = self.build_input(input_data, config)
- # Run terachem
- exe_outputs = self.execute(job_inputs, extra_outfiles=input_data.extras)
- exe_success, proc = exe_outputs
- # Determine whether the calculation succeeded
- output_data = {}
- if not exe_success:
- output_data["success"] = False
- output_data["error"] = {"error_type": "unknown_error", "error_message": proc["stderr"]}
- return FailedOperation(
- success=output_data.pop("success", False), error=output_data.pop("error"), input_data=output_data
- )
-
- # If execution succeeded, collect results
- result = self.parse_output(proc["outfiles"], input_data)
- return result
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
- # Write the geom xyz file with unit au
- xyz_file = input_model.molecule.to_string(dtype="terachem", units="Bohr")
-
- # Write input file
- input_file = []
- input_file.append("# molecule definition")
- input_file.append("units bohr")
- input_file.append("charge " + str(int(input_model.molecule.molecular_charge)))
- input_file.append("spinmult " + str(input_model.molecule.molecular_multiplicity))
- input_file.append("coordinates geometry.xyz")
-
- input_file.append("\n# model")
- input_file.append("basis " + str(input_model.model.basis))
- input_file.append("method " + str(input_model.model.method))
-
- input_file.append("\n# driver")
- input_file.append("run " + input_model.driver)
-
- input_file.append("\n# keywords")
- for k, v in input_model.keywords.items():
- input_file.append("{} {}".format(k, v))
-
- input_file = "\n".join(input_file)
-
- return {
- "commands": ["terachem", "tc.in"],
- "infiles": {"tc.in": input_file, "geometry.xyz": xyz_file},
- "scratch_directory": config.scratch_directory,
- "input_result": input_model.copy(deep=True),
- }
-
- def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") -> "AtomicResult":
- output_data = {}
- properties = {}
-
- # Parse the output file, collect properties and gradient
- output_lines = outfiles["tc.out"].split("\n")
- gradients = []
- natom = 0
- line_final_energy = -1
- line_scf_header = -1
- for idx, line in enumerate(output_lines):
- if "FINAL ENERGY" in line:
- properties["scf_total_energy"] = float(line.strip("\n").split()[2])
- line_final_energy = idx
- elif "Start SCF Iterations" in line:
- line_scf_header = idx
- elif "Total atoms" in line:
- natom = int(line.split()[-1])
- elif "DIPOLE MOMENT" in line:
- newline = line.replace(",", "").replace("}", "").replace("{", "")
- properties["scf_dipole_moment"] = [float(x) for x in newline.split()[2:5]]
- elif "Nuclear repulsion energy" in line:
- properties["nuclear_repulsion_energy"] = float(line.split()[-2])
- elif "Gradient units are Hartree/Bohr" in line:
- # Gradient is stored as (dE/dx1,dE/dy1,dE/dz1,dE/dx2,dE/dy2,...)
- for i in range(idx + 3, idx + 3 + natom):
- grad = output_lines[i].strip("\n").split()
- for x in grad:
- gradients.append(float(x))
-
- last_scf_line = ""
- for idx in reversed(range(line_scf_header, line_final_energy)):
- mobj = re.search(
- r"^\s*\d+\s+" + DECIMAL + r"\s+" + DECIMAL + r"\s+" + DECIMAL + r"\s+" + DECIMAL,
- output_lines[idx],
- re.VERBOSE,
- )
- if mobj:
- last_scf_line = output_lines[idx]
- break
-
- if len(last_scf_line) > 0:
- properties["scf_iterations"] = int(last_scf_line.split()[0])
- if "XC Energy" in output_lines:
- properties["scf_xc_energy"] = float(last_scf_line.split()[4])
- else:
- raise UnknownError("SCF iteration lines not found in TeraChem output")
-
- if len(gradients) > 0:
- output_data["return_result"] = gradients
-
- # Commented out the properties currently not supported by QCSchema
- # properites["spin_S2"] = 1 # calculated S(S+1)
- # elif "SPIN S-SQUARED" in line:
- # properties["spin_S2"] = float(line.strip('\n').split()[2])
- # Parse files in scratch folder
- # properties["atomic_charge"] = []
- # atomic_charge_lines = open(outfiles["charge.xls"]).readlines()
- # for line in atomic_charge_lines:
- # properties["atomic_charge"].append(line.strip('\n').split()[-1])
-
- if "return_result" not in output_data:
- if "scf_total_energy" in properties:
- output_data["return_result"] = properties["scf_total_energy"]
- else:
- raise KeyError("Could not find SCF total energy")
-
- output_data["properties"] = properties
-
- output_data["schema_name"] = "qcschema_output"
- output_data["stdout"] = outfiles["tc.out"]
- # TODO Should only return True if TeraChem calculation terminated properly
- output_data["success"] = True
-
- # return extra files requested by user as extras
- for extra in input_model.extras.keys():
- input_model.extras[extra] = outfiles[extra]
-
- return AtomicResult(**{**input_model.dict(), **output_data})
-
- def execute(self, inputs, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None):
- binaries = []
- for filename in extra_outfiles:
- if filename in ["scr/ca0", "scr/cb0", "scr/c0"]:
- binaries.append(filename)
- exe_success, proc = uti.execute(
- inputs["commands"],
- infiles=inputs["infiles"],
- outfiles=extra_outfiles,
- as_binary=binaries,
- scratch_directory=inputs["scratch_directory"],
- timeout=timeout,
- )
- proc["outfiles"]["tc.out"] = proc["stdout"]
- return exe_success, proc
diff --git a/qcengine/programs/terachem_frontend.py b/qcengine/programs/terachem_frontend.py
deleted file mode 100644
index 09b8503a3..000000000
--- a/qcengine/programs/terachem_frontend.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Harness for TeraChem Frontend"""
-import logging
-from os import getenv
-from typing import Any, Dict
-
-from .terachem_pbs import TeraChemPBSHarness, _pbs_defaults
-
-logger = logging.getLogger(__name__)
-
-_fe_defaults = {
- "name": "terachem_fe",
-}
-
-
-class TeraChemFrontEndHarness(TeraChemPBSHarness):
- """QCEngine Harness for interfacing with the TeraChem Frontend (Protocol Buffer Server + file server)"""
-
- _defaults = {**_pbs_defaults, **_fe_defaults}
- _tcpb_min_version = "0.9.0"
- _tcpb_client = "TCFrontEndClient"
- _env_vars: Dict[str, Any] = {
- **TeraChemPBSHarness._env_vars,
- **{
- "frontend_host": getenv("TERACHEM_FE_HOST", "127.0.0.1"),
- "frontend_port": int(getenv("TERACHEM_FE_PORT", 80)),
- "uploads_prefix": getenv("TERACHEM_FE_UPLOADS_PREFIX", "uploads"),
- },
- }
- _env_vars_external: str = (
- TeraChemPBSHarness._env_vars_external + " and/or TERACHEM_FE_HOST, TERACHEM_FE_PORT, TERACHEM_FE_UPLOADS_PREFIX"
- )
diff --git a/qcengine/programs/terachem_pbs.py b/qcengine/programs/terachem_pbs.py
deleted file mode 100644
index 4cee0a31e..000000000
--- a/qcengine/programs/terachem_pbs.py
+++ /dev/null
@@ -1,108 +0,0 @@
-"""
-Calls TeraChem in its "server mode" via a protobuf interface.
-"""
-import logging
-from importlib import import_module
-from os import getenv
-from typing import TYPE_CHECKING, Any, Dict, Union
-
-from qcelemental.models import AtomicResult, FailedOperation
-from qcelemental.util import which_import
-
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-logger = logging.getLogger(__name__)
-
-_pbs_defaults = {
- "name": "terachem_pbs",
- "scratch": False,
- "thread_safe": False,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": True,
-}
-
-
-class TeraChemPBSHarness(ProgramHarness):
- """QCEngine Harness for interfacing with the TeraChem running in Protocol Buffer Server Mode"""
-
- _defaults = _pbs_defaults
- _tcpb_package: str = "tcpb"
- _tcpb_min_version: str = "0.7.0"
- _tcpb_client: str = "TCProtobufClient"
- _env_vars: Dict[str, Any] = {
- "host": getenv("TERACHEM_PBS_HOST", "127.0.0.1"),
- "port": int(getenv("TERACHEM_PBS_PORT", 11111)),
- }
- _env_vars_external: str = "TERACHEM_PBS_HOST, TERACHEM_PBS_PORT"
-
- class Config(ProgramHarness.Config):
- pass
-
- @classmethod
- def found(cls, raise_error: bool = False) -> bool:
- """Whether TeraChemPBS harness is ready for operation.
- Parameters
- ----------
- raise_error: bool
- Passed on to control negative return between False and ModuleNotFoundError raised.
- Returns
- -------
- bool
- If tcpb package is found and server available, returns True.
- If raise_error is False and tcpb package missing and/or server us unavailable, returns False.
- If raise_error is True and tcpb package missing and/or server us unavailable, the error message is raised.
- """
- tcpb_pkg_available = which_import(
- cls._tcpb_package,
- return_bool=True,
- raise_error=raise_error,
- raise_msg=f"TeraChem protobuf client package (tcpb) not found. Please install tcpb>={cls._tcpb_min_version}.",
- )
- if not tcpb_pkg_available:
- return False
-
- tcpb = import_module(f"{cls._tcpb_package}")
-
- try:
- with getattr(tcpb, cls._tcpb_client)(**cls._env_vars) as client:
- return client.is_available()
- except tcpb.exceptions.ServerError as e:
- msg = (
- f"Unable to connect to TeraChem server at {cls._env_vars}. If you want to connect to a server elsewhere, consider "
- f"setting environment variables {cls._env_vars_external}."
- )
- logger.error(msg)
- if raise_error:
- raise OSError(msg) from e
- return False
-
- def get_version(self) -> str:
- """Returns version of TeraChem Protocol Buffer Server"""
- try:
- tcpb = import_module(self._tcpb_package)
- except ModuleNotFoundError:
- return None
- else:
- try:
- return tcpb.__version__
- except AttributeError:
- return None
-
- def compute(
- self, input_model: "AtomicInput", config: "TaskConfig" = None
- ) -> Union["AtomicResult", "FailedOperation"]:
- """
- Submit AtomicInput to TeraChem running in "server mode"
- """
- self.found(raise_error=True)
-
- tcpb = import_module(self._tcpb_package)
-
- with getattr(tcpb, self._tcpb_client)(**self._env_vars) as client:
- return client.compute(input_model)
diff --git a/qcengine/programs/tests/__init__.py b/qcengine/programs/tests/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/qcengine/programs/tests/standard_suite_contracts.py b/qcengine/programs/tests/standard_suite_contracts.py
deleted file mode 100644
index b12beced4..000000000
--- a/qcengine/programs/tests/standard_suite_contracts.py
+++ /dev/null
@@ -1,1833 +0,0 @@
-# This file consolidates the expectations of what properties/QCVariables
-# a method should produce and what in practice a QC program does produce.
-
-__all__ = [
- "contractual_current",
- "contractual_hf",
- "contractual_mp2",
- "contractual_mp2p5",
- "contractual_mp3",
- "contractual_mp4_prsdq_pr",
- "contractual_mp4",
- "contractual_zapt2",
- "contractual_cisd",
- "contractual_qcisd",
- "contractual_qcisd_prt_pr",
- "contractual_fci",
- "contractual_remp2",
- "contractual_lccd",
- "contractual_lccsd",
- "contractual_cepa_pr1_pr",
- "contractual_cepa_pr3_pr",
- "contractual_acpf",
- "contractual_aqcc",
- "contractual_ccd",
- "contractual_bccd",
- "contractual_cc2",
- "contractual_ccsd",
- "contractual_ccsdpt_prccsd_pr",
- "contractual_ccsd_prt_pr",
- "contractual_accsd_prt_pr",
- "contractual_bccd_prt_pr",
- "contractual_cc3",
- "contractual_ccsdt",
- "contractual_ccsdt1a",
- "contractual_ccsdt1b",
- "contractual_ccsdt2",
- "contractual_ccsdt3",
- "contractual_ccsdt_prq_pr",
- "contractual_ccsdtq",
- "contractual_omp2",
- "contractual_omp2p5",
- "contractual_omp3",
- "contractual_oremp2",
- "contractual_olccd",
- "contractual_occd",
- "contractual_occd_prt_pr",
- "contractual_aoccd_prt_pr",
- "contractual_dft_current",
- "contractual_dhdft_current",
- "query_qcvar",
- "query_has_qcvar",
-]
-
-
-from typing import Any, Tuple
-
-from qcengine.programs.qcvar_identities_resources import qcvars_to_atomicproperties
-
-
-def query_qcvar(obj: Any, pv: str) -> Any:
- """Uniform interface to value of variable `pv` or its QCSchema alias in QCVariable store `obj`."""
-
- try:
- # psi4.core (module -- P::e.globals)
- # psi4.Wavefunction
- # qcdb (module)
- vval = obj.variable(pv)
- except AttributeError:
- try:
- # qcdb jobrec["qcvars"] qcel.Datum
- vval = obj[pv].data
- except (AttributeError, KeyError):
- # qcel.AtomicResult.extras["qcvars"]
- vval = obj.get(pv)
- if vval is None:
- # qcel.AtomicResult.properties dict
- vval = obj.get(qcvars_to_atomicproperties[pv])
- except TypeError:
- # qcel.AtomicResult.properties object
- vval = getattr(obj, qcvars_to_atomicproperties[pv])
-
- return vval
-
-
-def query_has_qcvar(obj: Any, pv: str) -> bool:
- """Uniform interface to whether variable `pv` or its QCSchema alias in QCVariable store `obj`."""
-
- try:
- bval = obj.has_variable(pv)
- except AttributeError:
- bval = pv in obj
-
- if not bval:
- try:
- bval = qcvars_to_atomicproperties[pv] in obj
- except KeyError:
- bval = False
-
- return bval
-
-
-_contractual_docstring = """
- Parameters
- ----------
- qc_module
- The program or subprogram running the job (e.g., "cfour" or "cfour-ecc").
- driver
- {"energy", "gradient", "hessian"}
- The derivative level that should be expected.
- reference
- {"rhf", "uhf", "rohf"}
- The SCF reference since programs often output differently based on it.
- method
- The target AtomicInput.model.method since "free" methods may not always be
- output (e.g., MP2 available when target is MP2 but not when target is CCSD).
- corl_type
- {"conv", "df", "cd"}
- The algorithm for the target method since programs often output differently
- based on it.
- fcae
- {"ae", "fc"}
- The all-electron vs. frozen-orbital aspect.
-
- Returns
- -------
- (rpv, pv, expected)
- Of all the QCVariables `pv` that should be available, returns tuple of
- whether `expected` and what key `rpv` in the reference `pv` should match.
-
-"""
-
-
-def contractual_current(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Given the target method, returns the CURRENT QCVariables that should be produced.
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- ("HF TOTAL ENERGY", "SCF TOTAL ENERGY"),
- ("HF TOTAL ENERGY", "CURRENT REFERENCE ENERGY"),
- (f"{method.upper()} CORRELATION ENERGY", "CURRENT CORRELATION ENERGY"),
- (f"{method.upper()} TOTAL ENERGY", "CURRENT ENERGY"),
- ]
- if driver == "gradient":
- contractual_qcvars.append((f"{method.upper()} TOTAL GRADIENT", "CURRENT GRADIENT"))
- elif driver == "hessian":
- # contractual_qcvars.append((f"{method.upper()} TOTAL GRADIENT", "CURRENT GRADIENT"))
- contractual_qcvars.append((f"{method.upper()} TOTAL HESSIAN", "CURRENT HESSIAN"))
-
- for rpv, pv in contractual_qcvars:
- expected = True
- if method == "hf" and rpv == f"{method.upper()} CORRELATION ENERGY":
- expected = False
-
- yield (rpv, pv, expected)
-
-
-def contractual_hf(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal HF should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
-
- contractual_qcvars = [
- ("HF TOTAL ENERGY", "HF TOTAL ENERGY"),
- ("HF TOTAL ENERGY", "SCF TOTAL ENERGY"),
- ]
- if driver == "gradient" and method == "hf":
- contractual_qcvars.append(("HF TOTAL GRADIENT", "HF TOTAL GRADIENT"))
- # contractual_qcvars.append(("HF TOTAL GRADIENT", "SCF TOTAL GRADIENT"))
- elif driver == "hessian" and method == "hf":
- # contractual_qcvars.append(("HF TOTAL GRADIENT", "HF TOTAL GRADIENT"))
- contractual_qcvars.append(("HF TOTAL HESSIAN", "HF TOTAL HESSIAN"))
- # contractual_qcvars.append(("HF TOTAL GRADIENT", "SCF TOTAL GRADIENT"))
-
- for rpv, pv in contractual_qcvars:
- yield (rpv, pv, True)
-
-
-def contractual_mp2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal MP2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "MP2 CORRELATION ENERGY",
- "MP2 TOTAL ENERGY",
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- "MP2 DOUBLES ENERGY",
- "MP2 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "mp2":
- contractual_qcvars.append("MP2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "mp2":
- # contractual_qcvars.append("MP2 TOTAL GRADIENT")
- contractual_qcvars.append("MP2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (
- (qc_module == "cfour" and reference == "rohf" and method == "mp2" and driver == "hessian")
- or (
- qc_module in ["gamess-serial", "gamess-ddi"]
- and reference in ["uhf", "rohf"]
- and method == "mp2"
- )
- or (
- qc_module in ["gamess-serial", "gamess-ims"]
- and reference == "rhf"
- and method == "mp2"
- and driver in ["gradient", "hessian"]
- )
- or (
- qc_module == "gamess"
- and reference in ["rhf"]
- and method in ["lccd", "ccd", "ccsd", "ccsd+t(ccsd)", "ccsd(t)"]
- )
- or (qc_module == "nwchem-tce" and method in ["mp2", "mp3", "mp4"])
- or (
- qc_module == "nwchem-cc"
- and reference in ["rhf"]
- and method in ["ccsd", "ccsd+t(ccsd)", "ccsd(t)"]
- )
- or (qc_module == "nwchem-directmp2" and reference == "rhf" and method == "mp2")
- or (
- qc_module == "psi4-occ"
- and reference == "rhf"
- and corl_type in ["df", "cd"]
- and method
- in [
- "mp2",
- "mp2.5",
- "mp3",
- "remp2",
- "lccd",
- "ccd",
- "ccsd",
- "ccsd(t)",
- "a-ccsd(t)",
- "omp2",
- "omp2.5",
- "omp3",
- "oremp2",
- "olccd",
- "occd",
- "occd(t)",
- "a-occd(t)",
- ]
- )
- or (
- qc_module == "psi4-mrcc"
- and reference in ["rhf", "uhf"]
- and method
- in ["ccsd", "ccsd(t)", "a-ccsd(t)", "cc3", "ccsdt-1a", "ccsdt-1b", "ccsdt-3", "ccsdt"]
- )
- )
- and pv in ["MP2 SAME-SPIN CORRELATION ENERGY", "MP2 OPPOSITE-SPIN CORRELATION ENERGY"]
- )
- or (
- (
- (qc_module == "psi4-detci" and method in ["mp2", "mp3", "mp4"])
- or (
- qc_module == "qchem" and method == "mp2"
- ) # for structured -- can probably get these from parsing
- )
- and pv
- in [
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 OPPOSITE-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- "MP2 DOUBLES ENERGY",
- ]
- )
- or (
- (
- (
- qc_module == "psi4-occ"
- and reference == "rohf"
- and corl_type == "conv"
- and method in ["omp2", "omp2.5", "omp3", "oremp2", "olccd"]
- )
- )
- and pv
- in [
- "MP2 CORRELATION ENERGY",
- "MP2 TOTAL ENERGY",
- "MP2 SINGLES ENERGY",
- ]
- )
- or (
- (
- (qc_module == "psi4-ccenergy" and reference == "rohf" and method == "ccsd" and sdsc == "sd")
- # next two are an evasion as possibly collectable
- or (qc_module == "cfour-vcc" and reference in ["rhf", "uhf"] and method == "bccd")
- or (qc_module == "cfour-vcc" and reference in ["rhf"] and method == "bccd(t)")
- or (
- qc_module == "nwchem-tce"
- and method
- in ["qcisd", "lccd", "lccsd", "ccd", "cc2", "ccsd", "ccsd+t(ccsd)", "ccsd(t)", "ccsdt"]
- )
- or (qc_module == "gamess" and reference == "rohf" and method == "ccsd")
- or (
- qc_module.startswith("cfour")
- and reference == "rohf"
- and method in ["lccsd", "ccd", "ccsd", "ccsd(t)", "ccsdt"]
- and sdsc == "sd"
- ) # this is a cop out as c4 perfectly able to produce good rohf mp2 but not with same orbitals as ref definition on ccsd
- or (
- qc_module == "psi4-mrcc"
- and reference in ["rohf"]
- and method in ["ccsd", "ccsd(t)", "a-ccsd(t)", "ccsdt"]
- )
- )
- and pv
- in [
- "MP2 CORRELATION ENERGY",
- "MP2 TOTAL ENERGY",
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 OPPOSITE-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- "MP2 DOUBLES ENERGY",
- ]
- )
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-# # TODO check CUSTOM SCS-MP2 _absent_
-
-
-def contractual_mp2p5(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal MP2.5 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "MP2.5 CORRELATION ENERGY",
- "MP2.5 TOTAL ENERGY",
- "MP2.5 SAME-SPIN CORRELATION ENERGY",
- "MP2.5 SINGLES ENERGY",
- "MP2.5 DOUBLES ENERGY",
- "MP2.5 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "mp2.5":
- contractual_qcvars.append("MP2.5 TOTAL GRADIENT")
- elif driver == "hessian" and method == "mp2.5":
- # contractual_qcvars.append("MP2.5 TOTAL GRADIENT")
- contractual_qcvars.append("MP2.5 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (qc_module.startswith("cfour") and method in ["mp3", "mp4(sdq)", "mp4"])
- or (
- qc_module == "psi4-occ"
- and reference == "rhf"
- and corl_type in ["df", "cd"]
- and method in ["mp2.5", "mp3", "omp2.5"]
- )
- or (qc_module.startswith("nwchem") and method in ["mp3", "mp4"])
- )
- and pv in ["MP2.5 SAME-SPIN CORRELATION ENERGY", "MP2.5 OPPOSITE-SPIN CORRELATION ENERGY"]
- ) or (
- (
- (qc_module == "psi4-detci" and method in ["mp3", "mp4"])
- or (
- qc_module == "psi4-occ"
- and reference == "rohf"
- and corl_type in ["conv", "df", "cd"]
- and method in ["omp2.5", "omp3"]
- )
- )
- # Note SS/OS might be obtainable but no reference to verify
- and pv
- in [
- "MP2.5 CORRELATION ENERGY",
- "MP2.5 TOTAL ENERGY",
- "MP2.5 SAME-SPIN CORRELATION ENERGY",
- "MP2.5 OPPOSITE-SPIN CORRELATION ENERGY",
- "MP2.5 SINGLES ENERGY",
- "MP2.5 DOUBLES ENERGY",
- ]
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_mp3(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal MP3 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "MP3 CORRELATION ENERGY",
- "MP3 TOTAL ENERGY",
- "MP3 SAME-SPIN CORRELATION ENERGY",
- "MP3 SINGLES ENERGY",
- "MP3 DOUBLES ENERGY",
- "MP3 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "mp3":
- contractual_qcvars.append("MP3 TOTAL GRADIENT")
- elif driver == "hessian" and method == "mp3":
- # contractual_qcvars.append("MP3 TOTAL GRADIENT")
- contractual_qcvars.append("MP3 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (
- (qc_module.startswith("cfour") and method in ["mp3", "mp4(sdq)", "mp4"])
- or (
- qc_module == "psi4-occ"
- and reference == "rhf"
- and corl_type in ["df", "cd"]
- and method in ["mp2.5", "mp3", "omp2.5", "omp3"]
- )
- or (qc_module.startswith("nwchem") and method in ["mp3", "mp4"])
- )
- and pv in ["MP3 SAME-SPIN CORRELATION ENERGY", "MP3 OPPOSITE-SPIN CORRELATION ENERGY"]
- )
- or (
- ((qc_module == "psi4-detci" and method in ["mp3", "mp4"]))
- and pv
- in [
- "MP3 SAME-SPIN CORRELATION ENERGY",
- "MP3 OPPOSITE-SPIN CORRELATION ENERGY",
- "MP3 SINGLES ENERGY",
- "MP3 DOUBLES ENERGY",
- ]
- )
- or (
- (
- (
- qc_module == "psi4-occ"
- and reference == "rohf"
- and corl_type in ["conv", "df", "cd"]
- and method in ["omp2.5", "omp3"]
- )
- )
- # Note SS/OS might be obtainable but no reference to verify
- and pv
- in [
- "MP3 CORRELATION ENERGY",
- "MP3 TOTAL ENERGY",
- "MP3 SAME-SPIN CORRELATION ENERGY",
- "MP3 SINGLES ENERGY",
- "MP3 DOUBLES ENERGY",
- "MP3 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- )
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_mp4_prsdq_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal MP4(SDQ) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "MP4(SDQ) CORRELATION ENERGY",
- "MP4(SDQ) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "mp4(sdq)":
- contractual_qcvars.append("MP4(SDQ) TOTAL GRADIENT")
- elif driver == "hessian" and method == "mp4(sdq)":
- # contractual_qcvars.append("MP4(SDQ) TOTAL GRADIENT")
- contractual_qcvars.append("MP4(SDQ) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (qc_module.startswith("psi4-detci") and method == "mp4")
- or (qc_module.startswith("nwchem") and method == "mp4")
- ) and pv in ["MP4(SDQ) TOTAL ENERGY", "MP4(SDQ) CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_mp4(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal MP4 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "MP4(T) CORRECTION ENERGY",
- "MP4 CORRELATION ENERGY",
- "MP4 CORRECTION ENERGY",
- "MP4 TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "mp4":
- contractual_qcvars.append("MP4 TOTAL GRADIENT")
- elif driver == "hessian" and method == "mp4":
- # contractual_qcvars.append("MP4 TOTAL GRADIENT")
- contractual_qcvars.append("MP4 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (qc_module.startswith("psi4-detci") and method == "mp4")
- or (qc_module.startswith("nwchem") and method == "mp4")
- ) and pv in ["MP4(T) CORRECTION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_zapt2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal ZAPT2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "ZAPT2 CORRELATION ENERGY",
- "ZAPT2 TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "zapt2":
- contractual_qcvars.append("ZAPT2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "zapt2":
- # contractual_qcvars.append("ZAPT2 TOTAL GRADIENT")
- contractual_qcvars.append("ZAPT2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_cisd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CISD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CISD CORRELATION ENERGY",
- "CISD TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "cisd":
- contractual_qcvars.append("CISD TOTAL GRADIENT")
- elif driver == "hessian" and method == "cisd":
- # contractual_qcvars.append("CISD TOTAL GRADIENT")
- contractual_qcvars.append("CISD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_qcisd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal QCISD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "QCISD CORRELATION ENERGY",
- "QCISD TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "qcisd":
- contractual_qcvars.append("QCISD TOTAL GRADIENT")
- elif driver == "hessian" and method == "qcisd":
- # contractual_qcvars.append("QCISD TOTAL GRADIENT")
- contractual_qcvars.append("QCISD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_qcisd_prt_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal QCISD(T) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "QCISD(T) CORRECTION ENERGY",
- "QCISD(T) CORRELATION ENERGY",
- "QCISD(T) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "qcisd(t)":
- contractual_qcvars.append("QCISD(T) TOTAL GRADIENT")
- elif driver == "hessian" and method == "qcisd(t)":
- # contractual_qcvars.append("QCISD(T) TOTAL GRADIENT")
- contractual_qcvars.append("QCISD(T) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_fci(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal FCI should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "FCI CORRELATION ENERGY",
- "FCI TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "fci":
- contractual_qcvars.append("FCI TOTAL GRADIENT")
- elif driver == "hessian" and method == "fci":
- # contractual_qcvars.append("FCI TOTAL GRADIENT")
- contractual_qcvars.append("FCI TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_remp2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal REMP2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "REMP2 CORRELATION ENERGY",
- "REMP2 TOTAL ENERGY",
- "REMP2 SAME-SPIN CORRELATION ENERGY",
- "REMP2 SINGLES ENERGY",
- "REMP2 DOUBLES ENERGY",
- "REMP2 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "remp2":
- contractual_qcvars.append("REMP2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "remp2":
- # contractual_qcvars.append("REMP2 TOTAL GRADIENT")
- contractual_qcvars.append("REMP2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- ((qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "remp2"))
- and pv in ["REMP2 SAME-SPIN CORRELATION ENERGY", "REMP2 OPPOSITE-SPIN CORRELATION ENERGY"]
- ) or (
- (
- qc_module == "psi4-occ"
- and reference in ["rhf", "uhf", "rohf"]
- and corl_type in ["conv", "df", "cd"]
- and method == "oremp2"
- )
- and pv
- in [
- "REMP2 CORRELATION ENERGY",
- "REMP2 TOTAL ENERGY",
- "REMP2 SAME-SPIN CORRELATION ENERGY",
- "REMP2 SINGLES ENERGY",
- "REMP2 DOUBLES ENERGY",
- "REMP2 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_lccd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal LCCD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "LCCD CORRELATION ENERGY",
- "LCCD TOTAL ENERGY",
- "LCCD SAME-SPIN CORRELATION ENERGY",
- "LCCD SINGLES ENERGY",
- "LCCD DOUBLES ENERGY",
- "LCCD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "lccd":
- contractual_qcvars.append("LCCD TOTAL GRADIENT")
- elif driver == "hessian" and method == "lccd":
- # contractual_qcvars.append("LCCD TOTAL GRADIENT")
- contractual_qcvars.append("LCCD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (
- (qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "lccd")
- or (qc_module == "cfour-ncc" and reference in ["rhf"] and method == "lccd")
- or (qc_module == "nwchem-tce" and reference in ["rhf", "uhf"] and method == "lccd")
- or (qc_module == "gamess" and reference in ["rhf"] and method == "lccd")
- )
- and pv in ["LCCD SAME-SPIN CORRELATION ENERGY", "LCCD OPPOSITE-SPIN CORRELATION ENERGY"]
- )
- or (
- (qc_module == "nwchem-tce" and reference in ["rohf"] and method in ["lccd"])
- and pv
- in [
- "LCCD SAME-SPIN CORRELATION ENERGY",
- "LCCD OPPOSITE-SPIN CORRELATION ENERGY",
- "LCCD SINGLES ENERGY",
- "LCCD DOUBLES ENERGY",
- ]
- )
- or (
- (
- qc_module == "psi4-occ"
- and reference in ["rhf", "uhf", "rohf"]
- and corl_type in ["conv", "df", "cd"]
- and method == "olccd"
- )
- and pv
- in [
- "LCCD CORRELATION ENERGY",
- "LCCD TOTAL ENERGY",
- "LCCD SAME-SPIN CORRELATION ENERGY",
- "LCCD SINGLES ENERGY",
- "LCCD DOUBLES ENERGY",
- "LCCD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- )
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_lccsd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal LCCSD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "LCCSD CORRELATION ENERGY",
- "LCCSD TOTAL ENERGY",
- "LCCSD SAME-SPIN CORRELATION ENERGY",
- "LCCSD SINGLES ENERGY",
- "LCCSD DOUBLES ENERGY",
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "lccsd":
- contractual_qcvars.append("LCCSD TOTAL GRADIENT")
- elif driver == "hessian" and method == "lccsd":
- # contractual_qcvars.append("LCCSD TOTAL GRADIENT")
- contractual_qcvars.append("LCCSD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (
- (qc_module == "cfour-ncc" and reference in ["rhf"] and method == "lccsd")
- or (qc_module == "nwchem-tce" and reference in ["rhf", "uhf"] and method == "lccsd")
- )
- and pv in ["LCCSD SAME-SPIN CORRELATION ENERGY", "LCCSD OPPOSITE-SPIN CORRELATION ENERGY"]
- )
- or (
- (qc_module == "cfour-vcc" and reference in ["rohf"] and method in ["lccsd"])
- and pv
- in [
- "LCCSD SAME-SPIN CORRELATION ENERGY",
- "LCCSD SINGLES ENERGY",
- "LCCSD DOUBLES ENERGY",
- ]
- )
- or (
- (qc_module == "nwchem-tce" and reference in ["rohf"] and method in ["lccsd"])
- and pv
- in [
- "LCCSD SAME-SPIN CORRELATION ENERGY",
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY",
- "LCCSD SINGLES ENERGY",
- "LCCSD DOUBLES ENERGY",
- ]
- )
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_cepa_pr1_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CEPA(1) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CEPA(1) CORRELATION ENERGY",
- "CEPA(1) TOTAL ENERGY",
- "CEPA(1) SAME-SPIN CORRELATION ENERGY",
- "CEPA(1) SINGLES ENERGY",
- "CEPA(1) DOUBLES ENERGY",
- "CEPA(1) OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "cepa(1)":
- contractual_qcvars.append("CEPA(1) TOTAL GRADIENT")
- elif driver == "hessian" and method == "cepa(1)":
- # contractual_qcvars.append("CEPA(1) TOTAL GRADIENT")
- contractual_qcvars.append("CEPA(1) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (False) and pv in ["CEPA(1) SAME-SPIN CORRELATION ENERGY", "CEPA(1) OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_cepa_pr3_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CEPA(3) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CEPA(3) CORRELATION ENERGY",
- "CEPA(3) TOTAL ENERGY",
- "CEPA(3) SAME-SPIN CORRELATION ENERGY",
- "CEPA(3) SINGLES ENERGY",
- "CEPA(3) DOUBLES ENERGY",
- "CEPA(3) OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "cepa(3)":
- contractual_qcvars.append("CEPA(3) TOTAL GRADIENT")
- elif driver == "hessian" and method == "cepa(3)":
- # contractual_qcvars.append("CEPA(3) TOTAL GRADIENT")
- contractual_qcvars.append("CEPA(3) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (False) and pv in ["CEPA(3) SAME-SPIN CORRELATION ENERGY", "CEPA(3) OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_acpf(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal ACPF should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "ACPF CORRELATION ENERGY",
- "ACPF TOTAL ENERGY",
- "ACPF SAME-SPIN CORRELATION ENERGY",
- "ACPF SINGLES ENERGY",
- "ACPF DOUBLES ENERGY",
- "ACPF OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "acpf":
- contractual_qcvars.append("ACPF TOTAL GRADIENT")
- elif driver == "hessian" and method == "acpf":
- # contractual_qcvars.append("ACPF TOTAL GRADIENT")
- contractual_qcvars.append("ACPF TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (False) and pv in ["ACPF SAME-SPIN CORRELATION ENERGY", "ACPF OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_aqcc(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal AQCC should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "AQCC CORRELATION ENERGY",
- "AQCC TOTAL ENERGY",
- "AQCC SAME-SPIN CORRELATION ENERGY",
- "AQCC SINGLES ENERGY",
- "AQCC DOUBLES ENERGY",
- "AQCC OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "aqcc":
- contractual_qcvars.append("AQCC TOTAL GRADIENT")
- elif driver == "hessian" and method == "aqcc":
- # contractual_qcvars.append("AQCC TOTAL GRADIENT")
- contractual_qcvars.append("AQCC TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (False) and pv in ["AQCC SAME-SPIN CORRELATION ENERGY", "AQCC OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_ccd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CCD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCD CORRELATION ENERGY",
- "CCD TOTAL ENERGY",
- "CCD SAME-SPIN CORRELATION ENERGY",
- "CCD SINGLES ENERGY",
- "CCD DOUBLES ENERGY",
- "CCD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "ccd":
- contractual_qcvars.append("CCD TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccd":
- # contractual_qcvars.append("CCD TOTAL GRADIENT")
- contractual_qcvars.append("CCD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (qc_module == "cfour-ecc" and reference in ["rhf"] and method == "ccd")
- or (qc_module == "cfour-ncc" and reference in ["rhf"] and method == "ccd")
- or (qc_module == "nwchem-tce" and reference in ["rhf", "uhf"] and method == "ccd")
- or (qc_module == "gamess" and reference in ["rhf"] and method == "ccd")
- or (qc_module == "psi4-occ" and reference in ["rhf", "uhf"] and method == "ccd")
- )
- and pv in ["CCD SAME-SPIN CORRELATION ENERGY", "CCD OPPOSITE-SPIN CORRELATION ENERGY"]
- ) or (
- (
- (qc_module == "cfour-vcc" and reference in ["rohf"] and method in ["ccd"])
- or (qc_module == "nwchem-tce" and reference in ["rohf"] and method in ["ccd"])
- )
- and pv
- in [
- "CCD SAME-SPIN CORRELATION ENERGY",
- "CCD SINGLES ENERGY",
- "CCD DOUBLES ENERGY",
- "CCD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- ):
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_bccd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal BCCD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "BCCD CORRELATION ENERGY",
- "BCCD TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "bccd":
- contractual_qcvars.append("BCCD TOTAL GRADIENT")
- elif driver == "hessian" and method == "bccd":
- # contractual_qcvars.append("BCCD TOTAL GRADIENT")
- contractual_qcvars.append("BCCD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if False:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_cc2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CC2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CC2 CORRELATION ENERGY",
- "CC2 TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "cc2":
- contractual_qcvars.append("CC2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "cc2":
- # contractual_qcvars.append("CC2 TOTAL GRADIENT")
- contractual_qcvars.append("CC2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CCSD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSD CORRELATION ENERGY",
- "CCSD TOTAL ENERGY",
- "CCSD SAME-SPIN CORRELATION ENERGY",
- "CCSD SINGLES ENERGY",
- "CCSD DOUBLES ENERGY",
- "CCSD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "ccsd":
- contractual_qcvars.append("CCSD TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsd":
- # contractual_qcvars.append("CCSD TOTAL GRADIENT")
- contractual_qcvars.append("CCSD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- (
- (qc_module == "gamess" and reference == "rhf" and method in ["ccsd", "ccsd+t(ccsd)", "ccsd(t)"])
- or (
- qc_module == "nwchem-tce"
- and reference in ["rhf", "uhf"]
- and method in ["ccsd", "ccsd+t(ccsd)", "ccsd(t)"]
- )
- or (
- qc_module in ["cfour-ncc", "cfour-ecc"]
- and reference in ["rhf"]
- and method in ["ccsd", "ccsd+t(ccsd)", "ccsd(t)", "a-ccsd(t)"]
- )
- or (
- qc_module == "psi4-occ"
- and reference in ["rhf", "uhf"]
- and corl_type in ["df", "cd"]
- and method in ["ccsd", "ccsd(t)", "a-ccsd(t)"]
- )
- or (qc_module in ["cfour-vcc"] and reference in ["rhf", "uhf"] and method in ["ccsd+t(ccsd)"])
- or (
- qc_module == "psi4-mrcc"
- and reference in ["rhf", "uhf"]
- and method in ["ccsd", "ccsd(t)", "a-ccsd(t)"]
- )
- )
- and pv in ["CCSD SAME-SPIN CORRELATION ENERGY", "CCSD OPPOSITE-SPIN CORRELATION ENERGY"]
- )
- or (
- (qc_module == "cfour-vcc" and reference in ["rohf"] and method in ["ccsd", "ccsd(t)"])
- and pv
- in [
- "CCSD SAME-SPIN CORRELATION ENERGY",
- "CCSD SINGLES ENERGY",
- "CCSD DOUBLES ENERGY",
- ]
- )
- or (
- (qc_module == "cfour-ecc" and reference in ["rohf"] and method in ["ccsd", "ccsd(t)"])
- and pv
- in [
- "CCSD OPPOSITE-SPIN CORRELATION ENERGY",
- "CCSD SINGLES ENERGY",
- "CCSD DOUBLES ENERGY",
- ]
- )
- or (
- (
- (qc_module == "gamess" and reference in ["rohf"] and method == "ccsd")
- or (qc_module == "nwchem-tce" and reference in ["rohf"] and method in ["ccsd", "ccsd(t)"])
- or (
- qc_module == "psi4-mrcc"
- and reference in ["rohf"]
- and method in ["ccsd", "ccsd(t)", "a-ccsd(t)"]
- )
- )
- and pv
- in [
- "CCSD SAME-SPIN CORRELATION ENERGY",
- "CCSD OPPOSITE-SPIN CORRELATION ENERGY",
- "CCSD SINGLES ENERGY",
- "CCSD DOUBLES ENERGY",
- ]
- )
- or (
- ((qc_module == "cfour-vcc" and method in ["bccd", "bccd(t)"]))
- and pv
- in [
- "CCSD CORRELATION ENERGY",
- "CCSD TOTAL ENERGY",
- "CCSD SAME-SPIN CORRELATION ENERGY",
- "CCSD OPPOSITE-SPIN CORRELATION ENERGY",
- "CCSD SINGLES ENERGY",
- "CCSD DOUBLES ENERGY",
- ]
- )
- ):
- expected = False
-
- yield (pv, pv, expected)
-
- # TODO check CUSTOM SCS-CCSD _absent_
-
-
-def contractual_ccsdpt_prccsd_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CCSD+T(CCSD) (aka CCSD[T]) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "T(CCSD) CORRECTION ENERGY",
- "CCSD+T(CCSD) CORRELATION ENERGY",
- "CCSD+T(CCSD) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsd+t(ccsd)":
- contractual_qcvars.append("CCSD+T(CCSD) TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsd+t(ccsd)":
- # contractual_qcvars.append("CCSD+T(CCSD) TOTAL GRADIENT")
- contractual_qcvars.append("CCSD+T(CCSD) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if False:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsd_prt_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CCSD(T) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "(T) CORRECTION ENERGY",
- "CCSD(T) CORRELATION ENERGY",
- "CCSD(T) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsd(t)":
- contractual_qcvars.append("CCSD(T) TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsd(t)":
- # contractual_qcvars.append("CCSD(T) TOTAL GRADIENT")
- contractual_qcvars.append("CCSD(T) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- # print("WW", qc_module, driver, reference, method, corl_type, fcae, pv)
- expected = True
- if (
- (qc_module == "psi4-ccenergy" and method == "bccd(t)") or (qc_module == "cfour-vcc" and method == "bccd(t)")
- ) and pv in [
- "(T) CORRECTION ENERGY",
- "CCSD(T) CORRELATION ENERGY",
- "CCSD(T) TOTAL ENERGY",
- ]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_accsd_prt_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal A-CCSD(T) (aka Lambda-CCSD(T), aka CCSD(aT) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "A-(T) CORRECTION ENERGY",
- "A-CCSD(T) CORRELATION ENERGY",
- "A-CCSD(T) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "a-ccsd(t)":
- contractual_qcvars.append("A-CCSD(T) TOTAL GRADIENT")
- elif driver == "hessian" and method == "a-ccsd(t)":
- # contractual_qcvars.append("A-CCSD(T) TOTAL GRADIENT")
- contractual_qcvars.append("A-CCSD(T) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if False:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_bccd_prt_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal BCCD(T) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "B(T) CORRECTION ENERGY",
- "BCCD(T) CORRELATION ENERGY",
- "BCCD(T) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "bccd(t)":
- contractual_qcvars.append("BCCD(T) TOTAL GRADIENT")
- elif driver == "hessian" and method == "bccd(t)":
- # contractual_qcvars.append("BCCD(T) TOTAL GRADIENT")
- contractual_qcvars.append("BCCD(T) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if False:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_cc3(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CC3 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CC3 CORRELATION ENERGY",
- "CC3 TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "cc3":
- contractual_qcvars.append("CC3 TOTAL GRADIENT")
- elif driver == "hessian" and method == "cc3":
- # contractual_qcvars.append("CC3 TOTAL GRADIENT")
- contractual_qcvars.append("CC3 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdt(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CCSDT should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSDT CORRELATION ENERGY",
- "CCSDT TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdt":
- contractual_qcvars.append("CCSDT TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdt":
- # contractual_qcvars.append("CCSDT TOTAL GRADIENT")
- contractual_qcvars.append("CCSDT TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdt1a(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CCSDT-1A should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSDT-1A CORRELATION ENERGY",
- "CCSDT-1A TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdt-1a":
- contractual_qcvars.append("CCSDT-1A TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdt-1a":
- # contractual_qcvars.append("CCSDT-1A TOTAL GRADIENT")
- contractual_qcvars.append("CCSDT-1A TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdt1b(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CCSDT-1B should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSDT-1B CORRELATION ENERGY",
- "CCSDT-1B TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdt-1b":
- contractual_qcvars.append("CCSDT-1B TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdt-1b":
- # contractual_qcvars.append("CCSDT-1B TOTAL GRADIENT")
- contractual_qcvars.append("CCSDT-1B TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdt2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CCSDT-2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSDT-2 CORRELATION ENERGY",
- "CCSDT-2 TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdt-2":
- contractual_qcvars.append("CCSDT-2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdt-2":
- # contractual_qcvars.append("CCSDT-2 TOTAL GRADIENT")
- contractual_qcvars.append("CCSDT-2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdt3(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- f"""Of the list of QCVariables an ideal CCSDT-3 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSDT-3 CORRELATION ENERGY",
- "CCSDT-3 TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdt-3":
- contractual_qcvars.append("CCSDT-3 TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdt-3":
- # contractual_qcvars.append("CCSDT-3 TOTAL GRADIENT")
- contractual_qcvars.append("CCSDT-3 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdt_prq_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CCSDT(Q) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "(Q) CORRECTION ENERGY",
- "CCSDT(Q) CORRELATION ENERGY",
- "CCSDT(Q) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdt(q)":
- contractual_qcvars.append("CCSDT(Q) TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdt(q)":
- # contractual_qcvars.append("CCSDT(Q) TOTAL GRADIENT")
- contractual_qcvars.append("CCSDT(Q) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_ccsdtq(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal CCSDTQ should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "CCSDTQ CORRELATION ENERGY",
- "CCSDTQ TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "ccsdtq":
- contractual_qcvars.append("CCSDTQ TOTAL GRADIENT")
- elif driver == "hessian" and method == "ccsdtq":
- # contractual_qcvars.append("CCSDTQ TOTAL GRADIENT")
- contractual_qcvars.append("CCSDTQ TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
-
- yield (pv, pv, expected)
-
-
-def contractual_omp2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OMP2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "OMP2 CORRELATION ENERGY",
- "OMP2 TOTAL ENERGY",
- "OMP2 REFERENCE CORRECTION ENERGY",
- "OMP2 SAME-SPIN CORRELATION ENERGY",
- "OMP2 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "omp2":
- contractual_qcvars.append("OMP2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "omp2":
- # contractual_qcvars.append("OMP2 TOTAL GRADIENT")
- contractual_qcvars.append("OMP2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "omp2")
- ) and pv in ["OMP2 SAME-SPIN CORRELATION ENERGY", "OMP2 OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_omp2p5(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OMP2.5 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "OMP2.5 CORRELATION ENERGY",
- "OMP2.5 TOTAL ENERGY",
- "OMP2.5 REFERENCE CORRECTION ENERGY",
- "OMP2.5 SAME-SPIN CORRELATION ENERGY",
- "OMP2.5 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "omp2.5":
- contractual_qcvars.append("OMP2.5 TOTAL GRADIENT")
- elif driver == "hessian" and method == "omp2.5":
- # contractual_qcvars.append("OMP2.5 TOTAL GRADIENT")
- contractual_qcvars.append("OMP2.5 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "omp2.5")
- ) and pv in ["OMP2.5 SAME-SPIN CORRELATION ENERGY", "OMP2.5 OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_omp3(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OMP3 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "OMP3 CORRELATION ENERGY",
- "OMP3 TOTAL ENERGY",
- "OMP3 REFERENCE CORRECTION ENERGY",
- "OMP3 SAME-SPIN CORRELATION ENERGY",
- "OMP3 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "omp3":
- contractual_qcvars.append("OMP3 TOTAL GRADIENT")
- elif driver == "hessian" and method == "omp3":
- # contractual_qcvars.append("OMP3 TOTAL GRADIENT")
- contractual_qcvars.append("OMP3 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "omp3")
- ) and pv in ["OMP3 SAME-SPIN CORRELATION ENERGY", "OMP3 OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_oremp2(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OREMP2 should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "OREMP2 CORRELATION ENERGY",
- "OREMP2 TOTAL ENERGY",
- "OREMP2 REFERENCE CORRECTION ENERGY",
- "OREMP2 SAME-SPIN CORRELATION ENERGY",
- "OREMP2 OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "oremp2":
- contractual_qcvars.append("OREMP2 TOTAL GRADIENT")
- elif driver == "hessian" and method == "oremp2":
- # contractual_qcvars.append("OREMP2 TOTAL GRADIENT")
- contractual_qcvars.append("OREMP2 TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- # usual for oo (qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "oremp2")
- (
- qc_module == "psi4-occ"
- and reference in ["rhf", "uhf", "rohf"]
- and corl_type in ["df", "cd"]
- and method == "oremp2"
- )
- ) and pv in ["OREMP2 SAME-SPIN CORRELATION ENERGY", "OREMP2 OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_olccd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OLCCD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "OLCCD CORRELATION ENERGY",
- "OLCCD TOTAL ENERGY",
- "OLCCD REFERENCE CORRECTION ENERGY",
- "OLCCD SAME-SPIN CORRELATION ENERGY",
- "OLCCD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "olccd":
- contractual_qcvars.append("OLCCD TOTAL GRADIENT")
- elif driver == "hessian" and method == "olccd":
- # contractual_qcvars.append("OLCCD TOTAL GRADIENT")
- contractual_qcvars.append("OLCCD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (qc_module == "psi4-occ" and reference == "rhf" and corl_type in ["df", "cd"] and method == "olccd")
- ) and pv in ["OLCCD SAME-SPIN CORRELATION ENERGY", "OLCCD OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_occd(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OCCD should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "OCCD CORRELATION ENERGY",
- "OCCD TOTAL ENERGY",
- "OCCD REFERENCE CORRECTION ENERGY",
- "OCCD SAME-SPIN CORRELATION ENERGY",
- "OCCD OPPOSITE-SPIN CORRELATION ENERGY",
- ]
- if driver == "gradient" and method == "occd":
- contractual_qcvars.append("OCCD TOTAL GRADIENT")
- elif driver == "hessian" and method == "occd":
- # contractual_qcvars.append("OCCD TOTAL GRADIENT")
- contractual_qcvars.append("OCCD TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if (
- (
- qc_module == "psi4-occ"
- and reference in ["rhf", "uhf", "rohf"]
- and corl_type in ["df", "cd"]
- and method in ["occd", "occd(t)", "a-occd(t)"]
- )
- ) and pv in ["OCCD SAME-SPIN CORRELATION ENERGY", "OCCD OPPOSITE-SPIN CORRELATION ENERGY"]:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_occd_prt_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal OCCD(T) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "O(T) CORRECTION ENERGY",
- "OCCD(T) CORRELATION ENERGY",
- "OCCD(T) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "occd(t)":
- contractual_qcvars.append("OCCD(T) TOTAL GRADIENT")
- elif driver == "hessian" and method == "occd(t)":
- # contractual_qcvars.append("OCCD(T) TOTAL GRADIENT")
- contractual_qcvars.append("OCCD(T) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if False:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_aoccd_prt_pr(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Of the list of QCVariables an ideal A-OCCD(T) (aka Lambda-OCCD(T), aka OCCD(aT) should produce, returns whether or
- not each is expected, given the calculation circumstances (like QC program).
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- "HF TOTAL ENERGY",
- "A-O(T) CORRECTION ENERGY",
- "A-OCCD(T) CORRELATION ENERGY",
- "A-OCCD(T) TOTAL ENERGY",
- ]
- if driver == "gradient" and method == "a-occd(t)":
- contractual_qcvars.append("A-OCCD(T) TOTAL GRADIENT")
- elif driver == "hessian" and method == "a-occd(t)":
- # contractual_qcvars.append("A-OCCD(T) TOTAL GRADIENT")
- contractual_qcvars.append("A-OCCD(T) TOTAL HESSIAN")
-
- for pv in contractual_qcvars:
- expected = True
- if False:
- expected = False
-
- yield (pv, pv, expected)
-
-
-def contractual_dft_current(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Given the target DFT method, returns the CURRENT QCVariables that should be produced.
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- (f"{method.upper()} TOTAL ENERGY", "DFT TOTAL ENERGY"),
- (f"{method.upper()} TOTAL ENERGY", "CURRENT REFERENCE ENERGY"),
- (f"{method.upper()} TOTAL ENERGY", "CURRENT ENERGY"),
- # assert missing
- ("HF TOTAL ENERGY", "HF TOTAL ENERGY"),
- ]
- if driver == "gradient":
- contractual_qcvars.append((f"{method.upper()} TOTAL GRADIENT", "CURRENT GRADIENT"))
- elif driver == "hessian":
- # contractual_qcvars.append((f"{method.upper()} TOTAL GRADIENT", "CURRENT GRADIENT"))
- contractual_qcvars.append((f"{method.upper()} TOTAL HESSIAN", "CURRENT HESSIAN"))
-
- for rpv, pv in contractual_qcvars:
- expected = True
- if True and rpv in [ # assert canonical wfn quantities missing in DFT
- "HF TOTAL ENERGY",
- ]:
- expected = False
-
- yield (rpv, pv, expected)
-
-
-def contractual_dhdft_current(
- qc_module: str, driver: str, reference: str, method: str, corl_type: str, fcae: str, sdsc: str
-) -> Tuple[str, str, bool]:
- """Given the target DFT method, returns the CURRENT QCVariables that should be produced.
-
- {_contractual_docstring}
- """
- contractual_qcvars = [
- (f"{method.upper()} TOTAL ENERGY", "DFT TOTAL ENERGY"),
- (f"{method.upper()} FUNCTIONAL TOTAL ENERGY", "CURRENT REFERENCE ENERGY"),
- (f"{method.upper()} TOTAL ENERGY", "CURRENT ENERGY"),
- # assert missing
- ("HF TOTAL ENERGY", "HF TOTAL ENERGY"),
- ("MP2 CORRELATION ENERGY", "MP2 CORRELATION ENERGY"),
- ("MP2 TOTAL ENERGY", "MP2 TOTAL ENERGY"),
- ("MP2 SAME-SPIN CORRELATION ENERGY", "MP2 SAME-SPIN CORRELATION ENERGY"),
- ("MP2 SINGLES ENERGY", "MP2 SINGLES ENERGY"),
- ("MP2 DOUBLES ENERGY", "MP2 DOUBLES ENERGY"),
- ("MP2 OPPOSITE-SPIN CORRELATION ENERGY", "MP2 OPPOSITE-SPIN CORRELATION ENERGY"),
- ]
- if driver == "gradient":
- contractual_qcvars.append((f"{method.upper()} TOTAL GRADIENT", "CURRENT GRADIENT"))
- elif driver == "hessian":
- # contractual_qcvars.append((f"{method.upper()} TOTAL GRADIENT", "CURRENT GRADIENT"))
- contractual_qcvars.append((f"{method.upper()} TOTAL HESSIAN", "CURRENT HESSIAN"))
-
- for rpv, pv in contractual_qcvars:
- expected = True
- if True and rpv in [ # assert canonical wfn quantities missing in DFT
- "HF TOTAL ENERGY",
- "MP2 CORRELATION ENERGY",
- "MP2 TOTAL ENERGY",
- "MP2 SAME-SPIN CORRELATION ENERGY",
- "MP2 SINGLES ENERGY",
- "MP2 DOUBLES ENERGY",
- "MP2 OPPOSITE-SPIN CORRELATION ENERGY",
- ]:
- expected = False
-
- yield (rpv, pv, expected)
diff --git a/qcengine/programs/tests/standard_suite_ref.py b/qcengine/programs/tests/standard_suite_ref.py
deleted file mode 100644
index cc0337fd7..000000000
--- a/qcengine/programs/tests/standard_suite_ref.py
+++ /dev/null
@@ -1,17114 +0,0 @@
-import numpy as np
-
-# This file contains reference geometries, energies, and gradients
-# for comparing QC program results. It is placed in QCEngine but is also
-# used directly by QCDB and Psi4. New or filled-out systems+modelchems
-# welcome, but it's good to start a discussion on GitHub to check that
-# its downstream roles not impinged.
-
-std_refs = ["rhf", "uhf", "rohf"]
-
-std_molecules = {
- "hf": """
- H
- F 1 0.917
- """,
- # "bh3p": """
- # 1 2
- # B 0.10369114 0.00000000 0.00000000
- # H -1.13269886 0.00000000 0.00000000
- # H 3.00000000 0.37149000 0.00000000
- # H 3.00000000 -0.37149000 0.00000000
- # """,
- "bh3p": """
- 1 2
- B 0.00000000 0.00000000 0.10369114
- H 0.00000000 0.00000000 -1.13269886
- H 0.00000000 -0.37149000 3.00000000
- H 0.00000000 0.37149000 3.00000000
- """,
- "h2o": """
- O
- H 1 R
- H 1 R 2 A
-
- R=0.958
- A=104.5
- """,
- "nh2": """
- 0 2
- N
- H 1 R
- H 1 R 2 A
-
- R=1.008
- A=105.0
- """,
- "h2o-xyz": """
- # R=0.958 A=104.5
- O 0.000000000000 0.000000000000 -0.124038860300
- H 0.000000000000 -1.431430901356 0.984293362719
- H 0.000000000000 1.431430901356 0.984293362719
- units au
- """,
- "nh2-xyz": """
- # R=1.008 #A=105.0
- 0 2
- N 0.000000000000000 0.000000000000000 -0.145912918634892
- H 0.000000000000000 -1.511214298139000 1.013682596946108
- H 0.000000000000000 1.511214298139000 1.013682596946108
- units au
- """,
- "hf-xyz": """
- H 0. 0. -1.64558411
- F 0. 0. 0.08729475
- units bohr
- """,
-}
-std_molecules["bh3p-xyz"] = std_molecules["bh3p"]
-
-_std_generics = {
- "hf_cc-pvdz_ae": (19, 19, 5, 5),
- "hf_cc-pvdz_fc": (19, 19, 5, 5),
- "bh3p_cc-pvdz_ae": (29, 29, 4, 3),
- "bh3p_cc-pvdz_fc": (29, 29, 4, 3),
- "h2o_aug-cc-pvdz_ae": (41, 41, 5, 5),
- "h2o_aug-cc-pvdz_fc": (41, 41, 5, 5),
- "nh2_aug-cc-pvdz_ae": (41, 41, 5, 4),
- "nh2_aug-cc-pvdz_fc": (41, 41, 5, 4),
- "h2o_cfour-qz2p_ae": (48, 48, 5, 5),
- "h2o_cfour-qz2p_fc": (48, 48, 5, 5),
- "nh2_cfour-qz2p_ae": (48, 48, 5, 4),
- "nh2_cfour-qz2p_fc": (48, 48, 5, 4),
-}
-_std_generics = {
- k: dict(zip(["N BASIS FUNCTIONS", "N MOLECULAR ORBITALS", "N ALPHA ELECTRONS", "N BETA ELECTRONS"], v))
- for k, v in _std_generics.items()
-}
-
-_scf_hf_dz_pk_rhf = -100.01941126902270
-_scf_bh3p_dz_pk_uhf = -25.94513842869638
-_scf_bh3p_dz_pk_rohf = -25.943614318546
-
-_scf_hf_dz_df_rhf = -100.019400605629
-_scf_bh3p_dz_df_uhf = -25.945130559147
-_scf_bh3p_dz_df_rohf = -25.943606522029
-
-_scf_hf_dz_cd_rhf = -100.01939270219628
-_scf_bh3p_dz_cd_uhf = -25.94511891510799
-_scf_bh3p_dz_cd_rohf = -25.943595251664313
-
-
-_scf_h2o_qz2p_pk_rhf = -76.0627484601
-_scf_nh2_qz2p_pk_uhf = -55.5893469688
-_scf_nh2_qz2p_pk_rohf = -55.5847372601
-
-_scf_h2o_qz2p_df_rhf = -76.06274142753659
-_scf_nh2_qz2p_df_uhf = -55.58934323208402
-_scf_nh2_qz2p_df_rohf = -55.58473319013903
-
-_scf_h2o_qz2p_cd_rhf = -76.06277445978574
-_scf_nh2_qz2p_cd_uhf = -55.58934916135869
-_scf_nh2_qz2p_cd_rohf = -55.58473942870229
-
-
-_scf_h2o_adz_pk_rhf = -76.0413815332
-_scf_nh2_adz_pk_uhf = -55.57513805247548
-_scf_nh2_adz_pk_rohf = -55.570724348574
-
-_scf_h2o_adz_df_rhf = -76.04136132628614
-_scf_nh2_adz_df_uhf = -55.57512538464817
-_scf_nh2_adz_df_rohf = -55.57071142443952
-
-_scf_h2o_adz_cd_rhf = -76.04132169763341
-_scf_nh2_adz_cd_uhf = -55.57506886675886
-_scf_nh2_adz_cd_rohf = -55.57065536578708
-
-
-# fmt: off
-_grad_scf_hf_dz_pk_rhf = np.array([0.0, 0.0, -0.019789748774, -0.0, -0.0, 0.019789748774]).reshape((-1, 3))
-_grad_scf_bh3p_dz_pk_uhf = np.array([ 0.0, 0.0, 0.018283596898, 0.0, 0.0, -0.016914487538, -0.0, 0.004869782481, -0.00068455468, 0.0, -0.004869782481, -0.00068455468,]).reshape((-1, 3))
-_grad_scf_bh3p_dz_pk_rohf = np.array([ 0.0, 0.0, 0.022062218595, 0.0, 0.0, -0.02050835054, -0.0, 0.004706239974, -0.000776934027, 0.0, -0.004706239974, -0.000776934027,]).reshape((-1, 3))
-
-_grad_scf_hf_dz_df_rhf = np.array([0.0, -0.0, -0.0197887676, -0.0, 0.0, 0.0197887676]).reshape((-1, 3))
-_grad_scf_bh3p_dz_df_uhf = np.array([-0.0, 0.0, 0.018279955719, 0.0, 0.0, -0.016906923007, -0.0, 0.004865311963, -0.000686516356, 0.0, -0.004865311963, -0.000686516356,]).reshape((-1, 3))
-_grad_scf_bh3p_dz_df_rohf = np.array([-0.0, 0.0, 0.022058469913, 0.0, 0.0, -0.020500364247, -0.0, 0.004701465609, -0.000779052833, 0.0, -0.004701465609, -0.000779052833,]).reshape((-1, 3))
-
-_grad_scf_hf_dz_cd_rhf = np.array([0.0, 0.0, -0.019796742926, 0.0, 0.0, 0.019796742926]).reshape((-1, 3))
-_grad_scf_bh3p_dz_cd_uhf = np.array([ 0.0, 0.0, 0.018280917408, 0.0, 0.0, -0.016907239597, 0.0, 0.004874331571, -0.000686838905, 0.0, -0.004874331571, -0.000686838905,]).reshape((-1, 3))
-_grad_scf_bh3p_dz_cd_rohf = np.array([ 0.0, 0.0, 0.022058379283, 0.0, 0.0, -0.020499895346, 0.0, 0.004710759277, -0.000779241969, 0.0, -0.004710759277, -0.000779241969,]).reshape((-1, 3))
-
-
-_grad_scf_h2o_qz2p_pk_rhf = np.array([-0.0, 0.0, -0.026426043127, 0.0, -0.013943334328, 0.013213021564, -0.0, 0.013943334328, 0.013213021564]).reshape((-1, 3))
-_grad_scf_nh2_qz2p_pk_uhf = np.array([0.0, 0.0, 0.001550839727, -0.0, 0.000092404341, -0.000775419863, 0.0, -0.000092404341, -0.000775419863]).reshape((-1, 3))
-_grad_scf_nh2_qz2p_pk_rohf = np.array([-0.0, 0.0, 0.000683766715, 0.0, -0.000526016129, -0.000341883358, -0.0, 0.000526016129, -0.000341883358]).reshape((-1, 3))
-
-_grad_scf_h2o_qz2p_df_rhf = np.array([0.0, 0.0, -0.026454963718, 0.0, -0.013950706431, 0.013227481859, -0.0, 0.013950706431, 0.013227481859]).reshape((-1, 3))
-_grad_scf_nh2_qz2p_df_uhf = np.array([-0.0, 0.0, 0.001532526876, -0.0, 0.000082065307, -0.000766263438, 0.0, -0.000082065307, -0.000766263438]).reshape((-1, 3))
-_grad_scf_nh2_qz2p_df_rohf = np.array([0.0, 0.0, 0.000665139571, 0.0, -0.000536617267, -0.000332569786, -0.0, 0.000536617267, -0.000332569786]).reshape((-1, 3))
-
-_grad_scf_h2o_qz2p_cd_rhf = np.array([0.0, 0.0, -0.026440883169, 0.0, -0.013949099753, 0.013220441584, 0.0, 0.013949099753, 0.013220441584]).reshape((-1, 3))
-_grad_scf_nh2_qz2p_cd_uhf = np.array([0.0, 0.0, 0.001549105775, 0.0, 0.000091952809, -0.000774552887, 0.0, -0.000091952809, -0.000774552887]).reshape((-1, 3))
-_grad_scf_nh2_qz2p_cd_rohf = np.array([0.0, 0.0, 0.000681888827, 0.0, -0.000526508263, -0.000340944414, 0.0, 0.000526508263, -0.000340944414]).reshape((-1, 3))
-
-
-_grad_scf_h2o_adz_pk_rhf = np.array([-0.0, 0.0, -0.021391822417, 0.0, -0.011259127342, 0.010695911208, -0.0, 0.011259127342, 0.010695911208]).reshape((-1, 3))
-_grad_scf_nh2_adz_pk_uhf = np.array([-0.0, 0.0, 0.008498123792, -0.0, 0.004518040488, -0.004249061896, 0.0, -0.004518040488, -0.004249061896]).reshape((-1, 3))
-_grad_scf_nh2_adz_pk_rohf = np.array([-0.0, 0.0, 0.007678819724, -0.0, 0.003856927713, -0.003839409862, 0.0, -0.003856927713, -0.003839409862]).reshape((-1, 3))
-
-_grad_scf_h2o_adz_df_rhf = np.array([0.0, 0.0, -0.021402714298, 0.0, -0.011255158091, 0.010701357149, -0.0, 0.011255158091, 0.010701357149]).reshape((-1, 3))
-_grad_scf_nh2_adz_df_uhf = np.array([0.0, 0.0, 0.00848503512, -0.0, 0.004519001873, -0.00424251756, 0.0, -0.004519001873, -0.00424251756]).reshape((-1, 3))
-_grad_scf_nh2_adz_df_rohf = np.array([0.0, 0.0, 0.007664957774, -0.0, 0.003857593701, -0.003832478887, 0.0, -0.003857593701, -0.003832478887]).reshape((-1, 3))
-
-_grad_scf_h2o_adz_cd_rhf = np.array([0.0, 0.0, -0.021374103228, 0.0, -0.011265854947, 0.010687051614, 0.0, 0.011265854947, 0.010687051614]).reshape((-1, 3))
-_grad_scf_nh2_adz_cd_uhf = np.array([0.0, 0.0, 0.00848026807, 0.0, 0.004537635752, -0.004240134035, 0.0, -0.004537635752, -0.004240134035]).reshape((-1, 3))
-_grad_scf_nh2_adz_cd_rohf = np.array([0.0, 0.0, 0.007661397585, 0.0, 0.003876803846, -0.003830698792, 0.0, -0.003876803846, -0.003830698792]).reshape((-1, 3))
-# fmt: on
-
-
-# fmt: off
-_hess_scf_hf_dz_pk_rhf = np.array([
- 0.011420157, 0., 0., -0.011420157, 0., 0.,
- 0., 0.011420157, 0., 0., -0.011420157, 0.,
- 0., 0., 0.6371334086, 0., 0., -0.6371334086,
- -0.011420157, 0., 0., 0.011420157, 0., 0.,
- 0., -0.011420157, 0., 0., 0.011420157, 0.,
- 0., 0., -0.6371334086, 0., 0., 0.6371334086]).reshape((6, 6))
-_hess_scf_bh3p_dz_pk_uhf = np.array([
- 0.0051661616, 0., 0., -0.0059617366, 0., 0., 0.0003977875, 0., 0., 0.0003977875, 0., 0.,
- 0., 0.005028448, 0., 0., -0.0057802433, 0., 0., 0.0003758976, 0.0004726863, 0., 0.0003758976, -0.0004726863,
- 0., 0., 0.2162990046, 0., 0., -0.2130428571, 0., 0.0001869025, -0.0016280737, 0., -0.0001869025, -0.0016280737,
- -0.0059617366, 0., 0., 0.0063439881, 0., 0., -0.0001911257, 0., 0., -0.0001911257, 0., 0.,
- 0., -0.0057802433, 0., 0., 0.0062399336, 0., 0., -0.0002298451, 0.0001287182, 0., -0.0002298451, -0.0001287182,
- 0., 0., -0.2130428571, 0., 0., 0.213169144, 0., 0.000042202, -0.0000631434, 0., -0.000042202, -0.0000631434,
- 0.0003977875, 0., 0., -0.0001911257, 0., 0., -0.0035717661, 0., 0., 0.0033651042, 0., 0.,
- 0., 0.0003758976, 0.0001869025, 0., -0.0002298451, 0.000042202, 0., 0.4101678639, -0.0004152545, 0., -0.4103139164, 0.00018615,
- 0., 0.0004726863, -0.0016280737, 0., 0.0001287182, -0.0000631434, 0., -0.0004152545, -0.0000642125, 0., -0.00018615, 0.0017554296,
- 0.0003977875, 0., 0., -0.0001911257, 0., 0., 0.0033651042, 0., 0., -0.0035717661, 0., 0.,
- 0., 0.0003758976, -0.0001869025, 0., -0.0002298451, -0.000042202, 0., -0.4103139164, -0.00018615, 0., 0.4101678639, 0.0004152545,
- 0., -0.0004726863, -0.0016280737, 0., -0.0001287182, -0.0000631434, 0., 0.00018615, 0.0017554296, 0., 0.0004152545, -0.0000642125]).reshape((12, 12))
-_hess_scf_bh3p_dz_pk_rohf = np.array([
- 0.0065592076, 0., 0., -0.0074218605, 0., 0., 0.0004313264, 0., 0., 0.0004313264, 0., 0.,
- 0., 0.006418851, 0., 0., -0.0072356386, 0., 0., 0.0004083938, 0.0004886847, 0., 0.0004083938, -0.0004886847,
- 0., 0., 0.2263725717, 0., 0., -0.2227777355, 0., -0.0000454089, -0.0017974181, 0., 0.0000454089, -0.0017974181,
- -0.0074218605, 0., 0., 0.0078274642, 0., 0., -0.0002028018, 0., 0., -0.0002028018, 0., 0.,
- 0., -0.0072356386, 0., 0., 0.007720208, 0., 0., -0.0002422847, 0.0001293422, 0., -0.0002422847, -0.0001293422,
- 0., 0., -0.2227777355, 0., 0., 0.2229077847, 0., -0.0000149119, -0.0000650246, 0., 0.0000149119, -0.0000650246,
- 0.0004313264, 0., 0., -0.0002028018, 0., 0., -0.003466217, 0., 0., 0.0032376924, 0., 0.,
- 0., 0.0004083938, -0.0000454089, 0., -0.0002422847, -0.0000149119, 0., 0.4104056572, -0.0002788531, 0., -0.4105717664, 0.0003391738,
- 0., 0.0004886847, -0.0017974181, 0., 0.0001293422, -0.0000650246, 0., -0.0002788531, 0.0002037173, 0., -0.0003391738, 0.0016587254,
- 0.0004313264, 0., 0., -0.0002028018, 0., 0., 0.0032376924, 0., 0., -0.003466217, 0., 0.,
- 0., 0.0004083938, 0.0000454089, 0., -0.0002422847, 0.0000149119, 0., -0.4105717664, -0.0003391738, 0., 0.4104056572, 0.0002788531,
- 0., -0.0004886847, -0.0017974181, 0., -0.0001293422, -0.0000650246, 0., 0.0003391738, 0.0016587254, 0., 0.0002788531, 0.0002037173]).reshape((12, 12))
-
-_hess_scf_hf_dz_df_rhf = np.array([
- 0.011419589945, -0. , 0. , -0.011419589946, 0. , -0. ,
- -0. , 0.011419589946, -0. , 0. , -0.011419589946, 0. ,
- 0. , -0. , 0.637098996637, -0. , 0. , -0.637098996645,
- -0.011419589946, 0. , -0. , 0.011419589947, -0. , 0. ,
- 0. , -0.011419589946, 0. , -0. , 0.011419589946, -0. ,
- -0. , 0. , -0.637098996645, 0. , -0. , 0.63709899664 ]).reshape((6, 6))
-_hess_scf_bh3p_dz_df_uhf = np.array([
- 0.005157358561, 0. , -0. , -0.005955101752, -0. , 0. , 0.000398871596,
- -0. , -0. , 0.000398871596, 0. , 0. ,
- 0. , 0.005015888751, 0. , -0. , -0.005772282862, -0. , 0.,
- 0.000378197056, 0.000465416538, -0. , 0.000378197056, -0.000465416538,
- -0. , 0. , 0.216295663219, 0. , -0. , -0.213040064004, -0.,
- 0.000185641893, -0.001627799608, 0. , -0.000185641893, -0.001627799609,
- -0.005955101752, -0. , 0. , 0.006338370045, 0. , -0. , -0.000191634146,
- 0. , 0. , -0.000191634146, -0. , -0. ,
- -0. , -0.005772282862, -0. , 0. , 0.006233942057, 0. , -0.,
- -0.000230829597, 0.000131807767, 0. , -0.000230829598, -0.000131807767,
- 0. , -0. , -0.213040064004, -0. , 0. , 0.213165507196, 0.,
- 0.000042542535, -0.000062721596, -0. , -0.000042542535, -0.000062721596,
- 0.000398871596, 0. , -0. , -0.000191634146, -0. , 0. , -0.003568868648,
- 0. , 0. , 0.003361631199, -0. , -0. ,
- -0. , 0.000378197056, 0.000185641893, 0. , -0.000230829597, 0.000042542535, 0.,
- 0.410158196459, -0.000412704367, -0. , -0.410305563917, 0.000184519939,
- -0. , 0.000465416538, -0.001627799608, 0. , 0.000131807767, -0.000062721596, 0.,
- -0.000412704367, -0.000072529233, -0. , -0.000184519939, 0.001763050438,
- 0.000398871596, -0. , 0. , -0.000191634146, 0. , -0. , 0.003361631199,
- -0. , -0. , -0.003568868648, 0. , 0. ,
- 0. , 0.000378197056, -0.000185641893, -0. , -0.000230829598, -0.000042542535, -0.,
- -0.410305563917, -0.000184519939, 0. , 0.410158196459, 0.000412704367,
- 0. , -0.000465416538, -0.001627799609, -0. , -0.000131807767, -0.000062721596, -0.,
- 0.000184519939, 0.001763050438, 0. , 0.000412704367, -0.000072529233]).reshape((12, 12))
-_hess_scf_bh3p_dz_df_rohf = np.array([
- 0.006549722571, 0. , 0. , -0.007414731669, 0. , 0. , 0.000432504549,
- 0. , 0. , 0.000432504549, 0. , 0. ,
- 0. , 0.006404685466, 0. , 0. , -0.007227207838, 0. , 0.,
- 0.000411261186, 0.000481228539, 0. , 0.000411261186, -0.000481228539,
- 0. , 0. , 0.226368773958, 0. , 0. ,-0.222774139159, 0.,
- -0.000047153809, -0.001797317399, 0. , 0.000047153809, -0.001797317399,
- -0.007414731669, 0. , 0. , 0.007821444417, 0. , 0. , -0.000203356374,
- 0. , 0. , -0.000203356374, 0. , 0. ,
- 0. , -0.007227207838, 0. , 0. , 0.007714708106, 0. , 0.,
- -0.000243750134, 0.00013251408 , 0. , -0.000243750134, -0.00013251408 ,
- 0. , 0. , -0.222774139159, 0. , 0. , 0.222903015477, 0.,
- -0.000014309509, -0.000064438159, 0. , 0.000014309509, -0.000064438159,
- 0.000432504549, 0. , 0. , -0.000203356374, 0. , 0. , -0.00346312684,
- 0. , 0. , 0.003233978665, 0. , 0. ,
- 0. , 0.000411261186, -0.000047153809, 0. , -0.000243750134,-0.000014309509, 0.,
- 0.410395982746, -0.00027613965 , 0. , -0.410563493798, 0.000337602969,
- 0. , 0.000481228539, -0.001797317399, 0. , 0.00013251408 ,-0.000064438159, 0.,
- -0.00027613965 , 0.000195370438, 0. , -0.000337602969, 0.00166638512 ,
- 0.000432504549, 0. , 0. , -0.000203356374, 0. , 0. , 0.003233978665,
- 0. , 0. , -0.00346312684 , 0. , 0. ,
- 0. , 0.000411261186, 0.000047153809, 0. , -0.000243750134, 0.000014309509, 0.,
- -0.410563493798, -0.000337602969, 0. , 0.410395982746, 0.00027613965 ,
- 0. , -0.000481228539, -0.001797317399, 0. , -0.00013251408 ,-0.000064438159, 0.,
- 0.000337602969, 0.00166638512 , 0. , 0.00027613965 , 0.000195370438]).reshape((12, 12))
-
-_hess_scf_hf_dz_cd_rhf = np.zeros(36).reshape((6, 6))
-_hess_scf_bh3p_dz_cd_uhf = np.zeros(144).reshape((12, 12))
-_hess_scf_bh3p_dz_cd_rohf = np.zeros(144).reshape((12, 12))
-
-
-_hess_scf_h2o_qz2p_pk_rhf = np.array([
- 0.0238430708, 0., 0., -0.0119215354, 0., 0., -0.0119215354, 0., 0.,
- 0., 0.7093110919, 0., 0., -0.3546555459, 0.2653730246, 0., -0.3546555459, -0.2653730246,
- 0., 0., 0.4985784094, 0., 0.2027912096, -0.2492892047, 0., -0.2027912096, -0.2492892047,
- -0.0119215354, 0., 0., 0.0108311859, 0., 0., 0.0010903495, 0., 0.,
- 0., -0.3546555459, 0.2027912096, 0., 0.3886078743, -0.2340821171, 0., -0.0339523283, 0.0312909075,
- 0., 0.2653730246, -0.2492892047, 0., -0.2340821171, 0.2322518953, 0., -0.0312909075, 0.0170373094,
- -0.0119215354, 0., 0., 0.0010903495, 0., 0., 0.0108311859, 0., 0.,
- 0., -0.3546555459, -0.2027912096, 0., -0.0339523283, -0.0312909075, 0., 0.3886078743, 0.2340821171,
- 0., -0.2653730246, -0.2492892047, 0., 0.0312909075, 0.0170373094, 0., 0.2340821171, 0.2322518953]).reshape((9, 9))
-_hess_scf_nh2_qz2p_pk_uhf=np.array([
- -0.0013373967, 0., 0., 0.0006686983, 0., 0., 0.0006686983, 0., 0.,
- 0., 0.6034171677, 0., 0., -0.3017085838, 0.2320222491, 0., -0.3017085838, -0.2320222491,
- 0., 0., 0.4139303729, 0., 0.1753720372, -0.2069651864, 0., -0.1753720372, -0.2069651864,
- 0.0006686983, 0., 0., -0.000364922, 0., 0., -0.0003037763, 0., 0.,
- 0., -0.3017085838, 0.1753720372, 0., 0.3327449782, -0.2036971432, 0., -0.0310363944, 0.0283251059,
- 0., 0.2320222491, -0.2069651864, 0., -0.2036971432, 0.1924704871, 0., -0.0283251059, 0.0144946993,
- 0.0006686983, 0., 0., -0.0003037763, 0., 0., -0.000364922, 0., 0.,
- 0., -0.3017085838, -0.1753720372, 0., -0.0310363944, -0.0283251059, 0., 0.3327449782, 0.2036971432,
- 0., -0.2320222491, -0.2069651864, 0., 0.0283251059, 0.0144946993, 0., 0.2036971432, 0.1924704871]).reshape((9, 9))
-_hess_scf_nh2_qz2p_pk_rohf=np.array([
- -0.0005896607, 0., 0., 0.0002948303, 0., 0., 0.0002948303, 0., 0.,
- 0., 0.6051456253, 0., 0., -0.3025728127, 0.2323985163, 0., -0.3025728127, -0.2323985163,
- 0., 0., 0.4152409466, 0., 0.1756925779, -0.2076204733, 0., -0.1756925779, -0.2076204733,
- 0.0002948303, 0., 0., 0.0000266223, 0., 0., -0.0003214527, 0., 0.,
- 0., -0.3025728127, 0.1756925779, 0., 0.3336853184, -0.2040455471, 0., -0.0311125058, 0.0283529691,
- 0., 0.2323985163, -0.2076204733, 0., -0.2040455471, 0.1931471008, 0., -0.0283529691, 0.0144733724,
- 0.0002948303, 0., 0., -0.0003214527, 0., 0., 0.0000266223, 0., 0.,
- 0., -0.3025728127, -0.1756925779, 0., -0.0311125058, -0.0283529691, 0., 0.3336853184, 0.2040455471,
- 0., -0.2323985163, -0.2076204733, 0., 0.0283529691, 0.0144733724, 0., 0.2040455471, 0.1931471008]).reshape((9, 9))
-
-_hess_scf_h2o_qz2p_df_rhf = np.array([
- 0.023869160976, 0. , 0. , -0.011934580488, -0. , 0. , -0.011934580489,
- -0. , -0. ,
- 0. , 0.709278145474, -0.000000000002, -0. , -0.35463907274 , 0.265350165815, -0.,
- -0.354639072734, -0.265350165813,
- 0. , -0.000000000002, 0.498586860727, 0. , 0.202756793814, -0.249293430373, -0.,
- -0.202756793806, -0.249293430373,
- -0.011934580488, -0. , 0. , 0.010840285263, 0. , -0. , 0.001094295225,
- 0. , 0. ,
- -0. , -0.35463907274 , 0.202756793814, 0. , 0.388608483063, -0.23405347982 , -0.,
- -0.033969410325, 0.031296685995,
- 0. , 0.265350165815, -0.249293430373, -0. , -0.23405347982 , 0.232247735371, -0.,
- -0.031296685997, 0.01704569501 ,
- -0.011934580489, -0. , -0. , 0.001094295225, -0. , -0. , 0.010840285264,
- 0. , 0. ,
- -0. , -0.354639072734, -0.202756793806, 0. , -0.033969410325, -0.031296685997, 0.,
- 0.38860848306 , 0.234053479815,
- -0. , -0.265350165813, -0.249293430373, 0. , 0.031296685995, 0.01704569501 , 0.,
- 0.234053479815, 0.232247735369]).reshape((9, 9))
-_hess_scf_nh2_qz2p_df_uhf = np.array([
- -0.001321632112, 0. , 0. , 0.000660816056, 0. , -0. , 0.000660816056,
- -0. , -0. ,
- 0. , 0.603376756297,-0.000000000003, 0. , -0.301688378153, 0.232000689906, -0.,
- -0.301688378145, -0.232000689902,
- 0. , -0.000000000003, 0.413952361231, -0. , 0.17533315624 , -0.206976180617, -0.,
- -0.17533315624 , -0.206976180614,
- 0.000660816056, 0. ,-0. , -0.000357558133, -0. , 0. , -0.000303257923,
- 0. , 0. ,
- 0. , -0.301688378153, 0.17533315624 , -0. , 0.332733856055, -0.203666923072, -0.,
- -0.031045477904, 0.028333766831,
- -0. , 0.232000689906,-0.206976180617, 0. , -0.203666923072, 0.192471131065, 0.,
- -0.028333766832, 0.014505049551,
- 0.000660816056, -0. ,-0. , -0.000303257923, -0. , 0. , -0.000357558133,
- 0. , 0. ,
- -0. , -0.301688378145,-0.17533315624 , 0. , -0.031045477904, -0.028333766832, 0.,
- 0.33273385605 , 0.203666923073,
- -0. , -0.232000689902, -0.206976180614, 0. , 0.028333766831, 0.014505049551, 0.,
- 0.203666923073, 0.192471131063]).reshape((9, 9))
-_hess_scf_nh2_qz2p_df_rohf = np.array([
- -0.000573597702, 0. , 0. , 0.000286798851, 0. , 0. , 0.000286798851,
- 0. , 0. ,
- 0. , 0.605105430726, 0. , 0. , -0.302552715363, 0.232376931706, 0.,
- -0.302552715363, -0.232376931706,
- 0. , 0. , 0.415262555438, 0. , 0.175653363465, -0.207631277719, 0.,
- -0.175653363465, -0.207631277719,
- 0.000286798851, 0. , 0. , 0.00003414546 , 0. , 0. , -0.000320944311,
- 0. , 0. ,
- 0. , -0.302552715363, 0.175653363465, 0. , 0.333674638104, -0.204015147586, 0.,
- -0.03112192274 , 0.02836178412 ,
- 0. , 0.232376931706,-0.207631277719, 0. , -0.204015147586, 0.193147728967, 0.,
- -0.02836178412 , 0.014483548752,
- 0.000286798851, 0. , 0. , -0.000320944311, 0. , 0. , 0.00003414546,
- 0. , 0. ,
- 0. , -0.302552715363,-0.175653363465, 0. , -0.03112192274 , -0.02836178412 , 0.,
- 0.333674638104, 0.204015147586,
- 0. , -0.232376931706,-0.207631277719, 0. , 0.02836178412 , 0.014483548752, 0.,
- 0.204015147586, 0.193147728967]).reshape((9, 9))
-
-_hess_scf_h2o_qz2p_cd_rhf = np.zeros(81).reshape((9, 9))
-_hess_scf_nh2_qz2p_cd_uhf = np.zeros(81).reshape((9, 9))
-_hess_scf_nh2_qz2p_cd_rohf = np.zeros(81).reshape((9, 9))
-
-
-_hess_scf_h2o_adz_pk_rhf = np.array([
- 0.0193009116, 0., 0., -0.0096504557, 0., 0., -0.0096504557, 0., 0.,
- 0., 0.7259570062, 0., 0., -0.362978503, 0.2735758043, 0., -0.362978503, -0.2735758043,
- 0., 0., 0.507233142, 0., 0.2101340878, -0.253616571, 0., -0.2101340878, -0.253616571,
- -0.0096504557, 0., 0., 0.0087580503, 0., 0., 0.0008924054, 0., 0.,
- 0., -0.362978503, 0.2101340878, 0., 0.3955011984, -0.2418549461, 0., -0.0325226952, 0.0317208583,
- 0., 0.2735758043, -0.253616571, 0., -0.2418549461, 0.236653618, 0., -0.0317208583, 0.016962953,
- -0.0096504557, 0., 0., 0.0008924054, 0., 0., 0.0087580503, 0., 0.,
- 0., -0.362978503, -0.2101340878, 0., -0.0325226952, -0.0317208583, 0., 0.3955011984, 0.2418549461,
- 0., -0.2735758043, -0.253616571, 0., 0.0317208583, 0.016962953, 0., 0.2418549461, 0.236653618 ]).reshape((9, 9))
-_hess_scf_nh2_adz_pk_uhf = np.array([
- -0.0073285241, 0., 0., 0.0036642621, 0., 0., 0.0036642621, 0., 0.,
- 0., 0.6248676289, 0., 0., -0.3124338145, 0.2425505849, 0., -0.3124338145, -0.2425505849,
- 0., 0., 0.4213971779, 0., 0.185122888, -0.210698589, 0., -0.185122888, -0.210698589,
- 0.0036642621, 0., 0., -0.0033269688, 0., 0., -0.0003372933, 0., 0.,
- 0., -0.3124338145, 0.185122888, 0., 0.3427670403, -0.2138367365, 0., -0.0303332259, 0.0287138485,
- 0., 0.2425505849, -0.210698589, 0., -0.2138367365, 0.1969122616, 0., -0.0287138485, 0.0137863273,
- 0.0036642621, 0., 0., -0.0003372933, 0., 0., -0.0033269688, 0., 0.,
- 0., -0.3124338145, -0.185122888, 0., -0.0303332259, -0.0287138485, 0., 0.3427670403, 0.2138367365,
- 0., -0.2425505849, -0.210698589, 0., 0.0287138485, 0.0137863273, 0., 0.2138367365, 0.1969122616]).reshape((9, 9))
-_hess_scf_nh2_adz_pk_rohf = np.array([
- -0.006621982, 0., 0., 0.003310991, 0., 0., 0.003310991, 0., 0.,
- 0., 0.6266642672, 0., 0., -0.3133321336, 0.2429688151, 0., -0.3133321336, -0.2429688151,
- 0., 0., 0.4229135704, 0., 0.1853731231, -0.2114567853, 0., -0.1853731231, -0.2114567853,
- 0.003310991, 0., 0., -0.0029315977, 0., 0., -0.0003793933, 0., 0.,
- 0., -0.3133321336, 0.1853731231, 0., 0.3437839161, -0.2141709691, 0., -0.0304517825, 0.028797846,
- 0., 0.2429688151, -0.2114567853, 0., -0.2141709691, 0.1976705549, 0., -0.028797846, 0.0137862303,
- 0.003310991, 0., 0., -0.0003793933, 0., 0., -0.0029315977, 0., 0.,
- 0., -0.3133321336, -0.1853731231, 0., -0.0304517825, -0.028797846, 0., 0.3437839161, 0.2141709691,
- 0., -0.2429688151, -0.2114567853, 0., 0.028797846, 0.0137862303, 0., 0.2141709691, 0.1976705549]).reshape((9, 9))
-
-_hess_scf_h2o_adz_df_rhf = np.array([
- 0.019310737009, -0. , -0. , -0.009655368505, -0. , 0. , -0.009655368503,
- 0. , 0. ,
- -0. , 0.725875223511, 0.000000000003, -0. , -0.362937611655, 0.273540335334, 0.,
- -0.362937611676, -0.273540335273,
- -0. , 0.000000000003, 0.507198979725, 0. , 0.210065178279, -0.253599489912, 0.,
- -0.210065178221, -0.253599489856,
- -0.009655368505, -0. , 0. , 0.008759121798, 0. , -0. , 0.000896246713,
- -0. , -0. ,
- -0. , -0.362937611655, 0.210065178279, 0. , 0.395481274657, -0.241802756803, 0.,
- -0.032543663037, 0.031737578554,
- 0. , 0.273540335334, -0.253599489912, -0. , -0.241802756803, 0.236629960127, -0.,
- -0.031737578562, 0.016969529729,
- -0.009655368503, 0. , 0. , 0.000896246713, 0. , -0. , 0.008759121792,
- -0. , -0. ,
- 0. , -0.362937611676, -0.210065178221, -0. , -0.032543663037, -0.031737578562, -0.,
- 0.395481274584, 0.241802756768,
- 0. , -0.273540335273, -0.253599489856, -0. , 0.031737578554, 0.016969529729, -0.,
- 0.241802756768, 0.236629960119]).reshape((9, 9))
-_hess_scf_nh2_adz_df_uhf = np.array([
- -0.007317259569, 0. , 0. , 0.00365862978 , 0. , -0. , 0.003658629786,
- -0. , -0. ,
- 0. , 0.62484772987 , -0.000000000011, 0. , -0.312423864907, 0.242538620551, -0.,
- -0.312423864936, -0.242538620553,
- 0. , -0.000000000011, 0.421394753004, -0. , 0.185083431455, -0.210697376525, -0.,
- -0.185083431454, -0.210697376488,
- 0.00365862978 , 0. ,-0. , -0.003324468914, -0. , 0. , -0.000334160866,
- 0. , 0. ,
- 0. , -0.312423864907, 0.185083431455, -0. , 0.342764539209, -0.21381102597 , -0.,
- -0.030340674329, 0.028727594562,
- -0. , 0.242538620551,-0.210697376525, 0. , -0.21381102597 , 0.196906745018, 0.,
- -0.02872759456 , 0.013790631506,
- 0.003658629786, -0. ,-0. , -0.000334160866, -0. , 0. , -0.003324468915,
- 0. , 0. ,
- -0. , -0.312423864936,-0.185083431454, 0. , -0.030340674329, -0.02872759456 , 0.,
- 0.342764539113, 0.213811026012,
- -0. , -0.242538620553,-0.210697376488, 0. , 0.028727594562, 0.013790631506, 0.,
- 0.213811026012, 0.196906744992]).reshape((9, 9))
-_hess_scf_nh2_adz_df_rohf = np.array([
- -0.006610027359, 0. , 0. , 0.003305013679, 0. , 0. , 0.003305013679, 0. , 0. ,
- 0. , 0.626646193304, 0. , 0. , -0.313323096652, 0.242957299808, 0., -0.313323096652, -0.242957299808,
- 0. , 0. , 0.422913366944, 0. , 0.185333436236, -0.211456683472, 0., -0.185333436236, -0.211456683472,
- 0.003305013679, 0. , 0. , -0.002928829428, 0. , 0. , -0.000376184252, 0. , 0. ,
- 0. , -0.313323096652, 0.185333436236, 0. , 0.343783148838, -0.214145368022, 0., -0.030460052185, 0.028811931786,
- 0. , 0.242957299808, -0.211456683472, 0. , -0.214145368022, 0.197665865008, 0., -0.028811931786, 0.013790818464,
- 0.003305013679, 0. , 0. , -0.000376184252, 0. , 0. , -0.002928829428, 0. , 0. ,
- 0. , -0.313323096652, -0.185333436236, 0. , -0.030460052185, -0.028811931786, 0., 0.343783148838, 0.214145368022,
- 0. , -0.242957299808, -0.211456683472, 0. , 0.028811931786, 0.013790818464, 0., 0.214145368022, 0.197665865008]).reshape((9, 9))
-
-_hess_scf_h2o_adz_cd_rhf = np.zeros(81).reshape((9, 9))
-_hess_scf_nh2_adz_cd_uhf = np.zeros(81).reshape((9, 9))
-_hess_scf_nh2_adz_cd_rohf = np.zeros(81).reshape((9, 9))
-
-
-# DFT FUNCTIONAL portion of B2PLYP from psi 99,590
-_b2plyp_hf_dz_pk_rhf = -100.3005792821600437
-_b2plyp_bh3p_dz_pk_uhf = -26.0528813461710449
-_b2plyp_bh3p_dz_pk_rohf = 0.0
-
-_b2plyp_hf_dz_df_rhf = -100.3005907504988699
-_b2plyp_bh3p_dz_df_uhf = -26.0528839219733257
-_b2plyp_bh3p_dz_df_rohf = 0.0
-
-_b2plyp_hf_dz_cd_rhf = -100.3006117916440019
-_b2plyp_bh3p_dz_cd_uhf = -26.0528827170103980
-_b2plyp_bh3p_dz_cd_rohf = 0.0
-
-
-_b2plyp_h2o_qz2p_pk_rhf = -76.3306993470827706
-_b2plyp_nh2_qz2p_pk_uhf = -55.7984427240855254
-_b2plyp_nh2_qz2p_pk_rohf = 0.0
-
-_b2plyp_h2o_qz2p_df_rhf = -76.3307137247329877
-_b2plyp_nh2_qz2p_df_uhf = -55.7984551557867974
-_b2plyp_nh2_qz2p_df_rohf = 0.0
-
-_b2plyp_h2o_qz2p_cd_rhf = -76.3307381934528735
-_b2plyp_nh2_qz2p_cd_uhf = -55.7984547742191594
-_b2plyp_nh2_qz2p_cd_rohf = 0.0
-
-
-_b2plyp_h2o_adz_pk_rhf = -76.3084021997237016
-_b2plyp_nh2_adz_pk_uhf = -55.7829154325298688
-_b2plyp_nh2_adz_pk_rohf = 0.0
-
-_b2plyp_h2o_adz_df_rhf = -76.3084028180061580
-_b2plyp_nh2_adz_df_uhf = -55.7829186059061328
-_b2plyp_nh2_adz_df_rohf = 0.0
-
-_b2plyp_h2o_adz_cd_rhf = -76.3083803442428916
-_b2plyp_nh2_adz_cd_uhf = -55.7828904397309557
-_b2plyp_nh2_adz_cd_rohf = 0.0
-# fmt: on
-
-# Rarely, reference values by conventional algorithms are _not_ available, while density-fitted or Cholesky-decomposed values _are_ available.
-# This deprives DF/CD of a sanity check versus CONV values, so:
-# (1) make every effort to hunt one down from other programs, reference implementations, etc.
-# (2) if an inferior but ballpark value is available (e.g., 3-pt findif gradient or value with a small correction (<1e-4) missing), include it with notes on caveats.
-# (3) if all else fails, add the QCVariable to _std_suite as `_knownmissing`
-# (a) CONV-AE-CONV and CONV-FC-CONV blocks only
-# (b) may have to adjust logic in compute_derived_qcvars
-# (c) only use if it'll show up in checks (e.g., DF checks SAME-SPIN for uhf but not rhf, so CONV only needs _knownmissing for uhf)
-# (4) revisit and add good CONV refs if opportunity arises.
-#
-# Current `_knownmissing`s:
-# * "OLCCD SAME-SPIN CORRELATION ENERGY" in CONV-FC-CONV for uhf/rohf
-# * "OLCCD TOTAL GRADIENT" in CONV-FC-CONV
-# * "O(T) CORRECTION ENERGY in CONV-AE-CONV and CONV-FC-CONV
-# * "A-O(T) CORRECTION ENERGY" in CONV-AE-CONV and CONV-FC-CONV
-# * "OMP2/OMP2.5/OMP3/OREMP2 REFERENCE CORRECTION ENERGY" in CONV-FC-CONV for rhf/uhf/rohf
-# * "OMP2/OMP2.5/OMP3/OREMP2 CORRELATION ENERGY" in CONV-FC-CONV for rhf/uhf/rohf
-# * "OMP2/OMP2.5/OMP3/OREMP2 TOTAL GRADIENT" in CONV-FC-CONV for rhf/uhf/rohf
-# * "OMP2/OMP2.5/OMP3/OREMP2 SAME-SPIN CORRELATION ENERGY" in CONV-FC-CONV for uhf/rohf
-_knownmissing = "KnownMissing"
-
-_std_suite = [
- # <<< CONV-AE-CONV >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.203781911950,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05427697023782003,
- "MP2 TOTAL GRADIENT": np.array(
- [ # fnocc findif-5 ae pk+conv
- 0.0000000000,
- 0.0000000000,
- 0.0028193375,
- 0.0000000000,
- 0.0000000000,
- -0.0028193375,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [-0.00162697, 0.0, 0.0, 0.00162697, 0.0, 0.0],
- [0.0, -0.00162697, 0.0, 0.0, 0.00162697, 0.0],
- [0.0, 0.0, 0.64124876, 0.0, 0.0, -0.64124876],
- [0.00162697, 0.0, 0.0, -0.00162697, 0.0, 0.0],
- [0.0, 0.00162697, 0.0, 0.0, -0.00162697, 0.0],
- [0.0, 0.0, -0.64124876, 0.0, 0.0, 0.64124876],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.20647996, # fnocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04989037, # fnocc
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000917944631, 0.0, 0.0, 0.000917944631]).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.20864512, # vcc
- "MP4(T) CORRECTION ENERGY": -0.002048407683, # vcc
- "CISD CORRELATION ENERGY": -0.20226573645347, # vcc
- "QCISD CORRELATION ENERGY": -0.20892771089382, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00182210, # vcc
- "FCI CORRELATION ENERGY": -0.21117389325, # detci
- "REMP2 CORRELATION ENERGY": -0.20840575987435, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.04954400816816, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2099060277, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.048339903547, # fnocc
- "LCCD TOTAL GRADIENT": np.array([0.0, -0.0, 0.002203664242, -0.0, 0.0, -0.002203664242]).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2107436391, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.048460183760, # fnocc
- "CEPA(1) CORRELATION ENERGY": -0.2083463452, # fnocc
- "CEPA(1) SINGLES ENERGY": 0.0,
- "CEPA(1) SAME-SPIN CORRELATION ENERGY": -0.0480716539, # fnocc
- "CEPA(3) CORRELATION ENERGY": -0.2067017395, # fnocc
- "CEPA(3) SINGLES ENERGY": 0.0,
- "CEPA(3) SAME-SPIN CORRELATION ENERGY": -0.0477774156, # fnocc
- "ACPF CORRELATION ENERGY": -0.2089157318, # fnocc
- "ACPF SINGLES ENERGY": 0.0,
- "ACPF SAME-SPIN CORRELATION ENERGY": -0.0481691534, # fnocc
- "AQCC CORRELATION ENERGY": -0.2073512040, # fnocc
- "AQCC SINGLES ENERGY": 0.0,
- "AQCC SAME-SPIN CORRELATION ENERGY": -0.0479164828, # fnocc
- "CCD CORRELATION ENERGY": -0.20815176752849, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.04851867, # vcc
- "CCD TOTAL GRADIENT": np.array([[0.0, 0.0, 0.0008368526], [0.0, 0.0, -0.0008368526]]), # vcc
- "CCD TOTAL HESSIAN": np.array( # vcc
- [
- [-4.82892500e-04, 0.00000000e00, 0.00000000e00, 4.82892500e-04, 0.00000000e00, 0.00000000e00],
- [0.00000000e00, -4.82892500e-04, 0.00000000e00, 0.00000000e00, 4.82892500e-04, 0.00000000e00],
- [0.00000000e00, 0.00000000e00, 6.40299636e-01, 0.00000000e00, 0.00000000e00, -6.40299636e-01],
- [4.82892500e-04, 0.00000000e00, 0.00000000e00, -4.82892500e-04, 0.00000000e00, 0.00000000e00],
- [0.00000000e00, 4.82892500e-04, 0.00000000e00, 0.00000000e00, -4.82892500e-04, 0.00000000e00],
- [0.00000000e00, 0.00000000e00, -6.40299636e-01, 0.00000000e00, 0.00000000e00, 6.40299636e-01],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.20860360, # ccenergy
- "CC2 CORRELATION ENERGY": -0.204522923018627, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.004123981053, 0.0, 0.0, -0.004123981053]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.208743643,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04857419039,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.001989217717,
- 0.0,
- 0.0,
- -0.001989217717,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.00114793, 0.0, 0.0, 0.00114793, 0.0, 0.0],
- [0.0, -0.00114793, 0.0, 0.0, 0.00114793, 0.0],
- [0.0, 0.0, 0.6378403, 0.0, 0.0, -0.6378403],
- [0.00114793, 0.0, 0.0, -0.00114793, 0.0, 0.0],
- [0.0, 0.00114793, 0.0, 0.0, -0.00114793, 0.0],
- [0.0, 0.0, -0.6378403, 0.0, 0.0, 0.6378403],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.002058455537, # vcc
- "(T) CORRECTION ENERGY": -0.0019363896542312043,
- "CCSD(T) TOTAL GRADIENT": np.array([[0.0, 0.0, 0.00308437284379], [0.0, 0.0, -0.00308437284379]]), # ncc fd
- "CCSD(T) TOTAL HESSIAN": np.array( # ncc fd
- [
- [-0.00177990234, 0.0, 0.0, 0.00177990234, 0.0, 0.0],
- [0.0, -0.00177990234, 0.0, 0.0, 0.00177990234, 0.0],
- [0.0, 0.0, 0.636483940298, 0.0, 0.0, -0.636483940298],
- [0.00177990234, 0.0, 0.0, -0.00177990234, 0.0, 0.0],
- [0.0, 0.00177990234, 0.0, 0.0, -0.00177990234, 0.0],
- [0.0, 0.0, -0.636483940298, 0.0, 0.0, 0.636483940298],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.001961066509136, # ncc
- "A-CCSD(T) TOTAL GRADIENT": np.array( # ncc
- [
- [0.000000000000000, 0.000000000000000, 0.003071874425935],
- [0.000000000000000, 0.000000000000000, -0.003071874425935],
- ]
- ),
- "B(T) CORRECTION ENERGY": -0.00208496, # ccenergy
- "CC3 CORRELATION ENERGY": -0.210769121626813, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.210768179766, # ecc
- "CCSDT-1A TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[0.0, 0.0, 0.00316187041423], [0.0, 0.0, -0.00316187041423]]
- ),
- "CCSDT-1A TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.001824798014, 0.0, 0.0, 0.001824798014, 0.0, 0.0],
- [0.0, -0.001824795113, 0.0, 0.0, 0.001824795113, 0.0],
- [0.0, 0.0, 0.63641316654, 0.0, 0.0, -0.63641316654],
- [0.001824798014, 0.0, 0.0, -0.001824798014, 0.0, 0.0],
- [0.0, 0.001824795113, 0.0, 0.0, -0.001824795113, 0.0],
- [0.0, 0.0, -0.63641316654, 0.0, 0.0, 0.63641316654],
- ]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.210771725787, # ecc
- "CCSDT-1B TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[0.0, 0.0, 0.00316311457309], [0.0, 0.0, -0.00316311457309]]
- ),
- "CCSDT-1B TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.001825508871, 0.000000011606, 0.000000016683, 0.001825508871, -0.000000011606, -0.000000016683],
- [0.000000011606, -0.001825503068, 0.000000007254, -0.000000011606, 0.001825503068, -0.000000007254],
- [0.000000016683, 0.000000007254, 0.636412451331, -0.000000016683, -0.000000007254, -0.636412451331],
- [0.001825508871, -0.000000011606, -0.000000016683, -0.001825508871, 0.000000011606, 0.000000016683],
- [-0.000000011606, 0.001825503068, -0.000000007254, 0.000000011606, -0.001825503068, 0.000000007254],
- [-0.000000016683, -0.000000007254, -0.636412451331, 0.000000016683, 0.000000007254, 0.636412451331],
- ]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.210638072036, # ecc
- "CCSDT-2 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[-0.0, 0.0, 0.00310773649518], [0.0, 0.0, -0.00310773649518]]
- ),
- "CCSDT-2 TOTAL HESSIAN": np.array( # ecc by psi fd
- [
- [-0.001793373798, -0.000000001451, -0.000000029015, 0.001793373798, 0.000000001451, 0.000000029015],
- [-0.000000001451, -0.001793373798, -0.000000029015, 0.000000001451, 0.001793373798, 0.000000029015],
- [-0.000000029015, -0.000000029015, 0.636438446923, 0.000000029015, 0.000000029015, -0.636438446923],
- [0.001793373798, 0.000000001451, 0.000000029015, -0.001793373798, -0.000000001451, -0.000000029015],
- [0.000000001451, 0.001793373798, 0.000000029015, -0.000000001451, -0.001793373798, -0.000000029015],
- [0.000000029015, 0.000000029015, -0.636438446923, -0.000000029015, -0.000000029015, 0.636438446923],
- ]
- ),
- "CCSDT-3 CORRELATION ENERGY": -0.21063680423440, # vcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[0.0, 0.0, 0.00310517589721], [0.0, 0.0, -0.00310517589721]]
- ),
- "CCSDT-3 TOTAL HESSIAN": np.array( # ecc
- [
- [-0.00179205, 0.0, 0.0, 0.00179205, 0.0, 0.0],
- [0.0, -0.00179205, 0.0, 0.0, 0.00179205, 0.0],
- [0.0, 0.0, 0.63647126, 0.0, 0.0, -0.63647126],
- [0.00179205, 0.0, 0.0, -0.00179205, 0.0, 0.0],
- [0.0, 0.00179205, 0.0, 0.0, -0.00179205, 0.0],
- [0.0, 0.0, -0.63647126, 0.0, 0.0, 0.63647126],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.210768503167476, # ncc
- "CCSDT TOTAL GRADIENT": np.array(
- [
- 0.000000000000000,
- 0.000000000000000,
- 0.003174888578646,
- 0.000000000000000,
- 0.000000000000000,
- -0.003174888578646,
- ]
- ).reshape((-1, 3)),
- "CCSDT TOTAL HESSIAN": np.array( # ecc
- [
- [-0.00183215, 0.0, 0.0, 0.00183215, 0.0, 0.0],
- [0.0, -0.00183215, 0.0, 0.0, 0.00183215, 0.0],
- [0.0, 0.0, 0.63633545, 0.0, 0.0, -0.63633545],
- [0.00183215, 0.0, 0.0, -0.00183215, 0.0, 0.0],
- [0.0, 0.00183215, 0.0, 0.0, -0.00183215, 0.0],
- [0.0, 0.0, -0.63633545, 0.0, 0.0, 0.63633545],
- ]
- ),
- "[Q] CORRECTION ENERGY": -0.000380822242155, # ncc
- "(Q) CORRECTION ENERGY": -0.000414550980182, # ncc
- "CCSDT(Q) TOTAL GRADIENT": np.array(
- [ # ncc
- 0.000000000000000,
- 0.000000000000000,
- 0.003539304813171,
- 0.000000000000000,
- 0.000000000000000,
- -0.00353930481317,
- ]
- ).reshape((-1, 3)),
- "CCSDTQ CORRELATION ENERGY": -0.211162705496338, # ncc
- "CCSDTQ TOTAL GRADIENT": np.array(
- [
- 0.000000000000000,
- 0.000000000000000,
- 0.003507320893113,
- 0.000000000000000,
- 0.000000000000000,
- -0.003507320893113,
- ]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000704890964, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.204465719970, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.054616313597, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [0.0, 0.0, 0.004107528173, 0.0, 0.0, -0.004107528173]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000571728736, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.205686837008, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.052301161413, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [0.0, 0.000000000000, 0.002017001118, 0.0, 0.000000000000, -0.002017001118]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000467222482, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.206935131375, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.050007707662, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [0.0, 0.0, -0.000007413433, 0.0, 0.0, 0.000007413433]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.000553304064, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.208942935871, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.049683397802, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [0.0, 0.000000000000, 0.002830089047, 0.0, 0.000000000000, -0.002830089047]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0005522939, # p4n
- "OLCCD CORRELATION ENERGY": -0.2104417743, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0484443079, # occ
- "OLCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.00339205449, 0.0, 0.0, -0.00339205449]).reshape( # occ
- (-1, 3)
- ),
- "OCCD REFERENCE CORRECTION ENERGY": 0.000511277, # qchem
- "OCCD CORRELATION ENERGY": -0.208649453, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0.00000000, 0.00000000, 0.00184797, 0, 0, -0.00184797]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "SVWN TOTAL ENERGY": -99.97965143812243, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.019336350645, -0.0, 0.0, -0.019336301692]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.8 99,590
- [
- -0.011158529195,
- -0.0,
- -0.0,
- 0.011158509954,
- -0.0,
- -0.0,
- -0.0,
- -0.011158529195,
- -0.0,
- 0.0,
- 0.011158509954,
- 0.0,
- -0.0,
- -0.0,
- 0.642213454497,
- 0.0,
- 0.0,
- -0.642213457165,
- 0.011158509954,
- 0.0,
- 0.0,
- -0.011155887562,
- -0.0,
- -0.0,
- -0.0,
- 0.011158509954,
- 0.0,
- -0.0,
- -0.011155887564,
- -0.0,
- -0.0,
- 0.0,
- -0.642213457165,
- -0.0,
- -0.0,
- 0.642216280292,
- ]
- ).reshape((6, 6)),
- "PBE TOTAL ENERGY": -100.33517315116806, # psi 99,590
- "PBE TOTAL GRADIENT": np.array([[0.0, 0.0, 0.020107103338], [0.0, 0.0, -0.020107128125]]), # psi 99,590
- "B3LYP TOTAL ENERGY": -100.43544624005466, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [[-2.37578116e-16, -5.15211396e-17, 1.13731953e-02], [-5.23661679e-14, 5.41065792e-15, -1.13730866e-02]]
- ),
- "B3LYP5 TOTAL ENERGY": -100.39768534808519, # psi 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # psi 99,590
- [[-6.94208991e-16, 1.87550833e-16, 1.16101107e-02], [3.49213371e-14, 3.53945060e-15, -1.16100020e-02]]
- ),
- "WB97X TOTAL ENERGY": -100.41398805061500, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, 0.0, 0.006570841474, 0.0, 0.0, -0.006570658806]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -100.364597842761, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.2218977246,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05669988343022163,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.009624481085,
- 0.0,
- 0.005505796371,
- -0.004812240542,
- 0.0,
- -0.005505796371,
- -0.004812240542,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [
- -8.68375090e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.34187540e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.34187540e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.18925148e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.59462574e-01,
- 2.81687501e-01,
- 0.00000000e00,
- -3.59462574e-01,
- -2.81687501e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.67076274e-01,
- 0.00000000e00,
- 2.16194016e-01,
- -2.33538137e-01,
- 0.00000000e00,
- -2.16194016e-01,
- -2.33538137e-01,
- ],
- [
- 4.34187540e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.09411690e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.47758500e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.59462574e-01,
- 2.16194016e-01,
- 0.00000000e00,
- 3.87745363e-01,
- -2.48940759e-01,
- 0.00000000e00,
- -2.82827890e-02,
- 3.27467430e-02,
- ],
- [
- 0.00000000e00,
- 2.81687501e-01,
- -2.33538137e-01,
- 0.00000000e00,
- -2.48940759e-01,
- 2.23898773e-01,
- 0.00000000e00,
- -3.27467430e-02,
- 9.63936430e-03,
- ],
- [
- 4.34187540e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.47758500e-04,
- 0.00000000e00,
- 0.00000000e00,
- -4.09411690e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.59462574e-01,
- -2.16194016e-01,
- 0.00000000e00,
- -2.82827890e-02,
- -3.27467430e-02,
- 0.00000000e00,
- 3.87745363e-01,
- 2.48940759e-01,
- ],
- [
- 0.00000000e00,
- -2.81687501e-01,
- -2.33538137e-01,
- 0.00000000e00,
- 3.27467430e-02,
- 9.63936430e-03,
- 0.00000000e00,
- 2.48940759e-01,
- 2.23898773e-01,
- ],
- ]
- ), # cfour
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.051851951707, # fnocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.226431141430, # fnocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.003997280108, 0.0, 0.00255475829, -0.001998640054, 0.0, -0.00255475829, -0.001998640054]
- ).reshape(-1, 3),
- "MP4(SDQ) CORRELATION ENERGY": -0.229617624405, # vcc
- "MP4(T) CORRECTION ENERGY": -0.005637388222, # vcc
- "CISD CORRELATION ENERGY": -0.21978965712829, # vcc
- "QCISD CORRELATION ENERGY": -0.22998871354660, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.0048836279, # vcc
- "REMP2 CORRELATION ENERGY": -0.229445317607, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.051382139941, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2318870702, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.049937236558, # fnocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.008553750217, -0.0, 0.005238229687, -0.004276875109, 0.0, -0.005238229687, -0.004276875109]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2341051403, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.050442387759, # fnocc
- "CEPA(1) CORRELATION ENERGY": -0.2299219110, # fnocc
- "CEPA(1) SINGLES ENERGY": 0.0,
- "CEPA(1) SAME-SPIN CORRELATION ENERGY": -0.0497747018, # fnocc
- "CEPA(3) CORRELATION ENERGY": -0.227111702, # fnocc
- "CEPA(3) SINGLES ENERGY": 0.0,
- "CEPA(3) SAME-SPIN CORRELATION ENERGY": -0.0492934875, # fnocc
- "ACPF CORRELATION ENERGY": -0.2308608117, # fnocc
- "ACPF SINGLES ENERGY": 0.0,
- "ACPF SAME-SPIN CORRELATION ENERGY": -0.0499379269, # fnocc
- "AQCC CORRELATION ENERGY": -0.2281621411, # fnocc
- "AQCC SINGLES ENERGY": 0.0,
- "AQCC SAME-SPIN CORRELATION ENERGY": -0.0495127294, # fnocc
- "CCD CORRELATION ENERGY": -0.22802083552559, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.0499178, # vcc
- "CCD TOTAL GRADIENT": np.array(
- [[0.0, 0.0, 0.00617203], [0.0, 0.00392094, -0.00308601], [0.0, -0.00392094, -0.00308601]]
- ),
- "CCD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.0055683485, 0.0, 0.0, 0.0027841742, 0.0, 0.0, 0.0027841742, 0.0, 0.0],
- [0.0, 0.7149628559, 0.0, 0.0, -0.357481428, 0.2789479625, 0.0, -0.357481428, -0.2789479625],
- [0.0, 0.0, 0.4751691519, 0.0, 0.215124084, -0.237584576, 0.0, -0.215124084, -0.237584576],
- [0.0027841742, 0.0, 0.0, -0.0027615491, 0.0, 0.0, -0.0000226252, 0.0, 0.0],
- [
- 0.0,
- -0.357481428,
- 0.215124084,
- 0.0,
- 0.3876970703,
- -0.2470360126,
- 0.0,
- -0.0302156423,
- 0.0319119498,
- ],
- [
- 0.0,
- 0.2789479625,
- -0.237584576,
- 0.0,
- -0.2470360126,
- 0.2254150323,
- 0.0,
- -0.0319119498,
- 0.0121695437,
- ],
- [0.0027841742, 0.0, 0.0, -0.0000226252, 0.0, 0.0, -0.0027615491, 0.0, 0.0],
- [
- 0.0,
- -0.357481428,
- -0.215124084,
- 0.0,
- -0.0302156423,
- -0.0319119498,
- 0.0,
- 0.3876970703,
- 0.2470360126,
- ],
- [
- 0.0,
- -0.2789479625,
- -0.237584576,
- 0.0,
- 0.0319119498,
- 0.0121695437,
- 0.0,
- 0.2470360126,
- 0.2254150323,
- ],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.228985653284813, # ccenergy
- "CC2 CORRELATION ENERGY": -0.224173737389996, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.011903811069, 0.0, 0.00673003665, -0.005951905535, 0.0, -0.00673003665, -0.005951905535]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.2294105794,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.050177977945205,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.007512595487,
- 0.0,
- 0.004613769715,
- -0.003756297743,
- 0.0,
- -0.004613769715,
- -0.003756297743,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [
- -6.77828820e-03,
- 0.00000000e00,
- 0.00000000e00,
- 3.38914410e-03,
- 0.00000000e00,
- 0.00000000e00,
- 3.38914410e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.12577187e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.56288594e-01,
- 2.78492260e-01,
- 0.00000000e00,
- -3.56288594e-01,
- -2.78492260e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.72789375e-01,
- 0.00000000e00,
- 2.14574581e-01,
- -2.36394688e-01,
- 0.00000000e00,
- -2.14574581e-01,
- -2.36394688e-01,
- ],
- [
- 3.38914410e-03,
- 0.00000000e00,
- 0.00000000e00,
- -3.30616560e-03,
- 0.00000000e00,
- 0.00000000e00,
- -8.29785000e-05,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.56288594e-01,
- 2.14574581e-01,
- 0.00000000e00,
- 3.86544885e-01,
- -2.46533421e-01,
- 0.00000000e00,
- -3.02562911e-02,
- 3.19588394e-02,
- ],
- [
- 0.00000000e00,
- 2.78492260e-01,
- -2.36394688e-01,
- 0.00000000e00,
- -2.46533421e-01,
- 2.24401624e-01,
- 0.00000000e00,
- -3.19588394e-02,
- 1.19930640e-02,
- ],
- [
- 3.38914410e-03,
- 0.00000000e00,
- 0.00000000e00,
- -8.29785000e-05,
- 0.00000000e00,
- 0.00000000e00,
- -3.30616560e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.56288594e-01,
- -2.14574581e-01,
- 0.00000000e00,
- -3.02562911e-02,
- -3.19588394e-02,
- 0.00000000e00,
- 3.86544885e-01,
- 2.46533421e-01,
- ],
- [
- 0.00000000e00,
- -2.78492260e-01,
- -2.36394688e-01,
- 0.00000000e00,
- 3.19588394e-02,
- 1.19930640e-02,
- 0.00000000e00,
- 2.46533421e-01,
- 2.24401624e-01,
- ],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.005640585707, # vcc
- "(T) CORRECTION ENERGY": -0.00523856,
- "CCSD(T) TOTAL GRADIENT": np.array( # ncc fd
- [
- [0.00000000000000, 0.00000000000000, 0.01019219792989],
- [0.00000000000000, 0.00604927147843, -0.00509609896494],
- [0.00000000000000, -0.00604927147843, -0.00509609896494],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # ncc fd
- [
- [
- -9.19597780e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.59798890e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.59798890e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.10457601e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.55228801e-01,
- 2.78607515e-01,
- 0.00000000e00,
- -3.55228801e-01,
- -2.78607515e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.68590076e-01,
- 0.00000000e00,
- 2.14495554e-01,
- -2.34295038e-01,
- 0.00000000e00,
- -2.14495554e-01,
- -2.34295038e-01,
- ],
- [
- 4.59798890e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.41199179e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.85997115e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.55228801e-01,
- 2.14495554e-01,
- 0.00000000e00,
- 3.85055647e-01,
- -2.46551535e-01,
- 0.00000000e00,
- -2.98268463e-02,
- 3.20559807e-02,
- ],
- [
- 0.00000000e00,
- 2.78607515e-01,
- -2.34295038e-01,
- 0.00000000e00,
- -2.46551535e-01,
- 2.22895271e-01,
- 0.00000000e00,
- -3.20559807e-02,
- 1.13997664e-02,
- ],
- [
- 4.59798890e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.85997115e-04,
- 0.00000000e00,
- 0.00000000e00,
- -4.41199179e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.55228801e-01,
- -2.14495554e-01,
- 0.00000000e00,
- -2.98268463e-02,
- -3.20559807e-02,
- 0.00000000e00,
- 3.85055647e-01,
- 2.46551535e-01,
- ],
- [
- 0.00000000e00,
- -2.78607515e-01,
- -2.34295038e-01,
- 0.00000000e00,
- 3.20559807e-02,
- 1.13997664e-02,
- 0.00000000e00,
- 2.46551535e-01,
- 2.22895271e-01,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.005236187785, # ecc
- "A-CCSD(T) TOTAL GRADIENT": np.array( # ncc
- [
- [0.000000000000000, 0.000000000000000, 0.010120884870498],
- [0.000000000000000, 0.006023996226962, -0.005060442435251],
- [0.000000000000000, -0.006023996226962, -0.005060442435251],
- ]
- ),
- "B(T) CORRECTION ENERGY": -0.005680766924884, # ccenergy
- "CC3 CORRELATION ENERGY": -0.235030687907142, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.23500915078065532, # mrcc
- "CCSDT-1A TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01040697979689],
- [0.00000000000000, 0.00619487901010, -0.00520348989845],
- [0.00000000000000, -0.00619487901010, -0.00520348989845],
- ]
- ),
- "CCSDT-1A TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.00938924, 0.0, 0.0, 0.00469462, 0.0, 0.0, 0.00469462, 0.0, 0.0],
- [0.0, 0.71035902, 0.0, 0.0, -0.35517951, 0.27864419, 0.0, -0.35517951, -0.27864419],
- [0.0, 0.0, 0.46816235, 0.0, 0.21453598, -0.23408118, 0.0, -0.21453598, -0.23408118],
- [0.00469462, 0.0, 0.0, -0.00451106, 0.0, 0.0, -0.00018357, 0.0, 0.0],
- [0.0, -0.35517951, 0.21453598, 0.0, 0.38493736, -0.24659008, 0.0, -0.02975785, 0.0320541],
- [0.0, 0.27864419, -0.23408118, 0.0, -0.24659008, 0.2227516, 0.0, -0.0320541, 0.01132957],
- [0.00469462, 0.0, 0.0, -0.00018357, 0.0, 0.0, -0.00451106, 0.0, 0.0],
- [0.0, -0.35517951, -0.21453598, 0.0, -0.02975785, -0.0320541, 0.0, 0.38493736, 0.24659008],
- [0.0, -0.27864419, -0.23408118, 0.0, 0.0320541, 0.01132957, 0.0, 0.24659008, 0.2227516],
- ]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.23501318627899082, # mrcc
- "CCSDT-1B TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01040244518005],
- [0.00000000000000, 0.00619405837854, -0.00520122259002],
- [0.00000000000000, -0.00619405837854, -0.00520122259002],
- ]
- ),
- "CCSDT-1B TOTAL HESSIAN": np.array( # ecc by psi fd
- [
- [-0.009385784958, 0.0, 0.0, 0.004692892479, 0.0, 0.0, 0.004692892479, 0.0, 0.0],
- [
- 0.0,
- 0.710344410436,
- 0.0,
- 0.0,
- -0.355172205218,
- 0.278637075614,
- 0.0,
- -0.355172205218,
- -0.278637075614,
- ],
- [
- 0.0,
- 0.0,
- 0.468154078949,
- 0.0,
- 0.214541783785,
- -0.234077039475,
- 0.0,
- -0.214541783785,
- -0.234077039475,
- ],
- [0.004692892479, 0.0, 0.0, -0.004510041295, 0.0, 0.0, -0.000182851184, 0.0, 0.0],
- [
- 0.0,
- -0.355172205218,
- 0.214541783785,
- 0.0,
- 0.384930286936,
- -0.2465894297,
- 0.0,
- -0.029758081719,
- 0.032047645914,
- ],
- [
- 0.0,
- 0.278637075614,
- -0.234077039475,
- 0.0,
- -0.2465894297,
- 0.222747174147,
- 0.0,
- -0.032047645914,
- 0.011329865328,
- ],
- [0.004692892479, 0.0, 0.0, -0.000182851184, 0.0, 0.0, -0.004510041295, 0.0, 0.0],
- [
- 0.0,
- -0.355172205218,
- -0.214541783785,
- 0.0,
- -0.029758081719,
- -0.032047645914,
- 0.0,
- 0.384930286936,
- 0.2465894297,
- ],
- [
- 0.0,
- -0.278637075614,
- -0.234077039475,
- 0.0,
- 0.032047645914,
- 0.011329865328,
- 0.0,
- 0.2465894297,
- 0.222747174147,
- ],
- ]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.234514404732, # ecc
- "CCSDT-2 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01007036070231],
- [0.00000000000000, 0.00600051212420, -0.00503518035116],
- [0.00000000000000, -0.00600051212420, -0.00503518035116],
- ]
- ),
- "CCSDT-2 TOTAL HESSIAN": np.array( # ecc by psi fd
- [
- [-0.009086018755, 0.0, 0.0, 0.004543009378, 0.0, 0.0, 0.004543009378, 0.0, 0.0],
- [
- 0.0,
- 0.710438905643,
- 0.0,
- 0.0,
- -0.355219452821,
- 0.278557716256,
- 0.0,
- -0.355219452821,
- -0.278557716256,
- ],
- [
- 0.0,
- 0.0,
- 0.468711648157,
- 0.0,
- 0.214551521677,
- -0.234355824078,
- 0.0,
- -0.214551521677,
- -0.234355824078,
- ],
- [0.004543009378, 0.0, 0.0, -0.004367495061, 0.0, 0.0, -0.000175514317, 0.0, 0.0],
- [
- 0.0,
- -0.355219452821,
- 0.214551521677,
- 0.0,
- 0.385072138348,
- -0.246554618967,
- 0.0,
- -0.029852685527,
- 0.032003097289,
- ],
- [
- 0.0,
- 0.278557716256,
- -0.234355824078,
- 0.0,
- -0.246554618967,
- 0.222923456244,
- 0.0,
- -0.032003097289,
- 0.011432367835,
- ],
- [0.004543009378, 0.0, 0.0, -0.000175514317, 0.0, 0.0, -0.004367495061, 0.0, 0.0],
- [
- 0.0,
- -0.355219452821,
- -0.214551521677,
- 0.0,
- -0.029852685527,
- -0.032003097289,
- 0.0,
- 0.385072138348,
- 0.246554618967,
- ],
- [
- 0.0,
- -0.278557716256,
- -0.234355824078,
- 0.0,
- 0.032003097289,
- 0.011432367835,
- 0.0,
- 0.246554618967,
- 0.222923456244,
- ],
- ]
- ),
- "CCSDT-3 CORRELATION ENERGY": -0.2345361459852029, # mrcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01009389495078],
- [0.00000000000000, 0.00601318997564, -0.00504694747539],
- [0.00000000000000, -0.00601318997564, -0.00504694747539],
- ]
- ),
- "CCSDT-3 TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.00910672, 0.0, 0.0, 0.00455336, 0.0, 0.0, 0.00455336, 0.0, 0.0],
- [0.0, 0.71040265, 0.0, 0.0, -0.35520132, 0.27855168, 0.0, -0.35520132, -0.27855168],
- [0.0, 0.0, 0.46867889, 0.0, 0.21454552, -0.23433945, 0.0, -0.21454552, -0.23433945],
- [0.00455336, 0.0, 0.0, -0.00437695, 0.0, 0.0, -0.00017641, 0.0, 0.0],
- [0.0, -0.35520132, 0.21454552, 0.0, 0.38506038, -0.2465486, 0.0, -0.02985906, 0.03200308],
- [0.0, 0.27855168, -0.23433945, 0.0, -0.2465486, 0.22290841, 0.0, -0.03200308, 0.01143103],
- [0.00455336, 0.0, 0.0, -0.00017641, 0.0, 0.0, -0.00437695, 0.0, 0.0],
- [0.0, -0.35520132, -0.21454552, 0.0, -0.02985906, -0.03200308, 0.0, 0.38506038, 0.2465486],
- [0.0, -0.27855168, -0.23433945, 0.0, 0.03200308, 0.01143103, 0.0, 0.2465486, 0.22290841],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.234880733453953, # ncc
- "CCSDT TOTAL GRADIENT": np.array(
- [
- 0.000000000000000,
- 0.000000000000000,
- 0.010281901133138,
- 0.000000000000000,
- 0.006116030816197,
- -0.005140950566570,
- 0.000000000000000,
- -0.006116030816197,
- -0.005140950566570,
- ]
- ).reshape((-1, 3)),
- "CCSDT TOTAL HESSIAN": np.array( # ecc
- [
- [
- -9.27691040e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.63845520e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.63845520e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.10153874e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.55076937e-01,
- 2.78521415e-01,
- 0.00000000e00,
- -3.55076937e-01,
- -2.78521415e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.68513289e-01,
- 0.00000000e00,
- 2.14488040e-01,
- -2.34256644e-01,
- 0.00000000e00,
- -2.14488040e-01,
- -2.34256644e-01,
- ],
- [
- 4.63845520e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.45556240e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.82892800e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.55076937e-01,
- 2.14488040e-01,
- 0.00000000e00,
- 3.84940871e-01,
- -2.46504728e-01,
- 0.00000000e00,
- -2.98639346e-02,
- 3.20166873e-02,
- ],
- [
- 0.00000000e00,
- 2.78521415e-01,
- -2.34256644e-01,
- 0.00000000e00,
- -2.46504728e-01,
- 2.22819148e-01,
- 0.00000000e00,
- -3.20166873e-02,
- 1.14374966e-02,
- ],
- [
- 4.63845520e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.82892800e-04,
- 0.00000000e00,
- 0.00000000e00,
- -4.45556240e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.55076937e-01,
- -2.14488040e-01,
- 0.00000000e00,
- -2.98639346e-02,
- -3.20166873e-02,
- 0.00000000e00,
- 3.84940871e-01,
- 2.46504728e-01,
- ],
- [
- 0.00000000e00,
- -2.78521415e-01,
- -2.34256644e-01,
- 0.00000000e00,
- 3.20166873e-02,
- 1.14374966e-02,
- 0.00000000e00,
- 2.46504728e-01,
- 2.22819148e-01,
- ],
- ]
- ),
- "[Q] CORRECTION ENERGY": -0.000291847368718, # ncc
- "(Q) CORRECTION ENERGY": -0.000507547985814, # ncc
- "CCSDT(Q) TOTAL GRADIENT": np.array(
- [ # ncc
- 0.000000000000000,
- 0.000000000000000,
- 0.010822433278893,
- 0.000000000000000,
- 0.006408928209897,
- -0.005411216639448,
- 0.000000000000000,
- -0.006408928209897,
- -0.005411216639448,
- ]
- ).reshape((-1, 3)),
- "CCSDTQ CORRELATION ENERGY": -0.235338854850175, # ncc
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002352035679, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.224125328536, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.058141813805, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [0.0, 0.0, 0.012093662469, 0.0, 0.006798848063, -0.006046831235, 0.0, -0.006798848063, -0.006046831235]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001534835679, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.225651726817, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.055105451161, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.008280964210,
- 0.0,
- 0.004780030747,
- -0.004140482105,
- 0.0,
- -0.004780030747,
- -0.004140482105,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000953570304, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.227372086899, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.052239106558, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.004803850255,
- 0.0,
- 0.002953922342,
- -0.002401925128,
- 0.0,
- -0.002953922342,
- -0.002401925128,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.00128167136578, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.23069139385821, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.05189818473696, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- -0.000000000000,
- 0.009103029917,
- 0.0,
- 0.005405690204,
- -0.004551514958,
- 0.0,
- -0.005405690204,
- -0.004551514958,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0011895155, # p4n
- "OLCCD CORRELATION ENERGY": -0.2330452995, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0503175223, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [0.0, 0.0, 0.009755099696, -0.0, 0.005854889163, -0.004877549848, 0.0, -0.005854889163, -0.004877549848]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.001123344, # qchem
- "OCCD CORRELATION ENERGY": -0.229118050, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0.0, 0.0, 0.00727331, 0.0, 0.00447444, -0.00363665, 0.0, -0.00447444, -0.00363665]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "SVWN TOTAL ENERGY": -76.07571659552373, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, -0.0, 0.01699540452, -0.0, 0.012801478421, -0.008497882106, 0.0, -0.012801478421, -0.008497882106]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.8 99,590
- [
- -0.015282137109,
- 0.0,
- -0.0,
- 0.007667256256,
- 0.0,
- -0.0,
- 0.007667256256,
- 0.0,
- -0.0,
- 0.0,
- 0.714169890673,
- 0.000000000001,
- -0.0,
- -0.357096356198,
- 0.282430177213,
- -0.0,
- -0.357096356198,
- -0.282430177213,
- -0.0,
- 0.000000000001,
- 0.45653162932,
- 0.0,
- 0.223223468116,
- -0.228270944088,
- -0.0,
- -0.223223468116,
- -0.228270944088,
- 0.007667256256,
- -0.0,
- 0.0,
- -0.008305196866,
- 0.0,
- 0.0,
- 0.000637932765,
- -0.0,
- 0.0,
- 0.0,
- -0.357096356198,
- 0.223223468116,
- 0.0,
- 0.385967088688,
- -0.252826811188,
- -0.0,
- -0.028870808826,
- 0.029603353817,
- -0.0,
- 0.282430177213,
- -0.228270944088,
- 0.0,
- -0.252826811188,
- 0.219004239874,
- 0.0,
- -0.029603353817,
- 0.009266633228,
- 0.007667256256,
- -0.0,
- -0.0,
- 0.000637932765,
- -0.0,
- 0.0,
- -0.008305196866,
- -0.0,
- 0.0,
- 0.0,
- -0.357096356198,
- -0.223223468116,
- -0.0,
- -0.028870808826,
- -0.029603353817,
- -0.0,
- 0.385967088688,
- 0.252826811188,
- -0.0,
- -0.282430177213,
- -0.228270944088,
- 0.0,
- 0.029603353817,
- 0.009266633228,
- 0.0,
- 0.252826811188,
- 0.219004239874,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -76.35896461348528, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-0.0, 0.0, 0.018069712075],
- [-0.0, 0.011568971307, -0.009035203776],
- [0.0, -0.011568971307, -0.009035203776],
- ]
- ),
- "B3LYP TOTAL ENERGY": -76.4445487826922090, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-1.77493704e-30, 0.00000000e00, 7.45592796e-03],
- [-1.87490767e-19, 6.12391320e-03, -3.72819302e-03],
- [1.87490767e-19, -6.12391320e-03, -3.72819302e-03],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -76.40749597292017, # psi 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.00000000e00, -7.88860905e-31, 7.74045385e-03],
- [-1.93603325e-19, 6.32356448e-03, -3.87045600e-03],
- [1.93603325e-19, -6.32356448e-03, -3.87045600e-03],
- ]
- ),
- "WB97X TOTAL ENERGY": -76.42162677735320, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, -0.0, 0.0028243495, -0.0, 0.002950472033, -0.001411682043, 0.0, -0.002950472033, -0.001411682043]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.380406192274, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.2701916672,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06530131,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- -0.000531535533,
- 0.0,
- -0.000960201925,
- 0.000265767766,
- 0.0,
- 0.000960201925,
- 0.000265767766,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [
- 4.79582300e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.39791100e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.39791100e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.99657262e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.49828631e-01,
- 2.70680600e-01,
- 0.00000000e00,
- -3.49828631e-01,
- -2.70680600e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.58837997e-01,
- 0.00000000e00,
- 2.05924494e-01,
- -2.29418999e-01,
- 0.00000000e00,
- -2.05924494e-01,
- -2.29418999e-01,
- ],
- [
- -2.39791100e-04,
- 0.00000000e00,
- 0.00000000e00,
- 4.55295000e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.15503800e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.49828631e-01,
- 2.05924494e-01,
- 0.00000000e00,
- 3.80569607e-01,
- -2.38302547e-01,
- 0.00000000e00,
- -3.07409760e-02,
- 3.23780531e-02,
- ],
- [
- 0.00000000e00,
- 2.70680600e-01,
- -2.29418999e-01,
- 0.00000000e00,
- -2.38302547e-01,
- 2.19836556e-01,
- 0.00000000e00,
- -3.23780531e-02,
- 9.58244310e-03,
- ],
- [
- -2.39791100e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.15503800e-04,
- 0.00000000e00,
- 0.00000000e00,
- 4.55295000e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.49828631e-01,
- -2.05924494e-01,
- 0.00000000e00,
- -3.07409760e-02,
- -3.23780531e-02,
- 0.00000000e00,
- 3.80569607e-01,
- 2.38302547e-01,
- ],
- [
- 0.00000000e00,
- -2.70680600e-01,
- -2.29418999e-01,
- 0.00000000e00,
- 3.23780531e-02,
- 9.58244310e-03,
- 0.00000000e00,
- 2.38302547e-01,
- 2.19836556e-01,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.27294451, # fnocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.05952936, # fnocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.007003320116, 0.0, -0.004485227443, 0.003501660058, 0.0, 0.004485227443, 0.003501660058]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.27601976, # vcc
- "MP4(T) CORRECTION ENERGY": -0.007944754373, # vcc
- "CISD CORRELATION ENERGY": -0.26425382513286, # vcc
- "QCISD CORRELATION ENERGY": -0.27614913924585, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00704158, # vcc
- "REMP2 CORRELATION ENERGY": -0.276444865873, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.059323770883, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2786913134, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.057792990490, # fnocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.002309010869, 0.0, -0.0017745445, 0.001154505435, -0.0, 0.0017745445, 0.001154505435]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2808517417, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.058297242512, # fnocc
- "CEPA(1) CORRELATION ENERGY": -0.27639235, # fnocc
- "CEPA(1) SINGLES ENERGY": 0.0,
- "CEPA(1) SAME-SPIN CORRELATION ENERGY": -0.05761465, # fnocc
- "CEPA(3) CORRELATION ENERGY": -0.27334861, # fnocc
- "CEPA(3) SINGLES ENERGY": 0.0,
- "CEPA(3) SAME-SPIN CORRELATION ENERGY": -0.05710750, # fnocc
- "ACPF CORRELATION ENERGY": -0.27709825, # fnocc
- "ACPF SINGLES ENERGY": 0.0,
- "ACPF SAME-SPIN CORRELATION ENERGY": -0.05773653, # fnocc
- "AQCC CORRELATION ENERGY": -0.27396970, # fnocc
- "AQCC SINGLES ENERGY": 0.0,
- "AQCC SAME-SPIN CORRELATION ENERGY": -0.05725788, # fnocc
- "CCD CORRELATION ENERGY": -0.27417224324851, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.05767874, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc
- [[0.0, 0.0, -0.0047556235], [0.0, -0.0030400734, 0.0023778117], [0.0, 0.0030400734, 0.0023778117]]
- ),
- "CCD TOTAL HESSIAN": np.array( # vcc
- [
- [
- 4.29117820e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.14558910e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.14558910e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.94523343e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.47261672e-01,
- 2.67217473e-01,
- 0.00000000e00,
- -3.47261672e-01,
- -2.67217473e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.66482117e-01,
- 0.00000000e00,
- 2.04034191e-01,
- -2.33241059e-01,
- 0.00000000e00,
- -2.04034191e-01,
- -2.33241059e-01,
- ],
- [
- -2.14558910e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.13479200e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.07971000e-05,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.47261672e-01,
- 2.04034191e-01,
- 0.00000000e00,
- 3.79908779e-01,
- -2.35625839e-01,
- 0.00000000e00,
- -3.26471076e-02,
- 3.15916340e-02,
- ],
- [
- 0.00000000e00,
- 2.67217473e-01,
- -2.33241059e-01,
- 0.00000000e00,
- -2.35625839e-01,
- 2.21133541e-01,
- 0.00000000e00,
- -3.15916340e-02,
- 1.21075177e-02,
- ],
- [
- -2.14558910e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.07971000e-05,
- 0.00000000e00,
- 0.00000000e00,
- 2.13479200e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.47261672e-01,
- -2.04034191e-01,
- 0.00000000e00,
- -3.26471076e-02,
- -3.15916340e-02,
- 0.00000000e00,
- 3.79908779e-01,
- 2.35625839e-01,
- ],
- [
- 0.00000000e00,
- -2.67217473e-01,
- -2.33241059e-01,
- 0.00000000e00,
- 3.15916340e-02,
- 1.21075177e-02,
- 0.00000000e00,
- 2.35625839e-01,
- 2.21133541e-01,
- ],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.27532829, # ccenergy
- "CC2 CORRELATION ENERGY": -0.272546060672979, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.001726445285, 0.0, 0.000194402307, -0.000863222642, 0.0, -0.000194402307, -0.000863222642]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.275705491773,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.058006927914493,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- -0.003374258422,
- 0.0,
- -0.002334452569,
- 0.001687129211,
- 0.0,
- 0.002334452569,
- 0.001687129211,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [
- 3.04444750e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.52222380e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.52222380e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.92271308e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.46135654e-01,
- 2.66828227e-01,
- 0.00000000e00,
- -3.46135654e-01,
- -2.66828227e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.64211859e-01,
- 0.00000000e00,
- 2.03582577e-01,
- -2.32105930e-01,
- 0.00000000e00,
- -2.03582577e-01,
- -2.32105930e-01,
- ],
- [
- -1.52222380e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.57653820e-03,
- 0.00000000e00,
- 0.00000000e00,
- -5.43145000e-05,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.46135654e-01,
- 2.03582577e-01,
- 0.00000000e00,
- 3.78818316e-01,
- -2.35205402e-01,
- 0.00000000e00,
- -3.26826626e-02,
- 3.16228251e-02,
- ],
- [
- 0.00000000e00,
- 2.66828227e-01,
- -2.32105930e-01,
- 0.00000000e00,
- -2.35205402e-01,
- 2.20168635e-01,
- 0.00000000e00,
- -3.16228251e-02,
- 1.19372948e-02,
- ],
- [
- -1.52222380e-03,
- 0.00000000e00,
- 0.00000000e00,
- -5.43145000e-05,
- 0.00000000e00,
- 0.00000000e00,
- 1.57653820e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.46135654e-01,
- -2.03582577e-01,
- 0.00000000e00,
- -3.26826626e-02,
- -3.16228251e-02,
- 0.00000000e00,
- 3.78818316e-01,
- 2.35205402e-01,
- ],
- [
- 0.00000000e00,
- -2.66828227e-01,
- -2.32105930e-01,
- 0.00000000e00,
- 3.16228251e-02,
- 1.19372948e-02,
- 0.00000000e00,
- 2.35205402e-01,
- 2.20168635e-01,
- ],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.007532613647, # vcc
- "(T) CORRECTION ENERGY": -0.007263596331,
- "CCSD(T) TOTAL GRADIENT": np.array( # ncc fd
- [
- [0.00000000000000, 0.00000000000000, -0.00018184005110],
- [0.00000000000000, -0.00073407755645, 0.00009092002555],
- [0.00000000000000, 0.00073407755645, 0.00009092002555],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # ncc fd
- [
- [0.000164043137, 0.0, 0.0, -0.000082021569, 0.0, 0.0, -0.000082021569, 0.0, 0.0],
- [
- 0.0,
- 0.690399868053,
- 0.0,
- 0.0,
- -0.345199934026,
- 0.26721874523,
- 0.0,
- -0.345199934026,
- -0.26721874523,
- ],
- [
- 0.0,
- 0.0,
- 0.459903012519,
- 0.0,
- 0.203684212528,
- -0.229951506259,
- 0.0,
- -0.203684212528,
- -0.229951506259,
- ],
- [-0.000082021569, 0.0, 0.0, 0.000297412235, 0.0, 0.0, -0.000215390667, 0.0, 0.0],
- [
- 0.0,
- -0.345199934026,
- 0.203684212528,
- 0.0,
- 0.377546525502,
- -0.235451478879,
- 0.0,
- -0.032346591476,
- 0.031767266351,
- ],
- [
- 0.0,
- 0.26721874523,
- -0.229951506259,
- 0.0,
- -0.235451478879,
- 0.218683624079,
- 0.0,
- -0.031767266351,
- 0.011267882181,
- ],
- [-0.000082021569, 0.0, 0.0, -0.000215390667, 0.0, 0.0, 0.000297412235, 0.0, 0.0],
- [
- 0.0,
- -0.345199934026,
- -0.203684212528,
- 0.0,
- -0.032346591476,
- -0.031767266351,
- 0.0,
- 0.377546525502,
- 0.235451478879,
- ],
- [
- 0.0,
- -0.26721874523,
- -0.229951506259,
- 0.0,
- 0.031767266351,
- 0.011267882181,
- 0.0,
- 0.235451478879,
- 0.218683624079,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.007181434345419, # ncc
- "A-CCSD(T) TOTAL GRADIENT": np.array( # ncc
- [
- [0.000000000000000, 0.000000000000000, -0.000263235380777],
- [0.000000000000000, -0.000769830346953, 0.000131617690376],
- [0.000000000000000, 0.000769830346953, 0.000131617690376],
- ]
- ),
- "B(T) CORRECTION ENERGY": -0.00766044, # ccenergy
- "CC3 CORRELATION ENERGY": -0.283326604729141, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.283301014194, # ecc
- "CCSDT-1A TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.00003469032178],
- [0.00000000000000, -0.00061071465370, -0.00001734516089],
- [0.00000000000000, 0.00061071465370, -0.00001734516089],
- ]
- ),
- "CCSDT-1A TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.000031470364, 0.0, 0.0, 0.000015735182, 0.0, 0.0, 0.000015735182, 0.0, 0.0],
- [
- 0.0,
- 0.690357139667,
- 0.0,
- 0.0,
- -0.345178569834,
- 0.267277548335,
- 0.0,
- -0.345178569834,
- -0.267277548335,
- ],
- [
- 0.0,
- 0.0,
- 0.459591068441,
- 0.0,
- 0.203726352234,
- -0.229795534221,
- 0.0,
- -0.203726352234,
- -0.229795534221,
- ],
- [0.000015735182, 0.0, 0.0, 0.000205401177, 0.0, 0.0, -0.000221136359, 0.0, 0.0],
- [
- 0.0,
- -0.345178569834,
- 0.203726352234,
- 0.0,
- 0.377473575693,
- -0.235501950285,
- 0.0,
- -0.03229500586,
- 0.031775598051,
- ],
- [
- 0.0,
- 0.267277548335,
- -0.229795534221,
- 0.0,
- -0.235501950285,
- 0.218585504687,
- 0.0,
- -0.031775598051,
- 0.011210029534,
- ],
- [0.000015735182, 0.0, 0.0, -0.000221136359, 0.0, 0.0, 0.000205401177, 0.0, 0.0],
- [
- 0.0,
- -0.345178569834,
- -0.203726352234,
- 0.0,
- -0.03229500586,
- -0.031775598051,
- 0.0,
- 0.377473575693,
- 0.235501950285,
- ],
- [
- 0.0,
- -0.267277548335,
- -0.229795534221,
- 0.0,
- 0.031775598051,
- 0.011210029534,
- 0.0,
- 0.235501950285,
- 0.218585504687,
- ],
- ]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.283304708235, # ecc
- "CCSDT-1B TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.00003781932904],
- [0.00000000000000, -0.00060845267210, -0.00001890966452],
- [0.00000000000000, 0.00060845267210, -0.00001890966452],
- ]
- ),
- "CCSDT-1B TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.000034308612, 0.0, 0.0, 0.000017154306, 0.0, 0.0, 0.000017154306, 0.0, 0.0],
- [
- 0.0,
- 0.69034722208,
- 0.0,
- 0.0,
- -0.34517361104,
- 0.267274828449,
- 0.0,
- -0.34517361104,
- -0.267274828449,
- ],
- [
- 0.0,
- 0.0,
- 0.459575612743,
- 0.0,
- 0.203725689988,
- -0.229787806371,
- 0.0,
- -0.203725689988,
- -0.229787806371,
- ],
- [0.000017154306, 0.0, 0.0, 0.000203904093, 0.0, 0.0, -0.000221058399, 0.0, 0.0],
- [
- 0.0,
- -0.34517361104,
- 0.203725689988,
- 0.0,
- 0.377466284086,
- -0.235500259218,
- 0.0,
- -0.032292673046,
- 0.03177456923,
- ],
- [
- 0.0,
- 0.267274828449,
- -0.229787806371,
- 0.0,
- -0.235500259218,
- 0.218579787679,
- 0.0,
- -0.03177456923,
- 0.011208018692,
- ],
- [0.000017154306, 0.0, 0.0, -0.000221058399, 0.0, 0.0, 0.000203904093, 0.0, 0.0],
- [
- 0.0,
- -0.34517361104,
- -0.203725689988,
- 0.0,
- -0.032292673046,
- -0.03177456923,
- 0.0,
- 0.377466284086,
- 0.235500259218,
- ],
- [
- 0.0,
- -0.267274828449,
- -0.229787806371,
- 0.0,
- 0.03177456923,
- 0.011208018692,
- 0.0,
- 0.235500259218,
- 0.218579787679,
- ],
- ]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.282650715222, # ecc
- "CCSDT-2 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, -0.00033837753770],
- [0.00000000000000, -0.00081713978219, 0.00016918876885],
- [0.00000000000000, 0.00081713978219, 0.00016918876885],
- ]
- ),
- "CCSDT-2 TOTAL HESSIAN": np.array( # ecc by psi fd
- [
- [0.000305098093, 0.0, 0.0, -0.000152549047, 0.0, 0.0, -0.000152549047, 0.0, 0.0],
- [
- 0.0,
- 0.690395599827,
- 0.0,
- 0.0,
- -0.345197799913,
- 0.267162476654,
- 0.0,
- -0.345197799913,
- -0.267162476654,
- ],
- [
- 0.0,
- 0.0,
- 0.460115900113,
- 0.0,
- 0.203699000404,
- -0.230057950057,
- 0.0,
- -0.203699000404,
- -0.230057950057,
- ],
- [-0.000152549047, 0.0, 0.0, 0.000361653884, 0.0, 0.0, -0.000209104837, 0.0, 0.0],
- [
- 0.0,
- -0.345197799913,
- 0.203699000404,
- 0.0,
- 0.377579483066,
- -0.235430738529,
- 0.0,
- -0.032381683152,
- 0.031731738125,
- ],
- [
- 0.0,
- 0.267162476654,
- -0.230057950057,
- 0.0,
- -0.235430738529,
- 0.218744030684,
- 0.0,
- -0.031731738125,
- 0.011313919373,
- ],
- [-0.000152549047, 0.0, 0.0, -0.000209104837, 0.0, 0.0, 0.000361653884, 0.0, 0.0],
- [
- 0.0,
- -0.345197799913,
- -0.203699000404,
- 0.0,
- -0.032381683152,
- -0.031731738125,
- 0.0,
- 0.377579483066,
- 0.235430738529,
- ],
- [
- 0.0,
- -0.267162476654,
- -0.230057950057,
- 0.0,
- 0.031731738125,
- 0.011313919373,
- 0.0,
- 0.235430738529,
- 0.218744030684,
- ],
- ]
- ),
- "CCSDT-3 CORRELATION ENERGY": -0.28267436870285, # vcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, -0.00031801749656],
- [0.00000000000000, -0.00080724235455, 0.00015900874828],
- [0.00000000000000, 0.00080724235455, 0.00015900874828],
- ]
- ),
- "CCSDT-3 TOTAL HESSIAN": np.array( # mrcc
- [
- [
- 2.86755305e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.43377653e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.43377653e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.90367936e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.45183968e-01,
- 2.67158588e-01,
- 0.00000000e00,
- -3.45183968e-01,
- -2.67158588e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.60092567e-01,
- 0.00000000e00,
- 2.03699151e-01,
- -2.30046284e-01,
- 0.00000000e00,
- -2.03699151e-01,
- -2.30046284e-01,
- ],
- [
- -1.43377653e-04,
- 0.00000000e00,
- 0.00000000e00,
- 3.53604923e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.10227270e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45183968e-01,
- 2.03699151e-01,
- 0.00000000e00,
- 3.77567061e-01,
- -2.35428870e-01,
- 0.00000000e00,
- -3.23830932e-02,
- 3.17297185e-02,
- ],
- [
- 0.00000000e00,
- 2.67158588e-01,
- -2.30046284e-01,
- 0.00000000e00,
- -2.35428870e-01,
- 2.18733436e-01,
- 0.00000000e00,
- -3.17297185e-02,
- 1.13128480e-02,
- ],
- [
- -1.43377653e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.10227270e-04,
- 0.00000000e00,
- 0.00000000e00,
- 3.53604923e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45183968e-01,
- -2.03699151e-01,
- 0.00000000e00,
- -3.23830932e-02,
- -3.17297185e-02,
- 0.00000000e00,
- 3.77567061e-01,
- 2.35428870e-01,
- ],
- [
- 0.00000000e00,
- -2.67158588e-01,
- -2.30046284e-01,
- 0.00000000e00,
- 3.17297185e-02,
- 1.13128480e-02,
- 0.00000000e00,
- 2.35428870e-01,
- 2.18733436e-01,
- ],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.283033246143265, # ncc
- "CCSDT TOTAL GRADIENT": np.array(
- [
- 0.000000000000000,
- 0.000000000000000,
- -0.000217363788816,
- 0.000000000000000,
- -0.000742442561705,
- 0.000108681894407,
- 0.000000000000000,
- 0.000742442561705,
- 0.000108681894407,
- ]
- ).reshape((-1, 3)),
- "CCSDT TOTAL HESSIAN": np.array( # ecc
- [
- [
- 1.96117400e-04,
- 0.00000000e00,
- 0.00000000e00,
- -9.80587000e-05,
- 0.00000000e00,
- 0.00000000e00,
- -9.80587000e-05,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.90148921e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.45074461e-01,
- 2.67109270e-01,
- 0.00000000e00,
- -3.45074461e-01,
- -2.67109270e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.60001543e-01,
- 0.00000000e00,
- 2.03664977e-01,
- -2.30000771e-01,
- 0.00000000e00,
- -2.03664977e-01,
- -2.30000771e-01,
- ],
- [
- -9.80587000e-05,
- 0.00000000e00,
- 0.00000000e00,
- 3.08365200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.10306500e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45074461e-01,
- 2.03664977e-01,
- 0.00000000e00,
- 3.77473316e-01,
- -2.35387123e-01,
- 0.00000000e00,
- -3.23988558e-02,
- 3.17221463e-02,
- ],
- [
- 0.00000000e00,
- 2.67109270e-01,
- -2.30000771e-01,
- 0.00000000e00,
- -2.35387123e-01,
- 2.18668768e-01,
- 0.00000000e00,
- -3.17221463e-02,
- 1.13320029e-02,
- ],
- [
- -9.80587000e-05,
- 0.00000000e00,
- 0.00000000e00,
- -2.10306500e-04,
- 0.00000000e00,
- 0.00000000e00,
- 3.08365200e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45074461e-01,
- -2.03664977e-01,
- 0.00000000e00,
- -3.23988558e-02,
- -3.17221463e-02,
- 0.00000000e00,
- 3.77473316e-01,
- 2.35387123e-01,
- ],
- [
- 0.00000000e00,
- -2.67109270e-01,
- -2.30000771e-01,
- 0.00000000e00,
- 3.17221463e-02,
- 1.13320029e-02,
- 0.00000000e00,
- 2.35387123e-01,
- 2.18668768e-01,
- ],
- ]
- ),
- "[Q] CORRECTION ENERGY": -0.000163881984112, # ncc
- "(Q) CORRECTION ENERGY": -0.000383414612913, # ncc
- "CCSDT(Q) TOTAL GRADIENT": np.array(
- [
- 0.000000000000000,
- 0.000000000000000,
- 0.000216022413761,
- 0.000000000000000,
- -0.000511432746023,
- -0.000108011206892,
- 0.000000000000000,
- 0.000511432746023,
- -0.000108011206892,
- ]
- ).reshape((-1, 3)),
- "CCSDTQ CORRELATION ENERGY": -0.283376955140291, # ncc
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002513901693, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.272599646070, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.066843168345, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.001853244534,
- 0.0,
- 0.000249902550,
- -0.000926622267,
- 0.0,
- -0.000249902550,
- -0.000926622267,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001691543451, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.273211228305, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.063331759367, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- -0.002291101232,
- 0.0,
- -0.001990147396,
- 0.001145550616,
- 0.0,
- 0.001990147396,
- 0.001145550616,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001090059672, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.274015056808, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.059986220382, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- -0.006148152213,
- 0.0,
- -0.004066707268,
- 0.003074076107,
- 0.0,
- 0.004066707268,
- 0.003074076107,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001444328268, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.277848169449, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.059932090515, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- -0.001616411571,
- 0.0,
- -0.001508635375,
- 0.000808205786,
- 0.0,
- 0.001508635375,
- 0.000808205786,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0013521561, # p4n
- "OLCCD CORRELATION ENERGY": -0.2800053174, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0582676514, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [0.0, 0.0, -0.001040099489, 0.0, -0.001127979233, 0.000520049745, -0.0, 0.001127979233, 0.000520049745]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.001279242, # qchem
- "OCCD CORRELATION ENERGY": -0.275418269, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, -0.00363692, 0, -0.00246929, 0.00181846, 0, 0.00246929, 0.00181846]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "SVWN TOTAL ENERGY": -76.10229674046080, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.01116011934, -0.0, 0.009507405365, -0.005580350828, 0.0, -0.009507405365, -0.005580350828]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.8 99,590
- [
- -0.010015602973,
- -0.000000000001,
- 0.000000000002,
- 0.005034918743,
- 0.0,
- -0.0,
- 0.005034918743,
- -0.0,
- 0.0,
- -0.000000000001,
- 0.699200093422,
- -0.000000000002,
- -0.0,
- -0.349611743856,
- 0.274596771974,
- -0.0,
- -0.349611743856,
- -0.274596771974,
- 0.000000000002,
- -0.000000000002,
- 0.449624843917,
- -0.0,
- 0.216250731357,
- -0.224817271283,
- -0.0,
- -0.216250731357,
- -0.224817271283,
- 0.005034918743,
- -0.0,
- -0.0,
- -0.005839372129,
- -0.0,
- 0.0,
- 0.000803489613,
- 0.0,
- 0.0,
- 0.0,
- -0.349611743856,
- 0.216250731357,
- -0.0,
- 0.379671911068,
- -0.245424063175,
- 0.0,
- -0.030060195243,
- 0.029173021276,
- -0.0,
- 0.274596771974,
- -0.224817271283,
- 0.0,
- -0.245424063175,
- 0.215395274362,
- 0.0,
- -0.029173021276,
- 0.009421810131,
- 0.005034918743,
- -0.0,
- -0.0,
- 0.000803489613,
- 0.0,
- 0.0,
- -0.005839372129,
- 0.0,
- -0.0,
- -0.0,
- -0.349611743856,
- -0.216250731357,
- 0.0,
- -0.030060195243,
- -0.029173021276,
- 0.0,
- 0.379671911068,
- 0.245424063175,
- 0.0,
- -0.274596771974,
- -0.224817271283,
- 0.0,
- 0.029173021276,
- 0.009421810131,
- -0.0,
- 0.245424063175,
- 0.215395274362,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -76.38209089347507, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-0.000000000000, -0.000000000000, 0.012770562551],
- [-0.000000000000, 0.008604125876, -0.006385673964],
- [0.000000000000, -0.008604125876, -0.006385673964],
- ]
- ),
- "B3LYP TOTAL ENERGY": -76.4684173811156711, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.00000000e00, 1.57772181e-30, 2.02268338e-03],
- [-9.31840056e-20, 3.04362060e-03, -1.01162676e-03],
- [9.31840056e-20, -3.04362060e-03, -1.01162676e-03],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -76.43134091764595, # psi 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-7.88860905e-31, 7.88860905e-31, 2.30650526e-03],
- [-9.91741439e-20, 3.23927336e-03, -1.15353738e-03],
- [9.91741439e-20, -3.23927336e-03, -1.15353738e-03],
- ]
- ),
- "WB97X TOTAL ENERGY": -76.44423395697297, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, 0.0, -0.002561607305, 0.0, -0.000034257733, 0.00128137288, -0.0, 0.000034257733, 0.00128137288]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.416806713650, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.05948928003552,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001918693775,
- "MP2 TOTAL GRADIENT": np.array(
- [ # occ findif-5 ae pk+conv
- 0.00000000000000,
- 0.00000000000000,
- 0.01250561195911,
- 0.00000000000000,
- 0.00000000000000,
- -0.01206536529299,
- 0.00000000000000,
- 0.01033165380573,
- -0.00022012333306,
- 0.00000000000000,
- -0.01033165380573,
- -0.00022012333306,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [
- 3.44512200e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.01573440e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.85306200e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.85306200e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 3.35480990e-03,
- 0.00000000e00,
- 0.00000000e00,
- -3.87467360e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.59931900e-04,
- 4.32569100e-04,
- 0.00000000e00,
- 2.59931900e-04,
- -4.32569100e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.15837144e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.13789867e-01,
- 0.00000000e00,
- 1.11748040e-03,
- -1.02363850e-03,
- 0.00000000e00,
- -1.11748040e-03,
- -1.02363850e-03,
- ],
- [
- -4.01573440e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.35926330e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.71764400e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.71764400e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.87467360e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.27499890e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.00162700e-04,
- 8.11818000e-05,
- 0.00000000e00,
- -2.00162700e-04,
- -8.11818000e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.13789867e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.13964588e-01,
- 0.00000000e00,
- 1.98755000e-05,
- -8.73610000e-05,
- 0.00000000e00,
- -1.98755000e-05,
- -8.73610000e-05,
- ],
- [
- 2.85306200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.71764400e-04,
- 0.00000000e00,
- 0.00000000e00,
- -7.41535090e-03,
- 0.00000000e00,
- 0.00000000e00,
- 7.30180910e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.59931900e-04,
- 1.11748040e-03,
- 0.00000000e00,
- -2.00162700e-04,
- 1.98755000e-05,
- 0.00000000e00,
- 4.11358061e-01,
- -8.25553300e-04,
- 0.00000000e00,
- -4.11417830e-01,
- -3.11802500e-04,
- ],
- [
- 0.00000000e00,
- 4.32569100e-04,
- -1.02363850e-03,
- 0.00000000e00,
- 8.11818000e-05,
- -8.73610000e-05,
- 0.00000000e00,
- -8.25553300e-04,
- -4.66526560e-03,
- 0.00000000e00,
- 3.11802500e-04,
- 5.77626520e-03,
- ],
- [
- 2.85306200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.71764400e-04,
- 0.00000000e00,
- 0.00000000e00,
- 7.30180910e-03,
- 0.00000000e00,
- 0.00000000e00,
- -7.41535090e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.59931900e-04,
- -1.11748040e-03,
- 0.00000000e00,
- -2.00162700e-04,
- -1.98755000e-05,
- 0.00000000e00,
- -4.11417830e-01,
- 3.11802500e-04,
- 0.00000000e00,
- 4.11358061e-01,
- 8.25553300e-04,
- ],
- [
- 0.00000000e00,
- -4.32569100e-04,
- -1.02363850e-03,
- 0.00000000e00,
- -8.11818000e-05,
- -8.73610000e-05,
- 0.00000000e00,
- -3.11802500e-04,
- 5.77626520e-03,
- 0.00000000e00,
- 8.25553300e-04,
- -4.66526560e-03,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.07481556, # occ
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00235692, # occ
- "MP3 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.0093167821,
- 0.0,
- 0.0,
- -0.00908998793,
- 0.0,
- 0.012725715572,
- -0.000113397085,
- 0.0,
- -0.012725715572,
- -0.000113397085,
- ]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.07927852, # vcc only
- "MP4(T) CORRECTION ENERGY": -0.000248958942, # vcc only
- "CISD CORRELATION ENERGY": -0.08014448073265, # vcc
- "QCISD CORRELATION ENERGY": -0.08218197897917, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00062359, # vcc only
- "REMP2 CORRELATION ENERGY": -0.07803997531851, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.00233934205346, # occ, tight
- "LCCD CORRELATION ENERGY": -0.0834347185, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0024003297, # occ
- "LCCD TOTAL GRADIENT": np.array(
- [
- -0.0,
- 0.0,
- 0.004644430473,
- 0.0,
- 0.0,
- -0.004561891704,
- -0.0,
- 0.015262723486,
- -0.000041269384,
- 0.0,
- -0.015262723486,
- -0.000041269384,
- ]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.0848110820, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.0024351, # vcc
- "CCD CORRELATION ENERGY": -0.08113776652663, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.00235010, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc
- [
- [0.0, 0.0, 0.0064056106],
- [0.0, 0.0, -0.0062159539],
- [0.0, 0.0144496921, -0.0000948283],
- [0.0, -0.0144496921, -0.0000948283],
- ]
- ),
- "CCD TOTAL HESSIAN": np.array( # vcc
- [
- [
- 1.21745460e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.67345390e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.27999700e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.27999700e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.18297710e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.56709910e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.92061000e-04,
- 4.57116300e-04,
- 0.00000000e00,
- 1.92061000e-04,
- -4.57116300e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.08191655e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.06455377e-01,
- 0.00000000e00,
- 1.17641080e-03,
- -8.68139000e-04,
- 0.00000000e00,
- -1.17641080e-03,
- -8.68139000e-04,
- ],
- [
- -1.67345390e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.96873420e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.47647400e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.47647400e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -1.56709910e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.90289150e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.67896600e-04,
- 4.83546000e-05,
- 0.00000000e00,
- -1.67896600e-04,
- -4.83546000e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.06455377e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.06585356e-01,
- 0.00000000e00,
- 1.26821500e-04,
- -6.49859000e-05,
- 0.00000000e00,
- -1.26821500e-04,
- -6.49859000e-05,
- ],
- [
- 2.27999700e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.47647400e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.03317422e-02,
- 0.00000000e00,
- 0.00000000e00,
- 1.02513900e-02,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.92061000e-04,
- 1.17641080e-03,
- 0.00000000e00,
- -1.67896600e-04,
- 1.26821500e-04,
- 0.00000000e00,
- 4.08407145e-01,
- -9.04348400e-04,
- 0.00000000e00,
- -4.08431309e-01,
- -3.98877500e-04,
- ],
- [
- 0.00000000e00,
- 4.57116300e-04,
- -8.68139000e-04,
- 0.00000000e00,
- 4.83546000e-05,
- -6.49859000e-05,
- 0.00000000e00,
- -9.04348400e-04,
- -7.77410400e-03,
- 0.00000000e00,
- 3.98877500e-04,
- 8.70722880e-03,
- ],
- [
- 2.27999700e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.47647400e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.02513900e-02,
- 0.00000000e00,
- 0.00000000e00,
- -1.03317422e-02,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.92061000e-04,
- -1.17641080e-03,
- 0.00000000e00,
- -1.67896600e-04,
- -1.26821500e-04,
- 0.00000000e00,
- -4.08431309e-01,
- 3.98877500e-04,
- 0.00000000e00,
- 4.08407145e-01,
- 9.04348400e-04,
- ],
- [
- 0.00000000e00,
- -4.57116300e-04,
- -8.68139000e-04,
- 0.00000000e00,
- -4.83546000e-05,
- -6.49859000e-05,
- 0.00000000e00,
- -3.98877500e-04,
- 8.70722880e-03,
- 0.00000000e00,
- 9.04348400e-04,
- -7.77410400e-03,
- ],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.08217317, # ccenergy
- "CC2 CORRELATION ENERGY": -0.059830885446002, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [
- 0.0,
- 0.0,
- 0.012101218207,
- 0.0,
- 0.0,
- -0.011694433668,
- 0.0,
- 0.010554775214,
- -0.000203392269,
- 0.0,
- -0.010554775214,
- -0.000203392269,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08217287869,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.002377557359,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.005209606766,
- 0.0,
- 0.0,
- -0.005071403517,
- 0.0,
- 0.014880198292,
- -0.000069101625,
- 0.0,
- -0.014880198292,
- -0.000069101625,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [
- 7.74047000e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.20954470e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.17748900e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.17748900e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.31670700e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.10104560e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.84687400e-04,
- 4.38316100e-04,
- 0.00000000e00,
- 1.84687400e-04,
- -4.38316100e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.06125475e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.04450486e-01,
- 0.00000000e00,
- 1.15794910e-03,
- -8.37494800e-04,
- 0.00000000e00,
- -1.15794910e-03,
- -8.37494800e-04,
- ],
- [
- -1.20954470e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.49705710e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.43756200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.43756200e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -1.10104560e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.43042210e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.64688300e-04,
- 5.23087000e-05,
- 0.00000000e00,
- -1.64688300e-04,
- -5.23087000e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.04450486e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.04563594e-01,
- 0.00000000e00,
- 1.62442000e-04,
- -5.65541000e-05,
- 0.00000000e00,
- -1.62442000e-04,
- -5.65541000e-05,
- ],
- [
- 2.17748900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.43756200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.06352124e-02,
- 0.00000000e00,
- 0.00000000e00,
- 1.05612197e-02,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.84687400e-04,
- 1.15794910e-03,
- 0.00000000e00,
- -1.64688300e-04,
- 1.62442000e-04,
- 0.00000000e00,
- 4.07393462e-01,
- -9.05508000e-04,
- 0.00000000e00,
- -4.07413462e-01,
- -4.14883200e-04,
- ],
- [
- 0.00000000e00,
- 4.38316100e-04,
- -8.37494800e-04,
- 0.00000000e00,
- 5.23087000e-05,
- -5.65541000e-05,
- 0.00000000e00,
- -9.05508000e-04,
- -8.15157550e-03,
- 0.00000000e00,
- 4.14883200e-04,
- 9.04562440e-03,
- ],
- [
- 2.17748900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.43756200e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.05612197e-02,
- 0.00000000e00,
- 0.00000000e00,
- -1.06352124e-02,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.84687400e-04,
- -1.15794910e-03,
- 0.00000000e00,
- -1.64688300e-04,
- -1.62442000e-04,
- 0.00000000e00,
- -4.07413462e-01,
- 4.14883200e-04,
- 0.00000000e00,
- 4.07393462e-01,
- 9.05508000e-04,
- ],
- [
- 0.00000000e00,
- -4.38316100e-04,
- -8.37494800e-04,
- 0.00000000e00,
- -5.23087000e-05,
- -5.65541000e-05,
- 0.00000000e00,
- -4.14883200e-04,
- 9.04562440e-03,
- 0.00000000e00,
- 9.05508000e-04,
- -8.15157550e-03,
- ],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.000630302926, # vcc
- "(T) CORRECTION ENERGY": -0.00062614,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.00469857108970],
- [0.00000000000000, 0.00000000000000, -0.00464327797336],
- [0.00000000000000, 0.01496002471717, -0.00002764655817],
- [0.00000000000000, -0.01496002471717, -0.00002764655817],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # vcc fd
- [
- [
- 0.000605645748,
- 0.0,
- 0.0,
- -0.001025922218,
- 0.0,
- 0.0,
- 0.000210138235,
- 0.0,
- 0.0,
- 0.000210138235,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.000566396166,
- 0.0,
- 0.0,
- -0.000920471148,
- 0.0,
- 0.0,
- 0.000177037491,
- 0.000434687941,
- 0.0,
- 0.000177037491,
- -0.000434687941,
- ],
- [
- 0.0,
- 0.0,
- 0.205974349398,
- 0.0,
- 0.0,
- -0.20443915744,
- 0.0,
- 0.001282151675,
- -0.000767595979,
- 0.0,
- -0.001282151675,
- -0.000767595979,
- ],
- [
- -0.001025922218,
- 0.0,
- 0.0,
- 0.001313504777,
- 0.0,
- 0.0,
- -0.000143791279,
- 0.0,
- 0.0,
- -0.000143791279,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.000920471148,
- 0.0,
- 0.0,
- 0.001248510511,
- 0.0,
- 0.0,
- -0.000164019682,
- 0.000048912565,
- 0.0,
- -0.000164019682,
- -0.000048912565,
- ],
- [
- 0.0,
- 0.0,
- -0.20443915744,
- 0.0,
- 0.0,
- 0.204583205785,
- 0.0,
- 0.000137691376,
- -0.000072024172,
- 0.0,
- -0.000137691376,
- -0.000072024172,
- ],
- [
- 0.000210138235,
- 0.0,
- 0.0,
- -0.000143791279,
- 0.0,
- 0.0,
- -0.010688228885,
- 0.0,
- 0.0,
- 0.01062188193,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.000177037491,
- 0.001282151675,
- 0.0,
- -0.000164019682,
- 0.000137691376,
- 0.0,
- 0.407323404956,
- -0.000951721779,
- 0.0,
- -0.407336422766,
- -0.000468121273,
- ],
- [
- 0.0,
- 0.000434687941,
- -0.000767595979,
- 0.0,
- 0.000048912565,
- -0.000072024172,
- 0.0,
- -0.000951721779,
- -0.008268538433,
- 0.0,
- 0.000468121273,
- 0.009108158584,
- ],
- [
- 0.000210138235,
- 0.0,
- 0.0,
- -0.000143791279,
- 0.0,
- 0.0,
- 0.01062188193,
- 0.0,
- 0.0,
- -0.010688228885,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.000177037491,
- -0.001282151675,
- 0.0,
- -0.000164019682,
- -0.000137691376,
- 0.0,
- -0.407336422766,
- 0.000468121273,
- 0.0,
- 0.407323404956,
- 0.000951721779,
- ],
- [
- 0.0,
- -0.000434687941,
- -0.000767595979,
- 0.0,
- -0.000048912565,
- -0.000072024172,
- 0.0,
- -0.000468121273,
- 0.009108158584,
- 0.0,
- 0.000951721779,
- -0.008268538433,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.000609324, # mrcc only
- "B(T) CORRECTION ENERGY": -0.00063370, # ccenergy
- "CC3 CORRELATION ENERGY": -0.082800948490126, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.082798380297, # ecc
- "CCSDT-1B CORRELATION ENERGY": -0.082796300732, # ecc
- "CCSDT-2 CORRELATION ENERGY": -0.082795702684, # ecc
- "CCSDT-3 CORRELATION ENERGY": -0.08280038799307, # vcc
- "CCSDT CORRELATION ENERGY": -0.08311156413461, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000395359637, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.059864579866, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001971155898, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.012017558262,
- 0.0,
- 0.000000000000,
- -0.011623172725,
- 0.0,
- 0.010549443964,
- -0.000197192768,
- 0.0,
- -0.010549443964,
- -0.000197192768,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000564671059, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.067680196985, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002198682496, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.010260851431,
- 0.0,
- 0.000000000000,
- -0.009981279417,
- 0.0,
- 0.011818192519,
- -0.000139786007,
- 0.0,
- -0.011818192519,
- -0.000139786007,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000777674538, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.075531256945, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002426022161, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.008456348171,
- 0.0,
- 0.000000000000,
- -0.008291902042,
- 0.0,
- 0.013097750811,
- -0.000082223065,
- 0.0,
- -0.013097750811,
- -0.000082223065,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001061018532, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.078996001732, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.002398210306, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.005898073051,
- 0.0,
- 0.000000000000,
- -0.005790147152,
- 0.0,
- 0.014384641403,
- -0.000053962950,
- 0.0,
- -0.014384641403,
- -0.000053962950,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0014842084, # p4n
- "OLCCD CORRELATION ENERGY": -0.0847413506, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0024486744, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [
- 0.0,
- 0.0,
- 0.002952428656,
- 0.0,
- 0.0,
- -0.002937832654,
- -0.0,
- 0.015746258127,
- -0.000007298001,
- 0.0,
- -0.015746258127,
- -0.000007298001,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.001165795, # qchem
- "OCCD CORRELATION ENERGY": -0.082188930, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, 0.00520110, 0, 0, -0.00505850, 0.0, 0.01487527, -0.00007130, 0.0, -0.01487527, -0.00007130]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "SVWN TOTAL ENERGY": -25.88281835226915, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [
- 0.0,
- -0.0,
- -0.007517701008,
- 0.0,
- -0.0,
- 0.00226814353,
- -0.0,
- 0.036127961709,
- 0.002624776187,
- 0.0,
- -0.036127961709,
- 0.002624776187,
- ]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi 99,590, findif-5
- [
- -0.001865509938,
- 0.0,
- 0.0,
- 0.002269947766,
- 0.0,
- 0.0,
- -0.000202218914,
- 0.0,
- 0.0,
- -0.000202218914,
- 0.0,
- 0.0,
- 0.0,
- -0.002096501204,
- 0.0,
- 0.0,
- 0.002406884872,
- 0.0,
- 0.0,
- -0.000155191834,
- -0.000138790593,
- 0.0,
- -0.000155191834,
- 0.000138790593,
- 0.0,
- 0.0,
- 0.209856775843,
- 0.0,
- 0.0,
- -0.211646788845,
- 0.0,
- 0.003612344032,
- 0.000895006501,
- 0.0,
- -0.003612344032,
- 0.000895006501,
- 0.002269947766,
- 0.0,
- 0.0,
- -0.001881222548,
- 0.0,
- 0.0,
- -0.000194362609,
- 0.0,
- 0.0,
- -0.000194362609,
- 0.0,
- 0.0,
- 0.0,
- 0.002406884872,
- 0.0,
- 0.0,
- -0.00196262459,
- 0.0,
- 0.0,
- -0.000222130141,
- 0.000081041368,
- 0.0,
- -0.000222130141,
- -0.000081041368,
- 0.0,
- 0.0,
- -0.211646788845,
- 0.0,
- 0.0,
- 0.211526661243,
- 0.0,
- 0.000036018441,
- 0.000060063801,
- 0.0,
- -0.000036018441,
- 0.000060063801,
- -0.000202218914,
- 0.0,
- 0.0,
- -0.000194362609,
- 0.0,
- 0.0,
- -0.025533348395,
- 0.0,
- 0.0,
- 0.025929929918,
- 0.0,
- 0.0,
- 0.0,
- -0.000155191834,
- 0.003612344032,
- 0.0,
- -0.000222130141,
- 0.000036018441,
- 0.0,
- 0.408474646099,
- -0.001795306624,
- 0.0,
- -0.408097324124,
- -0.001853055849,
- 0.0,
- -0.000138790593,
- 0.000895006501,
- 0.0,
- 0.000081041368,
- 0.000060063801,
- 0.0,
- -0.001795306624,
- -0.026299434591,
- 0.0,
- 0.001853055849,
- 0.025344364289,
- -0.000202218914,
- 0.0,
- 0.0,
- -0.000194362609,
- 0.0,
- 0.0,
- 0.025929929918,
- 0.0,
- 0.0,
- -0.025533348395,
- 0.0,
- 0.0,
- 0.0,
- -0.000155191834,
- -0.003612344032,
- 0.0,
- -0.000222130141,
- -0.000036018441,
- 0.0,
- -0.408097324124,
- 0.001853055849,
- 0.0,
- 0.408474646099,
- 0.001795306624,
- 0.0,
- 0.000138790593,
- 0.000895006501,
- 0.0,
- -0.000081041368,
- 0.000060063801,
- 0.0,
- -0.001853055849,
- 0.025344364289,
- 0.0,
- 0.001795306624,
- -0.026299434591,
- ]
- ).reshape((12, 12)),
- "PBE TOTAL ENERGY": -26.04681636799003, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-0.000000000000, -0.000000000000, -0.002915908298],
- [0.000000000000, 0.000000000000, -0.000179663088],
- [-0.000000000000, 0.026137498638, 0.001547791345],
- [0.000000000000, -0.026137498638, 0.001547791345],
- ]
- ),
- "B3LYP TOTAL ENERGY": -26.1140057832643038, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [
- [1.97215226e-31, 0.00000000e00, 3.32365409e-03],
- [0.00000000e00, -1.05926147e-32, -5.83320285e-03],
- [-5.87137508e-19, 1.91773664e-02, 1.25496529e-03],
- [5.87137508e-19, -1.91773664e-02, 1.25496529e-03],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -26.0893142594464784, # psi 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.00000000e00, 9.86076132e-31, 3.05278616e-03],
- [1.23259516e-32, 0.00000000e00, -5.57401307e-03],
- [-5.95843028e-19, 1.94617102e-02, 1.26080391e-03],
- [5.95843028e-19, -1.94617102e-02, 1.26080391e-03],
- ]
- ),
- "WB97X TOTAL ENERGY": -26.09949538872584, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [
- 0.0,
- 0.0,
- 0.003387202757,
- 0.0,
- -0.0,
- -0.006573452287,
- -0.0,
- 0.01815316913,
- 0.001592986157,
- 0.0,
- -0.01815316913,
- 0.001592986157,
- ]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -26.072947373723, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.15485993330517828,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03520162545964887,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.025490652204,
- 0.0,
- 0.013491755791,
- -0.012745326102,
- 0.0,
- -0.013491755791,
- -0.012745326102,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [-0.02198237, 0.0, 0.0, 0.01099118, 0.0, 0.0, 0.01099118, 0.0, 0.0],
- [0.0, 0.62517441, 0.0, 0.0, -0.31258721, 0.24829043, 0.0, -0.31258721, -0.24829043],
- [0.0, 0.0, 0.39893991, 0.0, 0.19093143, -0.19946995, 0.0, -0.19093143, -0.19946995],
- [0.01099118, 0.0, 0.0, -0.00995947, 0.0, 0.0, -0.00103171, 0.0, 0.0],
- [0.0, -0.31258721, 0.19093143, 0.0, 0.33968697, -0.21961093, 0.0, -0.02709976, 0.0286795],
- [0.0, 0.24829043, -0.19946995, 0.0, -0.21961093, 0.19053107, 0.0, -0.0286795, 0.00893888],
- [0.01099118, 0.0, 0.0, -0.00103171, 0.0, 0.0, -0.00995947, 0.0, 0.0],
- [0.0, -0.31258721, -0.19093143, 0.0, -0.02709976, -0.0286795, 0.0, 0.33968697, 0.21961093],
- [0.0, -0.24829043, -0.19946995, 0.0, 0.0286795, 0.00893888, 0.0, 0.21961093, 0.19053107],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.17091690, # occ
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03533349, # occ
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.027091204409, 0.0, 0.014414444742, -0.013545602205, 0.0, -0.014414444742, -0.013545602205]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.17311842, # vcc only
- "MP4(T) CORRECTION ENERGY": -0.003268429219, # vcc only
- "CISD CORRELATION ENERGY": -0.16787805277043, # vcc
- "QCISD CORRELATION ENERGY": -0.17409647936869, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00371845, # vcc only
- "REMP2 CORRELATION ENERGY": -0.172501515758, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.034548274152, # occ, tight
- "LCCD CORRELATION ENERGY": -0.1770086091, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0341268118, # occ
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.030699807076, 0.0, 0.016626789229, -0.015349903538, 0.0, -0.016626789229, -0.015349903538]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.1786081472, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.0344530, # vcc
- "CCD CORRELATION ENERGY": -0.17274172367784, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.0337442, # vcc
- "CCD TOTAL GRADIENT": np.array(
- [[0.0, 0.0, 0.02815376], [0.0, 0.01520857, -0.01407688], [0.0, -0.01520857, -0.01407688]]
- ), # fcc findif in psi
- "CCD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.02427911, 0.0, 0.0, 0.01213956, 0.0, 0.0, 0.01213956, 0.0, 0.0],
- [0.0, 0.61891369, 0.0, 0.0, -0.30945684, 0.2467696, 0.0, -0.30945684, -0.2467696],
- [0.0, 0.0, 0.39863476, 0.0, 0.19000027, -0.19931738, 0.0, -0.19000027, -0.19931738],
- [0.01213956, 0.0, 0.0, -0.01110176, 0.0, 0.0, -0.0010378, 0.0, 0.0],
- [0.0, -0.30945684, 0.19000027, 0.0, 0.3374568, -0.21838493, 0.0, -0.02799995, 0.02838466],
- [0.0, 0.2467696, -0.19931738, 0.0, -0.21838493, 0.18930325, 0.0, -0.02838466, 0.01001413],
- [0.01213956, 0.0, 0.0, -0.0010378, 0.0, 0.0, -0.01110176, 0.0, 0.0],
- [0.0, -0.30945684, -0.19000027, 0.0, -0.02799995, -0.02838466, 0.0, 0.3374568, 0.21838493],
- [0.0, -0.2467696, -0.19931738, 0.0, 0.02838466, 0.01001413, 0.0, 0.21838493, 0.18930325],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.173674381451717, # ccenergy
- "CC2 CORRELATION ENERGY": -0.156061046320285, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.026664454971, 0.0, 0.014117073057, -0.013332227485, 0.0, -0.014117073057, -0.013332227485]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.17387203707017695,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.033935818857082,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.029278727285,
- 0.0,
- 0.015813927533,
- -0.014639363642,
- 0.0,
- -0.015813927533,
- -0.014639363642,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.02524909, 0.0, 0.0, 0.01262454, 0.0, 0.0, 0.01262454, 0.0, 0.0],
- [0.0, 0.61582469, 0.0, 0.0, -0.30791234, 0.2459566, 0.0, -0.30791234, -0.2459566],
- [0.0, 0.0, 0.39625423, 0.0, 0.18929354, -0.19812712, 0.0, -0.18929354, -0.19812712],
- [0.01262454, 0.0, 0.0, -0.01154446, 0.0, 0.0, -0.00108008, 0.0, 0.0],
- [0.0, -0.30791234, 0.18929354, 0.0, 0.3360106, -0.21762507, 0.0, -0.02809826, 0.02833153],
- [0.0, 0.2459566, -0.19812712, 0.0, -0.21762507, 0.18819594, 0.0, -0.02833153, 0.00993118],
- [0.01262454, 0.0, 0.0, -0.00108008, 0.0, 0.0, -0.01154446, 0.0, 0.0],
- [0.0, -0.30791234, -0.18929354, 0.0, -0.02809826, -0.02833153, 0.0, 0.3360106, 0.21762507],
- [0.0, -0.2459566, -0.19812712, 0.0, 0.02833153, 0.00993118, 0.0, 0.21762507, 0.18819594],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.003990106867, # vcc
- "(T) CORRECTION ENERGY": -0.00384378,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.03116000949177],
- [0.00000000000000, 0.01681030698770, -0.01558000474588],
- [0.00000000000000, -0.01681030698770, -0.01558000474588],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # vcc fd
- [
- [-0.026871482612, 0.0, 0.0, 0.013435741306, 0.0, 0.0, 0.013435741306, 0.0, 0.0],
- [
- 0.0,
- 0.614216172202,
- 0.0,
- 0.0,
- -0.307108086101,
- 0.245961925921,
- 0.0,
- -0.307108086101,
- -0.245961925921,
- ],
- [
- 0.0,
- 0.0,
- 0.39318444945,
- 0.0,
- 0.189186035018,
- -0.196592224725,
- 0.0,
- -0.189186035018,
- -0.196592224725,
- ],
- [0.013435741306, 0.0, 0.0, -0.012279754441, 0.0, 0.0, -0.001155986865, 0.0, 0.0],
- [
- 0.0,
- -0.307108086101,
- 0.189186035018,
- 0.0,
- 0.334882090526,
- -0.217573980469,
- 0.0,
- -0.027774004425,
- 0.028387945452,
- ],
- [
- 0.0,
- 0.245961925921,
- -0.196592224725,
- 0.0,
- -0.217573980469,
- 0.18710085378,
- 0.0,
- -0.028387945452,
- 0.009491370945,
- ],
- [0.013435741306, 0.0, 0.0, -0.001155986865, 0.0, 0.0, -0.012279754441, 0.0, 0.0],
- [
- 0.0,
- -0.307108086101,
- -0.189186035018,
- 0.0,
- -0.027774004425,
- -0.028387945452,
- 0.0,
- 0.334882090526,
- 0.217573980469,
- ],
- [
- 0.0,
- -0.245961925921,
- -0.196592224725,
- 0.0,
- 0.028387945452,
- 0.009491370945,
- 0.0,
- 0.217573980469,
- 0.18710085378,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.00376395919, # mrcc only
- "B(T) CORRECTION ENERGY": -0.004031201058265, # ccenergy
- "CC3 CORRELATION ENERGY": -0.177840345513789, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.17782828147829832, # mrcc
- "CCSDT-1A TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.0311852], [0.0, 0.01683584, -0.0155926], [0.0, -0.01683584, -0.0155926]]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.17782563826176556, # mrcc
- "CCSDT-1B TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.03117878], [0.0, 0.01683259, -0.01558939], [0.0, -0.01683259, -0.01558939]]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.177555974326, # ecc
- "CCSDT-3 CORRELATION ENERGY": -0.17757120863770837, # mrcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.03102835], [0.0, 0.01674637, -0.01551417], [0.0, -0.01674637, -0.01551417]]
- ),
- "CCSDT CORRELATION ENERGY": -0.17817199774450, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001367125249, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.156193539287, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035974458829, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.026928654402,
- 0.0,
- 0.014250914503,
- -0.013464327201,
- 0.0,
- -0.014250914503,
- -0.013464327201,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001173901427, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.164044987798, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035847752938, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.027494393497,
- 0.0,
- 0.014585953475,
- -0.013747196748,
- 0.0,
- -0.014585953475,
- -0.013747196748,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001024209316, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.171933638522, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035747352644, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.028120207496,
- 0.0,
- 0.014956911575,
- -0.014060103748,
- 0.0,
- -0.014956911575,
- -0.014060103748,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.00111233720168, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.17359939909712, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.03496212583967, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.030225286483,
- 0.0,
- 0.016238459426,
- -0.015112643242,
- 0.0,
- -0.016238459426,
- -0.015112643242,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0011118724, # p4n
- "OLCCD CORRELATION ENERGY": -0.1781057943, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0344689234, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [0.0, 0.0, 0.031877236853, -0.0, 0.017265501329, -0.015938618427, 0.0, -0.017265501329, -0.015938618427]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.000987794, # qchem
- "OCCD CORRELATION ENERGY": -0.173720242, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0.0, 0.0, 0.02915872, 0.0, 0.01575094, -0.01457936, 0.0, -0.01575094, -0.01457936]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "SVWN TOTAL ENERGY": -55.57342920898311, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [
- 0.0,
- -0.0,
- 0.035459696882,
- -0.0,
- 0.020922069258,
- -0.017729858581,
- 0.0,
- -0.020922069258,
- -0.017729858581,
- ]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.9 99,590
- [
- -0.03056359,
- 0.0,
- -0.0,
- 0.01528971,
- -0.0,
- -0.0,
- 0.01528971,
- -0.0,
- -0.0,
- 0.0,
- 0.61365123,
- -0.0,
- 0.0,
- -0.30683213,
- 0.24717277,
- 0.0,
- -0.30683213,
- -0.24717277,
- -0.0,
- -0.0,
- 0.37850767,
- 0.0,
- 0.19398671,
- -0.18925551,
- 0.0,
- -0.19398671,
- -0.18925551,
- 0.01528971,
- 0.0,
- 0.0,
- -0.01456645,
- 0.0,
- -0.0,
- -0.00072257,
- -0.0,
- 0.0,
- -0.0,
- -0.30683213,
- 0.19398671,
- 0.0,
- 0.3324625,
- -0.22057959,
- -0.0,
- -0.02563036,
- 0.02659303,
- -0.0,
- 0.24717277,
- -0.18925551,
- -0.0,
- -0.22057959,
- 0.18253678,
- 0.0,
- -0.02659303,
- 0.00671886,
- 0.01528971,
- 0.0,
- 0.0,
- -0.00072257,
- -0.0,
- 0.0,
- -0.01456645,
- 0.0,
- 0.0,
- -0.0,
- -0.30683213,
- -0.19398671,
- -0.0,
- -0.02563036,
- -0.02659303,
- 0.0,
- 0.3324625,
- 0.22057959,
- -0.0,
- -0.24717277,
- -0.18925551,
- 0.0,
- 0.02659303,
- 0.00671886,
- 0.0,
- 0.22057959,
- 0.18253678,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -55.81473169701641, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-0.000000000000, 0.000000000000, 0.035829930902],
- [-0.000000000000, 0.019748673246, -0.017915051582],
- [0.000000000000, -0.019748673246, -0.017915051582],
- ]
- ),
- "B3LYP TOTAL ENERGY": -55.8900885216505259, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.00000000e00, 5.91645679e-31, 2.68092690e-02],
- [-4.57342645e-19, 1.49379444e-02, -1.34046506e-02],
- [4.57342645e-19, -1.49379444e-02, -1.34046506e-02],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -55.8573454463695782, # psi 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.00000000e00, 1.97215226e-30, 2.70819655e-02],
- [-4.63472198e-19, 1.51381508e-02, -1.35409990e-02],
- [4.63472198e-19, -1.51381508e-02, -1.35409990e-02],
- ]
- ),
- "WB97X TOTAL ENERGY": -55.86921249027672, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, -0.0, 0.024476615666, -0.0, 0.01345957865, -0.012237852106, 0.0, -0.01345957865, -0.012237852106]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.83362937, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.195530391293,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04161633,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.013731673196,
- 0.0,
- 0.005352105826,
- -0.006865836598,
- 0.0,
- -0.005352105826,
- -0.006865836598,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [-0.01184178, 0.0, 0.0, 0.00592089, 0.0, 0.0, 0.00592089, 0.0, 0.0],
- [0.0, 0.59647691, 0.0, 0.0, -0.29823846, 0.23338967, 0.0, -0.29823846, -0.23338967],
- [0.0, 0.0, 0.38876074, 0.0, 0.17693874, -0.19438037, 0.0, -0.17693874, -0.19438037],
- [0.00592089, 0.0, 0.0, -0.00473124, 0.0, 0.0, -0.00118965, 0.0, 0.0],
- [0.0, -0.29823846, 0.17693874, 0.0, 0.32637561, -0.20516421, 0.0, -0.02813715, 0.02822547],
- [0.0, 0.23338967, -0.19438037, 0.0, -0.20516421, 0.18496249, 0.0, -0.02822547, 0.00941788],
- [0.00592089, 0.0, 0.0, -0.00118965, 0.0, 0.0, -0.00473124, 0.0, 0.0],
- [0.0, -0.29823846, -0.17693874, 0.0, -0.02813715, -0.02822547, 0.0, 0.32637561, 0.20516421],
- [0.0, -0.23338967, -0.19438037, 0.0, 0.02822547, 0.00941788, 0.0, 0.20516421, 0.18496249],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.21084677, # occ
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04130360, # occ
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.014436297067, 0.0, 0.005622513341, -0.007218148534, 0.0, -0.005622513341, -0.007218148534]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.21275859, # vcc only
- "MP4(T) CORRECTION ENERGY": -0.004646780601, # vcc only
- "CISD CORRELATION ENERGY": -0.20576009250440, # vcc
- "QCISD CORRELATION ENERGY": -0.21351003301667, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00505349, # vcc only
- "REMP2 CORRELATION ENERGY": -0.212452538490, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.040608279810, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2167878305, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0401306050, # occ
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.018147039011, 0.0, 0.007823362162, -0.009073519505, 0.0, -0.007823362162, -0.009073519505]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2185061347, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.0404661, # vcc
- "CCD CORRELATION ENERGY": -0.2119966470870, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.0396775, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc
- [[0.0, 0.0, 0.015575676], [0.0, 0.0064826668, -0.007787838], [0.0, -0.0064826668, -0.007787838]]
- ),
- "CCD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.01343195, 0.0, 0.0, 0.00671598, 0.0, 0.0, 0.00671598, 0.0, 0.0],
- [0.0, 0.58883226, 0.0, 0.0, -0.29441613, 0.23106683, 0.0, -0.29441613, -0.23106683],
- [0.0, 0.0, 0.38825029, 0.0, 0.17519478, -0.19412514, 0.0, -0.17519478, -0.19412514],
- [0.00671598, 0.0, 0.0, -0.00550282, 0.0, 0.0, -0.00121316, 0.0, 0.0],
- [0.0, -0.29441613, 0.17519478, 0.0, 0.3235041, -0.20313082, 0.0, -0.02908797, 0.02793601],
- [0.0, 0.23106683, -0.19412514, 0.0, -0.20313082, 0.1835696, 0.0, -0.02793601, 0.01055554],
- [0.00671598, 0.0, 0.0, -0.00121316, 0.0, 0.0, -0.00550282, 0.0, 0.0],
- [0.0, -0.29441613, -0.17519478, 0.0, -0.02908797, -0.02793601, 0.0, 0.3235041, 0.20313082],
- [0.0, -0.23106683, -0.19412514, 0.0, 0.02793601, 0.01055554, 0.0, 0.20313082, 0.1835696],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.21309874, # ccenergy
- "CC2 CORRELATION ENERGY": -0.196947901479342, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.015143356579, 0.0, 0.006071754877, -0.00757167829, 0.0, -0.006071754877, -0.00757167829]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.213298055172,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.039907245914335,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.016842165003,
- 0.0,
- 0.007150136873,
- -0.008421082502,
- 0.0,
- -0.007150136873,
- -0.008421082502,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.01452417, 0.0, 0.0, 0.00726209, 0.0, 0.0, 0.00726209, 0.0, 0.0],
- [0.0, 0.58571417, 0.0, 0.0, -0.29285708, 0.23028954, 0.0, -0.29285708, -0.23028954],
- [0.0, 0.0, 0.38565345, 0.0, 0.17448698, -0.19282672, 0.0, -0.17448698, -0.19282672],
- [0.00726209, 0.0, 0.0, -0.00599674, 0.0, 0.0, -0.00126535, 0.0, 0.0],
- [0.0, -0.29285708, 0.17448698, 0.0, 0.32200974, -0.20238826, 0.0, -0.02915266, 0.02790128],
- [0.0, 0.23028954, -0.19282672, 0.0, -0.20238826, 0.18240136, 0.0, -0.02790128, 0.01042537],
- [0.00726209, 0.0, 0.0, -0.00126535, 0.0, 0.0, -0.00599674, 0.0, 0.0],
- [0.0, -0.29285708, -0.17448698, 0.0, -0.02915266, -0.02790128, 0.0, 0.32200974, 0.20238826],
- [0.0, -0.23028954, -0.19282672, 0.0, 0.02790128, 0.01042537, 0.0, 0.20238826, 0.18240136],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.005298735528, # vcc
- "(T) CORRECTION ENERGY": -0.00516659,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.01904285993124],
- [0.00000000000000, 0.00824911606964, -0.00952142996562],
- [0.00000000000000, -0.00824911606964, -0.00952142996562],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # vcc fd
- [
- [-0.01642193739, 0.0, 0.0, 0.008210968695, 0.0, 0.0, 0.008210968695, 0.0, 0.0],
- [
- 0.0,
- 0.584003042573,
- 0.0,
- 0.0,
- -0.292001521287,
- 0.230361256906,
- 0.0,
- -0.292001521287,
- -0.230361256906,
- ],
- [
- 0.0,
- 0.0,
- 0.38222875445,
- 0.0,
- 0.174417714376,
- -0.191114377225,
- 0.0,
- -0.174417714376,
- -0.191114377225,
- ],
- [0.008210968695, 0.0, 0.0, -0.006834745201, 0.0, 0.0, -0.001376223494, 0.0, 0.0],
- [
- 0.0,
- -0.292001521287,
- 0.174417714376,
- 0.0,
- 0.320849017325,
- -0.202389485641,
- 0.0,
- -0.028847496039,
- 0.027971771265,
- ],
- [
- 0.0,
- 0.230361256906,
- -0.191114377225,
- 0.0,
- -0.202389485641,
- 0.181208918903,
- 0.0,
- -0.027971771265,
- 0.009905458321,
- ],
- [0.008210968695, 0.0, 0.0, -0.001376223494, 0.0, 0.0, -0.006834745201, 0.0, 0.0],
- [
- 0.0,
- -0.292001521287,
- -0.174417714376,
- 0.0,
- -0.028847496039,
- -0.027971771265,
- 0.0,
- 0.320849017325,
- 0.202389485641,
- ],
- [
- 0.0,
- -0.230361256906,
- -0.191114377225,
- 0.0,
- 0.027971771265,
- 0.009905458321,
- 0.0,
- 0.202389485641,
- 0.181208918903,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.0050643207, # mrcc only
- "B(T) CORRECTION ENERGY": -0.00537543, # ccenergy
- "CC3 CORRELATION ENERGY": -0.218616407232958, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.218598725534, # ecc
- "CCSDT-1B CORRELATION ENERGY": -0.218597572977, # ecc
- "CCSDT-2 CORRELATION ENERGY": -0.218253889761, # ecc
- "CCSDT-3 CORRELATION ENERGY": -0.21827269362849, # vcc
- "CCSDT CORRELATION ENERGY": -0.21884856037681, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001570623297, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.197071770029, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.042459313035, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.015314078302,
- 0.0,
- 0.006156840975,
- -0.007657039151,
- 0.0,
- -0.006156840975,
- -0.007657039151,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001350812375, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.204522615491, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.042086148458, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.015411835251,
- 0.0,
- 0.006162364663,
- -0.007705917626,
- 0.0,
- -0.006162364663,
- -0.007705917626,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001177767799, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.212015174087, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.041743491888, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.015569868835,
- 0.0,
- 0.006203313670,
- -0.007784934417,
- 0.0,
- -0.006203313670,
- -0.007784934417,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001287772670, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.213723933328, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.041063372010, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.017901979677,
- 0.0,
- 0.007592988824,
- -0.008950989839,
- 0.0,
- -0.007592988824,
- -0.008950989839,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0012856903, # p4n
- "OLCCD CORRELATION ENERGY": -0.2180560836, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0405122800, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [
- -0.0,
- 0.0,
- 0.019472272298,
- -0.0,
- 0.008522161738,
- -0.009736136149,
- 0.0,
- -0.008522161738,
- -0.009736136149,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.001155093, # qchem
- "OCCD CORRELATION ENERGY": -0.213139955, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, 0.01669862, 0, 0.00707632, -0.00834931, 0, -0.00707632, -0.00834931],
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "SVWN TOTAL ENERGY": -55.59258481155869, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [
- 0.0,
- -0.0,
- 0.028874430294,
- -0.0,
- 0.016569686304,
- -0.014437276469,
- 0.0,
- -0.016569686304,
- -0.014437276469,
- ]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.9 99,590
- [
- -0.02488189,
- -0.0,
- 0.0,
- 0.01245024,
- 0.0,
- -0.0,
- 0.01245024,
- 0.0,
- 0.0,
- -0.0,
- 0.59347392,
- -0.0,
- 0.0,
- -0.29674373,
- 0.23725288,
- -0.0,
- -0.29674373,
- -0.23725288,
- 0.0,
- -0.0,
- 0.37093753,
- 0.0,
- 0.18502874,
- -0.18547044,
- 0.0,
- -0.18502874,
- -0.18547044,
- 0.01245024,
- 0.0,
- 0.0,
- -0.01170876,
- -0.0,
- -0.0,
- -0.00074289,
- 0.0,
- 0.0,
- 0.0,
- -0.29674373,
- 0.18502874,
- -0.0,
- 0.32275381,
- -0.21114139,
- -0.0,
- -0.02601004,
- 0.02611207,
- -0.0,
- 0.23725288,
- -0.18547044,
- -0.0,
- -0.21114139,
- 0.17827787,
- -0.0,
- -0.02611207,
- 0.00719218,
- 0.01245024,
- -0.0,
- 0.0,
- -0.00074289,
- -0.0,
- -0.0,
- -0.01170876,
- -0.0,
- -0.0,
- 0.0,
- -0.29674373,
- -0.18502874,
- 0.0,
- -0.02601004,
- -0.02611207,
- -0.0,
- 0.32275381,
- 0.21114139,
- 0.0,
- -0.23725288,
- -0.18547044,
- 0.0,
- 0.02611207,
- 0.00719218,
- -0.0,
- 0.21114139,
- 0.17827787,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -55.83097248811423, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.000000000000, 0.000000000000, 0.029614373344],
- [-0.000000000000, 0.015644026348, -0.014807315411],
- [0.000000000000, -0.015644026348, -0.014807315411],
- ]
- ),
- "B3LYP TOTAL ENERGY": -55.9072559501566744, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [
- [0.00000000e00, 3.15544362e-30, 1.99929859e-02],
- [-3.19390336e-19, 1.04320800e-02, -9.99655055e-03],
- [3.19390336e-19, -1.04320800e-02, -9.99655055e-03],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -55.8744982972056121, # psi 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # psi 99,590
- [
- [-7.88860905e-31, 0.00000000e00, 2.02715602e-02],
- [-3.25473520e-19, 1.06307719e-02, -1.01358376e-02],
- [3.25473520e-19, -1.06307719e-02, -1.01358376e-02],
- ]
- ),
- "WB97X TOTAL ENERGY": -55.88527882823288, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [
- 0.0,
- -0.0,
- 0.017275816568,
- -0.0,
- 0.008857017471,
- -0.008637144304,
- 0.0,
- -0.008857017471,
- -0.008637144304,
- ]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.861074179189, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "CISD CORRELATION ENERGY": -0.08129169589155, # vcc, sd == sc
- "LCCSD CORRELATION ENERGY": -0.08620498, # vcc nyi != p4n, sd == sc
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.08239000, # vcc nyi, sd == sc
- "CCD CORRELATION ENERGY": -0.08115920440309, # vcc nyi == tce, sd == sc
- "CCSD CORRELATION ENERGY": -0.08357160616, # sd == sc
- "CCSD SINGLES ENERGY": -0.0011743271, # sd == sd
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.00244892164, # sd == sc
- "CCSD TOTAL GRADIENT": np.array( # sd == sc
- [
- 0.0,
- 0.0,
- 0.005568141758,
- 0.0,
- 0.0,
- -0.005430974166,
- 0.0,
- 0.014884143028,
- -0.000068583796,
- 0.0,
- -0.014884143028,
- -0.000068583796,
- ]
- ).reshape((-1, 3)),
- "CCSDT CORRELATION ENERGY": -0.08463562959121, # vcc, sd == sc
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.060478115157,
- "MP2 SINGLES ENERGY": -0.000694049865,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.002004909679,
- "MP2 TOTAL GRADIENT": np.array(
- [
- # switches sign from unkn ref
- 0.000000000000000,
- 0.000000000000000,
- 0.013594741747853,
- 0.000000000000000,
- 0.000000000000000,
- -0.013127629532095,
- 0.000000000000000,
- 0.010308255599051,
- -0.000233556107879,
- 0.000000000000000,
- -0.010308255599051,
- -0.000233556107879,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # vcc by psi fd
- [
- [
- 3.87098460e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.45378253e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.91398962e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.91398962e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 3.77896598e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.31078241e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.65908217e-04,
- 4.34462348e-04,
- 0.00000000e00,
- 2.65908217e-04,
- -4.34462348e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.17564784e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.15517211e-01,
- 0.00000000e00,
- 1.14220963e-03,
- -1.02378661e-03,
- 0.00000000e00,
- -1.14220963e-03,
- -1.02378661e-03,
- ],
- [
- -4.45378253e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.80247034e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.74343907e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.74343907e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -4.31078241e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.71699407e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.03105828e-04,
- 8.16927983e-05,
- 0.00000000e00,
- -2.03105828e-04,
- -8.16927983e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.15517211e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.15737900e-01,
- 0.00000000e00,
- -4.73512607e-05,
- -1.10344685e-04,
- 0.00000000e00,
- 4.73512607e-05,
- -1.10344685e-04,
- ],
- [
- 2.91398962e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.74343907e-04,
- 0.00000000e00,
- 0.00000000e00,
- -7.40034143e-03,
- 0.00000000e00,
- 0.00000000e00,
- 7.28328638e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.65908217e-04,
- 1.14220963e-03,
- 0.00000000e00,
- -2.03105828e-04,
- -4.73512607e-05,
- 0.00000000e00,
- 4.11395088e-01,
- -8.05506756e-04,
- 0.00000000e00,
- -4.11457890e-01,
- -2.89351610e-04,
- ],
- [
- 0.00000000e00,
- 4.34462348e-04,
- -1.02378661e-03,
- 0.00000000e00,
- 8.16927983e-05,
- -1.10344685e-04,
- 0.00000000e00,
- -8.05506756e-04,
- -4.62479868e-03,
- 0.00000000e00,
- 2.89351610e-04,
- 5.75892997e-03,
- ],
- [
- 2.91398962e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.74343907e-04,
- 0.00000000e00,
- 0.00000000e00,
- 7.28328638e-03,
- 0.00000000e00,
- 0.00000000e00,
- -7.40034143e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.65908217e-04,
- -1.14220963e-03,
- 0.00000000e00,
- -2.03105828e-04,
- 4.73512607e-05,
- 0.00000000e00,
- -4.11457890e-01,
- 2.89351610e-04,
- 0.00000000e00,
- 4.11395088e-01,
- 8.05506756e-04,
- ],
- [
- 0.00000000e00,
- -4.34462348e-04,
- -1.02378661e-03,
- 0.00000000e00,
- -8.16927983e-05,
- -1.10344685e-04,
- 0.00000000e00,
- -2.89351610e-04,
- 5.75892997e-03,
- 0.00000000e00,
- 8.05506756e-04,
- -4.62479868e-03,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.075906990477, # cfour
- "MP3 SINGLES ENERGY": -0.000916783719, # cfour
- "MP3 TOTAL GRADIENT": np.array( # vcc by psi fd
- [
- [0.0, 0.0, 0.010131197027],
- [0.0, 0.0, -0.009902977129],
- [0.0, 0.012728956474, -0.000114109949],
- [0.0, -0.012728956474, -0.000114109949],
- ]
- ),
- "MP4(SDQ) CORRELATION ENERGY": -0.08034256, # vcc only, sc
- "MP4(T) CORRECTION ENERGY": -0.000301596734, # vcc only, sc
- "ZAPT2 CORRELATION ENERGY": -0.059970897396607, # detci (ZAPT uses special canonicalization but grouping here with sc)
- "CISD CORRELATION ENERGY": -0.08129169589155, # vcc, sc
- # "CISD CORRELATION ENERGY": -0.08142433, # detci != vcc ???
- "LCCD CORRELATION ENERGY": -0.0834094914, # p4n (likely sd since tce matches but leaving here until detangled)
- # "LCCSD CORRELATION ENERGY": -0.0861427228, # p4n (was uncommented)
- "LCCSD CORRELATION ENERGY": -0.08620498, # vcc nyi != p4n
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.08239000, # vcc nyi
- "CCD CORRELATION ENERGY": -0.08115920440309, # vcc nyi == tce, sd == sc
- "BCCD CORRELATION ENERGY": -0.08369728, # ccenergy
- "CC2 CORRELATION ENERGY": -0.061327748089029, # ccenergy only, sc
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [
- 0.0,
- 0.0,
- 0.012124989222,
- 0.0,
- 0.0,
- -0.011720065418,
- 0.0,
- 0.010555684617,
- -0.000202461902,
- 0.0,
- -0.010555684617,
- -0.000202461902,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08357160616,
- "CCSD SINGLES ENERGY": -0.0011743271,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.00244892164,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.005568141758,
- 0.0,
- 0.0,
- -0.005430974166,
- 0.0,
- 0.014884143028,
- -0.000068583796,
- 0.0,
- -0.014884143028,
- -0.000068583796,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.000713766189,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.00481175567113],
- [0.00000000000000, 0.00000000000000, -0.00475864799255],
- [0.00000000000000, 0.01496337127168, -0.00002655383929],
- [0.00000000000000, -0.01496337127168, -0.00002655383929],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.000699810766, # mrcc only, sc
- "B(T) CORRECTION ENERGY": -0.00063370, # ccenergy
- "CC3 CORRELATION ENERGY": -0.084278230953036, # ccenergy only, sc
- "CCSDT CORRELATION ENERGY": -0.08463562959121, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": -0.001128749117, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.061388690115, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001971155774, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.012017560624,
- 0.0,
- 0.000000000000,
- -0.011623175532,
- 0.0,
- 0.010549441086,
- -0.000197192546,
- 0.0,
- -0.010549441086,
- -0.000197192546,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.000959439798, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.069204306750, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002198682531, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.010260857036,
- 0.0,
- 0.000000000000,
- -0.009981284641,
- 0.0,
- 0.011818192175,
- -0.000139786197,
- 0.0,
- -0.011818192175,
- -0.000139786197,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.000746435584, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.077055367311, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002426022153, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.008456347254,
- 0.0,
- 0.000000000000,
- -0.008291901023,
- 0.0,
- 0.013097750617,
- -0.000082223115,
- 0.0,
- -0.013097750617,
- -0.000082223115,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.000463092111, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.080520111623, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.002398210414, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.005898074368,
- 0.0,
- 0.000000000000,
- -0.005790150595,
- 0.0,
- 0.014384643442,
- -0.000053961887,
- 0.0,
- -0.014384643442,
- -0.000053961887,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.0000399018, # p4n
- "OLCCD CORRELATION ENERGY": -0.0862654609, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0024486744, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [
- -0.0,
- 0.0,
- 0.002952428137,
- 0.0,
- 0.0,
- -0.002937832352,
- -0.0,
- 0.015746258328,
- -0.000007297893,
- 0.0,
- -0.015746258328,
- -0.000007297893,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.000358562, # qchem
- "OCCD CORRELATION ENERGY": -0.083713042, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem 3-pt findif
- [
- 0.0,
- 0.0,
- 5.200665059079133e-03,
- 0.0,
- 0.0,
- -5.057359056039087e-03,
- 0.0,
- 1.487654179061328e-02,
- -7.165259590676168e-05,
- 0.0,
- -1.487654176147304e-02,
- -7.165259308673899e-05,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "PBE TOTAL ENERGY": -26.046275584237, # nwc 99,590
- "PBE TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [7.84827311e-37, -2.13273843e-19, -1.92100000e-03],
- [4.63705881e-37, -1.26010313e-19, -1.13500000e-03],
- [-1.12670315e-35, 2.60500000e-02, 1.52800000e-03],
- [1.00184983e-35, -2.60500000e-02, 1.52800000e-03],
- ]
- ),
- "B3LYP TOTAL ENERGY": -26.113222717203, # nwc 99,590
- "B3LYP TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-1.96104690e-36, 5.32907052e-19, 4.80000000e-03],
- [2.94483876e-36, -8.00248756e-19, -7.20800000e-03],
- [-8.25273903e-36, 1.89960000e-02, 1.20400000e-03],
- [7.26894717e-36, -1.89960000e-02, 1.20400000e-03],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -26.088528482841, # nwc 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-1.85523208e-36, 5.04152275e-19, 4.54100000e-03],
- [2.84351800e-36, -7.72715225e-19, -6.96000000e-03],
- [-8.37121895e-36, 1.92800000e-02, 1.21000000e-03],
- [7.38252447e-36, -1.92800000e-02, 1.21000000e-03],
- ]
- ),
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "CISD CORRELATION ENERGY": -0.17186174301557, # vcc, sd == sc
- "LCCSD CORRELATION ENERGY": -0.18308771, # vcc nyi != p4n, sd == sc
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.14511930, # vcc nyi, sd == sc
- "CCD CORRELATION ENERGY": -0.17475513572639, # vcc nyi == tce, sd == sc
- "CCSD CORRELATION ENERGY": -0.178236032911, # == sc
- "CCSD SINGLES ENERGY": -0.00327524740575, # == sc
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.033982707798170, # == sc
- "CCSD TOTAL GRADIENT": np.array( # == sc
- [
- 0.0,
- 0.0,
- 0.029273628227,
- 0.0,
- 0.015808308241,
- -0.014636814114,
- 0.0,
- -0.015808308241,
- -0.014636814114,
- ]
- ).reshape((-1, 3)),
- "CCSDT CORRELATION ENERGY": -0.18258437583017, # vcc, sd == sc
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.15949744108346664,
- "MP2 SINGLES ENERGY": -0.0028296307982793997,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03541709278508698,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.025609525826,
- 0.0,
- 0.013506941035,
- -0.012804762913,
- 0.0,
- -0.013506941035,
- -0.012804762913,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # vcc by psi fd
- [
- [-0.02208471, 0.0, 0.0, 0.01104236, 0.0, 0.0, 0.01104236, 0.0, 0.0],
- [0.0, 0.62483805, 0.0, 0.0, -0.31241902, 0.24820063, 0.0, -0.31241902, -0.24820063],
- [0.0, 0.0, 0.39861928, 0.0, 0.19070358, -0.19930964, 0.0, -0.19070358, -0.19930964],
- [0.01104236, 0.0, 0.0, -0.00999006, 0.0, 0.0, -0.0010523, 0.0, 0.0],
- [0.0, -0.31241902, 0.19070358, 0.0, 0.33943262, -0.2194521, 0.0, -0.0270136, 0.02874852],
- [0.0, 0.24820063, -0.19930964, 0.0, -0.2194521, 0.19041148, 0.0, -0.02874852, 0.00889816],
- [0.01104236, 0.0, 0.0, -0.0010523, 0.0, 0.0, -0.00999006, 0.0, 0.0],
- [0.0, -0.31241902, -0.19070358, 0.0, -0.0270136, -0.02874852, 0.0, 0.33943262, 0.2194521],
- [0.0, -0.24820063, -0.19930964, 0.0, 0.02874852, 0.00889816, 0.0, 0.2194521, 0.19041148],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.17571623051, # cfour
- "MP3 SINGLES ENERGY": -0.003236109562, # cfour
- "MP3 TOTAL GRADIENT": np.array( # vcc by psi fd
- [
- [0.00000000000000, 0.00000000000000, 0.02731056234441],
- [0.00000000000000, 0.01453084545981, -0.01365528117220],
- [0.00000000000000, -0.01453084545981, -0.01365528117220],
- ]
- ),
- "MP4(SDQ) CORRELATION ENERGY": -0.17767316, # vcc only, sc
- "MP4(T) CORRECTION ENERGY": -0.003373917694, # vcc only, sc
- "ZAPT2 CORRELATION ENERGY": -0.15875585, # gamess
- "CISD CORRELATION ENERGY": -0.17186174301557, # vcc, sc
- # "CISD CORRELATION ENERGY": -0.1723668643052676, # detci != vcc ???
- "LCCD CORRELATION ENERGY": -0.1791714105, # p4n (likely sd since tce matches but leaving here until detangled)
- # "LCCSD CORRELATION ENERGY": -0.1830545845, # p4n (was uncommented)
- "LCCSD CORRELATION ENERGY": -0.18308771, # vcc nyi != p4n
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.14511930, # vcc nyi
- "CCD CORRELATION ENERGY": -0.17475513572639, # vcc nyi == tce, sd=sc
- "BCCD CORRELATION ENERGY": -0.178088085354507, # ccenergy
- "CC2 CORRELATION ENERGY": -0.160653595161691, # ccenergy only, sc
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.026788245572, 0.0, 0.014198292126, -0.013394122786, 0.0, -0.014198292126, -0.013394122786]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.178236032911,
- "CCSD SINGLES ENERGY": -0.00327524740575,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.033982707798170,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.029273628227,
- 0.0,
- 0.015808308241,
- -0.014636814114,
- 0.0,
- -0.015808308241,
- -0.014636814114,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.003901085777,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.03117381407549],
- [0.00000000000000, 0.01681897058340, -0.01558690703775],
- [0.00000000000000, -0.01681897058340, -0.0155869070377],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.18258437583017, # vcc
- "A-(T) CORRECTION ENERGY": -0.003817334300, # mrcc only, sc
- "B(T) CORRECTION ENERGY": -0.004031201058265, # ccenergy
- "CC3 CORRELATION ENERGY": -0.182256450138473, # ccenergy only, sc
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003046592318, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.160607243189, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035974454782, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.026928663612,
- 0.0,
- 0.014250907985,
- -0.013464331806,
- 0.0,
- -0.014250907985,
- -0.013464331806,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003239801580, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.168458692138, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035847753329, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.027494386758,
- 0.0,
- 0.014585950370,
- -0.013747193379,
- 0.0,
- -0.014585950370,
- -0.013747193379,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003389494582, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.176347342433, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035747352645, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.028120207297,
- 0.0,
- 0.014956911348,
- -0.014060103648,
- 0.0,
- -0.014956911348,
- -0.014060103648,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003301366872, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.178013102573, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.034962125667, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.030225286965,
- 0.0,
- 0.016238460656,
- -0.015112643483,
- 0.0,
- -0.016238460656,
- -0.015112643483,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.0033018315, # p4n
- "OLCCD CORRELATION ENERGY": -0.1825194982, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0344689234, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [
- -0.0,
- 0.0,
- 0.031877236593,
- -0.0,
- 0.017265501452,
- -0.015938618296,
- 0.0,
- -0.017265501452,
- -0.015938618296,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.003426081, # qchem
- "OCCD CORRELATION ENERGY": -0.178133946, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem 3-pt findif
- [
- 0.0,
- 2.629008122312371e-10,
- 2.915992176610871e-02,
- 0.0,
- 1.575113356366842e-02,
- -1.457995768916476e-02,
- 0.0,
- -1.575113354590485e-02,
- -1.457995755771435e-02,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "PBE TOTAL ENERGY": -55.813318056978, # nwc 99,590
- "PBE TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-2.94106602e-19, 2.94106602e-19, 3.56590000e-02],
- [1.47049177e-19, 1.96000000e-02, -1.78290000e-02],
- [1.47049177e-19, -1.96000000e-02, -1.78290000e-02],
- ]
- ),
- "B3LYP TOTAL ENERGY": -55.888559899085, # nwc 99,590
- "B3LYP TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-2.19134533e-19, 2.19134533e-19, 2.65690000e-02],
- [1.09571390e-19, 1.47410000e-02, -1.32850000e-02],
- [1.09571390e-19, -1.47410000e-02, -1.32850000e-02],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -55.855798924171, # nwc 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-2.21336683e-19, 2.21336683e-19, 2.68360000e-02],
- [1.10668341e-19, 1.49380000e-02, -1.34180000e-02],
- [1.10668341e-19, -1.49380000e-02, -1.34180000e-02],
- ]
- ),
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "CISD CORRELATION ENERGY": -0.20988111766307, # vcc, sd == sc
- "LCCSD CORRELATION ENERGY": -0.22316121, # vcc nyi != p4n ???, sd == sc
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.17910640, # vcc nyi, sd == sc
- "CCD CORRELATION ENERGY": -0.21415436056607, # vcc nyi == tce, sd == sc
- "CCSD CORRELATION ENERGY": -0.217849506326, # sd == sc
- "CCSD SINGLES ENERGY": -0.00338286103325, # sd == sc
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.039891470497466, # sd == sc
- "CCSD TOTAL GRADIENT": np.array( # sd == sc
- [
- 0.0,
- 0.0,
- 0.016833254665,
- 0.0,
- 0.007144029475,
- -0.008416627332,
- 0.0,
- -0.007144029475,
- -0.008416627332,
- ]
- ).reshape((-1, 3)),
- "CCSDT CORRELATION ENERGY": -0.22345631762464, # vcc, sd == sc
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.2005395272,
- "MP2 SINGLES ENERGY": -0.00298375,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04178535,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.0138883429,
- 0.0,
- 0.005389090661,
- -0.00694417145,
- 0.0,
- -0.005389090661,
- -0.00694417145,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # vcc by psi fd
- [
- [-0.01197655, 0.0, 0.0, 0.00598828, 0.0, 0.0, 0.00598828, 0.0, 0.0],
- [0.0, 0.59600884, 0.0, 0.0, -0.29800442, 0.23326184, 0.0, -0.29800442, -0.23326184],
- [0.0, 0.0, 0.38838238, 0.0, 0.17666871, -0.19419119, 0.0, -0.17666871, -0.19419119],
- [0.00598828, 0.0, 0.0, -0.0047771, 0.0, 0.0, -0.00121118, 0.0, 0.0],
- [0.0, -0.29800442, 0.17666871, 0.0, 0.32604541, -0.20496528, 0.0, -0.02804099, 0.02829657],
- [0.0, 0.23326184, -0.19419119, 0.0, -0.20496528, 0.18480667, 0.0, -0.02829657, 0.00938452],
- [0.00598828, 0.0, 0.0, -0.00121118, 0.0, 0.0, -0.0047771, 0.0, 0.0],
- [0.0, -0.29800442, -0.17666871, 0.0, -0.02804099, -0.02829657, 0.0, 0.32604541, 0.20496528],
- [0.0, -0.23326184, -0.19419119, 0.0, 0.02829657, 0.00938452, 0.0, 0.20496528, 0.18480667],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.215858882347, # cfour
- "MP3 SINGLES ENERGY": -0.003348697377, # cfour
- "MP3 TOTAL GRADIENT": np.array( # vcc by fd psi
- [
- [0.0, 0.0, 0.014669237518],
- [0.0, 0.005743113908, -0.007334618759],
- [0.0, -0.005743113908, -0.007334618759],
- ]
- ),
- "MP4(SDQ) CORRELATION ENERGY": -0.21748938, # vcc only, sc
- "MP4(T) CORRECTION ENERGY": -0.004777946072, # vcc only, sc
- "ZAPT2 CORRELATION ENERGY": -0.19975428, # gamess
- "CISD CORRELATION ENERGY": -0.20988111766307, # vcc
- # "CISD CORRELATION ENERGY": -0.21038651, # detci != vcc ???
- "LCCD CORRELATION ENERGY": -0.2191039411, # p4n (likely sd since tce matches but leaving here until detangled)
- # "LCCSD CORRELATION ENERGY": -0.2231241199, # p4n (was uncommented)
- "LCCSD CORRELATION ENERGY": -0.22316121, # vcc nyi != p4n ???
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.17910640, # vcc nyi
- "CCD CORRELATION ENERGY": -0.21415436056607, # vcc nyi == tce, sd == sc
- "BCCD CORRELATION ENERGY": -0.21770845, # ccenergy
- "CC2 CORRELATION ENERGY": -0.201748666827081, # ccenergy only, sc
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.015270065209, 0.0, 0.006152718989, -0.007635032604, 0.0, -0.006152718989, -0.007635032604]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.217849506326,
- "CCSD SINGLES ENERGY": -0.00338286103325,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.039891470497466,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.016833254665,
- 0.0,
- 0.007144029475,
- -0.008416627332,
- 0.0,
- -0.007144029475,
- -0.008416627332,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.005233938447,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.01905797562047],
- [0.00000000000000, 0.00825727647494, -0.00952898781024],
- [0.00000000000000, -0.00825727647494, -0.00952898781024],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.005126584825, # mrcc only, sc
- "B(T) CORRECTION ENERGY": -0.00537543, # ccenergy
- "CC3 CORRELATION ENERGY": -0.223229153563849, # ccenergy only, sc
- "CCSDT CORRELATION ENERGY": -0.22345631762464, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003039092557, # occ, tight
- "OMP2 CORRELATION ENERGY": -0.201681478150, # occ, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.042459312118, # occ, tight
- "OMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.015314087546,
- 0.0,
- 0.006156841239,
- -0.007657043773,
- 0.0,
- -0.006156841239,
- -0.007657043773,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003258895747, # occ, tight
- "OMP2.5 CORRELATION ENERGY": -0.209132323529, # occ, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.042086148395, # occ, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.015411833442,
- 0.0,
- 0.006162364110,
- -0.007705916721,
- 0.0,
- -0.006162364110,
- -0.007705916721,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003431940343, # occ, tight
- "OMP3 CORRELATION ENERGY": -0.216624882230, # occ, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.041743491868, # occ, tight
- "OMP3 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.015569867435,
- 0.0,
- 0.006203313291,
- -0.007784933717,
- 0.0,
- -0.006203313291,
- -0.007784933717,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003321935448, # occ, tight
- "OREMP2 CORRELATION ENERGY": -0.218333639848, # occ, tight
- "OREMP2 SAME-SPIN CORRELATION ENERGY": -0.041063372384, # occ, tight
- "OREMP2 TOTAL GRADIENT": np.array( # occ, tight
- [
- 0.0,
- 0.000000000000,
- 0.017901994172,
- 0.0,
- 0.007592995571,
- -0.008950997086,
- 0.0,
- -0.007592995571,
- -0.008950997086,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.0033240178, # p4n
- "OLCCD CORRELATION ENERGY": -0.2226657917, # p4n
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.0405122800, # occ
- "OLCCD TOTAL GRADIENT": np.array( # occ
- [0.0, 0.0, 0.019472272302, -0.0, 0.008522161726, -0.009736136151, 0.0, -0.008522161726, -0.009736136151]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00345534, # qchem
- "OCCD CORRELATION ENERGY": -0.217749658, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem 3-pt findif
- [
- 0.0,
- 2.948752353404416e-10,
- 1.669883480914791e-02,
- 0.0,
- 7.076450128096212e-03,
- -8.349414756025908e-03,
- 0.0,
- -7.076449627163584e-03,
- -8.349414585495651e-03,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "PBE TOTAL ENERGY": -55.829414170216, # nwc 99,590
- "PBE TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-2.43250961e-19, 2.43250961e-19, 2.94930000e-02],
- [1.21621356e-19, 1.55340000e-02, -1.47460000e-02],
- [1.21621356e-19, -1.55340000e-02, -1.47460000e-02],
- ]
- ),
- "B3LYP TOTAL ENERGY": -55.905608800925, # nwc 99,590
- "B3LYP TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-1.63082808e-19, 1.63082808e-19, 1.97730000e-02],
- [8.15372799e-20, 1.02630000e-02, -9.88600000e-03],
- [8.15372799e-20, -1.02630000e-02, -9.88600000e-03],
- ]
- ),
- "B3LYP5 TOTAL ENERGY": -55.872832273661, # nwc 99,590
- "B3LYP5 TOTAL GRADIENT": np.array( # nwc 99,590
- [
- [-1.65334444e-19, 1.65334444e-19, 2.00460000e-02],
- [8.26672220e-20, 1.04580000e-02, -1.00230000e-02],
- [8.26672220e-20, -1.04580000e-02, -1.00230000e-02],
- ]
- ),
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CONV-FC-CONV >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.201627516796,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0534895025483176,
- "MP2 TOTAL GRADIENT": np.array(
- [ # fnocc findif-5 fc pk+conv
- 0.00000000000000,
- 0.00000000000000,
- 0.00317450456474,
- 0.00000000000000,
- 0.00000000000000,
- -0.00317450456474,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [-0.00183193, 0.0, 0.0, 0.00183193, 0.0, 0.0],
- [0.0, -0.00183193, 0.0, 0.0, 0.00183193, 0.0],
- [0.0, 0.0, 0.64212587, 0.0, 0.0, -0.64212587],
- [0.00183193, 0.0, 0.0, -0.00183193, 0.0, 0.0],
- [0.0, 0.00183193, 0.0, 0.0, -0.00183193, 0.0],
- [0.0, 0.0, -0.64212587, 0.0, 0.0, 0.64212587],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.20453611, # fnocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04918710, # fnocc
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000579954803, 0.0, 0.0, 0.000579954803]).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.20670909, # vcc
- "MP4(T) CORRECTION ENERGY": -0.002027930587, # vcc
- "CISD CORRELATION ENERGY": -0.20039201434963, # vcc
- "QCISD CORRELATION ENERGY": -0.20699674383631, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00180789, # vcc
- "FCI CORRELATION ENERGY": -0.2092292951, # detci
- "REMP2 CORRELATION ENERGY": -0.20642733451785, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.04882718129882, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2079585027, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.047635656759, # fnocc
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.002535502057, 0.0, 0.0, -0.002535502057]).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2087915976, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.047754723454, # fnocc
- "CEPA(1) CORRELATION ENERGY": -0.2064021969, # fnocc
- "CEPA(1) SINGLES ENERGY": 0.0,
- "CEPA(1) SAME-SPIN CORRELATION ENERGY": -0.0473671686, # fnocc
- "CEPA(3) CORRELATION ENERGY": -0.2047660232, # fnocc
- "CEPA(3) SINGLES ENERGY": 0.0,
- "CEPA(3) SAME-SPIN CORRELATION ENERGY": -0.0470742732, # fnocc
- "ACPF CORRELATION ENERGY": -0.2065398048, # fnocc
- "ACPF SINGLES ENERGY": 0.0,
- "ACPF SAME-SPIN CORRELATION ENERGY": -0.0473955636, # fnocc
- "AQCC CORRELATION ENERGY": -0.2046960774, # fnocc
- "AQCC SINGLES ENERGY": 0.0,
- "AQCC SAME-SPIN CORRELATION ENERGY": -0.0470964567, # fnocc
- "CCD CORRELATION ENERGY": -0.20622552201818, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.04781602, # vcc
- "CCD TOTAL GRADIENT": np.array([[0.0, 0.0, 0.0011776783], [0.0, 0.0, -0.0011776783]]), # vcc
- "BCCD CORRELATION ENERGY": -0.20667693, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.2023633612, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.004483211, 0.0, 0.0, -0.004483211]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.2068152041,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.0478712079,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.002335204281,
- 0.0,
- 0.0,
- -0.002335204281,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.00134759, 0.0, 0.0, 0.00134759, 0.0, 0.0],
- [0.0, -0.00134759, 0.0, 0.0, 0.00134759, 0.0],
- [0.0, 0.0, 0.63866268, 0.0, 0.0, -0.63866268],
- [0.00134759, 0.0, 0.0, -0.00134759, 0.0, 0.0],
- [0.0, 0.00134759, 0.0, 0.0, -0.00134759, 0.0],
- [0.0, 0.0, -0.63866268, 0.0, 0.0, 0.63866268],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.002040855770, # vcc
- "(T) CORRECTION ENERGY": -0.0019205007159748158,
- "CCSD(T) TOTAL GRADIENT": np.array([[0.0, 0.0, 0.00342858327943], [0.0, 0.0, -0.00342858327943]]), # ncc fd
- "CCSD(T) TOTAL HESSIAN": np.array( # ncc fd
- [
- [-0.001978535996, 0.0, 0.0, 0.001978535996, 0.0, 0.0],
- [0.0, -0.001978535996, 0.0, 0.0, 0.001978535996, 0.0],
- [0.0, 0.0, 0.637319868539, 0.0, 0.0, -0.637319868539],
- [0.001978535996, 0.0, 0.0, -0.001978535996, 0.0, 0.0],
- [0.0, 0.001978535996, 0.0, -0.0, -0.001978535996, 0.0],
- [0.0, 0.0, -0.637319868539, 0.0, 0.0, 0.637319868539],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.001944208736203, # ncc
- "A-CCSD(T) TOTAL GRADIENT": np.array( # ccenergy fd
- [[0.00000000000, 0.00000000000, 0.00341625320310], [0.00000000000, 0.00000000000, -0.00341625320310]]
- ),
- "B(T) CORRECTION ENERGY": -0.00206676, # ccenergy only
- "CC3 CORRELATION ENERGY": -0.208823404506030, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.208822533905, # ecc
- "CCSDT-1A TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[0.0, 0.0, 0.00350581687383], [0.0, 0.0, -0.00350581687383]]
- ),
- "CCSDT-1A TOTAL HESSIAN": np.array( # mrcc
- [
- [-2.02328225e-03, 1.66833702e-08, 2.17609176e-08, 2.02328225e-03, -1.66833702e-08, -2.17609176e-08],
- [1.66833702e-08, -2.02328515e-03, 1.74087341e-08, -1.66833702e-08, 2.02328515e-03, -1.74087341e-08],
- [2.17609176e-08, 1.74087341e-08, 6.37250530e-01, -2.17609176e-08, -1.74087341e-08, -6.37250530e-01],
- [2.02328225e-03, -1.66833702e-08, -2.17609176e-08, -2.02328225e-03, 1.66833702e-08, 2.17609176e-08],
- [-1.66833702e-08, 2.02328515e-03, -1.74087341e-08, 1.66833702e-08, -2.02328515e-03, 1.74087341e-08],
- [-2.17609176e-08, -1.74087341e-08, -6.37250530e-01, 2.17609176e-08, 1.74087341e-08, 6.37250530e-01],
- ]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.208825939324, # ecc
- "CCSDT-1B TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[0.0, 0.0, 0.00350694748535], [0.0, 0.0, -0.00350694748535]]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.208693156430, # ecc
- "CCSDT-2 TOTAL GRADIENT": np.array( # ecc by psi fc STAR
- [[0.0, 0.0, 0.00345167960987], [0.0, 0.0, -0.00345167960987]]
- ),
- "CCSDT-3 CORRELATION ENERGY": -0.20869193974177, # vcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [[0.0, 0.0, 0.00344911055208], [0.0, 0.0, -0.00344911055208]]
- ),
- "CCSDT-3 TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.001990549473, 0.0, 0.0, 0.001990549473, -0.0, -0.0],
- [0.0, -0.001990539318, 0.0, -0.0, 0.001990539318, -0.0],
- [0.0, 0.0, 0.637308538355, -0.0, -0.0, -0.637308538355],
- [0.001990549473, -0.0, -0.0, -0.001990549473, 0.0, 0.0],
- [-0.0, 0.001990539318, -0.0, 0.0, -0.001990539318, 0.0],
- [-0.0, -0.0, -0.637308538355, 0.0, 0.0, 0.637308538355],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.208825198347707, # ncc
- "CCSDT TOTAL GRADIENT": np.array(
- [ # ecc
- 0.000000000000000,
- 0.000000000000000,
- 0.003519024898117,
- 0.000000000000000,
- 0.000000000000000,
- -0.003519024898117,
- ]
- ).reshape((-1, 3)),
- "CCSDT TOTAL HESSIAN": np.array( # ecc
- [
- [-0.00203074, 0.0, 0.0, 0.00203074, 0.0, 0.0],
- [0.0, -0.00203074, 0.0, 0.0, 0.00203074, 0.0],
- [0.0, 0.0, 0.63717213, 0.0, 0.0, -0.63717213],
- [0.00203074, 0.0, 0.0, -0.00203074, 0.0, 0.0],
- [0.0, 0.00203074, 0.0, 0.0, -0.00203074, 0.0],
- [0.0, 0.0, -0.63717213, 0.0, 0.0, 0.63717213],
- ]
- ),
- "[Q] CORRECTION ENERGY": -0.000379506649993, # ncc
- "(Q) CORRECTION ENERGY": -0.000413051703749, # ncc
- "CCSDTQ CORRELATION ENERGY": -0.209218171097884, # ncc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0005535161, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.2086206237, # p4n (core-occ rotations neglected)
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": 0.000510311, # qchem
- "OCCD CORRELATION ENERGY": -0.206722125, # qchem
- "OCCD TOTAL GRADIENT": np.array([0, 0, 0.00227059, 0, 0, -0.00227059]).reshape( # qchem, rearranged
- (-1, 3)
- ),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -100.363980302665, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.2194081478,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.055833980855745646,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.010245839621,
- 0.0,
- 0.005893268945,
- -0.00512291981,
- 0.0,
- -0.005893268945,
- -0.00512291981,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [
- -9.24437570e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.62218780e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.62218780e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.20231256e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.60115628e-01,
- 2.82410191e-01,
- 0.00000000e00,
- -3.60115628e-01,
- -2.82410191e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.67582875e-01,
- 0.00000000e00,
- 2.16920929e-01,
- -2.33791438e-01,
- 0.00000000e00,
- -2.16920929e-01,
- -2.33791438e-01,
- ],
- [
- 4.62218780e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.36961760e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.52570200e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.60115628e-01,
- 2.16920929e-01,
- 0.00000000e00,
- 3.88438352e-01,
- -2.49665560e-01,
- 0.00000000e00,
- -2.83227242e-02,
- 3.27446311e-02,
- ],
- [
- 0.00000000e00,
- 2.82410191e-01,
- -2.33791438e-01,
- 0.00000000e00,
- -2.49665560e-01,
- 2.24169862e-01,
- 0.00000000e00,
- -3.27446311e-02,
- 9.62157610e-03,
- ],
- [
- 4.62218780e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.52570200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -4.36961760e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.60115628e-01,
- -2.16920929e-01,
- 0.00000000e00,
- -2.83227242e-02,
- -3.27446311e-02,
- 0.00000000e00,
- 3.88438352e-01,
- 2.49665560e-01,
- ],
- [
- 0.00000000e00,
- -2.82410191e-01,
- -2.33791438e-01,
- 0.00000000e00,
- 3.27446311e-02,
- 9.62157610e-03,
- 0.00000000e00,
- 2.49665560e-01,
- 2.24169862e-01,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.224155670726, # fnocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.051069118695, # fnocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.004593346123, 0.0, 0.002925016535, -0.002296673061, 0.0, -0.002925016535, -0.002296673061]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.22737281, # vcc
- "MP4(T) CORRECTION ENERGY": -0.005605447265, # vcc
- "CISD CORRELATION ENERGY": -0.21764746560900, # vcc
- "QCISD CORRELATION ENERGY": -0.22775040212176, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00485806, # vcc
- "REMP2 CORRELATION ENERGY": -0.227138458433, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.050586597452, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2296135965, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.049154543318, # fnocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.009143629163, 0.0, 0.005604924417, -0.004571814581, 0.0, -0.005604924417, -0.004571814581]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2318316308, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.049659952324, # fnocc
- "CEPA(1) CORRELATION ENERGY": -0.2276613849, # fnocc
- "CEPA(1) SINGLES ENERGY": 0.0,
- "CEPA(1) SAME-SPIN CORRELATION ENERGY": -0.0489936246, # fnocc
- "CEPA(3) CORRELATION ENERGY": -0.2248646422, # fnocc
- "CEPA(3) SINGLES ENERGY": 0.0,
- "CEPA(3) SAME-SPIN CORRELATION ENERGY": -0.0485143833, # fnocc
- "ACPF CORRELATION ENERGY": -0.2278506904, # fnocc
- "ACPF SINGLES ENERGY": 0.0,
- "ACPF SAME-SPIN CORRELATION ENERGY": -0.0490397538, # fnocc
- "AQCC CORRELATION ENERGY": -0.2246992302, # fnocc
- "AQCC SINGLES ENERGY": 0.0,
- "AQCC SAME-SPIN CORRELATION ENERGY": -0.0485408970, # fnocc
- "CCD CORRELATION ENERGY": -0.22578168712640, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.04913759, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc findif in psi
- [[0.0, 0.0, 0.00677294], [0.0, 0.00429381, -0.00338647], [0.0, -0.00429381, -0.00338647]]
- ),
- "BCCD CORRELATION ENERGY": -0.226749124382525, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.2216835625, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.012528297777, 0.0, 0.007118519319, -0.006264148888, 0.0, -0.007118519319, -0.006264148888]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.22717334532791256, # mrcc
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.049398348010672,
- "CCSD TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.00811816], [0.0, 0.00498838, -0.00405908], [0.0, -0.00498838, -0.00405908]]
- ),
- "CCSD TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.00732388, 0.0, 0.0, 0.00366194, 0.0, 0.0, 0.00366194, 0.0, 0.0],
- [0.0, 0.71380971, 0.0, 0.0, -0.35690486, 0.27918049, 0.0, -0.35690486, -0.27918049],
- [0.0, 0.0, 0.47324568, 0.0, 0.21526997, -0.23662284, 0.0, -0.21526997, -0.23662284],
- [0.00366194, 0.0, 0.0, -0.00357321, 0.0, 0.0, -0.00008873, 0.0, 0.0],
- [0.0, -0.35690486, 0.21526997, 0.0, 0.3871942, -0.24722523, 0.0, -0.03028935, 0.03195526],
- [0.0, 0.27918049, -0.23662284, 0.0, -0.24722523, 0.22465158, 0.0, -0.03195526, 0.01197127],
- [0.00366194, 0.0, 0.0, -0.00008873, 0.0, 0.0, -0.00357321, 0.0, 0.0],
- [0.0, -0.35690486, -0.21526997, 0.0, -0.03028935, -0.03195526, 0.0, 0.3871942, 0.24722523],
- [0.0, -0.27918049, -0.23662284, 0.0, 0.03195526, 0.01197127, 0.0, 0.24722523, 0.22465158],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.005613685607, # vcc
- "(T) CORRECTION ENERGY": -0.00521238,
- "CCSD(T) TOTAL GRADIENT": np.array( # ncc fd
- [
- [0.00000000000000, 0.00000000000000, 0.01079337838744],
- [0.00000000000000, 0.00642184654717, -0.00539668919372],
- [0.00000000000000, -0.00642184654717, -0.00539668919372],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # ncc fd
- [
- [
- -0.009738397928,
- 0.0,
- 0.0,
- 0.004869198964,
- 0.0,
- 0.0,
- 0.004869198964,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.711718022073,
- 0.0,
- 0.0,
- -0.355859011036,
- 0.279305472354,
- 0.0,
- -0.355859011036,
- -0.279305472354,
- ],
- [
- 0.0,
- 0.0,
- 0.469065457749,
- 0.0,
- 0.215200115829,
- -0.234532728875,
- 0.0,
- -0.215200115829,
- -0.234532728875,
- ],
- [
- 0.004869198964,
- 0.0,
- 0.0,
- -0.004677737322,
- 0.0,
- 0.0,
- -0.000191461642,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.355859011036,
- 0.215200115829,
- 0.0,
- 0.385717829378,
- -0.247252794091,
- 0.0,
- -0.029858818342,
- 0.032052678263,
- ],
- [
- 0.0,
- 0.279305472354,
- -0.234532728875,
- 0.0,
- -0.247252794091,
- 0.223154182027,
- 0.0,
- -0.032052678263,
- 0.011378546847,
- ],
- [
- 0.004869198964,
- 0.0,
- 0.0,
- -0.000191461642,
- 0.0,
- 0.0,
- -0.004677737322,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.355859011036,
- -0.215200115829,
- 0.0,
- -0.029858818342,
- -0.032052678263,
- 0.0,
- 0.385717829378,
- 0.247252794091,
- ],
- [
- 0.0,
- -0.279305472354,
- -0.234532728875,
- 0.0,
- 0.032052678263,
- 0.011378546847,
- 0.0,
- 0.247252794091,
- 0.223154182027,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.005209699406797, # ncc
- "A-CCSD(T) TOTAL GRADIENT": np.array( # ccenergy fd
- [
- [0.00000000000000, 0.00000000000000, 0.01072309503834],
- [0.00000000000000, 0.00639691786956, -0.00536154751917],
- [0.00000000000000, -0.00639691786956, -0.00536154751917],
- ]
- ),
- "B(T) CORRECTION ENERGY": -0.005653584466044, # ccenergy only
- "CC3 CORRELATION ENERGY": -0.232764956682754, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.2327434892835214, # mrcc
- "CCSDT-1A TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01100789973884],
- [0.00000000000000, 0.00656715463790, -0.00550394986942],
- [0.00000000000000, -0.00656715463790, -0.00550394986942],
- ]
- ),
- "CCSDT-1A TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.00993141, 0.0, 0.0, 0.00496571, 0.0, 0.0, 0.00496571, 0.0, 0.0],
- [0.0, 0.71162074, 0.0, 0.0, -0.35581037, 0.27934255, 0.0, -0.35581037, -0.27934255],
- [0.0, 0.0, 0.4686399, 0.0, 0.21523949, -0.23431995, 0.0, -0.21523949, -0.23431995],
- [0.00496571, 0.0, 0.0, -0.00477664, 0.0, 0.0, -0.00018907, 0.0, 0.0],
- [0.0, -0.35581037, 0.21523949, 0.0, 0.38585314, -0.24729102, 0.0, -0.03004277, 0.03205153],
- [0.0, 0.27934255, -0.23431995, 0.0, -0.24729102, 0.22301133, 0.0, -0.03205153, 0.01130862],
- [0.00496571, 0.0, 0.0, -0.00018907, 0.0, 0.0, -0.00477664, 0.0, 0.0],
- [0.0, -0.35581037, -0.21523949, 0.0, -0.03004277, -0.03205153, 0.0, 0.38585314, 0.24729102],
- [0.0, -0.27934255, -0.23431995, 0.0, 0.03205153, 0.01130862, 0.0, 0.24729102, 0.22301133],
- ]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.23274736711556443, # mrcc
- "CCSDT-1B TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01100335606981],
- [0.00000000000000, 0.00656630481721, -0.00550167803491],
- [0.00000000000000, -0.00656630481721, -0.00550167803491],
- ]
- ),
- "CCSDT-1B TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.00992728, 0.0, 0.0, 0.00496364, 0.0, 0.0, 0.00496364, 0.0, 0.0],
- [0.0, 0.71160797, 0.0, 0.0, -0.35580398, 0.27933599, 0.0, -0.35580398, -0.27933599],
- [0.0, 0.0, 0.46863418, 0.0, 0.21524634, -0.23431709, 0.0, -0.21524634, -0.23431709],
- [0.00496364, 0.0, 0.0, -0.0047753, 0.0, 0.0, -0.00018834, 0.0, 0.0],
- [0.0, -0.35580398, 0.21524634, 0.0, 0.38559464, -0.24729116, 0.0, -0.02979065, 0.03204483],
- [0.0, 0.27933599, -0.23431709, 0.0, -0.24729116, 0.22300767, 0.0, -0.03204483, 0.01130942],
- [0.00496364, 0.0, 0.0, -0.00018834, 0.0, 0.0, -0.0047753, 0.0, 0.0],
- [0.0, -0.35580398, -0.21524634, 0.0, -0.02979065, -0.03204483, 0.0, 0.38559464, 0.24729116],
- [0.0, -0.27933599, -0.23431709, 0.0, 0.03204483, 0.01130942, 0.0, 0.24729116, 0.22300767],
- ]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.232250104269, # ecc
- "CCSDT-2 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01067153233521],
- [0.00000000000000, 0.00637295285347, -0.00533576616760],
- [0.00000000000000, -0.00637295285347, -0.00533576616760],
- ]
- ),
- "CCSDT-2 TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- "CCSDT-3 CORRELATION ENERGY": -0.23227192730338686, # mrcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.01069509383085],
- [0.00000000000000, 0.00638565480574, -0.00534754691542],
- [0.00000000000000, -0.00638565480574, -0.00534754691542],
- ]
- ),
- "CCSDT-3 TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.00964914, 0.0, 0.0, 0.00482457, 0.0, 0.0, 0.00482457, 0.0, 0.0],
- [0.0, 0.7116635, 0.0, 0.0, -0.35583175, 0.27924979, 0.0, -0.35583175, -0.27924979],
- [0.0, 0.0, 0.46915589, 0.0, 0.21525082, -0.23457795, 0.0, -0.21525082, -0.23457795],
- [0.00482457, 0.0, 0.0, -0.00464265, 0.0, 0.0, -0.00018191, 0.0, 0.0],
- [0.0, -0.35583175, 0.21525082, 0.0, 0.38572295, -0.24725031, 0.0, -0.0298912, 0.03199949],
- [0.0, 0.27924979, -0.23457795, 0.0, -0.24725031, 0.22316784, 0.0, -0.03199949, 0.01141011],
- [0.00482457, 0.0, 0.0, -0.00018191, 0.0, 0.0, -0.00464265, 0.0, 0.0],
- [0.0, -0.35583175, -0.21525082, 0.0, -0.0298912, -0.03199949, 0.0, 0.38572295, 0.24725031],
- [0.0, -0.27924979, -0.23457795, 0.0, 0.03199949, 0.01141011, 0.0, 0.24725031, 0.22316784],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.232619797476334, # ncc
- "CCSDT TOTAL GRADIENT": np.array(
- [ # ecc
- 0.000000000000000,
- 0.000000000000000,
- 0.010883725577495,
- 0.000000000000000,
- 0.006489002186983,
- -0.005441862788749,
- 0.000000000000000,
- -0.006489002186983,
- -0.005441862788749,
- ]
- ).reshape((-1, 3)),
- "CCSDT TOTAL HESSIAN": np.array( # ecc
- [
- [
- -9.81991250e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.90995620e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.90995620e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.11412515e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.55706258e-01,
- 2.79218906e-01,
- 0.00000000e00,
- -3.55706258e-01,
- -2.79218906e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.68988233e-01,
- 0.00000000e00,
- 2.15192437e-01,
- -2.34494116e-01,
- 0.00000000e00,
- -2.15192437e-01,
- -2.34494116e-01,
- ],
- [
- 4.90995620e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.72159190e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.88364300e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.55706258e-01,
- 2.15192437e-01,
- 0.00000000e00,
- 3.85602165e-01,
- -2.47205672e-01,
- 0.00000000e00,
- -2.98959074e-02,
- 3.20132343e-02,
- ],
- [
- 0.00000000e00,
- 2.79218906e-01,
- -2.34494116e-01,
- 0.00000000e00,
- -2.47205672e-01,
- 2.23077632e-01,
- 0.00000000e00,
- -3.20132343e-02,
- 1.14164840e-02,
- ],
- [
- 4.90995620e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.88364300e-04,
- 0.00000000e00,
- 0.00000000e00,
- -4.72159190e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.55706258e-01,
- -2.15192437e-01,
- 0.00000000e00,
- -2.98959074e-02,
- -3.20132343e-02,
- 0.00000000e00,
- 3.85602165e-01,
- 2.47205672e-01,
- ],
- [
- 0.00000000e00,
- -2.79218906e-01,
- -2.34494116e-01,
- 0.00000000e00,
- 3.20132343e-02,
- 1.14164840e-02,
- 0.00000000e00,
- 2.47205672e-01,
- 2.23077632e-01,
- ],
- ]
- ),
- "[Q] CORRECTION ENERGY": -0.000288788062660, # ncc
- "(Q) CORRECTION ENERGY": -0.000503838444143, # ncc
- "CCSDTQ CORRELATION ENERGY": -0.233074721244323, # ncc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0011942797, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.2309009256, # p4n (core-occ rotations neglected)
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": 0.001125755, # qchem
- "OCCD CORRELATION ENERGY": -0.226880992, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, 0.00797428, 0, 0.00488548, -0.00398714, 0, -0.00488548, -0.00398714]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.379687335481, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.24515185206,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06126410,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.00033347691,
- 0.0,
- -0.00056224437,
- -0.000166738455,
- 0.0,
- 0.00056224437,
- -0.000166738455,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [
- -3.00880800e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.50440400e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.50440400e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 7.00166972e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.50083486e-01,
- 2.71180080e-01,
- 0.00000000e00,
- -3.50083486e-01,
- -2.71180080e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.59237517e-01,
- 0.00000000e00,
- 2.06356325e-01,
- -2.29618758e-01,
- 0.00000000e00,
- -2.06356325e-01,
- -2.29618758e-01,
- ],
- [
- 1.50440400e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.21172300e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.71612700e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.50083486e-01,
- 2.06356325e-01,
- 0.00000000e00,
- 3.80842059e-01,
- -2.38768202e-01,
- 0.00000000e00,
- -3.07585729e-02,
- 3.24118773e-02,
- ],
- [
- 0.00000000e00,
- 2.71180080e-01,
- -2.29618758e-01,
- 0.00000000e00,
- -2.38768202e-01,
- 2.19990798e-01,
- 0.00000000e00,
- -3.24118773e-02,
- 9.62796070e-03,
- ],
- [
- 1.50440400e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.71612700e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.21172300e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.50083486e-01,
- -2.06356325e-01,
- 0.00000000e00,
- -3.07585729e-02,
- -3.24118773e-02,
- 0.00000000e00,
- 3.80842059e-01,
- 2.38768202e-01,
- ],
- [
- 0.00000000e00,
- -2.71180080e-01,
- -2.29618758e-01,
- 0.00000000e00,
- 3.24118773e-02,
- 9.62796070e-03,
- 0.00000000e00,
- 2.38768202e-01,
- 2.19990798e-01,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.24747734, # fnocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.05558309, # fnocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.006163797026, 0.0, -0.004106253706, 0.003081898513, 0.0, 0.004106253706, 0.003081898513]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.25063260, # vcc
- "MP4(T) CORRECTION ENERGY": -0.007755518242, # vcc
- "CISD CORRELATION ENERGY": -0.24016600239402, # vcc
- "QCISD CORRELATION ENERGY": -0.25077731041751, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00687323, # vcc
- "REMP2 CORRELATION ENERGY": -0.251018009939, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.055360085349, # occ, tight
- "LCCD CORRELATION ENERGY": -0.2531942099, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.053842594884, # fnocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.001471171285, 0.0, -0.001391395837, 0.000735585643, 0.0, 0.001391395837, 0.000735585643]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2553008820, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.054321637599, # fnocc
- "CEPA(1) CORRELATION ENERGY": -0.25091653, # fnocc
- "CEPA(1) SINGLES ENERGY": 0.0,
- "CEPA(1) SAME-SPIN CORRELATION ENERGY": -0.05365022, # fnocc
- "CEPA(3) CORRELATION ENERGY": -0.24794377, # fnocc
- "CEPA(3) SINGLES ENERGY": 0.0,
- "CEPA(3) SAME-SPIN CORRELATION ENERGY": -0.05315570, # fnocc
- "ACPF CORRELATION ENERGY": -0.25107948, # fnocc
- "ACPF SINGLES ENERGY": 0.0,
- "ACPF SAME-SPIN CORRELATION ENERGY": -0.05369031, # fnocc
- "AQCC CORRELATION ENERGY": -0.24771962, # fnocc
- "AQCC SINGLES ENERGY": 0.0,
- "AQCC SAME-SPIN CORRELATION ENERGY": -0.05317473, # fnocc
- "CCD CORRELATION ENERGY": -0.24885097949989, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.05375108, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc
- [[0.0, 0.0, -0.0038684502], [0.0, -0.0026251298, 0.0019342251], [0.0, 0.0026251298, 0.0019342251]]
- ),
- "BCCD CORRELATION ENERGY": -0.24995280, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.247440256353710, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.002577148521, 0.0, 0.000581020448, -0.001288574261, 0.0, -0.000581020448, -0.001288574261]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.250330548844,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.054051928864870,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- -0.002486174824,
- 0.0,
- -0.001923330621,
- 0.001243087412,
- 0.0,
- 0.001923330621,
- 0.001243087412,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [
- 2.24316860e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.12158430e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.12158430e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.92694865e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.46347433e-01,
- 2.67302412e-01,
- 0.00000000e00,
- -3.46347433e-01,
- -2.67302412e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.64489488e-01,
- 0.00000000e00,
- 2.03993780e-01,
- -2.32244744e-01,
- 0.00000000e00,
- -2.03993780e-01,
- -2.32244744e-01,
- ],
- [
- -1.12158430e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.23261320e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.11028900e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.46347433e-01,
- 2.03993780e-01,
- 0.00000000e00,
- 3.79028763e-01,
- -2.35648096e-01,
- 0.00000000e00,
- -3.26813308e-02,
- 3.16543160e-02,
- ],
- [
- 0.00000000e00,
- 2.67302412e-01,
- -2.32244744e-01,
- 0.00000000e00,
- -2.35648096e-01,
- 2.20278013e-01,
- 0.00000000e00,
- -3.16543160e-02,
- 1.19667307e-02,
- ],
- [
- -1.12158430e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.11028900e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.23261320e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.46347433e-01,
- -2.03993780e-01,
- 0.00000000e00,
- -3.26813308e-02,
- -3.16543160e-02,
- 0.00000000e00,
- 3.79028763e-01,
- 2.35648096e-01,
- ],
- [
- 0.00000000e00,
- -2.67302412e-01,
- -2.32244744e-01,
- 0.00000000e00,
- 3.16543160e-02,
- 1.19667307e-02,
- 0.00000000e00,
- 2.35648096e-01,
- 2.20278013e-01,
- ],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.007366570060, # vcc
- "(T) CORRECTION ENERGY": -0.007096579721,
- "CCSD(T) TOTAL GRADIENT": np.array( # ncc fd
- [
- [0.00000000000000, 0.00000000000000, 0.00065323185711],
- [0.00000000000000, -0.00035236679634, -0.00032661592856],
- [0.00000000000000, 0.00035236679634, -0.00032661592856],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # ncc fd
- [
- [
- -0.000589405884,
- 0.0,
- 0.0,
- 0.000294702942,
- 0.0,
- 0.0,
- 0.000294702942,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.690892000177,
- 0.0,
- 0.0,
- -0.345446000089,
- 0.267700971726,
- 0.0,
- -0.345446000089,
- -0.267700971726,
- ],
- [
- 0.0,
- 0.0,
- 0.460262946323,
- 0.0,
- 0.204108329476,
- -0.230131473162,
- 0.0,
- -0.204108329476,
- -0.230131473162,
- ],
- [
- 0.000294702942,
- 0.0,
- 0.0,
- -0.000024281097,
- 0.0,
- 0.0,
- -0.000270421845,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.345446000089,
- 0.204108329476,
- 0.0,
- 0.377790533687,
- -0.235904650601,
- 0.0,
- -0.032344533598,
- 0.031796321125,
- ],
- [
- 0.0,
- 0.267700971726,
- -0.230131473162,
- 0.0,
- -0.235904650601,
- 0.218826959667,
- 0.0,
- -0.031796321125,
- 0.011304513494,
- ],
- [
- 0.000294702942,
- 0.0,
- 0.0,
- -0.000270421845,
- 0.0,
- 0.0,
- -0.000024281097,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.345446000089,
- -0.204108329476,
- 0.0,
- -0.032344533598,
- -0.031796321125,
- 0.0,
- 0.377790533687,
- 0.235904650601,
- ],
- [
- 0.0,
- -0.267700971726,
- -0.230131473162,
- 0.0,
- 0.031796321125,
- 0.011304513494,
- 0.0,
- 0.235904650601,
- 0.218826959667,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.007017918524544, # ncc
- "A-CCSD(T) TOTAL GRADIENT": np.array( # ccenergy fd
- [
- [0.00000000000000, 0.00000000000000, 0.00057233082116],
- [0.00000000000000, -0.00038770405767, -0.00028616541058],
- [0.00000000000000, 0.00038770405767, -0.00028616541058],
- ]
- ),
- "B(T) CORRECTION ENERGY": -0.00749264, # ccenergy only
- "CC3 CORRELATION ENERGY": -0.257776704633084, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.257751267313, # ecc
- "CCSDT-1A TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.00086210387602],
- [0.00000000000000, -0.00023280605874, -0.00043105193801],
- [0.00000000000000, 0.00023280605874, -0.00043105193801],
- ]
- ),
- "CCSDT-1A TOTAL HESSIAN": np.array( # mrcc
- [
- [
- -7.78035412e-04,
- 0.00000000e00,
- 0.00000000e00,
- 3.89017706e-04,
- 0.00000000e00,
- 0.00000000e00,
- 3.89017706e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.90855814e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.45427907e-01,
- 2.67759669e-01,
- 0.00000000e00,
- -3.45427907e-01,
- -2.67759669e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.59961661e-01,
- 0.00000000e00,
- 2.04153847e-01,
- -2.29980830e-01,
- 0.00000000e00,
- -2.04153847e-01,
- -2.29980830e-01,
- ],
- [
- 3.89017706e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.13247422e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.75770284e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45427907e-01,
- 2.04153847e-01,
- 0.00000000e00,
- 3.77721655e-01,
- -2.35956758e-01,
- 0.00000000e00,
- -3.22937484e-02,
- 3.18029110e-02,
- ],
- [
- 0.00000000e00,
- 2.67759669e-01,
- -2.29980830e-01,
- 0.00000000e00,
- -2.35956758e-01,
- 2.18732769e-01,
- 0.00000000e00,
- -3.18029110e-02,
- 1.12480613e-02,
- ],
- [
- 3.89017706e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.75770284e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.13247422e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45427907e-01,
- -2.04153847e-01,
- 0.00000000e00,
- -3.22937484e-02,
- -3.18029110e-02,
- 0.00000000e00,
- 3.77721655e-01,
- 2.35956758e-01,
- ],
- [
- 0.00000000e00,
- -2.67759669e-01,
- -2.29980830e-01,
- 0.00000000e00,
- 3.18029110e-02,
- 1.12480613e-02,
- 0.00000000e00,
- 2.35956758e-01,
- 2.18732769e-01,
- ],
- ]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.257755250971, # ecc
- "CCSDT-1B TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.00086535505446],
- [0.00000000000000, -0.00023045568589, -0.00043267752723],
- [0.00000000000000, 0.00023045568589, -0.00043267752723],
- ]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.257108846844, # vcc
- "CCSDT-2 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.00049220649666],
- [0.00000000000000, -0.00043758137368, -0.00024610324833],
- [0.00000000000000, 0.00043758137368, -0.00024610324833],
- ]
- ),
- "CCSDT-3 CORRELATION ENERGY": -0.25713217826377, # vcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # ecc by psi fd STAR
- [
- [0.00000000000000, 0.00000000000000, 0.00051263693668],
- [0.00000000000000, -0.00042772129404, -0.00025631846834],
- [0.00000000000000, 0.00042772129404, -0.00025631846834],
- ]
- ),
- "CCSDT-3 TOTAL HESSIAN": np.array( # mrcc
- [
- [-0.000462718541, 0.0, 0.0, 0.00023135927, 0.0, 0.0, 0.00023135927, 0.0, 0.0],
- [
- 0.0,
- 0.690863579709,
- 0.0,
- 0.0,
- -0.345431789855,
- 0.26764066777,
- 0.0,
- -0.345431789855,
- -0.26764066777,
- ],
- [
- 0.0,
- 0.0,
- 0.460459119187,
- 0.0,
- 0.204125984085,
- -0.230229559594,
- 0.0,
- -0.204125984085,
- -0.230229559594,
- ],
- [0.00023135927, 0.0, 0.0, 0.000033666172, 0.0, 0.0, -0.000265025443, 0.0, 0.0],
- [
- 0.0,
- -0.345431789855,
- 0.204125984085,
- 0.0,
- 0.377813669112,
- -0.235883325927,
- 0.0,
- -0.032381879257,
- 0.031757341842,
- ],
- [
- 0.0,
- 0.26764066777,
- -0.230229559594,
- 0.0,
- -0.235883325927,
- 0.218879113252,
- 0.0,
- -0.031757341842,
- 0.011350446342,
- ],
- [0.00023135927, 0.0, 0.0, -0.000265025443, 0.0, 0.0, 0.000033666172, 0.0, 0.0],
- [
- 0.0,
- -0.345431789855,
- -0.204125984085,
- 0.0,
- -0.032381879257,
- -0.031757341842,
- 0.0,
- 0.377813669112,
- 0.235883325927,
- ],
- [
- 0.0,
- -0.26764066777,
- -0.230229559594,
- 0.0,
- 0.031757341842,
- 0.011350446342,
- 0.0,
- 0.235883325927,
- 0.218879113252,
- ],
- ]
- ),
- "CCSDT CORRELATION ENERGY": -0.257494892048411, # ncc
- "CCSDT TOTAL GRADIENT": np.array(
- [ # ecc
- 0.000000000000000,
- 0.000000000000000,
- 0.000614598836608,
- 0.000000000000000,
- -0.000362082670346,
- -0.000307299418304,
- 0.000000000000000,
- 0.000362082670346,
- -0.000307299418304,
- ]
- ).reshape((-1, 3)),
- "CCSDT TOTAL HESSIAN": np.array( # ecc
- [
- [
- -5.54525900e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.77262900e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.77262900e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.90642317e-01,
- 0.00000000e00,
- 0.00000000e00,
- -3.45321159e-01,
- 2.67590889e-01,
- 0.00000000e00,
- -3.45321159e-01,
- -2.67590889e-01,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 4.60364322e-01,
- 0.00000000e00,
- 2.04091988e-01,
- -2.30182161e-01,
- 0.00000000e00,
- -2.04091988e-01,
- -2.30182161e-01,
- ],
- [
- 2.77262900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.21557000e-05,
- 0.00000000e00,
- 0.00000000e00,
- -2.65107200e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45321159e-01,
- 2.04091988e-01,
- 0.00000000e00,
- 3.77718239e-01,
- -2.35841439e-01,
- 0.00000000e00,
- -3.23970809e-02,
- 3.17494501e-02,
- ],
- [
- 0.00000000e00,
- 2.67590889e-01,
- -2.30182161e-01,
- 0.00000000e00,
- -2.35841439e-01,
- 2.18813058e-01,
- 0.00000000e00,
- -3.17494501e-02,
- 1.13691031e-02,
- ],
- [
- 2.77262900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -2.65107200e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.21557000e-05,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.45321159e-01,
- -2.04091988e-01,
- 0.00000000e00,
- -3.23970809e-02,
- -3.17494501e-02,
- 0.00000000e00,
- 3.77718239e-01,
- 2.35841439e-01,
- ],
- [
- 0.00000000e00,
- -2.67590889e-01,
- -2.30182161e-01,
- 0.00000000e00,
- 3.17494501e-02,
- 1.13691031e-02,
- 0.00000000e00,
- 2.35841439e-01,
- 2.18813058e-01,
- ],
- ]
- ),
- "[Q] CORRECTION ENERGY": -0.000151213601440, # ncc
- "(Q) CORRECTION ENERGY": -0.000368016662584, # ncc
- "CCSDTQ CORRELATION ENERGY": -0.257824320323573, # ncc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0012982937, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.2544819317, # p4n (core-occ rotations neglected)
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": 0.001225751, # qchem
- "OCCD CORRELATION ENERGY": -0.250044802, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, -0.00269153, 0, -0.00204152, 0.00134576, 0, 0.00204152, 0.00134576]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.409701597936, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.058423513790,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001767468898,
- "MP2 TOTAL GRADIENT": np.array(
- # switched sign from unkn origin
- [
- 0.000000000000000,
- 0.000000000000000,
- 0.012305278627642,
- 0.000000000000000,
- 0.000000000000000,
- -0.011851332672482,
- 0.000000000000000,
- 0.010327045553422,
- -0.000226972977580,
- 0.000000000000000,
- -0.010327045553422,
- -0.000226972977580,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [
- 3.34735620e-03,
- 0.00000000e00,
- 0.00000000e00,
- -3.92156600e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.87104900e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.87104900e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 3.25884470e-03,
- 0.00000000e00,
- 0.00000000e00,
- -3.78117870e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.61167000e-04,
- 4.35841400e-04,
- 0.00000000e00,
- 2.61167000e-04,
- -4.35841400e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.15996143e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.13938386e-01,
- 0.00000000e00,
- 1.11245210e-03,
- -1.02887840e-03,
- 0.00000000e00,
- -1.11245210e-03,
- -1.02887840e-03,
- ],
- [
- -3.92156600e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.26586180e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.72147900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.72147900e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -3.78117870e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.18188010e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.00350700e-04,
- 8.01285000e-05,
- 0.00000000e00,
- -2.00350700e-04,
- -8.01285000e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.13938386e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.14114521e-01,
- 0.00000000e00,
- 1.83716000e-05,
- -8.80676000e-05,
- 0.00000000e00,
- -1.83716000e-05,
- -8.80676000e-05,
- ],
- [
- 2.87104900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.72147900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -7.41277320e-03,
- 0.00000000e00,
- 0.00000000e00,
- 7.29781620e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.61167000e-04,
- 1.11245210e-03,
- 0.00000000e00,
- -2.00350700e-04,
- 1.83716000e-05,
- 0.00000000e00,
- 4.11361597e-01,
- -8.23396800e-04,
- 0.00000000e00,
- -4.11422413e-01,
- -3.07426900e-04,
- ],
- [
- 0.00000000e00,
- 4.35841400e-04,
- -1.02887840e-03,
- 0.00000000e00,
- 8.01285000e-05,
- -8.80676000e-05,
- 0.00000000e00,
- -8.23396800e-04,
- -4.65210960e-03,
- 0.00000000e00,
- 3.07426900e-04,
- 5.76905560e-03,
- ],
- [
- 2.87104900e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.72147900e-04,
- 0.00000000e00,
- 0.00000000e00,
- 7.29781620e-03,
- 0.00000000e00,
- 0.00000000e00,
- -7.41277320e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.61167000e-04,
- -1.11245210e-03,
- 0.00000000e00,
- -2.00350700e-04,
- -1.83716000e-05,
- 0.00000000e00,
- -4.11422413e-01,
- 3.07426900e-04,
- 0.00000000e00,
- 4.11361597e-01,
- 8.23396800e-04,
- ],
- [
- 0.00000000e00,
- -4.35841400e-04,
- -1.02887840e-03,
- 0.00000000e00,
- -8.01285000e-05,
- -8.80676000e-05,
- 0.00000000e00,
- -3.07426900e-04,
- 5.76905560e-03,
- 0.00000000e00,
- 8.23396800e-04,
- -4.65210960e-03,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.07375810, # occ
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00220392, # occ
- "MP3 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.009100318483,
- 0.0,
- 0.0,
- -0.008860556313,
- 0.0,
- 0.012722119397,
- -0.000119881085,
- 0.0,
- -0.012722119397,
- -0.000119881085,
- ]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.07825006, # vcc only
- "MP4(T) CORRECTION ENERGY": -0.000237348957, # vcc only
- "CISD CORRELATION ENERGY": -0.07917581082828, # vcc
- "QCISD CORRELATION ENERGY": -0.08117897504733, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00060269, # vcc only
- "REMP2 CORRELATION ENERGY": -0.07701467620060, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.00219044944957, # occ. tight
- "LCCD CORRELATION ENERGY": -0.0824313452, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0022532590, # occ
- "LCCD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.004402112418,
- 0.0,
- 0.0,
- -0.004307902536,
- 0.0,
- 0.015259701356,
- -0.000047104941,
- 0.0,
- -0.015259701356,
- -0.000047104941,
- ]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.0837903430, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.0022897, # vcc
- "CCD CORRELATION ENERGY": -0.08014654379229, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.0022032, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc
- [
- [0.0, 0.0, 0.0061586096],
- [0.0, 0.0, -0.0059576188],
- [0.0, 0.0144468804, -0.0001004954],
- [0.0, -0.0144468804, -0.0001004954],
- ]
- ),
- "BCCD CORRELATION ENERGY": -0.08117235, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.0587557596, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [
- 0.0,
- 0.0,
- 0.011903275003,
- 0.0,
- 0.0,
- -0.011481983661,
- 0.0,
- 0.010549441714,
- -0.000210645671,
- 0.0,
- -0.010549441714,
- -0.000210645671,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08117105566,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.002231965267,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.00496423512,
- 0.0,
- 0.0,
- -0.004814203262,
- 0.0,
- 0.014877060204,
- -0.000075015929,
- 0.0,
- -0.014877060204,
- -0.000075015929,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [
- 6.58519500e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.09716090e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.19320700e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.19320700e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 6.18973300e-04,
- 0.00000000e00,
- 0.00000000e00,
- -9.89916500e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.85471600e-04,
- 4.42369000e-04,
- 0.00000000e00,
- 1.85471600e-04,
- -4.42369000e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.06191545e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.04510095e-01,
- 0.00000000e00,
- 1.15490300e-03,
- -8.40725200e-04,
- 0.00000000e00,
- -1.15490300e-03,
- -8.40725200e-04,
- ],
- [
- -1.09716090e-03,
- 0.00000000e00,
- 0.00000000e00,
- 1.38536200e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.44100500e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.44100500e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -9.89916500e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.31932370e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.64703600e-04,
- 5.07376000e-05,
- 0.00000000e00,
- -1.64703600e-04,
- -5.07376000e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.04510095e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.04625444e-01,
- 0.00000000e00,
- 1.61035900e-04,
- -5.76744000e-05,
- 0.00000000e00,
- -1.61035900e-04,
- -5.76744000e-05,
- ],
- [
- 2.19320700e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.44100500e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.06335912e-02,
- 0.00000000e00,
- 0.00000000e00,
- 1.05583709e-02,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.85471600e-04,
- 1.15490300e-03,
- 0.00000000e00,
- -1.64703600e-04,
- 1.61035900e-04,
- 0.00000000e00,
- 4.07395303e-01,
- -9.04522700e-04,
- 0.00000000e00,
- -4.07416071e-01,
- -4.11416200e-04,
- ],
- [
- 0.00000000e00,
- 4.42369000e-04,
- -8.40725200e-04,
- 0.00000000e00,
- 5.07376000e-05,
- -5.76744000e-05,
- 0.00000000e00,
- -9.04522700e-04,
- -8.14010510e-03,
- 0.00000000e00,
- 4.11416200e-04,
- 9.03850480e-03,
- ],
- [
- 2.19320700e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.44100500e-04,
- 0.00000000e00,
- 0.00000000e00,
- 1.05583709e-02,
- 0.00000000e00,
- 0.00000000e00,
- -1.06335912e-02,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 1.85471600e-04,
- -1.15490300e-03,
- 0.00000000e00,
- -1.64703600e-04,
- -1.61035900e-04,
- 0.00000000e00,
- -4.07416071e-01,
- 4.11416200e-04,
- 0.00000000e00,
- 4.07395303e-01,
- 9.04522700e-04,
- ],
- [
- 0.00000000e00,
- -4.42369000e-04,
- -8.40725200e-04,
- 0.00000000e00,
- -5.07376000e-05,
- -5.76744000e-05,
- 0.00000000e00,
- -4.11416200e-04,
- 9.03850480e-03,
- 0.00000000e00,
- 9.04522700e-04,
- -8.14010510e-03,
- ],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.000606865286, # vcc
- "(T) CORRECTION ENERGY": -0.00060401,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.00446268840416],
- [0.00000000000000, 0.00000000000000, -0.00439493294278],
- [0.00000000000000, 0.01495635291373, -0.00003387773069],
- [0.00000000000000, -0.01495635291373, -0.00003387773069],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # vcc fd
- [
- [
- 0.000493717382,
- 0.0,
- 0.0,
- -0.00091720077,
- 0.0,
- 0.0,
- 0.000211741694,
- 0.0,
- 0.0,
- 0.000211741694,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.000457061127,
- 0.0,
- 0.0,
- -0.000812917213,
- 0.0,
- 0.0,
- 0.000177928043,
- 0.000438798747,
- 0.0,
- 0.000177928043,
- -0.000438798747,
- ],
- [
- 0.0,
- 0.0,
- 0.206046933798,
- 0.0,
- 0.0,
- -0.204504540896,
- 0.0,
- 0.001278605784,
- -0.000771196451,
- 0.0,
- -0.001278605784,
- -0.000771196451,
- ],
- [
- -0.00091720077,
- 0.0,
- 0.0,
- 0.001205452004,
- 0.0,
- 0.0,
- -0.000144125617,
- 0.0,
- 0.0,
- -0.000144125617,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.000812917213,
- 0.0,
- 0.0,
- 0.001141063782,
- 0.0,
- 0.0,
- -0.000164073285,
- 0.000047332929,
- 0.0,
- -0.000164073285,
- -0.000047332929,
- ],
- [
- 0.0,
- 0.0,
- -0.204504540896,
- 0.0,
- 0.0,
- 0.204650897031,
- 0.0,
- 0.000135987404,
- -0.000073178067,
- 0.0,
- -0.000135987404,
- -0.000073178067,
- ],
- [
- 0.000211741694,
- 0.0,
- 0.0,
- -0.000144125617,
- 0.0,
- 0.0,
- -0.010686239837,
- 0.0,
- 0.0,
- 0.01061862376,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.000177928043,
- 0.001278605784,
- 0.0,
- -0.000164073285,
- 0.000135987404,
- 0.0,
- 0.407325954394,
- -0.000950362432,
- 0.0,
- -0.407339809152,
- -0.000464230756,
- ],
- [
- 0.0,
- 0.000438798747,
- -0.000771196451,
- 0.0,
- 0.000047332929,
- -0.000073178067,
- 0.0,
- -0.000950362432,
- -0.008256200737,
- 0.0,
- 0.000464230756,
- 0.009100575256,
- ],
- [
- 0.000211741694,
- 0.0,
- 0.0,
- -0.000144125617,
- 0.0,
- 0.0,
- 0.01061862376,
- 0.0,
- 0.0,
- -0.010686239837,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.000177928043,
- -0.001278605784,
- 0.0,
- -0.000164073285,
- -0.000135987404,
- 0.0,
- -0.407339809152,
- 0.000464230756,
- 0.0,
- 0.407325954394,
- 0.000950362432,
- ],
- [
- 0.0,
- -0.000438798747,
- -0.000771196451,
- 0.0,
- -0.000047332929,
- -0.000073178067,
- 0.0,
- -0.000464230756,
- 0.009100575256,
- 0.0,
- 0.000950362432,
- -0.008256200737,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.000587873, # mrcc only
- "B(T) CORRECTION ENERGY": -0.00061086, # ccenergy only
- "CC3 CORRELATION ENERGY": -0.081776957269437, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.081774257938, # ecc
- "CCSDT-1B CORRELATION ENERGY": -0.081772270576, # ecc
- "CCSDT-2 CORRELATION ENERGY": -0.081772292290, # ecc
- "CCSDT-3 CORRELATION ENERGY": -0.08177701734273, # vcc
- "CCSDT CORRELATION ENERGY": -0.08208821205578, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0014923056, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.0839163095, # p4n (core-occ rotations neglected)
- "OLCCD SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": 0.001154566, # qchem
- "OCCD CORRELATION ENERGY": -0.081188108, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, 0.00494989, 0, 0, -0.00479521, 0, 0.01487079, -0.00007734, 0, -0.01487079, -0.00007734]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -26.072618722961, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.15242755400188052,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03445360441348938,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.026279427993,
- 0.0,
- 0.013998590506,
- -0.013139713997,
- 0.0,
- -0.013998590506,
- -0.013139713997,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [-0.02266258, 0.0, 0.0, 0.01133129, 0.0, 0.0, 0.01133129, 0.0, 0.0],
- [0.0, 0.62640007, 0.0, 0.0, -0.31320003, 0.24902164, 0.0, -0.31320003, -0.24902164],
- [0.0, 0.0, 0.39927018, 0.0, 0.19168818, -0.19963509, 0.0, -0.19168818, -0.19963509],
- [0.01133129, 0.0, 0.0, -0.01029722, 0.0, 0.0, -0.00103408, 0.0, 0.0],
- [0.0, -0.31320003, 0.19168818, 0.0, 0.3403478, -0.22035491, 0.0, -0.02714777, 0.02866673],
- [0.0, 0.24902164, -0.19963509, 0.0, -0.22035491, 0.19072649, 0.0, -0.02866673, 0.0089086],
- [0.01133129, 0.0, 0.0, -0.00103408, 0.0, 0.0, -0.01029722, 0.0, 0.0],
- [0.0, -0.31320003, -0.19168818, 0.0, -0.02714777, -0.02866673, 0.0, 0.3403478, 0.22035491],
- [0.0, -0.24902164, -0.19963509, 0.0, 0.02866673, 0.0089086, 0.0, 0.22035491, 0.19072649],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.16862935, # occ
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03463618, # occ
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.027862081662, 0.0, 0.014906293724, -0.013931040831, 0.0, -0.014906293724, -0.013931040831]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.17088317, # vcc only
- "MP4(T) CORRECTION ENERGY": -0.003237304648, # vcc only
- "CISD CORRELATION ENERGY": -0.16574719763576, # vcc
- "QCISD CORRELATION ENERGY": -0.17187325792329, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00368626, # vcc only
- "REMP2 CORRELATION ENERGY": -0.170214503998, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.033849141454, # occ, tight
- "LCCD CORRELATION ENERGY": -0.1747537294, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0334378864, # occ
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.031468252099, 0.0, 0.017115261595, -0.015734126049, 0.0, -0.017115261595, -0.015734126049]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.1763496376, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.0337624, # vcc
- "CCD CORRELATION ENERGY": -0.17052107838019, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.033058, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc by psi findif
- [[0.0, 0.0, 0.02892979], [0.0, 0.01570148, -0.01446489], [0.0, -0.01570148, -0.01446489]]
- ),
- "BCCD CORRELATION ENERGY": -0.171452568164837, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.1536230809, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.027451749814, 0.0, 0.014623148752, -0.013725874907, 0.0, -0.014623148752, -0.013725874907]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.1716495276047496, # mrcc
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.033248190929062,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.030055915902,
- 0.0,
- 0.016307167756,
- -0.015027957951,
- 0.0,
- -0.016307167756,
- -0.015027957951,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.02591931, 0.0, 0.0, 0.01295966, 0.0, 0.0, 0.01295966, 0.0, 0.0],
- [0.0, 0.6170188, 0.0, 0.0, -0.3085094, 0.24667188, 0.0, -0.3085094, -0.24667188],
- [0.0, 0.0, 0.39656797, 0.0, 0.19003804, -0.19828399, 0.0, -0.19003804, -0.19828399],
- [0.01295966, 0.0, 0.0, -0.01187521, 0.0, 0.0, -0.00108444, 0.0, 0.0],
- [0.0, -0.3085094, 0.19003804, 0.0, 0.33664846, -0.21835496, 0.0, -0.02813906, 0.02831692],
- [0.0, 0.24667188, -0.19828399, 0.0, -0.21835496, 0.1883856, 0.0, -0.02831692, 0.00989838],
- [0.01295966, 0.0, 0.0, -0.00108444, 0.0, 0.0, -0.01187521, 0.0, 0.0],
- [0.0, -0.3085094, -0.19003804, 0.0, -0.02813906, -0.02831692, 0.0, 0.33664846, 0.21835496],
- [0.0, -0.24667188, -0.19828399, 0.0, 0.02831692, 0.00989838, 0.0, 0.21835496, 0.1883856],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.003956941783, # vcc
- "(T) CORRECTION ENERGY": -0.00381116,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.03193430184375],
- [0.00000000000000, 0.01730212130253, -0.01596715092187],
- [0.00000000000000, -0.01730212130253, -0.01596715092187],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # vcc fd
- [
- [
- -0.027539040923,
- 0.0,
- 0.0,
- 0.013769520462,
- 0.0,
- 0.0,
- 0.013769520462,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- 0.615442549333,
- 0.0,
- 0.0,
- -0.307721274667,
- 0.246688641005,
- 0.0,
- -0.307721274667,
- -0.246688641005,
- ],
- [
- 0.0,
- 0.0,
- 0.39351580275,
- 0.0,
- 0.189939555413,
- -0.196757901375,
- 0.0,
- -0.189939555413,
- -0.196757901375,
- ],
- [
- 0.013769520462,
- 0.0,
- 0.0,
- -0.012609341037,
- 0.0,
- 0.0,
- -0.001160179424,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.307721274667,
- 0.189939555413,
- 0.0,
- 0.335534419601,
- -0.218314098209,
- 0.0,
- -0.027813144934,
- 0.028374542796,
- ],
- [
- 0.0,
- 0.246688641005,
- -0.196757901375,
- 0.0,
- -0.218314098209,
- 0.187299796614,
- 0.0,
- -0.028374542796,
- 0.009458104761,
- ],
- [
- 0.013769520462,
- 0.0,
- 0.0,
- -0.001160179424,
- 0.0,
- 0.0,
- -0.012609341037,
- 0.0,
- 0.0,
- ],
- [
- 0.0,
- -0.307721274667,
- -0.189939555413,
- 0.0,
- -0.027813144934,
- -0.028374542796,
- 0.0,
- 0.335534419601,
- 0.218314098209,
- ],
- [
- 0.0,
- -0.246688641005,
- -0.196757901375,
- 0.0,
- 0.028374542796,
- 0.009458104761,
- 0.0,
- 0.218314098209,
- 0.187299796614,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.00373191576, # mrcc only
- "B(T) CORRECTION ENERGY": -0.003997866911315, # ccenergy only
- "CC3 CORRELATION ENERGY": -0.175583616794047, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.1755715323437954, # mrcc
- "CCSDT-1A TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.03195915], [0.0, 0.01732744, -0.01597957], [0.0, -0.01732744, -0.01597957]]
- ),
- "CCSDT-1B CORRELATION ENERGY": -0.17556886143889727, # mrcc
- "CCSDT-1B TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.03195282], [0.0, 0.01732422, -0.01597641], [0.0, -0.01732422, -0.01597641]]
- ),
- "CCSDT-2 CORRELATION ENERGY": -0.175300994962, # ecc
- "CCSDT-3 CORRELATION ENERGY": -0.1753162719579464, # mrcc
- "CCSDT-3 TOTAL GRADIENT": np.array( # mrcc
- [[0.0, 0.0, 0.03180282], [0.0, 0.01723825, -0.01590141], [0.0, -0.01723825, -0.01590141]]
- ),
- "CCSDT CORRELATION ENERGY": -0.17591978591647, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0011137749, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.1759973931, # p4n (core-occ rotations neglected)
- "OLCCD SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": 0.000986681, # qchem
- "OCCD CORRELATION ENERGY": -0.171498252, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, 0.03004030, 0, 0.01627564, -0.01502015, 0, -0.01627564, -0.01502015]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.832917564913, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.171184123093,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03822454,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.014740098324,
- 0.0,
- 0.005852228009,
- -0.007370049162,
- 0.0,
- -0.005852228009,
- -0.007370049162,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # cfour
- [
- [-0.01271141, 0.0, 0.0, 0.00635571, 0.0, 0.0, 0.00635571, 0.0, 0.0],
- [0.0, 0.59697724, 0.0, 0.0, -0.29848862, 0.23391528, 0.0, -0.29848862, -0.23391528],
- [0.0, 0.0, 0.3890832, 0.0, 0.17739783, -0.1945416, 0.0, -0.17739783, -0.1945416],
- [0.00635571, 0.0, 0.0, -0.00511412, 0.0, 0.0, -0.00124159, 0.0, 0.0],
- [0.0, -0.29848862, 0.17739783, 0.0, 0.32667986, -0.20565656, 0.0, -0.02819123, 0.02825872],
- [0.0, 0.23391528, -0.1945416, 0.0, -0.20565656, 0.18507929, 0.0, -0.02825872, 0.00946231],
- [0.00635571, 0.0, 0.0, -0.00124159, 0.0, 0.0, -0.00511412, 0.0, 0.0],
- [0.0, -0.29848862, -0.17739783, 0.0, -0.02819123, -0.02825872, 0.0, 0.32667986, 0.20565656],
- [0.0, -0.23391528, -0.1945416, 0.0, 0.02825872, 0.00946231, 0.0, 0.20565656, 0.18507929],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.18575628, # occ
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03792248, # occ
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.015431661276, 0.0, 0.006103353029, -0.007715830638, 0.0, -0.006103353029, -0.007715830638]
- ).reshape((-1, 3)),
- "MP4(SDQ) CORRELATION ENERGY": -0.18773117, # vcc only
- "MP4(T) CORRECTION ENERGY": -0.004470767049, # vcc only
- "CISD CORRELATION ENERGY": -0.18202095532782, # vcc
- "QCISD CORRELATION ENERGY": -0.18852342173162, # vcc
- "QCISD(T) CORRECTION ENERGY": -0.00487511, # vcc only
- "REMP2 CORRELATION ENERGY": -0.187474026696, # occ, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.037232180981, # occ, tight
- "LCCD CORRELATION ENERGY": -0.1917024115, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0367596656, # occ
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.019152642358, 0.0, 0.008310773449, -0.009576321179, 0.0, -0.008310773449, -0.009576321179]
- ).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.1933416962, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.0370625, # vcc
- "CCD CORRELATION ENERGY": -0.18708520686363, # vcc
- "CCD SINGLES ENERGY": 0.0,
- "CCD SAME-SPIN CORRELATION ENERGY": -0.0363299, # vcc
- "CCD TOTAL GRADIENT": np.array( # vcc
- [[0.0, 0.0, 0.0166234857], [0.0, 0.0069994421, -0.0083117428], [0.0, -0.0069994421, -0.0083117428]]
- ),
- "BCCD CORRELATION ENERGY": -0.18812319, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.1725181374, # ccenergy
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.016128741574, 0.0, 0.006556602185, -0.008064370787, 0.0, -0.006556602185, -0.008064370787]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.188317222733,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.036526852874970,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.017883390799,
- 0.0,
- 0.00765987541,
- -0.0089416954,
- 0.0,
- -0.00765987541,
- -0.0089416954,
- ]
- ).reshape((-1, 3)),
- "CCSD TOTAL HESSIAN": np.array( # vcc
- [
- [-0.01542209, 0.0, 0.0, 0.00771105, 0.0, 0.0, 0.00771105, 0.0, 0.0],
- [0.0, 0.58612421, 0.0, 0.0, -0.2930621, 0.23079136, 0.0, -0.2930621, -0.23079136],
- [0.0, 0.0, 0.38586066, 0.0, 0.17492242, -0.19293033, 0.0, -0.17492242, -0.19293033],
- [0.00771105, 0.0, 0.0, -0.00638987, 0.0, 0.0, -0.00132118, 0.0, 0.0],
- [0.0, -0.2930621, 0.17492242, 0.0, 0.32224469, -0.20285689, 0.0, -0.02918259, 0.02793447],
- [0.0, 0.23079136, -0.19293033, 0.0, -0.20285689, 0.18247704, 0.0, -0.02793447, 0.01045329],
- [0.00771105, 0.0, 0.0, -0.00132118, 0.0, 0.0, -0.00638987, 0.0, 0.0],
- [0.0, -0.2930621, -0.17492242, 0.0, -0.02918259, -0.02793447, 0.0, 0.32224469, 0.20285689],
- [0.0, -0.23079136, -0.19293033, 0.0, 0.02793447, 0.01045329, 0.0, 0.20285689, 0.18247704],
- ]
- ),
- "T(CCSD) CORRECTION ENERGY": -0.005108963391, # vcc
- "(T) CORRECTION ENERGY": -0.00498265,
- "CCSD(T) TOTAL GRADIENT": np.array( # vcc fd
- [
- [0.00000000000000, 0.00000000000000, 0.02003159253303],
- [0.00000000000000, 0.00872844491897, -0.01001579626652],
- [0.00000000000000, -0.00872844491897, -0.01001579626652],
- ]
- ),
- "CCSD(T) TOTAL HESSIAN": np.array( # vcc fd
- [
- [-0.01727460991, 0.0, 0.0, 0.008637304955, 0.0, 0.0, 0.008637304955, 0.0, 0.0],
- [
- 0.0,
- 0.584492978582,
- 0.0,
- 0.0,
- -0.292246489291,
- 0.230876480089,
- 0.0,
- -0.292246489291,
- -0.230876480089,
- ],
- [
- 0.0,
- 0.0,
- 0.382520093487,
- 0.0,
- 0.174867793441,
- -0.191260046743,
- 0.0,
- -0.174867793441,
- -0.191260046743,
- ],
- [0.008637304955, 0.0, 0.0, -0.007206558163, 0.0, 0.0, -0.001430746792, 0.0, 0.0],
- [
- 0.0,
- -0.292246489291,
- 0.174867793441,
- 0.0,
- 0.321124482646,
- -0.202872136765,
- 0.0,
- -0.028877993355,
- 0.028004343324,
- ],
- [
- 0.0,
- 0.230876480089,
- -0.191260046743,
- 0.0,
- -0.202872136765,
- 0.181320766941,
- 0.0,
- -0.028004343324,
- 0.009939279803,
- ],
- [0.008637304955, 0.0, 0.0, -0.001430746792, 0.0, 0.0, -0.007206558163, 0.0, 0.0],
- [
- 0.0,
- -0.292246489291,
- -0.174867793441,
- 0.0,
- -0.028877993355,
- -0.028004343324,
- 0.0,
- 0.321124482646,
- 0.202872136765,
- ],
- [
- 0.0,
- -0.230876480089,
- -0.191260046743,
- 0.0,
- 0.028004343324,
- 0.009939279803,
- 0.0,
- 0.202872136765,
- 0.181320766941,
- ],
- ]
- ),
- "A-(T) CORRECTION ENERGY": -0.004882427, # mrcc only
- "B(T) CORRECTION ENERGY": -0.00518450, # ccenergy only
- "CC3 CORRELATION ENERGY": -0.193441818385715, # ccenergy
- "CCSDT-1A CORRELATION ENERGY": -0.193424330972, # ecc
- "CCSDT-1B CORRELATION ENERGY": -0.193423371134, # ecc
- "CCSDT-2 CORRELATION ENERGY": -0.193087540038, # vcc
- "CCSDT-3 CORRELATION ENERGY": -0.19310599643349, # vcc
- "CCSDT CORRELATION ENERGY": -0.19368177447948, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": 0.0012186690, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.1929863522, # p4n (core-occ rotations neglected)
- "OLCCD SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": 0.001089195, # qchem
- "OCCD CORRELATION ENERGY": -0.188164420, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem, rearranged
- [0, 0, 0.01780351, 0, 0.00760260, -0.00890176, 0, -0.00760260, -0.00890176]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.85411445881, # nwc 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "CISD CORRELATION ENERGY": -0.08032199708731, # vcc, sd
- "LCCSD CORRELATION ENERGY": -0.08517989, # vcc != p4n
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.08151590, # vcc nyi
- "CCD CORRELATION ENERGY": -0.08016689737891, # vcc nyi == tce, sd
- "CCSD CORRELATION ENERGY": -0.08256719,
- "CCSD SINGLES ENERGY": -0.00117001688,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.00230304,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.005323074361,
- 0.0,
- 0.0,
- -0.005174249172,
- 0.0,
- 0.014881203442,
- -0.000074412594,
- 0.0,
- -0.014881203442,
- -0.000074412594,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00068823, # cfour only
- "CCSDT CORRELATION ENERGY": -0.08361110233142, # vcc
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.059407254257,
- "MP2 SINGLES ENERGY": -0.000688368657,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001851937488,
- "MP2 TOTAL GRADIENT": np.array(
- [
- # switched sign from unkn ref
- 0.000000000000000,
- 0.000000000000000,
- 0.013388410166131,
- 0.000000000000000,
- 0.000000000000000,
- -0.012907368096590,
- 0.000000000000000,
- 0.010303507439169,
- -0.000240521034770,
- 0.000000000000000,
- -0.010303507439169,
- -0.000240521034770,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # vcc by psi fd
- [
- [
- 3.77039407e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.35686969e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.93237813e-04,
- 0.00000000e00,
- 0.00000000e00,
- 2.93237813e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 3.68005099e-03,
- 0.00000000e00,
- 0.00000000e00,
- -4.21445800e-03,
- 0.00000000e00,
- 0.00000000e00,
- 2.67203501e-04,
- 4.37851629e-04,
- 0.00000000e00,
- 2.67203501e-04,
- -4.37851629e-04,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- 2.17707108e-01,
- 0.00000000e00,
- 0.00000000e00,
- -2.15648507e-01,
- 0.00000000e00,
- 1.13660067e-03,
- -1.02930031e-03,
- 0.00000000e00,
- -1.13660067e-03,
- -1.02930031e-03,
- ],
- [
- -4.35686969e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.70636057e-03,
- 0.00000000e00,
- 0.00000000e00,
- -1.74745438e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.74745438e-04,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- -4.21445800e-03,
- 0.00000000e00,
- 0.00000000e00,
- 4.62108124e-03,
- 0.00000000e00,
- 0.00000000e00,
- -2.03311621e-04,
- 8.06365754e-05,
- 0.00000000e00,
- -2.03311621e-04,
- -8.06365754e-05,
- ],
- [
- 0.00000000e00,
- 0.00000000e00,
- -2.15648507e-01,
- 0.00000000e00,
- 0.00000000e00,
- 2.15870333e-01,
- 0.00000000e00,
- -4.83601569e-05,
- -1.10913000e-04,
- 0.00000000e00,
- 4.83601569e-05,
- -1.10913000e-04,
- ],
- [
- 2.93237813e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.74745438e-04,
- 0.00000000e00,
- 0.00000000e00,
- -7.39767359e-03,
- 0.00000000e00,
- 0.00000000e00,
- 7.27918122e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.67203501e-04,
- 1.13660067e-03,
- 0.00000000e00,
- -2.03311621e-04,
- -4.83601569e-05,
- 0.00000000e00,
- 4.11398494e-01,
- -8.03364358e-04,
- 0.00000000e00,
- -4.11462386e-01,
- -2.84876153e-04,
- ],
- [
- 0.00000000e00,
- 4.37851629e-04,
- -1.02930031e-03,
- 0.00000000e00,
- 8.06365754e-05,
- -1.10913000e-04,
- 0.00000000e00,
- -8.03364358e-04,
- -4.61144770e-03,
- 0.00000000e00,
- 2.84876153e-04,
- 5.75166101e-03,
- ],
- [
- 2.93237813e-04,
- 0.00000000e00,
- 0.00000000e00,
- -1.74745438e-04,
- 0.00000000e00,
- 0.00000000e00,
- 7.27918122e-03,
- 0.00000000e00,
- 0.00000000e00,
- -7.39767359e-03,
- 0.00000000e00,
- 0.00000000e00,
- ],
- [
- 0.00000000e00,
- 2.67203501e-04,
- -1.13660067e-03,
- 0.00000000e00,
- -2.03311621e-04,
- 4.83601569e-05,
- 0.00000000e00,
- -4.11462386e-01,
- 2.84876153e-04,
- 0.00000000e00,
- 4.11398494e-01,
- 8.03364358e-04,
- ],
- [
- 0.00000000e00,
- -4.37851629e-04,
- -1.02930031e-03,
- 0.00000000e00,
- -8.06365754e-05,
- -1.10913000e-04,
- 0.00000000e00,
- -2.84876153e-04,
- 5.75166101e-03,
- 0.00000000e00,
- 8.03364358e-04,
- -4.61144770e-03,
- ],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.074845418046, # cfour
- "MP3 SINGLES ENERGY": -0.000911987215, # cfour
- "MP3 TOTAL GRADIENT": np.array( # vcc by fd psi
- [
- [0.0, 0.0, 0.0099090428],
- [0.0, 0.0, -0.009667824547],
- [0.0, 0.012725362696, -0.000120609126],
- [0.0, -0.012725362696, -0.000120609126],
- ]
- ),
- "MP4(SDQ) CORRELATION ENERGY": -0.07930873, # vcc only, sc
- "MP4(T) CORRECTION ENERGY": -0.000289639941, # vcc only, sc
- "ZAPT2 CORRELATION ENERGY": -0.058899120423767, # detci (ZAPT uses special canonicalization but grouping here with sc)
- "CISD CORRELATION ENERGY": -0.08031834747884, # vcc only, sc
- "LCCD CORRELATION ENERGY": -0.0824056198, # p4n (likely sd since tce matches but leaving here until detangled)
- # "LCCSD CORRELATION ENERGY": -0.0851177481, # p4n (was uncommented)
- "LCCSD CORRELATION ENERGY": -0.08517509, # vcc nyi
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.08151150, # vcc nyi
- "CCD CORRELATION ENERGY": -0.08016374258389, # vcc, sc
- "BCCD CORRELATION ENERGY": -0.08269058, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.0602475799, # ccenergy only, sc
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [
- 0.0,
- 0.0,
- 0.011923571677,
- 0.0,
- 0.0,
- -0.011504255786,
- 0.0,
- 0.010550478287,
- -0.000209657945,
- 0.0,
- -0.010550478287,
- -0.000209657945,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.082563103526, # vcc
- "CCSD SINGLES ENERGY": -0.001170121907, # vcc & ecc
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.0023025, # ecc
- "CCSD TOTAL GRADIENT": np.array(
- # ccenergy findif-5 (to 1e-6 this sc == sd)
- [
- 0.0,
- 0.0,
- 0.005324268016,
- 0.0,
- 0.0,
- -0.005175469821,
- 0.0,
- 0.014881252049,
- -0.000074399098,
- 0.0,
- -0.014881252049,
- -0.000074399098,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.000691982886, # vcc
- "CCSD(T) TOTAL GRADIENT": np.array(
- # ccenergy findif-5 (to 1e-6 this sc == sd)
- [
- 0.0,
- 0.0,
- 0.004576121181,
- 0.0,
- 0.0,
- -0.004510736115,
- 0.0,
- 0.01496004535,
- -0.000032692533,
- 0.0,
- -0.01496004535,
- -0.000032692533,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.000678625130, # mrcc only, sc
- "B(T) CORRECTION ENERGY": -0.00061088, # ccenergy only, sc
- "CC3 CORRELATION ENERGY": -0.083247773021380, # ccenergy only, sc
- "CCSDT CORRELATION ENERGY": -0.083606448205, # mrcc, sc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": -0.0000318047, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.0854404197, # p4n (core-occ rotations neglected)
- "OLCCD SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": -0.000362931, # qchem
- "OCCD CORRELATION ENERGY": -0.082712571, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem 3-pt findif
- [
- 0.0,
- 8.460068018933954e-12,
- 4.950754755080671e-03,
- 0.0,
- -1.880015115318656e-12,
- -4.795829218979597e-03,
- 0.0,
- 1.487359483495976e-02,
- -7.746235397720769e-05,
- 0.0,
- -1.487359480111949e-02,
- -7.746237653738908e-05,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "CISD CORRELATION ENERGY": -0.16970933, # vcc, sd
- "LCCSD CORRELATION ENERGY": -0.18080394, # vcc != p4n (was commented)
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.14354870, # vcc nyi only
- "CCD CORRELATION ENERGY": -0.17252087862035, # vcc nyi == tce, sd
- "CCSD CORRELATION ENERGY": -0.175988485854028,
- "CCSD SINGLES ENERGY": -0.003256808469230,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.033291143258924,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.030051791297,
- 0.0,
- 0.016301545337,
- -0.015025895649,
- 0.0,
- -0.016301545337,
- -0.015025895649,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.003863167899, # vcc only
- "CCSDT CORRELATION ENERGY": -0.18030677104047, # vcc
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.15702660833165538, # sd == sc
- "MP2 SINGLES ENERGY": -0.0028059971624814647, # sd == sc
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03466304269235235, # sd == sc
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.026398091851,
- 0.0,
- 0.014012163884,
- -0.013199045925,
- 0.0,
- -0.014012163884,
- -0.013199045925,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # vcc by psi fd
- [
- [-0.0227647, 0.0, 0.0, 0.01138235, 0.0, 0.0, 0.01138235, 0.0, 0.0],
- [0.0, 0.62606906, 0.0, 0.0, -0.31303453, 0.24893382, 0.0, -0.31303453, -0.24893382],
- [0.0, 0.0, 0.39895549, 0.0, 0.1914611, -0.19947774, 0.0, -0.1914611, -0.19947774],
- [0.01138235, 0.0, 0.0, -0.01032718, 0.0, 0.0, -0.00105517, 0.0, 0.0],
- [0.0, -0.31303453, 0.1914611, 0.0, 0.34009582, -0.22019746, 0.0, -0.02706129, 0.02873636],
- [0.0, 0.24893382, -0.19947774, 0.0, -0.22019746, 0.1906097, 0.0, -0.02873636, 0.00886804],
- [0.01138235, 0.0, 0.0, -0.00105517, 0.0, 0.0, -0.01032718, 0.0, 0.0],
- [0.0, -0.31303453, -0.1914611, 0.0, -0.02706129, -0.02873636, 0.0, 0.34009582, 0.22019746],
- [0.0, -0.24893382, -0.19947774, 0.0, 0.02873636, 0.00886804, 0.0, 0.22019746, 0.1906097],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.173406218947, # cfour
- "MP3 SINGLES ENERGY": -0.003217654547, # cfour
- "MP3 TOTAL GRADIENT": np.array( # vcc by fd psi
- [[0.0, 0.0, 0.0280810549], [0.0, 0.0150218165, -0.0140405275], [0.0, -0.0150218165, -0.0140405275]]
- ),
- "MP4(SDQ) CORRELATION ENERGY": -0.17541828, # vcc only, sc
- "MP4(T) CORRECTION ENERGY": -0.00334215131, # vcc only, sc
- "ZAPT2 CORRELATION ENERGY": -0.156282101871335, # detci
- "CISD CORRELATION ENERGY": -0.169713778760, # vcc (-0.16970933003145, # vcc longstanding)
- "LCCD CORRELATION ENERGY": -0.1769020687, # p4n (likely sd since tce matches but leaving here until detangled)
- # "LCCSD CORRELATION ENERGY": -0.1807707740, # p4n (was uncommented)
- "LCCSD CORRELATION ENERGY": -0.18080894256088, # vcc != p4n, sc
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.14355320, # vcc nyi only
- "CCD CORRELATION ENERGY": -0.17252609, # vcc
- "BCCD CORRELATION ENERGY": -0.175845488255032, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.1581932061, # ccenergy only, sc
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.027576804444, 0.0, 0.014704262054, -0.013788402222, 0.0, -0.014704262054, -0.013788402222]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.175993216083, # vcc
- "CCSD SINGLES ENERGY": -0.003256554797, # vcc & ecc
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.033292, # ecc
- "CCSD TOTAL GRADIENT": np.array(
- # ccenergy findif-5 (to 1e-6 this sc == sd)
- [0.0, 0.0, 0.030052138921, 0.0, 0.016301704865, -0.015026069461, 0.0, -0.016301704865, -0.015026069461]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.003868160727, # vcc, sc
- "CCSD(T) TOTAL GRADIENT": np.array( # ccenergy findif-5
- [0.0, 0.0, 0.031949750405, 0.0, 0.017311094784, -0.015974875203, 0.0, -0.017311094784, -0.015974875203]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.003784992966, # mrcc only, sc
- "B(T) CORRECTION ENERGY": -0.003998082545023, # ccenergy only, sc
- "CC3 CORRELATION ENERGY": -0.179979065555105, # ccenergy only, sc
- "CCSDT CORRELATION ENERGY": -0.18031166502580, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": -0.0032999290, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.1804110970, # p4n (core-occ rotations neglected)
- "OLCCD SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": -0.003402152, # qchem
- "OCCD CORRELATION ENERGY": -0.175891240, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem 3-pt findif
- [
- 0.0,
- -2.131628207280301e-11,
- 2.994042840143152e-02,
- 0.0,
- 1.624512323772365e-02,
- -1.497021096596995e-02,
- 0.0,
- -1.624512344378104e-02,
- -1.497021098018081e-02,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "CISD CORRELATION ENERGY": -0.18613466061896, # vcc
- "LCCSD CORRELATION ENERGY": -0.19795428, # vcc != p4n
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.15734510, # vcc nyi, sd
- "CCD CORRELATION ENERGY": -0.18921914785643, # vcc nyi == tce, sd
- "CCSD CORRELATION ENERGY": -0.19282621471297376,
- "CCSD SINGLES ENERGY": -0.003354603508621,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.036502859698546,
- "CCSD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.017873897449,
- 0.0,
- 0.007653541045,
- -0.008936948724,
- 0.0,
- -0.007653541045,
- -0.008936948724,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00504351, # cfour only
- "CCSDT CORRELATION ENERGY": -0.19824510672649, # vcc
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.1761163066,
- "MP2 SINGLES ENERGY": -0.00294339,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03837483,
- "MP2 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.014894057335,
- 0.0,
- 0.005886660707,
- -0.007447028667,
- 0.0,
- -0.005886660707,
- -0.007447028667,
- ]
- ).reshape((-1, 3)),
- "MP2 TOTAL HESSIAN": np.array( # vcc by psi fd
- [
- [-0.0128439, 0.0, 0.0, 0.00642195, 0.0, 0.0, 0.00642195, 0.0, 0.0],
- [0.0, 0.59650839, 0.0, 0.0, -0.29825419, 0.23378625, 0.0, -0.29825419, -0.23378625],
- [0.0, 0.0, 0.38870359, 0.0, 0.17712488, -0.1943518, 0.0, -0.17712488, -0.1943518],
- [0.00642195, 0.0, 0.0, -0.00515858, 0.0, 0.0, -0.00126337, 0.0, 0.0],
- [0.0, -0.29825419, 0.17712488, 0.0, 0.32634865, -0.20545557, 0.0, -0.02809446, 0.02833069],
- [0.0, 0.23378625, -0.1943518, 0.0, -0.20545557, 0.18492354, 0.0, -0.02833069, 0.00942826],
- [0.00642195, 0.0, 0.0, -0.00126337, 0.0, 0.0, -0.00515858, 0.0, 0.0],
- [0.0, -0.29825419, -0.17712488, 0.0, -0.02809446, -0.02833069, 0.0, 0.32634865, 0.20545557],
- [0.0, -0.23378625, -0.1943518, 0.0, 0.02833069, 0.00942826, 0.0, 0.20545557, 0.18492354],
- ]
- ),
- "MP3 CORRELATION ENERGY": -0.190735179201, # cfour
- "MP3 SINGLES ENERGY": -0.003322599961, # cfour
- "MP3 TOTAL GRADIENT": np.array( # vcc by fd psi
- [
- [0.0, 0.0, 0.015664483926],
- [0.0, 0.006224027206, -0.007832241963],
- [0.0, -0.006224027206, -0.007832241963],
- ]
- ),
- "MP4(SDQ) CORRELATION ENERGY": -0.19243169, # vcc only, sc
- "MP4(T) CORRECTION ENERGY": -0.004597066465, # vcc only, sc
- "ZAPT2 CORRELATION ENERGY": -0.17532659, # gamess
- "CISD CORRELATION ENERGY": -0.186140372647, # vcc, sc
- "LCCD CORRELATION ENERGY": -0.1939920915, # p4n (likely sd since tce matches but leaving here until detangled)
- # "LCCSD CORRELATION ENERGY": -0.1979175937, # p4n (was uncommented)
- "LCCSD CORRELATION ENERGY": -0.19796066, # vcc nyi, sc
- "LCCSD OPPOSITE-SPIN CORRELATION ENERGY": -0.15734990, # vcc nyi, sc
- "CCD CORRELATION ENERGY": -0.18922567778994, # vcc, sc
- "BCCD CORRELATION ENERGY": -0.19269438, # ccenergy only
- "CC2 CORRELATION ENERGY": -0.1772785627, # ccenergy only, sc
- "CC2 TOTAL GRADIENT": np.array( # ccenergy, findif-5
- [0.0, 0.0, 0.016255578053, 0.0, 0.006637178638, -0.008127789026, 0.0, -0.006637178638, -0.008127789026]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.1928322825369395, # vcc
- "CCSD SINGLES ENERGY": -0.00335427534294, # vcc & ecc
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.0365048, # ecc
- "CCSD TOTAL GRADIENT": np.array(
- # ccenergy findif-5 (to 1e-6 this sc == sd)
- [0.0, 0.0, 0.017874684927, 0.0, 0.007653820061, -0.008937342463, 0.0, -0.007653820061, -0.008937342463]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.005047880396, # vcc
- "CCSD(T) TOTAL GRADIENT": np.array( # ccenergy findif-5
- [0.0, 0.0, 0.020046694566, 0.0, 0.008736311342, -0.010023347283, 0.0, -0.008736311342, -0.010023347283]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.004942680340, # mrcc only, sc
- "B(T) CORRECTION ENERGY": -0.00518478, # ccenergy only, sc
- "CC3 CORRELATION ENERGY": -0.198016086042130, # ccenergy only, sc
- "CCSDT CORRELATION ENERGY": -0.19825144107785, # vcc
- "OMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2 CORRELATION ENERGY": _knownmissing,
- "OMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2 TOTAL GRADIENT": _knownmissing,
- "OMP2.5 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP2.5 CORRELATION ENERGY": _knownmissing,
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP2.5 TOTAL GRADIENT": _knownmissing,
- "OMP3 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OMP3 CORRELATION ENERGY": _knownmissing,
- "OMP3 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OMP3 TOTAL GRADIENT": _knownmissing,
- "OREMP2 REFERENCE CORRECTION ENERGY": _knownmissing,
- "OREMP2 CORRELATION ENERGY": _knownmissing,
- "OREMP2 SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OREMP2 TOTAL GRADIENT": _knownmissing,
- "OLCCD REFERENCE CORRECTION ENERGY": -0.0033910391, # p4n (core-occ rotations neglected)
- "OLCCD CORRELATION ENERGY": -0.1975960603, # p4n (core-occ rotations neglected)
- "OLCCD SAME-SPIN CORRELATION ENERGY": _knownmissing,
- "OLCCD TOTAL GRADIENT": _knownmissing,
- "OCCD REFERENCE CORRECTION ENERGY": -0.003478949, # qchem
- "OCCD CORRELATION ENERGY": -0.192732814, # qchem
- "OCCD TOTAL GRADIENT": np.array( # qchem 3-pt findif
- [
- 0.0,
- 1.705302565824240e-10,
- 1.774538645804569e-02,
- 0.0,
- 7.588575865469238e-03,
- -8.872690465011601e-03,
- 0.0,
- -7.588575776651396e-03,
- -8.872690337113909e-03,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": _knownmissing,
- "A-O(T) CORRECTION ENERGY": _knownmissing,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CONV-AE-CD >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.203778449,
- "MP2 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.20648138, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.20990784, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.20874537, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00193646, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00196115, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.22188844,
- "MP2 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.22643352, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.23188996, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22941330, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00523874, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00523635, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.27018509,
- "MP2 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.27294541, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.27869144, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.27570541, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00726403, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00718185, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.059477703268,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001918940186,
- "MP3 CORRELATION ENERGY": -0.07481148, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00235724, # dfocc
- "LCCD CORRELATION ENERGY": -0.08343267, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.00240067, # dfocc
- "CCSD CORRELATION ENERGY": -0.08217068, # dfocc
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00062618, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00060937, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_pk_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.15485159,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03520588,
- "MP3 CORRELATION ENERGY": -0.17091968, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03533767, # dfocc
- "LCCD CORRELATION ENERGY": -0.17701281, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.03413088, # dfocc
- "CCSD CORRELATION ENERGY": -0.17387591, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00384405, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00376422, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_pk_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.19552518,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04162160,
- "MP3 CORRELATION ENERGY": -0.21084703, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04130865, # dfocc
- "LCCD CORRELATION ENERGY": -0.21678793, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.04013550, # dfocc
- "CCSD CORRELATION ENERGY": -0.21329809, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00516691, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00506463, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_pk_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.0604664810,
- "MP2 SINGLES ENERGY": -0.000694049858,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.002005152902,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.15948893,
- "MP2 SINGLES ENERGY": -0.00282963,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03542136,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.20053428,
- "MP2 SINGLES ENERGY": -0.00298375,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04179065,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CONV-FC-CD >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.20162439774,
- "MP2 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.20453779, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.20796060, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.20681721, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00192057, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00194429, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.21939933,
- "MP2 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.22415842, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.22961687, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22717646, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00521255, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00520986, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.24514540,
- "MP2 SINGLES ENERGY": 0.0,
- "MP3 CORRELATION ENERGY": -0.24747829, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.25319438, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.25033052, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00709694, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00701833, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.05841222894,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0017676971,
- "MP3 CORRELATION ENERGY": -0.07375426, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00220422, # dfocc
- "LCCD CORRELATION ENERGY": -0.08242955, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.00225358, # dfocc
- "CCSD CORRELATION ENERGY": -0.08116911, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00060405, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00058791, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_pk_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.15241971,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03445776,
- "MP3 CORRELATION ENERGY": -0.16863252, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03464025, # dfocc
- "LCCD CORRELATION ENERGY": -0.17475833, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.03344184, # dfocc
- "CCSD CORRELATION ENERGY": -0.17165381, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00381142, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00373217, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_pk_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.17117906,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03822980,
- "MP3 CORRELATION ENERGY": -0.18575660, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03792752, # dfocc
- "LCCD CORRELATION ENERGY": -0.19170259, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.03676455, # dfocc
- "CCSD CORRELATION ENERGY": -0.18831733, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00498297, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00488274, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_pk_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.059395907176,
- "MP2 SINGLES ENERGY": -0.00068836865,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001852162877,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.15701860,
- "MP2 SINGLES ENERGY": -0.00280600,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03466721,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.17611121,
- "MP2 SINGLES ENERGY": -0.00294339,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03838011,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CONV-AE-DF >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.20377997248921056,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05431321036920538,
- "MP2 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.0027998, 0.0, 0.0, -0.0027998] # dfmp2 findif-5 ae pk+df
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20657694, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000926859678, 0.0, 0.0, 0.000926859678]).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.2100497124, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.002190589954, 0.0, 0.0, -0.002190589954]).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.20888438, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00193859, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00196333, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -100.3645971549267983, # psi, 99,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.22188894,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05674808,
- "MP3 CORRELATION ENERGY": -0.22652962, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2320261414, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22954333, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00524393, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00524145, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.3804039258306062, # psi, 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.27018057,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06530212,
- "MP3 CORRELATION ENERGY": -0.27294176, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2786878429, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.27570207, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00726375, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00718158, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.4168035769188378, # psi, 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.05945820694747983,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0019203155958724552,
- "MP3 CORRELATION ENERGY": -0.07486724, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00235854, # dfocc
- "LCCD CORRELATION ENERGY": -0.0835080983, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0024018298, # dfocc
- "CCSD CORRELATION ENERGY": -0.08224363, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00062669, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00060985, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -26.0729378891483954, # psi, 99,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.15484736,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03523329,
- "MP3 CORRELATION ENERGY": -0.17098385, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03530465, # dfocc
- "LCCD CORRELATION ENERGY": -0.1771107929, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0340809591, # dfocc
- "CCSD CORRELATION ENERGY": -0.17396848, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00384851, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00376850, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.8336257642485307, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.19551918,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04161696,
- "MP3 CORRELATION ENERGY": -0.21084349, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04130382, # dfocc
- "LCCD CORRELATION ENERGY": -0.2167841215, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0401306929, # dfocc
- "CCSD CORRELATION ENERGY": -0.21329436, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00516666, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00506439, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.8610710137206539, # psi, 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.0604460449537298,
- "MP2 SINGLES ENERGY": -0.0006940498589629459,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0020066877639503184,
- "LCCD CORRELATION ENERGY": -0.0834825821, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.15948289,
- "MP2 SINGLES ENERGY": -0.00282963,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03544835,
- "LCCD CORRELATION ENERGY": -0.1792713801, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.20052829,
- "MP2 SINGLES ENERGY": -0.00298375,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04178599,
- "LCCD CORRELATION ENERGY": -0.2191002183, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CONV-FC-DF >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.20162566806258586,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05352569481658172,
- "MP2 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.00315485, 0.0, 0.0, -0.00315485] # dfmp2 findif-5 fc pk+df
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20463304, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2081020566, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.20695586, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00192267, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00194643, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_pk_rhf,
- "B2PLYP TOTAL ENERGY": -100.3639796418507899, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.21939942,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05588210,
- "MP3 CORRELATION ENERGY": -0.22425409, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2297524911, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22730597, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00521769, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00521491, # dfocc, tight
- "B2PLYP TOTAL ENERGY": -76.3796850854499780, # psi 55,590
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_pk_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_pk_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_pk_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_pk_rhf,
- "MP2 CORRELATION ENERGY": -0.24514425,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06126481,
- "MP3 CORRELATION ENERGY": -0.24747778, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2531939249, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.25033030, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00709666, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00701806, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_pk_rhf,
- "B2PLYP TOTAL ENERGY": -76.4096994249378554, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.058392397606538686,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0017690135626491292,
- "MP3 CORRELATION ENERGY": -0.07380965, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00220548, # dfocc
- "LCCD CORRELATION ENERGY": -0.0825046579, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0022547041, # dfocc
- "CCSD CORRELATION ENERGY": -0.08124172, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00060454, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00058837, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -26.0726092204242192, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.15241501,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03448519,
- "MP3 CORRELATION ENERGY": -0.16869625, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03460729, # dfocc
- "LCCD CORRELATION ENERGY": -0.1748557523, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0333918420, # dfocc
- "CCSD CORRELATION ENERGY": -0.17174585, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00381584, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00373642, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.8329139653478279, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_uhf,
- "MP2 CORRELATION ENERGY": -0.17117615,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03822512,
- "MP3 CORRELATION ENERGY": -0.18575590, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03792262, # dfocc
- "LCCD CORRELATION ENERGY": -0.1917015960, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0367596684, # dfocc
- "CCSD CORRELATION ENERGY": -0.18831642, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00498272, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00488249, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_pk_uhf,
- "B2PLYP TOTAL ENERGY": -55.8541121912572009, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.05937514348825628,
- "MP2 SINGLES ENERGY": -0.0006883686516107368,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0018536363586657242,
- "LCCD CORRELATION ENERGY": -0.0824786458, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.15701209,
- "MP2 SINGLES ENERGY": -0.00280600,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03469422,
- "LCCD CORRELATION ENERGY": -0.1770018748, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "pk",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_pk_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_pk_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_pk_rohf,
- "MP2 CORRELATION ENERGY": -0.17610830,
- "MP2 SINGLES ENERGY": -0.00294339,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03837541,
- "LCCD CORRELATION ENERGY": -0.1939912613, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CD-AE-CD >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_cd_rhf,
- # "HF TOTAL HESSIAN": _hess_scf_hf_dz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.20377328786815951,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05427570,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 ae cd+cd
- [0.0, 0.0, 0.00281146, 0.0, 0.0, -0.00281146]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20647618, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array(
- # dfocc findif-5
- [0.0, 0.0, -0.000926981449, 0.0, 0.0, 0.000926981449]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.208401248910, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.20990226, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array(
- # dfocc findif-5
- [0.0, 0.0, 0.002193849073, 0.0, 0.0, -0.002193849073]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2081480005, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [0.0, 0.0, 0.000827082456, 0.0, 0.0, -0.000827082456]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.20873986003026, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04857381,
- "CCSD TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [0.0, 0.0, 0.001979500372, 0.0, 0.0, -0.001979500372]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00193631092143, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight, findif-5
- [0.0, 0.0, 0.003075112296, 0.0, 0.0, -0.003075112296]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00196099396220, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000704847713, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.204457056936, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.004099545733, 0.0, 0.0, -0.004099545733]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000571702068, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.205680612213, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.002008491447, 0.0, 0.0, -0.002008491447]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000467209128, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.206931341471, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, -0.000016455846, 0.0, 0.0, 0.000016455846]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.000553277131, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.208938401219, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.00282065206, 0.0, 0.0, -0.00282065206]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.000552265186, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.210437984945, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, findif-5, tight, sc
- [0.0, 0.0, 0.003382226985, 0.0, 0.0, -0.003382226985]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.000511278480, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.208645666360, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.002062122653, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.002042124365, # dfocc, tight
- "SVWN TOTAL ENERGY": -99.97974226710002, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.019330333461, 0.0, 0.0, -0.019330333461]
- ).reshape((-1, 3)),
- "PBE TOTAL ENERGY": -100.33526326, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.020101373239, 0.0, 0.0, -0.020101373239]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -100.43551459, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.01136685656, 0.0, 0.0, -0.01136685656]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.22188817,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05670210,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 ae cd+cd
- [
- 0.0,
- 0.0,
- 0.009643414073,
- 0.0,
- 0.005501440694,
- -0.004821707036,
- 0.0,
- -0.005501440694,
- -0.004821707036,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.22643303, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "REMP2 CORRELATION ENERGY": -0.229445833755, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.23188949, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCD CORRELATION ENERGY": -0.2280230001, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22941289840818, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05017955,
- "(T) CORRECTION ENERGY": -0.00523866932915, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00523628844912, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002352399946, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.224116136177, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001535058364, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.225648131745, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000953721118, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.227374133013, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.00128180471179, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.23069205056701, # dfocc, right
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001189623873, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.233047836839, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.001124461842, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.229120333540, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.005573969849, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005476248095, # dfocc, tight
- "SVWN TOTAL ENERGY": -76.07573625160775, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.017008805687, 0.0, 0.012808822434, -0.008504402844, 0.0, -0.012808822434, -0.008504402844]
- ).reshape((-1, 3)),
- "PBE TOTAL ENERGY": -76.35898375776449, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.018083226924, 0.0, 0.011576350536, -0.009041613462, 0.0, -0.011576350536, -0.009041613462]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -76.44455249, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.007469575531, 0.0, 0.006128608861, -0.003734787766, 0.0, -0.006128608861, -0.003734787766]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.27018399,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06530655,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 ae cd+cd
- [
- 0.0,
- 0.0,
- -0.000546229785,
- 0.0,
- -0.000967320028,
- 0.000273114892,
- 0.0,
- 0.000967320028,
- 0.000273114892,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.27294416, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "REMP2 CORRELATION ENERGY": -0.276442808601, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.27869015, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCD CORRELATION ENERGY": -0.2741709643, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.27570421327166, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05801141,
- "(T) CORRECTION ENERGY": -0.00726394807275, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00718177622315, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002513733031, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.272591834175, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001691501139, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.273207190194, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001090092456, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.274014744975, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001444318022, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.277846110170, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001352168423, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.280004165823, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.001279252698, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.275416999785, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.007572980491, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.007457755255, # dfocc, tight
- "SVWN TOTAL ENERGY": -76.10234910181312, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.011171500733, 0.0, 0.009514061362, -0.005585750366, 0.0, -0.009514061362, -0.005585750366]
- ).reshape((-1, 3)),
- "PBE TOTAL ENERGY": -76.38214387, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.012782045518, 0.0, 0.008610884679, -0.006391022759, 0.0, -0.008610884679, -0.006391022759]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -76.46846507, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.00202921515, 0.0, 0.003048184166, -0.001014607575, 0.0, -0.003048184166, -0.001014607575]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_uhf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.059476326350818454,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0019188791023,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 ae cd+cd
- [
- 0.0,
- 0.0,
- 0.0125029,
- 0.0,
- 0.0,
- -0.01205882,
- 0.0,
- 0.01033888,
- -0.00022204,
- 0.0,
- -0.01033888,
- -0.00022204,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.07480952, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00235716, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.009315056264,
- 0.0,
- 0.0,
- -0.009084753984,
- 0.0,
- 0.012696375212,
- -0.00011515114,
- 0.0,
- -0.012696375212,
- -0.00011515114,
- ]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.078034068730, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.002339588819, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.08343038, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.00240059, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.004643130768,
- 0.0,
- 0.0,
- -0.004557062257,
- 0.0,
- 0.015239807714,
- -0.000043034255,
- 0.0,
- -0.015239807714,
- -0.000043034255,
- ]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.08113343, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [
- 0.0,
- 0.0,
- 0.0064041956,
- 0.0,
- 0.0,
- -0.006210948996,
- 0.0,
- 0.014427521395,
- -0.000096623302,
- 0.0,
- -0.014427521395,
- -0.000096623302,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08216852322069, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [
- 0.0,
- 0.0,
- 0.005208056118,
- 0.0,
- 0.0,
- -0.005066275308,
- 0.0,
- 0.014858029899,
- -0.000070890405,
- 0.0,
- -0.014858029899,
- -0.000070890405,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00062616540400, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [
- 0.0,
- 0.0,
- 0.004696859967,
- 0.0,
- 0.0,
- -0.004638013918,
- 0.0,
- 0.014937987395,
- -0.000029423024,
- 0.0,
- -0.014937987395,
- -0.000029423024,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00060935179141, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000395339866, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.059851604202, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001971334763, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.012014926118,
- 0.0,
- 0.0,
- -0.011616714081,
- 0.0,
- 0.010556988797,
- -0.000199106019,
- 0.0,
- -0.010556988797,
- -0.000199106019,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000564647007, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.067670676114, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002198889579, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.010258655017,
- 0.0,
- 0.0,
- -0.009975425021,
- 0.0,
- 0.011807301213,
- -0.000141614998,
- 0.0,
- -0.011807301213,
- -0.000141614998,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000777636403, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.075525183445, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002426255771, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.008454603092,
- 0.0,
- 0.0,
- -0.008286658589,
- 0.0,
- 0.013068349488,
- -0.000083972251,
- 0.0,
- -0.013068349488,
- -0.000083972251,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001061022340, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.078990084532, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.005896409683,
- 0.0,
- 0.0,
- -0.005784924233,
- 0.0,
- 0.014365074414,
- -0.000055742725,
- 0.0,
- -0.014365074414,
- -0.000055742725,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001484257667, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.084737023607, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002448903277, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, findif-5, tight, sc
- [
- 0.0,
- 0.0,
- 0.002950898504,
- 0.0,
- 0.0,
- -0.002932789842,
- 0.0,
- 0.015723337205,
- -0.000009054331,
- 0.0,
- -0.015723337205,
- -0.000009054331,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.001166023651, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.082184596469, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.000628150337, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000605639575, # dfocc, tight
- "SVWN TOTAL ENERGY": -25.88284516371439, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [
- 0.0,
- 0.0,
- -0.007521150796,
- 0.0,
- 0.0,
- 0.002274281261,
- 0.0,
- 0.036134178605,
- 0.002623434767,
- 0.0,
- -0.036134178605,
- 0.002623434767,
- ]
- ).reshape((-1, 3)),
- "PBE TOTAL ENERGY": -26.04684191, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [
- 0.0,
- 0.0,
- -0.002919057618,
- 0.0,
- 0.0,
- -0.000173763979,
- 0.0,
- 0.02614258472,
- 0.001546410798,
- 0.0,
- -0.02614258472,
- 0.001546410798,
- ]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -26.11402203, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [
- 0.0,
- 0.0,
- 0.003320289103,
- 0.0,
- 0.0,
- -0.005826956801,
- 0.0,
- 0.019182511328,
- 0.001253333849,
- 0.0,
- -0.019182511328,
- 0.001253333849,
- ]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_cd_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.15485101,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03520580,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 ae cd+cd
- 0.0,
- 0.0,
- 0.025470063809,
- 0.0,
- 0.013535107677,
- -0.012735031905,
- 0.0,
- -0.013535107677,
- -0.012735031905,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.17091879, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03533750, # dfocc
- "REMP2 CORRELATION ENERGY": -0.172502759037, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.034552222422, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.17701192, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.03413070, # dfocc
- "CCD CORRELATION ENERGY": -0.17274477, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.17387519037716, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00384402655927, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00376419871586, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001367410529, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.156184908805, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035978726948, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001174113090, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.164041684333, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035851868032, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001024364167, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.171935686596, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035751323781, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.00111244830766, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.17360075617488, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001111961826, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.178109192111, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.034472712167, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.000987767517, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.173723374782, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.003989459873, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003889358031, # dfocc, tight
- "SVWN TOTAL ENERGY": -55.57345144327663, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.035469689186, 0.0, 0.020928985861, -0.017734844593, 0.0, -0.020928985861, -0.017734844593]
- ).reshape((-1, 3)),
- "PBE TOTAL ENERGY": -55.81475332612209, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.035840315894, 0.0, 0.019756083894, -0.017920157947, 0.0, -0.019756083894, -0.017920157947]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -55.89009263, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.0268141821, 0.0, 0.01494743893, -0.01340709105, 0.0, -0.01494743893, -0.01340709105]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_cd_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.19552441,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04162127,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 ae cd+cd
- 0.0,
- 0.0,
- 0.013727424376,
- 0.0,
- 0.005348487843,
- -0.006863712188,
- 0.0,
- -0.005348487843,
- -0.006863712188,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.21084618, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04130830, # dfocc
- "REMP2 CORRELATION ENERGY": -0.212450972170, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.040612908150, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.21678706, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.04013515, # dfocc
- "CCD CORRELATION ENERGY": -0.21199584, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.21329730737718, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00516682217061, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00506455138393, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001570622893, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.197065813141, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.042464346261, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001350861495, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.204519387255, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.042091026132, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001177850332, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.212014665319, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.041748214104, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001287828667, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.213722428382, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001285760689, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.218055380962, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.040516816950, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.001155093018, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.213139214735, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.005339052936, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005215408128, # dfocc, tight
- "SVWN TOTAL ENERGY": -55.59260769222509, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.028884098124, 0.0, 0.016574869248, -0.014442049062, 0.0, -0.016574869248, -0.014442049062]
- ).reshape((-1, 3)),
- "PBE TOTAL ENERGY": -55.83099556, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.02962368704, 0.0, 0.015649420616, -0.01481184352, 0.0, -0.015649420616, -0.01481184352]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -55.90727490, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590, findif-5
- [0.0, 0.0, 0.020000075259, 0.0, 0.010436428357, -0.01000003763, 0.0, -0.010436428357, -0.01000003763]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_cd_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_rohf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.06046475293245379,
- "MP2 SINGLES ENERGY": -0.00069387098844,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.002005071400,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 ae cd+cd
- [0.0, 0.0, 0.01359215, 0.0, 0.0, -0.01312116, 0.0, 0.01031541, -0.0002355, 0.0, -0.01031541, -0.0002355]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.001128324491, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.061375267646, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001971334332, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.012014926118,
- 0.0,
- 0.0,
- -0.011616714077,
- 0.0,
- 0.010556988794,
- -0.00019910602,
- 0.0,
- -0.010556988794,
- -0.00019910602,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.000959016912, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.069194339558, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002198888868, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.010258655018,
- 0.0,
- 0.0,
- -0.009975425018,
- 0.0,
- 0.011807301211,
- -0.000141615,
- 0.0,
- -0.011807301211,
- -0.000141615,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.000746026622, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.077048846889, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002426255644, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.008454603088,
- 0.0,
- 0.0,
- -0.008286658586,
- 0.0,
- 0.013068349485,
- -0.000083972251,
- 0.0,
- -0.013068349485,
- -0.000083972251,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.000462639536, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.080513747976, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.00589640968,
- 0.0,
- 0.0,
- -0.005784924229,
- 0.0,
- 0.014365074413,
- -0.000055742725,
- 0.0,
- -0.014365074413,
- -0.000055742725,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.000039411002, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.086260687051, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002448904007, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, findif-5, tight, sc
- [
- 0.0,
- 0.0,
- 0.002950898507,
- 0.0,
- 0.0,
- -0.002932789839,
- 0.0,
- 0.015723337202,
- -0.000009054334,
- 0.0,
- -0.015723337202,
- -0.000009054334,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.000357639780, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.083708259924, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.000628150338, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000605639576, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.15948823,
- "MP2 SINGLES ENERGY": -0.00282948,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03542128,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 ae cd+cd
- 0.0,
- 0.0,
- 0.025588961002,
- 0.0,
- 0.013550360249,
- -0.012794480501,
- 0.0,
- -0.013550360249,
- -0.012794480501,
- ]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003046091958, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.160598409777, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035978726618, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003239390456, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.168455185305, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035851867343, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003389139644, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.176349187568, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035751323194, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003301052810, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.178014257147, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003301541633, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.182522693083, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.034472708888, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": -0.003425733446, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.178136875756, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.003989459878, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003889358035, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.20053352,
- "MP2 SINGLES ENERGY": -0.00298373,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04179032,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 ae cd+cd
- 0.0,
- 0.0,
- 0.013884053665,
- 0.0,
- 0.005385412795,
- -0.006942026833,
- 0.0,
- -0.005385412795,
- -0.006942026833,
- ]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003039111099, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.201675545798, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.042464346330, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003258874587, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.209129119912, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.042091025938, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003431885897, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.216624397975, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.041748214168, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003321905366, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.218332161038, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003323981369, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.222665113625, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.040516826809, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": -0.003454639639, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.217748947404, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.005339052938, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005215408130, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CD-FC-CD >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_cd_rhf,
- # "HF TOTAL HESSIAN": _hess_scf_hf_dz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.201619244596,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05348825,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [0.0, 0.0, 0.00316665, 0.0, 0.0, -0.00316665]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20453260, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [0.0, 0.0, -0.000588974421, 0.0, 0.0, 0.000588974421]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.206423120122, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.20795503, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [0.0, 0.0, 0.002525704147, 0.0, 0.0, -0.002525704147]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2062220430, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd tight
- [0.0, 0.0, 0.001167911218, 0.0, 0.0, -0.001167911218]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.20681170792808, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04787083,
- "CCSD TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd tight
- [0.0, 0.0, 0.002325504721, 0.0, 0.0, -0.002325504721]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00192042037371, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight, findif-5
- [0.0, 0.0, 0.003419339394, 0.0, 0.0, -0.003419339394]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00194413458399, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000702500011, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.202330761197, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.004482045565, 0.0, 0.0, -0.004482045565]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000571428855, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.203698037577, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.002413412285, 0.0, 0.0, -0.002413412285]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000468982166, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.205112639670, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.000419528739, 0.0, 0.0, -0.000419528739]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.000554016472, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.207066289816, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.003235950588, 0.0, 0.0, -0.003235950588]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.000553491444, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.208617145287, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [0.0, 0.0, 0.003803435612, 0.0, 0.0, -0.003803435612]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.000511777936, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.206827599221, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.002043157128, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.002023030659, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.21939907,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05583617,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [
- 0.0,
- 0.0,
- 0.010264703011,
- 0.0,
- 0.00588885358,
- -0.005132351506,
- 0.0,
- -0.00588885358,
- -0.005132351506,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.22415794, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "REMP2 CORRELATION ENERGY": -0.227139386881, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.22961642, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCD CORRELATION ENERGY": -0.2257842561, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22717606848165, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04939986,
- "(T) CORRECTION ENERGY": -0.00521247873234, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00520979601465, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002351861704, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.221658768039, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001538083685, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.223336430535, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000960343766, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.225227488953, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.00128588799768, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.22849477192663, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001194389384, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.230903883683, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.001127721989, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.226990468428, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.005543695574, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005445988059, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.24514436,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06126931,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [
- 0.0,
- 0.0,
- 0.000318778691,
- 0.0,
- -0.000569356625,
- -0.000159389346,
- 0.0,
- 0.000569356625,
- -0.000159389346,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.24747710, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "REMP2 CORRELATION ENERGY": -0.251016068140, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.25319315, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "CCD CORRELATION ENERGY": -0.2488498077, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.25032938698805, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05405638,
- "(T) CORRECTION ENERGY": -0.00709685911318, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00701825978933, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002435969540, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.247516285552, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001628337567, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.247905627376, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001042085727, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.248525576959, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001387317415, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.252381884524, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001298302400, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.254480886451, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.001226900919, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.250063908572, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.007402343012, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.007289120982, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_uhf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.058410863785614,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001767642489,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [
- 0.0,
- 0.0,
- 0.01230315,
- 0.0,
- 0.0,
- -0.01184537,
- 0.0,
- 0.01033427,
- -0.00022889,
- 0.0,
- -0.01033427,
- -0.00022889,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.07375232, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00220415, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.009099123102,
- 0.0,
- 0.0,
- -0.008855857257,
- 0.0,
- 0.012692779327,
- -0.000121632922,
- 0.0,
- -0.012692779327,
- -0.000121632922,
- ]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.077009033372, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.002190684009, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.08242726, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.00225350, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.004401363786,
- 0.0,
- 0.0,
- -0.004303629299,
- 0.0,
- 0.015236787233,
- -0.000048867243,
- 0.0,
- -0.015236787233,
- -0.000048867243,
- ]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.08014246, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [
- 0.0,
- 0.0,
- 0.006157735197,
- 0.0,
- 0.0,
- -0.005953159624,
- 0.0,
- 0.014424722031,
- -0.000102287787,
- 0.0,
- -0.014424722031,
- -0.000102287787,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08116696345172, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [
- 0.0,
- 0.0,
- 0.004963224373,
- 0.0,
- 0.0,
- -0.004809612915,
- 0.0,
- 0.014854893513,
- -0.000076805729,
- 0.0,
- -0.014854893513,
- -0.000076805729,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00060403476990, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array(
- # dfocc findif-5 tight
- [
- 0.0,
- 0.0,
- 0.004461517471,
- 0.0,
- 0.0,
- -0.004390206103,
- 0.0,
- 0.014934316994,
- -0.000035655684,
- 0.0,
- -0.014934316994,
- -0.000035655684,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00058789584036, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000393271089, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.058955062039, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001822163929, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.011799994885,
- 0.0,
- 0.0,
- -0.01138752044,
- 0.0,
- 0.010550315239,
- -0.000206237223,
- 0.0,
- -0.010550315239,
- -0.000206237223,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000564442101, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.066788204166, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002049209044, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.010034895199,
- 0.0,
- 0.0,
- -0.009737937774,
- 0.0,
- 0.011801086788,
- -0.000148478713,
- 0.0,
- -0.011801086788,
- -0.000148478713,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000780607023, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.074661038269, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002276029266, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.00821954564,
- 0.0,
- 0.0,
- -0.008038362344,
- 0.0,
- 0.013062527819,
- -0.000090591648,
- 0.0,
- -0.013062527819,
- -0.000090591648,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001065407270, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.078143718483, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.005658577881,
- 0.0,
- 0.0,
- -0.005534792789,
- 0.0,
- 0.014360022699,
- -0.000061892546,
- 0.0,
- -0.014360022699,
- -0.000061892546,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001492355224, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.083912298766, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002307760137, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.002702310243,
- 0.0,
- 0.0,
- -0.002672567295,
- 0.0,
- 0.015718809974,
- -0.000014871474,
- 0.0,
- -0.015718809974,
- -0.000014871474,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.001173585912, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.081366382141, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.000608522852, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000586642668, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_cd_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.15241915,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03445770,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 fc cd+cd
- 0.0,
- 0.0,
- 0.026258239074,
- 0.0,
- 0.01404196652,
- -0.013129119537,
- 0.0,
- -0.01404196652,
- -0.013129119537,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.16863165, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03464009, # dfocc
- "REMP2 CORRELATION ENERGY": -0.170216188333, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.033852995535, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.17475747, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0334416820, # dfocc
- "CCD CORRELATION ENERGY": -0.17052456, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.17165311633501, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00381139581323, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00373214885816, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001360881782, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.153818916860, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035194310016, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001172035292, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.161781119255, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035088275618, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001026576887, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.169784888805, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035012011899, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.00111325834527, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.17144631168723, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001113861889, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.176001256953, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.033743742943, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.000988643093, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.171635485628, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.003954325581, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003854709089, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_cd_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.17117831,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03822948,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 fc cd+cd
- 0.0,
- 0.0,
- 0.014735846129,
- 0.0,
- 0.005848618964,
- -0.007367923065,
- 0.0,
- -0.005848618964,
- -0.007367923065,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.18575577, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03792717, # dfocc
- "REMP2 CORRELATION ENERGY": -0.187472566719, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.037236809266, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.19170174, # dfocc
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.03676422, # dfocc
- "CCD CORRELATION ENERGY": -0.18708450, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.18831657592466, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00498288386522, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00488265656152, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001480341549, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.172676727210, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.039024778995, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001273007276, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.179776978593, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.038629873581, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001112904383, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.186933561283, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.038275663827, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001217841569, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.188746049630, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001218721333, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.192985744725, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.037047752001, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": 0.001091119790, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.188236874643, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.005146215122, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005026054902, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_cd_uhf,
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_rohf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.05939419492939635,
- "MP2 SINGLES ENERGY": -0.0006881934,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0018520881544,
- "MP2 TOTAL GRADIENT": np.array(
- # dfocc findif-5 fc cd+cd
- [
- 0.0,
- 0.0,
- 0.01338641,
- 0.0,
- 0.0,
- -0.01290149,
- 0.0,
- 0.01031066,
- -0.00024246,
- 0.0,
- -0.01031066,
- -0.00024246,
- ]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.001130393431, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.060478725483, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001822163952, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.011799994879,
- 0.0,
- 0.0,
- -0.011387520433,
- 0.0,
- 0.01055031524,
- -0.000206237223,
- 0.0,
- -0.01055031524,
- -0.000206237223,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.000959218077, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.068311867609, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002049209005, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight, sc
- [
- 0.0,
- 0.0,
- 0.010034895198,
- 0.0,
- 0.0,
- -0.009737937769,
- 0.0,
- 0.011801086785,
- -0.000148478714,
- 0.0,
- -0.011801086785,
- -0.000148478714,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.000743052999, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.076184701712, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002276029277, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.008219545639,
- 0.0,
- 0.0,
- -0.008038362341,
- 0.0,
- 0.013062527816,
- -0.000090591649,
- 0.0,
- -0.013062527816,
- -0.000090591649,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.000458253707, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.079667381927, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.005658577879,
- 0.0,
- 0.0,
- -0.005534792785,
- 0.0,
- 0.014360022698,
- -0.000061892547,
- 0.0,
- -0.014360022698,
- -0.000061892547,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.000031311396, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.085435962210, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002307761175, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, findif-5, tight
- [
- 0.0,
- 0.0,
- 0.002702310244,
- 0.0,
- 0.0,
- -0.002672567292,
- 0.0,
- 0.015718809973,
- -0.000014871476,
- 0.0,
- -0.015718809973,
- -0.000014871476,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.000350077551, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.082890045477, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.000608522844, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000586642661, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.15701792,
- "MP2 SINGLES ENERGY": -0.00280584,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03466715,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 fc cd+cd
- 0.0,
- 0.0,
- 0.026376923581,
- 0.0,
- 0.014055606253,
- -0.01318846179,
- 0.0,
- -0.014055606253,
- -0.01318846179,
- ]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003052622179, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.158232417832, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035194309944, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003241471192, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.166194620227, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035088275359, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003386926686, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.174198389777, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035012012647, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.00330024259293, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.17585981265919, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003299640039, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.180414757924, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.033743734902, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": -0.003424857817, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.176048986550, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.003954325599, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003854709106, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "cd",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.17611046,
- "MP2 SINGLES ENERGY": -0.00294336,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03837979,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfocc findif-5 fc cd+cd
- 0.0,
- 0.0,
- 0.014889762324,
- 0.0,
- 0.00588299146,
- -0.007444881162,
- 0.0,
- -0.00588299146,
- -0.007444881162,
- ]
- ).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003129397648, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.177286459867, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.039024777173, # dfocc, tight
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003336731502, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.184386711249, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.038629874099, # dfocc, tight
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003496834047, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.191543293940, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.038275664440, # dfocc, tight
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003391896462, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.193355782287, # dfocc, tight
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003391009701, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.197595477381, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.037047749578, # dfocc, tight
- "OCCD REFERENCE CORRECTION ENERGY": -0.003518612862, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.192846607336, # dfocc, tight
- "O(T) CORRECTION ENERGY": -0.005146215124, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005026054904, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CD-AE-DF >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_cd_rhf,
- # "HF TOTAL HESSIAN": _hess_scf_hf_dz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.2037748110768,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.054311870576,
- "MP2 TOTAL GRADIENT": np.array(
- # dfmp2 findif-5 ae cd+df
- [0.0, 0.0, 0.00279182, 0.0, 0.0, -0.00279182]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20657173, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000934631868, 0.0, 0.0, 0.000934631868]).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.2100441271, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.00218256974, 0.0, 0.0, -0.00218256974]).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.20887887, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04845784,
- "(T) CORRECTION ENERGY": -0.00193844, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00196317, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_cd_rhf,
- "B2PLYP TOTAL ENERGY": -100.3646277114083887, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.22188866,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05674801,
- "MP3 CORRELATION ENERGY": -0.22652912, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2320256729, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22954292, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05010092,
- "(T) CORRECTION ENERGY": -0.00524386, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00524138, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_cd_rhf,
- "B2PLYP TOTAL ENERGY": -76.3803817300909031, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.27017947,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06530177,
- "MP3 CORRELATION ENERGY": -0.27294050, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2786865554, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.27570087, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05800702,
- "(T) CORRECTION ENERGY": -0.00726367, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00718150, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_cd_rhf,
- "B2PLYP TOTAL ENERGY": -76.4168421953897052, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_uhf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.059456828193,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.00192025457659,
- "MP3 CORRELATION ENERGY": -0.07486528, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00235846, # dfocc
- "LCCD CORRELATION ENERGY": -0.0835057932, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0024017496, # dfocc
- "CCSD CORRELATION ENERGY": -0.08224146, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00062667, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00060983, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_cd_uhf,
- "B2PLYP TOTAL ENERGY": -26.0729387146540788, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.15484678,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03523320,
- "MP3 CORRELATION ENERGY": -0.17098295, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03530448, # dfocc
- "LCCD CORRELATION ENERGY": -0.1771099018, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0340807883, # dfocc
- "CCSD CORRELATION ENERGY": -0.17396776, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00384848, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00376848, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_cd_uhf,
- "B2PLYP TOTAL ENERGY": -55.8336002883394400, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.19551841,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04161663,
- "MP3 CORRELATION ENERGY": -0.21084263, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04130347, # dfocc
- "LCCD CORRELATION ENERGY": -0.2167832515, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0401303480, # dfocc
- "CCSD CORRELATION ENERGY": -0.21329358, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00516657, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00506430, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_cd_uhf,
- "B2PLYP TOTAL ENERGY": -55.8610829799526698, # psi 55,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_rohf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.06044431529,
- "MP2 SINGLES ENERGY": -0.00069387098844,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0020066063,
- "LCCD CORRELATION ENERGY": -0.0834800819, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.15948219,
- "MP2 SINGLES ENERGY": -0.00282948,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03544828,
- "LCCD CORRELATION ENERGY": -0.1792705171, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.20052752,
- "MP2 SINGLES ENERGY": -0.00298373,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04178566,
- "LCCD CORRELATION ENERGY": -0.2190993784, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< CD-FC-DF >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_cd_rhf,
- # "HF TOTAL HESSIAN": _hess_scf_hf_dz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.2016205147678,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0535243575,
- "MP2 TOTAL GRADIENT": np.array(
- # dfmp2 findif-5 fc cd+df
- [0.0, 0.0, 0.00314686, 0.0, 0.0, -0.00314686]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20462784, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2080964757, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.20695035, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04775464,
- "(T) CORRECTION ENERGY": -0.00192252, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00194627, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_cd_rhf,
- "B2PLYP TOTAL ENERGY": -100.3640101961093478, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.21939916,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05588204,
- "MP3 CORRELATION ENERGY": -0.22425360, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2297520405, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.22730551, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04932106,
- "(T) CORRECTION ENERGY": -0.00521762, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00521484, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_cd_rhf,
- "B2PLYP TOTAL ENERGY": -76.3796628907550996, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.24514320,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06126448,
- "MP3 CORRELATION ENERGY": -0.24747659, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2531926943, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "CCSD CORRELATION ENERGY": -0.25032917, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05405189,
- "(T) CORRECTION ENERGY": -0.00709658, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00701799, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_cd_rhf,
- "B2PLYP TOTAL ENERGY": -76.4097380606132361, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_uhf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.05839103061,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.00176895897,
- "MP3 CORRELATION ENERGY": -0.07380770, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00220541, # dfocc
- "LCCD CORRELATION ENERGY": -0.0825023638, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0022546311, # dfocc
- "CCSD CORRELATION ENERGY": -0.08123956, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00060452, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00058836, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_cd_uhf,
- "B2PLYP TOTAL ENERGY": -26.0726100467676396, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.15241445,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03448512,
- "MP3 CORRELATION ENERGY": -0.16869538, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03460714, # dfocc
- "LCCD CORRELATION ENERGY": -0.1748548876, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0333916888, # dfocc
- "CCSD CORRELATION ENERGY": -0.17174515, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00381581, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00373640, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_cd_uhf,
- "B2PLYP TOTAL ENERGY": -55.8328884911895713, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_uhf,
- "MP2 CORRELATION ENERGY": -0.17117540,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03822480,
- "MP3 CORRELATION ENERGY": -0.18575507, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03792228, # dfocc
- "LCCD CORRELATION ENERGY": -0.1917007514, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0367593319, # dfocc
- "CCSD CORRELATION ENERGY": -0.18831566, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "(T) CORRECTION ENERGY": -0.00498264, # dfocc, tight
- "A-(T) CORRECTION ENERGY": -0.00488241, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_cd_uhf,
- "B2PLYP TOTAL ENERGY": -55.8541241661683614, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_cd_rohf,
- # "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.05937342969795,
- "MP2 SINGLES ENERGY": -0.0006881934,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001853561678,
- "LCCD CORRELATION ENERGY": -0.0824761581, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.15701141,
- "MP2 SINGLES ENERGY": -0.00280584,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03469416,
- "LCCD CORRELATION ENERGY": -0.1770010376, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "cd",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_cd_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_cd_rohf,
- "MP2 CORRELATION ENERGY": -0.17610756,
- "MP2 SINGLES ENERGY": -0.00294336,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03837509,
- "LCCD CORRELATION ENERGY": -0.1939904460, # p4n
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< DF-AE-DF >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_df_rhf,
- "MP2 CORRELATION ENERGY": -0.2037649370559149,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05430875283333263,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.00000000000000,
- 0.00000000000000,
- 0.00279211492833,
- 0.00000000000000,
- 0.00000000000000,
- -0.00279211492833,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20656153, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000933466293, 0.0, 0.0, 0.000933466293]).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.208504245426, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2100337333, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.002183232102, 0.0, 0.0, -0.002183232102]).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2082764592, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.000818124849, -0.0, -0.0, -0.000818124849]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.20886881949604, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04845491,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.001970518943,
- 0.0,
- 0.0,
- -0.001970518943,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00193801686266, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.003068357914, -0.0, -0.0, -0.003068357914]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00196274645521, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000705416559, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.204449284608, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.004079891926, 0.0, -0.000000000000, -0.004079891926]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000572277516, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.205719687105, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.001995568826, 0.0, -0.000000000000, -0.001995568826]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000467850505, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.207017324163, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, -0.000022521780, 0.0, -0.000000000000, 0.000022521780]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.000553781427, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.209041900252, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.002809444261, 0.0, -0.000000000000, -0.002809444261]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.000552755815, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.210569944656, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.000000000000, 0.000000000000, 0.003371636637, -0.000000000000, -0.000000000000, -0.003371636637]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00051171478318, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.20877455867384, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.001829701353, 0.0, 0.0, -0.001829701353]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.002064008068, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.002043954736, # dfocc, tight
- "SVWN TOTAL ENERGY": -99.97968868729104, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, -0.0, 0.019359029672, 0.0, 0.0, -0.019358980719]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.8 99,590
- [
- -0.011171616682,
- 0.0,
- -0.0,
- 0.011171597439,
- 0.0,
- -0.0,
- 0.0,
- -0.011171616682,
- -0.0,
- -0.0,
- 0.01117159744,
- 0.0,
- -0.0,
- -0.0,
- 0.642262891185,
- 0.0,
- 0.0,
- -0.642262893846,
- 0.011171597439,
- -0.0,
- 0.0,
- -0.011168975069,
- 0.000000000001,
- -0.000000000001,
- 0.0,
- 0.01117159744,
- 0.0,
- 0.000000000001,
- -0.01116897507,
- -0.0,
- -0.0,
- 0.0,
- -0.642262893846,
- -0.000000000001,
- -0.0,
- 0.64226571697,
- ]
- ).reshape((6, 6)),
- "PBE TOTAL ENERGY": -100.33521027, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.020130499789, 0.0, -0.0, -0.020130524567]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -100.43547355, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, -0.0, 0.011392119703, 0.0, -0.0, -0.011392010986]
- ).reshape((-1, 3)),
- "WB97X TOTAL ENERGY": -100.41421085713486, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, -0.0, 0.006648755885, 0.0, -0.0, -0.006648573196]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_df_rhf,
- "B2PLYP TOTAL ENERGY": -100.3646058112210824, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_df_rhf,
- "MP2 CORRELATION ENERGY": -0.22187976,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05674571,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.0,
- 0.0,
- 0.00962182765,
- 0.0,
- 0.005498317937,
- -0.004810913825,
- 0.0,
- -0.005498317937,
- -0.004810913825,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.22651881, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.004009128141, 0.0, 0.002552803039, -0.00200456407, 0.0, -0.002552803039, -0.00200456407]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.22954466014956, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2320149229, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.008561006838, 0.0, 0.005236802973, -0.004280503419, 0.0, -0.005236802973, -0.004280503419]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2281433856, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, -0.0, 0.006179417919, -0.0, 0.00392052373, -0.00308970896, 0.0, -0.003920523729, -0.003089708959]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.22953288030956, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05009877,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.007518713989,
- 0.0,
- 0.004612996204,
- -0.003759356993,
- 0.0,
- -0.004612996204,
- -0.003759356995,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00524345048605, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.010200006450, -0.0, 0.00604923838, -0.005100003223, -0.0, -0.00604923838, -0.005100003226]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00524100328791, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002353213091, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.224108722336, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.012090520150,
- 0.0,
- 0.006792038487,
- -0.006045260075,
- 0.0,
- -0.006792038487,
- -0.006045260075,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001535554696, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.225687426127, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.008284981234,
- 0.0,
- 0.004775627693,
- -0.004142490617,
- 0.0,
- -0.004775627693,
- -0.004142490617,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000954089054, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.227460339651, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.004815233651,
- 0.0,
- 0.002952173310,
- -0.002407616826,
- 0.0,
- -0.002952173310,
- -0.002407616826,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001281722402, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.23079090375495, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.009108870642,
- 0.0,
- 0.005403366342,
- -0.004554435321,
- 0.0,
- -0.005403366342,
- -0.004554435321,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001189314489, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.233173062606, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- -0.000000000000,
- 0.009761700492,
- -0.000000000000,
- 0.005853403252,
- -0.004880850246,
- -0.000000000000,
- -0.005853403251,
- -0.004880850246,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.0011241002379, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.22924045334096, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.007259063497,
- -0.0,
- 0.004473960460,
- -0.003629531749,
- -0.0,
- -0.004473960460,
- -0.003629531749,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.005578769043, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005480838164, # dfocc, tight
- "SVWN TOTAL ENERGY": -76.07574048609808, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.017021972532, -0.0, 0.012817893242, -0.008511166112, 0.0, -0.012817893242, -0.008511166112]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.8 99,590
- [
- -0.015306108227,
- -0.0,
- -0.0,
- 0.007679241821,
- -0.0,
- 0.0,
- 0.007679241834,
- -0.0,
- -0.0,
- -0.0,
- 0.714095826016,
- 0.000000000011,
- -0.0,
- -0.357059323956,
- 0.282410783964,
- 0.0,
- -0.357059323952,
- -0.282410784003,
- -0.0,
- 0.000000000011,
- 0.456485072062,
- 0.0,
- 0.22318907951,
- -0.228247665448,
- 0.0,
- -0.22318907952,
- -0.228247665506,
- 0.007679241821,
- -0.0,
- 0.0,
- -0.008316923332,
- -0.0,
- -0.0,
- 0.000637673685,
- 0.0,
- -0.0,
- -0.0,
- -0.357059323956,
- 0.22318907951,
- -0.0,
- 0.3859291338,
- -0.252799920245,
- 0.0,
- -0.028869886253,
- 0.029610851501,
- 0.0,
- 0.282410783964,
- -0.228247665448,
- -0.0,
- -0.252799920245,
- 0.218979358918,
- -0.0,
- -0.029610851534,
- 0.009268235563,
- 0.007679241834,
- 0.0,
- 0.0,
- 0.000637673685,
- 0.0,
- -0.0,
- -0.008316923345,
- -0.0,
- -0.0,
- -0.0,
- -0.357059323952,
- -0.22318907952,
- 0.0,
- -0.028869886253,
- -0.029610851534,
- -0.0,
- 0.385929133855,
- 0.252799920322,
- -0.0,
- -0.282410784003,
- -0.228247665506,
- -0.0,
- 0.029610851501,
- 0.009268235563,
- -0.0,
- 0.252799920322,
- 0.218979358932,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -76.35898912990783, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.018097092596, -0.0, 0.011586123511, -0.009048894034, 0.0, -0.011586123511, -0.009048894034]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -76.44456455, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.007475949858, -0.0, 0.00613847913, -0.003738203973, 0.0, -0.00613847913, -0.003738203973]
- ).reshape((-1, 3)),
- "WB97X TOTAL ENERGY": -76.42164084415194, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, 0.0, 0.00284541, -0.0, 0.00296728, -0.00142221, 0.0, -0.00296728, -0.00142221]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_df_rhf,
- "B2PLYP TOTAL ENERGY": -76.3804028015970857, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_df_rhf,
- "MP2 CORRELATION ENERGY": -0.27016105,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06529808,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.0,
- 0.0,
- -0.000566657943,
- 0.0,
- -0.000968877215,
- 0.000283328971,
- 0.0,
- 0.000968877215,
- 0.000283328971,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.27292175, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.007037747646, 0.0, -0.004494031919, 0.003518873823, 0.0, 0.004494031919, 0.003518873823]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.276419945808, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2786671617, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.002344345036, 0.0, -0.001783728285, 0.001172172518, 0.0, 0.001783728285, 0.001172172518]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2741489819, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.0,
- -0.004790202029,
- -0.0,
- -0.003048964224,
- 0.002395101014,
- -0.0,
- 0.003048964224,
- 0.002395101014,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.27568224252782, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05800380,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, -0.003408923965, 0.0, -0.002343243985, 0.001704461980, 0.0, 0.002343243985, 0.001704461985]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00726212675888, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, -0.000217412659, -0.0, -0.000742939442, 0.000108706327, 0.0, 0.000742939441, 0.000108706333]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00718000875661, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002514012770, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.272569214076, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.001818176662,
- 0.0,
- 0.000241592175,
- -0.000909088331,
- 0.0,
- -0.000241592175,
- -0.000909088331,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001691695489, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.273184743555, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- -0.002325903973,
- 0.0,
- -0.001998665869,
- 0.001162951987,
- 0.0,
- 0.001998665869,
- 0.001162951987,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001090223846, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.273992490969, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- -0.006182600264,
- 0.0,
- -0.004075383127,
- 0.003091300132,
- 0.0,
- 0.004075383127,
- 0.003091300132,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001444459285, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.277823416296, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- -0.001651592566,
- 0.0,
- -0.001517469318,
- 0.000825796283,
- 0.0,
- 0.001517469318,
- 0.000825796283,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001352291360, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.279981325469, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- -0.000000000000,
- -0.001075340549,
- -0.000000000000,
- -0.001136934323,
- 0.000537670274,
- 0.000000000000,
- 0.001136934323,
- 0.000537670274,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00127938819983, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.27539517277894, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- -0.003670656144,
- -0.0,
- -0.002477953103,
- 0.001835328072,
- 0.0,
- 0.002477953103,
- 0.001835328072,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.007571167323, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.007455996809, # dfocc, tight
- "SVWN TOTAL ENERGY": -76.10232964924052, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.011132147324, -0.0, 0.009489578319, -0.005566364846, 0.0, -0.009489578319, -0.005566364846]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.8 99,590
- [
- -0.009990362405,
- -0.0,
- 0.000000000001,
- 0.00502229918,
- -0.0,
- 0.0,
- 0.005022299179,
- 0.0,
- 0.0,
- -0.0,
- 0.699077256021,
- 0.0,
- -0.0,
- -0.349550325666,
- 0.274539445833,
- 0.0,
- -0.349550325662,
- -0.274539445833,
- 0.000000000001,
- 0.0,
- 0.449564210084,
- 0.0,
- 0.216190331109,
- -0.22478695452,
- 0.0,
- -0.216190331109,
- -0.224786954525,
- 0.00502229918,
- -0.0,
- 0.0,
- -0.005826835703,
- 0.0,
- -0.0,
- 0.000803572097,
- 0.0,
- 0.0,
- -0.0,
- -0.349550325666,
- 0.216190331109,
- 0.0,
- 0.379622159841,
- -0.245365200208,
- 0.0,
- -0.030071862218,
- 0.029174558331,
- 0.0,
- 0.274539445833,
- -0.22478695452,
- -0.0,
- -0.245365200208,
- 0.215364149782,
- 0.0,
- -0.029174558332,
- 0.009422617805,
- 0.005022299179,
- 0.0,
- 0.0,
- 0.000803572097,
- 0.0,
- 0.0,
- -0.005826835703,
- 0.0,
- -0.0,
- 0.0,
- -0.349550325662,
- -0.216190331109,
- 0.0,
- -0.030071862218,
- -0.029174558332,
- 0.0,
- 0.379622159838,
- 0.245365200207,
- 0.0,
- -0.274539445833,
- -0.224786954525,
- 0.0,
- 0.029174558331,
- 0.009422617805,
- -0.0,
- 0.245365200207,
- 0.215364149785,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -76.38213149, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.012739554295, -0.0, 0.008585626913, -0.006370169853, 0.0, -0.008585626913, -0.006370169853]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -76.46844827, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.001992158396, -0.0, 0.003027194556, -0.00099636428, 0.0, -0.003027194556, -0.00099636428]
- ).reshape((-1, 3)),
- "WB97X TOTAL ENERGY": -76.44427590906572, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [0.0, 0.0, -0.002582039801, 0.0, -0.000046718668, 0.001291589931, -0.0, 0.000046718668, 0.001291589931]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_df_rhf,
- "B2PLYP TOTAL ENERGY": -76.4168144583403830, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_df_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_df_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_df_uhf,
- "MP2 CORRELATION ENERGY": -0.0594557966607590,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001920220330437888,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.00000000000000,
- 0.00000000000000,
- 0.01252024755551,
- 0.00000000000000,
- 0.00000000000000,
- -0.01207773525598,
- 0.00000000000000,
- 0.01032204616770,
- -0.00022125614977,
- 0.00000000000000,
- -0.01032204616770,
- -0.00022125614977,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.07486350, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00235837, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.009311184271,
- 0.0,
- 0.0,
- -0.009082434632,
- 0.0,
- 0.012724190366,
- -0.00011437482,
- 0.0,
- -0.012724190366,
- -0.00011437482,
- ]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.078090599375, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.002340709678, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.0835030877, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0024016379, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.004636606273,
- 0.0,
- 0.0,
- -0.004551154292,
- 0.0,
- 0.015266304532,
- -0.00004272599,
- 0.0,
- -0.015266304532,
- -0.00004272599,
- ]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.08120235, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.006399006162,
- -0.0,
- -0.0,
- -0.006206323117,
- -0.0,
- 0.014450800585,
- -0.000096341522,
- 0.0,
- -0.014450800585,
- -0.000096341522,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08223900985527, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.005201169988,
- 0.0,
- -0.0,
- -0.005060084065,
- -0.0,
- 0.014882201275,
- -0.000070542962,
- 0.0,
- -0.014882201275,
- -0.000070542961,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00062655599464, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.004689654727,
- 0.0,
- -0.0,
- -0.004631718438,
- -0.0,
- 0.014962374742,
- -0.000028968145,
- 0.0,
- -0.014962374742,
- -0.000028968144,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00060971952519, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000396459592, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.059832149673, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001972801620, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.012031476427,
- 0.0,
- -0.000000000000,
- -0.011634888026,
- 0.0,
- 0.010540730273,
- -0.000198294201,
- 0.0,
- -0.010540730274,
- -0.000198294201,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000566397552, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.067689046439, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002200309774, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.010263706524,
- 0.0,
- -0.000000000000,
- -0.009982176653,
- 0.0,
- 0.011813660618,
- -0.000140764936,
- 0.0,
- -0.011813660618,
- -0.000140764936,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000780187024, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.075581499723, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002427625806, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.008448066470,
- 0.0,
- -0.000000000000,
- -0.008281866938,
- 0.0,
- 0.013097326629,
- -0.000083099766,
- 0.0,
- -0.013097326629,
- -0.000083099766,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001063189693, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.079048591655, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.005890513253,
- 0.0,
- -0.000000000000,
- -0.005780178036,
- 0.0,
- 0.014386023476,
- -0.000055167609,
- 0.0,
- -0.014386023476,
- -0.000055167609,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001486131044, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.084811453110, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002450103204, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- 0.000000000000,
- 0.002942322545,
- 0.000000000000,
- -0.000000000000,
- -0.002924986204,
- -0.000000000000,
- 0.015750409537,
- -0.000008668171,
- 0.000000000000,
- -0.015750409537,
- -0.000008668171,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00116757931849, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.08225497590846, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.005192742269,
- 0.0,
- -0.0,
- -0.005046526613,
- -0.0,
- 0.014877327584,
- -0.000073107828,
- 0.0,
- -0.014877327584,
- -0.000073107828,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.000628655467, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000606118093, # dfocc, tight
- "SVWN TOTAL ENERGY": -25.88283110277485, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [
- -0.0,
- 0.0,
- -0.007528180742,
- 0.0,
- 0.0,
- 0.002278298181,
- -0.0,
- 0.036125770495,
- 0.002624938728,
- 0.0,
- -0.036125770495,
- 0.002624938728,
- ]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi 99,590, findif-5
- [
- -0.001868632523,
- 0.0,
- 0.0,
- 0.002273478054,
- 0.0,
- 0.0,
- -0.000202422765,
- 0.0,
- 0.0,
- -0.000202422765,
- 0.0,
- 0.0,
- 0.0,
- -0.002099514447,
- 0.0,
- 0.0,
- 0.002410237082,
- 0.0,
- 0.0,
- -0.000155361318,
- -0.000139354921,
- 0.0,
- -0.000155361318,
- 0.000139354921,
- 0.0,
- 0.0,
- 0.209841529106,
- 0.0,
- 0.0,
- -0.211634651715,
- 0.0,
- 0.003613009863,
- 0.000896561305,
- 0.0,
- -0.003613009863,
- 0.000896561305,
- 0.002273478054,
- 0.0,
- 0.0,
- -0.001884996935,
- 0.0,
- 0.0,
- -0.000194240559,
- 0.0,
- 0.0,
- -0.000194240559,
- 0.0,
- 0.0,
- 0.0,
- 0.002410237082,
- 0.0,
- 0.0,
- -0.001966220902,
- 0.0,
- 0.0,
- -0.00022200809,
- 0.000081337758,
- 0.0,
- -0.00022200809,
- -0.000081337758,
- 0.0,
- 0.0,
- -0.211634651715,
- 0.0,
- 0.0,
- 0.211515553657,
- 0.0,
- 0.000035537687,
- 0.000059549029,
- 0.0,
- -0.000035537687,
- 0.000059549029,
- -0.000202422765,
- 0.0,
- 0.0,
- -0.000194240559,
- 0.0,
- 0.0,
- -0.025531746834,
- 0.0,
- 0.0,
- 0.025928410159,
- 0.0,
- 0.0,
- 0.0,
- -0.000155361318,
- 0.003613009863,
- 0.0,
- -0.00022200809,
- 0.000035537687,
- 0.0,
- 0.40846028102,
- -0.001795265194,
- 0.0,
- -0.408082911612,
- -0.001853282357,
- 0.0,
- -0.000139354921,
- 0.000896561305,
- 0.0,
- 0.000081337758,
- 0.000059549029,
- 0.0,
- -0.001795265194,
- -0.026298945203,
- 0.0,
- 0.001853282357,
- 0.025342834869,
- -0.000202422765,
- 0.0,
- 0.0,
- -0.000194240559,
- 0.0,
- 0.0,
- 0.025928410159,
- 0.0,
- 0.0,
- -0.025531746834,
- 0.0,
- 0.0,
- 0.0,
- -0.000155361318,
- -0.003613009863,
- 0.0,
- -0.00022200809,
- -0.000035537687,
- 0.0,
- -0.408082911612,
- 0.001853282357,
- 0.0,
- 0.40846028102,
- 0.001795265194,
- 0.0,
- 0.000139354921,
- 0.000896561305,
- 0.0,
- -0.000081337758,
- 0.000059549029,
- 0.0,
- -0.001853282357,
- 0.025342834869,
- 0.0,
- 0.001795265194,
- -0.026298945203,
- ]
- ).reshape((12, 12)),
- "PBE TOTAL ENERGY": -26.04682962, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [
- -0.0,
- -0.0,
- -0.00292661285,
- 0.0,
- 0.0,
- -0.000169218875,
- -0.0,
- 0.026134688736,
- 0.001547921503,
- 0.0,
- -0.026134688736,
- 0.001547921503,
- ]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -26.11401525, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [
- 0.0,
- 0.0,
- 0.003314065304,
- 0.0,
- 0.0,
- -0.005823149531,
- -0.0,
- 0.019174183281,
- 0.001254732996,
- 0.0,
- -0.019174183281,
- 0.001254732996,
- ]
- ).reshape((-1, 3)),
- "WB97X TOTAL ENERGY": -26.09949176460252, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202 findif-5
- [
- -0.0,
- 0.0,
- 0.003379717239,
- -0.0,
- 0.0,
- -0.006574418407,
- -0.0,
- 0.018193361281,
- 0.001597213407,
- 0.0,
- -0.018193361281,
- 0.001597213407,
- ]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_df_uhf,
- "B2PLYP TOTAL ENERGY": -26.0729396999567840, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "df",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_df_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_df_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_df_uhf,
- "MP2 CORRELATION ENERGY": -0.15483909,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03523134,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.0,
- 0.0,
- 0.025476049585,
- 0.0,
- 0.013480567736,
- -0.012738024793,
- 0.0,
- -0.013480567736,
- -0.012738024793,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.17097347, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03530244, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.027082665714, 0.0, 0.014406579724, -0.013541332857, 0.0, -0.014406579724, -0.013541332857]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.17256998862940, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.03451443433327, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.1770997033, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0340788149, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.030686886723, 0.0, 0.016619966665, -0.015343443362, 0.0, -0.016619966665, -0.015343443362]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.17282784, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [-0.0, -0.0, 0.028141518582, 0.0, 0.01520232422, -0.014070759291, 0.0, -0.01520232422, -0.014070759291]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.17395818499234, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.029266386707,
- 0.0,
- 0.015807793582,
- -0.014633193357,
- -0.0,
- -0.015807793582,
- -0.014633193351,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00384810072338, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.031148775451,
- 0.0,
- 0.016805034066,
- -0.015574387726,
- -0.0,
- -0.016805034066,
- -0.015574387725,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00376812221828, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001367832301, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.156173452626, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.036004901480, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.026914388853,
- 0.0,
- 0.014240311996,
- -0.013457194426,
- 0.0,
- -0.014240311996,
- -0.013457194426,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001174470264, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.164063461670, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035847923992, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.027483211370,
- 0.0,
- 0.014576999156,
- -0.013741605685,
- 0.0,
- -0.014576999156,
- -0.013741605685,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001024687110, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.171990731878, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035717311998, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.028112148199,
- 0.0,
- 0.014949633980,
- -0.014056074099,
- 0.0,
- -0.014949633980,
- -0.014056074099,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.0011125246764, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.17366812020990, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight)
- [
- 0.0,
- -0.000000000000,
- 0.030213597936,
- 0.0,
- 0.016231443797,
- -0.015106798968,
- 0.0,
- -0.016231443797,
- -0.015106798968,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001111851483, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.178196933112, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.034422402711, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- -0.000000000000,
- 0.031864432517,
- 0.000000000000,
- 0.017258987132,
- -0.015932216258,
- -0.000000000000,
- -0.017258987132,
- -0.015932216258,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00098766230788, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.17380639841079, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [-0.0, -0.0, 0.029147626743, 0.0, 0.01574493194, -0.014573813372, -0.0, -0.01574493194, -0.014573813372]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.003993549226, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003893263740, # dfocc, tight
- "SVWN TOTAL ENERGY": -55.57344983107319, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [-0.0, 0.0, 0.035469475022, -0.0, 0.020928806811, -0.01773474765, 0.0, -0.020928806811, -0.01773474765]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.9 99,590
- [
- -0.03057202,
- 0.0,
- -0.0,
- 0.01529392,
- 0.0,
- -0.0,
- 0.01529392,
- -0.0,
- -0.0,
- 0.0,
- 0.61360803,
- -0.0,
- -0.0,
- -0.30681053,
- 0.24715943,
- 0.0,
- -0.30681053,
- -0.24715943,
- -0.0,
- -0.0,
- 0.37847696,
- 0.0,
- 0.19396643,
- -0.18924016,
- 0.0,
- -0.19396643,
- -0.18924016,
- 0.01529392,
- -0.0,
- 0.0,
- -0.01457079,
- -0.0,
- 0.0,
- -0.00072245,
- 0.0,
- 0.0,
- 0.0,
- -0.30681053,
- 0.19396643,
- -0.0,
- 0.33243283,
- -0.22056279,
- -0.0,
- -0.02562228,
- 0.0265965,
- -0.0,
- 0.24715943,
- -0.18924016,
- 0.0,
- -0.22056279,
- 0.18252176,
- 0.0,
- -0.0265965,
- 0.00671853,
- 0.01529392,
- 0.0,
- 0.0,
- -0.00072245,
- -0.0,
- 0.0,
- -0.01457079,
- 0.0,
- 0.0,
- -0.0,
- -0.30681053,
- -0.19396643,
- 0.0,
- -0.02562228,
- -0.0265965,
- 0.0,
- 0.33243283,
- 0.22056279,
- -0.0,
- -0.24715943,
- -0.18924016,
- 0.0,
- 0.0265965,
- 0.00671853,
- 0.0,
- 0.22056279,
- 0.18252176,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -55.81475290212862, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [-0.0, 0.0, 0.035840402792, -0.0, 0.01975585323, -0.017920287524, 0.0, -0.01975585323, -0.017920287524]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -55.89010330, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [0.0, 0.0, 0.026815461209, -0.0, 0.014944070844, -0.013407746678, 0.0, -0.014944070844, -0.013407746678]
- ).reshape((-1, 3)),
- "WB97X TOTAL ENERGY": -55.86922972100922, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202 findif-5
- [0.0, 0.0, 0.02448296743, -0.0, 0.013468925278, -0.012241027965, 0.0, -0.013468925278, -0.012241027965]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_df_uhf,
- "B2PLYP TOTAL ENERGY": -55.8336273896870736, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "df",
- "reference": "uhf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_df_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_df_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_df_uhf,
- "MP2 CORRELATION ENERGY": -0.19550726,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04161470,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.0,
- 0.0,
- 0.013708831104,
- 0.0,
- 0.005340400162,
- -0.006854415552,
- 0.0,
- -0.005340400162,
- -0.006854415552,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.21083057, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04130147, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.014412459072, 0.0, 0.005610368822, -0.007206229536, 0.0, -0.005610368822, -0.007206229536]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.212434650458, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.040606132872, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.2167706529, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0401283617, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.018122428755, 0.0, 0.007810952273, -0.009061214377, 0.0, -0.007810952273, -0.009061214377]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.21198023, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [-0.0, -0.0, 0.015551859519, -0.0, 0.006470515012, -0.00777592976, 0.0, -0.006470515012, -0.00777592976]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.21328159274710, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, -0.0, 0.016818391166, -0.0, 0.0071380193, -0.008409195584, 0.0, -0.0071380193, -0.008409195582]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00516563729772, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.0,
- 0.019018581448,
- -0.0,
- 0.008236968052,
- -0.009509290726,
- 0.0,
- -0.008236968052,
- -0.009509290722,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00506341197521, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001570633341, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.197048695120, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.042457672915, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.015291382216,
- 0.0,
- 0.006145115573,
- -0.007645691108,
- 0.0,
- -0.006145115573,
- -0.007645691108,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001350847967, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.204503012944, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.042084276114, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.015388626332,
- 0.0,
- 0.006150433332,
- -0.007694313166,
- 0.0,
- -0.006150433332,
- -0.007694313166,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001177820960, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.211999043568, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.041741379825, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.015546142750,
- 0.0,
- 0.006191167357,
- -0.007773071375,
- 0.0,
- -0.006191167357,
- -0.007773071375,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001287786460, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.213706080780, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.017877890596,
- 0.0,
- 0.007580722221,
- -0.008938945298,
- 0.0,
- -0.007580722221,
- -0.008938945298,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001285702841, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.218038927594, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.040510034508, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- -0.000000000000,
- 0.019448090911,
- -0.000000000000,
- 0.008509858260,
- -0.009724045456,
- 0.000000000000,
- -0.008509858260,
- -0.009724045456,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00115506325268, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.21312358096054, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.016675154934, -0.0, 0.007064234315, -0.008337577467, 0.0, -0.007064234315, -0.008337577467]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.005337854371, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005214252989, # dfocc, tight
- "SVWN TOTAL ENERGY": -55.59261213872637, # psi 99,590
- "SVWN TOTAL GRADIENT": np.array( # psi 99,590
- [
- -0.0,
- 0.0,
- 0.028854540696,
- -0.0,
- 0.016550659197,
- -0.014427331687,
- 0.0,
- -0.016550659197,
- -0.014427331687,
- ]
- ).reshape((-1, 3)),
- "SVWN TOTAL HESSIAN": np.array( # psi v1.9 99,590
- [
- -0.02486474,
- 0.0,
- 0.0,
- 0.01244166,
- 0.0,
- -0.0,
- 0.01244166,
- -0.0,
- -0.0,
- 0.0,
- 0.59337807,
- -0.0,
- 0.0,
- -0.29669581,
- 0.23720953,
- 0.0,
- -0.29669581,
- -0.23720953,
- 0.0,
- -0.0,
- 0.37090816,
- -0.0,
- 0.18498275,
- -0.18545575,
- 0.0,
- -0.18498275,
- -0.18545575,
- 0.01244166,
- 0.0,
- -0.0,
- -0.01169818,
- -0.0,
- -0.0,
- -0.0007449,
- 0.0,
- 0.0,
- 0.0,
- -0.29669581,
- 0.18498275,
- -0.0,
- 0.3227077,
- -0.21109672,
- -0.0,
- -0.02601184,
- 0.02611339,
- -0.0,
- 0.23720953,
- -0.18545575,
- -0.0,
- -0.21109672,
- 0.17826019,
- -0.0,
- -0.02611339,
- 0.00719517,
- 0.01244166,
- 0.0,
- 0.0,
- -0.0007449,
- -0.0,
- -0.0,
- -0.01169818,
- -0.0,
- 0.0,
- -0.0,
- -0.29669581,
- -0.18498275,
- 0.0,
- -0.02601184,
- -0.02611339,
- -0.0,
- 0.3227077,
- 0.21109672,
- -0.0,
- -0.23720953,
- -0.18545575,
- 0.0,
- 0.02611339,
- 0.00719517,
- 0.0,
- 0.21109672,
- 0.17826019,
- ]
- ).reshape((9, 9)),
- "PBE TOTAL ENERGY": -55.83100498, # psi 99,590
- "PBE TOTAL GRADIENT": np.array( # psi 99,590
- [-0.0, 0.0, 0.029591151947, -0.0, 0.015623483695, -0.01479570471, 0.0, -0.015623483695, -0.01479570471]
- ).reshape((-1, 3)),
- "B3LYP TOTAL ENERGY": -55.90728149, # psi 99,590
- "B3LYP TOTAL GRADIENT": np.array( # psi 99,590
- [-0.0, 0.0, 0.01997080535, -0.0, 0.010412948823, -0.009985460257, 0.0, -0.010412948823, -0.009985460257]
- ).reshape((-1, 3)),
- "WB97X TOTAL ENERGY": -55.88530822384336, # psi 500,1202
- "WB97X TOTAL GRADIENT": np.array( # psi 500,1202, findif-5
- [-0.0, 0.0, 0.01726863113, -0.0, 0.008837123397, -0.008633551557, 0.0, -0.008837123397, -0.008633551557]
- ).reshape((-1, 3)),
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_df_uhf,
- "B2PLYP TOTAL ENERGY": -55.8610813741572159, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_df_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_df_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_df_rohf,
- "MP2 CORRELATION ENERGY": -0.0604436327328384,
- "MP2 SINGLES ENERGY": -0.0006940750313001934,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0020065676314032863,
- "MP2 TOTAL GRADIENT": np.array(
- [ # occ findif-5 ae df+df
- 0.00000000000000,
- 0.00000000000000,
- 0.01361287313486,
- 0.00000000000000,
- 0.00000000000000,
- -0.01314329502424,
- 0.00000000000000,
- 0.01029838165151,
- -0.00023478905531,
- 0.00000000000000,
- -0.01029838165151,
- -0.00023478905531,
- ]
- ).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.0834776542, # p4n
- "LCCD TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- "OMP2 REFERENCE CORRECTION ENERGY": -0.001127578413, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.061356186762, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001972801188, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.012031487574,
- 0.0,
- -0.000000000000,
- -0.011634881724,
- 0.0,
- 0.010540719393,
- -0.000198302925,
- 0.0,
- -0.010540719393,
- -0.000198302925,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.000957639989, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.069213083529, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002200309067, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.010263733632,
- 0.0,
- -0.000000000000,
- -0.009982179290,
- 0.0,
- 0.011813639779,
- -0.000140777171,
- 0.0,
- -0.011813639779,
- -0.000140777171,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.000743849641, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.077105536812, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002427625679, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.008448077204,
- 0.0,
- -0.000000000000,
- -0.008281875978,
- 0.0,
- 0.013097326563,
- -0.000083100613,
- 0.0,
- -0.013097326563,
- -0.000083100613,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.000460845361, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.080572628744, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.005890487280,
- 0.0,
- -0.000000000000,
- -0.005780144920,
- 0.0,
- 0.014386015714,
- -0.000055171180,
- 0.0,
- -0.014386015714,
- -0.000055171180,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.000037911160, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.086335490199, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002450103939, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- 0.000000000000,
- 0.002942353924,
- 0.000000000000,
- -0.000000000000,
- -0.002925017923,
- -0.000000000000,
- 0.015750403382,
- -0.000008668000,
- 0.000000000000,
- -0.015750403382,
- -0.000008668000,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00035645775738, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.08377901300913, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.000000000000,
- 0.005192742183,
- 0.0,
- -0.000000000000,
- -0.005046526527,
- -0.0,
- 0.014877327583,
- -0.000073107828,
- 0.0,
- -0.014877327583,
- -0.000073107828,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.000628655467, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000606118094, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "df",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_df_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_df_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_df_rohf,
- "MP2 CORRELATION ENERGY": -0.15947485,
- "MP2 SINGLES ENERGY": -0.00282982,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03544639,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.0,
- 0.0,
- 0.025593521597,
- 0.0,
- 0.013495283342,
- -0.012796760798,
- 0.0,
- -0.013495283342,
- -0.012796760798,
- ]
- ).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.1792603912, # p4n
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003046129441, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.160587412835, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.036004901152, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.026914381459,
- 0.0,
- 0.014240313354,
- -0.013457190729,
- 0.0,
- -0.014240313354,
- -0.013457190729,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003239492526, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.168477421879, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035847923306, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.027483206969,
- 0.0,
- 0.014577000408,
- -0.013741603485,
- 0.0,
- -0.014577000408,
- -0.013741603485,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003389275946, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.176404692086, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.035717311411, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.028112143061,
- 0.0,
- 0.014949636932,
- -0.014056071530,
- 0.0,
- -0.014949636932,
- -0.014056071530,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003301435451, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.178082080418, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.030213608364,
- 0.0,
- 0.016231443474,
- -0.015106804182,
- 0.0,
- -0.016231443474,
- -0.015106804182,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003302111181, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.182610893321, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.034422399491, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- -0.000000000000,
- 0.031864462561,
- 0.000000000000,
- 0.017259000991,
- -0.015932231281,
- -0.000000000000,
- -0.017259000990,
- -0.015932231281,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00342629789193, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.17822035862112, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- -0.000000000000,
- 0.029147627070,
- 0.0,
- 0.015744932006,
- -0.014573813535,
- -0.0,
- -0.015744932006,
- -0.014573813535,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.003993549230, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003893263743, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "df",
- "reference": "rohf",
- "fcae": "ae",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_df_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_df_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_df_rohf,
- "MP2 CORRELATION ENERGY": -0.20051655,
- "MP2 SINGLES ENERGY": -0.00298400,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.04178365,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 ae df+df
- 0.0,
- 0.0,
- 0.013865245912,
- 0.0,
- 0.005377216253,
- -0.006932622956,
- 0.0,
- -0.005377216253,
- -0.006932622956,
- ]
- ).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.2190866990, # p4n
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003039409981, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.201658737065, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.042457672983, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.015291380391,
- 0.0,
- 0.006145126895,
- -0.007645690196,
- 0.0,
- -0.006145126895,
- -0.007645690196,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003259197444, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.209113054889, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.042084275918, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.015388624199,
- 0.0,
- 0.006150440601,
- -0.007694312099,
- 0.0,
- -0.006150440601,
- -0.007694312099,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003432224601, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.216609085513, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.041741379888, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.015546139127,
- 0.0,
- 0.006191172928,
- -0.007773069564,
- 0.0,
- -0.006191172928,
- -0.007773069564,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003322256873, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.218316122726, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.017877876813,
- 0.0,
- 0.007580722265,
- -0.008938938407,
- 0.0,
- -0.007580722265,
- -0.008938938407,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003324348494, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.222648969545, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.040510044397, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- -0.000000000000,
- 0.019447884570,
- -0.000000000000,
- 0.008509802850,
- -0.009723942285,
- 0.000000000000,
- -0.008509802849,
- -0.009723942285,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00345497869314, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.21773362291808, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.016675155033,
- -0.0,
- 0.007064234369,
- -0.008337577516,
- 0.0,
- -0.007064234369,
- -0.008337577516,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.005337854373, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005214252991, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< DF-FC-DF >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_df_rhf,
- "MP2 CORRELATION ENERGY": -0.201610660387,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0535212487451535,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.00000000000000,
- 0.00000000000000,
- 0.00314716362539,
- 0.00000000000000,
- 0.00000000000000,
- -0.00314716362539,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20461763, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000595617648, 0.0, 0.0, 0.000595617648]).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.206525739571, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2080860831, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.002514968877, 0.0, 0.0, -0.002514968877]).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2063501312, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.001158833226, -0.0, -0.0, -0.001158833226]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.20694030442285, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04775171,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.002316407407,
- 0.0,
- 0.0,
- -0.002316407407,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00192209183545, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.003412477814, -0.0, -0.0, -0.003412477814]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00194585245550, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000703072086, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.202322737562, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.004462211239, 0.0, -0.000000000000, -0.004462211239]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000572012280, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.203736894925, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.002400349139, 0.0, -0.000000000000, -0.002400349139]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000469635507, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.205198445453, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.000413292087, 0.0, -0.000000000000, -0.000413292087]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.000554531047, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.207169559461, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.000000000000, 0.003224769580, 0.0, -0.000000000000, -0.003224769580]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.000553992712, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.208748872411, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.000000000000, 0.000000000000, 0.003792898685, -0.000000000000, -0.000000000000, -0.003792898685]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00051222526754, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.20695630522582, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.002245645626, -0.0, -0.0, -0.002245645626]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.002045023614, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.002024842553, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_df_rhf,
- "B2PLYP TOTAL ENERGY": -100.3639883016977876, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "aug-cc-pvdz",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_adz_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_adz_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_adz_df_rhf,
- "MP2 CORRELATION ENERGY": -0.21939028,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05587974,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.010243193827,
- 0.0,
- 0.005885789424,
- -0.005121596913,
- 0.0,
- -0.005885789424,
- -0.005121596913,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.22424330, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.004605219936, 0.0, 0.002923029606, -0.002302609968, 0.0, -0.002923029606, -0.002302609968]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.22723769214209, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2297412879, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.009150916979, 0.0, 0.005603501036, -0.00457545849, 0.0, -0.005603501036, -0.00457545849]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2259041334, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.0,
- 0.006780363587,
- -0.0,
- 0.004293361962,
- -0.003390181794,
- 0.0,
- -0.004293361962,
- -0.003390181793,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.22729553766998, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04931891,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.008124306221,
- 0.0,
- 0.004987568157,
- -0.004062153110,
- 0.0,
- -0.004987568157,
- -0.004062153111,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00521721307613, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.010801208563,
- -0.0,
- 0.006421774051,
- -0.005400604280,
- -0.0,
- -0.006421774051,
- -0.005400604283,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00521446434812, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002352666762, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.221650942141, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.012771605048,
- 0.0,
- 0.007190306206,
- -0.006385802524,
- 0.0,
- -0.007190306205,
- -0.006385802524,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001538577646, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.223375325491, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.008996184043,
- 0.0,
- 0.005183828520,
- -0.004498092021,
- 0.0,
- -0.005183828519,
- -0.004498092021,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000960712694, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.225313300040, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.005564092786,
- 0.0,
- 0.003375822885,
- -0.002782046393,
- 0.0,
- -0.003375822885,
- -0.002782046393,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001285806012, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.228593144538, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.009830485254,
- 0.0,
- 0.005814222254,
- -0.004915242627,
- 0.0,
- -0.005814222254,
- -0.004915242627,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001194079264, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.231028592985, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- 0.000000000000,
- 0.010488609074,
- -0.000000000000,
- 0.006266448803,
- -0.005244304537,
- -0.000000000000,
- -0.006266448803,
- -0.005244304537,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00112736114914, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.22711013815896, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.007977310114,
- -0.0,
- 0.004884098446,
- -0.003988655057,
- -0.0,
- -0.004884098446,
- -0.003988655057,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.005548457534, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005450541943, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_adz_df_rhf,
- "B2PLYP TOTAL ENERGY": -76.3796839677439721, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "h2o",
- "basis": "cfour-qz2p",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_h2o_qz2p_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_h2o_qz2p_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_h2o_qz2p_df_rhf,
- "MP2 CORRELATION ENERGY": -0.24512893,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.06126089,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.000298272081,
- 0.0,
- -0.000570968013,
- -0.00014913604,
- 0.0,
- 0.000570968013,
- -0.00014913604,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.24746227, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.006198368687, 0.0, -0.004115138427, 0.003099184344, 0.0, 0.004115138427, 0.003099184344]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.251000783874, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "LCCD CORRELATION ENERGY": -0.2531777549, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, -0.001506644114, 0.0, -0.001400658245, 0.000753322057, 0.0, 0.001400658245, 0.000753322057]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.2488353928, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.0,
- -0.003903171069,
- -0.0,
- -0.002634101054,
- 0.001951585534,
- -0.0,
- 0.002634101055,
- 0.001951585534,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.25031496729288, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.05404876,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- -0.002520998723,
- 0.0,
- -0.001932209248,
- 0.001260499359,
- 0.0,
- 0.001932209248,
- 0.001260499363,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00709505459495, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [0.0, 0.0, 0.000617506530, -0.0, -0.000361314051, -0.000308753267, 0.0, 0.000361314051, -0.000308753262]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00701650721029, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.002436225037, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.247501148905, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.002625578291,
- 0.0,
- 0.000602919468,
- -0.001312789146,
- 0.0,
- -0.000602919468,
- -0.001312789146,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001628506731, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.247890696918, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- -0.001471303306,
- 0.0,
- -0.001622363348,
- 0.000735651653,
- 0.0,
- 0.001622363348,
- 0.000735651653,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001042188755, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.248510869843, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- -0.005274771244,
- 0.0,
- -0.003679381392,
- 0.002637385622,
- 0.0,
- 0.003679381392,
- 0.002637385622,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001387432536, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.252366737687, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- -0.000767533552,
- 0.0,
- -0.001128632785,
- 0.000383766776,
- 0.0,
- 0.001128632785,
- 0.000383766776,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001298398813, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.254465606264, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- -0.000000000000,
- -0.000178270779,
- -0.000000000000,
- -0.000741462346,
- 0.000089135390,
- 0.000000000000,
- 0.000741462346,
- 0.000089135390,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00122701106154, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.25004962087804, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- -0.002738846535,
- -0.0,
- -0.002056141369,
- 0.001369423268,
- 0.0,
- 0.002056141369,
- 0.001369423268,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.007400543965, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.007287376322, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_h2o_qz2p_df_rhf,
- "B2PLYP TOTAL ENERGY": -76.4097108446835733, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_df_uhf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_df_uhf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_df_uhf,
- "MP2 CORRELATION ENERGY": -0.058390006825,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.001768919072594215,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.00000000000000,
- 0.00000000000000,
- 0.01231996225662,
- 0.00000000000000,
- 0.00000000000000,
- -0.01186374280678,
- 0.00000000000000,
- 0.01031743020277,
- -0.00022810972492,
- 0.00000000000000,
- -0.01031743020277,
- -0.00022810972492,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.07380592, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.00220531, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.00909477332,
- 0.0,
- 0.0,
- -0.008853050692,
- 0.0,
- 0.012720593477,
- -0.000120861314,
- 0.0,
- -0.012720593477,
- -0.000120861314,
- ]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.077065229797, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.002191757201, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.0824996438, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0022545103, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [
- 0.0,
- 0.0,
- 0.004394350773,
- 0.0,
- 0.0,
- -0.004297223912,
- 0.0,
- 0.0152632844,
- -0.000048563431,
- 0.0,
- -0.0152632844,
- -0.000048563431,
- ]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.08021106, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.0,
- 0.006152061332,
- -0.0,
- -0.0,
- -0.005948040465,
- -0.0,
- 0.014448001505,
- -0.000102010434,
- 0.0,
- -0.014448001505,
- -0.000102010434,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.08123709133288, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.004955877488,
- 0.0,
- -0.0,
- -0.004802960939,
- -0.0,
- 0.014879065297,
- -0.000076458275,
- 0.0,
- -0.014879065297,
- -0.000076458275,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00060440612636, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.004453849339,
- 0.0,
- -0.0,
- -0.004383447765,
- -0.0,
- 0.014958703713,
- -0.000035200787,
- 0.0,
- -0.014958703713,
- -0.000035200787,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00058824527447, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.000394385396, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.058935159355, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001823537679, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.011816043382,
- 0.0,
- -0.000000000000,
- -0.011405170159,
- 0.0,
- 0.010534044966,
- -0.000205436611,
- 0.0,
- -0.010534044966,
- -0.000205436611,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.000566186305, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.066806131554, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002050540370, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.010039510728,
- 0.0,
- -0.000000000000,
- -0.009744203205,
- 0.0,
- 0.011807411335,
- -0.000147653762,
- 0.0,
- -0.011807411335,
- -0.000147653762,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.000783155015, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.074716931449, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002277314389, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.008212538414,
- 0.0,
- -0.000000000000,
- -0.008033077982,
- 0.0,
- 0.013091494156,
- -0.000089730216,
- 0.0,
- -0.013091494156,
- -0.000089730216,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001067566021, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.078201861999, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.005652301943,
- 0.0,
- -0.000000000000,
- -0.005529627660,
- 0.0,
- 0.014380946092,
- -0.000061337141,
- 0.0,
- -0.014380946092,
- -0.000061337141,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001494223667, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.083986395282, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002308873939, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- 0.000000000000,
- 0.002693251383,
- 0.000000000000,
- -0.000000000000,
- -0.002664270590,
- -0.000000000000,
- 0.015745905068,
- -0.000014490396,
- 0.000000000000,
- -0.015745905068,
- -0.000014490396,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00117513618887, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.08143642271488, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.000000000000,
- 0.004941329452,
- 0.0,
- -0.000000000000,
- -0.004783766728,
- -0.0,
- 0.014873123435,
- -0.000078781362,
- 0.0,
- -0.014873123435,
- -0.000078781362,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.000609013952, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000587107823, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_bh3p_dz_df_uhf,
- "B2PLYP TOTAL ENERGY": -26.0726110365712387, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "df",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_df_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_df_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_adz_df_uhf,
- "MP2 CORRELATION ENERGY": -0.15240678,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03448325,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.026264866471,
- 0.0,
- 0.013987430104,
- -0.013132433236,
- 0.0,
- -0.013987430104,
- -0.013132433236,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.16868589, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03460509, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.027853586058, 0.0, 0.014898421791, -0.013926793029, 0.0, -0.014898421791, -0.013926793029]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.17028287893561, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.03381515362353, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.1748446809, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0333897039, # dfocc
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.031455324295, 0.0, 0.017108389967, -0.015727662148, 0.0, -0.017108389967, -0.015727662148]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.17060710, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- -0.0,
- 0.028917529759,
- 0.0,
- 0.015695181131,
- -0.014458764879,
- 0.0,
- -0.015695181131,
- -0.014458764879,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.17173557387375, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.030043575132,
- 0.0,
- 0.016300990267,
- -0.015021787567,
- -0.0,
- -0.016300990267,
- -0.015021787565,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00381543842966, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.0,
- 0.031923074308,
- 0.0,
- 0.017296807836,
- -0.015961537154,
- -0.0,
- -0.017296807836,
- -0.015961537154,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00373604126252, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001361296352, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.153806958505, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035220509485, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.027773187697,
- 0.0,
- 0.014760469702,
- -0.013886593849,
- 0.0,
- -0.014760469702,
- -0.013886593849,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001172388039, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.161802412521, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035084385482, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.028357272969,
- 0.0,
- 0.015100442421,
- -0.014178636485,
- 0.0,
- -0.015100442421,
- -0.014178636485,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001026896343, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.169839459643, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.034978089725, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.029002023504,
- 0.0,
- 0.015477270320,
- -0.014501011752,
- 0.0,
- -0.015477270319,
- -0.014501011752,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001113332083, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.171513122196, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.031096217899,
- 0.0,
- 0.016756071833,
- -0.015548108949,
- 0.0,
- -0.016756071832,
- -0.015548108949,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001113749802, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.176088417240, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.033693410677, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- -0.000000000000,
- 0.032749728621,
- 0.000000000000,
- 0.017783947932,
- -0.016374864311,
- -0.000000000000,
- -0.017783947932,
- -0.016374864310,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.00098853594635, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.17171797869288, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- -0.000000000000,
- 0.030027361324,
- 0.0,
- 0.016268352543,
- -0.015013680662,
- -0.0,
- -0.016268352543,
- -0.015013680662,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.003958389693, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003858590576, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_adz_df_uhf,
- "B2PLYP TOTAL ENERGY": -55.8329155987089578, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "df",
- "reference": "uhf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_df_uhf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_df_uhf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_df_uhf,
- "MP2 CORRELATION ENERGY": -0.17116675,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03822296,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.01471721142,
- 0.0,
- 0.005840479593,
- -0.00735860571,
- 0.0,
- -0.005840479593,
- -0.00735860571,
- ]
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.18574570, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.03792036, # dfocc
- "MP3 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.015407701186, 0.0, 0.006091123422, -0.007703850593, 0.0, -0.006091123422, -0.007703850593]
- ).reshape((-1, 3)),
- "REMP2 CORRELATION ENERGY": -0.187461784316, # dfocc, tight
- "REMP2 SINGLES ENERGY": 0.0,
- "REMP2 SAME-SPIN CORRELATION ENERGY": -0.037230047131, # dfocc, tight
- "LCCD CORRELATION ENERGY": -0.1916908596, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.0367574293,
- "LCCD TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.019127907852, 0.0, 0.00829827557, -0.009563953926, 0.0, -0.00829827557, -0.009563953926]
- ).reshape((-1, 3)),
- "CCD CORRELATION ENERGY": -0.18707439, # dfocc, tight
- "CCD SINGLES ENERGY": 0.0,
- "CCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- -0.0,
- 0.016599541828,
- -0.0,
- 0.006987201946,
- -0.008299770914,
- 0.0,
- -0.006987201946,
- -0.008299770914,
- ]
- ).reshape((-1, 3)),
- "CCSD CORRELATION ENERGY": -0.18830636267506, # dfocc, tight
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.0,
- 0.017859476803,
- -0.0,
- 0.007647663282,
- -0.008929738402,
- 0.0,
- -0.007647663282,
- -0.008929738401,
- ]
- ).reshape((-1, 3)),
- "(T) CORRECTION ENERGY": -0.00498171470106, # dfocc, tight
- "CCSD(T) TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.0,
- 0.020007178737,
- -0.0,
- 0.008716203188,
- -0.010003589371,
- 0.0,
- -0.008716203188,
- -0.010003589367,
- ]
- ).reshape((-1, 3)),
- "A-(T) CORRECTION ENERGY": -0.00488153123480, # dfocc, tight
- "OMP2 REFERENCE CORRECTION ENERGY": 0.001480332224, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.172665177005, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.039018138633, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.016299386418,
- 0.0,
- 0.006629699700,
- -0.008149693209,
- 0.0,
- -0.006629699700,
- -0.008149693209,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": 0.001272971815, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.179766145094, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.038623138099, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.016424137432,
- 0.0,
- 0.006638678143,
- -0.008212068716,
- 0.0,
- -0.006638678143,
- -0.008212068716,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": 0.001112851260, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.186923452541, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.038268824767, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.016608938328,
- 0.0,
- 0.006684117862,
- -0.008304469164,
- 0.0,
- -0.006684117862,
- -0.008304469164,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": 0.001217776401, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.188735219689, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.018940660731,
- 0.0,
- 0.008076822926,
- -0.009470330365,
- 0.0,
- -0.008076822926,
- -0.009470330365,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": 0.001218640112, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.192974799277, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.037040961442, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- 0.000000000000,
- 0.020520978467,
- -0.000000000000,
- 0.009009472752,
- -0.010260489234,
- 0.000000000000,
- -0.009009472752,
- -0.010260489234,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": 0.0010910673835, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.18822673037030, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.017781686076,
- -0.0,
- 0.007590501254,
- -0.008890843038,
- 0.0,
- -0.007590501254,
- -0.008890843038,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.005145029771, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005024912480, # dfocc, tight
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_nh2_qz2p_df_uhf,
- "B2PLYP TOTAL ENERGY": -55.8541228738473166, # psi 99,590
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "bh3p",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_bh3p_dz_df_rohf,
- "HF TOTAL GRADIENT": _grad_scf_bh3p_dz_df_rohf,
- "HF TOTAL HESSIAN": _hess_scf_bh3p_dz_df_rohf,
- "MP2 CORRELATION ENERGY": -0.059372748391,
- "MP2 SINGLES ENERGY": -0.000688391888527046,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.0018535174789756292,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.01340658,
- 0.0,
- 0.0,
- -0.01292306,
- 0.0,
- 0.01029363,
- -0.00024176,
- 0.0,
- -0.01029363,
- -0.00024176,
- ]
- ).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.0824737155, # p4n
- "OMP2 REFERENCE CORRECTION ENERGY": -0.001129652787, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.060459196444, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.001823537706, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.011816050823,
- 0.0,
- -0.000000000000,
- -0.011405176978,
- 0.0,
- 0.010534044979,
- -0.000205436923,
- 0.0,
- -0.010534044979,
- -0.000205436923,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.000957847537, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.068330168643, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.002050540345, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.010039462838,
- 0.0,
- -0.000000000000,
- -0.009744167884,
- 0.0,
- 0.011807418804,
- -0.000147647477,
- 0.0,
- -0.011807418804,
- -0.000147647477,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.000740878651, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.076240968538, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.002277314395, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.008212498711,
- 0.0,
- -0.000000000000,
- -0.008033043130,
- 0.0,
- 0.013091495437,
- -0.000089727790,
- 0.0,
- -0.013091495437,
- -0.000089727790,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.000456469124, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.079725899088, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.005652293263,
- 0.0,
- -0.000000000000,
- -0.005529605660,
- 0.0,
- 0.014380930007,
- -0.000061343802,
- 0.0,
- -0.014380930007,
- -0.000061343802,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.000029817721, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.085510432371, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.002308874960, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- 0.000000000000,
- 0.002693270150,
- 0.000000000000,
- -0.000000000000,
- -0.002664286871,
- -0.000000000000,
- 0.015745889183,
- -0.000014491640,
- 0.000000000000,
- -0.015745889183,
- -0.000014491640,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00034890091894, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.08296045969717, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- 0.000000000000,
- 0.004941329268,
- 0.0,
- -0.000000000000,
- -0.004783766592,
- -0.0,
- 0.014873123401,
- -0.000078781338,
- 0.0,
- -0.014873123401,
- -0.000078781338,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.000609013944, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.000587107816, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(12).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(144).reshape((12, 12)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "aug-cc-pvdz",
- "scf_type": "df",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_adz_df_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_adz_df_rohf,
- "HF TOTAL HESSIAN": _grad_scf_nh2_adz_df_rohf,
- "MP2 CORRELATION ENERGY": -0.15700408,
- "MP2 SINGLES ENERGY": -0.00280619,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03469227,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.026382129796,
- 0.0,
- 0.014000533629,
- -0.013191064898,
- 0.0,
- -0.014000533629,
- -0.013191064898,
- ]
- ).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.1769909051, # p4n
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003052666882, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.158220918714, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.035220509402, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.027773186774,
- 0.0,
- 0.014760475104,
- -0.013886593387,
- 0.0,
- -0.014760475103,
- -0.013886593387,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003241577707, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.166216372729, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.035084385218, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.028357346855,
- 0.0,
- 0.015100453507,
- -0.014178673427,
- 0.0,
- -0.015100453507,
- -0.014178673427,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003387066455, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.174253419851, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.034978090484, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.029002032180,
- 0.0,
- 0.015477263061,
- -0.014501016090,
- 0.0,
- -0.015477263061,
- -0.014501016090,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003300628093, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.175927082404, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.031096218276,
- 0.0,
- 0.016756071943,
- -0.015548109138,
- 0.0,
- -0.016756071943,
- -0.015548109138,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003300211378, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.180502377447, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.033693402688, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.000000000000,
- -0.000000000000,
- 0.032749671199,
- 0.000000000000,
- 0.017783936393,
- -0.016374835600,
- -0.000000000000,
- -0.017783936393,
- -0.016374835600,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00342542420012, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.17613193885178, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- -0.0,
- -0.000000000000,
- 0.030027364470,
- 0.0,
- 0.016268353265,
- -0.015013682235,
- -0.0,
- -0.016268353265,
- -0.015013682235,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.003958389711, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.003858590593, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- {
- "meta": {
- "system": "nh2",
- "basis": "cfour-qz2p",
- "scf_type": "df",
- "reference": "rohf",
- "fcae": "fc",
- "corl_type": "df",
- "sdsc": "sc",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_nh2_qz2p_df_rohf,
- "HF TOTAL GRADIENT": _grad_scf_nh2_qz2p_df_rohf,
- "HF TOTAL HESSIAN": _hess_scf_nh2_qz2p_df_rohf,
- "MP2 CORRELATION ENERGY": -0.17609909,
- "MP2 SINGLES ENERGY": -0.00294363,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.03837317,
- "MP2 TOTAL GRADIENT": np.array(
- [ # dfmp2 findif-5 fc df+df
- 0.0,
- 0.0,
- 0.014870916178,
- 0.0,
- 0.00587474124,
- -0.007435458089,
- 0.0,
- -0.00587474124,
- -0.007435458089,
- ]
- ).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.1939804718, # p4n
- "OMP2 REFERENCE CORRECTION ENERGY": -0.003129716190, # dfocc, tight
- "OMP2 CORRELATION ENERGY": -0.177275218950, # dfocc, tight
- "OMP2 SAME-SPIN CORRELATION ENERGY": -0.039018136779, # dfocc, tight
- "OMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.016299403030,
- 0.0,
- 0.006629703904,
- -0.008149701515,
- 0.0,
- -0.006629703904,
- -0.008149701515,
- ]
- ).reshape((-1, 3)),
- "OMP2.5 REFERENCE CORRECTION ENERGY": -0.003337076220, # dfocc, tight
- "OMP2.5 CORRELATION ENERGY": -0.184376187039, # dfocc, tight
- "OMP2.5 SAME-SPIN CORRELATION ENERGY": -0.038623138676, # dfocc, tight
- "OMP2.5 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- -0.000000000000,
- 0.016424136331,
- 0.0,
- 0.006638670952,
- -0.008212068165,
- 0.0,
- -0.006638670952,
- -0.008212068165,
- ]
- ).reshape((-1, 3)),
- "OMP3 REFERENCE CORRECTION ENERGY": -0.003497196377, # dfocc, tight
- "OMP3 CORRELATION ENERGY": -0.191533494486, # dfocc, tight
- "OMP3 SAME-SPIN CORRELATION ENERGY": -0.038268825438, # dfocc, tight
- "OMP3 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.016608946514,
- 0.0,
- 0.006684114421,
- -0.008304473257,
- 0.0,
- -0.006684114421,
- -0.008304473257,
- ]
- ).reshape((-1, 3)),
- "OREMP2 REFERENCE CORRECTION ENERGY": -0.003392270931, # dfocc, tight
- "OREMP2 CORRELATION ENERGY": -0.193345261634, # dfocc, tight
- "OREMP2 TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.018940651737,
- 0.0,
- 0.008076829692,
- -0.009470325868,
- 0.0,
- -0.008076829692,
- -0.009470325868,
- ]
- ).reshape((-1, 3)),
- "OLCCD REFERENCE CORRECTION ENERGY": -0.003391400191, # dfocc, tight
- "OLCCD CORRELATION ENERGY": -0.197584841222, # dfocc, tight
- "OLCCD SAME-SPIN CORRELATION ENERGY": -0.037040959020, # dfocc, tight
- "OLCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.000000000000,
- 0.000000000000,
- 0.020521012807,
- -0.000000000000,
- 0.009009479704,
- -0.010260506404,
- 0.000000000000,
- -0.009009479704,
- -0.010260506404,
- ]
- ).reshape((-1, 3)),
- "OCCD REFERENCE CORRECTION ENERGY": -0.00351897455648, # dfocc, tight
- "OCCD CORRELATION ENERGY": -0.19283677235185, # dfocc, tight
- "OCCD TOTAL GRADIENT": np.array( # dfocc, tight
- [
- 0.0,
- 0.000000000000,
- 0.017781687051,
- -0.0,
- 0.007590501825,
- -0.008890843526,
- 0.0,
- -0.007590501825,
- -0.008890843526,
- ]
- ).reshape((-1, 3)),
- "O(T) CORRECTION ENERGY": -0.005145029773, # dfocc, tight
- "A-O(T) CORRECTION ENERGY": -0.005024912482, # dfocc, tight
- # "XXX TOTAL GRADIENT": np.zeros(9).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(81).reshape((9, 9)),
- },
- },
- # <<< lopsided SCF/CORL algorithms >>>
- # <<< lopsided DF-FC-CONV >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_df_rhf,
- "MP2 CORRELATION ENERGY": -0.201612517228,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05348507322421174,
- "MP2 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.00316682, 0.0, 0.0, -0.00316682] # occ findif-5 fc df+conv
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20452073,
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04918306,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_df_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- # <<< lopsided CD-FC-CONV >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "fc",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_cd_rhf,
- # "HF TOTAL HESSIAN": _hess_scf_hf_dz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.20162236483,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.053488165399,
- "MP2 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.00316652, 0.0, 0.0, -0.00316652] # occ findif-5 fc cd+conv
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20453091,
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04918609,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- # {
- # "meta": {
- # "system": "hf",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "rhf",
- # "fcae": "fc",
- # "corl_type": "cd",
- # "sdsc": "sd",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_hf_dz_df_rhf,
- # "MP2 CORRELATION ENERGY": -0.201609396752,
- # # "MP2 TOTAL ENERGY": -100.221010002381,
- # "MP2 SINGLES ENERGY": 0.0,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -0.4,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "uhf",
- # "fcae": "fc",
- # "corl_type": "conv",
- # "sdsc": "sd",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_uhf,
- # "MP2 CORRELATION ENERGY": -0.058421122206,
- # # "MP2 TOTAL ENERGY": -26.003551681354,
- # "MP2 SINGLES ENERGY": 0.0,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -0.5,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "uhf",
- # "fcae": "fc",
- # "corl_type": "cd",
- # "sdsc": "sd",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_uhf,
- # "MP2 CORRELATION ENERGY": -0.058409837177,
- # # "MP2 TOTAL ENERGY": -26.003540396324,
- # "MP2 SINGLES ENERGY": 0.0,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -0.7,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "rohf",
- # "fcae": "fc",
- # "corl_type": "conv",
- # "sdsc": "sc",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_rohf,
- # "MP2 CORRELATION ENERGY": -0.060939211739,
- # # "MP2 TOTAL ENERGY": -26.004545733768,
- # "MP2 SINGLES ENERGY": 1.1,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -1.1,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "rohf",
- # "fcae": "fc",
- # "corl_type": "cd",
- # "sdsc": "sc",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_rohf,
- # "MP2 CORRELATION ENERGY": -0.059393510962,
- # # "MP2 TOTAL ENERGY": -26.003000032991,
- # "MP2 SINGLES ENERGY": 1.3,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -1.3,
- # },
- # },
- # <<< lopsided DF-AE-CONV >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "df",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_df_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_df_rhf,
- "HF TOTAL HESSIAN": _hess_scf_hf_dz_df_rhf,
- "MP2 CORRELATION ENERGY": -0.2037668844651997,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05427252944164894,
- "MP2 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.00281165, 0.0, 0.0, -0.00281165] # occ findif-5 ae df+conv
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20646457, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04988633, # dfocc
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.000924553428, 0.0, 0.0, 0.000924553428]).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.2098900858, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.048336089041, # fnocc
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.002196305414, 0.0, 0.0, -0.002196305414]).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2107275173, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.048456320034, # fnocc
- "CCSD CORRELATION ENERGY": -0.20872812,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04857038,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_df_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- # <<< lopsided CD-AE-CONV >>>
- {
- "meta": {
- "system": "hf",
- "basis": "cc-pvdz",
- "scf_type": "cd",
- "reference": "rhf",
- "fcae": "ae",
- "corl_type": "conv",
- "sdsc": "sd",
- },
- "data": {
- "HF TOTAL ENERGY": _scf_hf_dz_cd_rhf,
- "HF TOTAL GRADIENT": _grad_scf_hf_dz_cd_rhf,
- # "HF TOTAL HESSIAN": _hess_scf_hf_dz_cd_rhf,
- "MP2 CORRELATION ENERGY": -0.2037767503537,
- "MP2 SINGLES ENERGY": 0.0,
- "MP2 SAME-SPIN CORRELATION ENERGY": -0.05427563053,
- "MP2 TOTAL GRADIENT": np.array(
- [0.0, 0.0, 0.00281136, 0.0, 0.0, -0.00281136] # occ findif-5 ae cd+conv
- ).reshape((-1, 3)),
- "MP3 CORRELATION ENERGY": -0.20647475, # dfocc
- "MP3 SINGLES ENERGY": 0.0,
- "MP3 SAME-SPIN CORRELATION ENERGY": -0.04988936, # dfocc
- "MP3 TOTAL GRADIENT": np.array([0.0, 0.0, -0.00092571521, 0.0, 0.0, 0.00092571521]).reshape((-1, 3)),
- "LCCD CORRELATION ENERGY": -0.2099004485, # p4n
- "LCCD SINGLES ENERGY": 0.0,
- "LCCD SAME-SPIN CORRELATION ENERGY": -0.048339111990, # fnocc
- "LCCD TOTAL GRADIENT": np.array([0.0, 0.0, 0.002195646447, 0.0, 0.0, -0.002195646447]).reshape((-1, 3)),
- "LCCSD CORRELATION ENERGY": -0.2107380019, # p4n
- "LCCSD SINGLES ENERGY": 0.0,
- "LCCSD SAME-SPIN CORRELATION ENERGY": -0.048459381537, # fnocc
- "CCSD CORRELATION ENERGY": -0.20873814,
- "CCSD SINGLES ENERGY": 0.0,
- "CCSD SAME-SPIN CORRELATION ENERGY": -0.04857333,
- "B2PLYP FUNCTIONAL TOTAL ENERGY": _b2plyp_hf_dz_cd_rhf,
- # "XXX TOTAL GRADIENT": np.zeros(6).reshape((-1, 3)),
- # "XXX TOTAL HESSIAN": np.zeros(36).reshape((6, 6)),
- },
- },
- # {
- # "meta": {
- # "system": "hf",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "rhf",
- # "fcae": "ae",
- # "corl_type": "cd",
- # "sdsc": "sd",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_hf_dz_df_rhf,
- # "MP2 CORRELATION ENERGY": -2.3,
- # "MP2 SINGLES ENERGY": 0.0,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -2.3,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "uhf",
- # "fcae": "ae",
- # "corl_type": "conv",
- # "sdsc": "sd",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_uhf,
- # "MP2 CORRELATION ENERGY": -2.4,
- # "MP2 SINGLES ENERGY": 0.0,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -2.4,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "uhf",
- # "fcae": "ae",
- # "corl_type": "cd",
- # "sdsc": "sd",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_uhf,
- # "MP2 CORRELATION ENERGY": -2.5,
- # "MP2 SINGLES ENERGY": 0.0,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -2.5,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "rohf",
- # "fcae": "ae",
- # "corl_type": "conv",
- # "sdsc": "sc",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_rohf,
- # "MP2 CORRELATION ENERGY": -2.7,
- # "MP2 SINGLES ENERGY": -2.7,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -2.7,
- # },
- # },
- # {
- # "meta": {
- # "system": "bh3p",
- # "basis": "cc-pvdz",
- # "scf_type": "df",
- # "reference": "rohf",
- # "fcae": "ae",
- # "corl_type": "cd",
- # "sdsc": "sc",
- # },
- # "data": {
- # "HF TOTAL ENERGY": _scf_bh3p_dz_df_rohf,
- # "MP2 CORRELATION ENERGY": -2.8,
- # "MP2 SINGLES ENERGY": -2.8,
- # "MP2 SAME-SPIN CORRELATION ENERGY": -2.8,
- # },
- # },
-]
-
-
-def compute_derived_qcvars(std_suite_list):
- for calc in std_suite_list:
- if calc["data"]:
- if "MP2 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP2 TOTAL ENERGY"] = (
- calc["data"]["MP2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "MP2 SINGLES ENERGY" in calc["data"]:
- calc["data"]["MP2 DOUBLES ENERGY"] = (
- calc["data"]["MP2 CORRELATION ENERGY"] - calc["data"]["MP2 SINGLES ENERGY"]
- )
- if "MP2 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["MP2 CORRELATION ENERGY"]
- - calc["data"]["MP2 SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["MP2 SINGLES ENERGY"]
- )
- calc["data"]["SCS-MP2 CORRELATION ENERGY"] = (
- (1 / 3) * calc["data"]["MP2 SAME-SPIN CORRELATION ENERGY"]
- + (6 / 5) * calc["data"]["MP2 OPPOSITE-SPIN CORRELATION ENERGY"]
- + calc["data"]["MP2 SINGLES ENERGY"]
- )
- calc["data"]["SCS-MP2 TOTAL ENERGY"] = (
- calc["data"]["SCS-MP2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "MP3 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP3 TOTAL ENERGY"] = (
- calc["data"]["MP3 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "MP2 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP2.5 CORRELATION ENERGY"] = 0.5 * (
- calc["data"]["MP3 CORRELATION ENERGY"] + calc["data"]["MP2 CORRELATION ENERGY"]
- )
- calc["data"]["MP2.5 TOTAL ENERGY"] = (
- calc["data"]["MP2.5 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "MP3 SINGLES ENERGY" in calc["data"]:
- calc["data"]["MP3 DOUBLES ENERGY"] = (
- calc["data"]["MP3 CORRELATION ENERGY"] - calc["data"]["MP3 SINGLES ENERGY"]
- )
- if "MP2 SINGLES ENERGY" in calc["data"]:
- calc["data"]["MP2.5 SINGLES ENERGY"] = 0.5 * (
- calc["data"]["MP3 SINGLES ENERGY"] + calc["data"]["MP2 SINGLES ENERGY"]
- )
- calc["data"]["MP2.5 DOUBLES ENERGY"] = (
- calc["data"]["MP2.5 CORRELATION ENERGY"] - calc["data"]["MP2.5 SINGLES ENERGY"]
- )
- if "MP3 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP3 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["MP3 CORRELATION ENERGY"]
- - calc["data"]["MP3 SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["MP3 SINGLES ENERGY"]
- )
- if "MP2 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP2.5 SAME-SPIN CORRELATION ENERGY"] = 0.5 * (
- calc["data"]["MP3 SAME-SPIN CORRELATION ENERGY"]
- + calc["data"]["MP2 SAME-SPIN CORRELATION ENERGY"]
- )
- calc["data"]["MP2.5 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["MP2.5 CORRELATION ENERGY"]
- - calc["data"]["MP2.5 SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["MP2.5 SINGLES ENERGY"]
- )
-
- if (
- "MP3 TOTAL GRADIENT" in calc["data"]
- and "MP2 TOTAL GRADIENT" in calc["data"]
- and "HF TOTAL GRADIENT" in calc["data"]
- ):
- calc["data"]["MP2.5 TOTAL GRADIENT"] = 0.5 * (
- calc["data"]["MP3 TOTAL GRADIENT"] + calc["data"]["MP2 TOTAL GRADIENT"]
- )
-
- if "MP4(SDQ) CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP4(SDQ) TOTAL ENERGY"] = (
- calc["data"]["MP4(SDQ) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "MP4(T) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["MP4 CORRELATION ENERGY"] = (
- calc["data"]["MP4(SDQ) CORRELATION ENERGY"] + calc["data"]["MP4(T) CORRECTION ENERGY"]
- )
- calc["data"]["MP4 TOTAL ENERGY"] = (
- calc["data"]["MP4 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "MP3 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["MP4 CORRECTION ENERGY"] = (
- calc["data"]["MP4 CORRELATION ENERGY"] - calc["data"]["MP3 CORRELATION ENERGY"]
- )
-
- if "ZAPT2 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["ZAPT2 TOTAL ENERGY"] = (
- calc["data"]["ZAPT2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CISD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CISD TOTAL ENERGY"] = (
- calc["data"]["CISD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "QCISD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["QCISD TOTAL ENERGY"] = (
- calc["data"]["QCISD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "QCISD(T) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["QCISD(T) CORRELATION ENERGY"] = (
- calc["data"]["QCISD CORRELATION ENERGY"] + calc["data"]["QCISD(T) CORRECTION ENERGY"]
- )
- calc["data"]["QCISD(T) TOTAL ENERGY"] = (
- calc["data"]["QCISD(T) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "FCI CORRELATION ENERGY" in calc["data"]:
- calc["data"]["FCI TOTAL ENERGY"] = (
- calc["data"]["FCI CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "REMP2 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["REMP2 TOTAL ENERGY"] = (
- calc["data"]["REMP2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "REMP2 SINGLES ENERGY" in calc["data"]:
- calc["data"]["REMP2 DOUBLES ENERGY"] = (
- calc["data"]["REMP2 CORRELATION ENERGY"] - calc["data"]["REMP2 SINGLES ENERGY"]
- )
- if "REMP2 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["REMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["REMP2 CORRELATION ENERGY"]
- - calc["data"]["REMP2 SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["REMP2 SINGLES ENERGY"]
- )
-
- if "LCCD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["LCCD TOTAL ENERGY"] = (
- calc["data"]["LCCD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "LCCD SINGLES ENERGY" in calc["data"]:
- calc["data"]["LCCD DOUBLES ENERGY"] = (
- calc["data"]["LCCD CORRELATION ENERGY"] - calc["data"]["LCCD SINGLES ENERGY"]
- )
- if "LCCD SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["LCCD OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["LCCD CORRELATION ENERGY"]
- - calc["data"]["LCCD SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["LCCD SINGLES ENERGY"]
- )
-
- if "LCCSD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["LCCSD TOTAL ENERGY"] = (
- calc["data"]["LCCSD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "LCCSD SINGLES ENERGY" in calc["data"]:
- calc["data"]["LCCSD DOUBLES ENERGY"] = (
- calc["data"]["LCCSD CORRELATION ENERGY"] - calc["data"]["LCCSD SINGLES ENERGY"]
- )
- if "LCCSD SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["LCCSD OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["LCCSD CORRELATION ENERGY"]
- - calc["data"]["LCCSD SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["LCCSD SINGLES ENERGY"]
- )
-
- if "CEPA(1) CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CEPA(1) TOTAL ENERGY"] = (
- calc["data"]["CEPA(1) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "CEPA(1) SINGLES ENERGY" in calc["data"]:
- calc["data"]["CEPA(1) DOUBLES ENERGY"] = (
- calc["data"]["CEPA(1) CORRELATION ENERGY"] - calc["data"]["CEPA(1) SINGLES ENERGY"]
- )
- if "CEPA(1) SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CEPA(1) OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["CEPA(1) CORRELATION ENERGY"]
- - calc["data"]["CEPA(1) SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["CEPA(1) SINGLES ENERGY"]
- )
-
- if "CEPA(3) CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CEPA(3) TOTAL ENERGY"] = (
- calc["data"]["CEPA(3) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "CEPA(3) SINGLES ENERGY" in calc["data"]:
- calc["data"]["CEPA(3) DOUBLES ENERGY"] = (
- calc["data"]["CEPA(3) CORRELATION ENERGY"] - calc["data"]["CEPA(3) SINGLES ENERGY"]
- )
- if "CEPA(3) SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CEPA(3) OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["CEPA(3) CORRELATION ENERGY"]
- - calc["data"]["CEPA(3) SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["CEPA(3) SINGLES ENERGY"]
- )
-
- if "ACPF CORRELATION ENERGY" in calc["data"]:
- calc["data"]["ACPF TOTAL ENERGY"] = (
- calc["data"]["ACPF CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "ACPF SINGLES ENERGY" in calc["data"]:
- calc["data"]["ACPF DOUBLES ENERGY"] = (
- calc["data"]["ACPF CORRELATION ENERGY"] - calc["data"]["ACPF SINGLES ENERGY"]
- )
- if "ACPF SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["ACPF OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["ACPF CORRELATION ENERGY"]
- - calc["data"]["ACPF SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["ACPF SINGLES ENERGY"]
- )
-
- if "AQCC CORRELATION ENERGY" in calc["data"]:
- calc["data"]["AQCC TOTAL ENERGY"] = (
- calc["data"]["AQCC CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "AQCC SINGLES ENERGY" in calc["data"]:
- calc["data"]["AQCC DOUBLES ENERGY"] = (
- calc["data"]["AQCC CORRELATION ENERGY"] - calc["data"]["AQCC SINGLES ENERGY"]
- )
- if "AQCC SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["AQCC OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["AQCC CORRELATION ENERGY"]
- - calc["data"]["AQCC SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["AQCC SINGLES ENERGY"]
- )
-
- if "CCD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCD TOTAL ENERGY"] = (
- calc["data"]["CCD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "CCD SINGLES ENERGY" in calc["data"]:
- calc["data"]["CCD DOUBLES ENERGY"] = (
- calc["data"]["CCD CORRELATION ENERGY"] - calc["data"]["CCD SINGLES ENERGY"]
- )
- if "CCD SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCD OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["CCD CORRELATION ENERGY"]
- - calc["data"]["CCD SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["CCD SINGLES ENERGY"]
- )
-
- if "BCCD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["BCCD TOTAL ENERGY"] = (
- calc["data"]["BCCD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CC2 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CC2 TOTAL ENERGY"] = (
- calc["data"]["CC2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSD TOTAL ENERGY"] = (
- calc["data"]["CCSD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "CCSD SINGLES ENERGY" in calc["data"]:
- calc["data"]["CCSD DOUBLES ENERGY"] = (
- calc["data"]["CCSD CORRELATION ENERGY"] - calc["data"]["CCSD SINGLES ENERGY"]
- )
- if "CCSD SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSD OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["CCSD CORRELATION ENERGY"]
- - calc["data"]["CCSD SAME-SPIN CORRELATION ENERGY"]
- - calc["data"]["CCSD SINGLES ENERGY"]
- )
-
- if "T(CCSD) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["CCSD+T(CCSD) CORRELATION ENERGY"] = (
- calc["data"]["CCSD CORRELATION ENERGY"] + calc["data"]["T(CCSD) CORRECTION ENERGY"]
- )
- calc["data"]["CCSD+T(CCSD) TOTAL ENERGY"] = (
- calc["data"]["CCSD+T(CCSD) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "(T) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["CCSD(T) CORRELATION ENERGY"] = (
- calc["data"]["CCSD CORRELATION ENERGY"] + calc["data"]["(T) CORRECTION ENERGY"]
- )
- calc["data"]["CCSD(T) TOTAL ENERGY"] = (
- calc["data"]["CCSD(T) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "A-(T) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["A-CCSD(T) CORRELATION ENERGY"] = (
- calc["data"]["CCSD CORRELATION ENERGY"] + calc["data"]["A-(T) CORRECTION ENERGY"]
- )
- calc["data"]["A-CCSD(T) TOTAL ENERGY"] = (
- calc["data"]["A-CCSD(T) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "B(T) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["BCCD(T) CORRELATION ENERGY"] = (
- calc["data"]["BCCD CORRELATION ENERGY"] + calc["data"]["B(T) CORRECTION ENERGY"]
- )
- calc["data"]["BCCD(T) TOTAL ENERGY"] = (
- calc["data"]["BCCD(T) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CC3 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CC3 TOTAL ENERGY"] = (
- calc["data"]["CC3 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSDT-1A CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSDT-1A TOTAL ENERGY"] = (
- calc["data"]["CCSDT-1A CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSDT-1B CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSDT-1B TOTAL ENERGY"] = (
- calc["data"]["CCSDT-1B CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSDT-2 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSDT-2 TOTAL ENERGY"] = (
- calc["data"]["CCSDT-2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSDT-3 CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSDT-3 TOTAL ENERGY"] = (
- calc["data"]["CCSDT-3 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSDT CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSDT TOTAL ENERGY"] = (
- calc["data"]["CCSDT CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "(Q) CORRECTION ENERGY" in calc["data"]:
- calc["data"]["CCSDT(Q) CORRELATION ENERGY"] = (
- calc["data"]["CCSDT CORRELATION ENERGY"] + calc["data"]["(Q) CORRECTION ENERGY"]
- )
- calc["data"]["CCSDT(Q) TOTAL ENERGY"] = (
- calc["data"]["CCSDT(Q) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "CCSDTQ CORRELATION ENERGY" in calc["data"]:
- calc["data"]["CCSDTQ TOTAL ENERGY"] = (
- calc["data"]["CCSDTQ CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "OMP2 CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OMP2 CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OMP2 TOTAL ENERGY"] = _knownmissing
- calc["data"]["OMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OMP2 TOTAL ENERGY"] = (
- calc["data"]["OMP2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "OMP2 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OMP2 SAME-SPIN CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["OMP2 CORRELATION ENERGY"]
- - calc["data"]["OMP2 REFERENCE CORRECTION ENERGY"]
- - calc["data"]["OMP2 SAME-SPIN CORRELATION ENERGY"]
- )
-
- if "OMP2.5 CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OMP2.5 CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OMP2.5 TOTAL ENERGY"] = _knownmissing
- calc["data"]["OMP2.5 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OMP2.5 TOTAL ENERGY"] = (
- calc["data"]["OMP2.5 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "OMP2.5 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OMP2.5 SAME-SPIN CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OMP2.5 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OMP2.5 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["OMP2.5 CORRELATION ENERGY"]
- - calc["data"]["OMP2.5 REFERENCE CORRECTION ENERGY"]
- - calc["data"]["OMP2.5 SAME-SPIN CORRELATION ENERGY"]
- )
-
- if "OMP3 CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OMP3 CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OMP3 TOTAL ENERGY"] = _knownmissing
- calc["data"]["OMP3 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OMP3 TOTAL ENERGY"] = (
- calc["data"]["OMP3 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "OMP3 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OMP3 SAME-SPIN CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OMP3 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OMP3 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["OMP3 CORRELATION ENERGY"]
- - calc["data"]["OMP3 REFERENCE CORRECTION ENERGY"]
- - calc["data"]["OMP3 SAME-SPIN CORRELATION ENERGY"]
- )
-
- if "OREMP2 CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OREMP2 CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OREMP2 TOTAL ENERGY"] = _knownmissing
- calc["data"]["OREMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OREMP2 TOTAL ENERGY"] = (
- calc["data"]["OREMP2 CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "OREMP2 SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OREMP2 SAME-SPIN CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OREMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OREMP2 OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["OREMP2 CORRELATION ENERGY"]
- - calc["data"]["OREMP2 REFERENCE CORRECTION ENERGY"]
- - calc["data"]["OREMP2 SAME-SPIN CORRELATION ENERGY"]
- )
-
- if "OLCCD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["OLCCD TOTAL ENERGY"] = (
- calc["data"]["OLCCD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "OLCCD SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- if calc["data"]["OLCCD SAME-SPIN CORRELATION ENERGY"] == _knownmissing:
- calc["data"]["OLCCD OPPOSITE-SPIN CORRELATION ENERGY"] = _knownmissing
- else:
- calc["data"]["OLCCD OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["OLCCD CORRELATION ENERGY"]
- - calc["data"]["OLCCD REFERENCE CORRECTION ENERGY"]
- - calc["data"]["OLCCD SAME-SPIN CORRELATION ENERGY"]
- )
-
- if "OCCD CORRELATION ENERGY" in calc["data"]:
- calc["data"]["OCCD TOTAL ENERGY"] = (
- calc["data"]["OCCD CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
- if "OCCD SAME-SPIN CORRELATION ENERGY" in calc["data"]:
- calc["data"]["OCCD OPPOSITE-SPIN CORRELATION ENERGY"] = (
- calc["data"]["OCCD CORRELATION ENERGY"]
- - calc["data"]["OCCD REFERENCE CORRECTION ENERGY"]
- - calc["data"]["OCCD SAME-SPIN CORRELATION ENERGY"]
- )
-
- if "O(T) CORRECTION ENERGY" in calc["data"]:
- if calc["data"]["O(T) CORRECTION ENERGY"] == _knownmissing:
- calc["data"]["OCCD(T) CORRELATION ENERGY"] = _knownmissing
- calc["data"]["OCCD(T) TOTAL ENERGY"] = _knownmissing
- else:
- calc["data"]["OCCD(T) CORRELATION ENERGY"] = (
- calc["data"]["OCCD CORRELATION ENERGY"] + calc["data"]["O(T) CORRECTION ENERGY"]
- )
- calc["data"]["OCCD(T) TOTAL ENERGY"] = (
- calc["data"]["OCCD(T) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- if "A-O(T) CORRECTION ENERGY" in calc["data"]:
- if calc["data"]["A-O(T) CORRECTION ENERGY"] == _knownmissing:
- calc["data"]["A-OCCD(T) CORRELATION ENERGY"] = _knownmissing
- calc["data"]["A-OCCD(T) TOTAL ENERGY"] = _knownmissing
- else:
- calc["data"]["A-OCCD(T) CORRELATION ENERGY"] = (
- calc["data"]["OCCD CORRELATION ENERGY"] + calc["data"]["A-O(T) CORRECTION ENERGY"]
- )
- calc["data"]["A-OCCD(T) TOTAL ENERGY"] = (
- calc["data"]["A-OCCD(T) CORRELATION ENERGY"] + calc["data"]["HF TOTAL ENERGY"]
- )
-
- calc["data"].update(_std_generics[f"{calc['meta']['system']}_{calc['meta']['basis']}_{calc['meta']['fcae']}"])
-
-
-def answer_hash(**kwargs):
- system = kwargs.pop("system")
- basis = kwargs.pop("basis")
- scf_type = kwargs.pop("scf_type")
- reference = kwargs.pop("reference")
- fcae = kwargs.pop("fcae")
- corl_type = kwargs.pop("corl_type")
- sdsc = kwargs.pop("sdsc")
-
- return "_".join([system, basis, scf_type, reference, fcae, corl_type, sdsc])
-
-
-compute_derived_qcvars(_std_suite)
-std_suite = {answer_hash(**calc["meta"]): calc["data"] for calc in _std_suite}
diff --git a/qcengine/programs/tests/standard_suite_runner.py b/qcengine/programs/tests/standard_suite_runner.py
deleted file mode 100644
index b49c56890..000000000
--- a/qcengine/programs/tests/standard_suite_runner.py
+++ /dev/null
@@ -1,478 +0,0 @@
-import pprint
-import re
-from typing import Any, Dict
-
-import numpy as np
-import pytest
-from qcelemental.models import AtomicInput
-from qcelemental.molutil import compute_scramble
-from qcelemental.testing import compare, compare_values
-
-import qcengine as qcng
-from qcengine.programs.util import mill_qcvars
-
-from .standard_suite_ref import answer_hash, std_suite
-from .standard_suite_contracts import *
-
-pp = pprint.PrettyPrinter(width=120)
-
-
-def runner_asserter(inp, ref_subject, method, basis, tnm, scramble, frame):
-
- qcprog = inp["call"]
- qc_module_in = inp["qc_module"] # returns ""|"-" # input-specified routing
- qc_module_xptd = (
- (qcprog + "-" + inp["xptd"]["qc_module"]) if inp.get("xptd", {}).get("qc_module", None) else None
- ) # expected routing
- driver = inp["driver"]
- reference = inp["reference"]
- fcae = inp["fcae"]
- sdsc = inp.get("sdsc", "") or ("sc" if reference == "rohf" else "sd")
-
- if basis == "cfour-qz2p" and qcprog in ["gamess", "nwchem", "qchem"]:
- pytest.skip(f"basis {basis} not available in {qcprog} library")
-
- # <<< Molecule >>>
-
- # 1. ref mol: `ref_subject` nicely oriented mol taken from standard_suite_ref.py
- min_nonzero_coords = np.count_nonzero(np.abs(ref_subject.geometry) > 1.0e-10)
-
- if scramble is None:
- subject = ref_subject
- ref2in_mill = compute_scramble(
- len(subject.symbols), do_resort=False, do_shift=False, do_rotate=False, do_mirror=False
- ) # identity AlignmentMill
-
- else:
- subject, data = ref_subject.scramble(**scramble, do_test=False)
- ref2in_mill = data["mill"]
-
- # 2. input mol: `subject` now ready for `atin.molecule`. may have been scrambled away from nice ref orientation
-
- # <<< Reference Values >>>
-
- # ? precedence on these types -- not really applicable to qcng
- mp2_type = inp.get("corl_type", inp["keywords"].get("mp2_type", "df")) # hard-code of read_options.cc MP2_TYPE
- mp_type = inp.get("corl_type", inp["keywords"].get("mp_type", "conv")) # hard-code of read_options.cc MP_TYPE
- ci_type = inp.get("corl_type", inp["keywords"].get("ci_type", "conv")) # hard-code of read_options.cc CI_TYPE
- cc_type = inp.get("corl_type", inp["keywords"].get("cc_type", "conv")) # hard-code of read_options.cc CC_TYPE
- corl_natural_values = {
- "hf": "conv", # dummy to assure df/cd/conv scf_type refs available
- "mp2": mp2_type,
- "mp3": mp_type,
- "mp4(sdq)": mp_type,
- "mp4": mp_type,
- "cisd": ci_type,
- "qcisd": ci_type,
- "qcisd(t)": ci_type,
- "lccd": cc_type,
- "lccsd": cc_type,
- "ccd": cc_type,
- "ccsd": cc_type,
- "ccsd+t(ccsd)": cc_type,
- "ccsd(t)": cc_type,
- "a-ccsd(t)": cc_type,
- "ccsdt-1a": cc_type,
- "ccsdt-1b": cc_type,
- "ccsdt-2": cc_type,
- "ccsdt-3": cc_type,
- "ccsdt": cc_type,
- "ccsdt(q)": cc_type,
- "ccsdtq": cc_type,
- "pbe": "conv",
- "b3lyp": "conv",
- "b3lyp5": "conv",
- }
- corl_type = corl_natural_values[method]
-
- natural_ref = {"conv": "pk", "df": "df", "cd": "cd"}
- scf_type = inp["keywords"].get("scf_type", natural_ref[corl_type])
- natural_values = {"pk": "pk", "direct": "pk", "df": "df", "mem_df": "df", "disk_df": "df", "cd": "cd"}
- scf_type = natural_values[scf_type]
-
- is_dft = method in ["pbe", "b3lyp", "b3lyp5"]
-
- atol_e, rtol_e = 2.0e-7, 1.0e-16
- atol_g, rtol_g = 5.0e-7, 2.0e-5
- atol_h, rtol_h = 1.0e-5, 2.0e-5
- if is_dft:
- atol_g = 6.0e-6
- chash = answer_hash(
- system=subject.name,
- basis=basis,
- fcae=fcae,
- scf_type=scf_type,
- reference=reference,
- corl_type=corl_type,
- sdsc=sdsc,
- )
- ref_block = std_suite[chash]
-
- # check all calcs against conventional reference to looser tolerance
- atol_conv = 1.0e-4
- rtol_conv = 1.0e-3
- chash_conv = answer_hash(
- system=subject.name,
- basis=basis,
- fcae=fcae,
- reference=reference,
- corl_type="conv",
- scf_type="pk",
- sdsc=sdsc,
- )
- ref_block_conv = std_suite[chash_conv]
-
- # <<< Prepare Calculation and Call API >>>
-
- atin = AtomicInput(
- **{
- "molecule": subject,
- "driver": driver,
- "model": {
- "method": method,
- "basis": inp.get("basis", "(auto)"),
- },
- "keywords": inp["keywords"],
- }
- )
-
- local_options = {}
- local_options = {"nnodes": 1, "ncores": 2} # debug. temp fix low for testing to avoid too many files open w/gamess
-
- if "error" in inp:
- errtype, errmatch, reason = inp["error"]
- with pytest.raises(errtype) as e:
- qcng.compute(atin, qcprog, raise_error=True, return_dict=True, task_config=local_options)
-
- assert re.search(errmatch, str(e.value)), f"Not found: {errtype} '{errmatch}' in {e.value}"
- # _recorder(qcprog, qc_module_in, driver, method, reference, fcae, scf_type, corl_type, "error", "nyi: " + reason)
- return
-
- wfn = qcng.compute(atin, qcprog, raise_error=True, task_config=local_options)
-
- print("WFN")
- pp.pprint(wfn.dict())
-
- qc_module_out = wfn.provenance.creator.lower()
- if hasattr(wfn.provenance, "module"):
- qc_module_out += "-" + wfn.provenance.module # returns "-"
- # assert 0, f"{qc_module_xptd=} {qc_module_in=} {qc_module_out=}" # debug
-
- # 3. output mol: `wfn.molecule` after calc. orientation for nonscalar quantities may be different from `subject` if fix_=False
-
- _, data = ref_subject.align(wfn.molecule, atoms_map=False, mols_align=True, verbose=0)
- ref2out_mill = data["mill"]
-
- if subject.fix_com and subject.fix_orientation:
- with np.printoptions(precision=3, suppress=True):
- assert compare_values(
- subject.geometry, wfn.molecule.geometry, atol=5.0e-8
- ), f"coords: atres ({wfn.molecule.geometry}) != atin ({subject.geometry})" # 10 too much
- assert (
- ref_subject.fix_com
- and ref_subject.fix_orientation
- and subject.fix_com
- and subject.fix_orientation
- and wfn.molecule.fix_com
- and wfn.molecule.fix_orientation
- ), f"fixed, so all T: {ref_subject.fix_com} {ref_subject.fix_orientation} {subject.fix_com} {subject.fix_orientation} {wfn.molecule.fix_com} {wfn.molecule.fix_orientation}"
-
- ref_block = mill_qcvars(ref2in_mill, ref_block)
- ref_block_conv = mill_qcvars(ref2in_mill, ref_block_conv)
-
- else:
- # this check assumes the qcprog will adjust an ugly Cartesian geometry into a pretty one (with more symmetry for computational efficiency).
- # if qcprog doesn't have that behavior, it will need to be excused from this check.
- with np.printoptions(precision=3, suppress=True):
- assert compare(
- min_nonzero_coords, np.count_nonzero(np.abs(wfn.molecule.geometry) > 1.0e-10), tnm + " !0 coords wfn"
- ), f"count !0 coords {wfn.molecule.geometry} != {min_nonzero_coords}"
- assert (
- (not ref_subject.fix_com)
- and (not ref_subject.fix_orientation)
- and (not subject.fix_com)
- and (not subject.fix_orientation)
- and (not wfn.molecule.fix_com)
- and (not wfn.molecule.fix_orientation)
- ), f"free, so all F: {ref_subject.fix_com} {ref_subject.fix_orientation} {subject.fix_com} {subject.fix_orientation} {wfn.molecule.fix_com} {wfn.molecule.fix_orientation}"
-
- ref_block = mill_qcvars(ref2out_mill, ref_block)
- ref_block_conv = mill_qcvars(ref2out_mill, ref_block_conv)
-
- # <<< Comparison Tests >>>
-
- assert wfn.success is True
- if qc_module_in != qcprog:
- assert qc_module_out == qc_module_in, f"QC_MODULE used ({qc_module_out}) != requested ({qc_module_in})"
- if qc_module_xptd:
- assert qc_module_out == qc_module_xptd, f"QC_MODULE used ({qc_module_out}) != expected ({qc_module_xptd})"
-
- # qcvars
- contractual_args = [
- qc_module_out,
- driver,
- reference,
- method,
- corl_type,
- fcae,
- sdsc,
- ]
- asserter_args = [
- [wfn.extras["qcvars"], wfn.properties],
- ref_block,
- [atol_e, atol_g, atol_h],
- [rtol_e, rtol_g, rtol_h],
- ref_block_conv,
- atol_conv,
- rtol_conv,
- tnm,
- ]
-
- def qcvar_assertions():
- print("BLOCK", chash, contractual_args)
- if method == "hf":
- _asserter(asserter_args, contractual_args, contractual_hf)
- elif method == "mp2":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- elif method == "mp3":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_mp2p5)
- _asserter(asserter_args, contractual_args, contractual_mp3)
- elif method == "mp4(sdq)":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_mp2p5)
- _asserter(asserter_args, contractual_args, contractual_mp3)
- _asserter(asserter_args, contractual_args, contractual_mp4_prsdq_pr)
- elif method == "mp4":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_mp2p5)
- _asserter(asserter_args, contractual_args, contractual_mp3)
- _asserter(asserter_args, contractual_args, contractual_mp4_prsdq_pr)
- _asserter(asserter_args, contractual_args, contractual_mp4)
- elif method == "cisd":
- _asserter(asserter_args, contractual_args, contractual_cisd)
- elif method == "qcisd":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_qcisd)
- elif method == "qcisd(t)":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_qcisd)
- _asserter(asserter_args, contractual_args, contractual_qcisd_prt_pr)
- elif method == "lccd":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_lccd)
- elif method == "lccsd":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_lccsd)
- elif method == "ccd":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccd)
- elif method == "ccsd":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsd)
- elif method == "ccsd+t(ccsd)":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsd)
- _asserter(asserter_args, contractual_args, contractual_ccsdpt_prccsd_pr)
- elif method == "ccsd(t)":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsd)
- _asserter(asserter_args, contractual_args, contractual_ccsd_prt_pr)
- elif method == "a-ccsd(t)":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsd)
- _asserter(asserter_args, contractual_args, contractual_accsd_prt_pr)
- elif method == "ccsdt-1a":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdt1a)
- elif method == "ccsdt-1b":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdt1b)
- elif method == "ccsdt-2":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdt2)
- elif method == "ccsdt-3":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdt3)
- elif method == "ccsdt":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdt)
- elif method == "ccsdt(q)":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdt)
- _asserter(asserter_args, contractual_args, contractual_ccsdt_prq_pr)
- elif method == "ccsdtq":
- _asserter(asserter_args, contractual_args, contractual_mp2)
- _asserter(asserter_args, contractual_args, contractual_ccsdtq)
- # separations here for DFT appropriate when qcvars are labeled by functional
-
- if "wrong" in inp:
- errmatch, reason = inp["wrong"]
- with pytest.raises(AssertionError) as e:
- qcvar_assertions()
-
- assert errmatch in str(e.value), f"Not found: AssertionError '{errmatch}' for '{reason}' in {e.value}"
- # _recorder(qcprog, qc_module_out, driver, method, reference, fcae, scf_type, corl_type, "wrong", reason + f" First wrong at `{errmatch}`.")
- pytest.xfail(reason)
-
- # primary label checks
- qcvar_assertions()
-
- # aliases checks
- asserter_args[0].pop() # checks not appropriate for properties
- if is_dft:
- _asserter(asserter_args, contractual_args, contractual_dft_current)
- else:
- _asserter(asserter_args, contractual_args, contractual_current)
-
- # returns checks
- if driver == "energy":
- tf, errmsg = compare_values(
- ref_block[f"{method.upper()} TOTAL ENERGY"],
- wfn.return_result,
- tnm + " wfn",
- atol=atol_e,
- rtol=rtol_e,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block[f"{method.upper()} TOTAL ENERGY"], wfn.return_result, tnm + " wfn", atol=atol_e, rtol=rtol_e
- ), errmsg
-
- elif driver == "gradient":
- tf, errmsg = compare_values(
- ref_block[f"{method.upper()} TOTAL GRADIENT"],
- wfn.return_result,
- tnm + " grad wfn",
- atol=atol_g,
- rtol=rtol_g,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block[f"{method.upper()} TOTAL GRADIENT"],
- wfn.return_result,
- tnm + " grad wfn",
- atol=atol_g,
- rtol=rtol_g,
- ), errmsg
-
- elif driver == "hessian":
- tf, errmsg = compare_values(
- ref_block[f"{method.upper()} TOTAL HESSIAN"],
- wfn.return_result,
- tnm + " hess wfn",
- atol=atol_h,
- rtol=rtol_h,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block[f"{method.upper()} TOTAL HESSIAN"], wfn.return_result, tnm + " hess wfn", atol=atol_h, rtol=rtol_h
- ), errmsg
-
- if driver in ["energy", "gradient", "hessian"]:
- tf, errmsg = compare_values(
- ref_block[f"{method.upper()} TOTAL ENERGY"],
- wfn.properties.return_energy,
- tnm + " prop",
- atol=atol_e,
- rtol=rtol_e,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block[f"{method.upper()} TOTAL ENERGY"],
- wfn.properties.return_energy,
- tnm + " prop",
- atol=atol_e,
- rtol=rtol_e,
- ), errmsg
-
- if driver in ["gradient"]: # , "hessian"]:
- tf, errmsg = compare_values(
- ref_block[f"{method.upper()} TOTAL GRADIENT"],
- wfn.properties.return_gradient,
- tnm + " grad prop",
- atol=atol_g,
- rtol=rtol_g,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block[f"{method.upper()} TOTAL GRADIENT"],
- wfn.properties.return_gradient,
- tnm + " grad prop",
- atol=atol_g,
- rtol=rtol_g,
- ), errmsg
-
- if driver == "hessian":
- tf, errmsg = compare_values(
- ref_block[f"{method.upper()} TOTAL HESSIAN"],
- wfn.properties.return_hessian,
- tnm + " hess prop",
- atol=atol_h,
- rtol=rtol_h,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block[f"{method.upper()} TOTAL HESSIAN"],
- wfn.properties.return_hessian,
- tnm + " hess prop",
- atol=atol_h,
- rtol=rtol_h,
- ), errmsg
-
- # generics
- # yapf: disable
- assert compare(ref_block["N BASIS FUNCTIONS"], wfn.properties.calcinfo_nbasis, tnm + " nbasis wfn"), f"nbasis {wfn.properties.calcinfo_nbasis} != {ref_block['N BASIS FUNCTIONS']}"
- assert compare(ref_block["N MOLECULAR ORBITALS"], wfn.properties.calcinfo_nmo, tnm + " nmo wfn"), f"nmo {wfn.properties.calcinfo_nmo} != {ref_block['N MOLECULAR ORBITALS']}"
- assert compare(ref_block["N ALPHA ELECTRONS"], wfn.properties.calcinfo_nalpha, tnm + " nalpha wfn"), f"nalpha {wfn.properties.calcinfo_nalpha} != {ref_block['N ALPHA ELECTRONS']}"
- assert compare(ref_block["N BETA ELECTRONS"], wfn.properties.calcinfo_nbeta, tnm + " nbeta wfn"), f"nbeta {wfn.properties.calcinfo_nbeta} != {ref_block['N BETA ELECTRONS']}"
- # yapf: enable
-
- # record
- # _recorder(qcprog, qc_module_out, driver, method, reference, fcae, scf_type, corl_type, "fd" if using_fd else "pass", "")
-
- # assert 0
-
-
-def _asserter(asserter_args, contractual_args, contractual_fn):
- """For expectations in `contractual_fn`, check that the QCVars are present in P::e.globals and wfn and match expected ref_block."""
-
- qcvar_stores, ref_block, atol_egh, rtol_egh, ref_block_conv, atol_conv, rtol_conv, tnm = asserter_args
-
- for obj in qcvar_stores:
- for rpv, pv, present in contractual_fn(*contractual_args):
- label = tnm + " " + pv
- atol = atol_egh["EGH".index(rpv.split()[-1][0])]
- rtol = rtol_egh["EGH".index(rpv.split()[-1][0])]
-
- if present:
- # verify exact match to method (may be df) and near match to conventional (non-df) method
- tf, errmsg = compare_values(
- ref_block[rpv], query_qcvar(obj, pv), label, atol=atol, rtol=rtol, return_message=True, quiet=True
- )
- assert compare_values(ref_block[rpv], query_qcvar(obj, pv), label, atol=atol, rtol=rtol), errmsg
- tf, errmsg = compare_values(
- ref_block_conv[rpv],
- query_qcvar(obj, pv),
- label,
- atol=atol_conv,
- rtol=rtol_conv,
- return_message=True,
- quiet=True,
- )
- assert compare_values(
- ref_block_conv[rpv], query_qcvar(obj, pv), label, atol=atol_conv, rtol=rtol_conv
- ), errmsg
-
- # Note that the double compare_values lines are to collect the errmsg in the first for assertion in the second.
- # If the errmsg isn't present in the assert, the string isn't accessible through `e.value`.
- # If a plain bool is compared in the assert, the printed message will show booleans and not numbers.
- else:
- # verify and forgive known contract violations
- assert compare(False, query_has_qcvar(obj, pv), label + " SKIP")
diff --git a/qcengine/programs/tests/test_adcc.py b/qcengine/programs/tests/test_adcc.py
deleted file mode 100644
index a9625bfa1..000000000
--- a/qcengine/programs/tests/test_adcc.py
+++ /dev/null
@@ -1,40 +0,0 @@
-"""Tests for adcc functionality"""
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@pytest.fixture
-def h2o():
- return qcel.models.Molecule.from_data(
- """
- O 0.0 0.000 -0.129
- H 0.0 -1.494 1.027
- H 0.0 1.494 1.027
- """
- )
-
-
-@using("adcc")
-def test_run(h2o):
- inp = qcel.models.AtomicInput(
- molecule=h2o, driver="properties", model={"method": "adc2", "basis": "sto-3g"}, keywords={"n_singlets": 3}
- )
- ret = qcng.compute(inp, "adcc", raise_error=True, local_options={"ncores": 1}, return_dict=True)
-
- ref_excitations = np.array([0.0693704245883876, 0.09773854881340478, 0.21481589246935925])
- ref_hf_energy = -74.45975898670224
- ref_mp2_energy = -74.67111187456267
- assert ret["success"] is True
-
- qcvars = ret["extras"]["qcvars"]
-
- assert qcvars["EXCITATION KIND"] == "SINGLET"
- assert compare_values(ref_excitations[0], ret["return_result"])
- assert compare_values(ref_hf_energy, ret["properties"]["scf_total_energy"])
- assert compare_values(ref_mp2_energy, ret["properties"]["mp2_total_energy"])
- assert compare_values(ref_excitations, qcvars["ADC2 EXCITATION ENERGIES"])
diff --git a/qcengine/programs/tests/test_alignment.py b/qcengine/programs/tests/test_alignment.py
deleted file mode 100644
index 8870d5241..000000000
--- a/qcengine/programs/tests/test_alignment.py
+++ /dev/null
@@ -1,98 +0,0 @@
-import numpy as np
-import pytest
-import qcelemental as qcel
-
-from qcengine.programs.tests.standard_suite_ref import std_molecules, std_refs
-from qcengine.testing import using
-
-from .standard_suite_runner import runner_asserter
-from .test_standard_suite import _processor
-
-
-@pytest.fixture
-def clsd_open_pmols():
- frame_not_important = {
- name[:-4]: qcel.models.Molecule.from_data(smol, name=name[:-4])
- for name, smol in std_molecules.items()
- if name.endswith("-xyz")
- }
- frame_part_of_spec = {
- name[:-4] + "-fixed": qcel.models.Molecule.from_data(smol + "\nno_com\nno_reorient\n", name=name[:-4])
- for name, smol in std_molecules.items()
- if name.endswith("-xyz")
- }
-
- return {**frame_not_important, **frame_part_of_spec}
-
-
-#
-# ,--. ,--.,------. ,---. ,--.,--. ,--.
-# | '--' || .---' / O \ | |`--' ,---. ,--,--, ,--,--,--. ,---. ,--,--, ,-' '-.
-# | .--. || `--, | .-. || |,--.| .-. || \| || .-. :| \'-. .-'
-# | | | || |` | | | || || |' '-' '| || || | | |\ --.| || | | |
-# `--' `--'`--' `--' `--'`--'`--'.`- / `--''--'`--`--`--' `----'`--''--' `--'
-# `---'
-# <<< HF Alignment
-
-
-@pytest.mark.parametrize(
- "scramble",
- # * this parameter alters the input molecule by Cartesian frame and/or atom ordering to imitate real-world inputs.
- # * scramble dictionary are arguments to qcdb.Molecule.scramble() or qcel.models.Molecule.scramble() that computes a shifted/rotated/atom-mapped input molecule from `subjects` below and the transformations to be applied to the reference data.
- # * arguments do_shift=T/F and other boolean values generate random perturbations, so multiple lines or runs makes a fuller test.
- # * specific shifts etc or problematic runs can be reproduced by specifying arrays like the commented example below. note that b/c do_resort is natom-dependent, may need to exclude subjects while debugging.
- # * `id`s below are numbered since `pytest -k` doesn't recognize case and so duplicate entries can be added. the 0, 1, 2, 3, 9 progression is handy for debugging since perturbations are added systematically
- [
- # pytest.param({"do_shift": [ 2.660760432055, 1.477336796939, -2.098045335573], "do_rotate": [[ 0.321861140022, 0.445246880671, 0.835560064745], [-0.447874157747, 0.849136107328, -0.279958229125], [-0.834154749052, -0.28411808546 , 0.472718487209]], "do_resort": [2, 0, 1]}, id="mTTT3"),
- # pytest.param({"do_shift": False, "do_rotate": False, "do_resort": False}, id="srm0"),
- # pytest.param({"do_shift": True, "do_rotate": False, "do_resort": False}, id="Srm1"),
- # pytest.param({"do_shift": True, "do_rotate": True, "do_resort": False}, id="SRm2"),
- # pytest.param({"do_shift": False, "do_rotate": False, "do_resort": True}, id="srM3"),
- # pytest.param({"do_shift": True, "do_rotate": True, "do_resort": True}, id="SRM8"),
- pytest.param({"do_shift": True, "do_rotate": True, "do_resort": True}, id="SRM9"),
- ],
-)
-@pytest.mark.parametrize(
- "frame",
- # * this parameter alters the input molecule by fix_com and fix_orientation to imitate user signaling frame matters or not.
- [
- pytest.param("fixed"), # fix_=True (no_com/no_reorient); atres.mol.geom = atin.mol.geom aka scrambled
- pytest.param("free"), # fix_=False (def) ; atres.mol.geom = dsl internal orientation
- ],
-)
-@pytest.mark.parametrize(
- "driver",
- [
- pytest.param("energy", id="ene0"),
- pytest.param("gradient", id="grd1"),
- pytest.param("hessian", id="hes2"),
- ],
-)
-@pytest.mark.parametrize(
- "basis, subjects",
- # this parameter, along with rhf/uhf below covers four different molecules, with nat=2-4.
- [
- pytest.param("cc-pvdz", ["hf", "bh3p", "bh3p"], id="dz"),
- pytest.param("aug-cc-pvdz", ["h2o", "nh2", "nh2"], id="adz", marks=pytest.mark.long),
- ],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- # yapf: disable
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"scf_conv": 12}, }, id="hf rhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="hf rhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {"scf__thresh": 1.e-6}, }, id="hf rhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "ae", "keywords": {"scf_type": "pk"}, }, id="hf rhf ae: psi4", marks=using("psi4_derqcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="hf uhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf"}, }, id="hf uhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True, "scf__thresh": 1.e-6}, }, id="hf uhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_type": "pk"}, }, id="hf uhf ae: psi4", marks=using("psi4_derqcsk")),
- # yapf: enable
- ],
-)
-def test_hf_alignment(inp, scramble, frame, driver, basis, subjects, clsd_open_pmols, request):
- runner_asserter(
- *_processor(inp, "", basis, subjects, clsd_open_pmols, request, driver, "hf", scramble=scramble, frame=frame)
- )
diff --git a/qcengine/programs/tests/test_canonical_config.py b/qcengine/programs/tests/test_canonical_config.py
deleted file mode 100644
index 72023850a..000000000
--- a/qcengine/programs/tests/test_canonical_config.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
-Tests the DQM compute dispatch module
-"""
-import pprint
-import re
-import sys
-import tempfile
-from pathlib import Path
-
-import pytest
-from qcelemental.models import AtomicInput
-
-import qcengine as qcng
-from qcengine.testing import has_program, using
-
-_canonical_methods = [
- # needs attn ("adcc", {"method": "adc2", "basis": "6-31G"}, {"n_triplets": 3}),
- ("cfour", {"method": "hf", "basis": "6-31G"}, {}),
- ("dftd3", {"method": "b3lyp-d3"}, {}),
- ("gamess", {"method": "hf", "basis": "n31"}, {"basis__NGAUSS": 6}),
- ("gcp", {"method": "hf3c"}, {}),
- ("mctc-gcp", {"method": "dft/sv"}, {}),
- # needs attn ("molpro", {"method": "hf", "basis": "6-31G"}, {}),
- # needs attn ("mopac", {"method": "PM6"}, {}),
- ("mp2d", {"method": "MP2-DMP2"}, {}),
- # needs attn ("mrchem", {"method": "blyp"}, {"world_prec": 1.0e-3}),
- ("nwchem", {"method": "hf", "basis": "6-31G"}, {}),
- # needs attn ("openmm", {"method": "openff-1.0.0", "basis": "smirnoff"}, {}),
- ("psi4", {"method": "hf", "basis": "6-31G"}, {"gradient_write": True}),
- # needs attn ("qchem", {"method": "hf", "basis": "6-31G"}, {}),
- # needs attn ("qcore", {"method": "pbe", "basis": "6-31G"}, {}),
- # needs attn ("rdkit", {"method": "UFF"}, {}),
- # needs attn ("terachem", {"method": "bad"}, {}),
- # needs attn ("terachem_pbs", {"method": "b3lyp", "basis": "6-31G"}, {}),
- # needs attn ("torchani", {"method": "ANI1x"}, {}),
- # needs attn ("turbomole", {"method": "pbe", "basis": "6-31G"}, {}),
- # needs attn ("xtb", {"method": "GFN2-xTB"}, {}),
-]
-
-
-def _get_molecule(program, method):
- if program in ["openmm", "terachem_pbs"]:
- return qcng.get_molecule("water")
- elif program == "gamess" and method == "ccsd(t)":
- return qcng.get_molecule("water")
- else:
- return qcng.get_molecule("hydrogen")
-
-
-@pytest.mark.parametrize(
- "memory_trickery",
- [
- pytest.param({}, id="none"),
- pytest.param(
- # native keywords that CONTRADICT config.memory below
- {
- "cfour": {"memory_size": "5000"},
- "gamess": {"system__mwords": "5000"},
- "nwchem": {"memory": "5 gb"},
- "psi4": {}, # no contradictory memory keyword in psi
- },
- id="dsl",
- ),
- ],
-)
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods)
-def test_local_options_memory_gib(program, model, keywords, memory_trickery, request):
- """Ensure memory handling implemented in harness (if applicable).
-
- For available harnesses, run minimal calc at specific total node memory, both through runtime
- config alone and with clashing (and non-QCEngine-like) keyword spec. Check memory quantity
- shows up in ``TaskConfig``.
- For ``managed-memory``-active harnesses, check that memory registers in output.
-
- New Harness Instructions
- ------------------------
- * Make sure minimal calc is in _canonical_methods above.
- * If ``managed_memory=True`` in harness, add regex to ``stdout_ref`` below to check that memory
- is specifiable.
- * If this test doesn't work, implement or adjust ``config.memory`` in your harness.
-
- """
- if not has_program(program):
- pytest.skip(f"Program '{program}' not found.")
-
- harness = qcng.get_program(program)
- molecule = _get_molecule(program, model["method"])
-
- addl_keywords = memory_trickery.get(program, memory_trickery)
- use_keywords = {**keywords, **addl_keywords}
-
- # << Config
-
- config = qcng.config.get_config(
- hostname="something",
- task_config={
- "ncores": 1,
- "nnodes": 1,
- "memory": 1.555,
- },
- )
-
- # << Run
-
- inp = AtomicInput(molecule=molecule, driver="energy", model=model, keywords=use_keywords)
- ret = qcng.compute(inp, program, raise_error=True, task_config=config.dict())
- pprint.pprint(ret.dict(), width=200)
- assert ret.success is True
-
- # << Reference
-
- stdout_ref = { # 1.555 GiB = 208708567 quad-words
- "cfour": "Allocated 1592 MB of main memory",
- "gamess": "208000000 WORDS OF MEMORY AVAILABLE",
- "nwchem": r"total = 2087085\d\d doubles = 1592.3 Mbytes", # doubles is quad-words. Mbytes is MiB
- "psi4": "1592 MiB Core",
- }
-
- # << Test
-
- assert config.ncores == 1
- assert pytest.approx(config.memory, 0.1) == 1.555
-
- if harness._defaults["managed_memory"] is True:
- assert re.search(stdout_ref[program], ret.stdout), f"Memory pattern not found: {stdout_ref[program]}"
-
-
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods)
-def test_local_options_scratch(program, model, keywords):
- """Ensure scratch handling implemented in harness (if applicable).
-
- For available harnesses, run minimal calc at specific scratch directory name (randomly generated
- during test) and skip scratch clean-up. Check scratch settings show up in ``TaskConfig``.
- For ``scratch``-active harnesses, check that an expected file is written to and left behind in
- scratch directory. Check any scratch-related printing in output.
-
- New Harness Instructions
- ------------------------
- * Make sure minimal calc is in _canonical_methods above.
- * If ``scratch=True`` in harness, add single file (preferrably output) glob to ``scratch_sample``
- below to check that program scratch is directable.
- * If ``scratch=True`` in harness, if scratch directory mentioned in output, add regex to
- ``stdout_ref`` below to check that program scratch is directable. Otherwise, add an
- always-passing regex.
- * If this test doesn't work, implement or adjust ``config.scratch_directory`` and
- ``config.scratch_messy`` in your harness.
-
- """
- if not has_program(program):
- pytest.skip(f"Program '{program}' not found.")
-
- harness = qcng.get_program(program)
- molecule = _get_molecule(program, model["method"])
-
- # << Config
-
- scratch_directory = tempfile.mkdtemp(suffix="_" + program)
-
- config = qcng.config.get_config(
- hostname="something",
- task_config={
- "scratch_directory": scratch_directory,
- "scratch_messy": True,
- },
- )
-
- # << Run
-
- inp = AtomicInput(molecule=molecule, driver="energy", model=model, keywords=keywords)
- ret = qcng.compute(inp, program, raise_error=True, task_config=config.dict())
- pprint.pprint(ret.dict(), width=200)
- assert ret.success is True
-
- # << Reference
-
- stdout_ref = {
- "cfour": "University of Florida", # freebie
- "dftd3": "Grimme", # freebie
- "gamess": "IOWA STATE UNIVERSITY", # freebie
- "gcp": "Grimme", # freebie
- "mctc-gcp": "Grimme", # freebie
- "mp2d": "Beran", # freebie
- "nwchem": "E. Apra", # freebie
- "psi4": rf"Scratch directory: {scratch_directory}/tmp\w+_psi_scratch/",
- }
- if sys.platform.startswith("win"):
- # too hard to regex Windows paths that need escape chars
- stdout_ref["psi4"] = f"Scratch directory: "
-
- # a scratch file (preferrably output) expected after job if scratch not cleaned up
- scratch_sample = {
- "cfour": "*/NEWFOCK",
- "dftd3": "*/dftd3_geometry.xyz", # no outfiles
- "gamess": "*/gamess.dat",
- "gcp": "*/gcp_geometry.xyz", # no outfiles
- "mctc-gcp": "*/gcp_geometry.xyz", # no outfiles
- "mp2d": "*/mp2d_geometry", # no outfiles
- "nwchem": "*/nwchem.db",
- "psi4": "*/psi.*.35",
- }
-
- # << Test
-
- assert config.scratch_directory.endswith(program)
-
- if harness._defaults["scratch"] is True:
- sample_file = list(Path(scratch_directory).glob(scratch_sample[program]))
- assert len(sample_file) == 1, f"Scratch sample not found: {scratch_sample[program]} in {scratch_directory}"
-
- assert re.search(stdout_ref[program], ret.stdout), f"Scratch pattern not found: {stdout_ref[program]}"
-
-
-@pytest.mark.parametrize("ncores", [1, 3])
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods)
-def test_local_options_ncores(program, model, keywords, ncores):
- """Ensure multithreading implemented in harness (if applicable) or multithreaded runs don't
- break harness (if inapplicable).
-
- For available harnesses, run minimal calc with single and multiple cores; check ncores count
- shows up in ``TaskConfig``.
- For ``thread_parallel``-active harnesses, check ncores count registers in output.
-
- New Harness Instructions
- ------------------------
- * Make sure minimal calc is in _canonical_methods above.
- * If ``thread_parallel=True`` in harness, add regex to ``stdout_ref`` below to check ncores the
- program sees.
- * If this test doesn't work, implement or adjust ``config.ncores`` in your harness.
-
- """
- if not has_program(program):
- pytest.skip(f"Program '{program}' not found.")
-
- harness = qcng.get_program(program)
- molecule = _get_molecule(program, model["method"])
-
- # << Config
-
- config = qcng.config.get_config(
- hostname="something",
- task_config={
- "ncores": ncores,
- "nnodes": 1,
- },
- )
-
- # << Run
-
- inp = AtomicInput(molecule=molecule, driver="energy", model=model, keywords=keywords)
- ret = qcng.compute(inp, program, raise_error=True, task_config=config.dict())
- pprint.pprint(ret.dict(), width=200)
- assert ret.success is True
-
- # << Reference
-
- stdout_ref = {
- "cfour": rf"Running with {ncores} threads/proc",
- "gamess": rf"MEMDDI DISTRIBUTED OVER\s+{ncores} PROCESSORS",
- # "gamess": rf"PARALLEL VERSION RUNNING ON\s+{ncores} PROCESSORS IN\s+1 NODES", # no line for serial
- # nwchem is node_parallel only
- "psi4": rf"Threads:\s+{ncores}",
- }
-
- # << Test
-
- assert config.ncores == ncores
- assert config.nnodes == 1
-
- if harness._defaults["thread_parallel"] is True:
- assert re.search(stdout_ref[program], ret.stdout), f"Thread pattern not found: {stdout_ref[program]}"
diff --git a/qcengine/programs/tests/test_canonical_fields.py b/qcengine/programs/tests/test_canonical_fields.py
deleted file mode 100644
index ba4f809ba..000000000
--- a/qcengine/programs/tests/test_canonical_fields.py
+++ /dev/null
@@ -1,100 +0,0 @@
-import pprint
-import re
-
-import pytest
-import qcelemental as qcel
-from qcelemental.models import AtomicInput
-
-import qcengine as qcng
-from qcengine.testing import has_program, using
-
-from .test_canonical_config import _canonical_methods, _get_molecule
-
-
-@pytest.mark.parametrize("native", ["none", "input", "all"])
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods)
-def test_protocol_native(program, model, keywords, native):
- """Ensure native_files protocol implemented in harness.
-
- For harnesses, run minimal gradient calc with different protocol settings; check expected
- native/DSL files show up in ``AtomicResult``.
-
- New Harness Instructions
- ------------------------
- * Make sure minimal calc is in _canonical_methods above. This uses gradient for more files.
- * Add regex to ``input_ref`` & ``all_ref`` below to check content of input and any other file.
- * If this test doesn't work, implement or adjust ``native_files`` in your harness.
-
- """
- if not has_program(program):
- pytest.skip(f"Program '{program}' not found.")
-
- harness = qcng.get_program(program)
- molecule = _get_molecule(program, model["method"])
-
- # << Config
-
- protocols = {
- "native_files": native,
- }
- config = qcng.config.get_config(
- hostname="something",
- task_config={
- "ncores": 1,
- "nnodes": 1,
- },
- )
-
- # << Run
-
- inp = AtomicInput(molecule=molecule, driver="gradient", model=model, keywords=keywords, protocols=protocols)
- ret = qcng.compute(inp, program, raise_error=True, local_options=config.dict())
- pprint.pprint(ret.dict(), width=200)
- assert ret.success is True
-
- # << Reference
-
- input_ref = {
- "cfour": rf"\*CFOUR\(BASIS=6-31G",
- "dftd3": rf"1.000000 1.261000 1.703000",
- "gamess": rf"\$basis gbasis=n31 ngauss=6 \$end",
- "gcp": rf"level HF3C",
- "mctc-gcp": rf"level DFT/SV",
- "mp2d": rf"--TT_a1=0.944 --TT_a2=0.48",
- "nwchem": rf"H library 6-31G",
- "psi4": rf'"driver": "gradient",',
- }
-
- all_ref = {
- "cfour": ("GRD", rf"1.0+\s+0.0+\s+0.0+\s+0.03"),
- "dftd3": ("dftd3_geometry.xyz", rf"H\s+0.0+\s+0.0+\s+0.34"),
- "gamess": ("gamess.dat", rf"CLOSED SHELL ORBITALS --- GENERATED AT"),
- "gcp": ("gcp_geometry.xyz", rf"H\s+0.0+\s+0.0+\s+0.34"),
- "mctc-gcp": ("gcp_geometry.xyz", rf"H\s+0.0+\s+0.0+\s+0.34"),
- "mp2d": ("mp2d_geometry", rf"H\s+0.0+\s+0.0+\s+0.34"),
- "nwchem": ("nwchem.grad", rf"0.0, 0.0, 0.03"),
- "psi4": ("psi4.grad", rf"1.0+\s+(-?)0.0+\s+(-?)0.0+\s+0.03"),
- }
-
- # << Test
-
- if native == "none":
- if qcel.util.parse_version(qcel.__version__) < qcel.util.parse_version("0.25.0"):
- assert ret.native_files is None
- else:
- assert ret.native_files == {}
- elif native == "input":
- assert list(ret.native_files.keys()) == ["input"]
-
- if ret.native_files:
- assert "stdout" not in ret.native_files, f"Stdout found in native_files -- clean up the harness"
- assert "stderr" not in ret.native_files, f"Stderr found in native_files -- clean up the harness"
- assert "outfiles" not in ret.extras, f"Outfiles found in extras -- clean up the harness"
-
- if native in ["input", "all"]:
- assert re.search(
- input_ref[program], ret.native_files["input"]
- ), f"Input file pattern not found: {input_ref[program]}"
- if native == "all" and program != "psi4": # allow psi4 once native_files PR merged
- fl, snip = all_ref[program]
- assert re.search(snip, ret.native_files[fl]), f"Ancillary file pattern not found in {fl}: {snip}"
diff --git a/qcengine/programs/tests/test_dftd3_mp2d.py b/qcengine/programs/tests/test_dftd3_mp2d.py
deleted file mode 100644
index ee8c2e782..000000000
--- a/qcengine/programs/tests/test_dftd3_mp2d.py
+++ /dev/null
@@ -1,1998 +0,0 @@
-import copy
-import pprint
-
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.models import AtomicInput
-from qcelemental.testing import compare, compare_recursive, compare_values, tnm
-
-import qcengine as qcng
-from qcengine.programs import empirical_dispersion_resources
-from qcengine.testing import is_program_new_enough, using
-
-
-@using("dftd3")
-@pytest.mark.parametrize("method", ["b3lyp-d3", "b3lyp-d3m", "b3lyp-d3bj", "b3lyp-d3mbj"])
-def test_dftd3_task(method):
- json_data = {"molecule": qcng.get_molecule("eneyne"), "driver": "energy", "model": {"method": method}}
-
- ret = qcng.compute(json_data, "dftd3", raise_error=True, return_dict=True)
-
- assert ret["driver"] == "energy"
- assert "provenance" in ret
- assert "normal termination of dftd3" in ret["stdout"]
-
- for key in ["cpu", "hostname", "username", "wall_time"]:
- assert key in ret["provenance"]
-
- assert ret["success"] is True
-
-
-@using("dftd3")
-def test_dftd3_error():
- json_data = {
- "molecule": qcng.get_molecule("eneyne"),
- "driver": "energy",
- "model": {"method": "b3lyp-d3(bj)"},
- "keywords": {},
- }
-
- # Test driver
- with pytest.raises(qcng.exceptions.InputError) as exc:
- input_data = json_data.copy()
- input_data["driver"] = "properties"
- ret = qcng.compute(input_data, "dftd3", raise_error=True)
-
- assert "Driver properties not implemented" in str(exc.value)
-
- # Test extension
- with pytest.raises(qcng.exceptions.InputError) as exc:
- input_data = json_data.copy()
- input_data["model"]["method"] = "b3lyp-quadD"
- ret = qcng.compute(input_data, "dftd3", raise_error=True)
-
- assert "correction level" in str(exc.value)
-
-
-# Resources
-
-ref = {}
-dmm = ["dimer", "mA", "mB", "mAgB", "gAmB"]
-ref["eneyne"] = {}
-ref["eneyne"]["B3LYP-D2"] = dict(zip(dmm, [-0.00390110, -0.00165271, -0.00058118, -0.00165271, -0.00058118]))
-ref["eneyne"]["B3LYP-D3"] = dict(zip(dmm, [-0.00285088, -0.00084340, -0.00031923, -0.00084340, -0.00031923]))
-ref["eneyne"]["B3LYP-D3(BJ)"] = dict(zip(dmm, [-0.00784595, -0.00394347, -0.00226683, -0.00394347, -0.00226683]))
-ref["eneyne"]["PBE-D2"] = dict(zip(dmm, [-0.00278650, -0.00118051, -0.00041513, -0.00118051, -0.00041513]))
-ref["eneyne"]["PBE-D3"] = dict(zip(dmm, [-0.00175474, -0.00045421, -0.00016839, -0.00045421, -0.00016839]))
-ref["eneyne"]["PBE-D3(BJ)"] = dict(zip(dmm, [-0.00475937, -0.00235265, -0.00131239, -0.00235265, -0.00131239]))
-ref["eneyne"]["ATM"] = dict(
- zip(dmm, [-0.000000175571, 0.000000216003, -0.000000055859, 0.000000216003, -0.000000055859])
-)
-ref["eneyne"]["MP2-DMP2"] = dict(
- zip(dmm, [0.00632174635953, 0.00265335573161, 0.00344334929607, 0.00265335573161, 0.00344334929607])
-)
-ref["eneyne"]["SAPT0-D3M(BJ)"] = dict(zip(dmm, [-0.06896506, -0.03995152, -0.02689133, -0.03995152, -0.02689133]))
-ref["eneyne"]["SAPT0-D3M"] = dict(zip(dmm, [-0.04486853, -0.02659896, -0.01614236, -0.02659896, -0.01614236]))
-ref["eneyne"]["GCP"] = dict(zip(dmm, [0.0159608596, -0.0018710542, 0.0012920388, 0.0049560054, 0.0103950441]))
-ref["eneyne"]["B3LYP-D4(BJ,EEQ)ATM"] = dict(zip(dmm, [-0.00625445, -0.00306407, -0.00176150, -0.00306407, -0.00176150]))
-ref["eneyne"]["PBE-D4(BJ,EEQ)ATM"] = dict(zip(dmm, [-0.00399176, -0.00190682, -0.00108739, -0.00190682, -0.00108739]))
-ref["eneyne"]["B3LYP-D4(BJ)-2BODY"] = dict(zip(dmm, [-0.00625366, -0.00306413, -0.00176146, -0.00306413, -0.00176146]))
-
-ref["ne"] = {}
-ref["ne"]["B3LYP-D3(BJ)"] = {"atom": 0.0}
-ref["ne"]["MP2-DMP2"] = {"atom": 0.0}
-ref["ne"]["ATM"] = {"atom": 0.0}
-ref["ne"]["GCP"] = {"atom": 0.0}
-ref["ne"]["B3LYP-D4(BJ,EEQ)ATM"] = {"atom": 0.0}
-ref["ne"]["PBE-D4(BJ,EEQ)ATM"] = {"atom": 0.0}
-
-gref = {}
-gref["eneyne"] = {}
-gref["eneyne"]["B3LYP-D2"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.00000000000000e00, 0.48816402308826e-03, -0.52644615172697e-03],
- [0.00000000000000e00, -0.48816402308826e-03, -0.52644615172697e-03],
- [-0.73597441492032e-03, -0.91579236339614e-04, -0.84500341812746e-04],
- [0.73597441492032e-03, -0.91579236339614e-04, -0.84500341812746e-04],
- [0.73597441492032e-03, 0.91579236339614e-04, -0.84500341812746e-04],
- [-0.73597441492032e-03, 0.91579236339614e-04, -0.84500341812746e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.49418952404353e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.10115907534998e-02],
- [0.00000000000000e00, 0.00000000000000e00, 0.13962586025551e-02],
- [0.00000000000000e00, 0.00000000000000e00, -0.52276616130647e-03],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.60147644572925e-03, -0.48929640608715e-06],
- [0.00000000000000e00, -0.60147644572925e-03, -0.48929640608715e-06],
- [-0.76078100143016e-03, -0.58483420364762e-04, 0.24464820304358e-06],
- [0.76078100143016e-03, -0.58483420364762e-04, 0.24464820304358e-06],
- [0.76078100143016e-03, 0.58483420364762e-04, 0.24464820304358e-06],
- [-0.76078100143016e-03, 0.58483420364762e-04, 0.24464820304358e-06],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, -0.56705458935397e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.56456483332009e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.53090524837336e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.52841549233948e-03],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.60147644572925e-03, -0.48929640608715e-06],
- [0.00000000000000e00, -0.60147644572925e-03, -0.48929640608715e-06],
- [-0.76078100143016e-03, -0.58483420364762e-04, 0.24464820304358e-06],
- [0.76078100143016e-03, -0.58483420364762e-04, 0.24464820304358e-06],
- [0.76078100143016e-03, 0.58483420364762e-04, 0.24464820304358e-06],
- [-0.76078100143016e-03, 0.58483420364762e-04, 0.24464820304358e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, -0.56705458935397e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.56456483332009e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.53090524837336e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.52841549233948e-03],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["B3LYP-D3"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.67762635780344e-20, 0.19657186672293e-03, -0.23180716200687e-03],
- [0.50821976835258e-20, -0.19657186672293e-03, -0.23180716200687e-03],
- [-0.83754349667195e-04, 0.45844828386013e-04, -0.92969637976992e-04],
- [0.83754349667195e-04, 0.45844828386013e-04, -0.92969637976992e-04],
- [0.83754349667195e-04, -0.45844828386013e-04, -0.92969637976992e-04],
- [-0.83754349667195e-04, -0.45844828386013e-04, -0.92969637976992e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.11800508571549e-03],
- [-0.33881317890172e-20, -0.50821976835258e-20, 0.62302832736499e-03],
- [0.50821976835258e-20, 0.33881317890172e-20, 0.50037535445493e-03],
- [0.00000000000000e00, -0.52939559203394e-22, -0.16990572018272e-03],
- ]
- ),
- np.array(
- [
- [0.20328790734103e-19, 0.24171499732116e-03, -0.20480842481032e-06],
- [-0.16940658945086e-20, -0.24171499732116e-03, -0.20480842481032e-06],
- [-0.10776189540054e-03, 0.78926689997812e-04, 0.10240421240516e-06],
- [0.10776189540054e-03, 0.78926689997812e-04, 0.10240421240516e-06],
- [0.10776189540054e-03, -0.78926689997812e-04, 0.10240421240516e-06],
- [-0.10776189540054e-03, -0.78926689997812e-04, 0.10240421240516e-06],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, -0.21752286612122e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.21634915516554e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.17823532330490e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.17706161234922e-03],
- ]
- ),
- np.array(
- [
- [0.20328790734103e-19, 0.24171499732116e-03, -0.20480842481032e-06],
- [-0.16940658945086e-20, -0.24171499732116e-03, -0.20480842481032e-06],
- [-0.10776189540054e-03, 0.78926689997812e-04, 0.10240421240516e-06],
- [0.10776189540054e-03, 0.78926689997812e-04, 0.10240421240516e-06],
- [0.10776189540054e-03, -0.78926689997812e-04, 0.10240421240516e-06],
- [-0.10776189540054e-03, -0.78926689997812e-04, 0.10240421240516e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, -0.21752286612122e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.21634915516554e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.17823532330490e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.17706161234922e-03],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["B3LYP-D3(BJ)"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.16940658945086e-20, -0.10896372137622e-03, -0.28496931787936e-03],
- [0.33881317890172e-20, 0.10896372137622e-03, -0.28496931787936e-03],
- [0.56547183189867e-04, -0.10791733716132e-03, -0.81750328898176e-04],
- [-0.56547183189867e-04, -0.10791733716132e-03, -0.81750328898176e-04],
- [-0.56547183189867e-04, 0.10791733716132e-03, -0.81750328898176e-04],
- [0.56547183189867e-04, 0.10791733716132e-03, -0.81750328898176e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.14698301085008e-03],
- [-0.16940658945086e-20, -0.33881317890172e-20, 0.43655907696000e-03],
- [0.00000000000000e00, 0.33881317890172e-20, 0.23688438591518e-03],
- [0.00000000000000e00, -0.52939559203394e-22, 0.76513477626168e-04],
- ]
- ),
- np.array(
- [
- [-0.33881317890172e-20, -0.54157860939394e-04, 0.11299781801723e-07],
- [-0.93173624197973e-20, 0.54157860939394e-04, 0.11299781801723e-07],
- [0.35880725530239e-04, -0.79323052619042e-04, -0.56498909008614e-08],
- [-0.35880725530239e-04, -0.79323052619042e-04, -0.56498909008614e-08],
- [-0.35880725530239e-04, 0.79323052619042e-04, -0.56498909008614e-08],
- [0.35880725530239e-04, 0.79323052619042e-04, -0.56498909008614e-08],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.45552310986933e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.45561218665227e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.69342175541743e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.69351083220036e-04],
- ]
- ),
- np.array(
- [
- [-0.33881317890172e-20, -0.54157860939394e-04, 0.11299781801723e-07],
- [-0.93173624197973e-20, 0.54157860939394e-04, 0.11299781801723e-07],
- [0.35880725530239e-04, -0.79323052619042e-04, -0.56498909008614e-08],
- [-0.35880725530239e-04, -0.79323052619042e-04, -0.56498909008614e-08],
- [-0.35880725530239e-04, 0.79323052619042e-04, -0.56498909008614e-08],
- [0.35880725530239e-04, 0.79323052619042e-04, -0.56498909008614e-08],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.45552310986933e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.45561218665227e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.69342175541743e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.69351083220036e-04],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["PBE-D2"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.00000000000000e00, 0.34868860375520e-03, -0.37603298259607e-03],
- [0.00000000000000e00, -0.34868860375520e-03, -0.37603298259607e-03],
- [-0.52569603453084e-03, -0.65413743213220e-04, -0.60357389750118e-04],
- [0.52569603453084e-03, -0.65413743213220e-04, -0.60357389750118e-04],
- [0.52569603453084e-03, 0.65413743213220e-04, -0.60357389750118e-04],
- [-0.52569603453084e-03, 0.65413743213220e-04, -0.60357389750118e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.35299253320442e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.72256485674234e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.99732761854534e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.37340441789063e-03],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.42962605217439e-03, -0.34949744879114e-06],
- [0.00000000000000e00, -0.42962605217439e-03, -0.34949744879114e-06],
- [-0.54341502569968e-03, -0.41773873586195e-04, 0.17474872439557e-06],
- [0.54341502569968e-03, -0.41773873586195e-04, 0.17474872439557e-06],
- [0.54341502569968e-03, 0.41773873586195e-04, 0.17474872439557e-06],
- [-0.54341502569968e-03, 0.41773873586195e-04, 0.17474872439557e-06],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, -0.40503901078976e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.40326061354193e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.37921805177386e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.37743965452603e-03],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.42962605217439e-03, -0.34949744879114e-06],
- [0.00000000000000e00, -0.42962605217439e-03, -0.34949744879114e-06],
- [-0.54341502569968e-03, -0.41773873586195e-04, 0.17474872439557e-06],
- [0.54341502569968e-03, -0.41773873586195e-04, 0.17474872439557e-06],
- [0.54341502569968e-03, 0.41773873586195e-04, 0.17474872439557e-06],
- [-0.54341502569968e-03, 0.41773873586195e-04, 0.17474872439557e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, -0.40503901078976e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.40326061354193e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.37921805177386e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.37743965452603e-03],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["PBE-D3"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.33881317890172e-20, 0.97730853016389e-04, -0.71901324069440e-04],
- [0.29646153153901e-20, -0.97730853016389e-04, -0.71901324069440e-04],
- [-0.31222554291636e-04, 0.29545643062003e-04, -0.67132324795951e-04],
- [0.31222554291636e-04, 0.29545643062003e-04, -0.67132324795951e-04],
- [0.31222554291636e-04, -0.29545643062003e-04, -0.67132324795951e-04],
- [-0.31222554291636e-04, -0.29545643062003e-04, -0.67132324795951e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.20867204655394e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.30651555323142e-03],
- [0.16940658945086e-20, 0.16940658945086e-20, 0.18769576731255e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.61012168565887e-04],
- ]
- ),
- np.array(
- [
- [0.33881317890172e-20, 0.11021182403760e-03, -0.93982803767757e-07],
- [-0.42351647362715e-21, -0.11021182403760e-03, -0.93982803767758e-07],
- [-0.48220259417857e-04, 0.52933097691669e-04, 0.46991401883879e-07],
- [0.48220259417857e-04, 0.52933097691669e-04, 0.46991401883879e-07],
- [0.48220259417857e-04, -0.52933097691669e-04, 0.46991401883879e-07],
- [-0.48220259417857e-04, -0.52933097691669e-04, 0.46991401883879e-07],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, -0.99901515312115e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.99340886211351e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.67878928346081e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.67318299245317e-04],
- ]
- ),
- np.array(
- [
- [0.33881317890172e-20, 0.11021182403760e-03, -0.93982803767757e-07],
- [-0.42351647362715e-21, -0.11021182403760e-03, -0.93982803767758e-07],
- [-0.48220259417857e-04, 0.52933097691669e-04, 0.46991401883879e-07],
- [0.48220259417857e-04, 0.52933097691669e-04, 0.46991401883879e-07],
- [0.48220259417857e-04, -0.52933097691669e-04, 0.46991401883879e-07],
- [-0.48220259417857e-04, -0.52933097691669e-04, 0.46991401883879e-07],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, -0.99901515312115e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.99340886211351e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.67878928346081e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.67318299245317e-04],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["PBE-D3(BJ)"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.00000000000000e00, -0.61939589939064e-04, -0.16066534797355e-03],
- [0.25410988417629e-20, 0.61939589939064e-04, -0.16066534797355e-03],
- [0.35330272921363e-04, -0.65816270722009e-04, -0.53748175167354e-04],
- [-0.35330272921363e-04, -0.65816270722009e-04, -0.53748175167354e-04],
- [-0.35330272921363e-04, 0.65816270722009e-04, -0.53748175167354e-04],
- [0.35330272921363e-04, 0.65816270722009e-04, -0.53748175167354e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.98332430764322e-04],
- [-0.25410988417629e-20, -0.33881317890172e-20, 0.25661736016373e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.13371752089002e-03],
- [0.00000000000000e00, -0.26469779601697e-22, 0.47656084798449e-04],
- ]
- ),
- np.array(
- [
- [-0.25410988417629e-20, -0.31329250082804e-04, 0.61088639781542e-08],
- [-0.50821976835258e-20, 0.31329250082804e-04, 0.61088639781542e-08],
- [0.21959764459240e-04, -0.47293026603847e-04, -0.30544319890771e-08],
- [-0.21959764459240e-04, -0.47293026603847e-04, -0.30544319890771e-08],
- [-0.21959764459240e-04, 0.47293026603847e-04, -0.30544319890771e-08],
- [0.21959764459240e-04, 0.47293026603847e-04, -0.30544319890771e-08],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.25685884880777e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.25704336611069e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.41528315631943e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.41546767362234e-04],
- ]
- ),
- np.array(
- [
- [-0.25410988417629e-20, -0.31329250082804e-04, 0.61088639781542e-08],
- [-0.50821976835258e-20, 0.31329250082804e-04, 0.61088639781542e-08],
- [0.21959764459240e-04, -0.47293026603847e-04, -0.30544319890771e-08],
- [-0.21959764459240e-04, -0.47293026603847e-04, -0.30544319890771e-08],
- [-0.21959764459240e-04, 0.47293026603847e-04, -0.30544319890771e-08],
- [0.21959764459240e-04, 0.47293026603847e-04, -0.30544319890771e-08],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.25685884880777e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.25704336611069e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.41528315631943e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.41546767362234e-04],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["ATM"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.00000000000000e00, -0.57988139838201e-06, -0.71628554331971e-06],
- [0.00000000000000e00, 0.57988139838201e-06, -0.71628554331971e-06],
- [0.53149296386534e-06, -0.41638019417978e-06, 0.52694338024860e-06],
- [-0.53149296386534e-06, -0.41638019417978e-06, 0.52694338024860e-06],
- [-0.53149296386533e-06, 0.41638019417978e-06, 0.52694338024860e-06],
- [0.53149296386533e-06, 0.41638019417978e-06, 0.52694338024858e-06],
- [0.00000000000000e00, 0.00000000000000e00, -0.92557313363084e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.31010265235900e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.10194777599160e-05],
- [0.00000000000000e00, 0.00000000000000e00, -0.10792097129990e-05],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, -0.45154573778694e-07, 0.11131133827146e-09],
- [0.00000000000000e00, 0.45154573778707e-07, 0.11131133827146e-09],
- [0.10133274017225e-06, -0.72175367263952e-07, -0.55655669135736e-10],
- [-0.10133274017225e-06, -0.72175367263966e-07, -0.55655669135736e-10],
- [-0.10133274017227e-06, 0.72175367263952e-07, -0.55655669135736e-10],
- [0.10133274017227e-06, 0.72175367263966e-07, -0.55655669135736e-10],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.14079365564105e-07],
- [0.00000000000000e00, 0.00000000000000e00, -0.14067311316192e-07],
- [0.00000000000000e00, 0.00000000000000e00, 0.67277034390041e-07],
- [0.00000000000000e00, 0.00000000000000e00, -0.67289088637954e-07],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, -0.45154573778694e-07, 0.11131133827146e-09],
- [0.00000000000000e00, 0.45154573778707e-07, 0.11131133827146e-09],
- [0.10133274017225e-06, -0.72175367263952e-07, -0.55655669135736e-10],
- [-0.10133274017225e-06, -0.72175367263966e-07, -0.55655669135736e-10],
- [-0.10133274017227e-06, 0.72175367263952e-07, -0.55655669135736e-10],
- [0.10133274017227e-06, 0.72175367263966e-07, -0.55655669135736e-10],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.14079365564105e-07],
- [0.00000000000000e00, 0.00000000000000e00, -0.14067311316192e-07],
- [0.00000000000000e00, 0.00000000000000e00, 0.67277034390041e-07],
- [0.00000000000000e00, 0.00000000000000e00, -0.67289088637954e-07],
- ]
- ),
- ],
- )
-)
-gref["eneyne"]["MP2-DMP2"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.000000000000, 8.33766812971e-05, 0.000109143431777],
- [0.000000000000, -8.33766812971e-05, 0.000109143431777],
- [6.65762086716e-05, -8.48726541848e-06, -6.94161475862e-06],
- [-6.65762086716e-05, -8.48726541848e-06, -6.94161475862e-06],
- [-6.65762086716e-05, 8.48726541848e-06, -6.94161475862e-06],
- [6.65762086716e-05, 8.48726541848e-06, -6.94161475862e-06],
- [0.00000000000, 0.00000000000, -6.06356381132e-05],
- [0.00000000000, 0.00000000000, -0.000146587460686],
- [0.00000000000, 0.00000000000, 5.56226390549e-05],
- [0.00000000000, 0.00000000000, -3.89199447758e-05],
- ]
- ),
- np.array(
- [
- [0.00000000000, 6.40910926532e-05, -5.69353173759e-08],
- [0.00000000000, -6.40910926532e-05, -5.69353173759e-08],
- [6.40446102957e-05, -5.1224992828e-06, 2.84676586879e-08],
- [-6.40446102957e-05, -5.1224992828e-06, 2.84676586879e-08],
- [-6.40446102957e-05, 5.1224992828e-06, 2.84676586879e-08],
- [6.40446102957e-05, 5.1224992828e-06, 2.84676586879e-08],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, -3.49290530324e-05],
- [0.00000000000000e00, 0.00000000000000e00, 3.41911680578e-05],
- [0.00000000000000e00, 0.00000000000000e00, 3.99755714285e-05],
- [0.00000000000000e00, 0.00000000000000e00, -3.9237686454e-05],
- ]
- ),
- np.array(
- [
- [0.00000000000, 6.40910926532e-05, -5.69353173759e-08],
- [0.00000000000, -6.40910926532e-05, -5.69353173759e-08],
- [6.40446102957e-05, -5.1224992828e-06, 2.84676586879e-08],
- [-6.40446102957e-05, -5.1224992828e-06, 2.84676586879e-08],
- [-6.40446102957e-05, 5.1224992828e-06, 2.84676586879e-08],
- [6.40446102957e-05, 5.1224992828e-06, 2.84676586879e-08],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, -3.49290530324e-05],
- [0.00000000000000e00, 0.00000000000000e00, 3.41911680578e-05],
- [0.00000000000000e00, 0.00000000000000e00, 3.99755714285e-05],
- [0.00000000000000e00, 0.00000000000000e00, -3.9237686454e-05],
- ]
- ),
- ],
- )
-)
-
-gref["eneyne"]["SAPT0-D3M"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.000000000, -0.0045737729976216, -0.00066334525752522],
- [0.000000000, 0.0045737729976216, -0.00066334525752522],
- [0.0012805716442335, -0.0020206093754054, -0.00012113832932721],
- [-0.0012805716442335, -0.0020206093754054, -0.00012113832932721],
- [-0.0012805716442335, 0.0020206093754054, -0.00012113832932721],
- [0.0012805716442335, 0.0020206093754054, -0.00012113832932721],
- [-2.1175823681358e-22, 0.0000000000, 0.0030713413478305],
- [0.0000000000, 0.0000000000, -0.0024234049836295],
- [-3.3881317890172e-21, 0.0000000000, 0.00015928898896433],
- [0.0000000000, 0.0000000000, 0.001004018479194],
- ]
- ),
- np.array(
- [
- [2.168404344971e-19, -0.0044293578230772, 8.090944122832e-07],
- [0.0000000000, 0.0044293578230772, 8.090944122832e-07],
- [0.0012474945946527, -0.0019751474381077, -4.045472061416e-07],
- [-0.0012474945946527, -0.0019751474381077, -4.045472061416e-07],
- [-0.0012474945946527, 0.0019751474381077, -4.045472061416e-07],
- [0.0012474945946527, 0.0019751474381077, -4.045472061416e-07],
- ],
- ),
- np.array(
- [
- [0.0000000000, 0.0000000000, 0.0029837992525676],
- [0.0000000000, 0.0000000000, -0.0030053144036229],
- [0.0000000000, 0.0000000000, -0.0009761517016775],
- [0.0000000000, 0.0000000000, 0.00099766685273284],
- ]
- ),
- np.array(
- [
- [2.168404344971e-19, -0.0044293578230772, 8.090944122832e-07],
- [0.0000000000, 0.0044293578230772, 8.090944122832e-07],
- [0.0012474945946527, -0.0019751474381077, -4.045472061416e-07],
- [-0.0012474945946527, -0.0019751474381077, -4.045472061416e-07],
- [-0.0012474945946527, 0.0019751474381077, -4.045472061416e-07],
- [0.0012474945946527, 0.0019751474381077, -4.045472061416e-07],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ],
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.0000000000, 0.0000000000, 0.0029837992525676],
- [0.0000000000, 0.0000000000, -0.0030053144036229],
- [0.0000000000, 0.0000000000, -0.0009761517016775],
- [0.0000000000, 0.0000000000, 0.00099766685273284],
- ]
- ),
- ],
- )
-)
-
-gref["eneyne"]["SAPT0-D3M(BJ)"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [0.0000000000, -0.0045136232857308, -0.00075231393260748],
- [0.0000000000, 0.0045136232857308, -0.00075231393260748],
- [0.0014948082321618, -0.0021113594425158, -0.0001174597215329],
- [-0.0014948082321618, -0.0021113594425158, -0.0001174597215329],
- [-0.0014948082321618, 0.0021113594425158, -0.0001174597215329],
- [0.0014948082321618, 0.0021113594425158, -0.0001174597215329],
- [-2.1175823681358e-22, 0.0000000000, 0.0024546111241176],
- [0.0000000000, 0.0000000000, -0.0018133073317862],
- [-3.3881317890172e-21, 0.0000000000, -0.00049587587501463],
- [0.0000000000, 0.0000000000, 0.0018290388340298],
- ]
- ),
- np.array(
- [
- [2.168404344971e-19, -0.0043467052643878, 2.7707227349768e-06],
- [8.1315162936413e-20, 0.0043467052643878, 2.7707227349768e-06],
- [0.0014630922150675, -0.0020676643712317, -1.3853613674884e-06],
- [-0.0014630922150675, -0.0020676643712317, -1.3853613674884e-06],
- [-0.0014630922150675, 0.0020676643712317, -1.3853613674884e-06],
- [0.0014630922150675, 0.0020676643712317, -1.3853613674884e-06],
- ],
- ),
- np.array(
- [
- [0.0000000000, 0.0000000000, 0.0023714953184327],
- [0.0000000000, 0.0000000000, -0.0023773120665058],
- [0.0000000000, 0.0000000000, -0.0018170208599158],
- [0.0000000000, 0.0000000000, 0.001822837607989],
- ]
- ),
- np.array(
- [
- [2.168404344971e-19, -0.0043467052643878, 2.7707227349768e-06],
- [8.1315162936413e-20, 0.0043467052643878, 2.7707227349768e-06],
- [0.0014630922150675, -0.0020676643712317, -1.3853613674884e-06],
- [-0.0014630922150675, -0.0020676643712317, -1.3853613674884e-06],
- [-0.0014630922150675, 0.0020676643712317, -1.3853613674884e-06],
- [0.0014630922150675, 0.0020676643712317, -1.3853613674884e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ],
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.0000000000, 0.0000000000, 0.0023714953184327],
- [0.0000000000, 0.0000000000, -0.0023773120665058],
- [0.0000000000, 0.0000000000, -0.0018170208599158],
- [0.0000000000, 0.0000000000, 0.001822837607989],
- ]
- ),
- ],
- )
-)
-
-gref["eneyne"]["GCP"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [-0.32710379543888e-19, -0.69172406585692e-04, 0.10982631419040e-03],
- [0.37383290907300e-19, 0.69172406585692e-04, 0.10982631419040e-03],
- [-0.15254697454698e-02, 0.11030956605292e-02, 0.28014891183255e-04],
- [0.15254697454698e-02, 0.11030956605292e-02, 0.28014891183255e-04],
- [0.15254697454698e-02, -0.11030956605292e-02, 0.28014891183255e-04],
- [-0.15254697454698e-02, -0.11030956605292e-02, 0.28014891183255e-04],
- [0.22816950016663e-23, -0.13690170009998e-22, 0.18237229624453e-03],
- [0.00000000000000e00, 0.14602848010664e-21, -0.25950727860856e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.14756310364428e-02],
- [0.00000000000000e00, -0.11408475008331e-23, -0.17302082471926e-02],
- ]
- ),
- np.array(
- [
- [0.34266209661404e-18, -0.20208529257725e-01, 0.10107213710498e-04],
- [-0.33566899260151e-18, 0.20208529257725e-01, 0.10107213710498e-04],
- [0.27231252084318e-02, -0.14200517748742e-02, -0.50536068552489e-05],
- [-0.27231252084318e-02, -0.14200517748742e-02, -0.50536068552489e-05],
- [-0.27231252084318e-02, 0.14200517748742e-02, -0.50536068552489e-05],
- [0.27231252084318e-02, 0.14200517748742e-02, -0.50536068552489e-05],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.68069703161428e-04],
- [0.00000000000000e00, 0.00000000000000e00, -0.67416294638677e-04],
- [0.00000000000000e00, 0.00000000000000e00, 0.34846719859829e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.34912060712104e-03],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.17633567333202e-02, 0.74522722040174e-06],
- [0.00000000000000e00, -0.17633567333202e-02, 0.74522722040174e-06],
- [0.22552670725250e-03, 0.33585712825095e-03, -0.37261361020087e-06],
- [-0.22552670725250e-03, 0.33585712825095e-03, -0.37261361020087e-06],
- [-0.22552670725250e-03, -0.33585712825095e-03, -0.37261361020087e-06],
- [0.22552670725250e-03, -0.33585712825095e-03, -0.37261361020087e-06],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- ]
- ),
- np.array(
- [
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.00000000000000e00],
- [0.00000000000000e00, 0.00000000000000e00, 0.63749053662728e-03],
- [0.00000000000000e00, 0.00000000000000e00, -0.62817584877172e-03],
- [0.00000000000000e00, 0.00000000000000e00, 0.31837548471878e-02],
- [0.00000000000000e00, 0.00000000000000e00, -0.31930695350433e-02],
- ]
- ),
- ],
- )
-)
-
-gref["eneyne"]["B3LYP-D4(BJ,EEQ)ATM"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [-0.0, -0.000121388195, -0.000285720303],
- [0.0, 0.000121388195, -0.000285720303],
- [0.000013500589, -0.000035224119, -0.000051913946],
- [-0.000013500589, -0.000035224119, -0.000051913946],
- [-0.000013500589, 0.000035224119, -0.000051913946],
- [0.000013500589, 0.000035224119, -0.000051913946],
- [0.0, -0.0, 0.000162779428],
- [0.0, -0.0, 0.00042515118],
- [0.0, -0.0, 0.000180544011],
- [0.0, -0.0, 0.000010621775],
- ]
- ),
- np.array(
- [
- [-0.0, -0.000077703214, -0.000000117582],
- [0.0, 0.000077703214, -0.000000117582],
- [-0.000003720109, -0.000014373039, 0.000000058791],
- [0.000003720109, -0.000014373039, 0.000000058791],
- [0.000003720109, 0.000014373039, 0.000000058791],
- [-0.000003720109, 0.000014373039, 0.000000058791],
- ]
- ),
- np.array(
- [
- [0.0, 0.0, 0.000044445504],
- [0.0, 0.0, -0.000044316404],
- [0.0, 0.0, -0.000011452466],
- [0.0, 0.0, 0.000011323366],
- ]
- ),
- np.array(
- [
- [-0.0, -0.000077703214, -0.000000117582],
- [0.0, 0.000077703214, -0.000000117582],
- [-0.000003720109, -0.000014373039, 0.000000058791],
- [0.000003720109, -0.000014373039, 0.000000058791],
- [0.000003720109, 0.000014373039, 0.000000058791],
- [-0.000003720109, 0.000014373039, 0.000000058791],
- [0.0, -0.0, 0.0],
- [0.0, -0.0, 0.0],
- [0.0, -0.0, 0.0],
- [0.0, -0.0, 0.0],
- ]
- ),
- np.array(
- [
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.000044445504],
- [0.0, 0.0, -0.000044316404],
- [0.0, 0.0, -0.000011452466],
- [0.0, 0.0, 0.000011323366],
- ]
- ),
- ],
- )
-)
-
-gref["eneyne"]["PBE-D4(BJ,EEQ)ATM"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [-0.0, -0.000075815381, -0.00017520537],
- [0.0, 0.000075815381, -0.00017520537],
- [0.000007491515, -0.000020129841, -0.000035107085],
- [-0.000007491515, -0.000020129841, -0.000035107085],
- [-0.000007491515, 0.000020129841, -0.000035107085],
- [0.000007491515, 0.000020129841, -0.000035107085],
- [0.0, -0.0, 0.000114234095],
- [0.0, -0.0, 0.000264656137],
- [0.0, -0.0, 0.00010600965],
- [0.0, -0.0, 0.000005939201],
- ]
- ),
- np.array(
- [
- [-0.0, -0.000048683304, -0.000000077468],
- [-0.0, 0.000048683304, -0.000000077468],
- [-0.000003585439, -0.000006613721, 0.000000038734],
- [0.000003585439, -0.000006613721, 0.000000038734],
- [0.000003585439, 0.000006613721, 0.000000038734],
- [-0.000003585439, 0.000006613721, 0.000000038734],
- ]
- ),
- np.array(
- [
- [0.0, 0.0, 0.000027225998],
- [0.0, 0.0, -0.000027154133],
- [0.0, 0.0, -0.000005688871],
- [0.0, 0.0, 0.000005617006],
- ]
- ),
- np.array(
- [
- [-0.0, -0.000048683304, -0.000000077468],
- [-0.0, 0.000048683304, -0.000000077468],
- [-0.000003585439, -0.000006613721, 0.000000038734],
- [0.000003585439, -0.000006613721, 0.000000038734],
- [0.000003585439, 0.000006613721, 0.000000038734],
- [-0.000003585439, 0.000006613721, 0.000000038734],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- ]
- ),
- np.array(
- [
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.000027225998],
- [0.0, 0.0, -0.000027154133],
- [0.0, 0.0, -0.000005688871],
- [0.0, 0.0, 0.000005617006],
- ]
- ),
- ],
- )
-)
-
-gref["eneyne"]["B3LYP-D4(BJ)-2BODY"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [-2.37238242e-20, -1.20552026e-04, -2.85188070e-04],
- [1.77428629e-20, 1.20552026e-04, -2.85188070e-04],
- [1.29618968e-05, -3.48247508e-05, -5.24578644e-05],
- [-1.29618968e-05, -3.48247508e-05, -5.24578644e-05],
- [-1.29618968e-05, 3.48247508e-05, -5.24578644e-05],
- [1.29618968e-05, 3.48247508e-05, -5.24578644e-05],
- [1.52364928e-21, -2.22548925e-21, 1.64760284e-04],
- [9.68759086e-21, -1.90663898e-20, 4.23463450e-04],
- [5.52800316e-21, -1.28345778e-20, 1.79843750e-04],
- [3.79855004e-22, -4.55050785e-22, 1.21401127e-05],
- ]
- ),
- np.array(
- [
- [-1.49709758e-20, -7.76770859e-05, -1.17642905e-07],
- [6.65584060e-21, 7.76770859e-05, -1.17642905e-07],
- [-3.75026735e-06, -1.43576031e-05, 5.88214523e-08],
- [3.75026735e-06, -1.43576031e-05, 5.88214523e-08],
- [3.75026735e-06, 1.43576031e-05, 5.88214523e-08],
- [-3.75026735e-06, 1.43576031e-05, 5.88214523e-08],
- ]
- ),
- np.array(
- [
- [0.0, 0.0, 4.44399748e-05],
- [0.0, 0.0, -4.43108715e-05],
- [0.0, 0.0, -1.14903043e-05],
- [0.0, 0.0, 1.13612010e-05],
- ]
- ),
- np.array(
- [
- [-1.49709758e-20, -7.76770859e-05, -1.17642905e-07],
- [6.65584060e-21, 7.76770859e-05, -1.17642905e-07],
- [-3.75026735e-06, -1.43576031e-05, 5.88214523e-08],
- [3.75026735e-06, -1.43576031e-05, 5.88214523e-08],
- [3.75026735e-06, 1.43576031e-05, 5.88214523e-08],
- [-3.75026735e-06, 1.43576031e-05, 5.88214523e-08],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- ]
- ),
- np.array(
- [
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 0.0],
- [0.0, 0.0, 4.44399748e-05],
- [0.0, 0.0, -4.43108715e-05],
- [0.0, 0.0, -1.14903043e-05],
- [0.0, 0.0, 1.13612010e-05],
- ]
- ),
- ],
- )
-)
-
-gref["ne"] = {}
-gref["ne"]["B3LYP-D3(BJ)"] = {"atom": np.zeros((1, 3))}
-gref["ne"]["MP2-DMP2"] = {"atom": np.zeros((1, 3))}
-gref["ne"]["ATM"] = {"atom": np.zeros((1, 3))}
-gref["ne"]["GCP"] = {"atom": np.zeros((1, 3))}
-gref["ne"]["B3LYP-D4(BJ,EEQ)ATM"] = {"atom": np.zeros((1, 3))}
-gref["ne"]["PBE-D4(BJ,EEQ)ATM"] = {"atom": np.zeros((1, 3))}
-
-
-pref = {}
-pref["eneyne"] = {}
-pref["eneyne"]["SAPT0-D3M"] = dict(
- zip(
- dmm,
- [
- 0.5
- * np.array(
- [
- [
- 0.00000000e00,
- -7.85678891e-03,
- -1.95928495e-03,
- -1.95928495e-03,
- -2.01222438e-03,
- -2.01222438e-03,
- -4.53698281e-05,
- -2.51948360e-04,
- -4.60630446e-04,
- -4.15929931e-06,
- ],
- [
- -7.85678891e-03,
- 0.00000000e00,
- -2.01222438e-03,
- -2.01222438e-03,
- -1.95928495e-03,
- -1.95928495e-03,
- -4.53698281e-05,
- -2.51948360e-04,
- -4.60630446e-04,
- -4.15929931e-06,
- ],
- [
- -1.95928495e-03,
- -2.01222438e-03,
- 0.00000000e00,
- -1.04060569e-03,
- -9.67953410e-05,
- -2.90146983e-04,
- -1.15854812e-05,
- -5.42143151e-05,
- -8.42058910e-05,
- -1.19520095e-06,
- ],
- [
- -1.95928495e-03,
- -2.01222438e-03,
- -1.04060569e-03,
- 0.00000000e00,
- -2.90146983e-04,
- -9.67953410e-05,
- -1.15854812e-05,
- -5.42143151e-05,
- -8.42058910e-05,
- -1.19520095e-06,
- ],
- [
- -2.01222438e-03,
- -1.95928495e-03,
- -9.67953410e-05,
- -2.90146983e-04,
- 0.00000000e00,
- -1.04060569e-03,
- -1.15854812e-05,
- -5.42143151e-05,
- -8.42058910e-05,
- -1.19520095e-06,
- ],
- [
- -2.01222438e-03,
- -1.95928495e-03,
- -2.90146983e-04,
- -9.67953410e-05,
- -1.04060569e-03,
- 0.00000000e00,
- -1.15854812e-05,
- -5.42143151e-05,
- -8.42058910e-05,
- -1.19520095e-06,
- ],
- [
- -4.53698281e-05,
- -4.53698281e-05,
- -1.15854812e-05,
- -1.15854812e-05,
- -1.15854812e-05,
- -1.15854812e-05,
- 0.00000000e00,
- -8.94451739e-03,
- -1.49243946e-03,
- -2.06978526e-03,
- ],
- [
- -2.51948360e-04,
- -2.51948360e-04,
- -5.42143151e-05,
- -5.42143151e-05,
- -5.42143151e-05,
- -5.42143151e-05,
- -8.94451739e-03,
- 0.00000000e00,
- -2.07365771e-03,
- -1.50094929e-03,
- ],
- [
- -4.60630446e-04,
- -4.60630446e-04,
- -8.42058910e-05,
- -8.42058910e-05,
- -8.42058910e-05,
- -8.42058910e-05,
- -1.49243946e-03,
- -2.07365771e-03,
- 0.00000000e00,
- -6.02859360e-05,
- ],
- [
- -4.15929931e-06,
- -4.15929931e-06,
- -1.19520095e-06,
- -1.19520095e-06,
- -1.19520095e-06,
- -1.19520095e-06,
- -2.06978526e-03,
- -1.50094929e-03,
- -6.02859360e-05,
- 0.00000000e00,
- ],
- ]
- ),
- np.zeros((6, 6)),
- np.zeros((4, 4)),
- np.zeros((10, 10)),
- np.zeros((10, 10)),
- ],
- )
-)
-pref["eneyne"]["PBE-D4(BJ,EEQ)ATM"] = dict(
- zip(
- dmm,
- [
- np.array(
- [
- [
- 0.00000000e00,
- -2.64744008e-04,
- -7.32623305e-05,
- -7.32623305e-05,
- -7.01934088e-05,
- -7.01934088e-05,
- -2.69705044e-05,
- -1.06309035e-04,
- -5.46185898e-05,
- -1.67640345e-06,
- ],
- [
- -2.64744008e-04,
- 0.00000000e00,
- -7.01934088e-05,
- -7.01934088e-05,
- -7.32623305e-05,
- -7.32623305e-05,
- -2.69705044e-05,
- -1.06309035e-04,
- -5.46185898e-05,
- -1.67640345e-06,
- ],
- [
- -7.32623305e-05,
- -7.01934088e-05,
- 0.00000000e00,
- -1.90214207e-05,
- -1.14919996e-05,
- -1.67283942e-05,
- -4.39710997e-06,
- -1.70897298e-05,
- -1.03017176e-05,
- -2.96551988e-07,
- ],
- [
- -7.32623305e-05,
- -7.01934088e-05,
- -1.90214207e-05,
- 0.00000000e00,
- -1.67283942e-05,
- -1.14919996e-05,
- -4.39710997e-06,
- -1.70897298e-05,
- -1.03017176e-05,
- -2.96551988e-07,
- ],
- [
- -7.01934088e-05,
- -7.32623305e-05,
- -1.14919996e-05,
- -1.67283942e-05,
- 0.00000000e00,
- -1.90214207e-05,
- -4.39710997e-06,
- -1.70897298e-05,
- -1.03017176e-05,
- -2.96551988e-07,
- ],
- [
- -7.01934088e-05,
- -7.32623305e-05,
- -1.67283942e-05,
- -1.14919996e-05,
- -1.90214207e-05,
- 0.00000000e00,
- -4.39710997e-06,
- -1.70897298e-05,
- -1.03017176e-05,
- -2.96551988e-07,
- ],
- [
- -2.69705044e-05,
- -2.69705044e-05,
- -4.39710997e-06,
- -4.39710997e-06,
- -4.39710997e-06,
- -4.39710997e-06,
- 0.00000000e00,
- -2.70797078e-04,
- -6.64000329e-05,
- -7.15900093e-05,
- ],
- [
- -1.06309035e-04,
- -1.06309035e-04,
- -1.70897298e-05,
- -1.70897298e-05,
- -1.70897298e-05,
- -1.70897298e-05,
- -2.70797078e-04,
- 0.00000000e00,
- -7.10525707e-05,
- -6.69658005e-05,
- ],
- [
- -5.46185898e-05,
- -5.46185898e-05,
- -1.03017176e-05,
- -1.03017176e-05,
- -1.03017176e-05,
- -1.03017176e-05,
- -6.64000329e-05,
- -7.10525707e-05,
- 0.00000000e00,
- -8.31720277e-06,
- ],
- [
- -1.67640345e-06,
- -1.67640345e-06,
- -2.96551988e-07,
- -2.96551988e-07,
- -2.96551988e-07,
- -2.96551988e-07,
- -7.15900093e-05,
- -6.69658005e-05,
- -8.31720277e-06,
- 0.00000000e00,
- ],
- ]
- ),
- np.zeros((6, 6)),
- np.zeros((4, 4)),
- np.zeros((10, 10)),
- np.zeros((10, 10)),
- ],
- )
-)
-
-seneyne = """
-C 0.000000 -0.667578 -2.124659
-C 0.000000 0.667578 -2.124659
-H 0.923621 -1.232253 -2.126185
-H -0.923621 -1.232253 -2.126185
-H -0.923621 1.232253 -2.126185
-H 0.923621 1.232253 -2.126185
---
-C 0.000000 0.000000 2.900503
-C 0.000000 0.000000 1.693240
-H 0.000000 0.000000 0.627352
-H 0.000000 0.000000 3.963929
-"""
-
-sne = """
-Ne 0 0 0
-"""
-
-
-def eneyne_ne_qcdbmols():
- if not is_program_new_enough("psi4", "1.4a1.dev55"):
- pytest.skip("Psi4 requires at least Psi4 v1.3rc2")
- from psi4.driver import qcdb
-
- eneyne = qcdb.Molecule(seneyne)
- ne = qcdb.Molecule(sne)
- mols = {
- "eneyne": {
- "dimer": eneyne,
- "mA": eneyne.extract_subsets(1),
- "mB": eneyne.extract_subsets(2),
- "mAgB": eneyne.extract_subsets(1, 2),
- "gAmB": eneyne.extract_subsets(2, 1),
- },
- "ne": {"atom": ne},
- }
- return mols
-
-
-def eneyne_ne_psi4mols():
- if not is_program_new_enough("psi4", "1.4a1.dev55"):
- pytest.skip("Psi4 requires at least Psi4 v1.3rc2")
- import psi4
-
- eneyne = psi4.core.Molecule.from_string(seneyne)
- ne = psi4.core.Molecule.from_string(sne)
- mols = {
- "eneyne": {
- "dimer": eneyne,
- "mA": eneyne.extract_subsets(1),
- "mB": eneyne.extract_subsets(2),
- "mAgB": eneyne.extract_subsets(1, 2),
- "gAmB": eneyne.extract_subsets(2, 1),
- },
- "ne": {"atom": ne},
- }
- return mols
-
-
-def eneyne_ne_qcschemamols():
-
- eneyne = qcel.molparse.to_schema(qcel.molparse.from_string(seneyne)["qm"], dtype=2)
- mA = qcel.molparse.to_schema(qcel.molparse.from_string("\n".join(seneyne.splitlines()[:7]))["qm"], dtype=2)
- mB = qcel.molparse.to_schema(qcel.molparse.from_string("\n".join(seneyne.splitlines()[-4:]))["qm"], dtype=2)
- ne = qcel.molparse.to_schema(qcel.molparse.from_string(sne)["qm"], dtype=2)
-
- mAgB = qcel.molparse.from_string(seneyne)["qm"]
- mAgB["real"] = [
- (iat < mAgB["fragment_separators"][0]) for iat in range(len(mAgB["elem"]))
- ] # works b/c chgmult doesn't need refiguring
- mAgB = qcel.molparse.to_schema(mAgB, dtype=2)
-
- gAmB = qcel.molparse.from_string(seneyne)["qm"]
- gAmB["real"] = [(iat >= gAmB["fragment_separators"][0]) for iat in range(len(gAmB["elem"]))]
- gAmB = qcel.molparse.to_schema(gAmB, dtype=2)
-
- mols = {"eneyne": {"dimer": eneyne, "mA": mA, "mB": mB, "mAgB": mAgB, "gAmB": gAmB}, "ne": {"atom": ne}}
- return mols
-
-
-db3lypd3bj = {
- "dashlevel": "d3bj2b",
- "dashparams": {"s8": 1.9889, "s6": 1.0, "a2": 4.4211, "a1": 0.3981},
- "dashparams_citation": "",
- "fctldash": "b3lyp-d3(bj)",
-}
-db3lypd3bjcustom = copy.deepcopy(db3lypd3bj)
-db3lypd3bjcustom["fctldash"] = ""
-db3lypd3bjcustom["dashparams"]["a2"] = 5.4211
-
-dpbed3zero = {
- "dashlevel": "d3zero2b",
- "dashparams": {"s6": 1.0, "s8": 0.722, "sr6": 1.217, "sr8": 1.0, "alpha6": 14.0},
- "dashparams_citation": "",
- "fctldash": "pbe-d3",
-}
-
-atmgr = {"dashlevel": "atmgr", "dashparams": {"alpha6": 14.0}, "dashparams_citation": "", "fctldash": "atm(gr)"}
-
-chg = {"dashlevel": "chg", "dashparams": {"s6": 1.0}, "dashparams_citation": "", "fctldash": "chg"}
-
-dmp2dmp2 = {
- "dashlevel": "dmp2",
- "dashparams": {"s8": 1.187, "a1": 0.944, "a2": 0.480, "rcut": 0.72, "w": 0.20},
- "dashparams_citation": "",
- "fctldash": "mp2-dmp2",
-}
-
-
-def _compute_key(pjrec):
- return pjrec["fctldash"].upper()
-
-
-# Tests
-
-
-@pytest.mark.parametrize(
- "inp,expected",
- [
- (({"name_hint": "b3lyp", "level_hint": "d3bj"}, "B3LYP-D3(BJ)"), db3lypd3bj),
- (({"name_hint": "b3LYP", "level_hint": "D3bj"}, "B3LYP-D3(BJ)"), db3lypd3bj),
- (
- (
- {"param_tweaks": {"s8": 1.9889, "s6": 1.0, "a2": 4.4211, "a1": 0.3981}, "level_hint": "d3bj"},
- "B3LYP-D3(BJ)",
- ),
- db3lypd3bj,
- ),
- (({"name_hint": "b3lyp", "level_hint": "d3bJ", "param_tweaks": {"a2": 4.4211}}, "B3LYP-D3(BJ)"), db3lypd3bj),
- (
- ({"verbose": 3, "name_hint": "b3lyp", "level_hint": "d3bJ", "param_tweaks": {"a2": 5.4211}}, ""),
- db3lypd3bjcustom,
- ),
- (({"name_hint": "b3lyp-d3bj", "param_tweaks": {"a2": 4.4211}}, "B3LYP-D3(BJ)"), db3lypd3bj),
- (({"name_hint": "pbe", "level_hint": "d3zero"}, "PBE-D3"), dpbed3zero),
- (({"name_hint": "pbe", "level_hint": "d3"}, "PBE-D3"), dpbed3zero),
- (({"name_hint": "pbe-d3"}, "PBE-D3"), dpbed3zero),
- (({"name_hint": "atm(gr)", "level_hint": "atmgr"}, "ATM(GR)"), atmgr),
- (({"name_hint": "atmgr"}, "ATM(GR)"), atmgr),
- (({"name_hint": "bp86-atmgr"}, "ATM(GR)"), atmgr),
- (({"name_hint": "asdf-chg"}, "CHG"), chg),
- (({"name_hint": "mp2-dmp2"}, "MP2-DMP2"), dmp2dmp2),
- (({"name_hint": "MP2", "level_hint": "dmp2"}, "MP2-DMP2"), dmp2dmp2),
- ],
-)
-def test_dftd3__from_arrays(inp, expected):
- res = empirical_dispersion_resources.from_arrays(**inp[0])
- assert compare_recursive(expected, res, atol=1.0e-4)
- assert compare(inp[1], _compute_key(res), "key")
- res = empirical_dispersion_resources.from_arrays(
- name_hint=res["fctldash"], level_hint=res["dashlevel"], param_tweaks=res["dashparams"]
- )
- assert compare_recursive(expected, res, tnm() + " idempotent", atol=1.0e-4)
-
-
-@pytest.mark.parametrize(
- "inp",
- [
- ({"name_hint": "b3lyp", "level_hint": "d3bJ", "param_tweaks": {"a3": 5.4211}}),
- ({"name_hint": "fakeb3lyp", "level_hint": "d3bJ", "param_tweaks": {"s6": 5.4211}}),
- ({"level_hint": "d3bJ", "param_tweaks": {"s6": 5.4211}}),
- ({"name_hint": "b3lyp-d3bj", "param_tweaks": {"a2": 4.4211, "zzz": 0.0}}),
- ({"name_hint": "asdf-d4"}),
- ({"name_hint": "atm(gr)", "level_hint": "chg"}),
- ],
-)
-def test_dftd3__from_arrays__error(inp):
- with pytest.raises(qcng.exceptions.InputError):
- empirical_dispersion_resources.from_arrays(**inp)
-
-
-def test_dftd3__from_arrays__supplement():
- ans = {
- "dashlevel": "chg",
- "dashparams": {"s6": 4.05},
- "fctldash": "asdf-d4",
- "dashparams_citation": " mypaper\n",
- }
- supp = {"chg": {"definitions": {"asdf-d4": {"params": {"s6": 4.05}, "citation": " mypaper\n"}}}}
-
- res = empirical_dispersion_resources.from_arrays(name_hint="asdf-d4", level_hint="chg", dashcoeff_supplement=supp)
- assert compare_recursive(ans, res, atol=1.0e-4)
- with pytest.raises(qcng.exceptions.InputError) as e:
- empirical_dispersion_resources.from_arrays(
- name_hint=res["fctldash"], level_hint=res["dashlevel"], param_tweaks=res["dashparams"]
- )
- assert "Can't guess -D correction level" in str(e.value)
- res = empirical_dispersion_resources.from_arrays(
- name_hint=res["fctldash"],
- level_hint=res["dashlevel"],
- param_tweaks=res["dashparams"],
- dashcoeff_supplement=supp,
- )
- assert compare_recursive(ans, res, tnm() + " idempotent", atol=1.0e-4)
-
-
-@using("dftd3")
-def test_3():
- sys = qcel.molparse.from_string(seneyne)["qm"]
-
- resinp = {
- "schema_name": "qcschema_input",
- "schema_version": 1,
- "molecule": qcel.molparse.to_schema(sys, dtype=2),
- "driver": "energy",
- "model": {"method": "b3lyp"},
- "keywords": {"level_hint": "d3bj"},
- }
- res = qcng.compute(resinp, "dftd3", raise_error=True)
- res = res.dict()
-
- # res = dftd3.run_dftd3_from_arrays(molrec=sys, name_hint='b3lyp', level_hint='d3bj')
- assert compare("B3LYP-D3(BJ)", _compute_key(res["extras"]["local_keywords"]), "key")
-
-
-@using("dftd3")
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- ],
- ids=["qmol", "pmol"],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- ({"first": "b3lyp", "second": "d", "parent": "eneyne", "subject": "dimer", "lbl": "B3LYP-D2"}),
- ({"first": "b3lyp", "second": "d3bj", "parent": "eneyne", "subject": "mA", "lbl": "B3LYP-D3(BJ)"}),
- ({"first": "pbe", "second": "d3zero", "parent": "eneyne", "subject": "mB", "lbl": "PBE-D3"}),
- ({"first": "pbe", "second": "d3zero", "parent": "eneyne", "subject": "gAmB", "lbl": "PBE-D3"}),
- ({"first": "pbe", "second": "d2", "parent": "eneyne", "subject": "mAgB", "lbl": "PBE-D2"}),
- ({"first": "b3lyp", "second": "d3bj", "parent": "ne", "subject": "atom", "lbl": "B3LYP-D3(BJ)"}),
- # ({'first': '', 'second': 'atmgr', 'parent': 'eneyne', 'subject': 'dimer', 'lbl': 'ATM'}),
- # ({'first': 'b3lyp', 'second': 'atmgr', 'parent': 'eneyne', 'subject': 'mA', 'lbl': 'ATM'}),
- # ({'first': 'pbe', 'second': 'atm(gr)', 'parent': 'eneyne', 'subject': 'mB', 'lbl': 'ATM'}),
- # ({'first': '', 'second': 'ATMgr', 'parent': 'eneyne', 'subject': 'mAgB', 'lbl': 'ATM'}),
- # below two xfail until dftd3 that's only 2-body is out of psi4 proper
- pytest.param(
- {"first": "atmgr", "second": "atmgr", "parent": "eneyne", "subject": "gAmB", "lbl": "ATM"},
- marks=[using("dftd3_321")],
- ),
- pytest.param(
- {"first": "pbe-atmgr", "second": None, "parent": "ne", "subject": "atom", "lbl": "ATM"},
- marks=[using("dftd3_321")],
- ),
- ],
-)
-def test_molecule__run_dftd3__23body(inp, subjects):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- gexpected = gref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- E, G = subject.run_dftd3(inp["first"], inp["second"])
- assert compare_values(expected, E, atol=1.0e-7)
- assert compare_values(gexpected, G, atol=1.0e-7)
-
-
-@using("qcdb")
-def test_qcdb__energy_d3():
- import qcdb
-
- eneyne = qcdb.set_molecule(seneyne)
- eneyne.update_geometry()
-
- E, jrec = qcdb.energy("d3-b3lyp-d2", return_wfn=True)
- assert compare_values(ref["eneyne"]["B3LYP-D2"]["dimer"], E, "P: Ethene-Ethyne -D2", atol=1.0e-7)
- assert compare_values(
- ref["eneyne"]["B3LYP-D2"]["dimer"], jrec["qcvars"]["DISPERSION CORRECTION ENERGY"].data, tnm(), atol=1.0e-7
- )
- assert compare_values(
- ref["eneyne"]["B3LYP-D2"]["dimer"],
- jrec["qcvars"]["B3LYP-D2 DISPERSION CORRECTION ENERGY"].data,
- tnm(),
- atol=1.0e-7,
- )
-
- mA = eneyne.extract_subsets(1)
-
- E, jrec = qcdb.energy("d3-b3lyp-d3bj", return_wfn=True, molecule=mA)
- assert compare_values(ref["eneyne"]["B3LYP-D3(BJ)"]["mA"], E, tnm(), atol=1.0e-7)
- assert compare_values(
- ref["eneyne"]["B3LYP-D3(BJ)"]["mA"], jrec["qcvars"]["DISPERSION CORRECTION ENERGY"].data, tnm(), atol=1.0e-7
- )
- assert compare_values(
- ref["eneyne"]["B3LYP-D3(BJ)"]["mA"],
- jrec["qcvars"]["B3LYP-D3(BJ) DISPERSION CORRECTION ENERGY"].data,
- tnm(),
- atol=1.0e-7,
- )
-
-
-@using("mp2d")
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- pytest.param(eneyne_ne_qcschemamols),
- ],
- ids=["qmol", "pmol", "qcmol"],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- ({"parent": "eneyne", "name": "mp2d-mp2-dmp2", "subject": "dimer", "lbl": "MP2-DMP2"}),
- ({"parent": "eneyne", "name": "mp2d-mp2-dmp2", "subject": "mA", "lbl": "MP2-DMP2"}),
- ({"parent": "eneyne", "name": "mp2d-mp2-dmp2", "subject": "mB", "lbl": "MP2-DMP2"}),
- ({"parent": "eneyne", "name": "mp2d-mp2-dmp2", "subject": "gAmB", "lbl": "MP2-DMP2"}),
- ({"parent": "eneyne", "name": "mp2d-mp2-dmp2", "subject": "mAgB", "lbl": "MP2-DMP2"}),
- ({"parent": "ne", "name": "mp2d-mp2-dmp2", "subject": "atom", "lbl": "MP2-DMP2"}),
- ],
-)
-def test_mp2d__run_mp2d__2body(inp, subjects, request):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- gexpected = gref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- if "qcmol" in request.node.name:
- mol = subject
- else:
- mol = subject.to_schema(dtype=2)
-
- resinp = {
- "schema_name": "qcschema_input",
- "schema_version": 1,
- "molecule": mol,
- "driver": "gradient",
- "model": {"method": inp["name"]},
- "keywords": {},
- }
- jrec = qcng.compute(resinp, "mp2d", raise_error=True)
- jrec = jrec.dict()
-
- # assert len(jrec['extras']['qcvars']) == 8
-
- assert compare_values(expected, jrec["extras"]["qcvars"]["CURRENT ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"][inp["lbl"] + " DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
-
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["CURRENT GRADIENT"], atol=1.0e-7)
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION GRADIENT"], atol=1.0e-7)
- assert compare_values(
- gexpected, jrec["extras"]["qcvars"][inp["lbl"] + " DISPERSION CORRECTION GRADIENT"], atol=1.0e-7
- )
-
-
-_d3_b3lyp = {"s6": 1.0, "s8": 1.703, "sr6": 1.261, "alpha6": 14.0, "sr8": 1.000}
-_d3_pbe = {"s6": 1.0, "s8": 0.722, "sr6": 1.217, "alpha6": 14.0, "sr8": 1.000}
-_d4_b3lyp = {"s8": 2.02929367, "a1": 0.40868035, "a2": 4.53807137, "s9": 1.0, "s6": 1.0, "alp": 16.0}
-_d4_pbe = {"s8": 0.95948085, "a1": 0.38574991, "a2": 4.80688534, "s9": 1.0, "s6": 1.0, "alp": 16.0}
-_d4_b3lyp_2body = {"s8": 2.02929367, "a1": 0.40868035, "a2": 4.53807137, "s9": 0.0, "s6": 1.0, "alp": 16.0}
-
-
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- pytest.param(eneyne_ne_qcschemamols),
- ],
- ids=["qmol", "pmol", "qcmol"],
-)
-@pytest.mark.parametrize(
- "program, inp",
- # fmt: off
- [
- pytest.param("dftd3", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "d3-b3lyp-d"}, "keywords": {}}, "lbl": "B3LYP-D2"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "eneyne", "subject": "mA", "qcsk": {"model": {"method": "d3-b3lyp-d3bj"}, "keywords": {}}, "lbl": "B3LYP-D3(BJ)"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "eneyne", "subject": "mB", "qcsk": {"model": { "method": "d3-PBE-D3zero"}, "keywords": {}}, "lbl": "PBE-D3"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "eneyne", "subject": "gAmB", "qcsk": { "model": { "method": "d3-PBE-D3zero"}, "keywords": {}}, "lbl": "PBE-D3"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "eneyne", "subject": "mAgB", "qcsk": { "model": { "method": "d3-PBE-D2"}, "keywords": {}}, "lbl": "PBE-D2"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "ne", "subject": "atom", "qcsk": { "model": { "method": "d3-b3lyp-d3bj"}, "keywords": {}}, "lbl": "B3LYP-D3(BJ)"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "d3-SAPT0-D3M(BJ)"}, "keywords": {}}, "lbl": "SAPT0-D3M(BJ)"}, marks=using("dftd3")),
- pytest.param("dftd3", {"parent": "eneyne", "subject": "mA", "qcsk": { "model": { "method": "d3-SAPT0-D3M"}, "keywords": {}}, "lbl": "SAPT0-D3M"}, marks=using("dftd3")),
-
- pytest.param("s-dftd3", {"parent": "eneyne", "subject": "mA", "qcsk": {"model": {"method": "d3-b3lyp-d3bj"}, "keywords": {"apply_qcengine_aliases": True, "level_hint": "d3bj"}}, "lbl": "B3LYP-D3(BJ)"}, marks=using("s-dftd3")),
- pytest.param("s-dftd3", {"parent": "eneyne", "subject": "mB", "qcsk": {"model": { "method": "d3-PBE-D3zero"}, "keywords": {"apply_qcengine_aliases": True, "level_hint": "d3zero"}}, "lbl": "PBE-D3"}, marks=using("s-dftd3")),
- pytest.param("s-dftd3", {"parent": "eneyne", "subject": "gAmB", "qcsk": { "model": { "method": "d3-PBE-D3zero"}, "keywords": {"apply_qcengine_aliases": True, "level_hint": "d3"}}, "lbl": "PBE-D3"}, marks=using("s-dftd3")),
- pytest.param("s-dftd3", {"parent": "ne", "subject": "atom", "qcsk": { "model": { "method": "d3-b3lyp-d3bj"}, "keywords": {"apply_qcengine_aliases": True, "level_hint": "d3bj"}}, "lbl": "B3LYP-D3(BJ)"}, marks=using("s-dftd3")),
- pytest.param("s-dftd3", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "d3-SAPT0-D3M(BJ)"}, "keywords": {"apply_qcengine_aliases": True, "level_hint": "d3mbj"}}, "lbl": "SAPT0-D3M(BJ)"}, marks=using("s-dftd3")),
- pytest.param("s-dftd3", {"parent": "eneyne", "subject": "mA", "qcsk": { "model": { "method": "d3-SAPT0-D3M"}, "keywords": {"apply_qcengine_aliases": True, "level_hint": "d3m"}}, "lbl": "SAPT0-D3M"}, marks=using("s-dftd3")),
-
- pytest.param("dftd4", {"parent": "eneyne", "subject": "dimer", "qcsk": { "model": { "method": "d4-b3lyp-d4"}, "keywords": {}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")),
- pytest.param("dftd4", {"parent": "ne", "subject": "atom", "qcsk": { "model": { "method": "d4-b3lyp-d4"}, "keywords": {}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")),
- pytest.param("dftd4", {"parent": "eneyne", "subject": "mA", "qcsk": { "model": { "method": "d4-b3lyp-d4"}, "keywords": {}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")),
- pytest.param("dftd4", {"parent": "eneyne", "subject": "gAmB", "qcsk": { "model": { "method": "d4-b3lyp-d4"}, "keywords": {}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")),
- pytest.param("dftd4", {"parent": "eneyne", "subject": "mB", "qcsk": { "model": { "method": "d4-PBE-D4"}, "keywords": {}}, "lbl": "PBE-D4(BJ,EEQ)ATM"}, marks=using("dftd4")),
- pytest.param("dftd4", {"parent": "eneyne", "subject": "mAgB", "qcsk": { "model": { "method": "d4-PBE-D4"}, "keywords": {}}, "lbl": "PBE-D4(BJ,EEQ)ATM"}, marks=using("dftd4")),
-
- pytest.param("dftd3", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": ""}, "keywords": {"level_hint": "d3", "params_tweaks": _d3_b3lyp}}, "lbl": "B3LYP-D3"}, marks=using("dftd3")), # params only
- pytest.param("dftd3", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "b3lyp-d3"}, "keywords": {"level_hint": "d3", "params_tweaks": _d3_b3lyp}}, "lbl": "B3LYP-D3"}, marks=using("dftd3")), # method reinforcing params
- pytest.param("dftd3", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "pbe-d3"}, "keywords": {"level_hint": "d3", "params_tweaks": _d3_b3lyp}}, "lbl": "B3LYP-D3"}, marks=using("dftd3")), # method contradicting params (D3: params win)
-
- pytest.param("dftd4", {"parent": "eneyne", "subject": "mAgB", "qcsk": {"model": {"method": ""}, "keywords": {"level_hint": "d4", "params_tweaks": _d4_b3lyp_2body}}, "lbl": "B3LYP-D4(BJ)-2BODY"}, marks=using("dftd4")), # params only
- pytest.param("dftd4", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": ""}, "keywords": {"level_hint": "d4", "params_tweaks": _d4_b3lyp}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")), # params only
- pytest.param("dftd4", {"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "b3lyp-d4"}, "keywords": {"level_hint": "d4", "params_tweaks": _d4_b3lyp}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")), # method reinforcing params
- # LAB Nov 2022 - I think early on the D4 logic pattern was method wins when method and params_tweaks contradicted, and this is what the test below relies upon and the dftd4 from psi4 channel does (test passes).
- # Later, dftd4 clarified logic by calling contradiction an error, so below with dftd4 from c-f channel returns B3LYP values. Disabling test.
- # pytest.param({ "parent": "eneyne", "subject": "dimer", "qcsk": { "model": {"method": "pbe-d4"}, "keywords": {"pair_resolved": True, "level_hint": "d4", "params_tweaks": _d4_b3lyp}}, "lbl": "PBE-D4(BJ,EEQ)ATM"}, marks=using("dftd4")), # method contradicting params (D4: method wins)
- ],
- # fmt: on
-)
-def test_dftd3__run_dftd3__2body(inp, program, subjects, request):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- gexpected = gref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- if "qcmol" in request.node.name:
- mol = subject
- else:
- mol = subject.to_schema(dtype=2)
-
- atin = AtomicInput(
- molecule=mol,
- driver="gradient",
- **inp["qcsk"],
- )
- jrec = qcng.compute(atin, program, raise_error=True)
- jrec = jrec.dict()
- pprint.pprint(jrec)
-
- assert compare_values(expected, jrec["properties"]["return_energy"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["CURRENT ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- if program == "dftd3":
- assert compare_values(expected, jrec["extras"]["qcvars"]["2-BODY DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- if atin.model.method:
- assert compare_values(
- expected, jrec["extras"]["qcvars"][inp["lbl"] + " DISPERSION CORRECTION ENERGY"], atol=1.0e-7
- )
-
- assert compare_values(gexpected, jrec["return_result"], atol=1.0e-7)
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["CURRENT GRADIENT"], atol=1.0e-7)
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION GRADIENT"], atol=1.0e-7)
- if program == "dftd3":
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["2-BODY DISPERSION CORRECTION GRADIENT"], atol=1.0e-7)
- if atin.model.method:
- assert compare_values(
- gexpected, jrec["extras"]["qcvars"][inp["lbl"] + " DISPERSION CORRECTION GRADIENT"], atol=1.0e-7
- )
-
-
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- pytest.param(eneyne_ne_qcschemamols),
- ],
- ids=["qmol", "pmol", "qcmol"],
-)
-@pytest.mark.parametrize(
- "inp",
- # fmt: off
- [
- pytest.param({"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": ""}, "keywords": {"level_hint": "d3", "params_tweaks": _d3_b3lyp}}, "lbl": "PBE-D3"}, marks=using("dftd3")), # wrong ref lbl
- pytest.param({"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "pbe-d3"}, "keywords": {"level_hint": "d3", "params_tweaks": _d3_b3lyp}}, "lbl": "PBE-D3"}, marks=using("dftd3")), # method contradicting params (D3: params win -> fail)
-
- pytest.param({"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": ""}, "keywords": {"level_hint": "d4", "params_tweaks": _d4_b3lyp}}, "lbl": "PBE-D4(BJ,EEQ)ATM"}, marks=using("dftd4")), # wrong ref lbl
- # LAB Nov 2022 - dftd4 from different channels (psi4, c-f) producing contrary behavior. TODO
- # pytest.param({"parent": "eneyne", "subject": "dimer", "qcsk": {"model": {"method": "pbe-d4"}, "keywords": {"level_hint": "d4", "params_tweaks": _d4_b3lyp}}, "lbl": "B3LYP-D4(BJ,EEQ)ATM"}, marks=using("dftd4")), # method contradicting params (D4: method wins -> fail)
- ],
- # fmt: on
-)
-def test_dftd3__run_dftd3__2body_error(inp, subjects, request):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- gexpected = gref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- if "qcmol" in request.node.name:
- mol = subject
- else:
- mol = subject.to_schema(dtype=2)
-
- program = "dftd4" if ("D4(BJ" in inp["lbl"]) else "dftd3"
-
- atin = AtomicInput(
- molecule=mol,
- driver="gradient",
- **inp["qcsk"],
- )
- jrec = qcng.compute(atin, program, raise_error=True)
- jrec = jrec.dict()
-
- with pytest.raises(AssertionError) as exc:
- assert compare_values(expected, jrec["properties"]["return_energy"], atol=1.0e-7)
-
-
-@using("dftd3_321")
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- pytest.param(eneyne_ne_qcschemamols),
- ],
- ids=["qmol", "pmol", "qcmol"],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- ({"parent": "eneyne", "name": "d3-atmgr", "subject": "dimer", "lbl": "ATM"}),
- ({"parent": "eneyne", "name": "d3-b3lyp-atmgr", "subject": "mA", "lbl": "ATM"}),
- ({"parent": "eneyne", "name": "d3-pbe-atm(gr)", "subject": "mB", "lbl": "ATM"}),
- ({"parent": "eneyne", "name": "d3-ATMgr", "subject": "mAgB", "lbl": "ATM"}),
- ({"parent": "eneyne", "name": "d3-atmgr", "subject": "gAmB", "lbl": "ATM"}),
- ({"parent": "ne", "name": "d3-atmgr", "subject": "atom", "lbl": "ATM"}),
- ],
-)
-def test_dftd3__run_dftd3__3body(inp, subjects, request):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- gexpected = gref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- if "qcmol" in request.node.name:
- mol = subject
- else:
- mol = subject.to_schema(dtype=2)
-
- resinp = {
- "schema_name": "qcschema_input",
- "schema_version": 1,
- "molecule": mol,
- "driver": "gradient",
- "model": {"method": inp["name"]},
- "keywords": {},
- }
- jrec = qcng.compute(resinp, "dftd3", raise_error=True)
- jrec = jrec.dict()
-
- assert len(jrec["extras"]["qcvars"]) == 8
-
- assert compare_values(expected, jrec["extras"]["qcvars"]["CURRENT ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["3-BODY DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- assert compare_values(
- expected, jrec["extras"]["qcvars"]["AXILROD-TELLER-MUTO 3-BODY DISPERSION CORRECTION ENERGY"], atol=1.0e-7
- )
-
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["CURRENT GRADIENT"], atol=1.0e-7)
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION GRADIENT"], atol=1.0e-7)
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["3-BODY DISPERSION CORRECTION GRADIENT"], atol=1.0e-7)
- assert compare_values(
- gexpected, jrec["extras"]["qcvars"]["AXILROD-TELLER-MUTO 3-BODY DISPERSION CORRECTION GRADIENT"], atol=1.0e-7
- )
-
-
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- pytest.param(eneyne_ne_qcschemamols),
- ],
- ids=["qmol", "pmol", "qcmol"],
-)
-@pytest.mark.parametrize(
- "inp, extrakw, program",
- [
- pytest.param({"parent": "eneyne", "subject": "dimer", "lbl": "SAPT0-D3M"}, {}, "dftd3", marks=using("dftd3")),
- pytest.param(
- {"parent": "eneyne", "subject": "dimer", "lbl": "SAPT0-D3M"},
- {"apply_qcengine_aliases": True, "level_hint": "d3m"},
- "s-dftd3",
- marks=using("s-dftd3"),
- ),
- pytest.param(
- {"parent": "eneyne", "subject": "dimer", "lbl": "PBE-D4(BJ,EEQ)ATM"}, {}, "dftd4", marks=using("dftd4")
- ),
- ],
-)
-def test_sapt_pairwise(inp, program, extrakw, subjects, request):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- expected_pairwise = pref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- if "qcmol" in request.node.name:
- mol = subject
- else:
- mol = subject.to_schema(dtype=2)
-
- atin = AtomicInput(
- molecule=mol,
- driver="energy",
- model={"method": inp["lbl"]},
- keywords={
- "pair_resolved": True,
- **extrakw,
- },
- )
- jrec = qcng.compute(atin, program, raise_error=True)
- jrec = jrec.dict()
-
- assert compare_values(expected, jrec["extras"]["qcvars"]["CURRENT ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- # assert compare_values(expected, jrec["extras"]["qcvars"]["2-BODY DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"][inp["lbl"] + " DISPERSION CORRECTION ENERGY"], atol=1.0e-7)
- assert compare_values(
- expected_pairwise, jrec["extras"]["qcvars"]["2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS"], atol=1.0e-7
- )
-
-
-@pytest.mark.parametrize(
- "program",
- [
- pytest.param("gcp", marks=using("gcp")),
- pytest.param("mctc-gcp", marks=using("mctc-gcp")),
- ],
-)
-@pytest.mark.parametrize(
- "subjects",
- [
- pytest.param(eneyne_ne_psi4mols, marks=using("psi4")),
- pytest.param(
- eneyne_ne_qcdbmols, marks=using("psi4")
- ), # needs qcdb.Molecule, presently more common in psi4 than in qcdb
- pytest.param(eneyne_ne_qcschemamols),
- ],
- ids=["qmol", "pmol", "qcmol"],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- ({"parent": "eneyne", "name": "hf/sv", "subject": "dimer", "lbl": "GCP"}),
- ({"parent": "eneyne", "name": "hf3c", "subject": "mA", "lbl": "GCP"}),
- ({"parent": "eneyne", "name": "dft/def2-tzvp", "subject": "mB", "lbl": "GCP"}),
- ({"parent": "eneyne", "name": "dft/def2-SV(P)", "subject": "gAmB", "lbl": "GCP"}),
- ({"parent": "eneyne", "name": "pbeh3c", "subject": "mAgB", "lbl": "GCP"}),
- ({"parent": "ne", "name": "hf/minis", "subject": "atom", "lbl": "GCP"}),
- ],
-)
-def test_gcp(inp, subjects, program, request):
- subject = subjects()[inp["parent"]][inp["subject"]]
- expected = ref[inp["parent"]][inp["lbl"]][inp["subject"]]
- gexpected = gref[inp["parent"]][inp["lbl"]][inp["subject"]]
-
- if "qcmol" in request.node.name:
- mol = subject
- else:
- mol = subject.to_schema(dtype=2)
-
- resinp = {
- "schema_name": "qcschema_input",
- "schema_version": 1,
- "molecule": mol,
- "driver": "gradient",
- "model": {"method": inp["name"]},
- "keywords": {},
- }
- jrec = qcng.compute(resinp, program, raise_error=True)
- jrec = jrec.dict()
-
- # assert len(jrec["extras"]["qcvars"]) == 8
- print(jrec["extras"]["qcvars"])
-
- assert compare_values(expected, jrec["extras"]["qcvars"]["CURRENT ENERGY"], atol=1.0e-7)
- assert compare_values(expected, jrec["extras"]["qcvars"]["GCP CORRECTION ENERGY"], atol=1.0e-7)
- assert compare_values(
- expected, jrec["extras"]["qcvars"][inp["name"].upper() + " GCP CORRECTION ENERGY"], atol=1.0e-7
- )
-
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["CURRENT GRADIENT"], atol=1.0e-7)
- assert compare_values(gexpected, jrec["extras"]["qcvars"]["GCP CORRECTION GRADIENT"], atol=1.0e-7)
- assert compare_values(
- gexpected, jrec["extras"]["qcvars"][inp["name"].upper() + " GCP CORRECTION GRADIENT"], atol=1.0e-7
- )
diff --git a/qcengine/programs/tests/test_dftd4.py b/qcengine/programs/tests/test_dftd4.py
deleted file mode 100644
index e3ac1f523..000000000
--- a/qcengine/programs/tests/test_dftd4.py
+++ /dev/null
@@ -1,168 +0,0 @@
-"""
-Testing for the DFT-D4 program harness.
-
-Most of the tests use mindless molecules for the diversity of element species
-to test as much different interactions as possible.
-"""
-
-import numpy as np
-import pytest
-import qcelemental as qcel
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@using("dftd4")
-def test_dftd4_task_b97m_m01():
-
- thr = 1.0e-8
-
- return_result = -0.025024986301735823
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-01"),
- model={"method": "b97m"},
- driver="energy",
- )
-
- atomic_result = qcng.compute(atomic_input, "dftd4")
-
- print(atomic_result.return_result)
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("dftd4")
-def test_dftd4_task_tpss_m02():
-
- thr = 2.0e-8
-
- return_result = np.array(
- [
- [-1.1006300442501966e-04, -1.9882677409412426e-04, +9.7969330873203453e-05],
- [-9.0564826517969396e-04, -1.1221656220960802e-04, +7.4420608164684399e-04],
- [-8.7360785425552928e-05, +2.8146769568946061e-04, +5.8528720048366145e-04],
- [-1.7602264871464991e-04, -3.0981396137083546e-04, -1.1315671174001885e-03],
- [+6.2854950429890028e-05, +3.1662886959557454e-04, +1.8192682295895164e-04],
- [-1.2033574062747143e-04, -5.8117271931259600e-05, -2.4103707001727414e-04],
- [-9.6727467530178130e-05, -1.2937750080676020e-04, -3.0565838265275271e-05],
- [-1.2139762550383215e-05, +2.2334694600929773e-05, +6.7681766980205114e-05],
- [+2.9131236664176958e-04, -2.3159856865643386e-04, +3.9334087528658355e-04],
- [-8.9512907514913525e-05, +9.3857773376367446e-06, -2.6351331811570630e-04],
- [+3.9621947274011518e-04, -5.8926113817768316e-04, +1.8422719633870202e-04],
- [-1.6466329096860149e-04, +1.3720763821983788e-04, -8.3839852301748649e-05],
- [-3.2173735474065368e-04, +7.2068238657310593e-04, -3.1811972689724591e-04],
- [+2.1298820577529375e-04, -9.6810383911168402e-05, +1.0273702281858908e-04],
- [-4.4599095547508355e-04, -1.8320769460464104e-04, +1.8653129262487302e-04],
- [+1.5668271875651332e-03, +4.2152279374596904e-04, -4.7526466701417510e-04],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-02"),
- model={"method": ""},
- keywords={
- "params_tweaks": {
- "s8": 1.76596355,
- "a1": 0.42822303,
- "a2": 4.54257102,
- },
- },
- driver="gradient",
- )
-
- atomic_result = qcng.compute(atomic_input, "dftd4")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("dftd4")
-def test_dftd4_task_r2scan_m03():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [-1.0184389290110640e-05, -1.2902131714706869e-05, -4.7991389860088184e-05],
- [+3.9008038585852290e-05, -8.6543337237836941e-05, +1.0086268708372256e-04],
- [-2.1792111331028049e-05, +2.8414264003578678e-05, +1.8916279332120321e-05],
- [-3.8847190487495055e-06, +6.4069296782535270e-06, -1.7362611928711208e-05],
- [-1.5358378150451566e-05, -5.7611513737809471e-06, -1.9871764856476196e-05],
- [-3.7225957329162548e-05, -1.5687552833166010e-06, -3.4717349142275990e-05],
- [+3.2408291983641028e-07, -6.7683941908276048e-05, -6.1602680430568183e-05],
- [-8.1819149671629329e-06, -9.5470867672313039e-06, -1.7007294079721094e-05],
- [-1.7245516321582448e-05, +1.6416848978506148e-05, +1.6005589814916458e-05],
- [-3.0116095523698349e-06, +7.3382310356380993e-07, -1.3652036487357768e-05],
- [+1.0378663330288130e-04, +4.4180555120489236e-05, +3.2576724474326750e-05],
- [-2.8021453980080289e-05, +3.9008636389849655e-05, -1.2083469461741150e-04],
- [-3.0452136766248191e-05, +7.0712047105794630e-05, +8.3682948356528971e-05],
- [+1.6902554427499383e-06, -2.9147110970219634e-05, +3.6402009185785855e-05],
- [+4.6966237842630462e-05, -1.2554523547742754e-05, +3.0600183501647347e-05],
- [-1.6417061357004406e-05, +1.9834934423075429e-05, +1.3993399653561848e-05],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-03"),
- keywords={"level_hint": "D4"},
- driver="gradient",
- model={"method": "r2scan"},
- )
-
- atomic_result = qcng.compute(atomic_input, "dftd4")
-
- print(atomic_result.return_result)
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("dftd4")
-def test_dftd4_task_unknown_method():
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("water"),
- keywords={"level_hint": "D4"},
- model={"method": "non-existent-method"},
- driver="energy",
- )
- error = qcel.models.ComputeError(
- error_type="input error", error_message="Functional 'non-existent-method' not known"
- )
-
- atomic_result = qcng.compute(atomic_input, "dftd4")
-
- print(atomic_result.error)
- assert not atomic_result.success
- assert atomic_result.error == error
-
-
-@using("dftd4")
-def test_dftd4_task_cold_fusion():
-
- atomic_input = qcel.models.AtomicInput(
- molecule={
- "symbols": ["Li", "Li", "Li", "Li"],
- "geometry": [
- [-1.58746019997201, +1.58746019997201, +1.58746019997201],
- [-1.58746019997201, +1.58746019997201, +1.58746019997201],
- [-1.58746019997201, -1.58746019997201, -1.58746019997201],
- [+1.58746019997201, +1.58746019997201, -1.58746019997201],
- ],
- "validated": True, # Force a nuclear fusion input, to make dftd4 fail
- },
- keywords={"level_hint": "D4"},
- model={"method": "pbe"},
- driver="energy",
- )
- error = qcel.models.ComputeError(
- error_type="input error",
- error_message="Too close interatomic distances found",
- )
-
- atomic_result = qcng.compute(atomic_input, "dftd4")
-
- print(atomic_result.error)
- assert not atomic_result.success
- assert atomic_result.error == error
diff --git a/qcengine/programs/tests/test_ghost.py b/qcengine/programs/tests/test_ghost.py
deleted file mode 100644
index a90452a0f..000000000
--- a/qcengine/programs/tests/test_ghost.py
+++ /dev/null
@@ -1,314 +0,0 @@
-import pprint
-import re
-
-import pytest
-import numpy as np
-import qcelemental as qcel
-from qcelemental.testing import compare, compare_values
-
-import qcengine as qcng
-from qcengine.programs.tests.test_dftd3_mp2d import eneyne_ne_qcschemamols
-from qcengine.testing import using
-
-
-@pytest.fixture
-def hene():
- smol = """
- 0 1
- He 0 0 0
- @Ne 2.5 0 0
- nocom
- noreorient
-"""
- return qcel.models.Molecule.from_data(smol)
-
-
-@pytest.mark.parametrize("driver", ["energy", "gradient"])
-@pytest.mark.parametrize(
- "program,basis,keywords",
- [
- pytest.param("cfour", "aug-pvdz", {}, marks=using("cfour")),
- pytest.param("gamess", "ccd", {"contrl__ispher": 1}, marks=using("gamess")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True, "scf__thresh": 1.0e-6}, marks=using("nwchem")),
- pytest.param(
- "nwchem",
- "aug-cc-pvdz",
- {"basis__spherical": True, "scf__thresh": 1.0e-6, "qc_module": "tce"},
- marks=using("nwchem"),
- ),
- pytest.param("psi4", "aug-cc-pvdz", {"scf_type": "direct"}, marks=using("psi4")),
- ],
-)
-def test_simple_ghost(driver, program, basis, keywords, hene):
- resi = {"molecule": hene, "driver": driver, "model": {"method": "hf", "basis": basis}, "keywords": keywords}
-
- if program == "gamess":
- with pytest.raises(qcng.exceptions.InputError) as e:
- qcng.compute(resi, program, raise_error=True, return_dict=True)
- pytest.xfail("no ghosts with gamess")
-
- res = qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert res["driver"] == driver
- assert "provenance" in res
- assert res["success"] is True
-
- pprint.pprint(res, width=200)
-
- atol = 1.0e-6
- assert compare_values(0.0, res["properties"]["nuclear_repulsion_energy"], atol=atol, label="nre")
- assert compare(32, res["properties"]["calcinfo_nbasis"], label="nbas")
- assert compare(32, res["properties"]["calcinfo_nmo"], label="nmo")
-
- ene = -2.8557143339397539
- grad = np.array(
- [
- 0.000004317771,
- 0.000000000000,
- 0.000000000000,
- -0.000004317771,
- 0.000000000000,
- 0.000000000000,
- ]
- )
- retres = {"energy": ene, "gradient": grad}[driver]
- assert compare_values(ene, res["properties"]["return_energy"], atol=atol, label="ene")
- assert compare_values(retres, res["return_result"], atol=atol, label="return")
-
-
-bimol_ref = {}
-dmm = ["dimer", "mA", "mB", "mAgB", "gAmB"]
-bimol_ref["eneyne"] = {}
-bimol_ref["eneyne"]["natom"] = dict(zip(dmm, [10, 6, 4, 10, 10]))
-bimol_ref["eneyne"]["nreal"] = dict(zip(dmm, [10, 6, 4, 6, 4]))
-bimol_ref["eneyne"]["nre"] = dict(zip(dmm, [85.1890645313, 33.3580722134, 24.6979461998, 33.3580722134, 24.6979461998]))
-bimol_ref["eneyne"]["pg"] = dict(zip(dmm, ["C2v", ["D2h", "C2v"], ["D4h", "C4v", "C2v"], "C2v", "C2v"]))
-# 6-31G*
-bimol_ref["eneyne"]["nbasis"] = dict(zip(dmm, [72, 38, 34, 72, 72]))
-bimol_ref["eneyne"]["nmo"] = dict(zip(dmm, [72, 38, 34, 72, 72]))
-bimol_ref["eneyne"]["mp2"] = dict(
- zip(dmm, [-155.3738614073, -78.2942587466, -77.0760547257, -78.2957592762, -77.0762583352])
-)
-# fmt: off
-bimol_ref["eneyne"]["mp2_gradient"] = dict(zip(dmm, [
- np.array([
- 0.000000000000, -0.000593266109, -0.000461056876,
- -0.000000000000, 0.000593266109, -0.000461056876,
- -0.001061612039, 0.001517372852, 0.000162497702,
- 0.001061612039, 0.001517372852, 0.000162497702,
- 0.001061612039, -0.001517372852, 0.000162497702,
- -0.001061612039, -0.001517372852, 0.000162497702,
- 0.000000000000, 0.000000000000, -0.017632146748,
- 0.000000000000, 0.000000000000, 0.018013978833,
- -0.000000000000, 0.000000000000, 0.001709075893,
- 0.000000000000, 0.000000000000, -0.001818785037]).reshape(-1, 3),
- np.array([
- 0.000000000000, -0.002441448034, 0.000180001772,
- -0.000000000000, 0.002441448034, 0.000180001772,
- -0.000901391196, 0.001441168636, -0.000090000886,
- 0.000901391196, 0.001441168636, -0.000090000886,
- 0.000901391196, -0.001441168636, -0.000090000886,
- -0.000901391196, -0.001441168636, -0.000090000886]).reshape(-1, 3),
- np.array([
- 0.000000000000, 0.000000000000, -0.016477969697,
- 0.000000000000, 0.000000000000, 0.018475631244,
- 0.000000000000, 0.000000000000, -0.000114435361,
- 0.000000000000, 0.000000000000, -0.001883226187]).reshape(-1, 3),
- np.array([
- 0.000000000000, -0.001485687659, -0.000311350386,
- -0.000000000000, 0.001485687659, -0.000311350386,
- -0.000964480529, 0.001442449761, -0.000001369355,
- 0.000964480529, 0.001442449761, -0.000001369355,
- 0.000964480529, -0.001442449761, -0.000001369355,
- -0.000964480529, -0.001442449761, -0.000001369355,
- -0.000000000000, 0.000000000000, 0.000120621150,
- -0.000000000000, 0.000000000000, 0.000279898955,
- 0.000000000000, 0.000000000000, 0.000207604252,
- -0.000000000000, 0.000000000000, 0.000020053834]).reshape(-1, 3),
- np.array([
- 0.000000000000, -0.000012504382, -0.000103233192,
- -0.000000000000, 0.000012504382, -0.000103233192,
- -0.000000589727, -0.000001580375, -0.000009047576,
- 0.000000589727, -0.000001580375, -0.000009047576,
- 0.000000589727, 0.000001580375, -0.000009047576,
- -0.000000589727, 0.000001580375, -0.000009047576,
- 0.000000000000, 0.000000000000, -0.016334419378,
- -0.000000000000, 0.000000000000, 0.018457229773,
- -0.000000000000, 0.000000000000, 0.000025489498,
- 0.000000000000, 0.000000000000, -0.001905643204]).reshape(-1, 3),
-]))
-# fmt: on
-
-
-@pytest.mark.parametrize("driver", ["energy", "gradient"])
-@pytest.mark.parametrize("subject", dmm)
-@pytest.mark.parametrize(
- "qcprog, basis, keywords",
- [
- pytest.param("cfour", "6-31g*", {"spherical": 0, "scf_conv": 12}, id="cfour", marks=using("cfour")),
- pytest.param(
- "gamess",
- "n31",
- {"basis__ngauss": 6, "basis__ndfunc": 1, "mp2__nacore": 0},
- id="gamess",
- marks=using("gamess"),
- ),
- pytest.param("nwchem", "6-31g*", {"scf__thresh": 1.0e-8}, id="nwchem", marks=using("nwchem")),
- pytest.param(
- "psi4",
- "6-31g*",
- {
- "scf_type": "pk",
- "mp2_type": "conv",
- },
- id="psi4",
- marks=using("psi4"),
- ),
- ],
-)
-def test_tricky_ghost(driver, qcprog, subject, basis, keywords):
- dmol = eneyne_ne_qcschemamols()["eneyne"][subject]
- # Freeze the input orientation so that output arrays are aligned to input
- # and all programs match gradient.
- dmol["fix_com"] = True
- dmol["fix_orientation"] = True
- if qcprog == "nwchem" and subject in ["mA", "mB"]:
- # NWChem symmetry detection uses a loose tolerance (0.01) that catches
- # the monomers and symmetrizes them, belying the atoms_map=True arg
- # to the in_mol vs. calc_mol aligner. Gradients don't change much
- # w/symm geometry but enough that the symmetrizer must be defeated.
- keywords["geometry__autosym"] = "1d-4"
- kmol = qcel.models.Molecule(**dmol)
- ref = bimol_ref["eneyne"]
-
- assert len(kmol.symbols) == ref["natom"][subject]
- assert sum([int(at) for at in kmol.real]) == ref["nreal"][subject]
-
- atin = qcel.models.AtomicInput(
- **{"molecule": kmol, "model": {"method": "mp2", "basis": basis}, "driver": driver, "keywords": keywords}
- )
-
- if qcprog == "gamess" and subject in ["mAgB", "gAmB"]:
- with pytest.raises(qcng.exceptions.InputError) as e:
- res = qcng.compute(atin, qcprog, raise_error=True)
- pytest.xfail("no ghosts with gamess")
-
- atres = qcng.compute(atin, qcprog)
- pprint.pprint(atres.dict(), width=200)
-
- assert compare_values(
- ref["nre"][subject], atres.properties.nuclear_repulsion_energy, atol=1.0e-4, label="nre"
- ), f'nre: {atres.properties.nuclear_repulsion_energy} != {ref["nre"][subject]}'
- assert compare(
- ref["nbasis"][subject], atres.properties.calcinfo_nbasis, label="nbasis"
- ), f'nbasis: {atres.properties.calcinfo_nbasis} != {ref["nbasis"][subject]}'
- assert compare(
- ref["nmo"][subject], atres.properties.calcinfo_nmo, label="nmo"
- ), f'nmo: {atres.properties.calcinfo_nmo} != {ref["nmo"][subject]}'
- assert compare_values(
- ref["mp2"][subject], atres.properties.return_energy, atol=3.0e-6, label="ene"
- ), f'ene: {atres.properties.return_energy} != {ref["mp2"][subject]}'
- retres = {"energy": ref["mp2"][subject], "gradient": ref["mp2_gradient"][subject]}[driver]
- assert compare_values(
- retres, atres.return_result, atol=3.0e-6, label="return"
- ), f"return: {atres.return_result} != {retres}"
-
- pgline = {
- "cfour": r"Computational point group: (?P\w+)",
- "gamess": r"THE POINT GROUP IS (?P[\w\s,=]+)",
- "nwchem": r"Group name\s+(?P\w+)",
- "psi4": r"Running in (?P\w+) symmetry.",
- }
- mobj = re.search(pgline[qcprog], atres.stdout)
- if mobj:
- pg = mobj.group("pg").strip()
- if pg == "CNV, NAXIS= 2, ORDER= 4":
- pg = "C2v"
- elif pg == "C1 , NAXIS= 0, ORDER= 1":
- pg = "C1"
- pg = pg.capitalize()
-
- if qcprog == "gamess": # and subject in ["mAgB", "gAmB"]:
- # don't know how to get master frame w/ghosts in gamess, so C1 forced
- assert pg == "C1", f"pg: {pg} != C1"
- else:
- assert pg in ref["pg"][subject], f'pg: {pg} != {ref["pg"][subject]}'
-
-
-@pytest.mark.parametrize(
- "qcprog, basis, keywords",
- [
- pytest.param("cfour", "aug-pvdz", {"scf_conv": 12}, id="cfour", marks=using("cfour")),
- pytest.param(
- "gamess",
- "accd",
- {"mp2__nacore": 0, "contrl__ispher": 1},
- id="gamess",
- marks=using("gamess"),
- ),
- pytest.param(
- "nwchem", "aug-cc-pvdz", {"scf__nr": 1.0, "scf__thresh": 1.0e-8}, id="nwchem", marks=using("nwchem")
- ),
- pytest.param(
- "psi4",
- "aug-cc-pvdz",
- {
- "scf_type": "pk",
- "mp2_type": "conv",
- },
- id="psi4",
- marks=using("psi4"),
- ),
- ],
-)
-def test_atom_labels(qcprog, basis, keywords):
- kmol = qcel.models.Molecule.from_data(
- """
- H 0 0 0
- H5 5 0 0
- H_other 0 5 0
- H_4sq 5 5 0
- units au
- """
- )
-
- assert compare(["H", "H", "H", "H"], kmol.symbols, "elem")
- assert compare(["", "5", "_other", "_4sq"], kmol.atom_labels, "elbl")
-
- atin = qcel.models.AtomicInput(
- **{"molecule": kmol, "model": {"method": "mp2", "basis": basis}, "driver": "energy", "keywords": keywords}
- )
-
- atres = qcng.compute(atin, qcprog)
- pprint.pprint(atres.dict(), width=200)
-
- nre = 1.0828427
- assert compare_values(
- nre, atres.properties.nuclear_repulsion_energy, atol=1.0e-4, label="nre"
- ), f"nre: {atres.properties.nuclear_repulsion_energy} != {nre}"
-
- nmo = 36
- assert compare(nmo, atres.properties.calcinfo_nmo, label="nmo"), f"nmo: {atres.properties.calcinfo_nmo} != {nmo}"
-
- scf = -1.656138508
- scf_alt = -1.705577613 # some versions of NWChem land on this value
- mp2 = -1.7926264513
- mp2_alt = -1.870251459939
- try:
- assert compare_values(
- scf, atres.properties.scf_total_energy, atol=3.0e-6, label="scf ene"
- ), f"scf ene: {atres.properties.scf_total_energy} != {scf}"
- except AssertionError as exc:
- if qcprog == "nwchem":
- assert compare_values(
- scf_alt, atres.properties.scf_total_energy, atol=3.0e-6, label="scf ene"
- ), f"scf ene: {atres.properties.scf_total_energy} != {scf_alt}"
- assert compare_values(
- mp2_alt, atres.return_result, atol=3.0e-6, label="ene"
- ), f"ene: {atres.return_result} != {mp2_alt}"
- else:
- raise AssertionError from exc
- else:
- assert compare_values(
- mp2, atres.return_result, atol=3.0e-6, label="ene"
- ), f"ene: {atres.return_result} != {mp2}"
diff --git a/qcengine/programs/tests/test_molpro.py b/qcengine/programs/tests/test_molpro.py
deleted file mode 100644
index 52b9e73da..000000000
--- a/qcengine/programs/tests/test_molpro.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_recursive
-
-import qcengine as qcng
-from qcengine.testing import qcengine_records, using
-
-molpro_info = qcengine_records("molpro")
-
-
-@pytest.mark.parametrize("test_case", molpro_info.list_test_cases())
-def test_molpro_output_parser(test_case):
-
- # Get output file data
- data = molpro_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- output = qcng.get_program("molpro", check=False).parse_output(data, inp).dict()
- output.pop("provenance", None)
-
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"]).dict()
- output_ref.pop("provenance", None)
-
- # TODO add `skip` to compare_recursive
- check = compare_recursive(output_ref, output, forgive={"stdout"})
- assert check, check
-
-
-@pytest.mark.parametrize("test_case", molpro_info.list_test_cases())
-def test_molpro_input_formatter(test_case):
-
- # Get input file data
- data = molpro_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # TODO add actual comparison of generated input file
- input_file = qcng.get_program("molpro", check=False).build_input(inp, qcng.get_config())
- assert input_file.keys() >= {"commands", "infiles"}
-
-
-@using("molpro")
-@pytest.mark.parametrize("test_case", molpro_info.list_test_cases())
-def test_molpro_executor(test_case):
- # Get input file data
- data = molpro_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # Run Molpro
- result = qcng.compute(inp, "molpro", local_options={"ncores": 4})
- assert result.success is True
-
- # Get output file data
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"])
-
- atol = 1e-6
- assert compare_recursive(output_ref.return_result, result.return_result, atol=atol)
diff --git a/qcengine/programs/tests/test_mrchem.py b/qcengine/programs/tests/test_mrchem.py
deleted file mode 100644
index 8158b4af3..000000000
--- a/qcengine/programs/tests/test_mrchem.py
+++ /dev/null
@@ -1,139 +0,0 @@
-"""Tests for MRChem functionality"""
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@pytest.fixture
-def h2o():
- return qcel.models.Molecule(
- geometry=[[0, 0, -0.1250], [-1.4375, 0, 1.0250], [1.4375, 0, 1.0250]],
- symbols=["O", "H", "H"],
- connectivity=[[0, 1, 1], [0, 2, 1]],
- )
-
-
-@pytest.fixture
-def fh():
- return qcel.models.Molecule(
- geometry=[[0.000000000000, 0.000000000000, -1.642850273986], [0.000000000000, 0.000000000000, 0.087149726014]],
- symbols=["H", "F"],
- fix_com=True,
- fix_orientation=True,
- fix_symmetry="c1",
- )
-
-
-@using("mrchem")
-def test_energy(h2o):
- mr_kws = {
- "world_prec": 1.0e-3,
- "world_size": 6,
- "world_unit": "bohr",
- }
-
- inp = qcel.models.AtomicInput(
- molecule=h2o,
- driver="energy",
- model={
- "method": "BLYP",
- },
- keywords=mr_kws,
- )
-
- res = qcng.compute(inp, "mrchem", raise_error=True, return_dict=True)
-
- # Make sure the calculation completed successfully
- assert compare_values(-76.4546307, res["return_result"], atol=1e-3)
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # Make sure the properties parsed correctly
- assert compare_values(-76.4546307, res["properties"]["return_energy"], atol=1e-3)
- assert res["properties"]["calcinfo_natom"] == 3
- assert res["properties"]["calcinfo_nalpha"] == 5
- assert res["properties"]["calcinfo_nbeta"] == 5
- assert res["properties"]["calcinfo_nmo"] == 10
- assert compare_values([-3.766420e-07, 0.0, 0.720473], res["properties"]["scf_dipole_moment"], atol=1e-3)
-
-
-@using("mrchem")
-def test_dipole(h2o):
- mr_kws = {
- "world_prec": 1.0e-3,
- "world_size": 6,
- "world_unit": "bohr",
- }
-
- inp = qcel.models.AtomicInput(
- molecule=h2o,
- driver="properties",
- model={
- "method": "BLYP",
- },
- keywords=mr_kws,
- )
-
- res = qcng.compute(inp, "mrchem", raise_error=True, return_dict=True)
-
- # Make sure the calculation completed successfully
- assert compare_values([-3.766420e-07, 0.0, 0.720473], res["return_result"]["dipole_moment"]["dip-1"], atol=1e-3)
- assert res["driver"] == "properties"
- assert "provenance" in res
- assert res["success"] is True
-
- # Make sure the properties parsed correctly
- assert compare_values(-76.4546307, res["properties"]["return_energy"], atol=1e-3)
- assert res["properties"]["calcinfo_natom"] == 3
- assert res["properties"]["calcinfo_nalpha"] == 5
- assert res["properties"]["calcinfo_nbeta"] == 5
- assert res["properties"]["calcinfo_nmo"] == 10
- assert compare_values([-3.766420e-07, 0.0, 0.720473], res["properties"]["scf_dipole_moment"], atol=1e-3)
-
-
-@using("mrchem")
-def test_gradient(fh):
- mr_kws = {
- "world_prec": 1.0e-3,
- "world_size": 6,
- }
-
- inp = qcel.models.AtomicInput(
- molecule=fh,
- driver="gradient",
- model={
- "method": "BLYP",
- },
- keywords=mr_kws,
- )
-
- res = qcng.compute(inp, "mrchem", raise_error=True, return_dict=True)
-
- # Make sure the calculation completed successfully
- assert compare_values(
- [
- 7.7720991261973e-05,
- 0.0003374698961269812,
- 0.01670678976631068,
- -9.482132557890285e-05,
- -0.00042524484271181696,
- -0.06177621634278285,
- ],
- res["return_result"],
- atol=1e-3,
- )
- assert res["driver"] == "gradient"
- assert "provenance" in res
- assert res["success"] is True
-
- # Make sure the properties parsed correctly
- assert compare_values(-100.48858973847459, res["properties"]["return_energy"], atol=1e-3)
- assert res["properties"]["calcinfo_natom"] == 2
- assert res["properties"]["calcinfo_nalpha"] == 5
- assert res["properties"]["calcinfo_nbeta"] == 5
- assert res["properties"]["calcinfo_nmo"] == 10
diff --git a/qcengine/programs/tests/test_nwchem.py b/qcengine/programs/tests/test_nwchem.py
deleted file mode 100644
index fceb21d68..000000000
--- a/qcengine/programs/tests/test_nwchem.py
+++ /dev/null
@@ -1,371 +0,0 @@
-"""Tests for NWChem functionality"""
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-# Molecule where autoz fails
-_auto_z_problem = xyz = """C 15.204188380000 -3.519180270000 -10.798726560000
-C 15.097645630000 -2.650246400000 -8.505033680000
-C 14.976892130000 -1.867030510000 -6.378827230000
-C 14.827093540000 -1.105281910000 -4.239222620000
-C 14.635399720000 -0.362921900000 -2.101035300000
-N 14.357893440000 0.315376390000 -0.000359050000
-C 16.031227020000 2.397930170000 0.801905280000
-C 15.337300690000 2.925144860000 3.538890120000
-C 14.742074760000 3.377413020000 5.886685850000
-C 14.048167320000 3.904627710000 8.623670690000
-N 12.688887320000 2.073331920000 9.820037400000
-C 14.474640720000 6.115210430000 9.591909660000
-C 14.946826580000 8.308766730000 10.603064320000
-C 17.506555110000 9.181593430000 10.935939570000
-C 18.224273090000 10.758664370000 12.778309160000
-O 20.684526430000 11.555996510000 13.018002020000
-C 20.952489590000 13.130270650000 14.964495520000
-C 21.186059740000 14.590046290000 16.687812370000
-C 21.422747940000 16.379824800000 18.663483240000
-C 22.929993500000 15.902177630000 20.539319870000
-C 24.426014080000 15.474645990000 22.431805000000
-N 24.775991360000 13.082933010000 23.323528960000
-O 18.709082330000 1.890803270000 0.670399240000
-O 20.008439110000 4.184817400000 1.512272230000
-H 16.847872170000 -3.183338140000 -11.974003930000
-H 13.649907540000 -4.604695650000 -11.575422900000
-H 15.665451630000 4.107792170000 -0.318135390000
-H 13.044004660000 0.318248780000 9.124920540000
-H 12.835662350000 2.164511200000 11.730569410000
-H 13.401843200000 9.476598570000 11.281381510000
-H 18.900965120000 8.515559460000 9.580741380000
-H 16.945759980000 11.469295880000 14.211420760000
-H 20.389540180000 18.145263640000 18.570527610000
-H 25.288598470000 16.991453560000 23.511896860000
-H 24.436823320000 11.711936710000 22.016121940000
-H 26.442597520000 12.834282850000 24.246149950000
-H 20.850425490000 3.414376060000 2.960577230000"""
-
-
-@pytest.fixture
-def nh2():
- smol = """
- # R=1.008 #A=105.0
- 0 2
- N 0.000000000000000 0.000000000000000 -0.145912918634892
- H 0.000000000000000 -1.511214298139000 1.013682596946108
- H 0.000000000000000 1.511214298139000 1.013682596946108
- units au
- symmetry c1
-"""
- return qcel.models.Molecule.from_data(smol)
-
-
-@using("nwchem")
-def test_b3lyp(nh2):
- # Run NH2
- resi = {"molecule": nh2, "driver": "energy", "model": {"method": "b3lyp", "basis": "3-21g"}}
- res = qcng.compute(resi, "nwchem", raise_error=True, return_dict=True)
-
- # Make sure the calculation completed successfully
- assert compare_values(-55.554037, res["return_result"], atol=1e-3)
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # Check the other status information
- assert res["extras"]["qcvars"]["N ALPHA ELECTRONS"] == "5"
- assert res["extras"]["qcvars"]["N ATOMS"] == "3"
- assert res["extras"]["qcvars"]["N BASIS FUNCTIONS"] == "13"
-
- # Make sure the properties parsed correctly
- assert compare_values(-55.554037, res["properties"]["return_energy"], atol=1e-3)
- assert res["properties"]["calcinfo_natom"] == 3
- assert res["properties"]["calcinfo_nalpha"] == 5
- assert res["properties"]["calcinfo_nbasis"] == 13
-
-
-@using("nwchem")
-def test_hess(nh2):
- resi = {"molecule": nh2, "driver": "hessian", "model": {"method": "b3lyp", "basis": "3-21g"}}
- res = qcng.compute(resi, "nwchem", raise_error=True, return_dict=False)
- assert compare_values(-3.5980754370e-02, res.return_result[0, 0], atol=1e-3)
- assert compare_values(0, res.return_result[1, 0], atol=1e-3)
- assert compare_values(0.018208307756, res.return_result[3, 0], atol=1e-3)
- assert np.allclose(res.return_result, res.return_result.T, atol=1e-8) # Should be symmetric about diagonal
-
- # Test that the Hessian changes with rotation, but that its determinants remain the same
- shifted_nh2, _ = nh2.scramble(do_shift=False, do_mirror=False, do_rotate=True, do_resort=False)
-
- resi["molecule"] = shifted_nh2
- res_shifted = qcng.compute(resi, "nwchem", raise_error=True, return_dict=False)
- assert not np.allclose(res.return_result, res_shifted.return_result, atol=1e-8)
- assert np.isclose(np.linalg.det(res.return_result), np.linalg.det(res_shifted.return_result))
-
-
-@using("nwchem")
-def test_gradient(nh2):
- resi = {
- "molecule": nh2,
- "driver": "gradient",
- "model": {"method": "b3lyp", "basis": "3-21g"},
- "keywords": {"dft__convergence__gradient": "1e-6"},
- }
- res = qcng.compute(resi, "nwchem", raise_error=True, return_dict=True)
- assert compare_values(4.22418267e-2, res["return_result"][2], atol=1e-7) # Beyond accuracy of NWChem stdout
-
- # Rotate the molecule and verify that the gradient changes
- shifted_nh2, _ = nh2.scramble(do_shift=False, do_mirror=False, do_rotate=True, do_resort=False)
-
- resi["molecule"] = shifted_nh2
- res_shifted = qcng.compute(resi, "nwchem", raise_error=True, return_dict=True)
-
- assert not compare_values(4.22418267e-2, res_shifted["return_result"][2], atol=1e-7)
-
- # Make sure the two matrices still have the same determinant and norms, as they are just rotations of each other
- # I am leveraging the fact that the gradients are square, 3x3 matrices just by happenstance of the
- # test molecule having 3 atoms
- orig_grads = np.reshape(res["return_result"], (-1, 3))
- shif_grads = np.reshape(res_shifted["return_result"], (-1, 3))
-
- # Test that the magnitude of forces are the same
- assert np.allclose(np.linalg.norm(orig_grads, ord=2, axis=1), np.linalg.norm(shif_grads, ord=2, axis=1))
-
- # Test that the determinants are the same
- orig_det = np.linalg.det(orig_grads)
- shif_det = np.linalg.det(shif_grads)
-
- assert np.allclose(orig_det, shif_det)
-
-
-@pytest.fixture
-def h20():
- water = """
--1 2
-O 0 0 0
-H 0 0 1
-H 0 1 0
- """
- return qcel.models.Molecule.from_data(water)
-
-
-@using("nwchem")
-def test_dipole(h20):
- # Run NH2
- resi = {
- "molecule": h20,
- "driver": "properties",
- "model": {"method": "dft", "basis": "3-21g"},
- "keywords": {"dft__xc": "b3lyp", "property__dipole": True},
- }
- res = qcng.compute(resi, "nwchem", raise_error=True, return_dict=True)
-
- # Make sure the calculation completed successfully
- assert compare_values(-75.764944, res["return_result"], atol=1e-3)
- assert res["driver"] == "properties"
- assert "provenance" in res
- assert res["success"] is True
-
- # Check the other status information
- assert res["extras"]["qcvars"]["N ALPHA ELECTRONS"] == "6"
- assert res["extras"]["qcvars"]["N ATOMS"] == "3"
- assert res["extras"]["qcvars"]["N BASIS FUNCTIONS"] == "13"
-
- # Make sure the properties parsed correctly
- assert compare_values(-75.764944, res["properties"]["return_energy"], atol=1e-3)
- assert res["properties"]["calcinfo_natom"] == 3
- assert res["properties"]["calcinfo_nalpha"] == 6
- assert res["properties"]["calcinfo_nbasis"] == 13
- # Make sure Dipole Moment and center of charge parsed correctly
- assert compare_values(0.272949872, float(res["extras"]["qcvars"]["TOTAL DIPOLE MOMENT"]), atol=1e-5)
- assert compare_values(-0.00, float(res["extras"]["qcvars"]["DIPOLE MOMENT"][0]), atol=1e-3)
- assert compare_values(-0.00, float(res["extras"]["qcvars"]["DIPOLE MOMENT"][1]), atol=1e-3)
- assert compare_values(-0.272949872, float(res["extras"]["qcvars"]["DIPOLE MOMENT"][2]), atol=1e-5)
-
-
-@pytest.fixture
-def h20v2():
- water = """
-O 0 0 0
-H 0 0 1
-H 0 1 0
- """
- return qcel.models.Molecule.from_data(water)
-
-
-@using("nwchem")
-def test_homo_lumo(h20v2):
- # Run NH2
- resi = {
- "molecule": h20v2,
- "driver": "energy",
- "model": {"method": "dft", "basis": "3-21g"},
- "keywords": {"dft__xc": "b3lyp"},
- }
- res = qcng.compute(resi, "nwchem", raise_error=True, return_dict=True)
-
- # Make sure the calculation completed successfully
- assert compare_values(-75.968095, res["return_result"], atol=1e-3)
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # Check the other status information
- assert res["extras"]["qcvars"]["N ALPHA ELECTRONS"] == "5"
- assert res["extras"]["qcvars"]["N ATOMS"] == "3"
- assert res["extras"]["qcvars"]["N BASIS FUNCTIONS"] == "13"
-
- # Make sure the properties parsed correctly
- assert compare_values(-75.968095, res["properties"]["return_energy"], atol=1e-3)
- assert res["properties"]["calcinfo_natom"] == 3
- assert res["properties"]["calcinfo_nalpha"] == 5
- assert res["properties"]["calcinfo_nbasis"] == 13
- # Make sure Dipole Moment and center of charge parsed correctly
- assert compare_values(-0.2636515, float(res["extras"]["qcvars"]["HOMO"][0]), atol=1e-5)
- assert compare_values(0.08207131, float(res["extras"]["qcvars"]["LUMO"][0]), atol=1e-5)
-
-
-@using("nwchem")
-def test_geometry_bug():
- """Make sure that the harvester does not crash if NWChem's autosym moves atoms too far"""
-
- # Example molecule that has an RMSD of 2e-4 after NWChem symmetrizes the coordinates
- xyz = """6
-Properties=species:S:1:pos:R:3 unique_id=2da214efcf4e4c277fabc5b2b6ca6f32 pbc="F F F"
-C -0.00828817 1.39046978 -0.00560069
-O -0.00797038 -0.02504537 0.02030606
-H 1.00658338 1.81556366 0.00348335
-H -0.54657475 1.79916975 -0.87390126
-H -0.52288871 1.72555240 0.89907326
-H 0.44142019 -0.33354425 -0.77152059"""
- mol = qcel.models.Molecule.from_data(xyz)
- qcng.compute(
- {"molecule": mol, "model": {"method": "b3lyp", "basis": "6-31g"}, "driver": "gradient"},
- "nwchem",
- raise_error=True,
- )
-
-
-@using("nwchem")
-def test_autoz_error():
- """Test ability to turn off autoz"""
- # Large molecule that leads to an AutoZ error
- mol = qcel.models.Molecule.from_data(_auto_z_problem)
- result = qcng.compute(
- {
- "molecule": mol,
- "model": {"method": "hf", "basis": "sto-3g"},
- "driver": "energy",
- "protocols": {"error_correction": {"default_policy": False}},
- }, # Turn off error correction
- "nwchem",
- raise_error=False,
- )
-
- assert not result.success
- assert "Error when generating redundant atomic coordinates" in result.error.error_message
-
- # Turn off autoz
- result = qcng.compute(
- {
- "molecule": mol,
- "model": {"method": "hf", "basis": "sto-3g"},
- "driver": "energy",
- "keywords": {"geometry__noautoz": True},
- },
- "nwchem",
- raise_error=False,
- )
-
- # Ok if it crashes for other reasons
- assert "Error when generating redundant atomic coordinates" not in result.error.error_message
-
-
-@using("nwchem")
-def test_autoz_error_correction():
- """See if error correction for autoz works"""
-
- # Large molecule that leads to an AutoZ error
- mol = qcel.models.Molecule.from_data(_auto_z_problem)
- result = qcng.compute(
- {
- "molecule": mol,
- "model": {"method": "hf", "basis": "sto-3g"},
- "driver": "energy",
- "keywords": {"scf__maxiter": 250, "scf__thresh": 1e-1},
- },
- "nwchem",
- raise_error=True,
- )
-
- assert result.success
- assert "geom_binvr" in result.extras["observed_errors"]
- assert result.extras["observed_errors"]["geom_binvr"]["keyword_updates"] == {"geometry__noautoz": True}
-
-
-@pytest.mark.parametrize(
- "method, keyword, init_iters, use_tce",
- [
- ["b3lyp", "dft__maxiter", 4, False],
- ["b3lyp", "dft__iterations", 4, False],
- ["hf", "scf__maxiter", 2, False],
- ["mp2", "scf__maxiter", 2, False],
- ["mp2", "scf__maxiter", 2, True],
- ["ccsd", "tce__maxiter", 8, True],
- ["ccsd", "ccsd__maxiter", 4, False],
- ],
-)
-@using("nwchem")
-def test_conv_threshold(h20v2, method, keyword, init_iters, use_tce):
- result = qcng.compute(
- {
- "molecule": h20v2,
- "model": {"method": method, "basis": "sto-3g"},
- "driver": "energy",
- "keywords": {
- keyword: init_iters,
- "qc_module": use_tce,
- "scf__uhf": True,
- }, # UHF needed for SCF test
- },
- "nwchem",
- raise_error=True,
- )
-
- assert result.success
- assert "convergence_failed" in result.extras["observed_errors"]
- assert result.extras["observed_errors"]["convergence_failed"]["keyword_updates"] == {keyword: init_iters * 4}
-
-
-@using("nwchem")
-def test_restart(nh2, tmpdir):
- # Create a molecule that takes 5-8 steps for NWChem to relax it,
- # but only run the relaxation for 4 steps
- resi = {
- "molecule": nh2,
- "driver": "gradient",
- "model": {"method": "b3lyp", "basis": "3-21g"},
- "keywords": {"dft__convergence__gradient": "1e-6", "dft__iterations": 4},
- "protocols": {"error_correction": {"default_policy": False}},
- "extras": {"allow_restarts": True},
- }
-
- # Run once: It should fail to converge
- local_options = {"scratch_messy": True, "scratch_directory": str(tmpdir)}
- result = qcng.compute(
- resi,
- "nwchem",
- local_options=local_options,
- raise_error=False,
- )
- assert not result.success
- assert "computation failed to converge" in str(result.error)
-
- # Run again: It should converge only if we start from the last geometry
- result = qcng.compute(
- resi,
- "nwchem",
- local_options=local_options,
- raise_error=False,
- )
- assert result.success
diff --git a/qcengine/programs/tests/test_programs.py b/qcengine/programs/tests/test_programs.py
deleted file mode 100644
index dae4dcd7d..000000000
--- a/qcengine/programs/tests/test_programs.py
+++ /dev/null
@@ -1,462 +0,0 @@
-"""
-Tests the DQM compute dispatch module
-"""
-
-
-import numpy as np
-import pytest
-from qcelemental.models import AtomicInput, Molecule
-
-import qcengine as qcng
-from qcengine.testing import failure_engine, using
-
-
-def test_missing_key():
- ret = qcng.compute({"hello": "hi"}, "bleh")
- assert ret.success is False
- assert "hello" in ret.input_data
-
-
-def test_missing_key_raises():
- with pytest.raises(qcng.exceptions.InputError):
- ret = qcng.compute({"hello": "hi"}, "bleh", raise_error=True)
-
-
-@using("psi4")
-def test_psi4_task():
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {"method": "SCF", "basis": "sto-3g"},
- "keywords": {"scf_type": "df"},
- }
-
- ret = qcng.compute(input_data, "psi4", raise_error=True)
-
- assert ret.driver == "energy"
- assert "Final Energy" in ret.stdout
-
- prov_keys = {"cpu", "hostname", "username", "wall_time"}
- assert ret.provenance.dict().keys() >= prov_keys
- assert "retries" not in ret.provenance.dict()
-
- assert ret.success is True
-
-
-@using("psi4")
-@using("gcp")
-def test_psi4_hf3c_task():
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {"method": "HF3c"},
- "keywords": {"scf_type": "df"},
- }
-
- ret = qcng.compute(input_data, "psi4", raise_error=True)
-
- assert ret.success is True
- assert ret.model.basis is None
-
-
-@using("psi4_runqcsk")
-def test_psi4_interactive_task():
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {"method": "SCF", "basis": "sto-3g"},
- "keywords": {"scf_type": "df"},
- "extras": {"psiapi": True},
- }
-
- ret = qcng.compute(input_data, "psi4", raise_error=True)
-
- assert "Final Energy" in ret.stdout
- assert ret.success
- is_psiapi_evaluated = ret.extras.pop("psiapi_evaluated", False)
- assert is_psiapi_evaluated
-
-
-@using("psi4_runqcsk")
-def test_psi4_wavefunction_task():
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {"method": "SCF", "basis": "sto-3g"},
- "keywords": {"scf_type": "df"},
- "protocols": {"wavefunction": "orbitals_and_eigenvalues"},
- }
-
- ret = qcng.compute(input_data, "psi4", raise_error=True)
- assert ret.success, ret.error.error_message
- assert ret.wavefunction.scf_orbitals_a.shape == (7, 7)
-
-
-@using("psi4")
-def test_psi4_internal_failure():
- mol = Molecule.from_data(
- """0 3
- O 0.000000000000 0.000000000000 -0.068516245955
- """
- )
-
- psi4_task = {
- "molecule": mol,
- "driver": "energy",
- "model": {"method": "ccsd", "basis": "6-31g"},
- "keywords": {"reference": "rhf"},
- }
- with pytest.raises(qcng.exceptions.InputError) as exc:
- ret = qcng.compute(psi4_task, "psi4", raise_error=True)
-
- assert "reference is only" in str(exc.value)
-
-
-@using("psi4")
-def test_psi4_ref_switch():
- inp = AtomicInput(
- **{
- "molecule": {"symbols": ["Li"], "geometry": [0, 0, 0], "molecular_multiplicity": 2},
- "driver": "energy",
- "model": {"method": "B3LYP", "basis": "sto-3g"},
- "keywords": {"scf_type": "df"},
- }
- )
-
- ret = qcng.compute(inp, "psi4", raise_error=True, return_dict=False)
-
- assert ret.success is True
- assert ret.properties.calcinfo_nalpha == 2
- assert ret.properties.calcinfo_nbeta == 1
-
-
-@using("rdkit")
-@pytest.mark.parametrize("method", ["UFF", "MMFF94", "MMFF94s"])
-def test_rdkit_task(method):
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "gradient",
- "model": {"method": method},
- "keywords": {},
- }
-
- ret = qcng.compute(input_data, "rdkit", raise_error=True)
-
- assert ret.success is True
-
-
-@using("rdkit")
-def test_rdkit_connectivity_error():
- input_data = {
- "molecule": qcng.get_molecule("water").dict(),
- "driver": "energy",
- "model": {"method": "UFF", "basis": ""},
- "keywords": {},
- }
- del input_data["molecule"]["connectivity"]
-
- ret = qcng.compute(input_data, "rdkit")
- assert ret.success is False
- assert "connectivity" in ret.error.error_message
-
- with pytest.raises(qcng.exceptions.InputError):
- qcng.compute(input_data, "rdkit", raise_error=True)
-
-
-@using("torchani")
-def test_torchani_task():
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "gradient",
- "model": {"method": "ANI1x", "basis": None},
- "keywords": {},
- }
-
- ret = qcng.compute(input_data, "torchani", raise_error=True)
-
- assert ret.success is True
- assert ret.driver == "gradient"
-
-
-@using("mopac")
-def test_mopac_task():
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "gradient",
- "model": {"method": "PM6", "basis": None},
- "keywords": {"pulay": False},
- }
-
- ret = qcng.compute(input_data, "mopac", raise_error=True)
- assert ret.extras.keys() >= {"heat_of_formation", "dip_vec"}
- energy = pytest.approx(-0.08474117913025125, rel=1.0e-5)
-
- # Check gradient
- ret = qcng.compute(input_data, "mopac", raise_error=True)
- assert ret.extras.keys() >= {"heat_of_formation", "dip_vec"}
- assert np.linalg.norm(ret.return_result) == pytest.approx(0.03543560156912385, rel=3.0e-4)
- assert ret.properties.return_energy == energy
-
- # Check energy
- input_data["driver"] = "energy"
- ret = qcng.compute(input_data, "mopac", raise_error=True)
- assert ret.return_result == energy
- assert "== MOPAC DONE ==" in ret.stdout
-
-
-def test_random_failure_no_retries(failure_engine):
- failure_engine.iter_modes = ["input_error"]
- ret = qcng.compute(failure_engine.get_job(), failure_engine.name, raise_error=False)
- assert ret.error.error_type == "input_error"
- assert "retries" not in ret.input_data["provenance"].keys()
-
- failure_engine.iter_modes = ["random_error"]
- ret = qcng.compute(failure_engine.get_job(), failure_engine.name, raise_error=False)
- assert ret.error.error_type == "random_error"
- assert "retries" not in ret.input_data["provenance"].keys()
-
-
-def test_random_failure_with_retries(failure_engine):
- failure_engine.iter_modes = ["random_error", "random_error", "random_error"]
- ret = qcng.compute(failure_engine.get_job(), failure_engine.name, raise_error=False, task_config={"retries": 2})
- assert ret.input_data["provenance"]["retries"] == 2
- assert ret.error.error_type == "random_error"
-
- failure_engine.iter_modes = ["random_error", "input_error"]
- ret = qcng.compute(failure_engine.get_job(), failure_engine.name, raise_error=False, task_config={"retries": 4})
- assert ret.input_data["provenance"]["retries"] == 1
- assert ret.error.error_type == "input_error"
-
-
-def test_random_failure_with_success(failure_engine):
- failure_engine.iter_modes = ["random_error", "pass"]
- failure_engine.ncalls = 0
- ret = qcng.compute(failure_engine.get_job(), failure_engine.name, raise_error=False, task_config={"retries": 1})
-
- assert ret.success, ret.error.error_message
- assert ret.provenance.retries == 1
- assert ret.extras["ncalls"] == 2
-
-
-@using("openmm")
-def test_openmm_task_smirnoff():
- from qcengine.programs.openmm import OpenMMHarness
-
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {"method": "openff-1.0.0", "basis": "smirnoff"},
- "keywords": {},
- }
-
- ret = qcng.compute(input_data, "openmm", raise_error=True)
-
- cachelength = len(OpenMMHarness._CACHE)
-
- assert cachelength > 0
- assert ret.success is True
-
- ret = qcng.compute(input_data, "openmm", raise_error=True)
-
- # ensure cache has not grown
- assert len(OpenMMHarness._CACHE) == cachelength
- assert ret.success is True
-
-
-@pytest.mark.skip("`basis` must be explicitly specified at this time")
-@using("openmm")
-def test_openmm_task_url_basis():
- from qcengine.programs.openmm import OpenMMHarness
-
- input_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {
- "method": "openmm",
- "basis": "openff-1.0.0",
- "url": "https://raw.githubusercontent.com/openforcefield/openff-forcefields/1.0.0/openforcefields/offxml/openff-1.0.0.offxml",
- },
- "keywords": {},
- }
-
- ret = qcng.compute(input_data, "openmm", raise_error=True)
-
- cachelength = len(OpenMMHarness._CACHE)
-
- assert cachelength > 0
- assert ret.success is True
-
- ret = qcng.compute(input_data, "openmm", raise_error=True)
-
- # ensure cache has not grown
- assert len(OpenMMHarness._CACHE) == cachelength
- assert ret.success is True
-
-
-@using("openmm")
-def test_openmm_cmiles_gradient():
- program = "openmm"
-
- water = qcng.get_molecule("water")
-
- water_dict = water.dict()
- # add water cmiles to the molecule
- water_dict["extras"] = {"cmiles": {"canonical_isomeric_explicit_hydrogen_mapped_smiles": "[H:2][O:1][H:3]"}}
-
- molecule = Molecule.from_data(water_dict)
-
- model = {"method": "openff-1.0.0", "basis": "smirnoff"}
-
- inp = AtomicInput(molecule=molecule, driver="gradient", model=model)
- ret = qcng.compute(inp, program, raise_error=False)
-
- assert ret.success is True
-
-
-@using("openmm")
-def test_openmm_cmiles_gradient_nomatch():
- program = "openmm"
-
- water = qcng.get_molecule("water")
-
- water_dict = water.dict()
- # add ethane cmiles to the molecule
- water_dict["extras"] = {
- "cmiles": {
- "canonical_isomeric_explicit_hydrogen_mapped_smiles": "[H:3][C:1]([H:4])([H:5])[C:2]([H:6])([H:7])[H:8]"
- }
- }
-
- molecule = Molecule.from_data(water_dict)
-
- model = {"method": "openff-1.0.0", "basis": "smirnoff"}
-
- inp = AtomicInput(molecule=molecule, driver="gradient", model=model)
- ret = qcng.compute(inp, program, raise_error=False)
-
- # if we correctly find the cmiles this should fail as the molecule and cmiles are different
- assert ret.success is False
- assert (
- "molecule.add_conformer given input of the wrong shape: Given (3, 3), expected (8, 3)"
- in ret.error.error_message
- )
-
-
-@using("openmm")
-@pytest.mark.parametrize(
- "gaff_settings",
- [
- pytest.param(({}, None, 0.0013904199062156914), id="gaff no keywords"),
- pytest.param(({"constraints": "ALLBONDS"}, None, 8.108238580315493e-05), id="constraints allbonds"),
- pytest.param(({"nonbondedMethod": "LjPmE"}, None, 0.0013904199062156914), id="nonbonded ljpme"),
- pytest.param(
- ({"nonbondedMethod": "PME", "constraints": "Hbonds"}, None, 8.108238580315493e-05),
- id="nonbonded pme constraints hbonds",
- ),
- pytest.param(({"constraints": "badmethod"}, ValueError, 0), id="incorrect constraint"),
- pytest.param(({"nonbondedMethod": "badmethod"}, ValueError, 0), id="incorrect nonbondedmethod"),
- ],
-)
-def test_openmm_gaff_keywords(gaff_settings):
- """
- Test the different running settings with gaff.
- """
- program = "openmm"
- water = qcng.get_molecule("water")
-
- water_dict = water.dict()
- # add water cmiles to the molecule
- water_dict["extras"] = {"cmiles": {"canonical_isomeric_explicit_hydrogen_mapped_smiles": "[H:2][O:1][H:3]"}}
-
- molecule = Molecule.from_data(water_dict)
- keywords, error, expected_result = gaff_settings
- model = {"method": "gaff-2.1", "basis": "antechamber"}
- inp = AtomicInput(molecule=molecule, driver="energy", model=model, keywords=keywords)
- if error is not None:
- with pytest.raises(error):
- _ = qcng.compute(inp, program, raise_error=True)
- else:
- ret = qcng.compute(inp, program, raise_error=False)
- assert ret.success is True
- assert ret.return_result == pytest.approx(expected_result, rel=1e-6)
-
-
-@using("mace")
-def test_mace_energy():
- """
- Test calculating the energy with mace
- """
- water = qcng.get_molecule("water")
- atomic_input = AtomicInput(molecule=water, model={"method": "small", "basis": None}, driver="energy")
-
- result = qcng.compute(atomic_input, "mace")
- assert result.success
- assert pytest.approx(result.return_result) == -76.47683956098838
-
-
-@using("mace")
-def test_mace_gradient():
- """
- Test calculating the gradient with mace
- """
- water = qcng.get_molecule("water")
- expected_result = np.array(
- [
- [0.0, -2.1590400539385646e-18, -0.04178551770271103],
- [0.0, -0.029712483642769006, 0.020892758851355515],
- [0.0, 0.029712483642769006, 0.020892758851355518],
- ]
- )
-
- atomic_input = AtomicInput(molecule=water, model={"method": "small", "basis": None}, driver="gradient")
-
- result = qcng.compute(atomic_input, "mace")
- assert result.success
- assert pytest.approx(result.return_result) == expected_result
-
-
-@using("aimnet2")
-@pytest.mark.parametrize(
- "model, expected_energy",
- [
- pytest.param("b973c", -76.39604306960972, id="b973c"),
- pytest.param("wb97m-d3", -76.47412023758551, id="wb97m-d3"),
- ],
-)
-def test_aimnet2_energy(model, expected_energy):
- """Test computing the energies of water with two aimnet2 models."""
-
- water = qcng.get_molecule("water")
- atomic_input = AtomicInput(molecule=water, model={"method": model, "basis": None}, driver="energy")
-
- result = qcng.compute(atomic_input, "aimnet2")
- assert result.success
- assert pytest.approx(result.return_result) == expected_energy
- assert "charges" in result.extras["aimnet2"]
- assert "ensemble_charges_std" in result.extras["aimnet2"]
- assert "ensemble_forces_std" in result.extras["aimnet2"]
-
-
-@using("aimnet2")
-def test_aimnet2_gradient():
- """Test computing the gradient of water using one aimnet2 model."""
-
- water = qcng.get_molecule("water")
- atomic_input = AtomicInput(molecule=water, model={"method": "wb97m-d3", "basis": None}, driver="gradient")
-
- result = qcng.compute(atomic_input, "aimnet2")
- assert result.success
- # make sure the gradient is now the return result
- assert np.allclose(
- result.return_result,
- np.array(
- [
- [-0.0, 2.6080331227973375e-09, -0.04097248986363411],
- [-0.0, -0.029529934749007225, 0.020486244931817055],
- [-0.0, 0.029529931023716927, 0.020486244931817055],
- ]
- ),
- )
- assert pytest.approx(result.properties.return_energy) == -76.47412023758551
- # make sure the other properties were also saved
- assert "charges" in result.extras["aimnet2"]
diff --git a/qcengine/programs/tests/test_qchem.py b/qcengine/programs/tests/test_qchem.py
deleted file mode 100644
index a76302ff3..000000000
--- a/qcengine/programs/tests/test_qchem.py
+++ /dev/null
@@ -1,153 +0,0 @@
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_recursive, compare_values
-
-import qcengine as qcng
-from qcengine.testing import qcengine_records, using
-
-qchem_info = qcengine_records("qchem")
-qchem_logonly_info = qcengine_records("qchem_logonly")
-
-qchem_forgive = [
- "root.molecule.provenance.version",
- "root.molecule.provenance.routine",
- "root.provenance.version",
- "root.provenance.routine",
- "root.provenance.creator",
- "root.extras",
- "root.molecule.extras",
-]
-
-
-@pytest.mark.parametrize("test_case", qchem_info.list_test_cases())
-def test_qchem_output_parser(test_case):
-
- # Get output file data
- data = qchem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- outfiles = qcel.util.deserialize(data["outfiles.msgpack"], "msgpack-ext")
- output = qcng.get_program("qchem", check=False).parse_output(outfiles, inp).dict()
- output.pop("provenance", None)
-
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"]).dict()
- output_ref.pop("provenance", None)
- output_ref.pop("extras", None)
- output.pop("extras", None)
-
- check, message = compare_recursive(output_ref, output, return_message=True)
- assert check, message
-
-
-@pytest.mark.parametrize("test_case", qchem_info.list_test_cases())
-def test_qchem_input_formatter(test_case):
-
- # Get input file data
- data = qchem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # TODO add actual comparison of generated input file
- input_file = qcng.get_program("qchem", check=False).build_input(inp, qcng.get_config())
- assert input_file.keys() >= {"commands", "infiles"}
-
-
-@pytest.mark.parametrize("test_case", qchem_info.list_test_cases())
-def test_qchem_input_formatter_template(test_case):
-
- # Get input file data
- data = qchem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # TODO add actual comparison of generated input file
- input_file = qcng.get_program("qchem", check=False).build_input(inp, qcng.get_config(), template="Test template")
- assert input_file.keys() >= {"commands", "infiles"}
-
-
-@using("qchem")
-@pytest.mark.parametrize("test_case", qchem_info.list_test_cases())
-def test_qchem_executor(test_case):
- # Get input file data
- data = qchem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # Run qchem
- result = qcng.compute(inp, "qchem")
- assert result.success is True
-
- # Get output file data
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"])
-
- atol = 1e-6
- assert compare_recursive(output_ref.return_result, result.return_result, atol=atol)
-
-
-@using("qchem")
-def test_qchem_orientation():
-
- mol = qcel.models.Molecule.from_data(
- """
- He 0.0 0.7 0.7
- He 0.0 -0.7 -0.7
- """
- )
-
- # Compare with rotation
- inp = {"molecule": mol, "driver": "gradient", "model": {"method": "HF", "basis": "6-31g"}}
- ret = qcng.compute(inp, "qchem", raise_error=True)
- assert compare_values(np.linalg.norm(ret.return_result, axis=0), [0, 0, 0.00791539])
-
- # Compare without rotations
- mol_noorient = mol.copy(update={"fix_orientation": True})
- inp = {"molecule": mol_noorient, "driver": "gradient", "model": {"method": "HF", "basis": "6-31g"}}
- ret = qcng.compute(inp, "qchem", raise_error=True)
-
- assert compare_values(np.linalg.norm(ret.return_result, axis=0), [0, 0.00559696541, 0.00559696541])
-
-
-@pytest.mark.parametrize("test_case", qchem_logonly_info.list_test_cases())
-def test_qchem_logfile_parser(test_case):
-
- # Get output file data
- data = qchem_logonly_info.get_test_data(test_case)
- outfiles = {"dispatch.out": data["qchem.out"]}
- with pytest.warns(Warning):
- output = qcng.get_program("qchem", check=False).parse_logfile(outfiles).dict()
- output["stdout"] = None
-
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"]).dict()
- for key in list(output["provenance"].keys()):
- if key not in output_ref["provenance"]:
- output["provenance"].pop(key)
-
- # Modify ref to trim down total data as a molecule is now sparse
- output_ref["molecule"] = {k: v for k, v in output_ref["molecule"].items() if k in output["molecule"]}
-
- check, message = compare_recursive(output_ref, output, return_message=True, forgive=qchem_forgive)
- assert check, message
-
-
-@pytest.mark.parametrize("test_case", qchem_info.list_test_cases())
-def test_qchem_logfile_parser_qcscr(test_case):
-
- # Get output file data
- data = qchem_info.get_test_data(test_case)
- outfiles = qcel.util.deserialize(data["outfiles.msgpack"], "msgpack-ext")
-
- with pytest.warns(Warning):
- output = qcng.get_program("qchem", check=False).parse_logfile(outfiles).dict()
- output["stdout"] = None
-
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"]).dict()
- for key in list(output["provenance"].keys()):
- if key not in output_ref["provenance"]:
- output["provenance"].pop(key)
-
- output_ref["stdout"] = None
-
- # Modify ref to trim down total data as a molecule is now sparse
- output_ref["molecule"] = {k: v for k, v in output_ref["molecule"].items() if k in output["molecule"]}
-
- output_ref["model"]["method"] = output_ref["model"]["method"].lower()
- check, message = compare_recursive(output_ref, output, return_message=True, forgive=qchem_forgive)
- assert check, message
diff --git a/qcengine/programs/tests/test_qcore.py b/qcengine/programs/tests/test_qcore.py
deleted file mode 100644
index c4ff4e9fa..000000000
--- a/qcengine/programs/tests/test_qcore.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_recursive, compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@using("qcore")
-@pytest.mark.parametrize(
- "method, energy, gradient_norm",
- [
- ({"method": "gfn1"}, -5.765990520597323, 0.06294937),
- ({"method": "wb97xd3", "basis": "6-31g"}, -76.3624189841582, 0.04931507),
- ({"method": "hf", "basis": "6-31g"}, -75.98014477585764, 0.08866491),
- ],
-)
-def test_qcore_methods(method, energy, gradient_norm):
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("water"),
- model=method,
- driver="gradient",
- )
-
- atomic_result = qcng.compute(atomic_input, "qcore")
-
- assert atomic_result.success, atomic_result.error.error_message
- assert compare_values(atomic_result.properties.return_energy, energy)
- assert compare_values(np.linalg.norm(atomic_result.return_result), gradient_norm)
- assert atomic_result.wavefunction is None
-
-
-@using("qcore")
-def test_qcore_wavefunction():
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("water"),
- model={"method": "wb97xd3", "basis": "6-31g"},
- driver="gradient",
- protocols={"wavefunction": "all"},
- )
-
- atomic_result = qcng.compute(atomic_input, "qcore")
- assert atomic_result.success, atomic_result.error.error_message
- assert atomic_result.wavefunction is not None
- assert atomic_result.wavefunction.scf_orbitals_a is not None
-
- assert atomic_result.properties.calcinfo_nalpha == 5
- assert atomic_result.properties.calcinfo_nbasis == 13
diff --git a/qcengine/programs/tests/test_sdftd3.py b/qcengine/programs/tests/test_sdftd3.py
deleted file mode 100644
index e2a211424..000000000
--- a/qcengine/programs/tests/test_sdftd3.py
+++ /dev/null
@@ -1,201 +0,0 @@
-"""
-Testing for the DFT-D3 program harness.
-
-Most of the tests use mindless molecules for the diversity of element species
-to test as much different interactions as possible.
-"""
-
-import numpy as np
-import pytest
-import qcelemental as qcel
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@using("s-dftd3")
-def test_dftd3_task_b97m_m01():
-
- thr = 1.0e-8
-
- return_result = -0.05879001214961249
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-01"),
- model={"method": "b97m"},
- driver="energy",
- )
-
- atomic_result = qcng.compute(atomic_input, "s-dftd3")
-
- print(atomic_result.return_result)
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("s-dftd3")
-@pytest.mark.parametrize(
- "inp",
- [
- pytest.param({"return_result": -0.024863196328457682, "level_hint": "d3bj"}),
- pytest.param({"return_result": -0.011922614341086182, "level_hint": "d3zero"}),
- pytest.param({"return_result": -0.054219891333201896, "level_hint": "d3mbj"}),
- pytest.param({"return_result": -0.087100927341320660, "level_hint": "d3mzero"}),
- pytest.param({"return_result": -0.014849063343059512, "level_hint": "d3op"}),
- ],
- ids=["d3bj", "d3zero", "d3mbj", "d3mzero", "d3op"],
-)
-def test_dftd3_task_pbe_m02(inp):
-
- # return to 1.0e-8 after https://github.com/MolSSI/QCEngine/issues/370
- thr = 1.0e-7
-
- return_result = inp["return_result"]
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-02"),
- model={"method": "pbe"},
- keywords={"level_hint": inp["level_hint"]},
- driver="energy",
- )
-
- atomic_result = qcng.compute(atomic_input, "s-dftd3")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("s-dftd3")
-def test_dftd3_task_tpss_m02():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [-1.38459808e-04, -3.39780053e-04, +6.63854384e-06],
- [-8.49987303e-04, -1.75644402e-05, +6.92859669e-04],
- [-1.87640802e-05, +3.48459127e-04, +3.58802840e-04],
- [-1.94903751e-04, -1.27629117e-04, -6.58938185e-04],
- [+8.81075012e-05, +6.41604548e-04, +2.74678977e-04],
- [-1.64367324e-04, -2.16197141e-04, -3.84148192e-04],
- [-1.12458629e-04, -2.56329049e-04, +4.98979702e-05],
- [-1.52971321e-05, +3.02144394e-05, +1.36451189e-04],
- [+6.66230167e-04, -8.99527309e-05, +5.62299622e-04],
- [+3.09620572e-05, -1.73604390e-05, -4.31385583e-04],
- [-1.30132201e-04, -6.02965004e-04, +2.06807277e-04],
- [-6.34318034e-04, +3.32680767e-04, -5.16509587e-04],
- [-1.90415533e-04, +4.13192949e-04, -1.76537818e-04],
- [+2.65591351e-04, -1.50550857e-04, +1.39890439e-04],
- [-3.56346859e-05, -3.56851554e-04, +1.11332319e-04],
- [+1.43384741e-03, +4.09028554e-04, -3.72139482e-04],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-02"),
- model={"method": ""},
- keywords={
- "level_hint": "d3mbj",
- "params_tweaks": {
- "s8": 1.76596355,
- "a1": 0.42822303,
- "a2": 4.54257102,
- },
- },
- driver="gradient",
- )
-
- atomic_result = qcng.compute(atomic_input, "s-dftd3")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("s-dftd3")
-def test_dftd3_task_r2scan_m03():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [-9.15721221e-06, -8.18139252e-06, -6.04628002e-05],
- [+2.63353857e-05, -5.74347326e-05, +6.43925910e-05],
- [-2.99422439e-05, +1.88531187e-05, +3.80203831e-05],
- [-1.05590494e-05, -6.00459729e-05, +3.93481945e-05],
- [+1.59600548e-05, +3.66166973e-05, -2.69939628e-05],
- [-7.21060928e-05, +1.35991320e-05, -3.71000739e-05],
- [-9.01933781e-06, -3.41989101e-05, -4.92317946e-05],
- [-2.38625512e-06, -4.42678339e-05, -1.95513968e-05],
- [-3.09663159e-05, +3.41418638e-05, +2.51926884e-05],
- [+5.60572318e-06, -1.06356845e-05, -3.91159008e-05],
- [+7.73090102e-05, +2.75681060e-05, +2.02933984e-05],
- [-3.23109274e-05, +5.39319105e-05, -1.44309772e-04],
- [-4.05785623e-05, +5.03251549e-05, +3.92193348e-05],
- [+8.46365844e-06, -3.35282588e-05, +3.76937643e-05],
- [+1.04861677e-04, -2.99444252e-05, +8.20822571e-05],
- [-1.50951292e-06, +4.32012272e-05, +3.05230899e-05],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-03"),
- keywords={"level_hint": "d3bj"},
- driver="gradient",
- model={"method": "r2scan"},
- )
-
- atomic_result = qcng.compute(atomic_input, "s-dftd3")
-
- assert atomic_result.success
- assert pytest.approx(return_result, abs=thr) == atomic_result.return_result
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("s-dftd3")
-def test_dftd3_task_unknown_method():
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("water"),
- keywords={"level_hint": "d3zero"},
- model={"method": "non-existent-method"},
- driver="energy",
- )
- error = qcel.models.ComputeError(
- error_type="input error", error_message="No entry for 'non-existent-method' present"
- )
-
- atomic_result = qcng.compute(atomic_input, "s-dftd3")
-
- print(atomic_result.error)
- assert not atomic_result.success
- assert atomic_result.error == error
-
-
-@using("s-dftd3")
-def test_dftd3_task_cold_fusion():
-
- atomic_input = qcel.models.AtomicInput(
- molecule={
- "symbols": ["Li", "Li", "Li", "Li"],
- "geometry": [
- [-1.58746019997201, +1.58746019997201, +1.58746019997201],
- [-1.58746019997201, +1.58746019997201, +1.58746019997201],
- [-1.58746019997201, -1.58746019997201, -1.58746019997201],
- [+1.58746019997201, +1.58746019997201, -1.58746019997201],
- ],
- "validated": True, # Force a nuclear fusion input, to make dftd3 fail
- },
- keywords={"level_hint": "d3zero"},
- model={"method": "pbe"},
- driver="energy",
- )
- error = qcel.models.ComputeError(
- error_type="input error",
- error_message="Too close interatomic distances found",
- )
-
- atomic_result = qcng.compute(atomic_input, "s-dftd3")
-
- print(atomic_result.error)
- assert not atomic_result.success
- assert atomic_result.error == error
diff --git a/qcengine/programs/tests/test_standard_suite.py b/qcengine/programs/tests/test_standard_suite.py
deleted file mode 100644
index a0df4db93..000000000
--- a/qcengine/programs/tests/test_standard_suite.py
+++ /dev/null
@@ -1,509 +0,0 @@
-# This file sets up tests for fundamental QC methods for the purpose
-# of developing and maintaining harnesses to check that a QC program runs
-# through QCEngine, that it returns properties as expected for the method,
-# and that those results have the same answers as other programs. For
-# new programs, try to add the six rhf/uhf/rohf ae/fc combinations to
-# each method (separate "def test..."). Common things to account for are
-# sph/cart basis sets, fc/ae defaults, semicanonical orbitals.
-# Feel free to add test case variations to check keyword handling.
-
-# Handling/Testing Errors
-# -----------------------
-# * (E1) Calculation that QC program just can't run.
-# example: GAMESS UHF CC
-# handle: add "error" tuple to test like `_q2`
-# result: runner executes through pytest.raises so test passes
-#
-# * (E2) Calculation that QC program can run but full properties data not harvestable.
-# example: Psi4 run with dfocc module doesn't split out MP2 spin components for RHF
-# handle: add logic in `contractual_mp2` (or appropriate fn) to forgive specific properties
-# result: runner checks that expected props are present and unexpected are absent.
-# even if full properties not available, QC code is working normally, so test passes
-#
-# * (E3) Testing instance parameters not evenly available to QC programs.
-# example: Odd basis like QZ2P not in Q-Chem's library
-# handle: add pytest.skip at most general position
-# result: test registers but skipped
-#
-# * (E4) Calculation the QC program thinks it can run but we know better -- `return_result` wrong.
-# example: NWChem ROHF MP2 that's missing singles contribution
-# handle: add "wrong" tuple to test like `_w1`
-# result: runner checks assertion fails at expected result and triggers pytest.xfail
-
-
-import sys
-
-import pytest
-import qcelemental as qcel
-
-import qcengine as qcng
-from qcengine.programs.tests.standard_suite_ref import std_molecules, std_refs
-from qcengine.testing import using
-
-from .standard_suite_runner import runner_asserter
-
-_basis_keywords = ["cfour_basis", "basis"]
-
-
-@pytest.fixture
-def clsd_open_pmols():
- return {
- name[:-4]: qcel.models.Molecule.from_data(smol, name=name[:-4])
- for name, smol in std_molecules.items()
- if name.endswith("-xyz")
- }
-
-
-# yapf: disable
-_q1 = (qcng.exceptions.InputError, "unknown SCFTYPE", "no ROHF reference for NWChem hand-coded MP2.")
-_q2 = (qcng.exceptions.InputError, "CCTYP IS PROGRAMMED ONLY FOR SCFTYP=RHF OR ROHF", "no UHF CC in GAMESS.")
-_q3 = (qcng.exceptions.InputError, "ccsd: nopen is not zero", "no non-RHF reference for NWChem hand-coded CC.")
-_q6 = (qcng.exceptions.InputError, r"Only RHF/UHF(/RKS|/RKS/UKS|) Hessians are currently implemented.", "no ROHF Hessian for Psi4 HF.")
-_q45 = (qcng.exceptions.UnknownError, "non-Abelian symmetry not permitted", "temporary excuse of failure. I think NWChem has fixed upstream.")
-
-_w1 = ("MP2 CORRELATION ENERGY", "nonstandard answer: NWChem TCE MP2 doesn't report singles (affects ROHF)")
-_w2 = ("CCSD CORRELATION ENERGY", "nonstandard answer: GAMESS CCSD ROHF FC energy")
-# yapf: enable
-
-
-def _trans_key(qc, bas, key):
- # note that cfour isn't ready for keywords.basis instead of model.basis
- lkey = key.lower()
-
- # translate basis
- if lkey == "basis":
- return bas
- if bas.lower() == "cc-pvdz":
- if lkey == "cfour_basis":
- return "pvdz"
- elif lkey == "qcng_basis":
- return {
- "cfour": ("pvdz", {}),
- "gamess": ("ccd", {"contrl__ispher": 1}),
- "nwchem": ("cc-pvdz", {"basis__spherical": True}),
- "psi4": (bas, {}),
- "qchem": ("cc-pvdz", {}),
- }[qc]
- elif bas.lower() == "aug-cc-pvdz":
- if lkey == "cfour_basis":
- return "aug-pvdz"
- elif lkey == "qcng_basis":
- return {
- "cfour": ("aug-pvdz", {}),
- "gamess": ("accd", {"contrl__ispher": 1}),
- "nwchem": ("aug-cc-pvdz", {"basis__spherical": True}),
- "psi4": (bas, {}),
- "qchem": ("aug-cc-pvdz", {}),
- }[qc]
- elif bas.lower() == "cfour-qz2p":
- if lkey == "cfour_basis":
- return "qz2p"
- elif lkey == "qcng_basis":
- return {
- "cfour": ("qz2p", {}),
- "gamess": (None, {}), # not in GAMESS-US library
- "nwchem": (None, {}), # not in NWChem library
- "psi4": (bas, {}),
- "qchem": (None, {}), # not in Q-Chem library
- }[qc]
-
- sys.exit(1)
-
-
-# http://patorjk.com/software/taag/#p=display&c=bash&f=Soft&t=MP3
-
-
-# ,--. ,--.,------. ,------.
-# | '--' || .---' | .---',--,--, ,---. ,--.--. ,---.,--. ,--.
-# | .--. || `--, | `--, | \| .-. :| .--'| .-. |\ ' /
-# | | | || |` | `---.| || |\ --.| | ' '-' ' \ '
-# `--' `--'`--' `------'`--''--' `----'`--' .`- /.-' /
-# `---' `---'
-# <<< HF Energy
-
-
-@pytest.mark.parametrize(
- "dertype",
- [
- pytest.param(0, id="ene0"),
- ],
-)
-@pytest.mark.parametrize(
- "basis, subjects",
- [
- pytest.param("cc-pvdz", ["hf", "bh3p", "bh3p"], id="dz"),
- pytest.param("aug-cc-pvdz", ["h2o", "nh2", "nh2"], id="adz", marks=pytest.mark.long),
- pytest.param("cfour-qz2p", ["h2o", "nh2", "nh2"], id="qz2p", marks=pytest.mark.long),
- ],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- # yapf: disable
- ######## Are all possible ways of computing working?
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"scf_conv": 12}, }, id="hf rhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="hf rhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="hf rhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "ae", "keywords": {"scf_type": "pk"}, }, id="hf rhf ae: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="hf uhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf"}, }, id="hf uhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="hf uhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_type": "pk"}, }, id="hf uhf ae: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_conv": 12}, }, id="hf rohf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf"}, }, id="hf rohf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True, "scf__thresh": 1.0e-8}, }, id="hf rohf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_type": "pk"}, }, id="hf rohf ae: psi4", marks=using("psi4_mp2qcsk")),
- # yapf: enable
- ],
-)
-def test_hf_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, request):
- runner_asserter(*_processor(inp, dertype, basis, subjects, clsd_open_pmols, request, "energy", "hf"))
-
-
-#
-# ,--. ,--.,------. ,----. ,--.,--. ,--.
-# | '--' || .---' ' .-./ ,--.--. ,--,--. ,-| |`--' ,---. ,--,--, ,-' '-.
-# | .--. || `--, | | .---.| .--'' ,-. |' .-. |,--.| .-. :| \'-. .-'
-# | | | || |` ' '--' || | \ '-' |\ `-' || |\ --.| || | | |
-# `--' `--'`--' `------' `--' `--`--' `---' `--' `----'`--''--' `--'
-#
-# <<< HF Gradient
-
-
-@pytest.mark.parametrize(
- "dertype",
- [
- pytest.param(1, id="grd1"),
- # pytest.param(0, id="grd0", marks=pytest.mark.long),
- ],
-)
-@pytest.mark.parametrize(
- "basis, subjects",
- [
- pytest.param("cc-pvdz", ["hf", "bh3p", "bh3p"], id="dz"),
- pytest.param("aug-cc-pvdz", ["h2o", "nh2", "nh2"], id="adz", marks=pytest.mark.long),
- pytest.param("cfour-qz2p", ["h2o", "nh2", "nh2"], id="qz2p", marks=pytest.mark.long),
- ],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- # yapf: disable
- ######## Are all possible ways of computing working?
-
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"scf_conv": 12}, }, id="hf rhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="hf rhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {"scf__thresh": 1.e-6}, }, id="hf rhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "ae", "keywords": {"scf_type": "pk"}, }, id="hf rhf ae: psi4", marks=using("psi4_derqcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="hf uhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf"}, }, id="hf uhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True, "scf__thresh": 1.e-6}, }, id="hf uhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_type": "pk"}, }, id="hf uhf ae: psi4", marks=using("psi4_derqcsk")),
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_conv": 12}, }, id="hf rohf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf"}, }, id="hf rohf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True, "scf__thresh": 1.e-6}, }, id="hf rohf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_type": "pk"}, }, id="hf rohf ae: psi4", marks=using("psi4_derqcsk")),
- # yapf: enable
- ],
-)
-def test_hf_gradient_module(inp, dertype, basis, subjects, clsd_open_pmols, request):
- runner_asserter(*_processor(inp, dertype, basis, subjects, clsd_open_pmols, request, "gradient", "hf"))
-
-
-#
-# ,--. ,--.,------. ,--. ,--. ,--.
-# | '--' || .---' | '--' | ,---. ,---. ,---. `--' ,--,--.,--,--,
-# | .--. || `--, | .--. || .-. :( .-' ( .-' ,--.' ,-. || \
-# | | | || |` | | | |\ --..-' `).-' `)| |\ '-' || || |
-# `--' `--'`--' `--' `--' `----'`----' `----' `--' `--`--'`--''--'
-#
-# <<< HF Hessian
-
-
-@pytest.mark.parametrize(
- "dertype",
- [
- pytest.param(2, id="hes2"),
- # pytest.param(1, id="hes1", marks=pytest.mark.long),
- # pytest.param(0, id="hes0", marks=pytest.mark.long),
- ],
-)
-@pytest.mark.parametrize(
- "basis, subjects",
- [
- pytest.param("cc-pvdz", ["hf", "bh3p", "bh3p"], id="dz"),
- pytest.param("aug-cc-pvdz", ["h2o", "nh2", "nh2"], id="adz", marks=pytest.mark.long),
- pytest.param("cfour-qz2p", ["h2o", "nh2", "nh2"], id="qz2p", marks=pytest.mark.long),
- ],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- # yapf: disable
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"scf_conv": 12}, }, id="hf rhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="hf rhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="hf rhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "ae", "keywords": {"scf_type": "pk"}, }, id="hf rhf ae: psi4", marks=using("psi4_derqcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="hf uhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf"}, }, id="hf uhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True}, }, id="hf uhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_type": "pk"}, }, id="hf uhf ae: psi4", marks=using("psi4_derqcsk")),
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_conv": 12}, }, id="hf rohf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf", "scf__dirscf": True}, }, id="hf rohf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True, "scf__thresh": 1.e-7}, }, id="hf rohf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_type": "pk"}, "error": {2: _q6 }}, id="hf rohf ae: psi4", marks=using("psi4_mp2qcsk")),
- # yapf: enable
- ],
-)
-def test_hf_hessian_module(inp, dertype, basis, subjects, clsd_open_pmols, request):
- runner_asserter(*_processor(inp, dertype, basis, subjects, clsd_open_pmols, request, "hessian", "hf"))
-
-
-#
-# ,--. ,--.,------. ,---. ,------.
-# | `.' || .--. ''.-. \ | .---',--,--, ,---. ,--.--. ,---.,--. ,--.
-# | |'.'| || '--' | .-' .' | `--, | \| .-. :| .--'| .-. |\ ' /
-# | | | || | --' / '-. | `---.| || |\ --.| | ' '-' ' \ '
-# `--' `--'`--' '-----' `------'`--''--' `----'`--' .`- /.-' /
-# `---' `---'
-# <<< MP2 Energy
-
-
-@pytest.mark.parametrize(
- "dertype",
- [
- 0,
- ],
- ids=["ene0"],
-)
-@pytest.mark.parametrize(
- "basis, subjects",
- [
- pytest.param("cc-pvdz", ["hf", "bh3p", "bh3p"], id="dz"),
- pytest.param("aug-cc-pvdz", ["h2o", "nh2", "nh2"], id="adz"),
- pytest.param("cfour-qz2p", ["h2o", "nh2", "nh2"], id="qz2p"),
- ],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- # yapf: disable
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"scf_conv": 12}, }, id="mp2 rhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "ae", "keywords": {"mp2__nacore": 0}, }, id="mp2 rhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__thresh": 1.e-6}, "error": {"cc-pvdz": _q45}}, id="mp2 rhf ae: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="mp2 rhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "ae", "keywords": {"mp2_type": "conv"}, }, id="mp2 rhf ae: psi4", marks=using("psi4_mp2qcsk")),
- pytest.param({"call": "qchem", "reference": "rhf", "fcae": "ae", "keywords": {"N_FROZEN_CORE": 0}, }, id="mp2 rhf ae: qchem", marks=using("qchem")),
-
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "fc", "keywords": {"dropmo": 1, "scf_conv": 12}, }, id="mp2 rhf fc: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "fc", "keywords": {}, }, id="mp2 rhf fc: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__thresh": 1.e-6}, "error": {"cc-pvdz": _q45}}, id="mp2 rhf fc: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"mp2__freeze": 1}, }, id="mp2 rhf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"mp2__freeze__core": 1}, }, id="mp2 rhf fc: nwchem", marks=using("nwchem")),
- #pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"mp2__freeze__core__atomic": True}, }, id="mp2 rhf fc: nwchem", marks=using("nwchem")), # uses qcdb alias
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"mp2__freeze__atomic": {"O": 1}}, }, id="mp2 rhf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "fc", "keywords": {"freeze_core": True, "mp2_type": "conv"}, }, id="mp2 rhf fc: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "scf_conv": 12}, }, id="mp2 uhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf", "mp2__nacore": 0}, }, id="mp2 uhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="mp2 uhf ae: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True}, }, id="mp2 uhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf", "mp2_type": "conv"}, }, id="mp2 uhf ae: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"reference": "uhf", "dropmo": 1, "scf_conv": 12}, }, id="mp2 uhf fc: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "fc", "keywords": {"contrl__scftyp": "uhf"}, }, id="mp2 uhf fc: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__uhf": True, "scf__thresh": 1.0e-8},}, id="mp2 uhf fc: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"scf__uhf": True, "mp2__freeze": 1}, }, id="mp2 uhf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "fc", "keywords": {"reference": "uhf", "freeze_core": True, "mp2_type": "conv"}, }, id="mp2 uhf fc: psi4", marks=using("psi4_mp2qcsk")),
- pytest.param({"call": "qchem", "reference": "uhf", "fcae": "fc", "keywords": {"N_frozen_CORE": "fC"}, }, id="mp2 uhf fc: qchem", marks=using("qchem")),
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "scf_conv": 12}, }, id="mp2 rohf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf", "mp2__nacore": 0, "mp2__ospt": "RMP"}, }, id="mp2 rohf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__rohf": True, "scf__thresh": 1.e-8,
- "tce__thresh": 1.e-8, "tce__freeze": 0, "scf__tol2e": 1.e-10}, "wrong": {0: _w1 }}, id="mp2 rohf ae: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True}, "error": {0: _q1 }}, id="mp2 rohf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf", "mp2_type": "conv"}, }, id="mp2 rohf ae: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "keywords": {"reference": "rohf", "dropmo": 1, "scf_conv": 12}, }, id="mp2 rohf fc: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "fc", "keywords": {"contrl__scftyp": "rohf", "mp2__ospt": "RMP"}, }, id="mp2 rohf fc: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1, "scf__rohf": True, "scf__thresh": 1.0e-8},"wrong": {0: _w1 }}, id="mp2 rohf fc: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"scf__rohf": True, "mp2__freeze": 1}, "error": {0: _q1 }}, id="mp2 rohf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "fc", "keywords": {"reference": "rohf", "freeze_core": True, "mp2_type": "conv"}, }, id="mp2 rohf fc: psi4", marks=using("psi4_mp2qcsk")),
- # yapf: enable
- ],
-)
-def test_mp2_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, request):
- runner_asserter(*_processor(inp, dertype, basis, subjects, clsd_open_pmols, request, "energy", "mp2"))
-
-
-#
-# ,-----. ,-----. ,---. ,------. ,------.
-# ' .--./' .--./' .-' | .-. \ | .---',--,--, ,---. ,--.--. ,---.,--. ,--.
-# | | | | `. `-. | | \ : | `--, | \| .-. :| .--'| .-. |\ ' /
-# ' '--'\' '--'\.-' || '--' / | `---.| || |\ --.| | ' '-' ' \ '
-# `-----' `-----'`-----' `-------' `------'`--''--' `----'`--' .`- /.-' /
-# `---' `---'
-# <<< CCSD Energy
-
-
-@pytest.mark.parametrize(
- "dertype",
- [
- 0,
- ],
- ids=["ene0"],
-)
-@pytest.mark.parametrize(
- "basis, subjects",
- [
- pytest.param("cc-pvdz", ["hf", "bh3p", "bh3p"], id="dz"),
- pytest.param("aug-cc-pvdz", ["h2o", "nh2", "nh2"], id="adz"),
- pytest.param("cfour-qz2p", ["h2o", "nh2", "nh2"], id="qz2p"),
- ],
-)
-@pytest.mark.parametrize(
- "inp",
- [
- # yapf: disable
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd rhf ae: cfour-vcc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc",}, }, id="ccsd rhf ae: cfour-ecc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {"SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ncc",}, }, id="ccsd rhf ae: cfour-ncc", marks=using("cfour")),
- # pytest.param({"call": "cfour", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="ccsd rhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "ae", "keywords": {"ccinp__ncore": 0}, }, id="ccsd rhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {"qc_module": "tce"}, "error": {"cc-pvdz": _q45}}, id="ccsd rhf ae: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="ccsd rhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "ae", "keywords": {}, }, id="ccsd rhf ae: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "fc", "keywords": {"dropmo": [1], "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd rhf fc: cfour-vcc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "fc", "keywords": {"dropmo": [1], "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd rhf fc: cfour-ecc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "rhf", "fcae": "fc", "keywords": {"dropmo": [1], "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ncc"}, }, id="ccsd rhf fc: cfour-ncc", marks=using("cfour")),
- # pytest.param({"call": "cfour", "reference": "rhf", "fcae": "fc", "keywords": {"dropmo": 1}, }, id="ccsd rhf fc: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rhf", "fcae": "fc", "keywords": {}, }, id="ccsd rhf fc: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"qc_module": "tce", "tce__freeze": 1 }, "error": {"cc-pvdz": _q45}}, id="ccsd rhf fc: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rhf", "fcae": "fc", "keywords": {"ccsd__freeze": 1}, }, id="ccsd rhf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rhf", "fcae": "fc", "keywords": {"freeze_core": True}, }, id="ccsd rhf fc: psi4", marks=using("psi4_mp2qcsk")),
-
- # "cfour_occupation": [[3, 1, 1, 0], [3, 0, 1, 0]]
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd uhf ae: cfour-vcc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd uhf ae: cfour-ecc", marks=using("cfour")),
- # pytest.param({"call": "cfour", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf"}, }, id="ccsd uhf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "ae", "keywords": {"contrl__scftyp": "uhf", "ccinp__ncore": 0}, "error": {0: _q2 }}, id="ccsd uhf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="ccsd uhf ae: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "ae", "keywords": {"scf__uhf": True}, "error": {0: _q3 }}, id="ccsd uhf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "ae", "keywords": {"reference": "uhf"}, }, id="ccsd uhf ae: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"dropmo": [1], "REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd uhf fc: cfour-vcc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"dropmo": [1], "REFerence": "UHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd uhf fc: cfour-ecc", marks=using("cfour")),
- # pytest.param({"call": "cfour", "reference": "uhf", "fcae": "fc", "keywords": {"dropmo": 1, "reference": "uhf"}, }, id="ccsd uhf fc: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "uhf", "fcae": "fc", "keywords": {"contrl__scftyp": "uhf"}, "error": {0: _q2 }}, id="ccsd uhf fc: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"tce__freeze": 1, "qc_module": "tce", "scf__uhf": True, "scf__thresh": 1.0e-8}, }, id="ccsd uhf fc: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "uhf", "fcae": "fc", "keywords": {"ccsd__freeze": 1, "scf__uhf": True}, "error": {0: _q3 }}, id="ccsd uhf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "uhf", "fcae": "fc", "keywords": {"freeze_core": True, "reference": "uhf"}, }, id="ccsd uhf fc: psi4", marks=using("psi4_mp2qcsk")),
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "vcc", "print": 2}, }, id="ccsd rohf ae: cfour-vcc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "cc_program": "ecc"}, }, id="ccsd rohf ae: cfour-ecc", marks=using("cfour")),
- # pytest.param({"call": "cfour", "reference": "rohf", "fcae": "ae", "keywords": {"reference": "rohf"}, }, id="ccsd rohf ae: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "ae", "keywords": {"contrl__scftyp": "rohf", "ccinp__ncore": 0, "ccinp__maxcc": 50}, }, id="ccsd rohf ae: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"qc_module": "tce", "scf__rohf": True, "scf__thresh": 1.0e-8}, }, id="ccsd rohf ae: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "ae", "keywords": {"scf__rohf": True}, "error": {0: _q3 }}, id="ccsd rohf ae: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "ae", "sdsc": "sd", "keywords": {"reference": "rohf", "qc_module": "ccenergy"}, }, id="ccsd rohf ae: psi4", marks=using("psi4_mp2qcsk")), # TODO another way for ccenergy? (fc, too)
-
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"dropmo": [1], "REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "orbitals": 0, "cc_program": "vcc", "print": 2}, }, id="ccsd rohf fc: cfour-vcc", marks=using("cfour")),
- pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"dropmo": [1], "REFerence": "roHF", "SCF_CONV": 12, "CC_CONV": 12, "orbitals": 0, "cc_program": "ecc"}, }, id="ccsd rohf fc: cfour-ecc", marks=using("cfour")),
- # pytest.param({"call": "cfour", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"dropmo": 1, "reference": "rohf", "orbitals": 0}, }, id="ccsd rohf fc: cfour", marks=using("cfour")),
- pytest.param({"call": "gamess", "reference": "rohf", "fcae": "fc", "keywords": {"contrl__scftyp": "rohf", "ccinp__iconv": 9, "scf__conv": 9}, "wrong": {0: _w2 }}, id="ccsd rohf fc: gamess", marks=using("gamess")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"tce__freeze": 1, "qc_module": "tce", "scf__rohf": True, "scf__thresh": 1.0e-8}, }, id="ccsd rohf fc: nwchem-tce", marks=using("nwchem")),
- pytest.param({"call": "nwchem", "reference": "rohf", "fcae": "fc", "keywords": {"ccsd__freeze": 1, "scf__rohf": True}, "error": {0: _q3 }}, id="ccsd rohf fc: nwchem", marks=using("nwchem")),
- pytest.param({"call": "psi4", "reference": "rohf", "fcae": "fc", "sdsc": "sd", "keywords": {"e_convergence": 8, "r_convergence": 7, "freeze_core": True, "reference": "rohf", "qc_module": "ccenergy"}, }, id="ccsd rohf fc: psi4", marks=using("psi4_mp2qcsk")),
- # yapf: enable
- ],
-)
-def test_ccsd_energy_module(inp, dertype, basis, subjects, clsd_open_pmols, request):
- runner_asserter(*_processor(inp, dertype, basis, subjects, clsd_open_pmols, request, "energy", "ccsd"))
-
-
-###################
-
-# Notes from test_sp_mp2_rhf_full
-# TODO Molpro has frozen-core on by default. For this to pass need keyword frozen_core = False
-# pytest.param('molpro', 'aug-cc-pvdz', {}, marks=using("molpro")),
-
-# Notes from test_sp_mp2_uhf_fc
-# TODO Molpro needs a new keyword for unrestricted MP2 (otherwise RMP2 by default) and needs symmetry c1
-# pytest.param('molpro', 'aug-cc-pvdz', {"reference": "unrestricted"}, marks=using("molpro")),
-
-# Notes from sp_ccsd_rhf_ull
-# pytest.param("qchem", "aug-cc-pvdz", {"N_FROZEN_CORE": 0}, marks=using("qchem")),
-# TODO Molpro has frozen-core on by default. For this to pass need new keyword frozen_core = False
-# pytest.param('molpro', 'aug-cc-pvdz', {}, marks=using("molpro")),
-
-# Notes from sp_ccsd_rohf_full
-# pytest.param("qchem", "AUG-CC-PVDZ", {"UNRESTRICTED": False}, marks=using("qchem")),
-# TODO Molpro has frozen-core on by default. For this to pass need new keyword frozen_core = False
-# pytest.param('molpro', 'aug-cc-pvdz', {}, marks=using("molpro")),
-
-# def test_sp_ccsd_rohf_fc(method, keywords, nh2):
-# # differing std/semicanonical
-# ## from Cfour
-# #osccsdcorl = -0.1563275
-# #ssccsdcorl = -0.0365048
-# ##ssccsdcorl = -0.036502859383024
-#
-# ## from Psi4. psi & nwchem agree to 6
-# osccsd_corl = -0.152968752464362
-# ssccsd_corl = -0.036502859383024
-#
-# ## from gamess.
-# #ccsdcorl = -0.1928447371
-# #ccsdtot = -55.7775819971
-# # from Cfour
-#
-# scf_tot = -55.5847372600528120
-# mp2_tot = -55.760613403041812
-# ccsd_tot = -55.7775634749542241
-#
-# # gms CCSD correlation disagrees with Cfour, Psi4, and NWChem by ~2.e-4
-# # hf is in agreement across all programs
-# if method.startswith('gms'):
-# atol = 2.e-5
-
-
-def _processor(inp, dertype, basis, subjects, clsd_open_pmols, request, driver, method, *, scramble=None, frame=""):
- method = method
- qcprog = inp["call"]
- tnm = request.node.name
- suffix = "-fixed" if frame == "fixed" else ""
- subject = clsd_open_pmols[subjects[std_refs.index(inp["reference"])] + suffix]
-
- inpcopy = {k: v for k, v in inp.items() if k not in ["error", "wrong"]}
- if inp.get("error", False) and inp["error"].get(dertype, False):
- inpcopy["error"] = inp["error"][dertype]
- if inp.get("wrong", False) and inp["wrong"].get(dertype, False):
- inpcopy["wrong"] = inp["wrong"][dertype]
- if inp.get("error", False) and inp["error"].get(basis, False):
- inpcopy["error"] = inp["error"][basis]
- if inp.get("wrong", False) and inp["wrong"].get(basis, False):
- inpcopy["wrong"] = inp["wrong"][basis]
- inpcopy["keywords"] = {
- k: (_trans_key(qcprog, basis, k) if v == "<>" else v) for k, v in inpcopy["keywords"].items()
- }
- inpcopy["driver"] = driver
- if not any([k.lower() in _basis_keywords for k in inpcopy["keywords"]]):
- inpcopy["basis"], basis_extras = _trans_key(qcprog, basis, "qcng_basis")
- inpcopy["keywords"].update(basis_extras)
- inpcopy["scf_type"] = "pk"
- inpcopy["corl_type"] = "conv"
- inpcopy["qc_module"] = "-".join(
- [
- qcprog,
- inp["keywords"].get("qc_module", inp["keywords"].get("cc_program", inp["keywords"].get("mp2__code", ""))),
- ]
- ).strip("-")
-
- return inpcopy, subject, method, basis, tnm, scramble, frame
diff --git a/qcengine/programs/tests/test_standard_suite_ccsd(t).py b/qcengine/programs/tests/test_standard_suite_ccsd(t).py
deleted file mode 100644
index a0b453b03..000000000
--- a/qcengine/programs/tests/test_standard_suite_ccsd(t).py
+++ /dev/null
@@ -1,120 +0,0 @@
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@pytest.fixture
-def h2o():
- smol = """
- # R=0.958 A=104.5
- H 0.000000000000 1.431430901356 0.984293362719
- O 0.000000000000 0.000000000000 -0.124038860300
- H 0.000000000000 -1.431430901356 0.984293362719
- units au
-"""
- return qcel.models.Molecule.from_data(smol)
-
-
-@pytest.fixture
-def nh2():
- smol = """
- # R=1.008 #A=105.0
- 0 2
- N 0.000000000000000 0.000000000000000 -0.145912918634892
- H 0.000000000000000 -1.511214298139000 1.013682596946108
- H 0.000000000000000 1.511214298139000 1.013682596946108
- units au
-"""
- return qcel.models.Molecule.from_data(smol)
-
-
-@pytest.mark.parametrize(
- "program,basis,keywords",
- [
- pytest.param("cfour", "aug-pvdz", {"scf_conv": 12, "cc_conv": 12}, marks=using("cfour")),
- pytest.param("cfour", "aug-pvdz", {}, marks=using("cfour")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True}, marks=using("nwchem")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True, "qc_module": "tce"}, marks=using("nwchem")),
- pytest.param("psi4", "aug-cc-pvdz", {}, marks=using("psi4")),
- pytest.param("gamess", "accd", {"ccinp__ncore": 0, "contrl__ispher": 1}, marks=using("gamess")),
- ],
-)
-def test_sp_ccsd_t_rhf_full(program, basis, keywords, h2o):
- """cfour/sp-rhf-ccsd/input.dat
- #! single point CCSD(T)/adz on water
-
- """
- resi = {"molecule": h2o, "driver": "energy", "model": {"method": "ccsd(t)", "basis": basis}, "keywords": keywords}
-
- res = qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # aug-cc-pvdz
- ccsd_t_tot = -76.276030676767
-
- atol = 1.0e-6
- assert compare_values(ccsd_t_tot, res["return_result"], atol=atol)
-
-
-@pytest.mark.parametrize(
- "program,basis,keywords,errmsg",
- [
- pytest.param(
- "nwchem",
- "aug-cc-pvdz",
- {"ccsd__freeze": 1, "scf__uhf": True},
- "ccsd: nopen is not zero",
- marks=using("nwchem"),
- ),
- pytest.param(
- "gamess",
- "accd",
- {"contrl__scftyp": "uhf"},
- "CCTYP IS PROGRAMMED ONLY FOR SCFTYP=RHF OR ROHF",
- marks=using("gamess"),
- ),
- ],
-)
-def test_sp_ccsd_t_uhf_fc_error(program, basis, keywords, nh2, errmsg):
- resi = {"molecule": nh2, "driver": "energy", "model": {"method": "ccsd(t)", "basis": basis}, "keywords": keywords}
-
- with pytest.raises(qcng.exceptions.InputError) as e:
- qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert errmsg in str(e.value)
-
-
-@pytest.mark.parametrize(
- "program,basis,keywords",
- [
- pytest.param(
- "cfour",
- "aug-pvdz",
- {"reference": "rohf", "occupation": [[3, 1, 1, 0], [3, 0, 1, 0]], "scf_conv": 12, "cc_conv": 12},
- marks=using("cfour"),
- ),
- pytest.param("cfour", "aug-pvdz", {"reference": "rohf"}, marks=using("cfour")),
- # pytest.param('nwchem', 'aug-cc-pvdz', {'basis__spherical': True, 'qc_module': 'tce', 'scf__rohf': True}, marks=using("nwchem")),
- pytest.param("psi4", "aug-cc-pvdz", {"reference": "rohf"}, marks=using("psi4")),
- ],
-)
-def test_sp_ccsd_t_rohf_full(program, basis, keywords, nh2):
- resi = {"molecule": nh2, "driver": "energy", "model": {"method": "ccsd(t)", "basis": basis}, "keywords": keywords}
-
- res = qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # aug-cc-pvdz
- ccsd_t_tot = -55.752861467462
-
- atol = 1.0e-6
- assert compare_values(ccsd_t_tot, res["return_result"], atol=atol)
diff --git a/qcengine/programs/tests/test_standard_suite_hf.py b/qcengine/programs/tests/test_standard_suite_hf.py
deleted file mode 100644
index 8a6356acd..000000000
--- a/qcengine/programs/tests/test_standard_suite_hf.py
+++ /dev/null
@@ -1,158 +0,0 @@
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@pytest.fixture
-def h2o():
- smol = """
- # R=0.958 A=104.5
- H 0.000000000000 1.431430901356 0.984293362719
- O 0.000000000000 0.000000000000 -0.124038860300
- H 0.000000000000 -1.431430901356 0.984293362719
- units au
-"""
- return qcel.models.Molecule.from_data(smol)
-
-
-@pytest.fixture
-def nh2():
- smol = """
- # R=1.008 #A=105.0
- 0 2
- N 0.000000000000000 0.000000000000000 -0.145912918634892
- H 0.000000000000000 -1.511214298139000 1.013682596946108
- H 0.000000000000000 1.511214298139000 1.013682596946108
- units au
- symmetry c1
-"""
- return qcel.models.Molecule.from_data(smol)
-
-
-@pytest.mark.parametrize(
- "program,basis,keywords",
- [
- pytest.param("cfour", "aug-pvdz", {"scf_conv": 12}, marks=using("cfour")),
- pytest.param("cfour", "aug-pvdz", {}, marks=using("cfour")),
- pytest.param(
- "qcore",
- "aug-cc-pVDZ",
- {"coulomb_method": "direct_4idx", "exchange_method": "direct_4idx"},
- marks=using("qcore"),
- ),
- pytest.param("gamess", "accd", {"contrl__ispher": 1}, marks=using("gamess")),
- pytest.param("molpro", "aug-cc-pvdz", {}, marks=using("molpro")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True}, marks=using("nwchem")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True, "qc_module": "tce"}, marks=using("nwchem")),
- pytest.param("psi4", "aug-cc-pvdz", {"scf_type": "direct"}, marks=using("psi4")),
- pytest.param("qchem", "aug-cc-pvdz", {}, marks=using("qchem")),
- pytest.param("turbomole", "aug-cc-pVDZ", {}, marks=using("turbomole")),
- pytest.param("terachem_pbs", "aug-cc-pvdz", {}, marks=using("terachem_pbs")),
- ],
-)
-def test_sp_hf_rhf(program, basis, keywords, h2o):
- """cfour/sp-rhf-hf/input.dat
- #! single point HF/adz on water
-
- """
- resi = {"molecule": h2o, "driver": "energy", "model": {"method": "hf", "basis": basis}, "keywords": keywords}
-
- res = qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # aug-cc-pvdz
- scf_tot = -76.0413815332
-
- atol = 1.0e-6
- assert compare_values(scf_tot, res["return_result"], atol=atol)
-
-
-@pytest.mark.parametrize(
- "program,basis,keywords",
- [
- pytest.param(
- "cfour",
- "aug-pvdz",
- {"reference": "uhf", "occupation": [[3, 1, 1, 0], [3, 0, 1, 0]], "scf_conv": 12},
- marks=using("cfour"),
- ),
- pytest.param("cfour", "aug-pvdz", {"reference": "uhf"}, marks=using("cfour")),
- pytest.param(
- "qcore",
- "aug-cc-pVDZ",
- {"ansatz": "u", "coulomb_method": "direct_4idx", "exchange_method": "direct_4idx"},
- marks=using("qcore"),
- ),
- pytest.param("gamess", "accd", {"contrl__ispher": 1, "contrl__scftyp": "uhf"}, marks=using("gamess")),
- pytest.param("molpro", "aug-cc-pvdz", {"reference": "unrestricted"}, marks=using("molpro")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True, "scf__uhf": True}, marks=using("nwchem")),
- pytest.param(
- "nwchem",
- "aug-cc-pvdz",
- {"basis__spherical": True, "qc_module": "tce", "scf__uhf": True},
- marks=using("nwchem"),
- ),
- pytest.param("psi4", "aug-cc-pvdz", {"reference": "uhf", "scf_type": "direct"}, marks=using("psi4")),
- pytest.param("qchem", "aug-cc-pvdz", {}, marks=using("qchem")),
- pytest.param("turbomole", "aug-cc-pVDZ", {}, marks=using("turbomole")),
- ],
-)
-def test_sp_hf_uhf(program, basis, keywords, nh2):
- resi = {"molecule": nh2, "driver": "energy", "model": {"method": "hf", "basis": basis}, "keywords": keywords}
-
- res = qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # aug-cc-pvdz
- scf_tot = -55.57513805253009
-
- atol = 1.0e-6
- assert compare_values(scf_tot, res["return_result"], atol=atol)
-
-
-@pytest.mark.parametrize(
- "program,basis,keywords",
- [
- pytest.param(
- "cfour",
- "aug-pvdz",
- {"reference": "rohf", "occupation": [[3, 1, 1, 0], [3, 0, 1, 0]], "scf_conv": 12},
- marks=using("cfour"),
- ),
- pytest.param("cfour", "aug-pvdz", {"reference": "rohf"}, marks=using("cfour")),
- pytest.param("gamess", "accd", {"contrl__ispher": 1, "contrl__scftyp": "rohf"}, marks=using("gamess")),
- pytest.param("molpro", "aug-cc-pvdz", {}, marks=using("molpro")),
- pytest.param("nwchem", "aug-cc-pvdz", {"basis__spherical": True, "scf__rohf": True}, marks=using("nwchem")),
- pytest.param(
- "nwchem",
- "aug-cc-pvdz",
- {"basis__spherical": True, "qc_module": "tce", "scf__rohf": True},
- marks=using("nwchem"),
- ),
- pytest.param("psi4", "aug-cc-pvdz", {"reference": "rohf", "scf_type": "direct"}, marks=using("psi4")),
- pytest.param("qchem", "aug-cc-pvdz", {"UNRESTRICTED": False}, marks=using("qchem")),
- ],
-)
-def test_sp_hf_rohf(program, basis, keywords, nh2):
- resi = {"molecule": nh2, "driver": "energy", "model": {"method": "hf", "basis": basis}, "keywords": keywords}
-
- res = qcng.compute(resi, program, raise_error=True, return_dict=True)
-
- assert res["driver"] == "energy"
- assert "provenance" in res
- assert res["success"] is True
-
- # aug-cc-pvdz
- scf_tot = -55.570724348574
-
- atol = 1.0e-6
- assert compare_values(scf_tot, res["return_result"], atol=atol)
diff --git a/qcengine/programs/tests/test_terachem.py b/qcengine/programs/tests/test_terachem.py
deleted file mode 100644
index 8a10c2b08..000000000
--- a/qcengine/programs/tests/test_terachem.py
+++ /dev/null
@@ -1,54 +0,0 @@
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_recursive
-
-import qcengine as qcng
-from qcengine.testing import qcengine_records, using
-
-# Prep globals
-terachem_info = qcengine_records("terachem")
-
-
-@pytest.mark.parametrize("test_case", terachem_info.list_test_cases())
-def test_terachem_output_parser(test_case):
- # Get output file data
- data = terachem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- output = qcng.get_program("terachem", check=False).parse_output(data, inp).dict()
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"]).dict()
-
- # Forgiving molecule since it is now sparse
- assert compare_recursive(output_ref, output, forgive={"stdout", "provenance", "molecule"})
-
-
-@pytest.mark.parametrize("test_case", terachem_info.list_test_cases())
-def test_terachem_input_formatter(test_case):
- # Get input file data
- data = terachem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # TODO add actual comparison of generated input file
- input_file = qcng.get_program("terachem", check=False).build_input(inp, qcng.get_config())
- assert input_file.keys() >= {"commands", "infiles"}
-
-
-@using("terachem")
-@pytest.mark.parametrize("test_case", terachem_info.list_test_cases())
-def test_terachem_executor(test_case):
- # Get input file data
- data = terachem_info.get_test_data(test_case)
- inp = qcel.models.AtomicInput.parse_raw(data["input.json"])
-
- # Run Terachem
- result = qcng.compute(inp, "terachem")
- # result = qcng.get_program('terachem').compute(inp, qcng.get_config())
- assert result.success is True
-
- # Get output file data
- output_ref = qcel.models.AtomicResult.parse_raw(data["output.json"])
-
- atol = 1e-6
- if result.driver == "gradient":
- atol = 1e-3
- assert compare_recursive(output_ref.return_result, result.return_result, atol=atol)
diff --git a/qcengine/programs/tests/test_terachem_pbs.py b/qcengine/programs/tests/test_terachem_pbs.py
deleted file mode 100644
index 76831db18..000000000
--- a/qcengine/programs/tests/test_terachem_pbs.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import pytest
-
-from qcengine.programs.terachem_pbs import TeraChemPBSHarness
-
-
-def test_found_no_tcpb_installed(monkeypatch):
- # Empty sys.path so that no external packages can be found in case tcpb is installed
- with monkeypatch.context() as m:
- m.setattr("sys.path", [])
- harness = TeraChemPBSHarness()
- with pytest.raises(ModuleNotFoundError):
- harness.found(raise_error=True)
- assert harness.found() is False
diff --git a/qcengine/programs/tests/test_turbomole.py b/qcengine/programs/tests/test_turbomole.py
deleted file mode 100644
index e372f2c76..000000000
--- a/qcengine/programs/tests/test_turbomole.py
+++ /dev/null
@@ -1,211 +0,0 @@
-import numpy as np
-import pytest
-import qcelemental
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.programs.turbomole.harvester import parse_hessian
-from qcengine.testing import using
-
-
-@pytest.fixture
-def h2o():
- mol = qcelemental.models.Molecule.from_data(
- """
- O 0.000000000000 0.000000000000 -0.068516245955
- H 0.000000000000 -0.790689888800 0.543701278274
- H 0.000000000000 0.790689888800 0.543701278274
- """
- )
- return mol
-
-
-@pytest.fixture
-def h2o_ricc2_def2svp():
- """NumForce calls only make sense for stationary points. So this
- geometry was optimized at the ricc2/def2-svp level of theory and
- can be used to run NumForce with ricc2."""
-
- mol = qcelemental.models.Molecule.from_data(
- """
- O 0.0000000 0.0000000 -0.0835835
- H 0.7501772 0.0000000 0.5210589
- H -0.7501772 0.0000000 0.5210589
- """
- )
- return mol
-
-
-@pytest.mark.parametrize(
- "method, keywords, ref_energy",
- [
- pytest.param("hf", {}, -75.95536954370, marks=using("turbomole")),
- pytest.param("pbe0", {"grid": "m5"}, -76.27371135900, marks=using("turbomole")),
- pytest.param("ricc2", {}, -76.1603807755, marks=using("turbomole")),
- pytest.param("rimp2", {}, -76.1593614075, marks=using("turbomole")),
- pytest.param(
- "hf",
- {"scf_conv": 4, "scf_iters": 1},
- -75.95536954370,
- marks=[using("turbomole"), pytest.mark.xfail(raises=AssertionError, strict=True)],
- ),
- ],
-)
-def test_turbomole_energy(method, keywords, ref_energy, h2o):
- resi = {"molecule": h2o, "driver": "energy", "model": {"method": method, "basis": "def2-SVP"}, "keywords": keywords}
-
- res = qcng.compute(resi, "turbomole", raise_error=True, return_dict=True)
-
- assert res["driver"] == "energy"
- assert res["success"] is True
-
- assert compare_values(ref_energy, res["return_result"])
-
-
-@pytest.mark.parametrize(
- "method, keywords, ref_norm",
- [
- pytest.param("hf", {}, 0.099340, marks=using("turbomole")),
- pytest.param("pbe0", {"grid": "m5"}, 0.0606266, marks=using("turbomole")),
- pytest.param("ricc2", {}, 0.059378, marks=using("turbomole")),
- pytest.param("rimp2", {}, 0.061576, marks=using("turbomole")),
- ],
-)
-def test_turbomole_gradient(method, keywords, ref_norm, h2o):
- resi = {
- "molecule": h2o,
- "driver": "gradient",
- "model": {"method": method, "basis": "def2-SVP"},
- "keywords": keywords,
- }
-
- res = qcng.compute(resi, "turbomole", raise_error=True)
-
- assert res.driver == "gradient"
- assert res.success is True
- assert res.properties.return_energy
-
- grad = res.return_result
- grad_norm = np.linalg.norm(grad)
- assert compare_values(ref_norm, grad_norm)
-
-
-@using("turbomole")
-def test_turbomole_ri_dsp(h2o):
- resi = {
- "molecule": h2o,
- "driver": "energy",
- "model": {"method": "b-p", "basis": "def2-SVP"},
- "keywords": {"ri": True, "d3bj": True},
- }
-
- res = qcng.compute(resi, "turbomole", raise_error=True)
-
- assert res.driver == "energy"
- assert res.success is True
-
- energy = res.return_result
- ref_energy = -76.36275642866
- assert compare_values(ref_energy, energy)
-
-
-def assert_hessian(H, ref_eigvals, ref_size):
- w, v = np.linalg.eigh(H)
- last_eigvals = w[-3:]
- # Hessian must be symmetric
- np.testing.assert_allclose(H, H.T)
- # Check eigenvalues
- np.testing.assert_allclose(last_eigvals, ref_eigvals)
- # Hessian must be of shape (3N x 3N)
- assert H.shape == (ref_size, ref_size)
-
-
-@using("turbomole")
-@pytest.mark.parametrize(
- "method, keywords, ref_eigvals",
- [
- ("hf", {}, (2.00771683e-01, 7.77977644e-01, 9.91091318e-01)),
- ("pbe0", {"grid": "m5"}, (1.72092719e-01, 7.38603449e-01, 9.73783598e-01)),
- ("b-p", {"grid": "m5", "ri": True}, (1.59729409e-01, 7.21364827e-01, 9.63399519e-01)),
- ],
-)
-def test_turbomole_hessian(method, keywords, ref_eigvals, h2o):
- resi = {
- "molecule": h2o,
- "driver": "hessian",
- "model": {
- "method": method,
- "basis": "def2-SVP",
- },
- "keywords": keywords,
- }
-
- res = qcng.compute(resi, "turbomole", raise_error=True)
- H = res.return_result
- size = h2o.geometry.size
-
- assert res.driver == "hessian"
- assert res.success is True
- assert res.properties.return_energy
- assert_hessian(H, ref_eigvals, size)
-
-
-@using("turbomole")
-@pytest.mark.parametrize(
- "method, keywords, ref_eigvals",
- [
- ("ricc2", {}, (1.65405531e-01, 9.63690706e-01, 1.24676634e00)),
- ],
-)
-def test_turbomole_num_hessian(method, keywords, ref_eigvals, h2o_ricc2_def2svp):
- resi = {
- "molecule": h2o_ricc2_def2svp,
- "driver": "hessian",
- "model": {
- "method": method,
- "basis": "def2-SVP",
- },
- "keywords": keywords,
- }
-
- res = qcng.compute(resi, "turbomole", raise_error=True)
- H = res.return_result
-
- size = h2o_ricc2_def2svp.geometry.size
-
- assert res.driver == "hessian"
- assert res.success is True
- assert res.properties.return_energy
- assert_hessian(H, ref_eigvals, size)
-
-
-@pytest.fixture
-def h2o_nprhessian():
- return """$nprhessian
- 1 1 0.6142699252 -0.0000000000 0.0000000000 -0.3071349626 -0.2479448514
- 1 2 -0.0000000000 -0.3071349626 0.2479448514 -0.0000000000
- 2 1 -0.0000000000 0.4365036678 0.0000000000 -0.1885017686 -0.2182518339
- 2 2 -0.0000000000 0.1885017686 -0.2182518339 0.0000000000
- 3 1 0.0000000000 0.0000000000 -0.0000524175 -0.0000000000 -0.0000000000
- 3 2 0.0000262088 -0.0000000000 0.0000000000 0.0000262088
- 4 1 -0.3071349626 -0.1885017686 -0.0000000000 0.3389423895 0.2182233100
- 4 2 0.0000000000 -0.0318074269 -0.0297215414 -0.0000000000
- 5 1 -0.2479448514 -0.2182518339 -0.0000000000 0.2182233100 0.2092172237
- 5 2 0.0000000000 0.0297215414 0.0090346102 0.0000000000
- 6 1 -0.0000000000 -0.0000000000 0.0000262088 0.0000000000 0.0000000000
- 6 2 -0.0000125560 -0.0000000000 0.0000000000 -0.0000136528
- 7 1 -0.3071349626 0.1885017686 -0.0000000000 -0.0318074269 0.0297215414
- 7 2 -0.0000000000 0.3389423895 -0.2182233100 0.0000000000
- 8 1 0.2479448514 -0.2182518339 0.0000000000 -0.0297215414 0.0090346102
- 8 2 0.0000000000 -0.2182233100 0.2092172237 -0.0000000000
- 9 1 -0.0000000000 0.0000000000 0.0000262088 -0.0000000000 0.0000000000
- 9 2 -0.0000136528 0.0000000000 -0.0000000000 -0.0000125560
- $end"""
-
-
-def test_turbomole_parse_hessian(h2o_nprhessian):
- """Test parsing of unproject Turbomole Hessian for water."""
- hessian = parse_hessian(h2o_nprhessian)
- assert hessian.shape == (9, 9)
- eigvals, _ = np.linalg.eigh(hessian)
- assert eigvals[-1] == pytest.approx(1.12157030e00)
diff --git a/qcengine/programs/tests/test_xtb.py b/qcengine/programs/tests/test_xtb.py
deleted file mode 100644
index 86148ce06..000000000
--- a/qcengine/programs/tests/test_xtb.py
+++ /dev/null
@@ -1,444 +0,0 @@
-"""
-Testing for the extended tight binding (xtb) program harness.
-
-Most of the tests use mindless molecules for the diversity of element species
-to test as much different interactions as possible.
-"""
-
-import numpy as np
-import pytest
-import qcelemental as qcel
-from qcelemental.testing import compare_recursive
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@using("xtb")
-def test_xtb_task_gfn1xtb_m01():
-
- thr = 1.0e-7
-
- return_result = np.array(
- [
- [-0.000358030800412827, +0.000500962437171796, -0.009256666294614777],
- [+0.001228927299439432, +0.000322925070197139, +0.002327951513695912],
- [-0.000336383869223903, +0.023413253286994400, -0.003233956461896982],
- [+0.004257485938529293, -0.003712584842768384, +0.000112655448628981],
- [+0.001349484431325273, +0.001591703446467543, -0.001444564232184169],
- [+0.001902096016850091, -0.010806282150986885, -0.002612898358134064],
- [-0.000694337971868170, -0.003558134599236037, +0.002566433298563669],
- [-0.003819207888143676, -0.000529277869208852, +0.004041924390207515],
- [-0.000170900544431631, +0.009573597947311165, +0.008463731042553293],
- [+0.004036505931939967, +0.003025020761338415, -0.004557936832112239],
- [+0.004790375712217767, -0.006895073623195738, +0.006111995172986280],
- [-0.001527116100844721, -0.005269034163367844, -0.008340510436175520],
- [-0.005441057023457164, +0.003102606807119279, +0.000817922187552893],
- [-0.003996677758010005, -0.021839390583571504, +0.010361632086933262],
- [-0.003219908482914395, +0.017669626267348096, -0.011084538678920158],
- [+0.001998745109004805, -0.006589918191612544, +0.005726826152916107],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-01"),
- model={"method": "GFN1-xTB"},
- driver="gradient",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn1xtb_m02():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [+0.0030701065605734, -0.0002868799003678, -0.0027410974319138],
- [-0.0088629069947518, +0.0107644916504071, -0.0022851679479647],
- [-0.0022557927039338, +0.0097846218878783, +0.0082851159007886],
- [-0.0077313130066463, +0.0051272865317215, -0.0113382914323220],
- [-0.0056136016465032, -0.0142776861097860, -0.0087142303224132],
- [-0.0002886024284553, -0.0097634247790545, +0.0076436761747340],
- [+0.0018264919145715, -0.0006763806034670, +0.0014564482472876],
- [+0.0076140201508601, -0.0046761007465963, +0.0001723200093288],
- [-0.0149881572808628, -0.0032937272168366, +0.0287922167009266],
- [+0.0086150890774961, +0.0015081700859065, +0.0027847818912378],
- [+0.0117238707826711, -0.0012461659655145, -0.0006573178440729],
- [-0.0070967442352033, -0.0038359045518911, -0.0046752059918041],
- [+0.0103475500130377, +0.0070999031854269, +0.0075036436034086],
- [+0.0048130271334382, -0.0072967572754967, +0.0021987765873840],
- [-0.0062043239425508, -0.0083018326109514, -0.0061290889642350],
- [+0.0050312866062591, +0.0193703864186214, -0.0222965791803703],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-02"),
- model={"method": "GFN1-xTB"},
- driver="gradient",
- keywords={
- "accuracy": 0.1,
- "electronic_temperature": 500.0,
- },
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn1xtb_m03():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [+0.010871358951482300, +0.004305794599339098, -0.019573836237906372],
- [+0.009678292282897322, +0.000426352757690409, +0.002515056015587392],
- [+0.001466416808346703, +0.001883246716371389, -0.000305228304878110],
- [-0.008120495156064160, +0.002564316083979744, -0.005119006489452139],
- [-0.000358357509908501, -0.001936784273655625, -0.002535739405639419],
- [+0.015070726015984316, +0.000278829270926101, +0.009656901918435126],
- [-0.015351695279260991, -0.001257824054680808, +0.018629896846315233],
- [-0.003076325534402210, +0.005496614140839041, +0.005850232528002299],
- [+0.001968655423412034, -0.000723978488125643, -0.000559968512005294],
- [+0.002806198234445627, +0.002329417172370834, +0.001133651685314686],
- [-0.000176086574912473, +0.002193520870220370, -0.001163714333146813],
- [-0.006971737078166070, +0.005435531350132502, +0.001219924082264835],
- [-0.013489242089583017, -0.016619202727944704, -0.012805207719079817],
- [-0.003224316220896839, -0.002988773757177052, +0.004070779421829900],
- [+0.002236894208466977, -0.002020664316295901, +0.002364564453769414],
- [+0.006669713518158995, +0.000633604656010196, -0.003378305949410931],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-03"),
- model={"method": "GFN1-xTB"},
- driver="gradient",
- keywords={
- "solvent": "chcl3",
- },
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn1xtb_m04():
-
- thr = 1.0e-6
-
- return_result = {
- "dipole": np.array([-0.6691734918153486, +0.2578255474279201, -0.1528081650463131]),
- "mulliken_charges": np.array(
- [
- -0.0370404774665983,
- +0.0015354242523749,
- -0.0660191018009798,
- -0.3208773810551390,
- +0.5826454505938811,
- -0.0279475114762505,
- +0.0559054711521047,
- +0.1201622158540841,
- -0.0587401615749275,
- -0.0832435708476980,
- -0.2022582682225247,
- +0.3853632328414913,
- +0.1003824016037064,
- -0.5199127882822523,
- +0.0476813673425397,
- +0.0223636970861876,
- ]
- ),
- }
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-04"),
- model={"method": "GFN1-xTB"},
- driver="properties",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result["dipole"], abs=thr) == return_result["dipole"]
- assert pytest.approx(atomic_result.return_result["mulliken_charges"], abs=thr) == return_result["mulliken_charges"]
- assert "mayer_indices" in atomic_result.return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn1xtb_m05():
-
- thr = 1.0e-8
-
- return_result = -29.038403257613453
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-05"),
- model={"method": "GFN1-xTB"},
- driver="energy",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
- assert "xtb" in atomic_result.extras
-
-
-@using("xtb")
-def test_xtb_task_gfn2xtb_m01():
-
- thr = 1.0e-7
-
- return_result = np.array(
- [
- [+1.7603980711827444e-03, -1.0892843650556535e-03, -1.4000925937447548e-02],
- [+7.2828551455461962e-03, -3.7216708563619287e-04, -1.7598863191610557e-03],
- [-4.3636138516365761e-04, +3.0781059500885385e-02, -2.4027777032994326e-03],
- [-4.9615553784293671e-03, +2.4184700438294312e-03, -1.8273143544031206e-03],
- [-3.1941473089998765e-03, -2.0177319546503510e-03, +6.0230398095918502e-03],
- [+3.5807344500847016e-03, -2.3730921963802166e-03, -2.0271824139507818e-03],
- [+1.0323930350176554e-03, +3.3301666520180575e-04, +2.6197885276710883e-03],
- [+6.4140580960895879e-03, -1.0424376542844720e-02, +1.7654830175669090e-02],
- [+2.1841001857333085e-03, +8.5100245114072097e-03, -6.7175792414255900e-03],
- [+8.1719403581595913e-03, +7.3797085798300455e-03, -7.5901731542113542e-03],
- [+1.1557950311395539e-03, -4.1907703068314668e-04, +1.7047910821890132e-03],
- [-4.5861988817335895e-03, -2.1269884595520816e-02, -1.4002736618139961e-02],
- [+1.1542155825459586e-04, +8.6721397831818186e-03, +3.9953426868203148e-03],
- [-1.8552117264088834e-03, -2.0185103100139296e-02, +1.3339454522070686e-02],
- [-2.9643338287258375e-03, -4.2193920947953519e-03, +6.6460843884674770e-06],
- [-1.3699887421746685e-02, +4.2756898813700889e-03, +4.9846828536382450e-03],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-01"),
- model={"method": "GFN2-xTB"},
- driver="gradient",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn2xtb_m02():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [+3.8555105053060808e-03, -2.2109578613126895e-03, -9.1601564191558012e-03],
- [+1.0970312247719392e-03, +1.3996306191282932e-02, -5.3472776842492294e-03],
- [-8.0585598914535359e-03, -2.3489450628686069e-03, +1.9653181376190359e-02],
- [-4.4938919015412053e-03, -4.5670953184344815e-04, -1.5746266791920045e-02],
- [+4.6136585412341665e-03, -8.3294935486403383e-03, -6.7825684743429791e-03],
- [-4.0644714892632226e-05, -7.6816568320453270e-03, +7.7872915896373372e-03],
- [+7.8804497759029323e-04, -4.9765353392257116e-03, +5.9586247342918366e-03],
- [+5.3161448621741650e-04, +5.1936947267340041e-03, +8.0564751525841038e-03],
- [-9.2290119389112895e-03, -1.5299670210190750e-02, -2.1407890260109627e-02],
- [+6.9445890241134674e-03, -3.7434087434538437e-04, +5.8421593307521448e-03],
- [+3.5614525125536099e-03, +7.6527534931603086e-03, +4.8040792443537744e-03],
- [-1.1121288887907211e-02, -6.4733203973410449e-03, +7.1241182667347342e-04],
- [+5.0828298212722894e-03, +1.2142928028482842e-02, +9.1892848637567797e-04],
- [+1.5094869632378746e-03, -2.3321110942833823e-03, +4.8244261495168301e-03],
- [+9.2444414237502198e-03, +1.2118975270529935e-03, -1.2700207457819403e-03],
- [-4.2852621453414374e-03, +1.0286160785383667e-02, +1.1566024851840597e-03],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-02"),
- model={"method": "GFN2-xTB"},
- driver="gradient",
- keywords={
- "accuracy": 0.1,
- "electronic_temperature": 500.0,
- },
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn2xtb_m03():
-
- thr = 1.0e-8
-
- return_result = np.array(
- [
- [+0.0070908037236785, -0.0040563410767159, -0.0079330935995817],
- [+0.0064835107069477, -0.0016161473196322, +0.0038446333826145],
- [+0.0015491578122356, +0.0017538999500591, +0.0023145617382237],
- [-0.0072614197876866, -0.0045215532254949, -0.0067907981445658],
- [-0.0057299589336137, +0.0153458988830468, -0.0096315407254071],
- [-0.0062312740620834, +0.0050171730261916, -0.0018412044311888],
- [-0.0052673804035766, -0.0144351034054319, +0.0059596174012332],
- [-0.0008246247806272, -0.0004517884963982, +0.0019491982249825],
- [+0.0028511549191436, -0.0014262045374241, -0.0002516625700107],
- [+0.0055212287468860, -0.0022357394178147, +0.0016154868861744],
- [+0.0075014451430198, +0.0015965713047808, +0.0018304027741802],
- [-0.0086660517089299, +0.0117934694403132, +0.0058233201373099],
- [-0.0046887504989642, -0.0043855041726185, -0.0061676141160093],
- [-0.0022854923487687, -0.0025230789065119, +0.0037380292185573],
- [+0.0059302325276057, -0.0013873942542295, +0.0045321840851373],
- [+0.0040274189447333, +0.0015318422078802, +0.0010084797383503],
- ]
- )
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-03"),
- model={"method": "GFN2-xTB"},
- driver="gradient",
- keywords={
- "solvent": "chcl3",
- },
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn2xtb_m04():
-
- thr = 1.0e-6
-
- return_result = {
- "dipole": np.array([-0.6566343439892861, +0.3553407721120402, -0.0768293825933504]),
- "mulliken_charges": np.array(
- [
- -0.0899891425563753,
- +0.0942167152764677,
- -0.1493904808718346,
- -0.2991140763033323,
- +0.4855285445087461,
- -0.0683158235225622,
- +0.0149989651434585,
- +0.2793618023805854,
- -0.1240704542128441,
- -0.0936742758503764,
- -0.2190620093200218,
- +0.2145448240515186,
- +0.3061608537234609,
- -0.3861071843835874,
- -0.0015140477313429,
- +0.0364257896680373,
- ]
- ),
- }
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-04"),
- model={"method": "GFN2-xTB"},
- driver="properties",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result["dipole"], abs=thr) == return_result["dipole"]
- assert pytest.approx(atomic_result.return_result["mulliken_charges"], abs=thr) == return_result["mulliken_charges"]
- assert "mayer_indices" in atomic_result.return_result
-
-
-@using("xtb")
-def test_xtb_task_gfn2xtb_m05():
-
- thr = 1.0e-8
-
- return_result = -27.73598761779656
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("mindless-05"),
- model={"method": "GFN2-xTB"},
- driver="energy",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert atomic_result.success
- assert pytest.approx(atomic_result.return_result, abs=thr) == return_result
- assert "xtb" in atomic_result.extras
-
-
-@using("xtb")
-def test_xtb_task_unknown_method():
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("water"),
- model={"method": "GFN-xTB"},
- driver="energy",
- )
- error = qcel.models.ComputeError(error_type="input_error", error_message="Invalid method GFN-xTB provided in model")
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert not atomic_result.success
- assert atomic_result.error == error
-
-
-@using("xtb")
-def test_xtb_task_unsupported_driver():
-
- atomic_input = qcel.models.AtomicInput(
- molecule=qcng.get_molecule("water"),
- model={"method": "GFN2-xTB"},
- driver="hessian",
- )
- error = qcel.models.ComputeError(
- error_type="input_error", error_message="Calculation succeeded but invalid driver request provided"
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert not atomic_result.success
- assert atomic_result.error == error
-
-
-@using("xtb")
-def test_xtb_task_cold_fusion():
-
- atomic_input = qcel.models.AtomicInput(
- molecule={
- "symbols": ["Li", "Li", "Li", "Li"],
- "geometry": [
- [-1.58746019997201, +1.58746019997201, +1.58746019997201],
- [-1.58746019997201, +1.58746019997201, +1.58746019997201],
- [-1.58746019997201, -1.58746019997201, -1.58746019997201],
- [+1.58746019997201, +1.58746019997201, -1.58746019997201],
- ],
- "validated": True, # Force a nuclear fusion input, to make xtb fail
- },
- model={"method": "GFN2-xTB"},
- driver="energy",
- )
- error = qcel.models.ComputeError(
- error_type="runtime_error",
- error_message="Setup of molecular structure failed:\n-1- xtb_api_newMolecule: Could not generate molecular structure",
- )
-
- atomic_result = qcng.compute(atomic_input, "xtb")
-
- assert not atomic_result.success
- assert atomic_result.error == error
diff --git a/qcengine/programs/torchani.py b/qcengine/programs/torchani.py
deleted file mode 100644
index 2e81a5d9e..000000000
--- a/qcengine/programs/torchani.py
+++ /dev/null
@@ -1,191 +0,0 @@
-"""
-Calls the TorchANI package.
-"""
-
-from typing import TYPE_CHECKING, Dict
-
-from qcelemental.models import AtomicResult, Provenance
-from qcelemental.util import parse_version, safe_version, which_import
-
-from ..exceptions import InputError, ResourceError
-from ..units import ureg
-from .model import ProgramHarness
-
-if TYPE_CHECKING:
- from qcelemental.models import AtomicInput
-
- from ..config import TaskConfig
-
-
-class TorchANIHarness(ProgramHarness):
-
- _CACHE = {}
-
- _defaults = {
- "name": "TorchANI",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which_import(
- "torchani",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `pip install torchani`.",
- )
-
- def get_version(self) -> str:
- self.found(raise_error=True)
-
- which_prog = which_import("torchani")
- if which_prog not in self.version_cache:
- import torchani
-
- self.version_cache[which_prog] = safe_version(torchani.__version__)
-
- return self.version_cache[which_prog]
-
- def get_model(self, name: str) -> "torchani.models.BuiltinModels":
- name = name.lower()
-
- if name in self._CACHE:
- return self._CACHE[name]
-
- import torch
- import torchani
-
- # graft a custom forward pass to Ensemble class
- def ensemble_forward(self, species_input):
- outputs = torch.cat([x(species_input)[1] for x in self])
- species, _ = species_input
- return species, outputs
-
- torchani.nn.Ensemble.forward = ensemble_forward
-
- ani_models = {
- "ani1x": torchani.models.ANI1x,
- "ani1ccx": torchani.models.ANI1ccx,
- }
-
- if parse_version(self.get_version()) >= parse_version("2.0"):
- ani_models["ani2x"] = torchani.models.ANI2x
-
- try:
- self._CACHE[name] = ani_models[name]()
- except KeyError:
- raise InputError(f"TorchANI only accepts methods: {ani_models.keys()}")
-
- return self._CACHE[name]
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- """
- Runs TorchANI in FF typing
- """
-
- # Check if existings and version
- self.found(raise_error=True)
- if parse_version(self.get_version()) < parse_version("0.9"):
- raise ResourceError("QCEngine's TorchANI wrapper requires version 0.9 or greater.")
-
- import numpy as np
- import torch
- import torchani
-
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
-
- # Failure flag
- ret_data = {"success": False}
-
- # Build model
- method = input_data.model.method
- model = self.get_model(method)
-
- # Build species
- species = input_data.molecule.symbols
-
- known_sym = {"H", "C", "N", "O"}
- if method.lower() == "ani2x":
- known_sym.update({"S", "F", "Cl"})
-
- unknown_sym = set(species) - known_sym
- if unknown_sym:
- raise InputError(f"TorchANI model '{method}' does not support symbols: {unknown_sym}.")
-
- num_atoms = len(species)
- species = model.species_to_tensor(species).to(device).unsqueeze(0)
-
- # Build coord array
- geom_array = input_data.molecule.geometry.reshape(1, -1, 3) * ureg.conversion_factor("bohr", "angstrom")
- coordinates = torch.tensor(geom_array.tolist(), requires_grad=True, device=device)
- model.to(device)
-
- _, energy_array = model((species, coordinates))
- energy = energy_array.mean()
- ensemble_std = energy_array.std()
- ensemble_scaled_std = ensemble_std / np.sqrt(num_atoms)
-
- ret_data["properties"] = {"return_energy": energy.item()}
-
- if input_data.driver == "energy":
- ret_data["return_result"] = ret_data["properties"]["return_energy"]
- elif input_data.driver == "gradient":
- derivative = torch.autograd.grad(energy.sum(), coordinates)[0].squeeze()
- ret_data["return_result"] = (
- np.asarray(derivative.cpu() * ureg.conversion_factor("angstrom", "bohr")).ravel().tolist()
- )
- elif input_data.driver == "hessian":
- hessian = torchani.utils.hessian(coordinates, energies=energy)
- ret_data["return_result"] = np.asarray(hessian.cpu())
- else:
- raise InputError(
- f"TorchANI can only compute energy, gradient, and hessian driver methods. Found {input_data.driver}."
- )
-
- #######################################################################
- # Description of the quantities stored in `extras`
- #
- # ensemble_energies:
- # An energy array of all members (models) in an ensemble of models
- #
- # ensemble_energy_avg:
- # The average value of energy array which is also recorded with as
- # `energy` in QCEngine
- #
- # ensemble_energy_std:
- # The standard deviation of energy array
- #
- # ensemble_per_root_atom_disagreement:
- # The standard deviation scaled by the square root of N, with N being
- # the number of atoms in the molecule. This is the quantity used in
- # the query-by-committee (QBC) process in active learning to infer
- # the reliability of the models in an ensemble, and produce more data
- # points in the regions where this quantity is below a certain
- # threshold (inclusion criteria)
- ret_data["extras"] = input_data.extras.copy()
- ret_data["extras"].update(
- {
- "ensemble_energies": energy_array.cpu().detach().numpy(),
- "ensemble_energy_avg": energy.item(),
- "ensemble_energy_std": ensemble_std.item(),
- "ensemble_per_root_atom_disagreement": ensemble_scaled_std.item(),
- }
- )
-
- ret_data["provenance"] = Provenance(
- creator="torchani", version="unknown", routine="torchani.builtin.aev_computer"
- )
-
- ret_data["schema_name"] = "qcschema_output"
- ret_data["success"] = True
-
- # Form up a dict first, then sent to BaseModel to avoid repeat kwargs which don't override each other
- return AtomicResult(**{**input_data.dict(), **ret_data})
diff --git a/qcengine/programs/turbomole/__init__.py b/qcengine/programs/turbomole/__init__.py
deleted file mode 100644
index 6e00a2d00..000000000
--- a/qcengine/programs/turbomole/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .runner import TurbomoleHarness
diff --git a/qcengine/programs/turbomole/define.py b/qcengine/programs/turbomole/define.py
deleted file mode 100644
index 11f0c9b3f..000000000
--- a/qcengine/programs/turbomole/define.py
+++ /dev/null
@@ -1,224 +0,0 @@
-import itertools as it
-from subprocess import PIPE, Popen, TimeoutExpired
-from typing import Any, Dict, Optional
-
-from qcengine.exceptions import InputError
-
-from .methods import KEYWORDS, METHODS
-
-
-def decode_define(str_: str) -> str:
- """Decode define output.
-
- Depending on the employed basis set the encoding may differ.
- """
- try:
- str_ = str_.decode("utf-8")
- except UnicodeDecodeError:
- # Some of the basis files (cbas, I'm looking at you ...) are saved
- # in ISO-8859-15 but most of them are in UTF-8. Decoding will
- # crash in the former cases so here we try the correct decoding.
- str_ = str_.decode("latin-1")
- return str_
-
-
-def execute_define(stdin: str, cwd: Optional["Path"] = None) -> str:
- """Call define with the input define in stdin."""
-
- # TODO: replace this with a call to the default execute provided by QCEngine
- # if possible. May be difficult though, as we have to pipe in stdin and
- # be careful with the encoding.
-
- # We cant use univeral_newlines=True or text=True in Popen as some of the
- # data that define returns isn't proper UTF-8, so the decoding will crash.
- # We will decode it later on manually.
- with Popen("define", stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=cwd) as proc:
- try:
- # stdout, _ = proc.communicate(str.encode(stdin), timeout=30)
- stdout, _ = proc.communicate(str.encode(stdin), timeout=15)
- stdout = decode_define(stdout)
- except TimeoutExpired:
- raise InputError(f"define call timed out!")
- # TODO: How to get the stdout when define times out? Calling
- # communiate may also result in an indefinite hang so I disabled it
- # for now...
- # # Retrieve output of timed out define call
- # stdout, stderr = proc.communicate()
- # stdout = decode_define(stdout)
- # stderr = decode_define(stderr)
- # # Attach stdout and stderr of proc to error, so they can be
- # # accessed later on.
- # error.stdout = stdout
- # error.stderr = stdout
- # raise error
- proc.terminate()
-
- return stdout
-
-
-def prepare_stdin(
- method: str, basis: str, keywords: Dict[str, Any], charge: int, mult: int, geoopt: Optional[str] = ""
-) -> str:
- """Prepares a str that can be sent to define to produce the desired
- input for Turbomole."""
-
- # Load data from keywords
- unrestricted = keywords.get("unrestricted", False)
- grid = keywords.get("grid", "m3")
- scf_conv = keywords.get("scf_conv", 8)
- scf_iters = keywords.get("scf_iters", 150)
-
- methods_flat = list(it.chain(*[m for m in METHODS.values()]))
- if method not in methods_flat:
- raise InputError(f"Method {method} not in supported methods " f"{methods_flat}!")
-
- # This variable may contain substitutions that will be made to
- # the control file after it was created from a define call, e.g.
- # setting XC functionals that aren't hardcoded in define etc.
- subs = None
-
- def occ_num_mo_data(charge: int, mult: int, unrestricted: Optional[bool] = False) -> str:
- """Handles the 'Occupation Number & Molecular Orbital' section
- of define. Sets appropriate charge and multiplicity in the
- system and decided between restricted and unrestricted calculation.
-
- RHF and UHF are supported. ROHF could be implemented later on
- by using the 's' command to list the available MOs and then
- close the appropriate number of MOs to doubly occupied MOs
- by 'c' by comparing the number of total MOs and the desired
- multiplicity."""
-
- # Do unrestricted calculation if explicitly requested or mandatory
- unrestricted = unrestricted or (mult != 1)
- unpaired = mult - 1
- charge = int(charge)
-
- occ_num_mo_data_stdin = f"""eht
- y
- {charge}
- y
- """
- if unrestricted:
- # Somehow Turbomole/define asks us if we want to write
- # natural orbitals... we don't want to.
- occ_num_mo_data_stdin = f"""eht
- y
- {charge}
- n
- u {unpaired}
- *
- n
- """
- return occ_num_mo_data_stdin
-
- def set_method(method, grid):
- if method == "hf":
- method_stdin = ""
- elif method in METHODS["ricc2"]:
- # Setting geoopt in $ricc2 will make the ricc2 module to produce
- # a gradient.
- # Drop the 'ri'-prefix of the method string.
- geoopt_stdin = f"geoopt {method[2:]} ({geoopt})" if geoopt else ""
- method_stdin = f"""cc
- freeze
- *
- cbas
- *
- ricc2
- {method}
- list models
-
- {geoopt_stdin}
- list geoopt
-
- *
- *
- """
- elif method in METHODS["dft_hardcoded"]:
- method_stdin = f"""dft
- on
- func
- {method}
- grid
- {grid}
-
- """
- # TODO: Handle xcfuncs that aren't defined in define, e.g.
- # new functionals introduced in 7.4 from libxc. ...
- # Maybe the best idea would be to not set the functional here
- # but just turn on DFT and add it to the control file later on.
- elif method in METHODS["dft_libxc"]:
- raise InputError("libxc functionals are not supported right now.")
- return method_stdin
-
- # Resolution of identity
- def set_ri(keywords):
- # TODO: senex/RIJCOSX?
- ri_kws = {ri_kw: keywords.get(ri_kw, False) for ri_kw in KEYWORDS["ri"]}
- ri_stdins = {"rijk": "rijk\non\n\n", "ri": "ri\non\n\n", "marij": "marij\n\n"}
- ri_stdin = "\n".join([ri_stdins[ri_kw] for ri_kw, use in ri_kws.items() if use])
- return ri_stdin
-
- # ri_stdin = ""
- # # Use either RIJK or RIJ if requested.
- # if ri_kws["rijk"]:
- # ri_stdin = """rijk
- # on
-
- # """
- # elif ri_kws["rij"]:
- # ri_stdin = """rij
- # on
-
- # """
- # # MARIJ can be used additionally.
- # if ri_kws["marij"]:
- # ri_stdin += """marij
-
- # """
- # return ri_stdin
-
- # Dispersion correction
- def set_dsp(keywords):
- # TODO: set_ri and set_dsp are basically the same funtion. Maybe
- # we could abstract this somehow?
- dsp_kws = {dsp_kw: keywords.get(dsp_kw, False) for dsp_kw in KEYWORDS["dsp"]}
- dsp_stdins = {"d3": "dsp\non\n\n", "d3bj": "dsp\nbj\n\n"}
- dsp_stdin = "\n".join([dsp_stdins[dsp_kw] for dsp_kw, use in dsp_kws.items() if use])
- return dsp_stdin
-
- kwargs = {
- "init_guess": occ_num_mo_data(charge, mult, unrestricted),
- "set_method": set_method(method, grid),
- "ri": set_ri(keywords),
- "dsp": set_dsp(keywords),
- "title": "QCEngine Turbomole",
- "scf_conv": scf_conv,
- "scf_iters": scf_iters,
- "basis": basis,
- }
-
- stdin = """
- {title}
- a coord
- *
- no
- b
- all {basis}
- *
- {init_guess}
- {set_method}
- {ri}
- {dsp}
- scf
- conv
- {scf_conv}
- iter
- {scf_iters}
-
- *
- """.format(
- **kwargs
- )
-
- return stdin, subs
diff --git a/qcengine/programs/turbomole/harvester.py b/qcengine/programs/turbomole/harvester.py
deleted file mode 100644
index 0637a78c8..000000000
--- a/qcengine/programs/turbomole/harvester.py
+++ /dev/null
@@ -1,124 +0,0 @@
-from math import sqrt
-import re
-from decimal import Decimal
-
-import numpy as np
-
-from ..util import PreservingDict
-
-
-def parse_decimal(regex, text, method="search"):
- with_float = re.compile(regex + r"([\d\-\.]+)")
- matches = getattr(with_float, method)(text)
-
- if method == "search":
- matches = [matches.groups()]
- return [(method, Decimal(energy)) for method, energy in matches]
-
-
-def parse_reference_energy(stdout: str):
- """Parse stdout and return the energy of the reference wavefunction."""
- energy_dict = PreservingDict()
-
- # Total energy from dscf or ridft
- total_energy_re = re.compile(r"total energy\s+=\s+([\d\-\.]+)")
- mobj = total_energy_re.search(stdout)
- total_energy = Decimal(mobj[1])
-
- # Check for DFT, default to HF
- energy_key = "HF TOTAL ENERGY"
- dft_mobj = re.search("density functional", stdout)
- if dft_mobj:
- energy_key = "DFT TOTAL ENERGY"
- energy_dict[energy_key] = total_energy
-
- # Take into account energies from ricc2 runs. They will be different
- # from the HF energy.
- current_energy = total_energy
- energy_dict["CURRENT ENERGY"] = current_energy
-
- return energy_dict
-
-
-def parse_ricc2(stdout: str):
- ricc2_dict = PreservingDict()
-
- # As CC2 starts from a MP2 guess that is also reported there may be
- # multiple matches for the following regex. Thats why we capture all
- # matches with 'findall'.
- matches = parse_decimal(r"Final (.+?) energy\s+:\s+", stdout, "findall")
- if len(matches) == 0:
- matches = parse_decimal(r"E(MP2)\s+:\s+", stdout, "search")
-
- ricc2_dict["CURRENT ENERGY"] = matches[-1][1]
-
- return ricc2_dict
-
-
-def parse_gradient(gradient):
- grad_re = re.compile(
- r"\$grad.+"
- r"cycle =\s+(?P\d+)\s+"
- r"(?P.+?) energy =\s+(?P[\d\.\-]+)\s+"
- r"\|dE/dxyz\| =\s+(?P[\d\.]+)"
- r"(?P.+)\$end",
- re.DOTALL,
- )
- mobj = grad_re.match(gradient)
-
- # Commented out the variables that aren't returned so LGTM doesn't
- # complain.
- # energy_type = mobj.group("energy_type")
- # grad_norm = Decimal(mobj.group("grad_norm"))
- # energy = Decimal(mobj.group("energy"))
- coords_grad = mobj.group("coords_gradients")
- # cycle = int(mobj.group("cycle"))
-
- *_, grad = re.split("[a-z]{1,3}", coords_grad.strip())
- grad = np.array(grad.strip().replace("D", "E").split(), dtype=float)
-
- return grad
-
-
-def parse_hessian(hessian):
- first_hessian = hessian.strip().split("$")[1]
- split = first_hessian.split()
- hess_type = split.pop(0)
- assert hess_type in ("nprhessian", "hessian")
-
- def is_float(str_):
- return "." in str_
-
- hess_items = [item for item in split if is_float(item)]
- coord_num = int(sqrt(len(hess_items)))
- assert coord_num**2 == len(hess_items)
- hessian = np.array(hess_items, dtype=float).reshape(-1, coord_num)
-
- return hessian
-
-
-def harvest(input_model, stdout, **outfiles):
- qcvars = PreservingDict()
-
- ref_energy_dict = parse_reference_energy(stdout)
- qcvars.update(ref_energy_dict)
-
- if "R I C C 2" in stdout:
- ricc2_dict = parse_ricc2(stdout)
- qcvars.update(ricc2_dict)
-
- gradient = None
- if "gradient" in outfiles:
- gradient = parse_gradient(outfiles["gradient"])
- qcvars["N ATOMS"] = gradient.size // 3
-
- # Prefer unprojected 'nprhessian' over projected 'hessian'.
- hessian_text = outfiles.get("nprhessian", outfiles.get("hessian", None))
-
- if hessian_text is not None:
- hessian = parse_hessian(hessian_text)
- qcvars["N ATOMS"] = hessian.shape[0] // 3
- else:
- hessian = None
-
- return qcvars, gradient, hessian
diff --git a/qcengine/programs/turbomole/methods.py b/qcengine/programs/turbomole/methods.py
deleted file mode 100644
index 12566e491..000000000
--- a/qcengine/programs/turbomole/methods.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Available methods
-
-METHODS = {
- # Dummy for HF
- "hf": ["hf"],
- "ricc2": ["rimp2", "rimp3", "rimp4", "ricc2"],
- # Hardcoded XC-functionals that can be selected from the dft submenu
- # of define.
- "dft_hardcoded": [
- # Hardcoded in V7.3
- "s-vwn",
- "s-vwn_Gaussian",
- "pwlda",
- "b-lyp",
- "b-vwn",
- "b-p",
- "pbe",
- "tpss",
- "bh-lyp",
- "b3-lyp",
- "b3-lyp_Gaussian",
- "pbe0",
- "tpssh",
- "pw6b95",
- "m06",
- "m06-l",
- "m06-2x",
- "lhf",
- "oep",
- "b97-d",
- "pbeh-3c",
- "b97-3c",
- "lh07t-svwn",
- "lh07s-svwn",
- "lh12ct-ssirpw92",
- "lh12ct-ssifpw92",
- "lh14t-calpbe",
- # Hardcoded in V7.4
- "cam-b3lyp",
- # B2PLYP his is not easily supported right now as we would need an
- # additional MP2 calculation from rimp2/ricc2.
- # "b2-plyp",
- ],
- # Shorctus for XC functionals in V7.4 using LibXC
- "dft_libxc": [
- "wb97",
- "wb97x",
- "sogga11",
- "sogga-11x",
- "mn12-l",
- "mn12-sx",
- "mn15",
- "mn15-l",
- "m06-libxc",
- "cam-b3lyp-libxc",
- "hse06-libxc",
- ],
-}
-
-# Available keywords
-KEYWORDS = {
- # Resolution of identity
- "ri": ["rijk", "ri", "marij"],
- # Dispersion correction
- "dsp": ["d3", "d3bj"],
-}
diff --git a/qcengine/programs/turbomole/runner.py b/qcengine/programs/turbomole/runner.py
deleted file mode 100644
index 43e2139e2..000000000
--- a/qcengine/programs/turbomole/runner.py
+++ /dev/null
@@ -1,279 +0,0 @@
-"""
-Calls the Turbomole executable.
-"""
-import os
-import re
-from decimal import Decimal
-from pathlib import Path
-from typing import Any, Dict, Optional, Tuple
-
-from qcelemental.models import AtomicResult, BasisSet, Provenance
-from qcelemental.util import safe_version, which
-
-from ...exceptions import InputError
-from ...util import execute, temporary_directory
-from ..model import ProgramHarness
-from ..qcvar_identities_resources import build_atomicproperties, build_out
-from .define import execute_define, prepare_stdin
-from .harvester import harvest
-from .methods import KEYWORDS, METHODS
-
-
-class TurbomoleHarness(ProgramHarness):
-
- _defaults = {
- "name": "Turbomole",
- "scratch": True,
- "thread_safe": False,
- "thread_parallel": False,
- "node_parallel": True,
- "managed_memory": True,
- }
-
- version_cache: Dict[str, str] = {}
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return which(
- "define",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via http://www.cosmologic.de/turbomole/home.html",
- )
-
- def get_version(self) -> str:
- which_prog = which("define")
- if which_prog not in self.version_cache:
- # We use basically a dummy stdin as we dont want to pipe any real
- # input into define. We only want to parse the version number from
- # the string.
- with temporary_directory(suffix="_define_scratch") as tmpdir:
- tmpdir = Path(tmpdir)
- stdout = execute_define("\n", cwd=tmpdir)
- # Tested with V7.3 and V7.4.0
- version_re = re.compile(r"TURBOMOLE (?:rev\. )?(V.+?)\s+")
- mobj = version_re.search(stdout)
- version = mobj[1]
- self.version_cache[which_prog] = safe_version(version)
- return self.version_cache[which_prog]
-
- def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- self.found(raise_error=True)
-
- job_inputs = self.build_input(input_model, config)
- success, dexe = self.execute(job_inputs)
-
- # TODO: handle input errors?! But then define probably already crashed...
- # if 'There is an error in the input file' in dexe["stdout"]:
- # raise InputError(dexe["stdout"])
-
- if success:
- dexe["outfiles"]["stdout"] = dexe["stdout"]
- dexe["outfiles"]["stderr"] = dexe["stderr"]
- return self.parse_output(dexe["outfiles"], input_model)
-
- def sub_control(self, control, pattern, repl, **kwargs):
- control_subbed = re.sub(pattern, repl, control, **kwargs)
- return control_subbed
-
- def append_control(self, control, to_append):
- return self.sub_control(control, r"\$end", f"{to_append}\n$end")
-
- def build_input(
- self, input_model: "AtomicInput", config: "TaskConfig", template: Optional[str] = None
- ) -> Dict[str, Any]:
-
- # The 'define' wrapper can only handle normal string basis set input. If
- # a QCSchema basis set is given we break early, because this is not handled
- # right now.
- if isinstance(input_model.model.basis, BasisSet):
- raise InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
-
- turbomolerec = {
- "infiles": {},
- "outfiles": {"control": "control"},
- "scratch_directory": config.scratch_directory,
- }
-
- # Handle molecule
- # TODO: what's up with moldata? Do I need it?
- coord_str, moldata = input_model.molecule.to_string(dtype="turbomole", return_data=True)
-
- # Prepare stdin for define call
- model = input_model.model
- # geeopt will hold the for which to calculate the gradient.
- # 'x' corresponds to the ground state, 'a 1' would be the GS too.
- # 'a1 2' would be the 1st excited state of the irreducible group A1.
- # Right now only GS are supported, so this is hardcoded as 'x'.
- geoopt = "x" if input_model.driver.derivative_int() > 0 else ""
- stdin, subs = prepare_stdin(
- model.method,
- model.basis,
- input_model.keywords,
- input_model.molecule.molecular_charge,
- input_model.molecule.molecular_multiplicity,
- geoopt,
- )
- with temporary_directory(suffix="_define_scratch") as tmpdir:
- tmpdir = Path(tmpdir)
- with open(tmpdir / "coord", "w") as handle:
- handle.write(coord_str)
- stdout = execute_define(stdin, cwd=tmpdir)
- # The define scratch will be populated by some files that we want to keep
- to_keep = "basis auxbasis coord control alpha beta mos".split()
-
- for fn in to_keep:
- full_fn = tmpdir / fn
- if not full_fn.exists():
- continue
- with open(full_fn) as handle:
- turbomolerec["infiles"][fn] = handle.read()
-
- env = os.environ.copy()
- env["PARA_ARCH"] = "SMP"
- env["TM_PAR_OMP"] = "on"
- env["PARNODES"] = str(config.ncores)
- env["SMPCPUS"] = str(config.ncores)
- turbomolerec["environment"] = env
- # Memory is set in the control file
-
- keywords = input_model.keywords
-
- ########################
- # DETERMINE SOME FLAGS #
- ########################
-
- ri_calculation = any([keywords.get(ri_kw, False) for ri_kw in KEYWORDS["ri"]])
- ricc2_calculation = model.method in METHODS["ricc2"]
-
- ###################
- # MEMORY HANDLING #
- ###################
-
- # Central file that controls Turbomole. We assign it here to the "control"
- # variable as we may need to modify it, e.g. for a Hessian calculation.
- control = turbomolerec["infiles"]["control"]
-
- # Calculate total available memory in MB
- mem_mb = config.memory * (1024**3) / 1e6
- ri_fraction = 0.25
- # Total amount of memory allocated to ricore
- ricore = 0
- if ri_calculation:
- # This is the default given by Turbomole
- ricore = mem_mb * ri_fraction
- ri_per_core = int(ricore / config.ncores)
- # Update $ricore entry in the control file
- control = self.sub_control(control, r"\$ricore\s+(\d+)", f"$ricore {ri_per_core} MiB per_core")
- # Calculate remaining memory
- maxcor = mem_mb - ricore
- assert maxcor > 0, "Not enough memory for maxcor! Need {-maxcor} MB more!"
-
- # maxcore per_core
- per_core = int(maxcor / config.ncores)
- # Update $maxcor entry in the control file
- control = self.sub_control(control, r"\$maxcor\s+(\d+)\s+MiB\s+per_core", f"$maxcor {per_core} MiB per_core")
-
- ############################
- # DETERMINE SHELL COMMANDS #
- ############################
-
- # ----------------------#
- # | Energy calculations |
- # ----------------------#
-
- # Set appropriate commands. We always need a reference wavefunction
- # so the first command will be dscf or ridft to converge the SCF.
- commands = ["ridft"] if ri_calculation else ["dscf"]
-
- # ------------------------#
- # | Gradient calculations |
- # ------------------------#
-
- # Keep the gradient file for parsing
- if input_model.driver.derivative_int() == 1:
- turbomolerec["outfiles"]["gradient"] = "gradient"
-
- # ricc2 will also calculate the gradient. But this requires setting
- # 'geoopt (state)' in the control file. This is currently handled in the
- # 'define' call.
- if ricc2_calculation:
- commands.append("ricc2")
- # Gradient calculation for DFT/HF
- elif input_model.driver.derivative_int() == 1:
- grad_command = "rdgrad" if ri_calculation else "grad"
- commands.append(grad_command)
-
- # -----------------------#
- # | Hessian calculations |
- # -----------------------#
-
- if input_model.driver.derivative_int() == 2:
- freq_command = "NumForce -level cc2" if ricc2_calculation else "aoforce"
- # NumForce seems to ignore the nprhessian command and will always
- # write to unprojected and projected Hessian to "hessian".
- hessian_outfile = "hessian" if ricc2_calculation else "nprhessian"
- commands.append(freq_command)
- # Add some keywords to the control file
- # noproj: Don't project out translation and rotation
- # nprhessian: Set filename of un-projected hessian
- control = self.append_control(control, "$noproj\n$nprhessian file=nprhessian")
- turbomolerec["outfiles"][hessian_outfile] = None
-
- # Build the full shell command and set it
- command = ["; ".join(commands)]
- turbomolerec["command"] = command
- # Re-assign the potentially modified control file, e.g. for a Hessian calculation
- turbomolerec["infiles"]["control"] = control
-
- # TODO: check if the chosen commands are available with which()?
-
- return turbomolerec
-
- def execute(
- self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None
- ) -> Tuple[bool, Dict]:
-
- success, dexe = execute(
- inputs["command"],
- inputs["infiles"],
- inputs["outfiles"],
- shell=True,
- environment=inputs["environment"],
- # TODO:
- # scratch_directory="/path/to/userdefined/scratch",
- # TODO: scratch_messy?
- # scratch_messy=False,
- )
- return success, dexe
-
- def parse_output(
- self, outfiles: Dict[str, str], input_model: "AtomicInput"
- ) -> "AtomicResult": # lgtm: [py/similar-function]
-
- stdout = outfiles.pop("stdout")
-
- qcvars, gradient, hessian = harvest(input_model.molecule, stdout, **outfiles)
-
- if gradient is not None:
- qcvars["CURRENT GRADIENT"] = gradient
-
- if hessian is not None:
- qcvars["CURRENT HESSIAN"] = hessian
-
- retres = qcvars[f"CURRENT {input_model.driver.upper()}"]
- if isinstance(retres, Decimal):
- retres = float(retres)
-
- build_out(qcvars)
- atprop = build_atomicproperties(qcvars)
-
- output_data = input_model.dict()
- output_data["extras"]["outfiles"] = outfiles
- output_data["properties"] = atprop
- output_data["provenance"] = Provenance(creator="Turbomole", version=self.get_version(), routine="turbomole")
- output_data["return_result"] = retres
- output_data["stdout"] = stdout
- output_data["success"] = True
-
- return AtomicResult(**output_data)
diff --git a/qcengine/programs/util/__init__.py b/qcengine/programs/util/__init__.py
deleted file mode 100644
index 337ea5c01..000000000
--- a/qcengine/programs/util/__init__.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from .hessparse import load_hessian
-from .pdict import PreservingDict
-from .ao_reordering import (
- reorder_column_ao_indices,
- reorder_row_and_column_ao_indices,
- cca_ao_order_spherical,
- error_stamp,
- get_ao_conversion,
- mill_qcvars,
-)
diff --git a/qcengine/programs/util/ao_reordering.py b/qcengine/programs/util/ao_reordering.py
deleted file mode 100644
index a86ad0567..000000000
--- a/qcengine/programs/util/ao_reordering.py
+++ /dev/null
@@ -1,94 +0,0 @@
-import sys
-import traceback
-from typing import Any, Dict, List
-
-import numpy as np
-from qcelemental.models import BasisSet
-
-
-def cca_ao_order_spherical(max_angular_momentum: int) -> Dict[int, List[int]]:
- ao_order = {}
- for ang_mom in range(max_angular_momentum):
- ao_order[ang_mom] = [x for x in range(-1 * ang_mom, ang_mom + 1)]
- return ao_order
-
-
-def get_ao_conversion(new_ao_order: Dict[int, List[int]], old_ao_order: Dict[int, List[int]]) -> Dict[int, List[int]]:
- """
- This function determines the conversion of AO ordering for each angular momentum between the CCA standard and the
- provided program harness.
- """
-
- to_new_order = {}
- for ang_mom in old_ao_order.keys():
- old_order = old_ao_order[ang_mom]
- new_order = new_ao_order[ang_mom]
- sort_indices = []
- for element in new_order:
- sort_indices.append(old_order.index(element))
-
- to_new_order[ang_mom] = sort_indices
-
- return to_new_order
-
-
-def reorder_column_ao_indices(
- matrix: np.ndarray, basis: BasisSet, to_new_ao_order: Dict[str, Dict[int, List[int]]]
-) -> np.ndarray:
- """
- Reorder the column atomic orbital (AO) indices of matrix.
- """
-
- num_cols = len(matrix[0])
- num_rows = len(matrix)
- new_matrix = np.zeros([num_rows, num_cols])
- for row_index in range(0, num_rows):
- ao_shift = 0
- for atom in basis.atom_map:
- for electron_shell in basis.center_data[atom].electron_shells:
- to_cca_indices = to_new_ao_order[electron_shell.harmonic_type][electron_shell.angular_momentum[0]]
- for bas_index in range(0, len(to_cca_indices)):
- new_matrix[row_index][ao_shift + to_cca_indices[bas_index]] = matrix[row_index][
- ao_shift + bas_index
- ]
- ao_shift += len(to_cca_indices)
-
- return new_matrix
-
-
-def reorder_row_and_column_ao_indices(
- matrix: np.ndarray, basis: BasisSet, to_new_ao_order: Dict[str, Dict[int, List[int]]]
-) -> np.ndarray:
- """
- Reorder both row and column atomic orbital (AO) indices of matrix. (e.g. Fock, density)
- """
-
- col_reordered_matrix = reorder_column_ao_indices(matrix, basis, to_new_ao_order)
- new_matrix = reorder_column_ao_indices(col_reordered_matrix.transpose(), basis, to_new_ao_order)
-
- return new_matrix
-
-
-def mill_qcvars(mill: "AlignmentMill", qcvars: Dict[str, Any]) -> Dict[str, Any]:
- """Apply translation, rotation, atom shuffle defined in ``mill`` to the nonscalar quantities in ``qcvars``."""
-
- milled = {}
- for k, v in qcvars.items():
- if isinstance(v, str) and v == "KnownMissing":
- milled[k] = v
- elif k.endswith("GRADIENT"):
- milled[k] = mill.align_gradient(v)
- elif k.endswith("HESSIAN"):
- milled[k] = mill.align_hessian(v)
- else:
- milled[k] = v
-
- return milled
-
-
-def error_stamp(stdin: str = "", stdout: str = "", stderr: str = "", tb: str = None) -> str:
- """Return all useful information in error string."""
-
- if not tb:
- tb = traceback.format_exception(*sys.exc_info())
- return "INPUT:\n" + stdin + "STDOUT:\n" + stdout + "\nSTDERR:\n" + stderr + "\nTRACEBACK:\n" + "".join(tb)
diff --git a/qcengine/programs/util/hessparse.py b/qcengine/programs/util/hessparse.py
deleted file mode 100644
index 5838f84de..000000000
--- a/qcengine/programs/util/hessparse.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import math
-import re
-
-import numpy as np
-from qcelemental.exceptions import ValidationError
-from qcelemental.util import filter_comments
-
-
-def load_hessian(shess: str, dtype: str) -> np.ndarray:
- """Construct a Hessian array from any recognized string format.
-
- Parameters
- ----------
- shess
- Multiline string specification of Hessian in a recognized format.
- dtype
- {"fcmfinal", "cfour", "gamess"}
- Hessian format name.
-
- Returns
- -------
- np.ndarray
- Hessian array in square shape.
-
- """
- # list o'lines w/o comments or blanks
- shess = filter_comments(shess)
- lhess = list(filter(None, map(str.strip, shess.splitlines())))
-
- if dtype in ["fcmfinal", "cfour"]:
- nat = int(lhess[0].split()[0])
- ndof = 3 * nat
- datastr = "\n".join(lhess[1:])
- nhess = np.fromstring(datastr, sep=" ")
- nhess = nhess.reshape(ndof, ndof)
- elif dtype == "gamess":
- if "ENERGY" in lhess[0]:
- lhess.pop(0)
- datastr = []
- for ln in lhess:
- numbers = re.findall(r"([-+]?\d+\.\d+[DdEe][-+]\d\d)", ln)
- if numbers:
- datastr.extend(numbers)
-
- nhess = np.fromstring(" ".join(datastr), sep=" ")
- ndof = int(math.sqrt(len(nhess)))
- nhess = nhess.reshape((ndof, ndof))
- else:
- raise ValidationError("Unknown dtype: {}".format(dtype))
-
- return nhess
-
-
-def hess_to_string(hess, handle, dtype):
- nat = hess.shape[0] // 3
- assert hess.shape == (3 * nat, 3 * nat)
-
- header = "{:5}{:5}".format(nat, 6 * nat)
- np.savetxt(handle, hess.reshape((-1, 3)), fmt="%20.10f", delimiter="", newline="\n", header=header, comments="")
diff --git a/qcengine/programs/util/pdict.py b/qcengine/programs/util/pdict.py
deleted file mode 100644
index e597d4fae..000000000
--- a/qcengine/programs/util/pdict.py
+++ /dev/null
@@ -1,118 +0,0 @@
-from decimal import ROUND_CEILING, ROUND_FLOOR, Decimal
-
-import numpy as np
-
-# This file has considerable history in the quantum chemistry package Psi4
-
-
-class PreservingDict(dict):
- """Class to store quantum chemical quantities extracted from output
- files. Extends the dictionary object to (1) store key as all-caps
- version of itself and (2) validate value for duplicate values for the
- same key by testing which has more decimal places and whether value
- the same within a plausible rounding error. Allows consistency checks
- when parsing output files without loss of precision.
-
- works in decimal.Decimal (scalar) and np.ndarray (non-scalar)
-
- """
-
- def __init__(self, *args, **kwargs):
- self.update(*args, **kwargs)
-
- def __setitem__(self, key, value, accept_places=11):
- try:
- key = key.upper()
- except AttributeError:
- raise AttributeError("Keys stored as upper-case strings: %s unsuitable" % (key))
-
- if isinstance(value, (list, np.ndarray)):
- # non-scalar
- value = np.array(value)
-
- if key in self.keys() and not "CURRENT" in key:
- if np.allclose(self[key], value, atol=1.0e-5, rtol=1e-3):
- best_value = value # no way to choose, really
- else:
- raise ValueError(
- """Output file yielded both {} and {} as values for quantity {}.""".format(
- self[key], value, key
- )
- )
- # print("""Resetting array {} to {}""".format(key, best_value))
- else:
- best_value = value
- # print("""Setting array {} to {}""".format(key, best_value))
-
- else:
- # scalar
- value = Decimal(value)
- if abs(float(value)) < 1.0e-16:
- value = Decimal("0")
-
- if key in self.keys() and not "CURRENT" in key:
- # Validate choosing more detailed value for variable
- existing_exp = self[key].as_tuple().exponent # 0.1111 --> -4
- candidate_exp = value.as_tuple().exponent
- if existing_exp > candidate_exp: # candidate has more digits
- places = Decimal(10) ** (existing_exp + 1) # exp+1 permits slack in rounding
- best_value = value
- else: # existing has more digits
- places = Decimal(10) ** (candidate_exp + 1)
- best_value = self[key]
- # DEBUG print(f"{existing_exp=} {candidate_exp=} {places=} {self[key]=} {value=}")
- # Validate values are the same
- # places = max(places, Decimal('1E-11')) # for computed psivars
- places = max(places, Decimal("1E-{}".format(accept_places))) # for computed psivars
- # print('FLOOR: ', self[key].quantize(places, rounding=ROUND_FLOOR) - value.quantize(places, rounding=ROUND_FLOOR))
- # print('CEIL: ', self[key].quantize(places, rounding=ROUND_CEILING) - value.quantize(places, rounding=ROUND_CEILING))
- if (
- self[key]
- .quantize(places, rounding=ROUND_CEILING)
- .compare(value.quantize(places, rounding=ROUND_CEILING))
- != 0
- ) and (
- self[key]
- .quantize(places, rounding=ROUND_FLOOR)
- .compare(value.quantize(places, rounding=ROUND_FLOOR))
- != 0
- ):
- raise ValueError(
- """Output file yielded both %s and %s as values for quantity %s."""
- % (self[key].to_eng_string(), value.to_eng_string(), key)
- )
- # print("""Resetting variable {} to {}""".format(key, best_value.to_eng_string()))
- else:
- best_value = value
- # print("""Setting variable {} to {}""".format(key, best_value.to_eng_string()))
-
- super(PreservingDict, self).__setitem__(key, best_value)
-
- def update(self, *args, **kwargs):
- if args:
- if len(args) > 1:
- raise TypeError("update expected at most 1 arguments, " "got %d" % len(args))
- other = dict(args[0])
- for key in other:
- self[key] = other[key]
- for key in kwargs:
- self[key] = kwargs[key]
-
- def setdefault(self, key, value=None):
- if key not in self:
- self[key] = value
- return self[key]
-
-
-if __name__ == "__main__":
- c4info = PreservingDict()
- c4info["scf 4.5e0 total energy"] = "-1.e-4"
- c4info["1.3"] = ".4"
- c4info["curl"] = "-437.12345678"
- c4info["curl"] = "-437.12345677"
- c4info["curl"] = "-437.123456"
- c4info["curl"] = "-437.123457"
- c4info["curl"] = "-437.1234444" # fails
- c4info["curl"] = "-437.123456789"
- c4info["curl"] = "-437.1234567779" # fails
- print(c4info)
diff --git a/qcengine/programs/xtb.py b/qcengine/programs/xtb.py
deleted file mode 100644
index d9114b54d..000000000
--- a/qcengine/programs/xtb.py
+++ /dev/null
@@ -1,76 +0,0 @@
-"""
-Harness for the extended tight binding (xtb) package.
-This implementation interfaces with the xtb C-API via the xtb-python project,
-which is providing Python bindings and native extensions for common computational
-chemistry frameworks, like QCEngine.
-
-Therefore, this harness only has to provide a thin wrapper to integrate xtb.
-For more information on xtb-python and the actual QCSchema integration,
-visit `its documentation `_.
-"""
-
-from typing import Dict
-
-from qcelemental.models import AtomicInput, AtomicResult
-from qcelemental.util import safe_version, which_import
-
-from ..config import TaskConfig
-from .model import ProgramHarness
-
-
-class XTBHarness(ProgramHarness):
- """Calculation harness for the extended tight binding (xtb) package."""
-
- _defaults = {
- "name": "xtb",
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
- version_cache: Dict[str, str] = {}
-
- class Config(ProgramHarness.Config):
- pass
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- """Check for the availability of the Python API of xtb"""
-
- return which_import(
- "xtb",
- return_bool=True,
- raise_error=raise_error,
- raise_msg="Please install via `conda install xtb-python -c conda-forge`.",
- )
-
- def get_version(self) -> str:
- """Return the currently used version of xtb-python"""
- self.found(raise_error=True)
-
- which_prog = which_import("xtb")
- if which_prog not in self.version_cache:
- import xtb
-
- self.version_cache[which_prog] = safe_version(xtb.__version__)
-
- return self.version_cache[which_prog]
-
- def compute(self, input_data: AtomicInput, config: TaskConfig) -> AtomicResult:
- """
- Actual interface to the xtb package. The compute function is just a thin
- wrapper around the native QCSchema interface of xtb-python.
- """
-
- self.found(raise_error=True)
-
- import xtb
- from xtb.qcschema.harness import run_qcschema
-
- # Run the Harness
- output = run_qcschema(input_data)
-
- # Make sure all keys from the initial input spec are sent along
- output.extras.update(input_data.extras)
- return output
diff --git a/qcengine/stock_mols.py b/qcengine/stock_mols.py
deleted file mode 100644
index 47522e5af..000000000
--- a/qcengine/stock_mols.py
+++ /dev/null
@@ -1,199 +0,0 @@
-"""
-A small list of molecules used to validate and tests computation.
-"""
-
-import copy
-
-from qcelemental.models import Molecule
-
-_test_mols = {
- "hydrogen": {
- "symbols": ["H", "H"],
- "geometry": [0, 0, -0.65, 0.0, 0.0, 0.65],
- "molecular_multiplicity": 1,
- "connectivity": [[0, 1, 1]],
- },
- "lithium": {"symbols": ["Li"], "geometry": [0, 0, 0], "molecular_multiplicity": 2, "connectivity": None},
- "water": {
- "geometry": [
- 0.0,
- 0.0,
- -0.1294769411935893,
- 0.0,
- -1.494187339479985,
- 1.0274465079245698,
- 0.0,
- 1.494187339479985,
- 1.0274465079245698,
- ],
- "symbols": ["O", "H", "H"],
- "connectivity": [[0, 1, 1], [0, 2, 1]],
- },
- "eneyne": {
- "symbols": ["C", "C", "H", "H", "H", "H", "C", "C", "H", "H"],
- "fragments": [[0, 1, 2, 3, 4, 5], [6, 7, 8, 9]],
- "geometry": [
- 0.000000,
- -0.667578,
- -2.124659,
- 0.000000,
- 0.667578,
- -2.124659,
- 0.923621,
- -1.232253,
- -2.126185,
- -0.923621,
- -1.232253,
- -2.126185,
- -0.923621,
- 1.232253,
- -2.126185,
- 0.923621,
- 1.232253,
- -2.126185,
- 0.000000,
- 0.000000,
- 2.900503,
- 0.000000,
- 0.000000,
- 1.693240,
- 0.000000,
- 0.000000,
- 0.627352,
- 0.000000,
- 0.000000,
- 3.963929,
- ],
- },
- "ethane": {
- "geometry": [
- [+1.54034068369141, -1.01730823913235, +0.93128102073425],
- [+4.07197633001232, -0.09756825926424, -0.02203578938791],
- [+0.00025636057017, +0.00139534039687, +0.00111211603233],
- [+1.30983130616505, -3.03614919350581, +0.54918567185649],
- [+1.38003941036405, -0.71812565437083, +2.97078783593882],
- [+5.61209917480096, -1.11612498901607, +0.90799157528946],
- [+4.30241880148479, +1.92102238874847, +0.36057345099335],
- [+4.23222331256867, -0.39619160402976, -2.06158817835790],
- ],
- "symbols": ["C", "C", "H", "H", "H", "H", "H", "H"],
- "connectivity": [[0, 1, 1], [0, 2, 1], [0, 3, 1], [0, 4, 1], [1, 5, 1], [1, 6, 1], [1, 7, 1]],
- },
- "mindless-01": {
- "symbols": ["Na", "H", "O", "H", "F", "H", "H", "O", "N", "H", "H", "Cl", "B", "B", "N", "Al"],
- "geometry": [
- [-1.85528263484662, +3.58670515364616, -2.41763729306344],
- [+4.40178023537845, +0.02338844412653, -4.95457749372945],
- [-2.98706033463438, +4.76252065456814, +1.27043301573532],
- [+0.79980886075526, +1.41103455609189, -5.04655321620119],
- [-4.20647469409936, +1.84275767548460, +4.55038084858449],
- [-3.54356121843970, -3.18835665176557, +1.46240021785588],
- [+2.70032160109941, +1.06818452504054, -1.73234650374438],
- [+3.73114088824361, -2.07001543363453, +2.23160937604731],
- [-1.75306819230397, +0.35951417150421, +1.05323406177129],
- [+5.41755788583825, -1.57881830078929, +1.75394002750038],
- [-2.23462868255966, -2.13856505054269, +4.10922285746451],
- [+1.01565866207568, -3.21952154552768, -3.36050963020778],
- [+2.42119255723593, +0.26626435093114, -3.91862474360560],
- [-3.02526098819107, +2.53667889095925, +2.31664984740423],
- [-2.00438948664892, -2.29235136977220, +2.19782807357059],
- [+1.12226554109716, -1.36942007032045, +0.48455055461782],
- ],
- },
- "mindless-02": {
- "symbols": ["H", "S", "B", "O", "Mg", "H", "H", "H", "Si", "H", "B", "Li", "F", "H", "H", "S"],
- "geometry": [
- [-1.79537625851198, -3.77866422935275, -1.07883558363403],
- [-2.68278833302782, +0.38892666265890, +1.66214865238427],
- [+0.11484649791305, +1.48857933226955, +3.65660396510375],
- [-1.07998879593946, -0.16259121615748, -4.55703065871422],
- [+0.60302832999383, +4.08816149622342, -0.02589373148029],
- [-1.22534089315880, -1.79981382478068, -3.70773173318592],
- [-1.33460982049866, -4.24819082475503, +2.72791902701083],
- [-0.16278082578516, +2.41267994179303, +5.69030695190570],
- [+2.87802444057103, -0.33120525058830, +1.88311373530297],
- [+0.68489327931487, +0.32790204044961, -4.20547693710673],
- [-1.20919773588330, -2.87253762561437, +0.94064204223101],
- [-3.25572604597922, +2.21241092990940, -2.86715549314771],
- [-1.83147468262373, +5.20527293771933, -2.26976270603341],
- [+4.90885865772880, -1.92576561961811, +2.99069919443735],
- [+1.26806242248758, -2.60409341782411, +0.55162805282247],
- [+4.11956976339902, +1.59892866766766, -1.39117477789609],
- ],
- "molecular_multiplicity": 2,
- },
- "mindless-03": {
- "symbols": ["C", "O", "H", "Li", "Mg", "Al", "C", "H", "H", "H", "F", "S", "C", "H", "Na", "H"],
- "geometry": [
- [-0.02148551327524, -0.67161751504297, -4.75078512817560],
- [+1.37792545875526, -3.24818416423144, +3.83896600631495],
- [-2.23986953822894, +1.64550402751694, +3.42773272178522],
- [-0.87622711432790, -2.74068400827752, +1.43723692979592],
- [+1.29492470653815, +1.86470311043681, -1.04536500695239],
- [-3.65768365013010, +0.45437052179208, -1.41566056087159],
- [-0.23245910487384, -1.83274112101585, -2.43395808606122],
- [+0.30373451850419, -3.84228931776777, -2.44882782867802],
- [-3.36159503902161, +4.20056392581975, +1.63352684198071],
- [+0.49372989648081, -1.56245253044952, -6.53610501083288],
- [+4.38566058812996, +1.86127331114460, +0.56178822055152],
- [-1.17545963764009, +2.49456345795141, -4.90195191215762],
- [-1.86623614216854, +2.76329843590746, +1.71572598870213],
- [+1.02361259176985, -4.24377370348987, +5.32418288889440],
- [+4.71194535010347, -1.03648125005561, +3.35573062118779],
- [-0.16051737061546, +3.89394681976155, +2.23776331451663],
- ],
- },
- "mindless-04": {
- "symbols": ["H", "B", "H", "F", "B", "H", "H", "Si", "H", "H", "C", "Al", "Si", "O", "H", "B"],
- "geometry": [
- [-1.34544890768411, +2.85946545334720, +3.11183388215396],
- [-0.36293929605305, +4.15983774640545, +1.36413101934678],
- [-3.36268280924844, +4.92951597114402, -3.59085684882314],
- [+3.78143178536443, -4.97181356229699, +1.59003443639387],
- [+3.44227417874042, -3.46504338606415, +3.62082644591507],
- [+1.88917586252014, +3.42088101960529, +1.28872629783483],
- [-0.32747529934233, -4.29711514977711, -3.55330460209973],
- [-3.58768360829779, -1.39509759062952, -1.10396714572410],
- [-0.39440896193088, +6.31837673143592, +1.99105318714945],
- [+4.34376903295874, -4.12502353873667, +5.57829602371555],
- [-1.39570266622309, -2.60410756418652, -4.03149806979915],
- [+0.21788515354592, +0.28610741675369, +1.29731097788136],
- [-2.00000183598828, +3.04473467156937, -2.00578147078785],
- [+2.12833842504876, -1.30141517432227, +3.38069910888504],
- [-2.48411958079522, -2.81581487156584, -5.76829803496286],
- [-0.54241147261516, -0.04348817268188, -3.16920520707912],
- ],
- },
- "mindless-05": {
- "symbols": ["B", "P", "H", "H", "B", "P", "H", "Cl", "N", "H", "P", "Si", "H", "H", "P", "N"],
- "geometry": [
- [+0.68391902268453, +0.21679405065309, -2.81441127558071],
- [-2.67199537993843, -3.97743927106200, +0.03497540139192],
- [+2.02325266152397, -0.16048070975416, -0.41980608052722],
- [+4.26224346168617, +3.65384961705338, -2.81836810458488],
- [-2.80378310343644, +1.84796600006216, +0.15107304476153],
- [+1.58317082705122, +3.77079801391042, -2.86230158107979],
- [+2.63670178694113, +3.13142099211650, +2.24139937019049],
- [-6.27112533979613, -3.92471014080274, +1.62562669834852],
- [-0.92594349239390, -2.94451283088352, +2.60616476876177],
- [-1.79532342290201, -1.56841672860834, +3.65515689388732],
- [-3.01460634915379, -0.47748181717446, -2.44834110183776],
- [+2.18249449208515, -2.23505035804805, +1.77725119258081],
- [+3.26068149442689, -4.54078259646428, +0.57204329987377],
- [+1.73744972267909, -1.18654391698320, -4.24063427353503],
- [+0.94405328902426, +4.99525793054843, +1.18501287451328],
- [-1.83118967048165, +3.39933176543682, +1.75515887283605],
- ],
- "molecular_multiplicity": 2,
- },
-}
-
-
-def get_molecule(name):
- """
- Returns a QC JSON representation of a test molecule.
- """
- if name not in _test_mols:
- raise KeyError("Molecule name '{}' not found".format(name))
-
- return Molecule(**copy.deepcopy(_test_mols[name]))
diff --git a/qcengine/testing.py b/qcengine/testing.py
deleted file mode 100644
index c7a3ecf11..000000000
--- a/qcengine/testing.py
+++ /dev/null
@@ -1,211 +0,0 @@
-"""
-Utilities for the testing suite.
-"""
-
-from typing import List
-
-import numpy as np
-import pytest
-import qcelemental as qcel
-from pkg_resources import parse_version
-from qcelemental.util import which, which_import
-
-import qcengine as qcng
-
-QCENGINE_RECORDS_COMMIT = "19b843b"
-
-
-def _check_qcenginerecords(return_data=False):
-
- skip = True
- try:
- import qcenginerecords
-
- qcer_hash = qcenginerecords.__git_revision__[:7]
- if qcer_hash != QCENGINE_RECORDS_COMMIT[:7]:
- msg = f"Incorrect QCEngineRecord Git Revision, found {qcer_hash} need {QCENGINE_RECORDS_COMMIT[:7]}."
- else:
- skip = False
- msg = "Works!"
-
- except ModuleNotFoundError:
- msg = "Could not find QCEngineRecords in PYTHONPATH"
-
- if return_data:
- return skip, msg
- else:
- return pytest.mark.skipif(skip, reason=msg)
-
-
-using_qcenginerecords = _check_qcenginerecords()
-
-
-def qcengine_records(program):
-
- skip, msg = _check_qcenginerecords(return_data=True)
- if skip:
- pytest.skip(msg, allow_module_level=True)
-
- import qcenginerecords
-
- return qcenginerecords.get_info(program)
-
-
-def is_program_new_enough(program, version_feature_introduced):
- """Returns True if `program` registered in QCEngine, locatable in
- environment, has parseable version, and that version in normalized
- form is equal to or later than `version_feature_introduced`.
-
- """
- if program not in qcng.list_available_programs():
- return False
- candidate_version = qcng.get_program(program).get_version()
-
- return parse_version(candidate_version) >= parse_version(version_feature_introduced)
-
-
-def is_mdi_new_enough(version_feature_introduced):
- if which_import("mdi", return_bool=True):
- import mdi
-
- candidate_version = ".".join(
- [str(mdi.MDI_MAJOR_VERSION), str(mdi.MDI_MINOR_VERSION), str(mdi.MDI_PATCH_VERSION)]
- )
- return parse_version(candidate_version) >= parse_version(version_feature_introduced)
- else:
- return False
-
-
-@pytest.fixture(scope="function")
-def failure_engine():
- unique_name = "testing_random_name"
-
- class FailEngine(qcng.programs.ProgramHarness):
- iter_modes: List[str] = []
- ncalls: int = 0
- start_distance: float = 5
- equilibrium_distance: float = 4
-
- _defaults = {
- "name": unique_name,
- "scratch": False,
- "thread_safe": True,
- "thread_parallel": False,
- "node_parallel": False,
- "managed_memory": False,
- }
-
- class Config(qcng.programs.ProgramHarness.Config):
- allow_mutation: True
-
- @staticmethod
- def found(raise_error: bool = False) -> bool:
- return True
-
- def compute(self, input_data: "AtomicInput", config: "TaskConfig") -> "AtomicResult":
- self.ncalls += 1
- mode = self.iter_modes.pop(0)
-
- geom = input_data.molecule.geometry
- if geom.shape[0] != 2:
- raise ValueError("Failure Test must have an input size of two.")
-
- grad_value = np.abs(np.linalg.norm(geom[0] - geom[1]) - self.equilibrium_distance)
- grad = [0, 0, -grad_value, 0, 0, grad_value]
-
- if mode == "pass":
- return qcel.models.AtomicResult(
- **{
- **input_data.dict(),
- **{
- "properties": {"return_energy": grad_value},
- "return_result": grad,
- "success": True,
- "extras": {"ncalls": self.ncalls},
- "provenance": {"creator": "failure_engine", "ncores": config.ncores},
- },
- }
- )
- elif mode == "random_error":
- raise qcng.exceptions.RandomError("Whoops!")
- elif mode == "input_error":
- raise qcng.exceptions.InputError("Whoops!")
- else:
- raise KeyError("Testing error, should not arrive here.")
-
- def get_job(self):
- json_data = {
- "molecule": {"symbols": ["He", "He"], "geometry": [0, 0, 0, 0, 0, self.start_distance]},
- "driver": "gradient",
- "model": {"method": "something"},
- }
-
- return json_data
-
- engine = FailEngine()
- qcng.register_program(engine)
-
- yield engine
-
- qcng.unregister_program(engine.name)
-
-
-# Figure out what is imported
-_programs = {
- "adcc": is_program_new_enough("adcc", "0.15.7"),
- "cfour": which("xcfour", return_bool=True),
- "dftd3": which("dftd3", return_bool=True),
- "dftd3_321": is_program_new_enough("dftd3", "3.2.1"),
- "dftd4": which_import("dftd4", return_bool=True),
- "dftd4_350": is_program_new_enough("dftd4", "3.5.0"),
- "s-dftd3": which_import("dftd3", return_bool=True),
- "qcore": is_program_new_enough("qcore", "0.8.9"),
- "gamess": which("rungms", return_bool=True),
- "mctc-gcp": is_program_new_enough("mctc-gcp", "2.3.0"),
- "gcp": which("gcp", return_bool=True),
- "geometric": which_import("geometric", return_bool=True),
- "berny": which_import("berny", return_bool=True),
- "mdi": is_mdi_new_enough("1.2"),
- "molpro": is_program_new_enough("molpro", "2018.1"),
- "mopac": is_program_new_enough("mopac", "2016"),
- "mp2d": which("mp2d", return_bool=True),
- "nwchem": which("nwchem", return_bool=True),
- "optking": which_import("optking", return_bool=True),
- "psi4": is_program_new_enough("psi4", "1.2"),
- "psi4_runqcsk": is_program_new_enough("psi4", "1.4a2.dev160"),
- "psi4_mp2qcsk": is_program_new_enough("psi4", "1.4a2.dev580"),
- "psi4_derqcsk": is_program_new_enough("psi4", "1.5a1.dev117"),
- "qcdb": which_import("qcdb", return_bool=True),
- "qchem": is_program_new_enough("qchem", "5.1"),
- "rdkit": which_import("rdkit", return_bool=True),
- "terachem": which("terachem", return_bool=True),
- "terachem_pbs": is_program_new_enough("terachem_pbs", "0.7.2"),
- "torchani": is_program_new_enough("torchani", "0.9"),
- "torsiondrive": which_import("torsiondrive", return_bool=True),
- "turbomole": which("define", return_bool=True),
- "xtb": which_import("xtb", return_bool=True),
- "mrchem": is_program_new_enough("mrchem", "1.0.0"),
- "mace": is_program_new_enough("mace", "0.3.2"),
- "aimnet2": which_import("pyaimnet2", return_bool=True),
-}
-_programs["openmm"] = _programs["rdkit"] and which_import(".openmm", package="simtk", return_bool=True)
-
-
-def has_program(name):
- if name in _programs:
- return _programs[name]
- else:
- raise KeyError(f"Program {name} not registered with QCEngine testing.")
-
-
-_using_cache = {}
-
-
-def using(program):
-
- if program not in _using_cache:
- import_message = f"Not detecting module {program}. Install package if necessary to enable tests."
- skip = pytest.mark.skipif(has_program(program) is False, reason=import_message)
- _using_cache[program] = skip
-
- return _using_cache[program]
diff --git a/qcengine/tests/__init__.py b/qcengine/tests/__init__.py
deleted file mode 100644
index 01b1a87f0..000000000
--- a/qcengine/tests/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-"""
-Init file for tests, blank to avoid automatic imports.
-"""
diff --git a/qcengine/tests/test_cli.py b/qcengine/tests/test_cli.py
deleted file mode 100644
index ad8884ab6..000000000
--- a/qcengine/tests/test_cli.py
+++ /dev/null
@@ -1,106 +0,0 @@
-import json
-import os
-import subprocess
-import sys
-from typing import List
-
-from qcelemental.models import AtomicInput, OptimizationInput
-
-from qcengine import cli, get_molecule, util
-from qcengine.testing import using
-
-
-def run_qcengine_cli(args: List[str], stdin: str = None) -> str:
- """
- Runs qcengine via its CLI
-
- This method was chosen over the more sophisticated util.execute in order to get pytest-cov to work.
- For the same reason, qcengine is invoked as "python -m qcengine.cli" rather than "qcengine".
-
- Parameters
- ----------
- args: List[str]
- List of CLI arguments.
- stdin: Optional[str]
- Standard input for the process.
-
- Returns
- -------
- str
- QCEngine CLI standard output.
- """
- if stdin is not None:
- stdin = stdin.encode("utf-8")
-
- return subprocess.check_output([sys.executable, "-m", "qcengine"] + args, input=stdin)
-
-
-def test_no_args():
- """Test for qcengine with no arguments"""
- try:
- run_qcengine_cli([])
- except subprocess.CalledProcessError as e:
- assert e.returncode == 1
-
-
-def test_info():
- """Test for qcengine info"""
- outputs = []
- for arg in cli.info_choices:
- output = run_qcengine_cli(["info", arg])
- if arg not in {"all", "config"}: # output of config changes call-to-call depending e.g. on mem available
- outputs.append(output)
-
- default_output = run_qcengine_cli(["info"])
- for output in outputs:
- assert output in default_output
-
-
-@using("psi4")
-def test_run_psi4(tmp_path):
- """Tests qcengine run with psi4 and JSON input"""
-
- def check_result(stdout):
- output = json.loads(stdout)
- assert output["provenance"]["creator"].lower() == "psi4"
- assert output["success"] is True
-
- inp = AtomicInput(molecule=get_molecule("hydrogen"), driver="energy", model={"method": "hf", "basis": "6-31G"})
-
- args = ["run", "psi4", inp.json()]
- check_result(run_qcengine_cli(args))
-
- args = ["run", "psi4", os.path.join(tmp_path, "input.json")]
- with util.disk_files({"input.json": inp.json()}, {}, cwd=tmp_path):
- check_result(run_qcengine_cli(args))
-
- args = ["run", "psi4", "-"]
- check_result(run_qcengine_cli(args, stdin=inp.json()))
-
-
-@using("geometric")
-@using("psi4")
-def test_run_procedure(tmp_path):
- """Tests qcengine run-procedure with geometric, psi4, and JSON input"""
-
- def check_result(stdout):
- output = json.loads(stdout)
- assert output["provenance"]["creator"].lower() == "geometric"
- assert output["success"] is True
-
- inp = {
- "keywords": {"coordsys": "tric", "maxiter": 100, "program": "psi4"},
- "input_specification": {"driver": "gradient", "model": {"method": "HF", "basis": "sto-3g"}, "keywords": {}},
- "initial_molecule": get_molecule("hydrogen"),
- }
- inp = OptimizationInput(**inp)
-
- args = ["run-procedure", "geometric", inp.json()]
- check_result(run_qcengine_cli(args))
-
- args = ["run-procedure", "geometric", os.path.join(tmp_path, "input.json")]
- with util.disk_files({"input.json": inp.json()}, {}, cwd=tmp_path):
- check_result(run_qcengine_cli(args))
-
- args = ["run-procedure", "geometric", inp.json()]
- check_result(run_qcengine_cli(args, stdin=inp.json()))
diff --git a/qcengine/tests/test_config.py b/qcengine/tests/test_config.py
deleted file mode 100644
index 083a9774c..000000000
--- a/qcengine/tests/test_config.py
+++ /dev/null
@@ -1,268 +0,0 @@
-"""
-Tests the QCEngine compute module configuration
-"""
-
-import copy
-import os
-
-try:
- import pydantic.v1 as pydantic
-except ImportError:
- import pydantic
-import pytest
-
-import qcengine as qcng
-from qcengine.config import NodeDescriptor
-from qcengine.util import create_mpi_invocation, environ_context
-
-
-def test_node_blank():
- node = qcng.config.NodeDescriptor(name="something", hostname_pattern="*")
-
-
-def test_node_auto():
-
- desc = {
- "name": "something",
- "hostname_pattern": "*",
- "jobs_per_node": 1,
- "ncores": 4,
- "memory": 10,
- "memory_safety_factor": 0,
- }
- node1 = qcng.config.NodeDescriptor(**desc)
- job1 = qcng.get_config(hostname=node1)
- assert job1.ncores == 4
- assert job1.nnodes == 1
- assert pytest.approx(job1.memory) == 10.0
-
- desc["jobs_per_node"] = 2
- node2 = qcng.config.NodeDescriptor(**desc)
- job2 = qcng.get_config(hostname=node2)
- assert job2.ncores == 2
- assert pytest.approx(job2.memory) == 5.0
-
-
-def test_node_environ():
-
- scratch_name = "myscratch1234"
- with environ_context(env={"QCA_SCRATCH_DIR": scratch_name}):
- description = {"name": "something", "hostname_pattern": "*", "scratch_directory": "$QCA_SCRATCH_DIR"}
-
- node = qcng.config.NodeDescriptor(**description)
- assert node.scratch_directory == scratch_name
-
-
-def test_node_skip_environ():
- description = {"name": "something", "hostname_pattern": "*", "scratch_directory": "$RANDOM_ENVIRON"}
-
- node = qcng.config.NodeDescriptor(**description)
- assert node.scratch_directory is None
-
-
-@pytest.mark.parametrize(
- "envvars,scr,ans",
- [
- ({"SCRATCH": "/my_scratch"}, "$SCRATCH", "/my_scratch"),
- ({"SCRATCH": "/my_scratch"}, "${SCRATCH}", "/my_scratch"),
- # ({"SCRATCH": "/my_scratch"}, "%SCRATCH%", "/my_scratch"), # only valid on Windows
- (
- {"PBS_DIR": "/cluster/scr/job", "JOBNUM": "12345"},
- "$PBS_DIR/psi_scratch/$JOBNUM",
- "/cluster/scr/job/psi_scratch/12345",
- ),
- ({"QCSCR": "qcscr", "USER": "johndoe"}, "/scratch/${USER}/$QCSCR", "/scratch/johndoe/qcscr"),
- ({}, "~", f"{os.environ.get('HOME')}"),
- ({"QCSCR": "qcscr"}, "~/scratch/$QCSCR", f"{os.environ.get('HOME')}/scratch/qcscr"),
- ({}, "$HOME", f"{os.environ.get('HOME')}"),
- # ({}, "$RANDOM_NOVAR", "$RANDOM_NOVAR"), # new behavior?
- ({}, "$RANDOM_NOVAR", None), # longstanding behavior
- ],
-)
-def test_envvar(envvars, scr, ans):
- with environ_context(env=envvars):
- tc = qcng.get_config(task_config={"scratch_directory": scr})
- assert tc.scratch_directory == ans
-
-
-@pytest.fixture
-def opt_state_basic():
- """
- Capture the options state and temporarily override.
- """
-
- # Snapshot env
- old_node = copy.deepcopy(qcng.config.NODE_DESCRIPTORS)
-
- scratch_name = "myscratch1234"
- with environ_context(env={"QCA_SCRATCH_DIR": scratch_name}):
-
- configs = [
- {
- "name": "dragonstooth",
- "hostname_pattern": "dt*",
- "jobs_per_node": 2,
- "ncores": 12,
- "memory": 120,
- "scratch_directory": "$NOVAR_RANDOM_ABC123",
- },
- {"name": "newriver", "hostname_pattern": "nr*", "jobs_per_node": 2, "ncores": 24, "memory": 240},
- {
- "name": "batchnode",
- "hostname_pattern": "bn*",
- "is_batch_node": True,
- "jobs_per_node": 1,
- "mpiexec_command": "mpirun -n {total_ranks} -N {ranks_per_node}",
- "ncores": 24,
- "memory": 240,
- },
- {
- "name": "default",
- "hostname_pattern": "*",
- "jobs_per_node": 1,
- "memory": 4,
- "memory_safety_factor": 0,
- "ncores": 5,
- "scratch_directory": "$QCA_SCRATCH_DIR",
- },
- ]
- for desc in configs:
- node = qcng.config.NodeDescriptor(**desc)
- qcng.config.NODE_DESCRIPTORS[desc["name"]] = node
-
- yield
-
- # Reset env
- qcng.config.NODE_DESCRIPTORS = old_node
-
-
-def test_node_matching(opt_state_basic):
- node = qcng.config.get_node_descriptor("nomatching")
- assert node.name == "default"
-
- node = qcng.config.get_node_descriptor("dt149")
- assert node.name == "dragonstooth"
-
- node = qcng.config.get_node_descriptor("nr149")
- assert node.name == "newriver"
-
-
-def test_node_env(opt_state_basic):
- node = qcng.config.get_node_descriptor("dt")
- assert node.name == "dragonstooth"
- assert node.scratch_directory is None
-
- node = qcng.config.get_node_descriptor("nomatching")
- assert node.name == "default"
- assert node.scratch_directory == "myscratch1234"
-
-
-def test_config_default(opt_state_basic):
- config = qcng.config.get_config(hostname="something")
- assert config.ncores == 5
- assert config.memory == 4
-
- config = qcng.config.get_config(hostname="dt149")
- assert config.ncores == 6
- assert config.retries == 0
- assert pytest.approx(config.memory, 0.1) == 54
-
-
-def test_config_local_ncores(opt_state_basic):
- config = qcng.config.get_config(hostname="something", task_config={"ncores": 10, "retries": 3})
- assert config.ncores == 10
- assert config.memory == 4
- assert config.retries == 3
-
-
-def test_config_local_njobs(opt_state_basic):
- config = qcng.config.get_config(hostname="something", task_config={"jobs_per_node": 5})
- assert config.ncores == 1
- assert pytest.approx(config.memory) == 0.8
-
-
-def test_config_local_njob_ncore(opt_state_basic):
- config = qcng.config.get_config(hostname="something", task_config={"jobs_per_node": 3, "ncores": 1})
- assert config.ncores == 1
- assert pytest.approx(config.memory, 0.1) == 1.33
-
-
-def test_config_local_njob_ncore_plus_memory(opt_state_basic):
- config = qcng.config.get_config(hostname="something", task_config={"jobs_per_node": 3, "ncores": 1, "memory": 6})
- assert config.ncores == 1
- assert pytest.approx(config.memory, 0.1) == 6
-
-
-def test_config_local_nnodes(opt_state_basic):
- # Give a warning that mentions that mpirun is needed if you define a multi-node task
- with pytest.raises(ValueError) as exc:
- qcng.config.get_config(hostname="something", task_config={"nnodes": 10})
- assert "https://qcengine.readthedocs.io/en/stable/environment.html" in str(exc.value)
-
- # Test with an MPI run command
- local_options = {
- "nnodes": 4,
- "mpiexec_command": "mpirun -n {total_ranks} -N {ranks_per_node} --cpus-per-slot {cores_per_rank}",
- }
- config = qcng.config.get_config(hostname="something", task_config=local_options)
- assert config.use_mpiexec
- assert config.mpiexec_command.startswith("mpirun")
- assert create_mpi_invocation("hello_world", config) == [
- "mpirun",
- "-n",
- "20",
- "-N",
- "5",
- "--cpus-per-slot",
- "1",
- "hello_world",
- ]
-
- # Change the number of cores per rank
- local_options["cores_per_rank"] = 2
- config = qcng.config.get_config(hostname="something", task_config=local_options)
- assert config.use_mpiexec
- assert config.mpiexec_command.startswith("mpirun")
- assert create_mpi_invocation("hello_world", config) == [
- "mpirun",
- "-n",
- "10",
- "-N",
- "2",
- "--cpus-per-slot",
- "2",
- "hello_world",
- ]
-
-
-def test_config_validation(opt_state_basic):
- with pytest.raises(pydantic.ValidationError):
- config = qcng.config.get_config(hostname="something", task_config={"bad": 10})
-
-
-def test_global_repr():
- assert isinstance(qcng.config.global_repr(), str)
-
-
-def test_batch_node(opt_state_basic):
- # Should always use mpirun
- config = qcng.config.get_config(hostname="bn1")
- assert config.use_mpiexec
- assert config.ncores == 24
- assert config.nnodes == 1
-
- config = qcng.config.get_config(hostname="bn1", task_config={"nnodes": 2})
- assert config.use_mpiexec
- assert config.ncores == 24
- assert config.nnodes == 2
-
-
-def test_mpirun_command_errors():
- # Checks for ranks_per_node
- with pytest.raises(ValueError) as exc:
- NodeDescriptor(name="something", hostname_pattern="*", mpiexec_command="mpirun -n {total_ranks}")
- assert "must explicitly state" in str(exc.value)
-
- with pytest.raises(ValueError) as exc:
- NodeDescriptor(name="something", hostname_pattern="*", mpiexec_command="mpirun -N {ranks_per_node}")
- assert "must contain either" in str(exc.value)
diff --git a/qcengine/tests/test_harness_canonical.py b/qcengine/tests/test_harness_canonical.py
deleted file mode 100644
index 92d31cda7..000000000
--- a/qcengine/tests/test_harness_canonical.py
+++ /dev/null
@@ -1,178 +0,0 @@
-"""
-Tests the DQM compute dispatch module
-"""
-import msgpack
-import numpy as np
-import pytest
-from qcelemental.models import AtomicInput, BasisSet
-from qcelemental.tests.test_model_results import center_data
-
-import qcengine as qcng
-from qcengine.testing import has_program, using
-
-qcsk_bs = BasisSet(name="custom_basis", center_data=center_data, atom_map=["bs_sto3g_h", "bs_sto3g_h"])
-
-_canonical_methods = [
- ("dftd3", {"method": "b3lyp-d3"}, {}),
- ("qcore", {"method": "pbe", "basis": "6-31G"}, {}),
- ("molpro", {"method": "hf", "basis": "6-31G"}, {}),
- ("mopac", {"method": "PM6"}, {}),
- ("mp2d", {"method": "MP2-DMP2"}, {}),
- ("nwchem", {"method": "hf", "basis": "6-31G"}, {}),
- ("openmm", {"method": "openff-1.0.0", "basis": "smirnoff"}, {}),
- ("psi4", {"method": "hf", "basis": "6-31G"}, {}),
- ("qchem", {"method": "hf", "basis": "6-31G"}, {}),
- ("rdkit", {"method": "UFF"}, {}),
- ("terachem_pbs", {"method": "b3lyp", "basis": "6-31G"}, {}),
- ("torchani", {"method": "ANI1x"}, {}),
- ("turbomole", {"method": "pbe", "basis": "6-31G"}, {}),
- ("xtb", {"method": "GFN2-xTB"}, {}),
- ("adcc", {"method": "adc2", "basis": "6-31G"}, {"n_triplets": 3}),
- ("gcp", {"method": "hf3c"}, {}),
- ("mrchem", {"method": "blyp"}, {"world_prec": 1.0e-3}),
- ("cfour", {"method": "hf", "basis": "6-31G"}, {}),
- ("gamess", {"method": "hf", "basis": "n31"}, {"basis__NGAUSS": 6}),
- ("mctc-gcp", {"method": "dft/sv"}, {}),
- ("mace", {"method": "small"}, {}),
- ("aimnet2", {"method": "b973c"}, {}),
- # add as programs available
- # ("terachem", {"method": "bad"}),
-]
-
-_canonical_methods_qcsk_basis = [
- ("adcc", {"method": "adc2", "basis": qcsk_bs}, {"n_triplets": 3}),
- ("cfour", {"method": "hf", "basis": qcsk_bs}, {}),
- ("gamess", {"method": "hf", "basis": qcsk_bs}, {}),
- ("molpro", {"method": "hf", "basis": qcsk_bs}, {}),
- ("nwchem", {"method": "hf", "basis": qcsk_bs}, {}),
- ("openmm", {"method": "openff-1.0.0", "basis": qcsk_bs}, {}),
- pytest.param("psi4", {"method": "hf", "basis": qcsk_bs}, {}, marks=using("psi4_mp2qcsk")),
- ("qchem", {"method": "hf", "basis": qcsk_bs}, {}),
- ("qcore", {"method": "pbe", "basis": qcsk_bs}, {}),
- ("turbomole", {"method": "pbe", "basis": qcsk_bs}, {}),
-]
-
-
-def _get_molecule(program):
- if program in ["openmm", "terachem_pbs"]:
- return qcng.get_molecule("water")
- else:
- return qcng.get_molecule("hydrogen")
-
-
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods)
-def test_compute_energy(program, model, keywords):
- if not has_program(program):
- pytest.skip(f"Program '{program}' not found.")
-
- molecule = _get_molecule(program)
-
- inp = AtomicInput(molecule=molecule, driver="energy", model=model, keywords=keywords)
- ret = qcng.compute(inp, program, raise_error=True)
- assert ret.success is True
- assert isinstance(ret.return_result, float)
-
-
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods)
-def test_compute_gradient(program, model, keywords):
- if not has_program(program):
- pytest.skip("Program '{}' not found.".format(program))
-
- molecule = _get_molecule(program)
-
- inp = AtomicInput(
- molecule=molecule, driver="gradient", model=model, extras={"mytag": "something"}, keywords=keywords
- )
- if program in ["adcc"]:
- with pytest.raises(qcng.exceptions.InputError) as e:
- qcng.compute(inp, program, raise_error=True)
-
- assert "gradient not implemented" in str(e.value)
-
- else:
- ret = qcng.compute(inp, program, raise_error=True)
-
- assert ret.success is True
- assert isinstance(ret.return_result, np.ndarray)
- assert len(ret.return_result.shape) == 2
- assert ret.return_result.shape[1] == 3
- assert "mytag" in ret.extras, ret.extras
-
-
-@pytest.mark.parametrize("program, model, keywords", _canonical_methods_qcsk_basis)
-def test_compute_energy_qcsk_basis(program, model, keywords):
- if not has_program(program):
- pytest.skip("Program '{}' not found.".format(program))
-
- molecule = _get_molecule(program)
- inp = AtomicInput(molecule=molecule, driver="energy", model=model, keywords=keywords)
-
- with pytest.raises(qcng.exceptions.InputError) as e:
- qcng.compute(inp, program, raise_error=True)
-
- assert "QCSchema BasisSet for model.basis not implemented" in str(e.value)
-
-
-@pytest.mark.parametrize(
- "program, model",
- [
- ("cfour", {"method": "bad"}),
- ("dftd3", {"method": "bad"}),
- ("dftd3", {"method": "b3lyp-d3", "driver": "hessian"}),
- ("qcore", {"method": "bad"}),
- ("gamess", {"method": "bad"}),
- ("mopac", {"method": "bad"}),
- ("mp2d", {"method": "bad"}),
- ("nwchem", {"method": "bad"}),
- ("openmm", {"method": "bad"}),
- ("psi4", {"method": "bad"}),
- ("qchem", {"method": "bad"}),
- ("rdkit", {"method": "bad"}),
- ("terachem_pbs", {"method": "bad"}),
- ("torchani", {"method": "bad"}),
- ("turbomole", {"method": "bad"}),
- ("adcc", {"method": "bad"}),
- ("gcp", {"method": "bad"}),
- ("mrchem", {"method": "bad"}),
- ("mctc-gcp", {"method": "bad"}),
- ("mace", {"method": "bad"})
- # add as programs available
- # ("molpro", {"method": "bad"}),
- # ("terachem", {"method": "bad"}),
- # ("xtb", {"method": "bad"}),
- ],
-)
-def test_compute_bad_models(program, model):
- if not has_program(program):
- pytest.skip("Program '{}' not found.".format(program))
-
- adriver = model.pop("driver", "energy")
- amodel = model
- inp = AtomicInput(molecule=qcng.get_molecule("hydrogen"), driver=adriver, model=amodel)
-
- with pytest.raises(qcng.exceptions.InputError) as exc:
- ret = qcng.compute(inp, program, raise_error=True)
-
-
-def test_psi4_restarts(monkeypatch):
- """
- Make sure that a random error is raised which can be restarted if psi4 fails with no error message
- """
- if not has_program("psi4"):
- pytest.skip("Program psi4 not found.")
-
- # create the psi4 task
- inp = AtomicInput(molecule=qcng.get_molecule("hydrogen"), driver="energy", model={"method": "hf", "basis": "6-31G"})
-
- def mock_execute(*args, **kwargs):
- """
- Mock the output of a failed psi4 task with missing error message.
- """
-
- mock_output = {"sucess": False, "outfiles": {"data.msgpack": msgpack.dumps({"missing": "data"})}}
- return True, mock_output
-
- monkeypatch.setattr("qcengine.programs.psi4.execute", mock_execute)
-
- with pytest.raises(qcng.exceptions.RandomError):
- _ = qcng.compute(input_data=inp, program="psi4", raise_error=True, task_config={"retries": 0})
diff --git a/qcengine/tests/test_mdi.py b/qcengine/tests/test_mdi.py
deleted file mode 100644
index 285ecaff2..000000000
--- a/qcengine/tests/test_mdi.py
+++ /dev/null
@@ -1,110 +0,0 @@
-"""
-Tests the MDI interface
-"""
-
-
-from qcelemental.testing import compare_values
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-@using("psi4")
-@using("mdi")
-def test_mdi_water():
- json_data = {
- "molecule": qcng.get_molecule("water"),
- "driver": "energy",
- "model": {"method": "SCF", "basis": "sto-3g"},
- "keywords": {"scf_type": "df"},
- }
-
- engine = qcng.MDIServer(
- "-role DRIVER -name QCEngine -method TEST",
- "psi4",
- qcng.get_molecule("water"),
- {"method": "SCF", "basis": "sto-3g"},
- {"scf_type": "df"},
- )
-
- # Test the <@ command
- node = engine.send_node()
- assert node == "@DEFAULT"
-
- # Test the COORDS command
- expected = [0.1, 0.0, -0.12947694, 0.0, -1.49418734, 1.02744651, 0.0, 1.49418734, 1.02744651]
- engine.recv_coords(expected)
- coords = engine.send_coords()
- assert compare_values(expected, coords, atol=1.0e-7)
-
- # Test the >ELEMENTS and MASSES command
- expected = [15.99491461957, 1.00782503223, 1.00782503223]
- engine.recv_masses(expected)
- masses = engine.send_masses()
- assert compare_values(expected, masses, atol=1.0e-7)
-
- # Test the TOTCHARGE and >ELEC_MULT commands
- expected = 1.0
- multiplicity = 2
- engine.recv_total_charge(expected)
- engine.recv_multiplicity(multiplicity)
- totcharge = engine.send_total_charge()
- assert compare_values(expected, totcharge, atol=1.0e-7)
-
- # Test the final energy
- energy = engine.send_energy()
- expected = -74.66669841
- assert compare_values(expected, energy, atol=1.0e-6)
-
- # Test the EXIT command
- engine.stop()
diff --git a/qcengine/tests/test_procedures.py b/qcengine/tests/test_procedures.py
deleted file mode 100644
index 92227dc59..000000000
--- a/qcengine/tests/test_procedures.py
+++ /dev/null
@@ -1,385 +0,0 @@
-"""
-Tests the DQM compute dispatch module
-"""
-
-import pytest
-from qcelemental.models import DriverEnum, OptimizationInput, FailedOperation
-from qcelemental.models.common_models import Model
-from qcelemental.models.procedures import OptimizationSpecification, QCInputSpecification, TDKeywords, TorsionDriveInput
-
-import qcengine as qcng
-from qcengine.testing import failure_engine, using
-
-
-@pytest.fixture(scope="function")
-def input_data():
- return {
- "keywords": {"coordsys": "tric", "maxiter": 100, "program": None},
- "input_specification": {"driver": "gradient", "model": None, "keywords": {}},
- "initial_molecule": None,
- }
-
-
-@using("psi4")
-@pytest.mark.parametrize("ncores", [1, 4])
-@pytest.mark.parametrize(
- "optimizer",
- [
- pytest.param("geometric", marks=using("geometric")),
- pytest.param("optking", marks=using("optking")),
- pytest.param("berny", marks=using("berny")),
- ],
-)
-def test_geometric_psi4(input_data, optimizer, ncores):
-
- input_data["initial_molecule"] = qcng.get_molecule("hydrogen")
- input_data["input_specification"]["model"] = {"method": "HF", "basis": "sto-3g"}
- input_data["input_specification"]["keywords"] = {"scf_properties": ["wiberg_lowdin_indices"]}
- input_data["keywords"]["program"] = "psi4"
-
- input_data = OptimizationInput(**input_data)
-
- task_config = {
- "ncores": ncores,
- }
-
- ret = qcng.compute_procedure(input_data, optimizer, raise_error=True, task_config=task_config)
- assert 10 > len(ret.trajectory) > 1
-
- assert pytest.approx(ret.final_molecule.measure([0, 1]), 1.0e-4) == 1.3459150737
- assert ret.provenance.creator.lower() == optimizer
- assert ret.trajectory[0].provenance.creator.lower() == "psi4"
-
- if optimizer == "optking":
- pytest.xfail("not passing threads to psi4")
- else:
- assert ret.trajectory[0].provenance.nthreads == ncores
-
- # Check keywords passing
- for single in ret.trajectory:
- assert "scf_properties" in single.keywords
- assert "WIBERG_LOWDIN_INDICES" in single.extras["qcvars"] or "WIBERG LOWDIN INDICES" in single.extras["qcvars"]
- # TODO: old WIBERG qcvar used underscore; new one uses space. covering bases here but remove someday
-
-
-@using("psi4")
-@using("geometric")
-def test_geometric_local_options(input_data):
-
- input_data["initial_molecule"] = qcng.get_molecule("hydrogen")
- input_data["input_specification"]["model"] = {"method": "HF", "basis": "sto-3g"}
- input_data["keywords"]["program"] = "psi4"
-
- input_data = OptimizationInput(**input_data)
-
- # Set some extremely large number to test
- ret = qcng.compute_procedure(input_data, "geometric", raise_error=True, local_options={"memory": "5000"})
- assert pytest.approx(ret.trajectory[0].provenance.memory, 1) == 4900
-
- # Make sure we cleaned up
- assert "_qcengine_local_config" not in ret.input_specification
- assert "_qcengine_local_config" not in ret.trajectory[0].extras
-
-
-@using("rdkit")
-@using("geometric")
-def test_geometric_stdout(input_data):
-
- input_data["initial_molecule"] = qcng.get_molecule("water")
- input_data["input_specification"]["model"] = {"method": "UFF", "basis": ""}
- input_data["keywords"]["program"] = "rdkit"
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, "geometric", raise_error=True)
- assert ret.success is True
- assert "Converged!" in ret.stdout
-
-
-@using("psi4")
-@using("berny")
-def test_berny_stdout(input_data):
-
- input_data["initial_molecule"] = qcng.get_molecule("water")
- input_data["input_specification"]["model"] = {"method": "HF", "basis": "sto-3g"}
- input_data["keywords"]["program"] = "psi4"
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, "berny", raise_error=True)
- assert ret.success is True
- assert "All criteria matched" in ret.stdout
-
-
-@using("psi4")
-@using("berny")
-def test_berny_failed_gradient_computation(input_data):
-
- input_data["initial_molecule"] = qcng.get_molecule("water")
- input_data["input_specification"]["model"] = {"method": "HF", "basis": "sto-3g"}
- input_data["input_specification"]["keywords"] = {"badpsi4key": "badpsi4value"}
- input_data["keywords"]["program"] = "psi4"
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, "berny", raise_error=False)
- assert isinstance(ret, FailedOperation)
- assert ret.success is False
- assert ret.error.error_type == qcng.exceptions.InputError.error_type
-
-
-@using("geometric")
-@using("rdkit")
-def test_geometric_rdkit_error(input_data):
-
- input_data["initial_molecule"] = qcng.get_molecule("water").copy(exclude={"connectivity_"})
- input_data["input_specification"]["model"] = {"method": "UFF", "basis": ""}
- input_data["keywords"]["program"] = "rdkit"
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, "geometric")
- assert ret.success is False
- assert isinstance(ret.error.error_message, str)
-
-
-@using("rdkit")
-@using("geometric")
-def test_optimization_protocols(input_data):
-
- input_data["initial_molecule"] = qcng.get_molecule("water")
- input_data["input_specification"]["model"] = {"method": "UFF"}
- input_data["keywords"]["program"] = "rdkit"
- input_data["protocols"] = {"trajectory": "initial_and_final"}
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, "geometric", raise_error=True)
- assert ret.success, ret.error.error_message
-
- assert len(ret.trajectory) == 2
- assert ret.initial_molecule.get_hash() == ret.trajectory[0].molecule.get_hash()
- assert ret.final_molecule.get_hash() == ret.trajectory[1].molecule.get_hash()
-
-
-@using("geometric")
-def test_geometric_retries(failure_engine, input_data):
-
- failure_engine.iter_modes = ["random_error", "pass", "random_error", "random_error", "pass"] # Iter 1 # Iter 2
- failure_engine.iter_modes.extend(["pass"] * 20)
-
- input_data["initial_molecule"] = {
- "symbols": ["He", "He"],
- "geometry": [0, 0, 0, 0, 0, failure_engine.start_distance],
- }
- input_data["input_specification"]["model"] = {"method": "something"}
- input_data["keywords"]["program"] = failure_engine.name
- input_data["keywords"]["coordsys"] = "cart" # needed by geometric v1.0 to play nicely with failure_engine
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, "geometric", task_config={"ncores": 13}, raise_error=True)
- assert ret.success is True
- assert ret.trajectory[0].provenance.retries == 1
- assert ret.trajectory[0].provenance.ncores == 13
- assert ret.trajectory[1].provenance.retries == 2
- assert ret.trajectory[1].provenance.ncores == 13
- assert "retries" not in ret.trajectory[2].provenance.dict()
-
- # Ensure we still fail
- failure_engine.iter_modes = ["random_error", "pass", "random_error", "random_error", "pass"] # Iter 1 # Iter 2
- ret = qcng.compute_procedure(input_data, "geometric", task_config={"ncores": 13, "retries": 1})
- assert ret.success is False
- assert ret.input_data["trajectory"][0]["provenance"]["retries"] == 1
- assert len(ret.input_data["trajectory"]) == 2
-
-
-@using("geometric")
-@pytest.mark.parametrize(
- "program, model, bench",
- [
- pytest.param(
- "rdkit", {"method": "UFF"}, [1.87130923886072, 2.959448636243545, 104.5099642579023], marks=using("rdkit")
- ),
- pytest.param(
- "rdkit",
- {"method": "mmff94"},
- [1.8310842343589573, 2.884612338953529, 103.93822919865106],
- marks=using("rdkit"),
- ),
- pytest.param(
- "rdkit",
- {"method": "MMFF94s"},
- [1.8310842343589573, 2.884612338953529, 103.93822919865106],
- marks=using("rdkit"),
- ),
- pytest.param(
- "torchani",
- {"method": "ANI1x"},
- [1.82581873750194, 2.866376526793269, 103.4332610730292],
- marks=using("torchani"),
- ),
- pytest.param(
- "mopac",
- {"method": "PM6"},
- [1.793052302291527, 2.893333237502448, 107.57254391453196],
- marks=using("mopac"),
- ),
- pytest.param(
- "openmm",
- {"method": "openff-1.0.0", "basis": "smirnoff"},
- [1.8344994291796748, 3.010099477501204, 110.25177977849998],
- marks=using("openmm"),
- ),
- pytest.param(
- "openmm",
- {"method": "openff_unconstrained-1.0.0", "basis": "smirnoff"},
- [1.8344994291195869, 3.0100994772976124, 110.25259556886984],
- marks=using("openmm"),
- ),
- pytest.param(
- "openmm",
- {"method": "smirnoff99Frosst-1.1.0", "basis": "smirnoff"},
- [1.814137087600702, 3.025566213038376, 112.9999999990053],
- marks=using("openmm"),
- ),
- pytest.param(
- "qcore",
- {"method": "GFN1"},
- [1.8104763949897031, 2.9132449420655213, 107.13403040879244],
- marks=using("qcore"),
- ),
- ],
-)
-def test_geometric_generic(input_data, program, model, bench):
-
- input_data["initial_molecule"] = qcng.get_molecule("water")
- input_data["input_specification"]["model"] = model
- input_data["keywords"]["program"] = program
- input_data["input_specification"]["extras"] = {"_secret_tags": {"mysecret_tag": "data1"}}
-
- ret = qcng.compute_procedure(input_data, "geometric", raise_error=True)
- assert ret.success is True
- assert "Converged!" in ret.stdout
-
- r01, r02, r12, a102 = ret.final_molecule.measure([[0, 1], [0, 2], [1, 2], [1, 0, 2]])
-
- assert pytest.approx(r01, 1.0e-4) == bench[0]
- assert pytest.approx(r02, 1.0e-4) == bench[0]
- assert pytest.approx(r12, 1.0e-4) == bench[1]
- assert pytest.approx(a102, 1.0e-4) == bench[2]
-
- assert "_secret_tags" in ret.trajectory[0].extras
- assert "data1" == ret.trajectory[0].extras["_secret_tags"]["mysecret_tag"]
-
-
-@using("nwchem")
-@pytest.mark.parametrize("linopt", [0, 1])
-def test_nwchem_relax(linopt):
- # Make the input file
- input_data = {
- "input_specification": {
- "model": {"method": "HF", "basis": "sto-3g"},
- "keywords": {"set__driver:linopt": linopt},
- },
- "initial_molecule": qcng.get_molecule("hydrogen"),
- }
- input_data = OptimizationInput(**input_data)
-
- # Run the relaxation
- ret = qcng.compute_procedure(input_data, "nwchemdriver", raise_error=True)
- assert 10 > len(ret.trajectory) > 1
-
- assert pytest.approx(ret.final_molecule.measure([0, 1]), 1.0e-4) == 1.3459150737
-
-
-@using("nwchem")
-def test_nwchem_restart(tmpdir):
- # Make the input file
- input_data = {
- "input_specification": {
- "model": {"method": "HF", "basis": "sto-3g"},
- "keywords": {"driver__maxiter": 2, "set__driver:linopt": 0},
- "extras": {"allow_restarts": True},
- },
- "initial_molecule": qcng.get_molecule("hydrogen"),
- }
- input_data = OptimizationInput(**input_data)
-
- # Run an initial step, which should not converge
- local_opts = {"scratch_messy": True, "scratch_directory": str(tmpdir)}
- ret = qcng.compute_procedure(input_data, "nwchemdriver", local_options=local_opts, raise_error=False)
- assert not ret.success
-
- # Run it again, which should converge
- new_ret = qcng.compute_procedure(input_data, "nwchemdriver", local_options=local_opts, raise_error=True)
- assert new_ret.success
-
-
-@using("rdkit")
-@using("torsiondrive")
-def test_torsiondrive_generic():
-
- input_data = TorsionDriveInput(
- keywords=TDKeywords(dihedrals=[(2, 0, 1, 5)], grid_spacing=[180]),
- input_specification=QCInputSpecification(driver=DriverEnum.gradient, model=Model(method="UFF", basis=None)),
- initial_molecule=[qcng.get_molecule("ethane")] * 2,
- optimization_spec=OptimizationSpecification(
- procedure="geomeTRIC",
- keywords={
- "coordsys": "hdlc",
- "maxiter": 500,
- "program": "rdkit",
- },
- ),
- )
-
- ret = qcng.compute_procedure(input_data, "torsiondrive", raise_error=True)
-
- assert ret.error is None
- assert ret.success
-
- expected_grid_ids = {"180", "0"}
-
- assert {*ret.optimization_history} == expected_grid_ids
-
- assert {*ret.final_energies} == expected_grid_ids
- assert {*ret.final_molecules} == expected_grid_ids
-
- assert (
- pytest.approx(ret.final_molecules["180"].measure([2, 0, 1, 5]), abs=1.0e-2) == 180.0
- or pytest.approx(ret.final_molecules["180"].measure([2, 0, 1, 5]), abs=1.0e-2) == -180.0
- )
- assert pytest.approx(ret.final_molecules["0"].measure([2, 0, 1, 5]), abs=1.0e-2) == 0.0
-
- assert ret.provenance.creator.lower() == "torsiondrive"
- assert ret.optimization_history["180"][0].provenance.creator.lower() == "geometric"
- assert ret.optimization_history["180"][0].trajectory[0].provenance.creator.lower() == "rdkit"
-
- assert ret.stdout == "All optimizations converged at lowest energy. Job Finished!\n"
-
-
-@using("mrchem")
-@pytest.mark.parametrize(
- "optimizer",
- [
- pytest.param("geometric", marks=using("geometric")),
- pytest.param("optking", marks=using("optking")),
- pytest.param("berny", marks=using("berny")),
- ],
-)
-def test_optimization_mrchem(input_data, optimizer):
-
- input_data["initial_molecule"] = qcng.get_molecule("hydrogen")
- input_data["input_specification"]["model"] = {"method": "HF"}
- input_data["input_specification"]["keywords"] = {"world_prec": 1.0e-4}
- input_data["keywords"]["program"] = "mrchem"
-
- input_data = OptimizationInput(**input_data)
-
- ret = qcng.compute_procedure(input_data, optimizer, raise_error=True)
- assert 10 > len(ret.trajectory) > 1
-
- assert pytest.approx(ret.final_molecule.measure([0, 1]), 1.0e-3) == 1.3860734486984705
- assert ret.provenance.creator.lower() == optimizer
- assert ret.trajectory[0].provenance.creator.lower() == "mrchem"
diff --git a/qcengine/tests/test_program_utils.py b/qcengine/tests/test_program_utils.py
deleted file mode 100644
index 573e0747a..000000000
--- a/qcengine/tests/test_program_utils.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Tests the DQM compute dispatch module
-"""
-
-import pytest
-
-import qcengine as qcng
-from qcengine.testing import using
-
-
-def test_list_programs():
-
- r = qcng.list_all_programs()
- assert r >= {"psi4", "rdkit", "molpro", "dftd3"}
-
-
-@pytest.mark.parametrize(
- "program",
- [
- pytest.param("psi4", marks=using("psi4")),
- pytest.param("torchani", marks=using("torchani")),
- pytest.param("rdkit", marks=using("rdkit")),
- ],
-)
-def test_check_program_avail(program):
-
- assert program in qcng.list_available_programs()
-
-
-def test_program_avail_bounce():
-
- with pytest.raises(qcng.exceptions.InputError) as exc:
- qcng.compute({}, "bad_program", raise_error=True)
-
- assert "not registered" in str(exc.value)
-
-
-def test_list_procedures():
-
- r = qcng.list_all_procedures()
- assert r >= {"geometric", "berny"}
-
-
-@pytest.mark.parametrize(
- "procedure", [pytest.param("geometric", marks=using("geometric")), pytest.param("berny", marks=using("berny"))]
-)
-def test_check_procedure_avail(procedure):
-
- assert procedure in qcng.list_available_procedures()
-
-
-def test_procedure_avail_bounce():
-
- with pytest.raises(qcng.exceptions.InputError) as exc:
- qcng.compute_procedure({}, "bad_program", raise_error=True)
-
- assert "not registered" in str(exc.value)
diff --git a/qcengine/tests/test_utils.py b/qcengine/tests/test_utils.py
deleted file mode 100644
index f1203da0b..000000000
--- a/qcengine/tests/test_utils.py
+++ /dev/null
@@ -1,91 +0,0 @@
-import os
-import sys
-import time
-
-import pytest
-from qcelemental.models import AtomicInput
-
-from qcengine import util
-from qcengine.exceptions import InputError
-
-
-def test_model_wrapper():
-
- with pytest.raises(InputError):
- util.model_wrapper({"bad": "yup"}, AtomicInput)
-
-
-def test_compute_wrapper_capture():
-
- oldout = id(sys.stdout)
- with util.compute_wrapper(capture_output=True):
-
- assert id(sys.stdout) != id(oldout)
-
- assert id(sys.stdout) == oldout
-
-
-def test_compute_wrapper_capture_exception():
-
- oldout = id(sys.stdout)
- with util.compute_wrapper(capture_output=True) as metadata:
-
- assert id(sys.stdout) != id(oldout)
-
- raise KeyError("Hello there!")
-
- assert id(sys.stdout) == oldout
-
- assert metadata["success"] is False
- assert metadata["error_type"] == "unknown_error"
-
-
-def test_terminate():
-
- t = time.time()
- with util.popen(["sleep", "30"]) as proc:
-
- util.terminate_process(proc["proc"])
-
- assert (time.time() - t) < 1
-
-
-def test_tmpdir():
-
- with util.temporary_directory(child="this") as tmpdir:
- assert str(tmpdir).split(os.path.sep)[-1] == "this"
-
- with util.temporary_directory() as parentdir:
- with util.temporary_directory(parent=parentdir, child="this") as tmpdir:
- assert str(tmpdir).split(os.path.sep)[-1] == "this"
- assert str(tmpdir).rsplit(os.path.sep, 1)[0] == str(parentdir)
-
- with util.temporary_directory(suffix="this") as tmpdir:
- assert str(tmpdir).split(os.path.sep)[-1].endswith("this")
-
-
-def test_disk_files():
-
- infiles = {"thing1": "hello", "thing2": "world", "other": "everyone"}
- outfiles = {"thing*": None, "other": None}
- with util.temporary_directory(suffix="this") as tmpdir:
- with util.disk_files(infiles=infiles, outfiles=outfiles, cwd=tmpdir):
- pass
-
- assert outfiles.keys() == {"thing*", "other"}
- assert outfiles["thing*"]["thing1"] == "hello"
- assert outfiles["other"] == "everyone"
-
-
-def test_popen_tee_output(capsys):
- # Test without passing
- with util.popen(["echo", "hello"]) as proc:
- proc["proc"].wait()
- assert proc["stdout"].strip() == "hello"
-
- # Test with passing
- with util.popen(["echo", "hello"], pass_output_forward=True) as proc:
- proc["proc"].wait()
- assert proc["stdout"] == "hello\n"
- captured = capsys.readouterr()
- assert captured.out == "hello\n"
diff --git a/qcengine/units.py b/qcengine/units.py
deleted file mode 100644
index 323d24ea8..000000000
--- a/qcengine/units.py
+++ /dev/null
@@ -1,8 +0,0 @@
-"""
-Pinning point for QCElemental units
-"""
-
-# Pin Codata
-import qcelemental as qcel
-
-ureg = qcel.PhysicalConstantsContext("CODATA2014")
diff --git a/qcengine/util.py b/qcengine/util.py
deleted file mode 100644
index 352193885..000000000
--- a/qcengine/util.py
+++ /dev/null
@@ -1,635 +0,0 @@
-"""
-Several import utilities
-"""
-
-import io
-import json
-import os
-import shutil
-import signal
-import subprocess
-import sys
-import tempfile
-import time
-import traceback
-from contextlib import contextmanager
-from functools import partial
-from pathlib import Path
-from threading import Thread
-from typing import Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Union
-
-try:
- from pydantic.v1 import BaseModel, ValidationError
-except ImportError:
- from pydantic import BaseModel, ValidationError
-from qcelemental.models import AtomicResult, FailedOperation, OptimizationResult
-
-from qcengine.config import TaskConfig
-
-from .config import LOGGER, get_provenance_augments
-from .exceptions import InputError, QCEngineException
-
-__all__ = ["compute_wrapper", "model_wrapper", "handle_output_metadata", "create_mpi_invocation", "execute"]
-
-
-def create_mpi_invocation(executable: str, task_config: TaskConfig) -> List[str]:
- """Create the launch command for an MPI-parallel task
-
- Parameters
- ----------
- executable: str
- Path to executable
- task_config: TaskConfig
- Specification for number of nodes, cores per node, etc.
- """
-
- # Make the mpirun invocation
- mpirun_str = task_config.mpiexec_command.format(
- nnodes=task_config.nnodes,
- ranks_per_node=task_config.ncores // task_config.cores_per_rank,
- total_ranks=task_config.nnodes * task_config.ncores // task_config.cores_per_rank,
- cores_per_rank=task_config.cores_per_rank,
- )
- command = mpirun_str.split()
-
- # Add in the desired executable
- command.append(executable)
- return command
-
-
-def model_wrapper(input_data: Dict[str, Any], model: BaseModel) -> BaseModel:
- """
- Wrap input data in the given model, or return a controlled error
- """
-
- if isinstance(input_data, dict):
- try:
- input_data = model(**input_data)
- except ValidationError as exc:
- raise InputError(
- f"Error creating '{model.__name__}', data could not be correctly parsed:\n{str(exc)}"
- ) from None
- elif isinstance(input_data, model):
- input_data = input_data.copy()
- else:
- raise InputError("Input type of {} not understood.".format(type(model)))
-
- # Older QCElemental compat
- try:
- input_data.extras
- except AttributeError:
- input_data = input_data.copy(update={"extras": {}})
-
- return input_data
-
-
-@contextmanager
-def capture_stdout():
- oldout, olderr = sys.stdout, sys.stderr
- try:
- out = [io.StringIO(), io.StringIO()]
- sys.stdout, sys.stderr = out
- yield out
- finally:
- sys.stdout, sys.stderr = oldout, olderr
- out[0] = out[0].getvalue()
- out[1] = out[1].getvalue()
-
-
-@contextmanager
-def compute_wrapper(capture_output: bool = True, raise_error: bool = False) -> Dict[str, Any]:
- """Wraps compute for timing, output capturing, and raise protection"""
-
- metadata = {"stdout": None, "stderr": None, "success": True, "retries": 0}
-
- # Start timer
- comp_time = time.time()
-
- # Capture stdout/err
- new_stdout = io.StringIO()
- new_stderr = io.StringIO()
- if capture_output:
-
- old_stdout, sys.stdout = sys.stdout, new_stdout
- old_stderr, sys.stderr = sys.stderr, new_stderr
-
- try:
- yield metadata
-
- # Canonical QCEngine, do not show traceback - return error
- except QCEngineException as exc:
- if raise_error:
- raise exc
-
- metadata["error_type"] = exc.error_type
- metadata["error_message"] = exc.error_message
- metadata["success"] = False
-
- # Unknown QCEngine exception likely in the Python layer, show traceback
- except Exception as exc:
- if raise_error:
- raise exc
-
- metadata["error_type"] = "unknown_error"
- metadata["error_message"] = "QCEngine Execution Error:\n" + traceback.format_exc()
- metadata["success"] = False
-
- # Place data
- metadata["wall_time"] = time.time() - comp_time
- if capture_output:
- sys.stdout = old_stdout
- sys.stderr = old_stderr
- # Pull over values
- metadata["stdout"] = new_stdout.getvalue() or None
- metadata["stderr"] = new_stderr.getvalue() or None
-
-
-def handle_output_metadata(
- output_data: Union[Dict[str, Any], "AtomicResult", "OptimizationResult", "FailedOperation"],
- metadata: Dict[str, Any],
- raise_error: bool = False,
- return_dict: bool = True,
-) -> Union[Dict[str, Any], "AtomicResult", "OptimizationResult", "FailedOperation"]:
- """
- Fuses general metadata and output together.
-
- Parameters:
- output_data: The original output object to be fused with metadata
- metadata: Metadata produced by the compute_wrapper context manager
- raise_error: Raise an exception if errors exist (True) or return FailedOperation (False)
- return_dict: Return dictionary or object representation of data
-
- Returns
- -------
- result : AtomicResult, OptimizationResult, FailedOperation, or dict representation of any one.
- Output type depends on return_dict or a dict if an error was generated in model construction
- """
-
- if isinstance(output_data, dict):
- output_fusion = output_data # Error handling
- else:
- output_fusion = output_data.dict()
-
- # Do not override if computer generates
- output_fusion["stdout"] = output_fusion.get("stdout", None) or metadata["stdout"]
- output_fusion["stderr"] = output_fusion.get("stderr", None) or metadata["stderr"]
-
- if metadata["success"] is not True:
- output_fusion["success"] = False
- output_fusion["error"] = {"error_type": metadata["error_type"], "error_message": metadata["error_message"]}
-
- # Raise an error if one exists and a user requested a raise
- if raise_error and (output_fusion["success"] is not True):
- msg = "stdout:\n{}".format(output_fusion["stdout"])
- msg += "\nstderr:\n{}".format(output_fusion["stderr"])
- LOGGER.info(msg)
- raise ValueError(output_fusion["error"]["error_message"])
-
- # Fill out provenance datadata
- provenance_augments = get_provenance_augments()
- provenance_augments["wall_time"] = metadata["wall_time"]
- if "provenance" in output_fusion:
- output_fusion["provenance"].update(provenance_augments)
- else:
- # Add onto the augments with some missing info
- provenance_augments["creator"] = "QCEngine"
- provenance_augments["version"] = provenance_augments["qcengine_version"]
- output_fusion["provenance"] = provenance_augments
-
- if metadata["retries"] != 0:
- output_fusion["provenance"]["retries"] = metadata["retries"]
-
- # Make sure pydantic sparsity is upheld
- for val in ["stdout", "stderr"]:
- if output_fusion[val] is None:
- output_fusion.pop(val)
-
- # We need to return the correct objects; e.g. Results, Procedures
- if output_fusion["success"]:
- # This will only execute if everything went well
- ret = output_data.__class__(**output_fusion)
- else:
- # Should only be reachable on failures
- ret = FailedOperation(
- success=output_fusion.pop("success", False), error=output_fusion.pop("error"), input_data=output_fusion
- )
-
- if return_dict:
- return json.loads(ret.json()) # Use Pydantic to serialize, then reconstruct as Python dict of Python Primals
- else:
- return ret
-
-
-def terminate_process(proc: Any, timeout: int = 15) -> None:
- if proc.poll() is None:
-
- # Sigint (keyboard interupt)
- if sys.platform.startswith("win"):
- proc.send_signal(signal.CTRL_BREAK_EVENT)
- else:
- proc.send_signal(signal.SIGINT)
-
- try:
- start = time.time()
- while (proc.poll() is None) and (time.time() < (start + timeout)):
- time.sleep(0.02)
-
- # Flat kill
- finally:
- proc.kill()
-
-
-@contextmanager
-def popen(
- args: List[str],
- append_prefix: bool = False,
- popen_kwargs: Optional[Dict[str, Any]] = None,
- pass_output_forward: bool = False,
-) -> Dict[str, Any]:
- """
- Opens a background task
-
- Code and idea from dask.distributed's testing suite
- https://github.com/dask/distributed
-
- Parameters
- ----------
- args: List[str]
- Input arguments for the command
- append_prefix: bool
- Whether to prepend the Python path prefix to the command being executed
- popen_kwargs: Dict[str, Any]
- Any keyword arguments to use when launching the process
- pass_output_forward: bool
- Whether to pass the stdout and stderr forward to the system's stdout and stderr
- Returns
- -------
- exe: dict
- Dictionary with the following keys:
-
- proc: Popen object describing the background task
- stdout: String value of the standard output of the task
- stdeer: String value of the standard error of the task
-
- """
- args = list(args)
- if popen_kwargs is None:
- popen_kwargs = {}
- else:
- popen_kwargs = popen_kwargs.copy()
-
- # Bin prefix
- if sys.platform.startswith("win"):
- bin_prefix = os.path.join(sys.prefix, "Scripts")
- else:
- bin_prefix = os.path.join(sys.prefix, "bin")
-
- # Do we prefix with Python?
- if append_prefix:
- args[0] = os.path.join(bin_prefix, args[0])
-
- if sys.platform.startswith("win"):
- # Allow using CTRL_C_EVENT / CTRL_BREAK_EVENT
- popen_kwargs["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP
-
- # Route the standard error and output
- popen_kwargs["stdout"] = subprocess.PIPE
- popen_kwargs["stderr"] = subprocess.PIPE
-
- # Prepare StringIO objects to store the stdout and stderr
- stdout = io.BytesIO()
- stderr = io.BytesIO()
-
- # Launch the process
- LOGGER.info("Popen", args, popen_kwargs)
-
- # Ready the output
- ret = {"proc": subprocess.Popen(args, **popen_kwargs)}
-
- # Spawn threads that will read from the stderr/stdout
- # The PIPE uses a buffer with finite capacity. The underlying
- # process will stall if it is unable to write to the buffer
- # because the buffer is full. These threads continuously read
- # from the buffers to ensure that they do not fill.
- #
- def read_from_buffer(buffer: BinaryIO, storage: io.BytesIO, sysio: TextIO):
- for r in iter(partial(buffer.read, 1024), b""):
- storage.write(r)
- if pass_output_forward:
- sysio.write(r.decode())
-
- stdout_reader = Thread(target=read_from_buffer, args=(ret["proc"].stdout, stdout, sys.stdout))
- stdout_reader.start()
- stderr_reader = Thread(target=read_from_buffer, args=(ret["proc"].stderr, stderr, sys.stderr))
- stderr_reader.start()
-
- # Yield control back to the main thread
- try:
- yield ret
- except Exception:
- raise
-
- finally:
- # Executes on an exception or once the context manager closes
- try:
- terminate_process(ret["proc"])
- finally:
- # Wait for the reader threads to finish
- stdout_reader.join()
- stderr_reader.join()
-
- # Retrieve the standard output for the process
- ret["stdout"] = stdout.getvalue().decode()
- ret["stderr"] = stderr.getvalue().decode()
-
-
-@contextmanager
-def environ_context(config: Optional["TaskConfig"] = None, env: Optional[Dict[str, str]] = None) -> Dict[str, str]:
- """Temporarily set environment variables inside the context manager and
- fully restore previous environment afterwards.
-
- Parameters
- ----------
- config : Optional[TaskConfig], optional
- Automatically sets MKL/OMP num threads based off the input config.
- env : Optional[Dict[str, str]], optional
- A dictionary of environment variables to update.
-
- Yields
- ------
- Dict[str, str]
- The updated environment variables.
- """
-
- temporary_env = {}
- if config:
- temporary_env["OMP_NUM_THREADS"] = str(config.ncores)
- temporary_env["MKL_NUM_THREADS"] = str(config.ncores)
-
- if env:
- temporary_env.update(env)
-
- original_env = {key: os.getenv(key) for key in temporary_env}
- os.environ.update(temporary_env)
- try:
- yield temporary_env
- finally:
- for key, value in original_env.items():
- if value is None:
- del os.environ[key]
- else:
- os.environ[key] = value
-
-
-def execute(
- command: List[str],
- infiles: Optional[Dict[str, str]] = None,
- outfiles: Optional[List[str]] = None,
- *,
- as_binary: Optional[List[str]] = None,
- scratch_name: Optional[str] = None,
- scratch_directory: Optional[str] = None,
- scratch_suffix: Optional[str] = None,
- scratch_messy: bool = False,
- scratch_exist_ok: bool = False,
- blocking_files: Optional[List[str]] = None,
- timeout: Optional[int] = None,
- interupt_after: Optional[int] = None,
- environment: Optional[Dict[str, str]] = None,
- shell: Optional[bool] = False,
- exit_code: Optional[int] = 0,
-) -> Tuple[bool, Dict[str, Any]]:
- """
- Runs a process in the background until complete.
-
- Returns True if exit code <= exit_code (default 0)
-
- Parameters
- ----------
- command : list of str
- infiles : Dict[str] = str
- Input file names (names, not full paths) and contents.
- to be written in scratch dir. May be {}.
- outfiles : List[str] = None
- Output file names to be collected after execution into
- values. May be {}.
- as_binary : List[str] = None
- Keys of `infiles` or `outfiles` to be treated as bytes.
- scratch_name : str, optional
- Passed to temporary_directory
- scratch_directory : str, optional
- Passed to temporary_directory
- scratch_suffix : str, optional
- Passed to temporary_directory
- scratch_messy : bool, optional
- Passed to temporary_directory
- scratch_exist_ok : bool, optional
- Passed to temporary_directory
- blocking_files : list, optional
- Files which should stop execution if present beforehand.
- timeout : int, optional
- Stop the process after n seconds.
- interupt_after : int, optional
- Interupt the process (not hard kill) after n seconds.
- environment : dict, optional
- The environment to run in
- shell : bool, optional
- Run command through the shell.
- exit_code: int, optional
- The exit code above which the process is considered failure.
-
- Raises
- ------
- FileExistsError
- If any file in `blocking` is present
-
- Examples
- --------
- # execute multiple commands in same dir
- >>> success, dexe = qcng.util.execute(['command_1'], infiles, [], scratch_messy=True)
- >>> success, dexe = qcng.util.execute(['command_2'], {}, outfiles, scratch_messy=False, scratch_name=Path(dexe['scratch_directory']).name, scratch_exist_ok=True)
-
- """
-
- # Format inputs
- if infiles is None:
- infiles = {}
-
- if outfiles is None:
- outfiles = []
- outfiles = {k: None for k in outfiles}
-
- # Check for blocking files
- if blocking_files is not None:
- for fl in blocking_files:
- if os.path.isfile(fl):
- raise FileExistsError("Existing file can interfere with execute operation.", fl)
-
- # Format popen
- popen_kwargs = {}
- if environment is not None:
- popen_kwargs["env"] = {k: v for k, v in environment.items() if v is not None}
-
- # Execute
- with temporary_directory(
- child=scratch_name,
- parent=scratch_directory,
- messy=scratch_messy,
- exist_ok=scratch_exist_ok,
- suffix=scratch_suffix,
- ) as scrdir:
- popen_kwargs["cwd"] = scrdir
- popen_kwargs["shell"] = shell
- with disk_files(infiles, outfiles, cwd=scrdir, as_binary=as_binary) as extrafiles:
- with popen(command, popen_kwargs=popen_kwargs) as proc:
- # Wait for the subprocess to complete or the timeout to expire
- if interupt_after is None:
- proc["proc"].wait(timeout=timeout)
- else:
- time.sleep(interupt_after)
- terminate_process(proc["proc"])
- retcode = proc["proc"].poll()
- proc["outfiles"] = extrafiles
- proc["scratch_directory"] = scrdir
-
- return retcode <= exit_code, proc
-
-
-@contextmanager
-def temporary_directory(
- child: str = None, *, parent: str = None, suffix: str = None, messy: bool = False, exist_ok: bool = False
-) -> str:
- """Create and cleanup a quarantined working directory with a parent scratch directory.
-
- Parameters
- ----------
- child : str, optional
- By default, `None`, quarantine directory generated through
- `tempfile.mdktemp` so guaranteed unique and safe. When specified,
- quarantine directory has exactly `name`.
- parent : str, optional
- Create directory `child` elsewhere than TMP default.
- For TMP default, see https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir
- suffix : str, optional
- Create `child` with identifying label by passing to ``tempfile.mkdtemp``.
- Encouraged use for debugging only.
- messy : bool, optional
- Leave scratch directory and contents on disk after completion.
- exist_ok : bool, optional
- Run commands in a possibly pre-existing directory.
-
- Yields
- ------
- str
- Full path of scratch directory.
-
- Raises
- ------
- FileExistsError
- If `child` specified and directory already exists (perhaps from a
- previous `messy=True` run).
-
- Examples
- --------
- parent child suffix --> creates
- ------ ----- ------ -------
- None None None --> /tmp/tmpliyp1i7x/
- None None _anharm --> /tmp/tmpliyp1i7x_anharm/
- None myqcjob None --> /tmp/myqcjob/
- /scratch/johndoe None None --> /scratch/johndoe/tmpliyp1i7x/
- /scratch/johndoe myqcjob None --> /scratch/johndoe/myqcjob/
-
- """
- if child is None:
- tmpdir = Path(tempfile.mkdtemp(dir=parent, suffix=suffix))
- else:
- if parent is None:
- parent = Path(tempfile.gettempdir())
- else:
- parent = Path(parent)
- tmpdir = parent / child
- try:
- os.mkdir(tmpdir)
- except FileExistsError:
- if exist_ok:
- pass
- else:
- raise
- try:
- yield tmpdir
-
- finally:
- if not messy:
- shutil.rmtree(tmpdir)
- LOGGER.info(f"... Removing {tmpdir}")
-
-
-@contextmanager
-def disk_files(
- infiles: Dict[str, Union[str, bytes]],
- outfiles: Dict[str, None],
- *,
- cwd: Optional[str] = None,
- as_binary: Optional[List[str]] = None,
-) -> Dict[str, Union[str, bytes]]:
- """Write and collect files.
-
- Parameters
- ----------
- infiles : Dict[str] = str
- Input file names (names, not full paths) and contents.
- to be written in scratch dir. May be {}.
- outfiles : Dict[str] = None
- Output file names to be collected after execution into
- values. May be {}.
- cwd : str, optional
- Directory to which to write and read files.
- as_binary : List[str] = None
- Keys in `infiles` (`outfiles`) to be written (read) as bytes, not decoded.
-
- Yields
- ------
- Dict[str] = str
- outfiles with RHS filled in.
-
- """
- if cwd is None:
- lwd = Path.cwd()
- else:
- lwd = Path(cwd)
- if as_binary is None:
- as_binary = []
- assert set(as_binary) <= (set(infiles) | set(outfiles))
-
- try:
- for fl, content in infiles.items():
- omode = "wb" if fl in as_binary else "w"
- filename = lwd / fl
- if filename.parent != lwd:
- filename.parent.mkdir(parents=True, exist_ok=True)
- with filename.open(omode) as fp:
- fp.write(content)
- LOGGER.info(f"... Writing ({omode}): {filename}")
-
- yield outfiles
-
- finally:
- for fl in outfiles.keys():
- omode = "rb" if fl in as_binary else "r"
- try:
- filename = lwd / fl
- with open(filename, omode) as fp:
- outfiles[fl] = fp.read()
- LOGGER.info(f"... Writing ({omode}): {filename}")
- except (OSError, FileNotFoundError):
- if "*" in fl:
- gfls = {}
- for gfl in lwd.glob(fl):
- with open(gfl, omode) as fp:
- gfls[gfl.name] = fp.read()
- LOGGER.info(f"... Writing ({omode}): {gfl}")
- if not gfls:
- gfls = None
- outfiles[fl] = gfls
- else:
- outfiles[fl] = None
diff --git a/readthedocs.yml b/readthedocs.yml
deleted file mode 100644
index 1bc760969..000000000
--- a/readthedocs.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-conda:
- file: docs/requirements.yml
-python:
- version: 3
- setup_py_install: true
diff --git a/search.html b/search.html
new file mode 100644
index 000000000..9e27ca571
--- /dev/null
+++ b/search.html
@@ -0,0 +1,160 @@
+
+
+
+
+
+ Search — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+
+
+ Please activate JavaScript to enable the search functionality.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/searchindex.js b/searchindex.js
new file mode 100644
index 000000000..e6a055ef5
--- /dev/null
+++ b/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["api", "api/qcengine.MDIServer", "api/qcengine.compute", "api/qcengine.compute_procedure", "api/qcengine.config.NodeDescriptor", "api/qcengine.config.get_config", "api/qcengine.config.get_provenance_augments", "api/qcengine.config.global_repr", "api/qcengine.get_config", "api/qcengine.get_molecule", "api/qcengine.get_procedure", "api/qcengine.get_program", "api/qcengine.list_all_procedures", "api/qcengine.list_all_programs", "api/qcengine.list_available_procedures", "api/qcengine.list_available_programs", "api/qcengine.programs.ProgramHarness", "api/qcengine.programs.get_program", "api/qcengine.programs.list_all_programs", "api/qcengine.programs.list_available_programs", "api/qcengine.programs.register_program", "api/qcengine.programs.unregister_program", "api/qcengine.register_program", "api/qcengine.unregister_program", "api/qcengine.util.compute_wrapper", "api/qcengine.util.create_mpi_invocation", "api/qcengine.util.execute", "api/qcengine.util.handle_output_metadata", "api/qcengine.util.model_wrapper", "changelog", "cli", "dev_program_harness", "environment", "index", "install", "program_overview", "programs_molecular_mechanics", "programs_semiempirical", "single_compute"], "filenames": ["api.rst", "api/qcengine.MDIServer.rst", "api/qcengine.compute.rst", "api/qcengine.compute_procedure.rst", "api/qcengine.config.NodeDescriptor.rst", "api/qcengine.config.get_config.rst", "api/qcengine.config.get_provenance_augments.rst", "api/qcengine.config.global_repr.rst", "api/qcengine.get_config.rst", "api/qcengine.get_molecule.rst", "api/qcengine.get_procedure.rst", "api/qcengine.get_program.rst", "api/qcengine.list_all_procedures.rst", "api/qcengine.list_all_programs.rst", "api/qcengine.list_available_procedures.rst", "api/qcengine.list_available_programs.rst", "api/qcengine.programs.ProgramHarness.rst", "api/qcengine.programs.get_program.rst", "api/qcengine.programs.list_all_programs.rst", "api/qcengine.programs.list_available_programs.rst", "api/qcengine.programs.register_program.rst", "api/qcengine.programs.unregister_program.rst", "api/qcengine.register_program.rst", "api/qcengine.unregister_program.rst", "api/qcengine.util.compute_wrapper.rst", "api/qcengine.util.create_mpi_invocation.rst", "api/qcengine.util.execute.rst", "api/qcengine.util.handle_output_metadata.rst", "api/qcengine.util.model_wrapper.rst", "changelog.rst", "cli.rst", "dev_program_harness.rst", "environment.rst", "index.rst", "install.rst", "program_overview.rst", "programs_molecular_mechanics.rst", "programs_semiempirical.rst", "single_compute.rst"], "titles": ["QCEngine API", "MDIServer", "compute", "compute_procedure", "NodeDescriptor", "get_config", "get_provenance_augments", "global_repr", "get_config", "get_molecule", "get_procedure", "get_program", "list_all_procedures", "list_all_programs", "list_available_procedures", "list_available_programs", "ProgramHarness", "get_program", "list_all_programs", "list_available_programs", "register_program", "unregister_program", "register_program", "unregister_program", "compute_wrapper", "create_mpi_invocation", "execute", "handle_output_metadata", "model_wrapper", "Changelog", "Command Line Interface", "Adding a New Program Harness", "Environment Detection", "QCEngine", "Install QCEngine", "Program Overview", "Molecular Mechanics", "Semiempirical Quantum Mechanics", "Single Compute"], "terms": {"base": [0, 1, 4, 29, 32, 38], "file": [0, 26, 29, 30, 31, 38], "dqm_comput": 0, "mdi_serv": 0, "mdiserv": 0, "creat": [0, 1, 4, 25, 29, 31, 32, 38], "global": [0, 7], "nodedescriptor": [0, 29, 32], "pydant": [0, 4, 16, 29, 32, 38], "main": 0, "basemodel": [0, 28], "represent": [0, 2, 3, 7, 9, 27, 38], "sever": [0, 29, 33], "import": [0, 29, 31, 33, 37, 38], "model": [0, 1, 2, 3, 4, 16, 27, 28, 29, 31, 32, 33, 36, 37, 38], "programhar": [0, 11, 17, 20, 22, 29], "abc": 0, "class": [1, 10, 11, 17, 29, 38], "qcengin": [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, 35, 37, 38], "mdi_opt": 1, "program": [1, 2, 4, 11, 13, 15, 16, 17, 18, 19, 20, 21, 23, 29, 30, 32, 38], "molecul": [1, 9, 29, 31, 33, 36, 37, 38], "keyword": [1, 29, 31, 33, 38], "raise_error": [1, 2, 3, 16, 24, 27], "fals": [1, 2, 3, 4, 11, 16, 17, 24, 26, 27, 32, 38], "local_opt": [1, 2, 3, 29, 38], "none": [1, 2, 3, 4, 5, 8, 16, 20, 21, 22, 23, 26, 32, 33, 36, 37, 38], "sourc": [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, 32, 38], "object": [1, 2, 3, 4, 16, 27, 29, 32, 36, 37, 38], "method": [1, 11, 16, 17, 29, 33, 36, 37, 38], "summari": 1, "document": [1, 29, 32], "paramet": [1, 2, 3, 5, 8, 10, 11, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "str": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 32, 38], "bool": [1, 2, 3, 4, 11, 16, 17, 24, 26, 27, 29, 32, 38], "dict": [1, 2, 3, 5, 6, 8, 16, 24, 26, 27, 28, 29, 38], "ani": [1, 2, 5, 8, 16, 24, 26, 27, 28, 29, 31, 36, 37, 38], "recv_coord": 1, "coord": 1, "receiv": [1, 29], "set": [1, 12, 13, 14, 15, 18, 19, 29, 31, 32, 38], "nuclear": [1, 38], "coordin": [1, 29, 38], "through": [1, 26, 29, 31, 35, 38], "mdi": [1, 29], "assign": [1, 36, 38], "them": [1, 16, 29, 31, 38], "atom": [1, 29, 37, 38], "current": [1, 7, 29, 32, 33, 34, 36, 38], "np": [1, 4, 32], "ndarrai": 1, "option": [1, 2, 3, 4, 16, 26, 29, 30, 32, 33, 38], "new": [1, 20, 22, 33, 38], "If": [1, 16, 26, 29, 31, 34, 38], "return": [1, 2, 3, 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, 31], "type": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 36, 38], "recv_el": 1, "element": [1, 29, 38], "number": [1, 2, 4, 25, 29, 32, 33, 38], "list": [1, 12, 13, 14, 15, 16, 18, 19, 25, 26, 29, 38], "int": [1, 2, 4, 16, 26, 32, 38], "recv_mass": 1, "mass": [1, 38], "float": [1, 4, 32, 38], "recv_multipl": 1, "multipl": [1, 4, 26, 29, 32, 38], "electron": [1, 38], "system": [1, 4, 32, 33, 38], "recv_natom": 1, "natom": [1, 38], "recv_total_charg": 1, "charg": [1, 38], "total": [1, 4, 29, 32, 38], "run_energi": 1, "send_coord": 1, "send": 1, "send_el": 1, "each": [1, 4, 29, 32, 33, 35, 38], "nucleu": 1, "send_energi": 1, "energi": [1, 29, 31, 33, 36, 37, 38], "send_forc": 1, "forc": [1, 29, 36, 38], "nuclei": 1, "send_mass": 1, "send_multipl": 1, "send_natom": 1, "send_nod": 1, "name": [1, 3, 4, 9, 10, 11, 16, 17, 21, 23, 26, 29, 30, 31, 32, 37, 38], "node": [1, 4, 16, 25, 29], "send_total_charg": 1, "start": [1, 29, 33], "command": [1, 4, 25, 26, 29, 31, 32, 33, 34, 38], "respond": 1, "defin": [1, 29, 32, 38], "standard": [1, 29, 33, 38], "stop": [1, 26], "listen": 1, "update_molecul": 1, "kei": [1, 2, 3, 5, 8, 26, 29, 32, 38], "valu": [1, 4, 26, 29, 32, 38], "updat": [1, 29], "molecular": [1, 31, 33, 38], "input_data": [2, 3, 16, 28], "task_config": [2, 3, 5, 8, 25, 29, 32, 33], "return_dict": [2, 3, 27], "execut": [2, 3, 4, 11, 16, 17, 25, 29, 31, 32, 38], "singl": [2, 29, 31, 33], "cm": [2, 29, 31, 38], "given": [2, 21, 23, 28, 29, 30, 34, 38], "qcschema": [2, 16, 29, 31, 33, 38], "input": [2, 3, 16, 26, 28, 29, 31, 33, 36, 37], "The": [2, 3, 4, 16, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38], "full": [2, 26, 29], "specif": [2, 3, 25, 29, 33, 38], "can": [2, 4, 14, 15, 16, 19, 29, 31, 32, 33, 34, 35, 38], "found": [2, 11, 14, 15, 16, 17, 19, 29, 31, 35], "http": [2, 29, 38], "molssi": [2, 29, 32, 38], "qc": [2, 3, 4, 9, 16, 29, 32], "schema": [2, 3, 4, 16, 29, 32, 36, 37, 38], "readthedoc": [2, 29], "io": [2, 29, 33], "en": [2, 29], "latest": [2, 29], "index": [2, 29, 38], "html": 2, "union": [2, 16, 27, 38], "atomicinput": [2, 3, 16, 29, 31, 33, 36, 37, 38], "A": [2, 3, 7, 29, 30, 31, 32, 33, 38], "dictionari": [2, 3, 27, 29, 31, 32, 38], "from": [2, 3, 4, 29, 30, 31, 32, 36, 37, 38], "qcelement": [2, 3, 29, 30, 31, 33, 37, 38], "which": [2, 4, 26, 29, 31, 32, 38], "determin": [2, 3, 4, 32], "should": [2, 3, 4, 26, 29, 31, 32, 38], "rais": [2, 3, 11, 16, 17, 24, 26, 27, 29], "an": [2, 3, 4, 16, 25, 27, 29, 31, 32, 38], "error": [2, 3, 11, 16, 17, 27, 28, 29, 31, 38], "retri": [2, 4, 29, 32], "random": [2, 29], "tri": 2, "local": [2, 3, 29, 38], "configur": [2, 3, 4, 5, 7, 8, 29, 30, 38], "correspond": [2, 3], "taskconfig": [2, 3, 5, 8, 16, 25, 29], "deprec": [2, 3], "renam": [2, 3, 29, 31], "instead": [2, 3, 29, 38], "atomicresult": [2, 16, 27, 29, 31, 38], "failedoper": [2, 3, 16, 27, 29], "either": [2, 16, 29, 32], "request": [2, 3, 29, 38], "output": [2, 3, 24, 26, 27, 29, 30, 31, 34, 38], "depend": [2, 3, 27, 29, 31, 34, 36], "result": [2, 27, 29, 30, 31, 33, 36, 37], "procedur": [3, 10, 12, 14, 29, 31], "run": [3, 4, 26, 29, 31, 32, 34, 37, 38], "collect": [3, 26, 29, 31], "quantum": [3, 29, 33, 34, 38], "chemistri": [3, 29, 33, 34, 38], "optimizationinput": 3, "json": [3, 4, 9, 16, 29, 30, 32, 38], "geometr": [3, 29, 33], "berni": 3, "comput": [3, 4, 16, 24, 29, 30, 31, 32, 33, 36, 37], "default": [3, 4, 26, 29, 30, 32, 38], "true": [3, 11, 16, 17, 24, 26, 27, 29, 38], "optimizationresult": [3, 27, 29], "config": [4, 5, 6, 7, 16, 29, 30, 31], "descript": [4, 29], "individu": [4, 29, 32, 38], "show": [4, 16, 29, 30, 31, 32, 38], "titl": [4, 16, 32, 38], "properti": [4, 16, 29, 31, 32, 33, 35, 38], "hostname_pattern": [4, 32], "hostnam": [4, 5, 8, 32], "pattern": [4, 29, 32, 38], "string": [4, 16, 29, 31, 32, 38], "scratch_directori": [4, 26, 29, 32, 33, 38], "scratch": [4, 16, 26, 29, 31, 32, 33, 38], "directori": [4, 29, 32, 38], "memori": [4, 16, 29, 32, 33, 38], "memory_safety_factor": [4, 32], "safeti": [4, 32], "factor": [4, 29, 32], "10": [4, 32, 36, 37], "integ": [4, 32, 38], "ncore": [4, 29, 32, 33, 38], "core": [4, 25, 29, 32, 33, 38], "access": [4, 29, 31, 32, 34, 36, 38], "task": [4, 25, 29, 30, 31, 32, 38], "thi": [4, 16, 29, 30, 31, 32, 34, 36, 38], "n": [4, 26, 32, 38], "allow": [4, 29, 32, 38], "autodetect": [4, 32], "jobs_per_nod": [4, 29, 32], "job": [4, 29, 30, 32, 38], "per": [4, 25, 29, 32, 38], "1": [4, 32, 33, 36, 37, 38], "0": [4, 26, 32, 33, 36, 37, 38], "is_batch_nod": [4, 32], "i": [4, 11, 16, 17, 26, 29, 30, 31, 32, 33, 34, 36, 37, 38], "batch": [4, 32], "help": [4, 29, 32], "whether": [4, 29, 32, 38], "some": [4, 29, 32], "cluster": [4, 38], "ar": [4, 29, 31, 32, 33, 34, 36, 37, 38], "launch": [4, 25, 32], "special": [4, 11, 17, 32], "mom": [4, 32], "onto": [4, 32], "often": [4, 32, 38], "have": [4, 29, 32, 36, 38], "differ": [4, 29, 31, 32, 38], "cpu": [4, 29, 32, 33, 38], "architectur": [4, 32], "than": [4, 29, 32, 38], "unabl": [4, 32], "mpi": [4, 25, 29, 32], "ha": [4, 16, 29, 31, 32, 38], "two": [4, 29, 32, 38], "implic": [4, 32], "must": [4, 32, 36, 38], "make": [4, 29, 32, 34], "all": [4, 12, 13, 14, 15, 18, 19, 29, 30, 31, 32, 36, 38], "call": [4, 11, 17, 29, 31, 32], "via": [4, 29, 32, 38], "mpirun": [4, 32], "becaus": [4, 29, 31, 32], "might": [4, 32, 37], "abl": [4, 32], "2": [4, 32, 33, 36, 38], "more": [4, 29, 31, 32, 36, 38], "one": [4, 27, 31, 32, 38], "us": [4, 29, 31, 32, 33, 34, 36, 37, 38], "when": [4, 29, 31, 32, 38], "mean": [4, 32], "mpiexec_command": [4, 32], "alwai": [4, 29, 32, 38], "even": [4, 29, 32, 38], "serial": [4, 29, 32, 38], "e": [4, 29, 31, 32, 35, 38], "g": [4, 29, 31, 32, 35, 38], "get": [4, 29, 31, 32, 33], "version": [4, 16, 29, 30, 31, 32, 33, 36, 38], "boolean": [4, 16, 32, 38], "mpiexec": [4, 32], "invoc": [4, 32], "parallel": [4, 16, 25, 29, 32], "need": [4, 29, 31, 32, 37, 38], "specifi": [4, 32, 33, 38], "inform": [4, 29, 30, 32, 36, 37, 38], "about": [4, 29, 30, 32, 38], "ad": [4, 29, 32, 33], "python": [4, 16, 29, 32, 33, 34, 38], "": [4, 11, 17, 29, 31, 32, 33, 34, 35, 38], "format": [4, 29, 31, 32], "suppli": [4, 32], "follow": [4, 16, 32, 33, 34, 36, 37, 38], "variabl": [4, 29, 32, 38], "nnode": [4, 29, 32], "ranks_per_nod": [4, 32], "rank": [4, 29, 32], "cores_per_rank": [4, 32], "total_rank": [4, 32], "As": [4, 32, 37], "exampl": [4, 26, 29, 31, 32, 33, 38], "aprun": [4, 32], "crai": [4, 32], "similar": [4, 29, 31, 32], "openmpi": [4, 32], "where": [4, 29, 32, 38], "thread": [4, 16, 32], "openmp": [4, 29, 32], "control": [4, 28, 29, 32, 38], "hybrid": [4, 29, 32], "figur": [4, 32], "could": [4, 29, 32], "d": [4, 29, 32, 38], "j": [4, 32], "appropri": [4, 29, 32], "requir": [4, 16, 29, 32, 36, 38], "additionalproperti": [4, 32, 38], "field": [4, 16, 29, 31, 32, 36], "test": [9, 11, 17, 29, 31], "executor": [10, 11, 17, 29, 33], "procedurehar": [10, 29], "check": [11, 16, 17, 29, 31, 37, 38], "do": [11, 17, 29, 36], "handi": [11, 17, 29], "case": [11, 17, 29, 32, 38], "non": [11, 17, 29, 38], "like": [11, 16, 17, 29, 31, 37, 38], "pars": [11, 17, 29, 31], "har": [11, 17, 29, 33], "regist": [12, 13, 18, 20, 22, 29, 31], "exectu": [14, 15, 19], "thread_saf": 16, "safe": [16, 29], "thread_parallel": 16, "node_parallel": 16, "managed_memori": 16, "manag": [16, 27, 29], "extra": [16, 29, 38], "build_input": [16, 31], "input_model": 16, "templat": 16, "abstract": 16, "top": 16, "level": [16, 29], "implement": [16, 29, 38], "everi": [16, 31, 38], "rtype": 16, "behav": [16, 31], "wai": [16, 29, 31], "upon": [16, 29], "success": [16, 26, 29, 38], "complet": [16, 26, 33, 38], "calcul": [16, 29, 37, 38], "oper": [16, 32], "wa": [16, 27, 29, 38], "unsuccess": [16, 38], "except": [16, 27, 29, 38], "most": [16, 29, 31, 38], "occur": 16, "underli": [16, 38], "packag": [16, 29, 34], "api": [16, 29, 31, 33], "catch": [16, 29], "end": [16, 29], "user": [16, 29, 32, 33, 38], "fail": [16, 29, 31], "handl": [16, 29, 31, 37, 38], "qcng": [16, 26, 29, 31, 32, 33, 36, 37, 38], "extra_outfil": 16, "extra_command": 16, "scratch_nam": [16, 26], "timeout": [16, 26, 31], "tupl": [16, 26, 38], "static": 16, "cannot": [16, 29], "otherwis": [16, 29, 34, 38], "get_vers": [16, 29, 31], "find": [16, 36], "extract": [16, 29, 31], "normal": [16, 29], "valid": [16, 29, 38], "parse_output": [16, 29, 31], "outfil": [16, 26, 29], "entry_point": [20, 22], "unregist": [21, 23], "util": [24, 25, 26, 27, 28, 29, 31], "capture_output": 24, "wrap": [24, 28], "time": [24, 29, 31], "captur": 24, "protect": 24, "path": [25, 26, 29, 31, 34], "etc": [25, 29, 31, 38], "infil": [26, 29], "as_binari": [26, 29], "scratch_suffix": [26, 29], "scratch_messi": [26, 29, 38], "scratch_exist_ok": [26, 29], "blocking_fil": 26, "interupt_aft": 26, "environ": [26, 29, 30, 33, 34, 38], "shell": [26, 38], "exit_cod": [26, 29], "process": [26, 29, 31, 38], "background": 26, "until": [26, 29], "exit": 26, "code": [26, 29, 31, 34, 38], "content": [26, 38], "written": [26, 38], "dir": [26, 38], "mai": [26, 29, 31, 33, 36, 38], "after": [26, 29, 31, 38], "treat": [26, 38], "byte": 26, "pass": [26, 29, 31, 38], "temporary_directori": [26, 29], "present": [26, 29, 38], "beforehand": [26, 37], "second": [26, 29], "interupt": 26, "hard": [26, 31], "kill": [26, 29], "abov": [26, 29, 31], "consid": [26, 31], "failur": [26, 29, 31], "fileexistserror": 26, "block": [26, 29], "same": [26, 29, 38], "dex": 26, "command_1": 26, "command_2": 26, "output_data": 27, "metadata": 27, "fuse": 27, "gener": [27, 29, 31, 32, 35, 38], "togeth": [27, 29], "origin": [27, 29, 38], "produc": [27, 29, 31, 38], "compute_wrapp": 27, "context": [27, 29], "exist": [27, 29, 38], "data": [27, 28, 29, 30, 38], "construct": 27, "gh": [29, 31], "441": 29, "mace": 29, "off23": 29, "jthorton": 29, "443": 29, "aimnet2": 29, "nn": 29, "ml": 29, "445": 29, "ci": [29, 31], "regex": 29, "issu": [29, 31], "449": 29, "maint": 29, "bump": 29, "compat": 29, "rang": 29, "427": 29, "onc": [29, 31], "again": 29, "expand": 29, "now": [29, 31], "flexibli": 29, "newli": 29, "particularli": 29, "relev": 29, "yueyericardo": 29, "428": 29, "ensur": 29, "orient": [29, 31, 38], "remain": 29, "taylor": 29, "barn": 29, "405": 29, "415": 29, "417": 29, "expect": 29, "so": [29, 31, 38], "fill": [29, 31, 38], "alter": 29, "count": 29, "formula": [29, 38], "physic": [29, 33, 38], "hyperthread": 29, "machin": 29, "affect": 29, "net": [29, 38], "effect": [29, 38], "both": 29, "unchang": 29, "nevertheless": [29, 38], "window": 29, "problem": 29, "cvsik": 29, "loriab": 29, "433": 29, "turbomol": [29, 35], "q": [29, 35], "chem": [29, 35], "raw": 29, "avoid": 29, "py312": 29, "warn": 29, "435": 29, "gamess": [29, 31, 33, 35], "correct": [29, 31, 33, 38], "mp2": [29, 38], "modul": [29, 33], "newer": 29, "lane": [29, 31], "426": 29, "psi4": [29, 33, 35, 38], "whole": 29, "were": [29, 38], "parser": 29, "400": 29, "cli": [29, 33], "h": [29, 33, 35, 36, 37, 38], "detail": [29, 32, 38], "begin": 29, "qcengine_": 29, "bennybp": 29, "393": 29, "392": 29, "mctc": 29, "gcp": [29, 35], "add": [29, 31], "b973c": 29, "r2scan3c": 29, "onli": [29, 32, 34, 36, 38], "classic": 29, "hokru": 29, "dftd4": [29, 35], "ga": 29, "gc": 29, "wf": 29, "tweak": 29, "r2scan": 29, "3c": 29, "410": 29, "408": 29, "torsiondr": 29, "silenc": 29, "argument": 29, "intern": 29, "409": 29, "improv": 29, "messag": [29, 38], "classifi": [29, 38], "randomerror": 29, "elig": 29, "restart": 29, "correctli": [29, 31, 34, 37], "enabl": 29, "scf": [29, 31, 33, 38], "converg": [29, 38], "maximum": [29, 38], "iter": [29, 31, 38], "403": 29, "402": 29, "pyberni": [29, 33], "optim": [29, 33], "respect": [29, 38], "posev": 29, "386": 29, "turn": 29, "formerli": 29, "lgtm": 29, "github": [29, 31, 34, 38], "codeql": 29, "analysi": 29, "migrat": 29, "388": 29, "mrchem": [29, 35], "info": [29, 31, 33], "setup": 29, "save": [29, 31], "proven": [29, 33, 38], "robertodr": 29, "424": 29, "svwn": 29, "hessian": [29, 31, 38], "refer": [29, 36, 37], "423": 29, "377": 29, "nwchem": [29, 31, 33, 35, 38], "answer": 29, "test_atom_label": 29, "accommod": 29, "solut": 29, "401": 29, "shape": [29, 38], "structur": [29, 31], "399": 29, "remov": [29, 37], "elimin": 29, "interf": 29, "pymdi": 29, "mpi4pi": 29, "awvwgk": 29, "418": 29, "389": 29, "292": 29, "ex": 29, "detect": [29, 30, 33, 34, 38], "robust": 29, "flamefir": 29, "coltonbh": 29, "419": 29, "disabl": 29, "badg": 29, "422": 29, "crontab": 29, "better": 29, "notic": 29, "extern": 29, "troubl": 29, "414": 29, "v1": [29, 33, 37], "v2": 29, "work": [29, 31, 37], "qcenginerecord": 29, "treatment": 29, "lnaden": 29, "mainten": 29, "sphinx": 29, "build": [29, 31], "lint": 29, "pin": 29, "black": 29, "gha": 29, "switch": 29, "mamba": 29, "solver": 29, "394": 29, "ento": [29, 33, 35], "qcore": [29, 35], "385": 29, "dispers": [29, 31, 38], "resourc": [29, 32, 33, 38], "been": [29, 38], "d3": [29, 37], "variant": 29, "2b": 29, "d3bj2b": 29, "pure": [29, 38], "bodi": [29, 38], "doesn": 29, "t": [29, 31, 37, 38], "accept": [29, 38], "s9": 29, "atm": 29, "d3zeroatm": 29, "doe": 29, "previou": 29, "alias": 29, "downstream": 29, "directli": [29, 32, 38], "retrofit": 29, "place": [29, 38], "known": [29, 38], "victim": 29, "instig": 29, "380": 29, "gradient": [29, 31, 38], "thu": 29, "geometri": [29, 33, 36, 37, 38], "support": [29, 30, 33, 36, 37, 38], "dftd3": [29, 33, 35], "interfac": [29, 33], "d3mbj2b": 29, "hint": 29, "apply_qcengine_alias": 29, "level_hint": 29, "d3atm": 29, "d32b": 29, "param_tweak": 29, "383": 29, "yaml": [29, 32], "load": 29, "mbanck": 29, "pairwis": 29, "pair_resolv": 29, "qcvar": 29, "elementwis": 29, "too": 29, "larg": 29, "It": 29, "match": [29, 32, 38], "fulfil": 29, "sum": 29, "arrai": [29, 38], "equal": 29, "376": 29, "slight": 29, "rohf": [29, 38], "zapt": 29, "quantiti": [29, 38], "store": [29, 32, 38], "hf": [29, 38], "longer": 29, "dft": [29, 38], "semicanon": 29, "orbit": [29, 38], "sinc": [29, 38], "mostli": [29, 31], "ccsd": [29, 38], "fc": 29, "project": 29, "stdsuit": 29, "queri": 29, "cfour": [29, 33, 35], "bccd": 29, "b2plyp": 29, "doubl": [29, 38], "cc2": 29, "contract": [29, 38], "zapt2": 29, "cepa": 29, "acpf": 29, "aqcc": 29, "cc3": 29, "dh": [29, 37], "convent": [29, 36, 37], "378": 29, "openff": [29, 36], "toolkit": [29, 36], "yoshanuikabundi": 29, "375": 29, "suit": [29, 31], "occ": 29, "olccd": 29, "grad": 29, "remp2": 29, "omp2": 29, "omp3": 29, "oremp2": 29, "densiti": [29, 38], "fit": [29, 31, 36, 37], "372": 29, "plan": 29, "layout": [29, 38], "outlin": 29, "These": [29, 33, 38], "involv": 29, "helper": 29, "function": [29, 31, 38], "provid": [29, 30, 31, 36, 37, 38], "In": [29, 33], "prepar": 29, "releas": 29, "advis": 29, "qcel": [29, 33, 36, 37, 38], "avert": 29, "our": 29, "first": [29, 34, 38], "experi": 29, "increment": 29, "343": 29, "sdftd3har": 29, "nativ": [29, 38], "programmat": 29, "databas": [29, 38], "353": 29, "terachem": [29, 31, 33, 35], "terachemfrontendhar": 29, "o": [29, 32, 33, 36, 37, 38], "extens": 29, "protocol": [29, 38], "buffer": 29, "terachempbshar": 29, "350": 29, "former": 29, "still": 29, "while": [29, 38], "361": 29, "hartre": [29, 31], "fock": [29, 31, 38], "fitten": 29, "362": 29, "doc": [29, 36], "theme": 29, "fuller": 29, "363": 29, "learn": 29, "deriv_level": 29, "driver": [29, 33, 36, 37, 38], "dboc": 29, "just": 29, "flat": [29, 38], "364": 29, "harvest": [29, 38], "ghost": [29, 37, 38], "hack": 29, "go": [29, 38], "amiss": 29, "xenon": 29, "target": 29, "geometry__autosym": 29, "tighten": 29, "loosen": 29, "automat": [29, 33, 36, 38], "symmetri": [29, 38], "openmopac": 29, "activ": 29, "note": [29, 36], "slightli": 29, "301": 29, "367": 29, "how": [29, 37, 38], "someth": [29, 31, 38], "goe": 29, "wrong": 29, "assum": [29, 38], "well": [29, 33, 38], "misleadingli": 29, "333": 29, "skip": [29, 34, 38], "write": [29, 31], "part": [29, 38], "previous": [29, 38], "under": 29, "circumst": 29, "point": [29, 31, 38], "didn": 29, "wardlt": 29, "349": 29, "contain": [29, 32, 33, 38], "33": 29, "eljost": 29, "354": 29, "356": 29, "366": 29, "368": 29, "351": 29, "refactor": 29, "easier": 29, "subclass": 29, "overwrit": 29, "_spawn_optim": 29, "338": 29, "export": 29, "tarbal": 29, "git": 29, "archiv": 29, "339": 29, "toler": 29, "cpuinfo": [29, 32], "popul": [29, 31], "brand_raw": 29, "brand": [29, 32], "dotsdl": 29, "321": 29, "mp2d": [29, 33], "certain": [29, 32], "text": [29, 31, 38], "native_fil": [29, 38], "strongli": 29, "least": 29, "reproduc": 29, "325": 29, "327": 29, "torchani": [29, 33, 35], "gpu": 29, "avail": [29, 30, 31, 32, 33, 35, 36, 37, 38], "kexul": 29, "330": 29, "332": 29, "322": 29, "pr": [29, 31, 38], "323": 29, "calcinfo_natom": [29, 38], "com": [29, 38], "blob": [29, 30, 38], "master": [29, 38], "rst": 29, "0220": 29, "305": 29, "autom": 29, "constrain": 29, "along": [29, 33], "grid": 29, "akin": 29, "longstand": 29, "qcfractal": 29, "servic": 29, "simonboothroyd": 29, "307": 29, "increas": 29, "cc": [29, 38], "309": 29, "print": [29, 30, 33], "locat": [29, 33], "openmm": [29, 31, 35], "rdkit": [29, 33, 35], "311": 29, "perform": 29, "calc": 29, "tce": 29, "alreadi": 29, "312": 29, "mp": 29, "famili": 29, "316": 29, "instruct": 29, "clean": 29, "up": [29, 31], "obei": 29, "local_config": 29, "partit": 29, "replic": 29, "exetyp": 29, "trial": 29, "off": [29, 31], "littl": 29, "gb": 29, "v": [29, 31, 38], "gib": 29, "veri": [29, 38], "v7": 29, "315": 29, "fix_com": [29, 38], "fix_orient": [29, 38], "f": [29, 38], "did": 29, "three": [29, 30], "overwritten": 29, "superset": 29, "317": 29, "contributor": 29, "coars": [29, 31], "roadmap": 29, "318": 29, "serv": 29, "built": 29, "workflow": [29, 31], "yml": [29, 31], "soon": 29, "retir": 29, "320": 29, "tent": 29, "313": 29, "319": 29, "accommoc": 29, "old": 29, "simtk": 29, "290": 29, "whose": 29, "cmdline": 29, "drop": 29, "replac": [29, 38], "291": 29, "standalon": 29, "d4": 29, "289": 29, "server": [29, 38], "mode": 29, "288": 29, "calcinfo": [29, 38], "basi": [29, 33, 36, 37, 38], "basisset": [29, 38], "though": [29, 38], "thei": [29, 31], "294": 29, "retriev": 29, "step": 29, "relax": 29, "line": [29, 31, 33], "search": [29, 31], "297": 29, "206": 29, "optk": 29, "alexheid": 29, "269": 29, "multiresolut": 29, "277": 29, "adcc": [29, 33, 35], "adc": 29, "connect": [29, 36, 38], "maxscheur": 29, "278": 29, "counterpois": 29, "280": 29, "framework": 29, "identifi": [29, 38], "modifi": 29, "rerun": 29, "281": 29, "282": 29, "d3m": 29, "bj": 29, "sapt0": 29, "jeffschrib": 29, "274": 29, "bind": [29, 37], "dgasmith": 29, "283": 29, "transit": 29, "openforcefield": 29, "omnia": 29, "channel": [29, 31, 34], "conda": [29, 31], "forg": [29, 34], "286": 29, "287": 29, "move": 29, "travi": 29, "open": [29, 31], "273": 29, "miss": 29, "stvogt": 29, "262": 29, "author": 29, "264": 29, "analyt": [29, 33], "finit": 29, "266": 29, "psi4har": 29, "swallow": 29, "keyerror": 29, "265": 29, "xtb": [29, 33, 35], "tag": 29, "preserv": [29, 38], "270": 29, "lazili": 29, "241": 29, "atoms_map": 29, "seem": 29, "257": 29, "ani2x": 29, "farhadrgh": 29, "259": 29, "mp3": 29, "lccd": 29, "261": 29, "v5": 29, "263": 29, "z": [29, 38], "matrix": [29, 38], "geometry__noautoz": 29, "molpro": [29, 33, 35, 38], "cleanli": 29, "xml": 29, "qchem": 29, "isn": [29, 31], "instal": [29, 33], "232": 29, "jhrmnn": 29, "238": 29, "infrastructur": 29, "correl": [29, 38], "here": [29, 38], "anywher": 29, "earlier": 29, "convert": 29, "scheme": 29, "test_standard_suite_mp2": 29, "py": [29, 31, 38], "249": 29, "254": 29, "speak": 29, "230": 29, "dipol": [29, 38], "homo": 29, "lumo": 29, "233": 29, "rather": 29, "234": 29, "verion": 29, "spin": [29, 38], "compon": [29, 31, 38], "also": [29, 31, 32, 34, 38], "atomicproperti": 29, "qcvariabl": 29, "239": 29, "look": [29, 31, 38], "cmile": 29, "we": [29, 31], "gaff": [29, 36], "forcefield": [29, 36, 38], "243": 29, "stdout": [29, 38], "244": 29, "lccsd": 29, "246": 29, "251": 29, "pbe0": 29, "psiapi": 29, "245": 29, "sy": 29, "test_standard_suit": [29, 31], "sjrl": 29, "248": 29, "hfexch": 29, "incomplet": 29, "state": 29, "250": 29, "pull": [29, 38], "1933": 29, "253": 29, "252": 29, "212": 29, "226": 29, "canon": [29, 38], "languag": 29, "combin": 29, "228": 29, "mmff94": [29, 36], "capabl": [29, 33, 35, 38], "201": 29, "grab": 29, "last": 29, "202": 29, "wavefunct": [29, 35, 38], "203": 29, "empir": 29, "204": 29, "custom": 29, "205": 29, "215": 29, "pythonpath": 29, "subprocess": 29, "get_program": 29, "sai": 29, "199": 29, "typo": 29, "complain": 29, "befor": [29, 38], "necessari": 29, "networkx": 29, "207": 29, "minor": 29, "209": 29, "151": 29, "evalu": [29, 38], "smirnoff": [29, 36], "189": 29, "175": 29, "177": 29, "includ": [29, 30, 37, 38], "abil": 29, "180": 29, "181": 29, "183": 29, "185": 29, "subcommand": 29, "187": 29, "log": [29, 38], "without": [29, 38], "binari": [29, 31, 33], "188": 29, "read": [29, 30], "prevent": 29, "deadlock": 29, "194": 29, "195": 29, "blacken": 29, "179": 29, "incorrect": 29, "190": 29, "159": 29, "160": 29, "164": 29, "155": 29, "4a2": 29, "greater": 29, "162": 29, "trajectori": 29, "truncat": [29, 38], "167": 29, "168": 29, "dispatch": 29, "out": [29, 31], "common": [29, 31, 38], "170": 29, "coverag": 29, "page": 29, "171": 29, "172": 29, "accord": 29, "resultinput": 29, "take": [29, 31, 32], "advantag": 29, "although": 29, "technic": 29, "anyth": 29, "engin": [29, 34, 36, 37], "upstream": 29, "minimum": [29, 38], "143": 29, "conform": [29, 38], "86": 29, "145": 29, "148": 29, "initi": 29, "further": [29, 32], "proper": [29, 32], "149": 29, "150": 29, "153": 29, "addit": [29, 31, 33, 38], "154": 29, "callinfo_x": 29, "unrestrict": 29, "158": 29, "161": 29, "mopac": [29, 33, 35], "sensibl": 29, "156": 29, "intel": [29, 32, 33, 38], "132": 29, "137": 29, "pipelin": 29, "azur": 29, "develop": [29, 38], "privat": [29, 31], "docker": [29, 31], "imag": 29, "hous": 29, "public": 29, "u": [29, 38], "integr": 29, "secur": 29, "140": 29, "preliminari": 29, "138": 29, "trigger": 29, "139": 29, "overhaul": 29, "clearli": 29, "dev": [29, 38], "product": [29, 35], "120": 29, "msgpack": 29, "c": [29, 34], "fall": 29, "back": [29, 38], "substanti": 29, "speedup": 29, "deseri": 29, "action": 29, "transpar": 29, "within": [29, 38], "themselv": 29, "112": 29, "molprohar": 29, "116": 29, "numpi": 29, "style": 29, "117": 29, "around": 29, "rest": 29, "119": 29, "small": 29, "visual": 29, "made": 29, "insid": 29, "storag": [29, 38], "maxim": [29, 38], "benefit": 29, "133": 29, "its": [29, 34, 38], "127": 29, "unus": 29, "129": [29, 33, 38], "131": 29, "redund": [29, 38], "114": 29, "compute_procedur": 29, "kwarg": 29, "debug": 29, "fractal": [29, 38], "intend": [29, 38], "temporari": 29, "revert": 29, "later": [29, 31], "110": 29, "auto": 29, "handler": 29, "109": 29, "propag": 29, "95": 29, "96": 29, "97": 29, "98": 29, "qcdb": 29, "thank": 29, "vivacebel": 29, "jygrac": 29, "100": 29, "godotalgorithm": 29, "94": 29, "101": 29, "folder": [29, 32], "record": [29, 33, 38], "103": 29, "zero": [29, 38], "impact": 29, "categor": 29, "other": [29, 31, 33, 34, 36, 37, 38], "99": 29, "explicit": [29, 38], "resolv": 29, "mismatch": 29, "caus": 29, "102": 29, "92": 29, "__init__": 29, "bundl": [29, 38], "85": 29, "dashparam": 29, "reloc": 29, "empirical_dispersion_resourc": 29, "89": 29, "forgot": 29, "scratch_loc": 29, "role": 29, "face": 29, "60": 29, "wip": 29, "light": 29, "edit": 29, "rungm": 29, "select": 29, "fci": 29, "73": 29, "varieti": [29, 31, 38], "59": 29, "71": 29, "75": 29, "76": 29, "78": 29, "88": 29, "mani": [29, 34], "69": 29, "diagnos": 29, "invok": 29, "82": 29, "repo": 29, "chandemonium": 29, "62": 29, "67": 29, "83": 29, "ffangliu": 29, "contribut": [29, 34, 38], "to_str": [29, 31], "bohr": 29, "unit": [29, 38], "63": 29, "which_vers": 29, "parse_vers": 29, "safe_vers": 29, "65": 29, "ani1": 29, "x": [29, 38], "ccx": 29, "credit": 29, "74": [29, 33, 38], "cach": 29, "reduc": 29, "pytorch": 29, "overhead": 29, "77": 29, "programexecutor": 29, "baseprocedur": 29, "glob": 29, "filenam": 29, "81": 29, "preexist": 29, "84": 29, "temp": 29, "90": 29, "beck": 29, "johnson": 29, "damp": 29, "80": 29, "older": 29, "54": 29, "word": 29, "insensit": 29, "give": 29, "you": [29, 31, 32, 34, 36, 38], "55": 29, "routin": [29, 38], "56": 29, "complex": 29, "wrapper": [29, 34], "hang": 29, "try": 29, "46": 29, "mol": [29, 33, 36, 37, 38], "dtype": [29, 31], "50": 29, "51": 29, "multiprocess": 29, "stabl": 29, "behavior": 29, "52": 29, "possibl": 29, "leak": 29, "thousand": 29, "trade": 29, "futur": 29, "38": 29, "39": 29, "rtd": 29, "across": 29, "qca": 29, "appear": 29, "consist": 29, "43": 29, "deriv": [29, 31], "interact": 29, "unifi": 29, "40": 29, "numer": 29, "qualiti": 29, "life": 29, "aspect": 29, "pytest": [29, 34], "unittest": 29, "download": [29, 31], "larger": 29, "libint": 29, "recip": 29, "confus": 29, "everyon": 29, "who": [29, 38], "maintain": [29, 31, 34], "reli": 29, "exclus": 29, "env": [29, 31], "37": 29, "agnost": 29, "36": 29, "flexibl": 29, "32": 29, "34": 29, "strict": 29, "35": 29, "cuda": 29, "librari": [29, 38], "dramat": 29, "delai": 29, "cpuutil": 29, "primal": 29, "un": 29, "potenti": [29, 33, 38], "manipul": [29, 38], "creation": 29, "introduc": 29, "jobconfig": [29, 32, 33], "parsl": 29, "balsam": 29, "dask": 29, "displai": 30, "categori": 30, "choic": 30, "host": 30, "By": [30, 38], "describ": 30, "One": [30, 38], "indic": [30, 38], "stdin": 30, "commun": 31, "independ": 31, "bootstrap": 31, "thereof": 31, "howev": [31, 38], "drastic": 31, "pb": [31, 35], "separ": 31, "specialti": 31, "capabilit": 31, "makefp": 31, "guid": 31, "post": [31, 38], "join": 31, "slack": 31, "link": 31, "readm": 31, "advic": 31, "copi": 31, "choos": 31, "your": [31, 32, 36], "roughli": 31, "own": 31, "comment": [31, 38], "_default": 31, "section": 31, "characterist": 31, "def": 31, "which_import": 31, "see": [31, 32, 34, 36, 38], "short": [31, 38], "next": 31, "To": [31, 37], "molpars": 31, "translat": [31, 38], "fairli": 31, "simpl": [31, 33, 38], "power": 31, "readi": 31, "done": 31, "entir": 31, "skelet": 31, "yourcod": 31, "form": [31, 38], "usual": 31, "put": 31, "return_result": [31, 33, 36, 37, 38], "atomicresultproperti": [31, 38], "conveni": [31, 38], "wavefunctionproperti": [31, 38], "great": 31, "At": 31, "devis": 31, "pace": 31, "_program": 31, "decor": 31, "don": 31, "basic": 31, "test_harness_canon": 31, "test_compute_energi": 31, "test_compute_gradi": 31, "test_compute_energy_qcsk_basi": 31, "test_compute_bad_model": 31, "runtim": 31, "test_canonical_config": 31, "For": [31, 36, 37, 38], "qm": [31, 37, 38], "against": 31, "test_align": 31, "visibl": 31, "pip": 31, "trivial": 31, "devtool": 31, "re": 31, "aren": 31, "throughout": 31, "talk": 31, "question": 31, "especi": 31, "intric": 31, "inspect": 32, "obtain": 32, "get_node_descriptor": 32, "5": [32, 37, 38], "568": 32, "4": [32, 33, 38], "descriptor": 32, "overridden": [32, 38], "get_config": [32, 33], "506": [32, 33], "tmp": [32, 33], "my_scratch": [32, 33], "get_glob": 32, "qcarchiv": [32, 38], "org": [32, 38], "usernam": 32, "python_vers": 32, "3": [32, 33, 38], "6": [32, 38], "7": 32, "final": 32, "64": 32, "bit": 32, "r": [32, 33, 38], "tm": [32, 33, 38], "i7": [32, 33, 38], "7820hq": [32, 33, 38], "90ghz": [32, 33, 38], "hz_advertis": 32, "9000": 32, "ghz": 32, "cpu_brand": 32, "home": 32, "dqm_config_path": 32, "environment": 32, "preced": 32, "over": 32, "human": [32, 38], "friendli": 32, "nodedescript": 32, "design": 32, "from_data": [33, 38], "000": [33, 38], "494": [33, 38], "027": [33, 38], "sto": [33, 38], "3g": [33, 38], "scf_type": [33, 38], "df": [33, 38], "syntax": 33, "ret": [33, 36, 37, 38], "45994963230625": [33, 38], "scf_dipole_mo": [33, 38], "6635967188869244": [33, 38], "semi": 33, "emper": 33, "ai": 33, "mechan": [33, 38], "quantit": 33, "amount": 33, "hardwar": 33, "softwar": 33, "disk": 33, "space": [33, 38], "v0": 33, "11": 33, "v2016": 33, "v2019": 33, "03": 33, "overview": 33, "changelog": 33, "keep": [34, 38], "mind": 34, "sure": [34, 37], "Then": 34, "pyarg": 34, "want": [34, 38], "below": 35, "mm": [36, 38], "paramt": 36, "symbol": [36, 37, 38], "011185654397410195": 36, "smirnoff99frosst": 36, "openff_unconstrain": 36, "omit": 36, "uff": [36, 38], "experiment": [36, 38], "nor": 36, "topologi": 36, "gfn": 36, "ff": 36, "1002": 36, "202004239": 36, "sqm": 37, "uniqu": [37, 38], "pm7": 37, "gfn2": 37, "parametris": 37, "minim": 37, "suffici": 37, "semiempr": 37, "concept": 37, "carefulli": 37, "would": 37, "00000000000000": 37, "73578586109551": 37, "44183152868459": 37, "36789293054775": 37, "070451354836705": 37, "hamiltonian": [37, 38], "mndo": 37, "am1": 37, "pm3": 37, "rm1": 37, "mndod": 37, "pm6": 37, "dh2": 37, "dh2x": 37, "d3h4": 37, "3dh4x": 37, "extend": 37, "tight": 37, "1021": 37, "ac": 37, "jctc": 37, "8b01176": 37, "gfn1": 37, "7b00118": 37, "gfn0": 37, "26434": 37, "chemrxiv": 37, "8326202": 37, "primari": 38, "purpos": 38, "consum": 38, "semiempir": 38, "compris": 38, "compliant": 38, "typic": 38, "inp": 38, "relat": 38, "id": 38, "schema_nam": 38, "explicitli": 38, "fix": 38, "qcschema_input": 38, "qc_": 38, "schema_input": 38, "schema_vers": 38, "attr": 38, "allof": 38, "ref": 38, "definit": 38, "driverenum": 38, "scienc": 38, "regard": 38, "atomicresultprotocol": 38, "draft": 38, "04": 38, "chemic": 38, "molecule_hash": 38, "hash": 38, "molecular_formula": 38, "smile": 38, "inchi": 38, "inchikei": 38, "canonical_explicit_hydrogen_smil": 38, "hydrogen": 38, "canonical_isomeric_explicit_hydrogen_mapped_smil": 38, "isomer": 38, "map": 38, "canonical_isomeric_explicit_hydrogen_smil": 38, "canonical_isomeric_smil": 38, "canonical_smil": 38, "pubchem_cid": 38, "pubchem": 38, "cid": 38, "compound": 38, "pubchem_sid": 38, "sid": 38, "substanc": 38, "pubchem_conformerid": 38, "conformerid": 38, "creator": 38, "person": 38, "blank": 38, "sortabl": 38, "broad": 38, "pep": 38, "440": 38, "www": 38, "0440": 38, "_": 38, "cartesian": 38, "na": 38, "ndata": 38, "fragment": 38, "wide": 38, "nmolecul": 38, "8": 38, "decim": 38, "assist": 38, "duplic": 38, "nnote": 38, "nall": 38, "reshap": 38, "dimens": 38, "attribut": 38, "abbrevi": 38, "nat": 38, "nfr": 38, "vari": 38, "irregular": 38, "systemat": 38, "qcschema_molecul": 38, "speed": 38, "overlap": 38, "feasibl": 38, "complianc": 38, "ever": 38, "constructor": 38, "itself": 38, "trust": 38, "order": 38, "real": 38, "virtual": 38, "entri": 38, "ghosted": 38, "item": 38, "xyz": 38, "a0": 38, "shuffl": 38, "reattach": 38, "pre": 38, "instanc": 38, "nserial": 38, "length": 38, "readabl": 38, "arbitrari": 38, "label": 38, "referenc": 38, "consumpt": 38, "clariti": 38, "molecular_charg": 38, "electrostat": 38, "molecular_multipl": 38, "infer": 38, "isotop": 38, "realiti": 38, "atom_label": 38, "convers": 38, "affix": 38, "atomic_numb": 38, "multipleof": 38, "mass_numb": 38, "yet": 38, "placehold": 38, "bond": 38, "atom_index_a": 38, "atom_index_b": 38, "bond_ord": 38, "atom_index": 38, "freeli": 38, "reorder": 38, "invert": 38, "minitem": 38, "maxitem": 38, "group": 38, "outer": 38, "fragment_charg": 38, "fragment_multipl": 38, "inner": 38, "compos": 38, "exactli": 38, "noncontigu": 38, "Will": 38, "rule": 38, "disallow": 38, "center": 38, "euclidean": 38, "sens": 38, "signal": 38, "deliber": 38, "spec": 38, "wherea": 38, "happenst": 38, "adjust": 38, "guidanc": 38, "sensit": 38, "ordinari": 38, "efp": 38, "rotat": 38, "interti": 38, "tensor": 38, "frame": 38, "vibrat": 38, "fix_symmetri": 38, "lowercas": 38, "primarili": 38, "track": 38, "lookup": 38, "never": 38, "manual": 38, "enum": 38, "harmonictyp": 38, "angular": 38, "momentum": 38, "spheric": 38, "electronshel": 38, "angular_momentum": 38, "uniqueitem": 38, "harmonic_typ": 38, "expon": 38, "anyof": 38, "coeffici": 38, "segment": 38, "ecptyp": 38, "ecp": 38, "scalar": 38, "spinorbit": 38, "ecppotenti": 38, "ecp_typ": 38, "r_expon": 38, "term": 38, "gaussian_expon": 38, "gaussian": 38, "basiscent": 38, "electron_shel": 38, "ecp_electron": 38, "mcp": 38, "ecp_potenti": 38, "qcschema_basi": 38, "pvdz": 38, "brief": 38, "center_data": 38, "share": 38, "parent": 38, "atom_map": 38, "nbf": 38, "checksum": 38, "b3lyp": 38, "pbe": 38, "31g": 38, "typer": 38, "wavefunctionprotocolenum": 38, "orbitals_and_eigenvalu": 38, "occupations_and_eigenvalu": 38, "errorcorrectionprotocol": 38, "nwarn": 38, "default_polici": 38, "polici": 38, "nativefilesprotocolenum": 38, "error_correct": 38, "common_model": 38, "constrainedstrvalu": 38, "constraint": 38, "qcschema_output": 38, "schema_output": 38, "nao": 38, "calcinfo_nbasi": 38, "nmo": 38, "calcinfo_nmo": 38, "column": 38, "major": 38, "presenc": 38, "absenc": 38, "null": 38, "ness": 38, "stderr": 38, "dsl": 38, "computeerror": 38, "nbasi": 38, "calcinfo_nalpha": 38, "nalpha": 38, "alpha": 38, "calcinfo_nbeta": 38, "nbeta": 38, "beta": 38, "nuclear_repulsion_energi": 38, "repuls": 38, "return_energi": 38, "ident": 38, "return_gradi": 38, "e_h": 38, "return_hessian": 38, "scf_one_electron_energi": 38, "scf_two_electron_energi": 38, "scf_vv10_energi": 38, "vv10": 38, "scf_xc_energi": 38, "xc": 38, "scf_dispersion_correction_energi": 38, "append": 38, "moment": 38, "y": 38, "scf_quadrupole_mo": 38, "quadrupol": 38, "scf_total_energi": 38, "stage": 38, "scf_total_gradi": 38, "scf_total_hessian": 38, "scf_iter": 38, "taken": 38, "mp2_same_spin_correlation_energi": 38, "portion": 38, "triplet": 38, "scale": 38, "mp2_opposite_spin_correlation_energi": 38, "opposit": 38, "singlet": 38, "mp2_singles_energi": 38, "mp2_doubles_energi": 38, "mp2_correlation_energi": 38, "mp2_total_energi": 38, "mp2_dipole_mo": 38, "ccsd_same_spin_correlation_energi": 38, "ccsd_opposite_spin_correlation_energi": 38, "ccsd_singles_energi": 38, "ccsd_doubles_energi": 38, "ccsd_correlation_energi": 38, "ccsd_total_energi": 38, "ccsd_dipole_mo": 38, "ccsd_iter": 38, "ccsd_prt_pr_correlation_energi": 38, "prt": 38, "ccsd_prt_pr_total_energi": 38, "ccsd_prt_pr_dipole_mo": 38, "ccsdt_correlation_energi": 38, "ccsdt": 38, "ccsdt_total_energi": 38, "ccsdt_dipole_mo": 38, "ccsdt_iter": 38, "ccsdtq_correlation_energi": 38, "ccsdtq": 38, "ccsdtq_total_energi": 38, "ccsdtq_dipole_mo": 38, "ccsdtq_iter": 38, "restrict": 38, "h_core_a": 38, "ao": 38, "h_core_b": 38, "b": 38, "h_effective_a": 38, "h_effective_b": 38, "scf_orbitals_a": 38, "scf_orbitals_b": 38, "scf_density_a": 38, "scf_density_b": 38, "scf_fock_a": 38, "scf_fock_b": 38, "scf_eigenvalues_a": 38, "eigenvalu": 38, "scf_eigenvalues_b": 38, "scf_occupations_a": 38, "occup": 38, "scf_occupations_b": 38, "scf_coulomb_a": 38, "coulomb": 38, "scf_coulomb_b": 38, "scf_exchange_a": 38, "exchang": 38, "scf_exchange_b": 38, "localized_orbitals_a": 38, "subset": 38, "localized_orbitals_b": 38, "localized_fock_a": 38, "localized_fock_b": 38, "orbitals_a": 38, "orbitals_b": 38, "density_a": 38, "density_b": 38, "fock_a": 38, "fock_b": 38, "eigenvalues_a": 38, "eigenvalues_b": 38, "occupations_a": 38, "occupations_b": 38, "error_typ": 38, "thrown": 38, "input_error": 38, "suggest": 38, "error_messag": 38, "associ": 38, "backtrac": 38, "_input_to_output": 38, "_native_file_protocol": 38, "_stdout_protocol": 38, "_validate_return_result": 38, "_wavefunction_protocol": 38, "philosophi": 38, "shouldn": 38, "delet": 38, "subject": 38, "autodelet": 38, "bring": 38, "ancillari": 38, "eventu": 38, "275": 38, "cours": 38, "tell": 38, "sdf": 38}, "objects": {"": [[0, 0, 0, "-", "qcengine"]], "qcengine": [[1, 1, 1, "", "MDIServer"], [2, 3, 1, "", "compute"], [3, 3, 1, "", "compute_procedure"], [0, 0, 0, "-", "config"], [8, 3, 1, "", "get_config"], [9, 3, 1, "", "get_molecule"], [10, 3, 1, "", "get_procedure"], [11, 3, 1, "", "get_program"], [12, 3, 1, "", "list_all_procedures"], [13, 3, 1, "", "list_all_programs"], [14, 3, 1, "", "list_available_procedures"], [15, 3, 1, "", "list_available_programs"], [0, 0, 0, "-", "programs"], [22, 3, 1, "", "register_program"], [23, 3, 1, "", "unregister_program"], [0, 0, 0, "-", "util"]], "qcengine.MDIServer": [[1, 2, 1, "", "recv_coords"], [1, 2, 1, "", "recv_elements"], [1, 2, 1, "", "recv_masses"], [1, 2, 1, "", "recv_multiplicity"], [1, 2, 1, "", "recv_natoms"], [1, 2, 1, "", "recv_total_charge"], [1, 2, 1, "", "run_energy"], [1, 2, 1, "", "send_coords"], [1, 2, 1, "", "send_elements"], [1, 2, 1, "", "send_energy"], [1, 2, 1, "", "send_forces"], [1, 2, 1, "", "send_masses"], [1, 2, 1, "", "send_multiplicity"], [1, 2, 1, "", "send_natoms"], [1, 2, 1, "", "send_node"], [1, 2, 1, "", "send_total_charge"], [1, 2, 1, "", "start"], [1, 2, 1, "", "stop"], [1, 2, 1, "", "update_molecule"]], "qcengine.config": [[4, 4, 1, "", "NodeDescriptor"], [5, 3, 1, "", "get_config"], [6, 3, 1, "", "get_provenance_augments"], [7, 3, 1, "", "global_repr"]], "qcengine.config.NodeDescriptor": [[4, 5, 1, "", "hostname_pattern"], [4, 5, 1, "", "is_batch_node"], [4, 5, 1, "", "jobs_per_node"], [4, 5, 1, "", "memory"], [4, 5, 1, "", "memory_safety_factor"], [4, 5, 1, "", "mpiexec_command"], [4, 5, 1, "", "name"], [4, 5, 1, "", "ncores"], [4, 5, 1, "", "retries"], [4, 5, 1, "", "scratch_directory"]], "qcengine.programs": [[16, 4, 1, "", "ProgramHarness"], [17, 3, 1, "", "get_program"], [18, 3, 1, "", "list_all_programs"], [19, 3, 1, "", "list_available_programs"], [20, 3, 1, "", "register_program"], [21, 3, 1, "", "unregister_program"]], "qcengine.programs.ProgramHarness": [[16, 2, 1, "", "build_input"], [16, 2, 1, "", "compute"], [16, 2, 1, "", "execute"], [16, 5, 1, "", "extras"], [16, 2, 1, "", "found"], [16, 2, 1, "", "get_version"], [16, 5, 1, "", "managed_memory"], [16, 5, 1, "", "name"], [16, 5, 1, "", "node_parallel"], [16, 2, 1, "", "parse_output"], [16, 5, 1, "", "scratch"], [16, 5, 1, "", "thread_parallel"], [16, 5, 1, "", "thread_safe"]], "qcengine.util": [[24, 3, 1, "", "compute_wrapper"], [25, 3, 1, "", "create_mpi_invocation"], [26, 3, 1, "", "execute"], [27, 3, 1, "", "handle_output_metadata"], [28, 3, 1, "", "model_wrapper"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function", "4": "py:pydantic_model", "5": "py:pydantic_field"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"], "4": ["py", "pydantic_model", "Python model"], "5": ["py", "pydantic_field", "Python field"]}, "titleterms": {"qcengin": [0, 33, 34], "api": 0, "packag": 0, "function": 0, "class": 0, "inherit": 0, "diagram": 0, "config": [0, 32], "modul": 0, "util": 0, "program": [0, 31, 33, 35], "mdiserv": 1, "comput": [2, 38], "compute_procedur": 3, "nodedescriptor": 4, "get_config": [5, 8], "get_provenance_aug": 6, "global_repr": 7, "get_molecul": 9, "get_procedur": 10, "get_program": [11, 17], "list_all_procedur": 12, "list_all_program": [13, 18], "list_available_procedur": 14, "list_available_program": [15, 19], "programhar": 16, "register_program": [20, 22], "unregister_program": [21, 23], "compute_wrapp": 24, "create_mpi_invoc": 25, "execut": [26, 33], "handle_output_metadata": 27, "model_wrapp": 28, "changelog": 29, "v0": 29, "30": 29, "0": 29, "2024": 29, "06": 29, "25": 29, "new": [29, 31], "featur": 29, "misc": 29, "29": 29, "2023": 29, "10": 29, "31": 29, "bug": 29, "fix": 29, "28": 29, "1": 29, "08": 29, "18": 29, "15": 29, "break": 29, "chang": 29, "enhanc": 29, "27": 29, "02": 29, "26": 29, "2022": 29, "11": 29, "24": 29, "16": 29, "07": 29, "upcom": 29, "23": 29, "03": 29, "22": 29, "01": 29, "21": 29, "2021": 29, "20": 29, "19": 29, "05": 29, "17": 29, "2020": 29, "14": 29, "13": 29, "2019": 29, "12": 29, "9": 29, "8": 29, "2": 29, "7": 29, "6": 29, "4": 29, "3": 29, "5": 29, "command": 30, "line": 30, "interfac": 30, "info": 30, "invoc": 30, "descript": [30, 32, 38], "argument": 30, "run": 30, "procedur": [30, 33], "ad": 31, "har": 31, "environ": 32, "detect": 32, "node": 32, "global": 32, "configur": [32, 33], "file": 32, "cluster": 32, "backend": 33, "determin": 33, "inform": 33, "index": 33, "develop": [33, 34], "document": 33, "instal": 34, "conda": 34, "pip": 34, "test": 34, "from": 34, "sourc": 34, "overview": 35, "quantum": [35, 37], "chemistri": 35, "semi": 35, "empir": 35, "ai": 35, "potenti": 35, "molecular": [35, 36], "mechan": [35, 36, 37], "analyt": 35, "correct": 35, "exampl": [36, 37], "openmm": 36, "rdkit": 36, "xtb": [36, 37], "semiempir": 37, "mopac": 37, "singl": 38, "input": 38, "result": 38, "field": 38, "return": 38, "faq": 38}, "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.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 58}, "alltitles": {"QCEngine API": [[0, "qcengine-api"]], "qcengine Package": [[0, "module-qcengine"]], "Functions": [[0, "functions"], [0, "id1"], [0, "id4"], [0, "id5"]], "Classes": [[0, "classes"], [0, "id2"], [0, "id6"]], "Class Inheritance Diagram": [[0, "class-inheritance-diagram"], [0, "id3"], [0, "id7"]], "qcengine.config Module": [[0, "module-qcengine.config"]], "qcengine.util Module": [[0, "module-qcengine.util"]], "qcengine.programs Package": [[0, "module-qcengine.programs"]], "MDIServer": [[1, "mdiserver"]], "compute": [[2, "compute"]], "compute_procedure": [[3, "compute-procedure"]], "NodeDescriptor": [[4, "nodedescriptor"]], "get_config": [[5, "get-config"], [8, "get-config"]], "get_provenance_augments": [[6, "get-provenance-augments"]], "global_repr": [[7, "global-repr"]], "get_molecule": [[9, "get-molecule"]], "get_procedure": [[10, "get-procedure"]], "get_program": [[11, "get-program"], [17, "get-program"]], "list_all_procedures": [[12, "list-all-procedures"]], "list_all_programs": [[13, "list-all-programs"], [18, "list-all-programs"]], "list_available_procedures": [[14, "list-available-procedures"]], "list_available_programs": [[15, "list-available-programs"], [19, "list-available-programs"]], "ProgramHarness": [[16, "programharness"]], "register_program": [[20, "register-program"], [22, "register-program"]], "unregister_program": [[21, "unregister-program"], [23, "unregister-program"]], "compute_wrapper": [[24, "compute-wrapper"]], "create_mpi_invocation": [[25, "create-mpi-invocation"]], "execute": [[26, "execute"]], "handle_output_metadata": [[27, "handle-output-metadata"]], "model_wrapper": [[28, "model-wrapper"]], "Changelog": [[29, "changelog"]], "v0.30.0 / 2024-06-25": [[29, "v0-30-0-2024-06-25"]], "New Features": [[29, "new-features"], [29, "id3"], [29, "id8"], [29, "id12"], [29, "id16"], [29, "id24"], [29, "id27"], [29, "id30"], [29, "id33"], [29, "id36"], [29, "id39"], [29, "id42"], [29, "id45"], [29, "id48"], [29, "id51"], [29, "id54"], [29, "id56"], [29, "id62"], [29, "id67"], [29, "id71"], [29, "id78"], [29, "id82"]], "Misc.": [[29, "misc"], [29, "id1"], [29, "id5"], [29, "id19"]], "v0.29.0 / 2023-10-31": [[29, "v0-29-0-2023-10-31"]], "Bug Fixes": [[29, "bug-fixes"], [29, "id2"], [29, "id4"], [29, "id6"], [29, "id10"], [29, "id14"], [29, "id18"], [29, "id21"], [29, "id23"], [29, "id26"], [29, "id29"], [29, "id32"], [29, "id35"], [29, "id38"], [29, "id41"], [29, "id44"], [29, "id47"], [29, "id50"], [29, "id53"], [29, "id58"], [29, "id59"], [29, "id61"], [29, "id64"], [29, "id65"], [29, "id69"], [29, "id70"], [29, "id73"], [29, "id75"], [29, "id76"]], "v0.28.1 / 2023-08-18": [[29, "v0-28-1-2023-08-18"]], "v0.28.0 / 2023-08-15": [[29, "v0-28-0-2023-08-15"]], "Breaking Changes": [[29, "breaking-changes"], [29, "id7"], [29, "id11"], [29, "id66"], [29, "id77"]], "Enhancements": [[29, "enhancements"], [29, "id9"], [29, "id13"], [29, "id15"], [29, "id17"], [29, "id20"], [29, "id22"], [29, "id25"], [29, "id28"], [29, "id31"], [29, "id34"], [29, "id37"], [29, "id40"], [29, "id43"], [29, "id46"], [29, "id49"], [29, "id52"], [29, "id55"], [29, "id57"], [29, "id60"], [29, "id63"], [29, "id68"], [29, "id72"], [29, "id74"], [29, "id79"], [29, "id80"], [29, "id81"], [29, "id83"]], "v0.27.0 / 2023-08-02": [[29, "v0-27-0-2023-08-02"]], "v0.26.0 / 2022-11-30": [[29, "v0-26-0-2022-11-30"]], "v0.25.0 / 2022-11-11": [[29, "v0-25-0-2022-11-11"]], "v0.24.1 / 2022-08-16": [[29, "v0-24-1-2022-08-16"]], "v0.24.0 / 2022-07-08": [[29, "v0-24-0-2022-07-08"]], "Upcoming Breaking Changes": [[29, "upcoming-breaking-changes"]], "v0.23.0 / 2022-03-10": [[29, "v0-23-0-2022-03-10"]], "v0.22.0 / 2022-01-25": [[29, "v0-22-0-2022-01-25"]], "v0.21.0 / 2021-11-22": [[29, "v0-21-0-2021-11-22"]], "v0.20.1 / 2021-10-08": [[29, "v0-20-1-2021-10-08"]], "v0.20.0 / 2021-10-01": [[29, "v0-20-0-2021-10-01"]], "v0.19.0 / 2021-05-16": [[29, "v0-19-0-2021-05-16"]], "v0.18.0 / 2021-02-16": [[29, "v0-18-0-2021-02-16"]], "v0.17.0 / 2020-10-02": [[29, "v0-17-0-2020-10-02"]], "v0.16.0 / 2020-08-19": [[29, "v0-16-0-2020-08-19"]], "v0.15.0 / 2020-06-26": [[29, "v0-15-0-2020-06-26"]], "v0.14.0 / 2020-02-06": [[29, "v0-14-0-2020-02-06"]], "v0.13.0 / 2019-12-10": [[29, "v0-13-0-2019-12-10"]], "v0.12.0 / 2019-11-13": [[29, "v0-12-0-2019-11-13"]], "v0.11.0 / 2019-10-01": [[29, "v0-11-0-2019-10-01"]], "v0.10.0 / 2019-08-25": [[29, "v0-10-0-2019-08-25"]], "v0.9.0 / 2019-08-14": [[29, "v0-9-0-2019-08-14"]], "v0.8.2 / 2019-07-25": [[29, "v0-8-2-2019-07-25"]], "v0.8.1 / 2019-07-22": [[29, "v0-8-1-2019-07-22"]], "v0.8.0 / 2019-07-19": [[29, "v0-8-0-2019-07-19"]], "v0.7.1 / 2019-06-18": [[29, "v0-7-1-2019-06-18"]], "v0.7.0 / 2019-06-17": [[29, "v0-7-0-2019-06-17"]], "v0.6.4 / 2019-03-21": [[29, "v0-6-4-2019-03-21"]], "v0.6.3 / 2019-03-15": [[29, "v0-6-3-2019-03-15"]], "v0.6.2 / 2019-03-07": [[29, "v0-6-2-2019-03-07"]], "v0.6.1 / 2019-02-20": [[29, "v0-6-1-2019-02-20"]], "v0.6.0 / 2019-02-28": [[29, "v0-6-0-2019-02-28"]], "v0.5.2 / 2019-02-13": [[29, "v0-5-2-2019-02-13"]], "v0.5.1 / 2019-01-29": [[29, "v0-5-1-2019-01-29"]], "v0.5.0 / 2019-01-28": [[29, "v0-5-0-2019-01-28"]], "Command Line Interface": [[30, "command-line-interface"]], "Info Command": [[30, "info-command"]], "Command Invocation": [[30, "command-invocation"], [30, "id1"], [30, "id4"]], "Command Description": [[30, "command-description"], [30, "id2"], [30, "id5"]], "Arguments": [[30, "arguments"], [30, "id3"], [30, "id6"]], "Run Command": [[30, "run-command"]], "Run-Procedure Command": [[30, "run-procedure-command"]], "Adding a New Program Harness": [[31, "adding-a-new-program-harness"]], "Environment Detection": [[32, "environment-detection"]], "Node Description": [[32, "node-description"]], "Config": [[32, "config"]], "Global Environment": [[32, "global-environment"]], "Configuration Files": [[32, "configuration-files"]], "Cluster Configuration": [[32, "cluster-configuration"]], "QCEngine": [[33, "qcengine"]], "Program Execution": [[33, "program-execution"]], "Backends": [[33, "backends"]], "Configuration Determination": [[33, "configuration-determination"]], "Program and Procedure Information": [[33, "program-and-procedure-information"]], "Index": [[33, "index"]], "Developer Documentation": [[33, null]], "Install QCEngine": [[34, "install-qcengine"]], "Conda": [[34, "conda"]], "Pip": [[34, "pip"]], "Test the Installation": [[34, "test-the-installation"]], "Developing from Source": [[34, "developing-from-source"]], "Program Overview": [[35, "program-overview"]], "Quantum Chemistry": [[35, "quantum-chemistry"]], "Semi-Empirical": [[35, "semi-empirical"]], "AI Potential": [[35, "ai-potential"]], "Molecular Mechanics": [[35, "molecular-mechanics"], [36, "molecular-mechanics"]], "Analytical Corrections": [[35, "analytical-corrections"]], "Example": [[36, "example"], [37, "example"]], "OpenMM": [[36, "openmm"]], "RDKit": [[36, "rdkit"]], "xtb": [[36, "xtb"], [37, "xtb"]], "Semiempirical Quantum Mechanics": [[37, "semiempirical-quantum-mechanics"]], "MOPAC": [[37, "mopac"]], "Single Compute": [[38, "single-compute"]], "Input Description": [[38, "input-description"]], "Computation": [[38, "computation"]], "Results": [[38, "results"]], "Input Fields": [[38, "input-fields"]], "Returned Fields": [[38, "returned-fields"]], "FAQ": [[38, "faq"]]}, "indexentries": {"module": [[0, "module-qcengine"], [0, "module-qcengine.config"], [0, "module-qcengine.programs"], [0, "module-qcengine.util"]], "qcengine": [[0, "module-qcengine"]], "qcengine.config": [[0, "module-qcengine.config"]], "qcengine.programs": [[0, "module-qcengine.programs"]], "qcengine.util": [[0, "module-qcengine.util"]], "mdiserver (class in qcengine)": [[1, "qcengine.MDIServer"]], "recv_coords() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.recv_coords"]], "recv_elements() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.recv_elements"]], "recv_masses() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.recv_masses"]], "recv_multiplicity() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.recv_multiplicity"]], "recv_natoms() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.recv_natoms"]], "recv_total_charge() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.recv_total_charge"]], "run_energy() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.run_energy"]], "send_coords() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_coords"]], "send_elements() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_elements"]], "send_energy() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_energy"]], "send_forces() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_forces"]], "send_masses() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_masses"]], "send_multiplicity() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_multiplicity"]], "send_natoms() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_natoms"]], "send_node() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_node"]], "send_total_charge() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.send_total_charge"]], "start() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.start"]], "stop() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.stop"]], "update_molecule() (qcengine.mdiserver method)": [[1, "qcengine.MDIServer.update_molecule"]], "compute() (in module qcengine)": [[2, "qcengine.compute"]], "compute_procedure() (in module qcengine)": [[3, "qcengine.compute_procedure"]], "hostname_pattern (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.hostname_pattern"]], "is_batch_node (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.is_batch_node"]], "jobs_per_node (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.jobs_per_node"]], "memory (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.memory"]], "memory_safety_factor (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.memory_safety_factor"]], "mpiexec_command (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.mpiexec_command"]], "name (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.name"]], "ncores (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.ncores"]], "retries (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.retries"]], "scratch_directory (qcengine.config.nodedescriptor attribute)": [[4, "qcengine.config.NodeDescriptor.scratch_directory"]], "get_config() (in module qcengine.config)": [[5, "qcengine.config.get_config"]], "get_provenance_augments() (in module qcengine.config)": [[6, "qcengine.config.get_provenance_augments"]], "global_repr() (in module qcengine.config)": [[7, "qcengine.config.global_repr"]], "get_config() (in module qcengine)": [[8, "qcengine.get_config"]], "get_molecule() (in module qcengine)": [[9, "qcengine.get_molecule"]], "get_procedure() (in module qcengine)": [[10, "qcengine.get_procedure"]], "get_program() (in module qcengine)": [[11, "qcengine.get_program"]], "list_all_procedures() (in module qcengine)": [[12, "qcengine.list_all_procedures"]], "list_all_programs() (in module qcengine)": [[13, "qcengine.list_all_programs"]], "list_available_procedures() (in module qcengine)": [[14, "qcengine.list_available_procedures"]], "list_available_programs() (in module qcengine)": [[15, "qcengine.list_available_programs"]], "build_input() (qcengine.programs.programharness method)": [[16, "qcengine.programs.ProgramHarness.build_input"]], "compute() (qcengine.programs.programharness method)": [[16, "qcengine.programs.ProgramHarness.compute"]], "execute() (qcengine.programs.programharness method)": [[16, "qcengine.programs.ProgramHarness.execute"]], "extras (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.extras"]], "found() (qcengine.programs.programharness static method)": [[16, "qcengine.programs.ProgramHarness.found"]], "get_version() (qcengine.programs.programharness method)": [[16, "qcengine.programs.ProgramHarness.get_version"]], "managed_memory (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.managed_memory"]], "name (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.name"]], "node_parallel (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.node_parallel"]], "parse_output() (qcengine.programs.programharness method)": [[16, "qcengine.programs.ProgramHarness.parse_output"]], "scratch (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.scratch"]], "thread_parallel (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.thread_parallel"]], "thread_safe (qcengine.programs.programharness attribute)": [[16, "qcengine.programs.ProgramHarness.thread_safe"]], "get_program() (in module qcengine.programs)": [[17, "qcengine.programs.get_program"]], "list_all_programs() (in module qcengine.programs)": [[18, "qcengine.programs.list_all_programs"]], "list_available_programs() (in module qcengine.programs)": [[19, "qcengine.programs.list_available_programs"]], "register_program() (in module qcengine.programs)": [[20, "qcengine.programs.register_program"]], "unregister_program() (in module qcengine.programs)": [[21, "qcengine.programs.unregister_program"]], "register_program() (in module qcengine)": [[22, "qcengine.register_program"]], "unregister_program() (in module qcengine)": [[23, "qcengine.unregister_program"]], "compute_wrapper() (in module qcengine.util)": [[24, "qcengine.util.compute_wrapper"]], "create_mpi_invocation() (in module qcengine.util)": [[25, "qcengine.util.create_mpi_invocation"]], "execute() (in module qcengine.util)": [[26, "qcengine.util.execute"]], "handle_output_metadata() (in module qcengine.util)": [[27, "qcengine.util.handle_output_metadata"]], "model_wrapper() (in module qcengine.util)": [[28, "qcengine.util.model_wrapper"]]}})
\ No newline at end of file
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 11597d254..000000000
--- a/setup.cfg
+++ /dev/null
@@ -1,38 +0,0 @@
-# Helper file to handle all configs
-
-[coverage:run]
-# .coveragerc to control coverage.py and pytest-cov
-omit =
- qcengine/_version.py
-
-[tool:pytest]
-filterwarnings =
- ignore::DeprecationWarning
- ignore::PendingDeprecationWarning
-markers =
- long
- slow: marks tests as slow (deselect with '-m "not slow"')
- smoke
-
-[tool:isort]
-line_length=120
-skip=__init__.py
-include_trailing_comma=True
-force_grid_wrap=0
-use_parentheses=True
-multi_line_output=3
-
-[flake8]
-# Flake8, PyFlakes, etc
-max-line-length = 119
-
-[versioneer]
-# Automatic version numbering scheme
-VCS = git
-style = pep440
-versionfile_source = qcengine/_version.py
-versionfile_build = qcengine/_version.py
-tag_prefix = ''
-
-[aliases]
-test=pytest
diff --git a/setup.py b/setup.py
deleted file mode 100644
index 20958b245..000000000
--- a/setup.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import sys
-import setuptools
-import versioneer
-
-short_description = (
- "QCEngine provides a wrapper to ingest and produce QCSchema for a variety of quantum chemistry programs."
-)
-
-# from https://github.com/pytest-dev/pytest-runner#conditional-requirement
-needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
-pytest_runner = ["pytest-runner"] if needs_pytest else []
-
-try:
- with open("README.md", "r") as handle:
- long_description = handle.read()
-except FileNotFoundError:
- long_description = short_description
-
-if __name__ == "__main__":
- setuptools.setup(
- name="qcengine",
- description="A compute wrapper for Quantum Chemistry.",
- author="The QCArchive Development Team",
- author_email="qcarchive@molssi.org",
- url="https://github.com/MolSSI/QCEngine",
- license="BSD-3C",
- version=versioneer.get_version(),
- cmdclass=versioneer.get_cmdclass(),
- packages=setuptools.find_packages(),
- setup_requires=[] + pytest_runner,
- install_requires=["pyyaml", "py-cpuinfo", "psutil", "qcelemental>=0.24.0,<0.30.0", "pydantic>=1.8.2"],
- entry_points={"console_scripts": ["qcengine=qcengine.cli:main"]},
- extras_require={
- "docs": [
- "sphinx==1.2.3", # autodoc was broken in 1.3.1
- "sphinxcontrib-napoleon",
- "sphinx_rtd_theme",
- "numpydoc",
- ],
- "tests": ["pytest", "pytest-cov"],
- "lint": ["black>=22.1.0,<23.0a0"],
- },
- tests_require=["pytest", "pytest-cov"],
- classifiers=[
- "Development Status :: 4 - Beta",
- "Intended Audience :: Science/Research",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
- "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: 3.11",
- "Programming Language :: Python :: 3.12",
- ],
- zip_safe=False,
- long_description=long_description,
- long_description_content_type="text/markdown",
- )
diff --git a/single_compute.html b/single_compute.html
new file mode 100644
index 000000000..cdbce57e0
--- /dev/null
+++ b/single_compute.html
@@ -0,0 +1,2839 @@
+
+
+
+
+
+
+ Single Compute — QCEngine 0+untagged.1.g3b9ed2a documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QCEngine
+
+
+
+
+
+
+
+
+
+Single Compute
+QCEngine’s primary purpose is to consume the MolSSI QCSchema and produce
+QCSchema results for a variety of quantum chemistry, semiempirical, and molecular mechanics programs. Single QCSchema representation
+comprises of a single energy
, gradient
, hessian
, or properties
evaluation.
+
+
+Computation
+A single computation can be evaluated with the compute
function as follows:
+>>> ret = qcng . compute ( inp , "psi4" )
+
+
+By default the job is given resources relating to the compute environment it is in; however, these variables can be overridden:
+>>> ret = qcng . compute ( inp , "psi4" , local_options = { "memory" : 2 , "ncores" : 3 })
+
+
+
+
+Results
+The results contain a complete record of the computation:
+>>> ret . return_result
+-74.45994963230625
+
+>>> ret . properties . scf_dipole_moment
+[0.0, 0.0, 0.6635967188869244]
+
+>>> ret . provenance . cpu
+Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
+
+
+
+
+
+Returned Fields
+
+
+pydantic model qcelemental.models. AtomicResult [source]
+Results from a CMS program execution.
+
+Show JSON schema {
+ "title" : "AtomicResult" ,
+ "description" : "Results from a CMS program execution." ,
+ "type" : "object" ,
+ "properties" : {
+ "id" : {
+ "title" : "Id" ,
+ "description" : "The optional ID for the computation." ,
+ "type" : "string"
+ },
+ "schema_name" : {
+ "title" : "Schema Name" ,
+ "description" : "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output." ,
+ "default" : "qcschema_output" ,
+ "pattern" : "^(qc_?schema_output)$" ,
+ "type" : "string"
+ },
+ "schema_version" : {
+ "title" : "Schema Version" ,
+ "description" : "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms." ,
+ "default" : 1 ,
+ "type" : "integer"
+ },
+ "molecule" : {
+ "title" : "Molecule" ,
+ "description" : "The molecule to use in the computation." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/Molecule"
+ }
+ ]
+ },
+ "driver" : {
+ "description" : "Allowed computation driver values." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/DriverEnum"
+ }
+ ]
+ },
+ "model" : {
+ "title" : "Model" ,
+ "description" : "The computational molecular sciences model to run." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/Model"
+ }
+ ]
+ },
+ "keywords" : {
+ "title" : "Keywords" ,
+ "description" : "The program-specific keywords to be used." ,
+ "default" : {},
+ "type" : "object"
+ },
+ "protocols" : {
+ "title" : "Protocols" ,
+ "description" : "Protocols regarding the manipulation of computational result data." ,
+ "default" : {},
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/AtomicResultProtocols"
+ }
+ ]
+ },
+ "extras" : {
+ "title" : "Extras" ,
+ "description" : "Additional information to bundle with the computation. Use for schema development and scratch space." ,
+ "default" : {},
+ "type" : "object"
+ },
+ "provenance" : {
+ "title" : "Provenance" ,
+ "description" : "Provenance information." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/Provenance"
+ }
+ ]
+ },
+ "properties" : {
+ "title" : "Properties" ,
+ "description" : "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n " ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/AtomicResultProperties"
+ }
+ ]
+ },
+ "wavefunction" : {
+ "title" : "Wavefunction" ,
+ "description" : "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/WavefunctionProperties"
+ }
+ ]
+ },
+ "return_result" : {
+ "title" : "Return Result" ,
+ "description" : "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties." ,
+ "anyOf" : [
+ {
+ "type" : "number"
+ },
+ {
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ {
+ "type" : "object"
+ }
+ ]
+ },
+ "stdout" : {
+ "title" : "Stdout" ,
+ "description" : "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol." ,
+ "type" : "string"
+ },
+ "stderr" : {
+ "title" : "Stderr" ,
+ "description" : "The standard error of the program execution." ,
+ "type" : "string"
+ },
+ "native_files" : {
+ "title" : "Native Files" ,
+ "description" : "DSL files." ,
+ "default" : {},
+ "type" : "object"
+ },
+ "success" : {
+ "title" : "Success" ,
+ "description" : "The success of program execution. If False, other fields may be blank." ,
+ "type" : "boolean"
+ },
+ "error" : {
+ "title" : "Error" ,
+ "description" : "Complete description of the error from an unsuccessful program execution." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/ComputeError"
+ }
+ ]
+ }
+ },
+ "required" : [
+ "molecule" ,
+ "driver" ,
+ "model" ,
+ "provenance" ,
+ "properties" ,
+ "return_result" ,
+ "success"
+ ],
+ "additionalProperties" : false ,
+ "$schema" : "http://json-schema.org/draft-04/schema#" ,
+ "definitions" : {
+ "Identifiers" : {
+ "title" : "Identifiers" ,
+ "description" : "Canonical chemical identifiers" ,
+ "type" : "object" ,
+ "properties" : {
+ "molecule_hash" : {
+ "title" : "Molecule Hash" ,
+ "type" : "string"
+ },
+ "molecular_formula" : {
+ "title" : "Molecular Formula" ,
+ "type" : "string"
+ },
+ "smiles" : {
+ "title" : "Smiles" ,
+ "type" : "string"
+ },
+ "inchi" : {
+ "title" : "Inchi" ,
+ "type" : "string"
+ },
+ "inchikey" : {
+ "title" : "Inchikey" ,
+ "type" : "string"
+ },
+ "canonical_explicit_hydrogen_smiles" : {
+ "title" : "Canonical Explicit Hydrogen Smiles" ,
+ "type" : "string"
+ },
+ "canonical_isomeric_explicit_hydrogen_mapped_smiles" : {
+ "title" : "Canonical Isomeric Explicit Hydrogen Mapped Smiles" ,
+ "type" : "string"
+ },
+ "canonical_isomeric_explicit_hydrogen_smiles" : {
+ "title" : "Canonical Isomeric Explicit Hydrogen Smiles" ,
+ "type" : "string"
+ },
+ "canonical_isomeric_smiles" : {
+ "title" : "Canonical Isomeric Smiles" ,
+ "type" : "string"
+ },
+ "canonical_smiles" : {
+ "title" : "Canonical Smiles" ,
+ "type" : "string"
+ },
+ "pubchem_cid" : {
+ "title" : "Pubchem Cid" ,
+ "description" : "PubChem Compound ID" ,
+ "type" : "string"
+ },
+ "pubchem_sid" : {
+ "title" : "Pubchem Sid" ,
+ "description" : "PubChem Substance ID" ,
+ "type" : "string"
+ },
+ "pubchem_conformerid" : {
+ "title" : "Pubchem Conformerid" ,
+ "description" : "PubChem Conformer ID" ,
+ "type" : "string"
+ }
+ },
+ "additionalProperties" : false
+ },
+ "Provenance" : {
+ "title" : "Provenance" ,
+ "description" : "Provenance information." ,
+ "type" : "object" ,
+ "properties" : {
+ "creator" : {
+ "title" : "Creator" ,
+ "description" : "The name of the program, library, or person who created the object." ,
+ "type" : "string"
+ },
+ "version" : {
+ "title" : "Version" ,
+ "description" : "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 <https://www.python.org/dev/peps/pep-0440/>`_." ,
+ "default" : "" ,
+ "type" : "string"
+ },
+ "routine" : {
+ "title" : "Routine" ,
+ "description" : "The name of the routine or function within the creator, blank otherwise." ,
+ "default" : "" ,
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "creator"
+ ],
+ "$schema" : "http://json-schema.org/draft-04/schema#"
+ },
+ "Molecule" : {
+ "title" : "Molecule" ,
+ "description" : "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * <varies>: irregular dimension not systematically reshapable" ,
+ "type" : "object" ,
+ "properties" : {
+ "schema_name" : {
+ "title" : "Schema Name" ,
+ "description" : "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule." ,
+ "default" : "qcschema_molecule" ,
+ "pattern" : "^(qcschema_molecule)$" ,
+ "type" : "string"
+ },
+ "schema_version" : {
+ "title" : "Schema Version" ,
+ "description" : "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms." ,
+ "default" : 2 ,
+ "type" : "integer"
+ },
+ "validated" : {
+ "title" : "Validated" ,
+ "description" : "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules." ,
+ "default" : false ,
+ "type" : "boolean"
+ },
+ "symbols" : {
+ "title" : "Symbols" ,
+ "description" : "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field." ,
+ "shape" : [
+ "nat"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "geometry" : {
+ "title" : "Geometry" ,
+ "description" : "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute." ,
+ "shape" : [
+ "nat" ,
+ 3
+ ],
+ "units" : "a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "name" : {
+ "title" : "Name" ,
+ "description" : "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels." ,
+ "type" : "string"
+ },
+ "identifiers" : {
+ "title" : "Identifiers" ,
+ "description" : "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/Identifiers"
+ }
+ ]
+ },
+ "comment" : {
+ "title" : "Comment" ,
+ "description" : "Additional comments for this molecule. Intended for pure human/user consumption and clarity." ,
+ "type" : "string"
+ },
+ "molecular_charge" : {
+ "title" : "Molecular Charge" ,
+ "description" : "The net electrostatic charge of the molecule." ,
+ "default" : 0.0 ,
+ "type" : "number"
+ },
+ "molecular_multiplicity" : {
+ "title" : "Molecular Multiplicity" ,
+ "description" : "The total multiplicity of the molecule." ,
+ "default" : 1 ,
+ "type" : "integer"
+ },
+ "masses" : {
+ "title" : "Masses" ,
+ "description" : "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field." ,
+ "shape" : [
+ "nat"
+ ],
+ "units" : "u" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "real" : {
+ "title" : "Real" ,
+ "description" : "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified." ,
+ "shape" : [
+ "nat"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "boolean"
+ }
+ },
+ "atom_labels" : {
+ "title" : "Atom Labels" ,
+ "description" : "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule." ,
+ "shape" : [
+ "nat"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "atomic_numbers" : {
+ "title" : "Atomic Numbers" ,
+ "description" : "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here." ,
+ "shape" : [
+ "nat"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number" ,
+ "multipleOf" : 1.0
+ }
+ },
+ "mass_numbers" : {
+ "title" : "Mass Numbers" ,
+ "description" : "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder." ,
+ "shape" : [
+ "nat"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number" ,
+ "multipleOf" : 1.0
+ }
+ },
+ "connectivity" : {
+ "title" : "Connectivity" ,
+ "description" : "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "array" ,
+ "minItems" : 3 ,
+ "maxItems" : 3 ,
+ "items" : [
+ {
+ "type" : "integer" ,
+ "minimum" : 0
+ },
+ {
+ "type" : "integer" ,
+ "minimum" : 0
+ },
+ {
+ "type" : "number" ,
+ "minimum" : 0 ,
+ "maximum" : 5
+ }
+ ]
+ }
+ },
+ "fragments" : {
+ "title" : "Fragments" ,
+ "description" : "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays)." ,
+ "shape" : [
+ "nfr" ,
+ "<varies>"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "array" ,
+ "items" : {
+ "type" : "number" ,
+ "multipleOf" : 1.0
+ }
+ }
+ },
+ "fragment_charges" : {
+ "title" : "Fragment Charges" ,
+ "description" : "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified)." ,
+ "shape" : [
+ "nfr"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "fragment_multiplicities" : {
+ "title" : "Fragment Multiplicities" ,
+ "description" : "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified)." ,
+ "shape" : [
+ "nfr"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "integer"
+ }
+ },
+ "fix_com" : {
+ "title" : "Fix Com" ,
+ "description" : "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present)." ,
+ "default" : false ,
+ "type" : "boolean"
+ },
+ "fix_orientation" : {
+ "title" : "Fix Orientation" ,
+ "description" : "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations)." ,
+ "default" : false ,
+ "type" : "boolean"
+ },
+ "fix_symmetry" : {
+ "title" : "Fix Symmetry" ,
+ "description" : "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase." ,
+ "type" : "string"
+ },
+ "provenance" : {
+ "title" : "Provenance" ,
+ "description" : "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/Provenance"
+ }
+ ]
+ },
+ "id" : {
+ "title" : "Id" ,
+ "description" : "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set."
+ },
+ "extras" : {
+ "title" : "Extras" ,
+ "description" : "Additional information to bundle with the molecule. Use for schema development and scratch space." ,
+ "type" : "object"
+ }
+ },
+ "required" : [
+ "symbols" ,
+ "geometry"
+ ],
+ "additionalProperties" : false ,
+ "$schema" : "http://json-schema.org/draft-04/schema#"
+ },
+ "DriverEnum" : {
+ "title" : "DriverEnum" ,
+ "description" : "Allowed computation driver values." ,
+ "enum" : [
+ "energy" ,
+ "gradient" ,
+ "hessian" ,
+ "properties"
+ ],
+ "type" : "string"
+ },
+ "HarmonicType" : {
+ "title" : "HarmonicType" ,
+ "description" : "The angular momentum representation of a shell." ,
+ "enum" : [
+ "spherical" ,
+ "cartesian"
+ ],
+ "type" : "string"
+ },
+ "ElectronShell" : {
+ "title" : "ElectronShell" ,
+ "description" : "Information for a single electronic shell." ,
+ "type" : "object" ,
+ "properties" : {
+ "angular_momentum" : {
+ "title" : "Angular Momentum" ,
+ "description" : "Angular momentum for the shell as an array of integers." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "integer" ,
+ "minimum" : 0
+ },
+ "uniqueItems" : true
+ },
+ "harmonic_type" : {
+ "description" : "The angular momentum representation of a shell." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/HarmonicType"
+ }
+ ]
+ },
+ "exponents" : {
+ "title" : "Exponents" ,
+ "description" : "Exponents for the contracted shell." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "anyOf" : [
+ {
+ "type" : "number"
+ },
+ {
+ "type" : "string"
+ }
+ ]
+ }
+ },
+ "coefficients" : {
+ "title" : "Coefficients" ,
+ "description" : "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "array" ,
+ "items" : {
+ "anyOf" : [
+ {
+ "type" : "number"
+ },
+ {
+ "type" : "string"
+ }
+ ]
+ },
+ "minItems" : 1
+ }
+ }
+ },
+ "required" : [
+ "angular_momentum" ,
+ "harmonic_type" ,
+ "exponents" ,
+ "coefficients"
+ ],
+ "additionalProperties" : false
+ },
+ "ECPType" : {
+ "title" : "ECPType" ,
+ "description" : "The type of the ECP potential." ,
+ "enum" : [
+ "scalar" ,
+ "spinorbit"
+ ],
+ "type" : "string"
+ },
+ "ECPPotential" : {
+ "title" : "ECPPotential" ,
+ "description" : "Information for a single ECP potential." ,
+ "type" : "object" ,
+ "properties" : {
+ "ecp_type" : {
+ "description" : "The type of the ECP potential." ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/ECPType"
+ }
+ ]
+ },
+ "angular_momentum" : {
+ "title" : "Angular Momentum" ,
+ "description" : "Angular momentum for the potential as an array of integers." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "integer" ,
+ "minimum" : 0
+ },
+ "uniqueItems" : true
+ },
+ "r_exponents" : {
+ "title" : "R Exponents" ,
+ "description" : "Exponents of the 'r' term." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "integer"
+ }
+ },
+ "gaussian_exponents" : {
+ "title" : "Gaussian Exponents" ,
+ "description" : "Exponents of the 'gaussian' term." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "anyOf" : [
+ {
+ "type" : "number"
+ },
+ {
+ "type" : "string"
+ }
+ ]
+ }
+ },
+ "coefficients" : {
+ "title" : "Coefficients" ,
+ "description" : "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "array" ,
+ "items" : {
+ "anyOf" : [
+ {
+ "type" : "number"
+ },
+ {
+ "type" : "string"
+ }
+ ]
+ },
+ "minItems" : 1
+ }
+ }
+ },
+ "required" : [
+ "ecp_type" ,
+ "angular_momentum" ,
+ "r_exponents" ,
+ "gaussian_exponents" ,
+ "coefficients"
+ ],
+ "additionalProperties" : false
+ },
+ "BasisCenter" : {
+ "title" : "BasisCenter" ,
+ "description" : "Data for a single atom/center in a basis set." ,
+ "type" : "object" ,
+ "properties" : {
+ "electron_shells" : {
+ "title" : "Electron Shells" ,
+ "description" : "Electronic shells for this center." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "$ref" : "#/definitions/ElectronShell"
+ },
+ "uniqueItems" : true
+ },
+ "ecp_electrons" : {
+ "title" : "Ecp Electrons" ,
+ "description" : "Number of electrons replaced by ECP, MCP, or other field potentials." ,
+ "default" : 0 ,
+ "type" : "integer"
+ },
+ "ecp_potentials" : {
+ "title" : "Ecp Potentials" ,
+ "description" : "ECPs, MCPs, or other field potentials for this center." ,
+ "minItems" : 1 ,
+ "type" : "array" ,
+ "items" : {
+ "$ref" : "#/definitions/ECPPotential"
+ },
+ "uniqueItems" : true
+ }
+ },
+ "required" : [
+ "electron_shells"
+ ],
+ "additionalProperties" : false
+ },
+ "BasisSet" : {
+ "title" : "BasisSet" ,
+ "description" : "A quantum chemistry basis description." ,
+ "type" : "object" ,
+ "properties" : {
+ "schema_name" : {
+ "title" : "Schema Name" ,
+ "description" : "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis." ,
+ "default" : "qcschema_basis" ,
+ "pattern" : "^(qcschema_basis)$" ,
+ "type" : "string"
+ },
+ "schema_version" : {
+ "title" : "Schema Version" ,
+ "description" : "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms." ,
+ "default" : 1 ,
+ "type" : "integer"
+ },
+ "name" : {
+ "title" : "Name" ,
+ "description" : "The standard basis name if available (e.g., 'cc-pVDZ')." ,
+ "type" : "string"
+ },
+ "description" : {
+ "title" : "Description" ,
+ "description" : "Brief description of the basis set." ,
+ "type" : "string"
+ },
+ "center_data" : {
+ "title" : "Center Data" ,
+ "description" : "Shared basis data for all atoms/centers in the parent molecule" ,
+ "type" : "object" ,
+ "additionalProperties" : {
+ "$ref" : "#/definitions/BasisCenter"
+ }
+ },
+ "atom_map" : {
+ "title" : "Atom Map" ,
+ "description" : "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``." ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "nbf" : {
+ "title" : "Nbf" ,
+ "description" : "The number of basis functions. Use for convenience or as checksum" ,
+ "type" : "integer"
+ }
+ },
+ "required" : [
+ "name" ,
+ "center_data" ,
+ "atom_map"
+ ],
+ "additionalProperties" : false ,
+ "$schema" : "http://json-schema.org/draft-04/schema#"
+ },
+ "Model" : {
+ "title" : "Model" ,
+ "description" : "The computational molecular sciences model to run." ,
+ "type" : "object" ,
+ "properties" : {
+ "method" : {
+ "title" : "Method" ,
+ "description" : "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field." ,
+ "type" : "string"
+ },
+ "basis" : {
+ "title" : "Basis" ,
+ "description" : "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer." ,
+ "anyOf" : [
+ {
+ "type" : "string"
+ },
+ {
+ "$ref" : "#/definitions/BasisSet"
+ }
+ ]
+ }
+ },
+ "required" : [
+ "method"
+ ]
+ },
+ "WavefunctionProtocolEnum" : {
+ "title" : "WavefunctionProtocolEnum" ,
+ "description" : "Wavefunction to keep from a computation." ,
+ "enum" : [
+ "all" ,
+ "orbitals_and_eigenvalues" ,
+ "occupations_and_eigenvalues" ,
+ "return_results" ,
+ "none"
+ ],
+ "type" : "string"
+ },
+ "ErrorCorrectionProtocol" : {
+ "title" : "ErrorCorrectionProtocol" ,
+ "description" : "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks" ,
+ "type" : "object" ,
+ "properties" : {
+ "default_policy" : {
+ "title" : "Default Policy" ,
+ "description" : "Whether to allow error corrections to be used if not directly specified in `policies`" ,
+ "default" : true ,
+ "type" : "boolean"
+ },
+ "policies" : {
+ "title" : "Policies" ,
+ "description" : "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used." ,
+ "type" : "object" ,
+ "additionalProperties" : {
+ "type" : "boolean"
+ }
+ }
+ },
+ "additionalProperties" : false
+ },
+ "NativeFilesProtocolEnum" : {
+ "title" : "NativeFilesProtocolEnum" ,
+ "description" : "CMS program files to keep from a computation." ,
+ "enum" : [
+ "all" ,
+ "input" ,
+ "none"
+ ],
+ "type" : "string"
+ },
+ "AtomicResultProtocols" : {
+ "title" : "AtomicResultProtocols" ,
+ "description" : "Protocols regarding the manipulation of computational result data." ,
+ "type" : "object" ,
+ "properties" : {
+ "wavefunction" : {
+ "description" : "Wavefunction to keep from a computation." ,
+ "default" : "none" ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/WavefunctionProtocolEnum"
+ }
+ ]
+ },
+ "stdout" : {
+ "title" : "Stdout" ,
+ "description" : "Primary output file to keep from the computation" ,
+ "default" : true ,
+ "type" : "boolean"
+ },
+ "error_correction" : {
+ "title" : "Error Correction" ,
+ "description" : "Policies for error correction" ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/ErrorCorrectionProtocol"
+ }
+ ]
+ },
+ "native_files" : {
+ "description" : "Policies for keeping processed files from the computation" ,
+ "default" : "none" ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/NativeFilesProtocolEnum"
+ }
+ ]
+ }
+ },
+ "additionalProperties" : false
+ },
+ "AtomicResultProperties" : {
+ "title" : "AtomicResultProperties" ,
+ "description" : "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`" ,
+ "type" : "object" ,
+ "properties" : {
+ "calcinfo_nbasis" : {
+ "title" : "Calcinfo Nbasis" ,
+ "description" : "The number of basis functions for the computation." ,
+ "type" : "integer"
+ },
+ "calcinfo_nmo" : {
+ "title" : "Calcinfo Nmo" ,
+ "description" : "The number of molecular orbitals for the computation." ,
+ "type" : "integer"
+ },
+ "calcinfo_nalpha" : {
+ "title" : "Calcinfo Nalpha" ,
+ "description" : "The number of alpha electrons in the computation." ,
+ "type" : "integer"
+ },
+ "calcinfo_nbeta" : {
+ "title" : "Calcinfo Nbeta" ,
+ "description" : "The number of beta electrons in the computation." ,
+ "type" : "integer"
+ },
+ "calcinfo_natom" : {
+ "title" : "Calcinfo Natom" ,
+ "description" : "The number of atoms in the computation." ,
+ "type" : "integer"
+ },
+ "nuclear_repulsion_energy" : {
+ "title" : "Nuclear Repulsion Energy" ,
+ "description" : "The nuclear repulsion energy." ,
+ "type" : "number"
+ },
+ "return_energy" : {
+ "title" : "Return Energy" ,
+ "description" : "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations." ,
+ "type" : "number"
+ },
+ "return_gradient" : {
+ "title" : "Return Gradient" ,
+ "description" : "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations." ,
+ "units" : "E_h/a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "return_hessian" : {
+ "title" : "Return Hessian" ,
+ "description" : "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations." ,
+ "units" : "E_h/a0^2" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_one_electron_energy" : {
+ "title" : "Scf One Electron Energy" ,
+ "description" : "The one-electron (core Hamiltonian) energy contribution to the total SCF energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "scf_two_electron_energy" : {
+ "title" : "Scf Two Electron Energy" ,
+ "description" : "The two-electron energy contribution to the total SCF energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "scf_vv10_energy" : {
+ "title" : "Scf Vv10 Energy" ,
+ "description" : "The VV10 functional energy contribution to the total SCF energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "scf_xc_energy" : {
+ "title" : "Scf Xc Energy" ,
+ "description" : "The functional (XC) energy contribution to the total SCF energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "scf_dispersion_correction_energy" : {
+ "title" : "Scf Dispersion Correction Energy" ,
+ "description" : "The dispersion correction appended to an underlying functional when a DFT-D method is requested." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "scf_dipole_moment" : {
+ "title" : "Scf Dipole Moment" ,
+ "description" : "The SCF X, Y, and Z dipole components" ,
+ "units" : "e a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_quadrupole_moment" : {
+ "title" : "Scf Quadrupole Moment" ,
+ "description" : "The quadrupole components (redundant; 6 unique)." ,
+ "shape" : [
+ 3 ,
+ 3
+ ],
+ "units" : "e a0^2" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_total_energy" : {
+ "title" : "Scf Total Energy" ,
+ "description" : "The total electronic energy of the SCF stage of the calculation." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "scf_total_gradient" : {
+ "title" : "Scf Total Gradient" ,
+ "description" : "The total electronic gradient of the SCF stage of the calculation." ,
+ "units" : "E_h/a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_total_hessian" : {
+ "title" : "Scf Total Hessian" ,
+ "description" : "The total electronic Hessian of the SCF stage of the calculation." ,
+ "units" : "E_h/a0^2" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_iterations" : {
+ "title" : "Scf Iterations" ,
+ "description" : "The number of SCF iterations taken before convergence." ,
+ "type" : "integer"
+ },
+ "mp2_same_spin_correlation_energy" : {
+ "title" : "Mp2 Same Spin Correlation Energy" ,
+ "description" : "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "mp2_opposite_spin_correlation_energy" : {
+ "title" : "Mp2 Opposite Spin Correlation Energy" ,
+ "description" : "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "mp2_singles_energy" : {
+ "title" : "Mp2 Singles Energy" ,
+ "description" : "The singles portion of the MP2 correlation energy. Zero except in ROHF." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "mp2_doubles_energy" : {
+ "title" : "Mp2 Doubles Energy" ,
+ "description" : "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "mp2_correlation_energy" : {
+ "title" : "Mp2 Correlation Energy" ,
+ "description" : "The MP2 correlation energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "mp2_total_energy" : {
+ "title" : "Mp2 Total Energy" ,
+ "description" : "The total MP2 energy (MP2 correlation energy + HF energy)." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "mp2_dipole_moment" : {
+ "title" : "Mp2 Dipole Moment" ,
+ "description" : "The MP2 X, Y, and Z dipole components." ,
+ "shape" : [
+ 3
+ ],
+ "units" : "e a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "ccsd_same_spin_correlation_energy" : {
+ "title" : "Ccsd Same Spin Correlation Energy" ,
+ "description" : "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_opposite_spin_correlation_energy" : {
+ "title" : "Ccsd Opposite Spin Correlation Energy" ,
+ "description" : "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_singles_energy" : {
+ "title" : "Ccsd Singles Energy" ,
+ "description" : "The singles portion of the CCSD correlation energy. Zero except in ROHF." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_doubles_energy" : {
+ "title" : "Ccsd Doubles Energy" ,
+ "description" : "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_correlation_energy" : {
+ "title" : "Ccsd Correlation Energy" ,
+ "description" : "The CCSD correlation energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_total_energy" : {
+ "title" : "Ccsd Total Energy" ,
+ "description" : "The total CCSD energy (CCSD correlation energy + HF energy)." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_dipole_moment" : {
+ "title" : "Ccsd Dipole Moment" ,
+ "description" : "The CCSD X, Y, and Z dipole components." ,
+ "shape" : [
+ 3
+ ],
+ "units" : "e a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "ccsd_iterations" : {
+ "title" : "Ccsd Iterations" ,
+ "description" : "The number of CCSD iterations taken before convergence." ,
+ "type" : "integer"
+ },
+ "ccsd_prt_pr_correlation_energy" : {
+ "title" : "Ccsd Prt Pr Correlation Energy" ,
+ "description" : "The CCSD(T) correlation energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_prt_pr_total_energy" : {
+ "title" : "Ccsd Prt Pr Total Energy" ,
+ "description" : "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy)." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsd_prt_pr_dipole_moment" : {
+ "title" : "Ccsd Prt Pr Dipole Moment" ,
+ "description" : "The CCSD(T) X, Y, and Z dipole components." ,
+ "shape" : [
+ 3
+ ],
+ "units" : "e a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "ccsdt_correlation_energy" : {
+ "title" : "Ccsdt Correlation Energy" ,
+ "description" : "The CCSDT correlation energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsdt_total_energy" : {
+ "title" : "Ccsdt Total Energy" ,
+ "description" : "The total CCSDT energy (CCSDT correlation energy + HF energy)." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsdt_dipole_moment" : {
+ "title" : "Ccsdt Dipole Moment" ,
+ "description" : "The CCSDT X, Y, and Z dipole components." ,
+ "shape" : [
+ 3
+ ],
+ "units" : "e a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "ccsdt_iterations" : {
+ "title" : "Ccsdt Iterations" ,
+ "description" : "The number of CCSDT iterations taken before convergence." ,
+ "type" : "integer"
+ },
+ "ccsdtq_correlation_energy" : {
+ "title" : "Ccsdtq Correlation Energy" ,
+ "description" : "The CCSDTQ correlation energy." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsdtq_total_energy" : {
+ "title" : "Ccsdtq Total Energy" ,
+ "description" : "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy)." ,
+ "units" : "E_h" ,
+ "type" : "number"
+ },
+ "ccsdtq_dipole_moment" : {
+ "title" : "Ccsdtq Dipole Moment" ,
+ "description" : "The CCSDTQ X, Y, and Z dipole components." ,
+ "shape" : [
+ 3
+ ],
+ "units" : "e a0" ,
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "ccsdtq_iterations" : {
+ "title" : "Ccsdtq Iterations" ,
+ "description" : "The number of CCSDTQ iterations taken before convergence." ,
+ "type" : "integer"
+ }
+ },
+ "additionalProperties" : false
+ },
+ "WavefunctionProperties" : {
+ "title" : "WavefunctionProperties" ,
+ "description" : "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol." ,
+ "type" : "object" ,
+ "properties" : {
+ "basis" : {
+ "title" : "Basis" ,
+ "description" : "\n A quantum chemistry basis description.\n " ,
+ "allOf" : [
+ {
+ "$ref" : "#/definitions/BasisSet"
+ }
+ ]
+ },
+ "restricted" : {
+ "title" : "Restricted" ,
+ "description" : "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped." ,
+ "type" : "boolean"
+ },
+ "h_core_a" : {
+ "title" : "H Core A" ,
+ "description" : "Alpha-spin core (one-electron) Hamiltonian in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "h_core_b" : {
+ "title" : "H Core B" ,
+ "description" : "Beta-spin core (one-electron) Hamiltonian in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "h_effective_a" : {
+ "title" : "H Effective A" ,
+ "description" : "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "h_effective_b" : {
+ "title" : "H Effective B" ,
+ "description" : "Beta-spin effective core (one-electron) Hamiltonian in the AO basis" ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_orbitals_a" : {
+ "title" : "Scf Orbitals A" ,
+ "description" : "SCF alpha-spin orbitals in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_orbitals_b" : {
+ "title" : "Scf Orbitals B" ,
+ "description" : "SCF beta-spin orbitals in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_density_a" : {
+ "title" : "Scf Density A" ,
+ "description" : "SCF alpha-spin density matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_density_b" : {
+ "title" : "Scf Density B" ,
+ "description" : "SCF beta-spin density matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_fock_a" : {
+ "title" : "Scf Fock A" ,
+ "description" : "SCF alpha-spin Fock matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_fock_b" : {
+ "title" : "Scf Fock B" ,
+ "description" : "SCF beta-spin Fock matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_eigenvalues_a" : {
+ "title" : "Scf Eigenvalues A" ,
+ "description" : "SCF alpha-spin orbital eigenvalues." ,
+ "shape" : [
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_eigenvalues_b" : {
+ "title" : "Scf Eigenvalues B" ,
+ "description" : "SCF beta-spin orbital eigenvalues." ,
+ "shape" : [
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_occupations_a" : {
+ "title" : "Scf Occupations A" ,
+ "description" : "SCF alpha-spin orbital occupations." ,
+ "shape" : [
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_occupations_b" : {
+ "title" : "Scf Occupations B" ,
+ "description" : "SCF beta-spin orbital occupations." ,
+ "shape" : [
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_coulomb_a" : {
+ "title" : "Scf Coulomb A" ,
+ "description" : "SCF alpha-spin Coulomb matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_coulomb_b" : {
+ "title" : "Scf Coulomb B" ,
+ "description" : "SCF beta-spin Coulomb matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_exchange_a" : {
+ "title" : "Scf Exchange A" ,
+ "description" : "SCF alpha-spin exchange matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "scf_exchange_b" : {
+ "title" : "Scf Exchange B" ,
+ "description" : "SCF beta-spin exchange matrix in the AO basis." ,
+ "shape" : [
+ "nao" ,
+ "nao"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "localized_orbitals_a" : {
+ "title" : "Localized Orbitals A" ,
+ "description" : "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized." ,
+ "shape" : [
+ "nao" ,
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "localized_orbitals_b" : {
+ "title" : "Localized Orbitals B" ,
+ "description" : "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized." ,
+ "shape" : [
+ "nao" ,
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "localized_fock_a" : {
+ "title" : "Localized Fock A" ,
+ "description" : "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized." ,
+ "shape" : [
+ "nmo" ,
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "localized_fock_b" : {
+ "title" : "Localized Fock B" ,
+ "description" : "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized." ,
+ "shape" : [
+ "nmo" ,
+ "nmo"
+ ],
+ "type" : "array" ,
+ "items" : {
+ "type" : "number"
+ }
+ },
+ "orbitals_a" : {
+ "title" : "Orbitals A" ,
+ "description" : "Index to the alpha-spin orbitals of the primary return." ,
+ "type" : "string"
+ },
+ "orbitals_b" : {
+ "title" : "Orbitals B" ,
+ "description" : "Index to the beta-spin orbitals of the primary return." ,
+ "type" : "string"
+ },
+ "density_a" : {
+ "title" : "Density A" ,
+ "description" : "Index to the alpha-spin density of the primary return." ,
+ "type" : "string"
+ },
+ "density_b" : {
+ "title" : "Density B" ,
+ "description" : "Index to the beta-spin density of the primary return." ,
+ "type" : "string"
+ },
+ "fock_a" : {
+ "title" : "Fock A" ,
+ "description" : "Index to the alpha-spin Fock matrix of the primary return." ,
+ "type" : "string"
+ },
+ "fock_b" : {
+ "title" : "Fock B" ,
+ "description" : "Index to the beta-spin Fock matrix of the primary return." ,
+ "type" : "string"
+ },
+ "eigenvalues_a" : {
+ "title" : "Eigenvalues A" ,
+ "description" : "Index to the alpha-spin orbital eigenvalues of the primary return." ,
+ "type" : "string"
+ },
+ "eigenvalues_b" : {
+ "title" : "Eigenvalues B" ,
+ "description" : "Index to the beta-spin orbital eigenvalues of the primary return." ,
+ "type" : "string"
+ },
+ "occupations_a" : {
+ "title" : "Occupations A" ,
+ "description" : "Index to the alpha-spin orbital occupations of the primary return." ,
+ "type" : "string"
+ },
+ "occupations_b" : {
+ "title" : "Occupations B" ,
+ "description" : "Index to the beta-spin orbital occupations of the primary return." ,
+ "type" : "string"
+ }
+ },
+ "required" : [
+ "basis" ,
+ "restricted"
+ ],
+ "additionalProperties" : false
+ },
+ "ComputeError" : {
+ "title" : "ComputeError" ,
+ "description" : "Complete description of the error from an unsuccessful program execution." ,
+ "type" : "object" ,
+ "properties" : {
+ "error_type" : {
+ "title" : "Error Type" ,
+ "description" : "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py" ,
+ "type" : "string"
+ },
+ "error_message" : {
+ "title" : "Error Message" ,
+ "description" : "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well." ,
+ "type" : "string"
+ },
+ "extras" : {
+ "title" : "Extras" ,
+ "description" : "Additional information to bundle with the error." ,
+ "type" : "object"
+ }
+ },
+ "required" : [
+ "error_type" ,
+ "error_message"
+ ],
+ "additionalProperties" : false
+ }
+ }
+}
+
+
+
+Fields:
+
+error (qcelemental.models.common_models.ComputeError | None)
+native_files (Dict[str, Any])
+properties (qcelemental.models.results.AtomicResultProperties)
+provenance (qcelemental.models.common_models.Provenance)
+return_result (float | qcelemental.models.types.Array | Dict[str, Any])
+schema_name (qcelemental.models.results.ConstrainedStrValue)
+stderr (str | None)
+stdout (str | None)
+success (bool)
+wavefunction (qcelemental.models.results.WavefunctionProperties | None)
+
+
+Validators:
+
+_input_to_output
» schema_name
+_native_file_protocol
» native_files
+_stdout_protocol
» stdout
+_validate_return_result
» return_result
+_wavefunction_protocol
» wavefunction
+
+
+
+
+
+field error : Optional
[ ComputeError
] = None
+Complete description of the error from an unsuccessful program execution.
+
+
+
+
+field native_files : Dict
[ str
, Any
] = {}
+DSL files.
+
+Validated by:
+
+
+
+
+
+
+
+field properties : AtomicResultProperties
[Required]
+Named properties of quantum chemistry computations following the MolSSI QCSchema.
+All arrays are stored flat but must be reshapable into the dimensions in attribute shape
, with abbreviations as follows:
+
+
+
+
+
+field provenance : Provenance
[Required]
+Provenance information.
+
+
+
+
+field return_result : Union
[ float
, Array
, Dict
[ str
, Any
]] [Required]
+The primary return specified by the driver
field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.
+
+Validated by:
+
+_validate_return_result
+
+
+
+
+
+
+
+field schema_name : ConstrainedStrValue
= 'qcschema_output'
+The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.
+
+Constraints:
+
+
+Validated by:
+
+
+
+
+
+
+
+field stderr : Optional
[ str
] = None
+The standard error of the program execution.
+
+
+
+
+field stdout : Optional
[ str
] = None
+The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.
+
+Validated by:
+
+
+
+
+
+
+
+field success : bool
[Required]
+The success of program execution. If False, other fields may be blank.
+
+
+
+
+field wavefunction : Optional
[ WavefunctionProperties
] = None
+Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.
+
+Validated by:
+
+_wavefunction_protocol
+
+
+
+
+
+
+
+
+
+FAQ
+
+Where is scratch so I can access the CMS code’s files?
+The QCArchive philosophy is that you shouldn’t go looking in scratch for CMS-code-written files since the scratch directory is deleted automatically by QCEngine and even if preserved may be subject to autodeletion if run from a cluster. Instead, QCEngine brings back the primary input and output and any ancillary files from which it can harvest results. Whether these are returned to the user in AtomicResult
can be controlled through protocols in the input like atomicinput.protocols.stdout = True
and eventually (https://github.com/MolSSI/QCElemental/pull/275 ) atomicinput.protocols.native_files = "all"
.
+Nevertheless, you can, of course, access the scratch directory and CMS-code-written files. Pass an existing directory to the compute command (this directory will be parent) and tell it to not delete after the run: qcng.compute(..., local_options={"scratch_directory": "/existing/parent/dir", "scratch_messy": True})
.
+
+sdfs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/versioneer.py b/versioneer.py
deleted file mode 100644
index 3aa5da372..000000000
--- a/versioneer.py
+++ /dev/null
@@ -1,1822 +0,0 @@
-
-# Version: 0.18
-
-"""The Versioneer - like a rocketeer, but for versions.
-
-The Versioneer
-==============
-
-* like a rocketeer, but for versions!
-* https://github.com/warner/python-versioneer
-* Brian Warner
-* License: Public Domain
-* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
-* [![Latest Version]
-(https://pypip.in/version/versioneer/badge.svg?style=flat)
-](https://pypi.python.org/pypi/versioneer/)
-* [![Build Status]
-(https://travis-ci.org/warner/python-versioneer.png?branch=master)
-](https://travis-ci.org/warner/python-versioneer)
-
-This is a tool for managing a recorded version number in distutils-based
-python projects. The goal is to remove the tedious and error-prone "update
-the embedded version string" step from your release process. Making a new
-release should be as easy as recording a new tag in your version-control
-system, and maybe making new tarballs.
-
-
-## Quick Install
-
-* `pip install versioneer` to somewhere to your $PATH
-* add a `[versioneer]` section to your setup.cfg (see below)
-* run `versioneer install` in your source tree, commit the results
-
-## Version Identifiers
-
-Source trees come from a variety of places:
-
-* a version-control system checkout (mostly used by developers)
-* a nightly tarball, produced by build automation
-* a snapshot tarball, produced by a web-based VCS browser, like github's
- "tarball from tag" feature
-* a release tarball, produced by "setup.py sdist", distributed through PyPI
-
-Within each source tree, the version identifier (either a string or a number,
-this tool is format-agnostic) can come from a variety of places:
-
-* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows
- about recent "tags" and an absolute revision-id
-* the name of the directory into which the tarball was unpacked
-* an expanded VCS keyword ($Id$, etc)
-* a `_version.py` created by some earlier build step
-
-For released software, the version identifier is closely related to a VCS
-tag. Some projects use tag names that include more than just the version
-string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool
-needs to strip the tag prefix to extract the version identifier. For
-unreleased software (between tags), the version identifier should provide
-enough information to help developers recreate the same tree, while also
-giving them an idea of roughly how old the tree is (after version 1.2, before
-version 1.3). Many VCS systems can report a description that captures this,
-for example `git describe --tags --dirty --always` reports things like
-"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the
-0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has
-uncommitted changes.
-
-The version identifier is used for multiple purposes:
-
-* to allow the module to self-identify its version: `myproject.__version__`
-* to choose a name and prefix for a 'setup.py sdist' tarball
-
-## Theory of Operation
-
-Versioneer works by adding a special `_version.py` file into your source
-tree, where your `__init__.py` can import it. This `_version.py` knows how to
-dynamically ask the VCS tool for version information at import time.
-
-`_version.py` also contains `$Revision$` markers, and the installation
-process marks `_version.py` to have this marker rewritten with a tag name
-during the `git archive` command. As a result, generated tarballs will
-contain enough information to get the proper version.
-
-To allow `setup.py` to compute a version too, a `versioneer.py` is added to
-the top level of your source tree, next to `setup.py` and the `setup.cfg`
-that configures it. This overrides several distutils/setuptools commands to
-compute the version when invoked, and changes `setup.py build` and `setup.py
-sdist` to replace `_version.py` with a small static file that contains just
-the generated version data.
-
-## Installation
-
-See [INSTALL.md](./INSTALL.md) for detailed installation instructions.
-
-## Version-String Flavors
-
-Code which uses Versioneer can learn about its version string at runtime by
-importing `_version` from your main `__init__.py` file and running the
-`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can
-import the top-level `versioneer.py` and run `get_versions()`.
-
-Both functions return a dictionary with different flavors of version
-information:
-
-* `['version']`: A condensed version string, rendered using the selected
- style. This is the most commonly used value for the project's version
- string. The default "pep440" style yields strings like `0.11`,
- `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section
- below for alternative styles.
-
-* `['full-revisionid']`: detailed revision identifier. For Git, this is the
- full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac".
-
-* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the
- commit date in ISO 8601 format. This will be None if the date is not
- available.
-
-* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that
- this is only accurate if run in a VCS checkout, otherwise it is likely to
- be False or None
-
-* `['error']`: if the version string could not be computed, this will be set
- to a string describing the problem, otherwise it will be None. It may be
- useful to throw an exception in setup.py if this is set, to avoid e.g.
- creating tarballs with a version string of "unknown".
-
-Some variants are more useful than others. Including `full-revisionid` in a
-bug report should allow developers to reconstruct the exact code being tested
-(or indicate the presence of local changes that should be shared with the
-developers). `version` is suitable for display in an "about" box or a CLI
-`--version` output: it can be easily compared against release notes and lists
-of bugs fixed in various releases.
-
-The installer adds the following text to your `__init__.py` to place a basic
-version in `YOURPROJECT.__version__`:
-
- from ._version import get_versions
- __version__ = get_versions()['version']
- del get_versions
-
-## Styles
-
-The setup.cfg `style=` configuration controls how the VCS information is
-rendered into a version string.
-
-The default style, "pep440", produces a PEP440-compliant string, equal to the
-un-prefixed tag name for actual releases, and containing an additional "local
-version" section with more detail for in-between builds. For Git, this is
-TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags
---dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the
-tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and
-that this commit is two revisions ("+2") beyond the "0.11" tag. For released
-software (exactly equal to a known tag), the identifier will only contain the
-stripped tag, e.g. "0.11".
-
-Other styles are available. See [details.md](details.md) in the Versioneer
-source tree for descriptions.
-
-## Debugging
-
-Versioneer tries to avoid fatal errors: if something goes wrong, it will tend
-to return a version of "0+unknown". To investigate the problem, run `setup.py
-version`, which will run the version-lookup code in a verbose mode, and will
-display the full contents of `get_versions()` (including the `error` string,
-which may help identify what went wrong).
-
-## Known Limitations
-
-Some situations are known to cause problems for Versioneer. This details the
-most significant ones. More can be found on Github
-[issues page](https://github.com/warner/python-versioneer/issues).
-
-### Subprojects
-
-Versioneer has limited support for source trees in which `setup.py` is not in
-the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are
-two common reasons why `setup.py` might not be in the root:
-
-* Source trees which contain multiple subprojects, such as
- [Buildbot](https://github.com/buildbot/buildbot), which contains both
- "master" and "slave" subprojects, each with their own `setup.py`,
- `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI
- distributions (and upload multiple independently-installable tarballs).
-* Source trees whose main purpose is to contain a C library, but which also
- provide bindings to Python (and perhaps other langauges) in subdirectories.
-
-Versioneer will look for `.git` in parent directories, and most operations
-should get the right version string. However `pip` and `setuptools` have bugs
-and implementation details which frequently cause `pip install .` from a
-subproject directory to fail to find a correct version string (so it usually
-defaults to `0+unknown`).
-
-`pip install --editable .` should work correctly. `setup.py install` might
-work too.
-
-Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in
-some later version.
-
-[Bug #38](https://github.com/warner/python-versioneer/issues/38) is tracking
-this issue. The discussion in
-[PR #61](https://github.com/warner/python-versioneer/pull/61) describes the
-issue from the Versioneer side in more detail.
-[pip PR#3176](https://github.com/pypa/pip/pull/3176) and
-[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve
-pip to let Versioneer work correctly.
-
-Versioneer-0.16 and earlier only looked for a `.git` directory next to the
-`setup.cfg`, so subprojects were completely unsupported with those releases.
-
-### Editable installs with setuptools <= 18.5
-
-`setup.py develop` and `pip install --editable .` allow you to install a
-project into a virtualenv once, then continue editing the source code (and
-test) without re-installing after every change.
-
-"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a
-convenient way to specify executable scripts that should be installed along
-with the python package.
-
-These both work as expected when using modern setuptools. When using
-setuptools-18.5 or earlier, however, certain operations will cause
-`pkg_resources.DistributionNotFound` errors when running the entrypoint
-script, which must be resolved by re-installing the package. This happens
-when the install happens with one version, then the egg_info data is
-regenerated while a different version is checked out. Many setup.py commands
-cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into
-a different virtualenv), so this can be surprising.
-
-[Bug #83](https://github.com/warner/python-versioneer/issues/83) describes
-this one, but upgrading to a newer version of setuptools should probably
-resolve it.
-
-### Unicode version strings
-
-While Versioneer works (and is continually tested) with both Python 2 and
-Python 3, it is not entirely consistent with bytes-vs-unicode distinctions.
-Newer releases probably generate unicode version strings on py2. It's not
-clear that this is wrong, but it may be surprising for applications when then
-write these strings to a network connection or include them in bytes-oriented
-APIs like cryptographic checksums.
-
-[Bug #71](https://github.com/warner/python-versioneer/issues/71) investigates
-this question.
-
-
-## Updating Versioneer
-
-To upgrade your project to a new release of Versioneer, do the following:
-
-* install the new Versioneer (`pip install -U versioneer` or equivalent)
-* edit `setup.cfg`, if necessary, to include any new configuration settings
- indicated by the release notes. See [UPGRADING](./UPGRADING.md) for details.
-* re-run `versioneer install` in your source tree, to replace
- `SRC/_version.py`
-* commit any changed files
-
-## Future Directions
-
-This tool is designed to make it easily extended to other version-control
-systems: all VCS-specific components are in separate directories like
-src/git/ . The top-level `versioneer.py` script is assembled from these
-components by running make-versioneer.py . In the future, make-versioneer.py
-will take a VCS name as an argument, and will construct a version of
-`versioneer.py` that is specific to the given VCS. It might also take the
-configuration arguments that are currently provided manually during
-installation by editing setup.py . Alternatively, it might go the other
-direction and include code from all supported VCS systems, reducing the
-number of intermediate scripts.
-
-
-## License
-
-To make Versioneer easier to embed, all its code is dedicated to the public
-domain. The `_version.py` that it creates is also in the public domain.
-Specifically, both are released under the Creative Commons "Public Domain
-Dedication" license (CC0-1.0), as described in
-https://creativecommons.org/publicdomain/zero/1.0/ .
-
-"""
-
-from __future__ import print_function
-try:
- import configparser
-except ImportError:
- import ConfigParser as configparser
-import errno
-import json
-import os
-import re
-import subprocess
-import sys
-
-
-class VersioneerConfig:
- """Container for Versioneer configuration parameters."""
-
-
-def get_root():
- """Get the project root directory.
-
- We require that all commands are run from the project root, i.e. the
- directory that contains setup.py, setup.cfg, and versioneer.py .
- """
- root = os.path.realpath(os.path.abspath(os.getcwd()))
- setup_py = os.path.join(root, "setup.py")
- versioneer_py = os.path.join(root, "versioneer.py")
- if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)):
- # allow 'python path/to/setup.py COMMAND'
- root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0])))
- setup_py = os.path.join(root, "setup.py")
- versioneer_py = os.path.join(root, "versioneer.py")
- if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)):
- err = ("Versioneer was unable to run the project root directory. "
- "Versioneer requires setup.py to be executed from "
- "its immediate directory (like 'python setup.py COMMAND'), "
- "or in a way that lets it use sys.argv[0] to find the root "
- "(like 'python path/to/setup.py COMMAND').")
- raise VersioneerBadRootError(err)
- try:
- # Certain runtime workflows (setup.py install/develop in a setuptools
- # tree) execute all dependencies in a single python process, so
- # "versioneer" may be imported multiple times, and python's shared
- # module-import table will cache the first one. So we can't use
- # os.path.dirname(__file__), as that will find whichever
- # versioneer.py was first imported, even in later projects.
- me = os.path.realpath(os.path.abspath(__file__))
- me_dir = os.path.normcase(os.path.splitext(me)[0])
- vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0])
- if me_dir != vsr_dir:
- print("Warning: build in %s is using versioneer.py from %s"
- % (os.path.dirname(me), versioneer_py))
- except NameError:
- pass
- return root
-
-
-def get_config_from_root(root):
- """Read the project setup.cfg file to determine Versioneer config."""
- # This might raise EnvironmentError (if setup.cfg is missing), or
- # configparser.NoSectionError (if it lacks a [versioneer] section), or
- # configparser.NoOptionError (if it lacks "VCS="). See the docstring at
- # the top of versioneer.py for instructions on writing your setup.cfg .
- setup_cfg = os.path.join(root, "setup.cfg")
- parser = configparser.ConfigParser()
- with open(setup_cfg, "r") as f:
- parser.read_file(f)
- VCS = parser.get("versioneer", "VCS") # mandatory
-
- def get(parser, name):
- if parser.has_option("versioneer", name):
- return parser.get("versioneer", name)
- return None
- cfg = VersioneerConfig()
- cfg.VCS = VCS
- cfg.style = get(parser, "style") or ""
- cfg.versionfile_source = get(parser, "versionfile_source")
- cfg.versionfile_build = get(parser, "versionfile_build")
- cfg.tag_prefix = get(parser, "tag_prefix")
- if cfg.tag_prefix in ("''", '""'):
- cfg.tag_prefix = ""
- cfg.parentdir_prefix = get(parser, "parentdir_prefix")
- cfg.verbose = get(parser, "verbose")
- return cfg
-
-
-class NotThisMethod(Exception):
- """Exception raised if a method is not valid for the current scenario."""
-
-
-# these dictionaries contain VCS-specific tools
-LONG_VERSION_PY = {}
-HANDLERS = {}
-
-
-def register_vcs_handler(vcs, method): # decorator
- """Decorator to mark a method as the handler for a particular VCS."""
- def decorate(f):
- """Store f in HANDLERS[vcs][method]."""
- if vcs not in HANDLERS:
- HANDLERS[vcs] = {}
- HANDLERS[vcs][method] = f
- return f
- return decorate
-
-
-def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
- env=None):
- """Call the given command(s)."""
- assert isinstance(commands, list)
- p = None
- for c in commands:
- try:
- dispcmd = str([c] + args)
- # remember shell=False, so use git.cmd on windows, not just git
- p = subprocess.Popen([c] + args, cwd=cwd, env=env,
- stdout=subprocess.PIPE,
- stderr=(subprocess.PIPE if hide_stderr
- else None))
- break
- except EnvironmentError:
- e = sys.exc_info()[1]
- if e.errno == errno.ENOENT:
- continue
- if verbose:
- print("unable to run %s" % dispcmd)
- print(e)
- return None, None
- else:
- if verbose:
- print("unable to find command, tried %s" % (commands,))
- return None, None
- stdout = p.communicate()[0].strip()
- if sys.version_info[0] >= 3:
- stdout = stdout.decode()
- if p.returncode != 0:
- if verbose:
- print("unable to run %s (error)" % dispcmd)
- print("stdout was %s" % stdout)
- return None, p.returncode
- return stdout, p.returncode
-
-
-LONG_VERSION_PY['git'] = '''
-# This file helps to compute a version number in source trees obtained from
-# git-archive tarball (such as those provided by githubs download-from-tag
-# feature). Distribution tarballs (built by setup.py sdist) and build
-# directories (produced by setup.py build) will contain a much shorter file
-# that just contains the computed version number.
-
-# This file is released into the public domain. Generated by
-# versioneer-0.18 (https://github.com/warner/python-versioneer)
-
-"""Git implementation of _version.py."""
-
-import errno
-import os
-import re
-import subprocess
-import sys
-
-
-def get_keywords():
- """Get the keywords needed to look up the version information."""
- # these strings will be replaced by git during git-archive.
- # setup.py/versioneer.py will grep for the variable names, so they must
- # each be defined on a line of their own. _version.py will just call
- # get_keywords().
- git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s"
- git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s"
- git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s"
- keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
- return keywords
-
-
-class VersioneerConfig:
- """Container for Versioneer configuration parameters."""
-
-
-def get_config():
- """Create, populate and return the VersioneerConfig() object."""
- # these strings are filled in when 'setup.py versioneer' creates
- # _version.py
- cfg = VersioneerConfig()
- cfg.VCS = "git"
- cfg.style = "%(STYLE)s"
- cfg.tag_prefix = "%(TAG_PREFIX)s"
- cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s"
- cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s"
- cfg.verbose = False
- return cfg
-
-
-class NotThisMethod(Exception):
- """Exception raised if a method is not valid for the current scenario."""
-
-
-LONG_VERSION_PY = {}
-HANDLERS = {}
-
-
-def register_vcs_handler(vcs, method): # decorator
- """Decorator to mark a method as the handler for a particular VCS."""
- def decorate(f):
- """Store f in HANDLERS[vcs][method]."""
- if vcs not in HANDLERS:
- HANDLERS[vcs] = {}
- HANDLERS[vcs][method] = f
- return f
- return decorate
-
-
-def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
- env=None):
- """Call the given command(s)."""
- assert isinstance(commands, list)
- p = None
- for c in commands:
- try:
- dispcmd = str([c] + args)
- # remember shell=False, so use git.cmd on windows, not just git
- p = subprocess.Popen([c] + args, cwd=cwd, env=env,
- stdout=subprocess.PIPE,
- stderr=(subprocess.PIPE if hide_stderr
- else None))
- break
- except EnvironmentError:
- e = sys.exc_info()[1]
- if e.errno == errno.ENOENT:
- continue
- if verbose:
- print("unable to run %%s" %% dispcmd)
- print(e)
- return None, None
- else:
- if verbose:
- print("unable to find command, tried %%s" %% (commands,))
- return None, None
- stdout = p.communicate()[0].strip()
- if sys.version_info[0] >= 3:
- stdout = stdout.decode()
- if p.returncode != 0:
- if verbose:
- print("unable to run %%s (error)" %% dispcmd)
- print("stdout was %%s" %% stdout)
- return None, p.returncode
- return stdout, p.returncode
-
-
-def versions_from_parentdir(parentdir_prefix, root, verbose):
- """Try to determine the version from the parent directory name.
-
- Source tarballs conventionally unpack into a directory that includes both
- the project name and a version string. We will also support searching up
- two directory levels for an appropriately named parent directory
- """
- rootdirs = []
-
- for i in range(3):
- dirname = os.path.basename(root)
- if dirname.startswith(parentdir_prefix):
- return {"version": dirname[len(parentdir_prefix):],
- "full-revisionid": None,
- "dirty": False, "error": None, "date": None}
- else:
- rootdirs.append(root)
- root = os.path.dirname(root) # up a level
-
- if verbose:
- print("Tried directories %%s but none started with prefix %%s" %%
- (str(rootdirs), parentdir_prefix))
- raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
-
-
-@register_vcs_handler("git", "get_keywords")
-def git_get_keywords(versionfile_abs):
- """Extract version information from the given file."""
- # the code embedded in _version.py can just fetch the value of these
- # keywords. When used from setup.py, we don't want to import _version.py,
- # so we do it with a regexp instead. This function is not used from
- # _version.py.
- keywords = {}
- try:
- f = open(versionfile_abs, "r")
- for line in f.readlines():
- if line.strip().startswith("git_refnames ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["refnames"] = mo.group(1)
- if line.strip().startswith("git_full ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["full"] = mo.group(1)
- if line.strip().startswith("git_date ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["date"] = mo.group(1)
- f.close()
- except EnvironmentError:
- pass
- return keywords
-
-
-@register_vcs_handler("git", "keywords")
-def git_versions_from_keywords(keywords, tag_prefix, verbose):
- """Get version information from git keywords."""
- if not keywords:
- raise NotThisMethod("no keywords at all, weird")
- date = keywords.get("date")
- if date is not None:
- # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant
- # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601
- # -like" string, which we must then edit to make compliant), because
- # it's been around since git-1.5.3, and it's too difficult to
- # discover which version we're using, or to work around using an
- # older one.
- date = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
- refnames = keywords["refnames"].strip()
- if refnames.startswith("$Format"):
- if verbose:
- print("keywords are unexpanded, not using")
- raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
- refs = set([r.strip() for r in refnames.strip("()").split(",")])
- # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
- # just "foo-1.0". If we see a "tag: " prefix, prefer those.
- TAG = "tag: "
- tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)])
- if not tags:
- # Either we're using git < 1.8.3, or there really are no tags. We use
- # a heuristic: assume all version tags have a digit. The old git %%d
- # expansion behaves like git log --decorate=short and strips out the
- # refs/heads/ and refs/tags/ prefixes that would let us distinguish
- # between branches and tags. By ignoring refnames without digits, we
- # filter out many common branch names like "release" and
- # "stabilization", as well as "HEAD" and "master".
- tags = set([r for r in refs if re.search(r'\d', r)])
- if verbose:
- print("discarding '%%s', no digits" %% ",".join(refs - tags))
- if verbose:
- print("likely tags: %%s" %% ",".join(sorted(tags)))
- for ref in sorted(tags):
- # sorting will prefer e.g. "2.0" over "2.0rc1"
- if ref.startswith(tag_prefix):
- r = ref[len(tag_prefix):]
- if verbose:
- print("picking %%s" %% r)
- return {"version": r,
- "full-revisionid": keywords["full"].strip(),
- "dirty": False, "error": None,
- "date": date}
- # no suitable tags, so version is "0+unknown", but full hex is still there
- if verbose:
- print("no suitable tags, using unknown + full revision id")
- return {"version": "0+unknown",
- "full-revisionid": keywords["full"].strip(),
- "dirty": False, "error": "no suitable tags", "date": None}
-
-
-@register_vcs_handler("git", "pieces_from_vcs")
-def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
- """Get version from 'git describe' in the root of the source tree.
-
- This only gets called if the git-archive 'subst' keywords were *not*
- expanded, and _version.py hasn't already been rewritten with a short
- version string, meaning we're inside a checked out source tree.
- """
- GITS = ["git"]
- if sys.platform == "win32":
- GITS = ["git.cmd", "git.exe"]
-
- out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root,
- hide_stderr=True)
- if rc != 0:
- if verbose:
- print("Directory %%s not under git control" %% root)
- raise NotThisMethod("'git rev-parse --git-dir' returned error")
-
- # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
- # if there isn't one, this yields HEX[-dirty] (no NUM)
- describe_out, rc = run_command(GITS, ["describe", "--tags", "--dirty",
- "--always", "--long",
- "--match", "%%s*" %% tag_prefix],
- cwd=root)
- # --long was added in git-1.5.5
- if describe_out is None:
- raise NotThisMethod("'git describe' failed")
- describe_out = describe_out.strip()
- full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
- if full_out is None:
- raise NotThisMethod("'git rev-parse' failed")
- full_out = full_out.strip()
-
- pieces = {}
- pieces["long"] = full_out
- pieces["short"] = full_out[:7] # maybe improved later
- pieces["error"] = None
-
- # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
- # TAG might have hyphens.
- git_describe = describe_out
-
- # look for -dirty suffix
- dirty = git_describe.endswith("-dirty")
- pieces["dirty"] = dirty
- if dirty:
- git_describe = git_describe[:git_describe.rindex("-dirty")]
-
- # now we have TAG-NUM-gHEX or HEX
-
- if "-" in git_describe:
- # TAG-NUM-gHEX
- mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
- if not mo:
- # unparseable. Maybe git-describe is misbehaving?
- pieces["error"] = ("unable to parse git-describe output: '%%s'"
- %% describe_out)
- return pieces
-
- # tag
- full_tag = mo.group(1)
- if not full_tag.startswith(tag_prefix):
- if verbose:
- fmt = "tag '%%s' doesn't start with prefix '%%s'"
- print(fmt %% (full_tag, tag_prefix))
- pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'"
- %% (full_tag, tag_prefix))
- return pieces
- pieces["closest-tag"] = full_tag[len(tag_prefix):]
-
- # distance: number of commits since tag
- pieces["distance"] = int(mo.group(2))
-
- # commit: short hex revision ID
- pieces["short"] = mo.group(3)
-
- else:
- # HEX: no tags
- pieces["closest-tag"] = None
- count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"],
- cwd=root)
- pieces["distance"] = int(count_out) # total number of commits
-
- # commit date: see ISO-8601 comment in git_versions_from_keywords()
- date = run_command(GITS, ["show", "-s", "--format=%%ci", "HEAD"],
- cwd=root)[0].strip()
- pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
-
- return pieces
-
-
-def plus_or_dot(pieces):
- """Return a + if we don't already have one, else return a ."""
- if "+" in pieces.get("closest-tag", ""):
- return "."
- return "+"
-
-
-def render_pep440(pieces):
- """Build up version string, with post-release "local version identifier".
-
- Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
- get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
-
- Exceptions:
- 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += plus_or_dot(pieces)
- rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"])
- if pieces["dirty"]:
- rendered += ".dirty"
- else:
- # exception #1
- rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"],
- pieces["short"])
- if pieces["dirty"]:
- rendered += ".dirty"
- return rendered
-
-
-def render_pep440_pre(pieces):
- """TAG[.post.devDISTANCE] -- No -dirty.
-
- Exceptions:
- 1: no tags. 0.post.devDISTANCE
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"]:
- rendered += ".post.dev%%d" %% pieces["distance"]
- else:
- # exception #1
- rendered = "0.post.dev%%d" %% pieces["distance"]
- return rendered
-
-
-def render_pep440_post(pieces):
- """TAG[.postDISTANCE[.dev0]+gHEX] .
-
- The ".dev0" means dirty. Note that .dev0 sorts backwards
- (a dirty tree will appear "older" than the corresponding clean one),
- but you shouldn't be releasing software with -dirty anyways.
-
- Exceptions:
- 1: no tags. 0.postDISTANCE[.dev0]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += ".post%%d" %% pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- rendered += plus_or_dot(pieces)
- rendered += "g%%s" %% pieces["short"]
- else:
- # exception #1
- rendered = "0.post%%d" %% pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- rendered += "+g%%s" %% pieces["short"]
- return rendered
-
-
-def render_pep440_old(pieces):
- """TAG[.postDISTANCE[.dev0]] .
-
- The ".dev0" means dirty.
-
- Eexceptions:
- 1: no tags. 0.postDISTANCE[.dev0]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += ".post%%d" %% pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- else:
- # exception #1
- rendered = "0.post%%d" %% pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- return rendered
-
-
-def render_git_describe(pieces):
- """TAG[-DISTANCE-gHEX][-dirty].
-
- Like 'git describe --tags --dirty --always'.
-
- Exceptions:
- 1: no tags. HEX[-dirty] (note: no 'g' prefix)
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"]:
- rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"])
- else:
- # exception #1
- rendered = pieces["short"]
- if pieces["dirty"]:
- rendered += "-dirty"
- return rendered
-
-
-def render_git_describe_long(pieces):
- """TAG-DISTANCE-gHEX[-dirty].
-
- Like 'git describe --tags --dirty --always -long'.
- The distance/hash is unconditional.
-
- Exceptions:
- 1: no tags. HEX[-dirty] (note: no 'g' prefix)
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"])
- else:
- # exception #1
- rendered = pieces["short"]
- if pieces["dirty"]:
- rendered += "-dirty"
- return rendered
-
-
-def render(pieces, style):
- """Render the given version pieces into the requested style."""
- if pieces["error"]:
- return {"version": "unknown",
- "full-revisionid": pieces.get("long"),
- "dirty": None,
- "error": pieces["error"],
- "date": None}
-
- if not style or style == "default":
- style = "pep440" # the default
-
- if style == "pep440":
- rendered = render_pep440(pieces)
- elif style == "pep440-pre":
- rendered = render_pep440_pre(pieces)
- elif style == "pep440-post":
- rendered = render_pep440_post(pieces)
- elif style == "pep440-old":
- rendered = render_pep440_old(pieces)
- elif style == "git-describe":
- rendered = render_git_describe(pieces)
- elif style == "git-describe-long":
- rendered = render_git_describe_long(pieces)
- else:
- raise ValueError("unknown style '%%s'" %% style)
-
- return {"version": rendered, "full-revisionid": pieces["long"],
- "dirty": pieces["dirty"], "error": None,
- "date": pieces.get("date")}
-
-
-def get_versions():
- """Get version information or return default if unable to do so."""
- # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
- # __file__, we can work backwards from there to the root. Some
- # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
- # case we can only use expanded keywords.
-
- cfg = get_config()
- verbose = cfg.verbose
-
- try:
- return git_versions_from_keywords(get_keywords(), cfg.tag_prefix,
- verbose)
- except NotThisMethod:
- pass
-
- try:
- root = os.path.realpath(__file__)
- # versionfile_source is the relative path from the top of the source
- # tree (where the .git directory might live) to this file. Invert
- # this to find the root from __file__.
- for i in cfg.versionfile_source.split('/'):
- root = os.path.dirname(root)
- except NameError:
- return {"version": "0+unknown", "full-revisionid": None,
- "dirty": None,
- "error": "unable to find root of source tree",
- "date": None}
-
- try:
- pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
- return render(pieces, cfg.style)
- except NotThisMethod:
- pass
-
- try:
- if cfg.parentdir_prefix:
- return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
- except NotThisMethod:
- pass
-
- return {"version": "0+unknown", "full-revisionid": None,
- "dirty": None,
- "error": "unable to compute version", "date": None}
-'''
-
-
-@register_vcs_handler("git", "get_keywords")
-def git_get_keywords(versionfile_abs):
- """Extract version information from the given file."""
- # the code embedded in _version.py can just fetch the value of these
- # keywords. When used from setup.py, we don't want to import _version.py,
- # so we do it with a regexp instead. This function is not used from
- # _version.py.
- keywords = {}
- try:
- f = open(versionfile_abs, "r")
- for line in f.readlines():
- if line.strip().startswith("git_refnames ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["refnames"] = mo.group(1)
- if line.strip().startswith("git_full ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["full"] = mo.group(1)
- if line.strip().startswith("git_date ="):
- mo = re.search(r'=\s*"(.*)"', line)
- if mo:
- keywords["date"] = mo.group(1)
- f.close()
- except EnvironmentError:
- pass
- return keywords
-
-
-@register_vcs_handler("git", "keywords")
-def git_versions_from_keywords(keywords, tag_prefix, verbose):
- """Get version information from git keywords."""
- if not keywords:
- raise NotThisMethod("no keywords at all, weird")
- date = keywords.get("date")
- if date is not None:
- # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant
- # datestamp. However we prefer "%ci" (which expands to an "ISO-8601
- # -like" string, which we must then edit to make compliant), because
- # it's been around since git-1.5.3, and it's too difficult to
- # discover which version we're using, or to work around using an
- # older one.
- date = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
- refnames = keywords["refnames"].strip()
- if refnames.startswith("$Format"):
- if verbose:
- print("keywords are unexpanded, not using")
- raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
- refs = set([r.strip() for r in refnames.strip("()").split(",")])
- # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
- # just "foo-1.0". If we see a "tag: " prefix, prefer those.
- TAG = "tag: "
- tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)])
- if not tags:
- # Either we're using git < 1.8.3, or there really are no tags. We use
- # a heuristic: assume all version tags have a digit. The old git %d
- # expansion behaves like git log --decorate=short and strips out the
- # refs/heads/ and refs/tags/ prefixes that would let us distinguish
- # between branches and tags. By ignoring refnames without digits, we
- # filter out many common branch names like "release" and
- # "stabilization", as well as "HEAD" and "master".
- tags = set([r for r in refs if re.search(r'\d', r)])
- if verbose:
- print("discarding '%s', no digits" % ",".join(refs - tags))
- if verbose:
- print("likely tags: %s" % ",".join(sorted(tags)))
- for ref in sorted(tags):
- # sorting will prefer e.g. "2.0" over "2.0rc1"
- if ref.startswith(tag_prefix):
- r = ref[len(tag_prefix):]
- if verbose:
- print("picking %s" % r)
- return {"version": r,
- "full-revisionid": keywords["full"].strip(),
- "dirty": False, "error": None,
- "date": date}
- # no suitable tags, so version is "0+unknown", but full hex is still there
- if verbose:
- print("no suitable tags, using unknown + full revision id")
- return {"version": "0+unknown",
- "full-revisionid": keywords["full"].strip(),
- "dirty": False, "error": "no suitable tags", "date": None}
-
-
-@register_vcs_handler("git", "pieces_from_vcs")
-def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
- """Get version from 'git describe' in the root of the source tree.
-
- This only gets called if the git-archive 'subst' keywords were *not*
- expanded, and _version.py hasn't already been rewritten with a short
- version string, meaning we're inside a checked out source tree.
- """
- GITS = ["git"]
- if sys.platform == "win32":
- GITS = ["git.cmd", "git.exe"]
-
- out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root,
- hide_stderr=True)
- if rc != 0:
- if verbose:
- print("Directory %s not under git control" % root)
- raise NotThisMethod("'git rev-parse --git-dir' returned error")
-
- # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
- # if there isn't one, this yields HEX[-dirty] (no NUM)
- describe_out, rc = run_command(GITS, ["describe", "--tags", "--dirty",
- "--always", "--long",
- "--match", "%s*" % tag_prefix],
- cwd=root)
- # --long was added in git-1.5.5
- if describe_out is None:
- raise NotThisMethod("'git describe' failed")
- describe_out = describe_out.strip()
- full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
- if full_out is None:
- raise NotThisMethod("'git rev-parse' failed")
- full_out = full_out.strip()
-
- pieces = {}
- pieces["long"] = full_out
- pieces["short"] = full_out[:7] # maybe improved later
- pieces["error"] = None
-
- # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
- # TAG might have hyphens.
- git_describe = describe_out
-
- # look for -dirty suffix
- dirty = git_describe.endswith("-dirty")
- pieces["dirty"] = dirty
- if dirty:
- git_describe = git_describe[:git_describe.rindex("-dirty")]
-
- # now we have TAG-NUM-gHEX or HEX
-
- if "-" in git_describe:
- # TAG-NUM-gHEX
- mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
- if not mo:
- # unparseable. Maybe git-describe is misbehaving?
- pieces["error"] = ("unable to parse git-describe output: '%s'"
- % describe_out)
- return pieces
-
- # tag
- full_tag = mo.group(1)
- if not full_tag.startswith(tag_prefix):
- if verbose:
- fmt = "tag '%s' doesn't start with prefix '%s'"
- print(fmt % (full_tag, tag_prefix))
- pieces["error"] = ("tag '%s' doesn't start with prefix '%s'"
- % (full_tag, tag_prefix))
- return pieces
- pieces["closest-tag"] = full_tag[len(tag_prefix):]
-
- # distance: number of commits since tag
- pieces["distance"] = int(mo.group(2))
-
- # commit: short hex revision ID
- pieces["short"] = mo.group(3)
-
- else:
- # HEX: no tags
- pieces["closest-tag"] = None
- count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"],
- cwd=root)
- pieces["distance"] = int(count_out) # total number of commits
-
- # commit date: see ISO-8601 comment in git_versions_from_keywords()
- date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"],
- cwd=root)[0].strip()
- pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
-
- return pieces
-
-
-def do_vcs_install(manifest_in, versionfile_source, ipy):
- """Git-specific installation logic for Versioneer.
-
- For Git, this means creating/changing .gitattributes to mark _version.py
- for export-subst keyword substitution.
- """
- GITS = ["git"]
- if sys.platform == "win32":
- GITS = ["git.cmd", "git.exe"]
- files = [manifest_in, versionfile_source]
- if ipy:
- files.append(ipy)
- try:
- me = __file__
- if me.endswith(".pyc") or me.endswith(".pyo"):
- me = os.path.splitext(me)[0] + ".py"
- versioneer_file = os.path.relpath(me)
- except NameError:
- versioneer_file = "versioneer.py"
- files.append(versioneer_file)
- present = False
- try:
- f = open(".gitattributes", "r")
- for line in f.readlines():
- if line.strip().startswith(versionfile_source):
- if "export-subst" in line.strip().split()[1:]:
- present = True
- f.close()
- except EnvironmentError:
- pass
- if not present:
- f = open(".gitattributes", "a+")
- f.write("%s export-subst\n" % versionfile_source)
- f.close()
- files.append(".gitattributes")
- run_command(GITS, ["add", "--"] + files)
-
-
-def versions_from_parentdir(parentdir_prefix, root, verbose):
- """Try to determine the version from the parent directory name.
-
- Source tarballs conventionally unpack into a directory that includes both
- the project name and a version string. We will also support searching up
- two directory levels for an appropriately named parent directory
- """
- rootdirs = []
-
- for i in range(3):
- dirname = os.path.basename(root)
- if dirname.startswith(parentdir_prefix):
- return {"version": dirname[len(parentdir_prefix):],
- "full-revisionid": None,
- "dirty": False, "error": None, "date": None}
- else:
- rootdirs.append(root)
- root = os.path.dirname(root) # up a level
-
- if verbose:
- print("Tried directories %s but none started with prefix %s" %
- (str(rootdirs), parentdir_prefix))
- raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
-
-
-SHORT_VERSION_PY = """
-# This file was generated by 'versioneer.py' (0.18) from
-# revision-control system data, or from the parent directory name of an
-# unpacked source archive. Distribution tarballs contain a pre-generated copy
-# of this file.
-
-import json
-
-version_json = '''
-%s
-''' # END VERSION_JSON
-
-
-def get_versions():
- return json.loads(version_json)
-"""
-
-
-def versions_from_file(filename):
- """Try to determine the version from _version.py if present."""
- try:
- with open(filename) as f:
- contents = f.read()
- except EnvironmentError:
- raise NotThisMethod("unable to read _version.py")
- mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON",
- contents, re.M | re.S)
- if not mo:
- mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON",
- contents, re.M | re.S)
- if not mo:
- raise NotThisMethod("no version_json in _version.py")
- return json.loads(mo.group(1))
-
-
-def write_to_version_file(filename, versions):
- """Write the given version number to the given _version.py file."""
- os.unlink(filename)
- contents = json.dumps(versions, sort_keys=True,
- indent=1, separators=(",", ": "))
- with open(filename, "w") as f:
- f.write(SHORT_VERSION_PY % contents)
-
- print("set %s to '%s'" % (filename, versions["version"]))
-
-
-def plus_or_dot(pieces):
- """Return a + if we don't already have one, else return a ."""
- if "+" in pieces.get("closest-tag", ""):
- return "."
- return "+"
-
-
-def render_pep440(pieces):
- """Build up version string, with post-release "local version identifier".
-
- Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
- get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
-
- Exceptions:
- 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += plus_or_dot(pieces)
- rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
- if pieces["dirty"]:
- rendered += ".dirty"
- else:
- # exception #1
- rendered = "0+untagged.%d.g%s" % (pieces["distance"],
- pieces["short"])
- if pieces["dirty"]:
- rendered += ".dirty"
- return rendered
-
-
-def render_pep440_pre(pieces):
- """TAG[.post.devDISTANCE] -- No -dirty.
-
- Exceptions:
- 1: no tags. 0.post.devDISTANCE
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"]:
- rendered += ".post.dev%d" % pieces["distance"]
- else:
- # exception #1
- rendered = "0.post.dev%d" % pieces["distance"]
- return rendered
-
-
-def render_pep440_post(pieces):
- """TAG[.postDISTANCE[.dev0]+gHEX] .
-
- The ".dev0" means dirty. Note that .dev0 sorts backwards
- (a dirty tree will appear "older" than the corresponding clean one),
- but you shouldn't be releasing software with -dirty anyways.
-
- Exceptions:
- 1: no tags. 0.postDISTANCE[.dev0]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += ".post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- rendered += plus_or_dot(pieces)
- rendered += "g%s" % pieces["short"]
- else:
- # exception #1
- rendered = "0.post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- rendered += "+g%s" % pieces["short"]
- return rendered
-
-
-def render_pep440_old(pieces):
- """TAG[.postDISTANCE[.dev0]] .
-
- The ".dev0" means dirty.
-
- Eexceptions:
- 1: no tags. 0.postDISTANCE[.dev0]
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"] or pieces["dirty"]:
- rendered += ".post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- else:
- # exception #1
- rendered = "0.post%d" % pieces["distance"]
- if pieces["dirty"]:
- rendered += ".dev0"
- return rendered
-
-
-def render_git_describe(pieces):
- """TAG[-DISTANCE-gHEX][-dirty].
-
- Like 'git describe --tags --dirty --always'.
-
- Exceptions:
- 1: no tags. HEX[-dirty] (note: no 'g' prefix)
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- if pieces["distance"]:
- rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
- else:
- # exception #1
- rendered = pieces["short"]
- if pieces["dirty"]:
- rendered += "-dirty"
- return rendered
-
-
-def render_git_describe_long(pieces):
- """TAG-DISTANCE-gHEX[-dirty].
-
- Like 'git describe --tags --dirty --always -long'.
- The distance/hash is unconditional.
-
- Exceptions:
- 1: no tags. HEX[-dirty] (note: no 'g' prefix)
- """
- if pieces["closest-tag"]:
- rendered = pieces["closest-tag"]
- rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
- else:
- # exception #1
- rendered = pieces["short"]
- if pieces["dirty"]:
- rendered += "-dirty"
- return rendered
-
-
-def render(pieces, style):
- """Render the given version pieces into the requested style."""
- if pieces["error"]:
- return {"version": "unknown",
- "full-revisionid": pieces.get("long"),
- "dirty": None,
- "error": pieces["error"],
- "date": None}
-
- if not style or style == "default":
- style = "pep440" # the default
-
- if style == "pep440":
- rendered = render_pep440(pieces)
- elif style == "pep440-pre":
- rendered = render_pep440_pre(pieces)
- elif style == "pep440-post":
- rendered = render_pep440_post(pieces)
- elif style == "pep440-old":
- rendered = render_pep440_old(pieces)
- elif style == "git-describe":
- rendered = render_git_describe(pieces)
- elif style == "git-describe-long":
- rendered = render_git_describe_long(pieces)
- else:
- raise ValueError("unknown style '%s'" % style)
-
- return {"version": rendered, "full-revisionid": pieces["long"],
- "dirty": pieces["dirty"], "error": None,
- "date": pieces.get("date")}
-
-
-class VersioneerBadRootError(Exception):
- """The project root directory is unknown or missing key files."""
-
-
-def get_versions(verbose=False):
- """Get the project version from whatever source is available.
-
- Returns dict with two keys: 'version' and 'full'.
- """
- if "versioneer" in sys.modules:
- # see the discussion in cmdclass.py:get_cmdclass()
- del sys.modules["versioneer"]
-
- root = get_root()
- cfg = get_config_from_root(root)
-
- assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg"
- handlers = HANDLERS.get(cfg.VCS)
- assert handlers, "unrecognized VCS '%s'" % cfg.VCS
- verbose = verbose or cfg.verbose
- assert cfg.versionfile_source is not None, \
- "please set versioneer.versionfile_source"
- assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix"
-
- versionfile_abs = os.path.join(root, cfg.versionfile_source)
-
- # extract version from first of: _version.py, VCS command (e.g. 'git
- # describe'), parentdir. This is meant to work for developers using a
- # source checkout, for users of a tarball created by 'setup.py sdist',
- # and for users of a tarball/zipball created by 'git archive' or github's
- # download-from-tag feature or the equivalent in other VCSes.
-
- get_keywords_f = handlers.get("get_keywords")
- from_keywords_f = handlers.get("keywords")
- if get_keywords_f and from_keywords_f:
- try:
- keywords = get_keywords_f(versionfile_abs)
- ver = from_keywords_f(keywords, cfg.tag_prefix, verbose)
- if verbose:
- print("got version from expanded keyword %s" % ver)
- return ver
- except NotThisMethod:
- pass
-
- try:
- ver = versions_from_file(versionfile_abs)
- if verbose:
- print("got version from file %s %s" % (versionfile_abs, ver))
- return ver
- except NotThisMethod:
- pass
-
- from_vcs_f = handlers.get("pieces_from_vcs")
- if from_vcs_f:
- try:
- pieces = from_vcs_f(cfg.tag_prefix, root, verbose)
- ver = render(pieces, cfg.style)
- if verbose:
- print("got version from VCS %s" % ver)
- return ver
- except NotThisMethod:
- pass
-
- try:
- if cfg.parentdir_prefix:
- ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
- if verbose:
- print("got version from parentdir %s" % ver)
- return ver
- except NotThisMethod:
- pass
-
- if verbose:
- print("unable to compute version")
-
- return {"version": "0+unknown", "full-revisionid": None,
- "dirty": None, "error": "unable to compute version",
- "date": None}
-
-
-def get_version():
- """Get the short version string for this project."""
- return get_versions()["version"]
-
-
-def get_cmdclass():
- """Get the custom setuptools/distutils subclasses used by Versioneer."""
- if "versioneer" in sys.modules:
- del sys.modules["versioneer"]
- # this fixes the "python setup.py develop" case (also 'install' and
- # 'easy_install .'), in which subdependencies of the main project are
- # built (using setup.py bdist_egg) in the same python process. Assume
- # a main project A and a dependency B, which use different versions
- # of Versioneer. A's setup.py imports A's Versioneer, leaving it in
- # sys.modules by the time B's setup.py is executed, causing B to run
- # with the wrong versioneer. Setuptools wraps the sub-dep builds in a
- # sandbox that restores sys.modules to it's pre-build state, so the
- # parent is protected against the child's "import versioneer". By
- # removing ourselves from sys.modules here, before the child build
- # happens, we protect the child from the parent's versioneer too.
- # Also see https://github.com/warner/python-versioneer/issues/52
-
- cmds = {}
-
- # we add "version" to both distutils and setuptools
- from distutils.core import Command
-
- class cmd_version(Command):
- description = "report generated version string"
- user_options = []
- boolean_options = []
-
- def initialize_options(self):
- pass
-
- def finalize_options(self):
- pass
-
- def run(self):
- vers = get_versions(verbose=True)
- print("Version: %s" % vers["version"])
- print(" full-revisionid: %s" % vers.get("full-revisionid"))
- print(" dirty: %s" % vers.get("dirty"))
- print(" date: %s" % vers.get("date"))
- if vers["error"]:
- print(" error: %s" % vers["error"])
- cmds["version"] = cmd_version
-
- # we override "build_py" in both distutils and setuptools
- #
- # most invocation pathways end up running build_py:
- # distutils/build -> build_py
- # distutils/install -> distutils/build ->..
- # setuptools/bdist_wheel -> distutils/install ->..
- # setuptools/bdist_egg -> distutils/install_lib -> build_py
- # setuptools/install -> bdist_egg ->..
- # setuptools/develop -> ?
- # pip install:
- # copies source tree to a tempdir before running egg_info/etc
- # if .git isn't copied too, 'git describe' will fail
- # then does setup.py bdist_wheel, or sometimes setup.py install
- # setup.py egg_info -> ?
-
- # we override different "build_py" commands for both environments
- if "setuptools" in sys.modules:
- from setuptools.command.build_py import build_py as _build_py
- else:
- from distutils.command.build_py import build_py as _build_py
-
- class cmd_build_py(_build_py):
- def run(self):
- root = get_root()
- cfg = get_config_from_root(root)
- versions = get_versions()
- _build_py.run(self)
- # now locate _version.py in the new build/ directory and replace
- # it with an updated value
- if cfg.versionfile_build:
- target_versionfile = os.path.join(self.build_lib,
- cfg.versionfile_build)
- print("UPDATING %s" % target_versionfile)
- write_to_version_file(target_versionfile, versions)
- cmds["build_py"] = cmd_build_py
-
- if "cx_Freeze" in sys.modules: # cx_freeze enabled?
- from cx_Freeze.dist import build_exe as _build_exe
- # nczeczulin reports that py2exe won't like the pep440-style string
- # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g.
- # setup(console=[{
- # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION
- # "product_version": versioneer.get_version(),
- # ...
-
- class cmd_build_exe(_build_exe):
- def run(self):
- root = get_root()
- cfg = get_config_from_root(root)
- versions = get_versions()
- target_versionfile = cfg.versionfile_source
- print("UPDATING %s" % target_versionfile)
- write_to_version_file(target_versionfile, versions)
-
- _build_exe.run(self)
- os.unlink(target_versionfile)
- with open(cfg.versionfile_source, "w") as f:
- LONG = LONG_VERSION_PY[cfg.VCS]
- f.write(LONG %
- {"DOLLAR": "$",
- "STYLE": cfg.style,
- "TAG_PREFIX": cfg.tag_prefix,
- "PARENTDIR_PREFIX": cfg.parentdir_prefix,
- "VERSIONFILE_SOURCE": cfg.versionfile_source,
- })
- cmds["build_exe"] = cmd_build_exe
- del cmds["build_py"]
-
- if 'py2exe' in sys.modules: # py2exe enabled?
- try:
- from py2exe.distutils_buildexe import py2exe as _py2exe # py3
- except ImportError:
- from py2exe.build_exe import py2exe as _py2exe # py2
-
- class cmd_py2exe(_py2exe):
- def run(self):
- root = get_root()
- cfg = get_config_from_root(root)
- versions = get_versions()
- target_versionfile = cfg.versionfile_source
- print("UPDATING %s" % target_versionfile)
- write_to_version_file(target_versionfile, versions)
-
- _py2exe.run(self)
- os.unlink(target_versionfile)
- with open(cfg.versionfile_source, "w") as f:
- LONG = LONG_VERSION_PY[cfg.VCS]
- f.write(LONG %
- {"DOLLAR": "$",
- "STYLE": cfg.style,
- "TAG_PREFIX": cfg.tag_prefix,
- "PARENTDIR_PREFIX": cfg.parentdir_prefix,
- "VERSIONFILE_SOURCE": cfg.versionfile_source,
- })
- cmds["py2exe"] = cmd_py2exe
-
- # we override different "sdist" commands for both environments
- if "setuptools" in sys.modules:
- from setuptools.command.sdist import sdist as _sdist
- else:
- from distutils.command.sdist import sdist as _sdist
-
- class cmd_sdist(_sdist):
- def run(self):
- versions = get_versions()
- self._versioneer_generated_versions = versions
- # unless we update this, the command will keep using the old
- # version
- self.distribution.metadata.version = versions["version"]
- return _sdist.run(self)
-
- def make_release_tree(self, base_dir, files):
- root = get_root()
- cfg = get_config_from_root(root)
- _sdist.make_release_tree(self, base_dir, files)
- # now locate _version.py in the new base_dir directory
- # (remembering that it may be a hardlink) and replace it with an
- # updated value
- target_versionfile = os.path.join(base_dir, cfg.versionfile_source)
- print("UPDATING %s" % target_versionfile)
- write_to_version_file(target_versionfile,
- self._versioneer_generated_versions)
- cmds["sdist"] = cmd_sdist
-
- return cmds
-
-
-CONFIG_ERROR = """
-setup.cfg is missing the necessary Versioneer configuration. You need
-a section like:
-
- [versioneer]
- VCS = git
- style = pep440
- versionfile_source = src/myproject/_version.py
- versionfile_build = myproject/_version.py
- tag_prefix =
- parentdir_prefix = myproject-
-
-You will also need to edit your setup.py to use the results:
-
- import versioneer
- setup(version=versioneer.get_version(),
- cmdclass=versioneer.get_cmdclass(), ...)
-
-Please read the docstring in ./versioneer.py for configuration instructions,
-edit setup.cfg, and re-run the installer or 'python versioneer.py setup'.
-"""
-
-SAMPLE_CONFIG = """
-# See the docstring in versioneer.py for instructions. Note that you must
-# re-run 'versioneer.py setup' after changing this section, and commit the
-# resulting files.
-
-[versioneer]
-#VCS = git
-#style = pep440
-#versionfile_source =
-#versionfile_build =
-#tag_prefix =
-#parentdir_prefix =
-
-"""
-
-INIT_PY_SNIPPET = """
-from ._version import get_versions
-__version__ = get_versions()['version']
-del get_versions
-"""
-
-
-def do_setup():
- """Main VCS-independent setup function for installing Versioneer."""
- root = get_root()
- try:
- cfg = get_config_from_root(root)
- except (EnvironmentError, configparser.NoSectionError,
- configparser.NoOptionError) as e:
- if isinstance(e, (EnvironmentError, configparser.NoSectionError)):
- print("Adding sample versioneer config to setup.cfg",
- file=sys.stderr)
- with open(os.path.join(root, "setup.cfg"), "a") as f:
- f.write(SAMPLE_CONFIG)
- print(CONFIG_ERROR, file=sys.stderr)
- return 1
-
- print(" creating %s" % cfg.versionfile_source)
- with open(cfg.versionfile_source, "w") as f:
- LONG = LONG_VERSION_PY[cfg.VCS]
- f.write(LONG % {"DOLLAR": "$",
- "STYLE": cfg.style,
- "TAG_PREFIX": cfg.tag_prefix,
- "PARENTDIR_PREFIX": cfg.parentdir_prefix,
- "VERSIONFILE_SOURCE": cfg.versionfile_source,
- })
-
- ipy = os.path.join(os.path.dirname(cfg.versionfile_source),
- "__init__.py")
- if os.path.exists(ipy):
- try:
- with open(ipy, "r") as f:
- old = f.read()
- except EnvironmentError:
- old = ""
- if INIT_PY_SNIPPET not in old:
- print(" appending to %s" % ipy)
- with open(ipy, "a") as f:
- f.write(INIT_PY_SNIPPET)
- else:
- print(" %s unmodified" % ipy)
- else:
- print(" %s doesn't exist, ok" % ipy)
- ipy = None
-
- # Make sure both the top-level "versioneer.py" and versionfile_source
- # (PKG/_version.py, used by runtime code) are in MANIFEST.in, so
- # they'll be copied into source distributions. Pip won't be able to
- # install the package without this.
- manifest_in = os.path.join(root, "MANIFEST.in")
- simple_includes = set()
- try:
- with open(manifest_in, "r") as f:
- for line in f:
- if line.startswith("include "):
- for include in line.split()[1:]:
- simple_includes.add(include)
- except EnvironmentError:
- pass
- # That doesn't cover everything MANIFEST.in can do
- # (http://docs.python.org/2/distutils/sourcedist.html#commands), so
- # it might give some false negatives. Appending redundant 'include'
- # lines is safe, though.
- if "versioneer.py" not in simple_includes:
- print(" appending 'versioneer.py' to MANIFEST.in")
- with open(manifest_in, "a") as f:
- f.write("include versioneer.py\n")
- else:
- print(" 'versioneer.py' already in MANIFEST.in")
- if cfg.versionfile_source not in simple_includes:
- print(" appending versionfile_source ('%s') to MANIFEST.in" %
- cfg.versionfile_source)
- with open(manifest_in, "a") as f:
- f.write("include %s\n" % cfg.versionfile_source)
- else:
- print(" versionfile_source already in MANIFEST.in")
-
- # Make VCS-specific changes. For git, this means creating/changing
- # .gitattributes to mark _version.py for export-subst keyword
- # substitution.
- do_vcs_install(manifest_in, cfg.versionfile_source, ipy)
- return 0
-
-
-def scan_setup_py():
- """Validate the contents of setup.py against Versioneer's expectations."""
- found = set()
- setters = False
- errors = 0
- with open("setup.py", "r") as f:
- for line in f.readlines():
- if "import versioneer" in line:
- found.add("import")
- if "versioneer.get_cmdclass()" in line:
- found.add("cmdclass")
- if "versioneer.get_version()" in line:
- found.add("get_version")
- if "versioneer.VCS" in line:
- setters = True
- if "versioneer.versionfile_source" in line:
- setters = True
- if len(found) != 3:
- print("")
- print("Your setup.py appears to be missing some important items")
- print("(but I might be wrong). Please make sure it has something")
- print("roughly like the following:")
- print("")
- print(" import versioneer")
- print(" setup( version=versioneer.get_version(),")
- print(" cmdclass=versioneer.get_cmdclass(), ...)")
- print("")
- errors += 1
- if setters:
- print("You should remove lines like 'versioneer.VCS = ' and")
- print("'versioneer.versionfile_source = ' . This configuration")
- print("now lives in setup.cfg, and should be removed from setup.py")
- print("")
- errors += 1
- return errors
-
-
-if __name__ == "__main__":
- cmd = sys.argv[1]
- if cmd == "setup":
- errors = do_setup()
- errors += scan_setup_py()
- if errors:
- sys.exit(1)