From 381f5fa03a6a4f3a192e8bc4fe8a0e84a8e49619 Mon Sep 17 00:00:00 2001 From: = Date: Sun, 17 Dec 2023 10:48:31 +0800 Subject: [PATCH] Commented out the psi4 function, added IGNORE into sphinx and psi4 function to skip it during doc making --- doc/source/conf.py | 5 +++++ lih.xyz | 4 ++++ src/qibochem/driver/molecule.py | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 lih.xyz diff --git a/doc/source/conf.py b/doc/source/conf.py index 55f5541..cd34f70 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -13,6 +13,7 @@ import sys from recommonmark.transform import AutoStructify +from sphinx.ext.autodoc import between sys.path.insert(0, os.path.abspath("..")) @@ -133,6 +134,10 @@ def setup(app): app.add_config_value("recommonmark_config", {"enable_eval_rst": True}, True) app.add_transform(AutoStructify) app.add_css_file("css/style.css") + # Register a sphinx.ext.autodoc.between listener to ignore everything + # between lines that contain the word IGNORE + app.connect('autodoc-process-docstring', between('^.*IGNORE.*$', exclude=True)) + return app html_show_sourcelink = False diff --git a/lih.xyz b/lih.xyz new file mode 100644 index 0000000..6d8b64a --- /dev/null +++ b/lih.xyz @@ -0,0 +1,4 @@ +2 + 0 1 + Li 0.0 0.0 0.0 + H 0.0 0.0 1.2 \ No newline at end of file diff --git a/src/qibochem/driver/molecule.py b/src/qibochem/driver/molecule.py index c751e3a..f3527b3 100644 --- a/src/qibochem/driver/molecule.py +++ b/src/qibochem/driver/molecule.py @@ -169,15 +169,23 @@ def run_pyscf(self, max_scf_cycles=50): tei = np.einsum("pqrs->prsq", eri4) self.tei = tei + """ + IGNORE def run_psi4(self, output=None): - """ + IGNORE + """ + """ + IGNORE Run a Hartree-Fock calculation with PSI4 to obtain the molecular quantities and molecular integrals Args: output: Name of PSI4 output file. ``None`` suppresses the output on non-Windows systems, and uses ``psi4_output.dat`` otherwise - """ + IGNORE + """ + """ + IGNORE import psi4 # pylint: disable=import-error # PSI4 input string @@ -241,6 +249,8 @@ def run_psi4(self, output=None): ca_occ = self.ca[:, 0 : self.nalpha] self.pa = ca_occ @ ca_occ.T self.da = self.ca.T @ self.overlap @ self.pa @ self.overlap @ self.ca + IGNORE + """ # HF embedding functions def _inactive_fock_matrix(self, frozen):