From 3f16b18db2ee4d850f9fe4fae01d9320e5c5038d Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Tue, 22 Sep 2020 20:16:59 -0400 Subject: [PATCH 1/7] Updated to the new system classes. --- psi4_step/psi4.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/psi4_step/psi4.py b/psi4_step/psi4.py index dbca641..116d965 100644 --- a/psi4_step/psi4.py +++ b/psi4_step/psi4.py @@ -13,7 +13,6 @@ import psi4_step import seamm -from seamm import data # noqa: F401 from seamm_util import ureg, Q_ # noqa: F401 import seamm_util.printing as printing from seamm_util.printing import FormattedText as __ @@ -298,7 +297,9 @@ def run(self): printer.important(self.header) printer.important('') - if data.structure is None: + system = self.get_variable('_system') + n_atoms = system.n_atoms() + if n_atoms == 0: logger.error('Psi4 run(): there is no structure!') raise RuntimeError('Psi4 run(): there is no structure!') @@ -483,13 +484,18 @@ def analyze(self, indent='', **kwargs): with structure_file.open(mode='r') as fd: structure = json.load(fd) if 'geom' in structure: - system = seamm.data.structure - atoms = system['atoms'] - xyz = [] + system = self.get_variable('_system') + xs = [] + ys = [] + zs = [] it = iter(structure['geom']) for x in it: - xyz.append([x, next(it), next(it)]) - atoms['coordinates'] = xyz + xs.append(x) + ys.append(next(it)) + zs.append(next(it)) + system.atoms['x'][0:] = xs + system.atoms['y'][0:] = ys + system.atoms['z'][0:] = zs printer.important( self.indent + ' Updated the system with the structure from Psi4', @@ -499,7 +505,7 @@ def analyze(self, indent='', **kwargs): def _convert_structure(self, name=None): """Convert the structure to the input for Psi4.""" - system = seamm.data.structure + system = self.get_variable('_system') structure = [] if name is None: @@ -537,11 +543,11 @@ def _convert_structure(self, name=None): if 'net_charge' in extras and extras['net_charge'] is not None: structure.append(f" {extras['net_charge']} 1") - elements = system['atoms']['elements'] - coordinates = system['atoms']['coordinates'] + elements = system.atoms.symbols() + coordinates = system.atoms.coordinates() - if 'freeze' in system['atoms']: - freeze = system['atoms']['freeze'] + if 'freeze' in system.atoms: + freeze = system.atoms['freeze'] else: freeze = [''] * len(elements) From 8b47de6bbd536297e104d791e9ec74731cc75706 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 25 Sep 2020 09:28:12 -0400 Subject: [PATCH 2/7] Added napoleon and fixed pep-8 issues --- docs/conf.py | 94 +++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index bb14eef..555447d 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # 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. -#sys.path.insert(0, os.path.abspath('.')) +# sys.path.insert(0, os.path.abspath('.')) # Get the project root dir, which is the parent dir of this cwd = os.getcwd() @@ -31,16 +31,18 @@ # version is used. sys.path.insert(0, project_root) -import psi4_step +import psi4_step # noqa: E402 # -- General configuration --------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# 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.viewcode'] +extensions = [ + 'sphinx.ext.napoleon', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode' +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -49,7 +51,7 @@ source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' @@ -69,13 +71,13 @@ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to # some non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -83,28 +85,28 @@ # The reST default role (used for this markup: `text`) to use for all # documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built # documents. -#keep_warnings = False +# keep_warnings = False # -- Options for HTML output ------------------------------------------- @@ -116,27 +118,27 @@ # 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 = {} +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as # html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the # top of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (within the static path) to use as favicon # of the docs. This file should be a Windows icon file (.ico) being # 16x16 or 32x32 pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) # here, relative to this directory. They are copied after the builtin @@ -146,46 +148,46 @@ # If not '', a 'Last updated on:' timestamp is inserted at every page # bottom, using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names # to template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. # Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. # Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages # will contain a tag referring to it. The value of this option # must be the base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'psi4_stepdoc' @@ -195,13 +197,13 @@ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). - #'papersize': 'letterpaper', + # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). - #'pointsize': '10pt', + # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. - #'preamble': '', + # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples @@ -215,23 +217,23 @@ # The name of an image file (relative to this directory) to place at # the top of the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings # are parts, not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output ------------------------------------ @@ -245,7 +247,7 @@ ] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ---------------------------------------- @@ -263,13 +265,13 @@ ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False +# texinfo_no_detailmenu = False From 93f86213a0e13222b74a80ce4a046a634c75f6c6 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 25 Sep 2020 09:28:36 -0400 Subject: [PATCH 3/7] Updating to python 3.7 and 3.8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 268d159..31420b3 100644 --- a/setup.py +++ b/setup.py @@ -74,8 +74,8 @@ 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], entry_points={ 'org.molssi.seamm': [ From 9d872c1ba3605485f75bd1bacaf804bfb8ca32cd Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 25 Sep 2020 09:29:23 -0400 Subject: [PATCH 4/7] Added control over freezing core orbitals. --- psi4_step/energy_parameters.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/psi4_step/energy_parameters.py b/psi4_step/energy_parameters.py index ec10029..a660e95 100644 --- a/psi4_step/energy_parameters.py +++ b/psi4_step/energy_parameters.py @@ -90,6 +90,18 @@ class EnergyParameters(seamm.Parameters): "(UHF, UKS)" ) }, + "freeze-cores": { + "default": "yes", + "kind": "enumeration", + "default_units": "", + "enumeration": ('yes', 'no'), + "format_string": "s", + "description": "Freeze core orbitals:", + "help_text": ( + "Whether to freeze the core orbitals in correlated " + "methods" + ) + }, "results": { "default": {}, "kind": "dictionary", From d9e513b9c1413d353975e0f9db70532df42dffef Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 25 Sep 2020 09:29:45 -0400 Subject: [PATCH 5/7] Added control over freezing core orbitals. --- psi4_step/psi4_metadata.py | 282 ++++++++++++++++++++++++------------- 1 file changed, 188 insertions(+), 94 deletions(-) diff --git a/psi4_step/psi4_metadata.py b/psi4_step/psi4_metadata.py index a06d63b..339681c 100644 --- a/psi4_step/psi4_metadata.py +++ b/psi4_step/psi4_metadata.py @@ -39,565 +39,659 @@ 'method': 'mp2', 'calculation': ['energy', 'gradients'], 'level': 'normal', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, '3rd-order Møller–Plesset perturbation theory (MP3)': { 'method': 'mp3', 'calculation': ['energy', 'gradients'], 'level': 'normal', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'MP3 with frozen natural orbitals': { 'method': 'fno-mp3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'average of MP2 and MP3': { 'method': 'mp2.5', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, '4th-order MP perturbation theory (MP4) less triples': { 'method': 'mp4(sdq)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'MP4 (less triples) with frozen natural orbitals': { 'method': 'fno-mp4(sdq)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'full MP4': { 'method': 'mp4', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'full MP4 with frozen natural orbitals': { 'method': 'fno-mp4', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'nth-order Møller–Plesset (MP) perturbation theory': { 'method': 'mpn', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'nth-order z-averaged perturbation theory (ZAPT)': { 'method': 'zaptn', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'orbital-optimized second-order MP perturbation theory': { 'method': 'omp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'spin-component scaled OMP2': { 'method': 'scs-omp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'a special version of SCS-OMP2 for nucleobase interactions': { 'method': 'scs(n)-omp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'a special version of SCS-OMP2 (from ethene dimers)': { 'method': 'scs-omp2-vdw', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'spin-opposite scaled OMP2': { 'method': 'sos-omp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'A special version of SOS-OMP2 for pi systems': { 'method': 'sos-pi-omp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'orbital-optimized third-order MP perturbation theory': { 'method': 'omp3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'spin-component scaled OMP3': { 'method': 'scs-omp3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'a special version of SCS-OMP3 for nucleobase interactions': { 'method': 'scs(n)-omp3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'a special version of SCS-OMP3 (from ethene dimers)': { 'method': 'scs-omp3-vdw', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'spin-opposite scaled OMP3': { 'method': 'sos-omp3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'A special version of SOS-OMP3 for pi systems': { 'method': 'sos-pi-omp3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'orbital-optimized MP2.5': { 'method': 'omp2.5', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'coupled electron pair approximation variant 0': { 'method': 'cepa(0)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CEPA(0) with frozen natural orbitals': { 'method': 'fno-cepa(0)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'coupled electron pair approximation variant 1': { 'method': 'cepa(1)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CEPA(1) with frozen natural orbitals': { 'method': 'fno-cepa(1)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'coupled electron pair approximation variant 3': { 'method': 'cepa(3)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CEPA(3) with frozen natural orbitals': { 'method': 'fno-cepa(3)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'averaged coupled-pair functional': { 'method': 'acpf', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'ACPF with frozen natural orbitals': { 'method': 'fno-acpf', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'averaged quadratic coupled cluster': { 'method': 'aqcc', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'AQCC with frozen natural orbitals': { 'method': 'fno-aqcc', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'quadratic CI singles doubles (QCISD)': { 'method': 'qcisd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'QCISD with frozen natural orbitals': { 'method': 'fno-qcisd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'Linear CCD': { 'method': 'lccd', 'calculation': ['energy', 'gradients'], 'level': 'normal', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'LCCD with frozen natural orbitals': { 'method': 'fno-lccd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'orbital optimized LCCD': { 'method': 'olccd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'approximate coupled cluster singles and doubles (CC2)': { 'method': 'cc2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'coupled cluster doubles (CCD)': { 'method': 'ccd', 'calculation': ['energy', 'gradients'], 'level': 'normal', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'coupled cluster singles and doubles (CCSD)': { 'method': 'ccsd', 'calculation': ['energy', 'gradients'], 'level': 'normal', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'Brueckner coupled cluster doubles (BCCD)': { 'method': 'bccd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CCSD with frozen natural orbitals': { 'method': 'fno-ccsd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'QCISD with perturbative triples': { 'method': 'qcisd(t)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'QCISD(T) with frozen natural orbitals': { 'method': 'fno-qcisd(t)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CCSD with perturbative triples (CCSD(T))': { 'method': 'ccsd(t)', 'calculation': ['energy', 'gradients'], 'level': 'normal', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'CCSD with asymmetric perturbative triples (CCSD(AT))': { 'method': 'ccsd(at)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'BCCD with perturbative triples': { 'method': 'bccd(t)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CCSD(T) with frozen natural orbitals': { 'method': 'fno-ccsd(t)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'approximate CC singles, doubles, and triples (CC3)': { 'method': 'cc3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'expert full control over ccenergy module': { 'method': 'ccenergy', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'expert full control over dfocc module': { 'method': 'dfocc', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'configuration interaction (CI) singles and doubles (CISD)': { 'method': 'cisd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CISD with frozen natural orbitals': { 'method': 'fno-cisd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CI singles, doubles, and triples (CISDT)': { 'method': 'cisdt', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'CI singles, doubles, triples, and quadruples (CISDTQ)': { 'method': 'cisdtq', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'nth-order CI': { 'method': 'cin', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'full configuration interaction (FCI)': { 'method': 'fci', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'expert full control over detci module': { 'method': 'detci', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'complete active space self consistent field (CASSCF)': { 'method': 'casscf', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': False }, 'restricted active space self consistent field (RASSCF)': { 'method': 'rasscf', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': False }, 'multiconfigurational self consistent field (SCF)': { 'method': 'mcscf', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': False }, 'Mukherjee multireference coupled cluster (Mk-MRCC)': { 'method': 'psimrcc', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': False }, 'density matrix renormalization group SCF': { 'method': 'dmrg-scf', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': False }, 'density matrix renormalization group CASPT2': { 'method': 'dmrg-caspt2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'density matrix renormalization group CI': { 'method': 'dmrg-ci', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, '0th-order symmetry adapted perturbation theory (SAPT)': { 'method': 'sapt0', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, '0th-order SAPT with special exchange scaling': { 'method': 'ssapt0', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, '0th-order functional and/or intramolecular SAPT': { 'method': 'fisapt0', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, '2nd-order SAPT, traditional definition': { 'method': 'sapt2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT including all 2nd-order terms': { 'method': 'sapt2+', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT including perturbative triples': { 'method': 'sapt2+(3)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT including all 3rd-order terms': { 'method': 'sapt2+3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+ with CC-based dispersion': { 'method': 'sapt2+(ccd)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+(3) with CC-based dispersion': { 'method': 'sapt2+(3)(ccd)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+3 with CC-based dispersion': { 'method': 'sapt2+3(ccd)', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT including all 2nd-order terms and MP2 correction': { 'method': 'sapt2+dmp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT including perturbative triples and MP2 correction': { 'method': 'sapt2+(3)dmp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT including all 3rd-order terms and MP2 correction': { 'method': 'sapt2+3dmp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+ with CC-based dispersion and MP2 correction': { 'method': 'sapt2+(ccd)dmp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+(3) with CC-based dispersion and MP2 correction': { 'method': 'sapt2+(3)(ccd)dmp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+3 with CC-based dispersion and MP2 correction': { 'method': 'sapt2+3(ccd)dmp2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, '0th-order SAPT plus charge transfer (CT) calculation': { 'method': 'sapt0-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2 plus CT': { 'method': 'sapt2-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+ plus CT': { 'method': 'sapt2+-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+(3) plus CT': { 'method': 'sapt2+(3)-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+3 plus CT': { 'method': 'sapt2+3-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+(CCD) plus CT': { 'method': 'sapt2+(ccd)-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+(3)(CCD) plus CT': { 'method': 'sapt2+(3)(ccd)-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'SAPT2+3(CCD) plus CT': { 'method': 'sapt2+3(ccd)-ct', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, '2nd-order algebraic diagrammatic construction (ADC)': { 'method': 'adc', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'EOM-CC2': { 'method': 'eom-cc2', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True }, 'equation of motion (EOM) CCSD': { 'method': 'eom-ccsd', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'analytic' + 'gradients': 'analytic', + 'freeze core?': True }, 'EOM-CC3': { 'method': 'eom-cc3', 'calculation': ['energy', 'gradients'], 'level': 'expert', - 'gradients': 'finite-difference' + 'gradients': 'finite-difference', + 'freeze core?': True } } # yapf: disable From ffea4840835ca3f3ea4cf4fd0761beecd252ee60 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 25 Sep 2020 09:30:01 -0400 Subject: [PATCH 6/7] Added control over freezing core orbitals. --- psi4_step/tk_energy.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/psi4_step/tk_energy.py b/psi4_step/tk_energy.py index 4af0e68..f7a0044 100644 --- a/psi4_step/tk_energy.py +++ b/psi4_step/tk_energy.py @@ -165,11 +165,15 @@ def reset_calculation(self, widget=None): level = self['level'].get() if level == 'recommended': - method = psi4_step.methods[self['method'].get()]['method'] + long_method = self['method'].get() + method = psi4_step.methods[long_method]['method'] functional = self['functional'].get() + meta = psi4_step.methods[long_method] else: - method = psi4_step.methods[self['advanced_method'].get()]['method'] + long_method = self['advanced_method'].get() + method = psi4_step.methods[long_method]['method'] functional = self['advanced_functional'].get() + meta = psi4_step.methods[long_method] frame = self['calculation'] for slave in frame.grid_slaves(): @@ -188,6 +192,10 @@ def reset_calculation(self, widget=None): self['functional'].grid(row=row, column=1, sticky=tk.EW) widgets2.append(self['functional']) row += 1 + if 'freeze core?' in meta and meta['freeze core?']: + self['freeze-cores'].grid(row=row, column=1, sticky=tk.EW) + widgets2.append(self['freeze-cores']) + row += 1 else: self['advanced_method'].grid( row=row, column=0, columnspan=2, sticky=tk.EW @@ -200,6 +208,10 @@ def reset_calculation(self, widget=None): ) widgets2.append(self['advanced_functional']) row += 1 + if 'freeze core?' in meta and meta['freeze core?']: + self['freeze-cores'].grid(row=row, column=1, sticky=tk.EW) + widgets2.append(self['freeze-cores']) + row += 1 if method == 'dft': dispersions = psi4_step.dft_functionals[functional]['dispersion'] if len(dispersions) > 1: From 8f9ea2a3da0d938b3515dc09ae50ada9cf8e87c8 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Fri, 25 Sep 2020 12:46:15 -0400 Subject: [PATCH 7/7] Updated requirements. --- devtools/conda-envs/test_env.yaml | 8 +++++--- requirements.txt | 6 +++--- requirements_install.txt | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index aef9159..dbc7e63 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -2,6 +2,7 @@ name: test channels: - default + - conda-forge dependencies: # Base depends @@ -10,6 +11,7 @@ dependencies: - configargparse - psutil - py-cpuinfo + - openbabel # Testing - coverage @@ -20,9 +22,9 @@ dependencies: # Pip-only installs - pip: - - seamm>=0.9 - - seamm-util>=0.9 - - seamm-widgets>=0.9 + - seamm>=2020.9.23 + - seamm-util>=2020.9.23 + - seamm-widgets>=2020.8.1 # Testing - codecov diff --git a/requirements.txt b/requirements.txt index 996e388..3e1c8b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ Pmw==2.0.1 -seamm==0.2.0 -seamm-util==0.2.1 -seamm-widgets==0.2.1 +seamm==2020.9.23 +seamm-util==2020.9.23 +seamm-widgets==2020.8.1 diff --git a/requirements_install.txt b/requirements_install.txt index 051e55f..6a186db 100644 --- a/requirements_install.txt +++ b/requirements_install.txt @@ -1,4 +1,4 @@ pmw -seamm -seamm-util -seamm-widgets +seamm>=2020.9.23 +seamm-util>=2020.9.23 +seamm-widgets>=2020.8.1