Skip to content

Commit

Permalink
Merge branch 'format_PEP8' into enable_whole_testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
mcocdawc committed Nov 20, 2024
2 parents 5792835 + 1f9f657 commit 8316165
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 14 deletions.
14 changes: 7 additions & 7 deletions example/molbe_dmrg_block2.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@

# Next, run BE-DMRG with default parameters and maxM=100.
mybe.oneshot(
solver='block2', # or 'DMRG', 'DMRGSCF', 'DMRGCI'
scratch_dir=scratch, # Scratch dir for fragment DMRG
maxM=100, # Max fragment bond dimension
force_cleanup=True, # Remove all fragment DMRG tmpfiles
)
solver="block2", # or 'DMRG', 'DMRGSCF', 'DMRGCI'
scratch_dir=scratch, # Scratch dir for fragment DMRG
maxM=100, # Max fragment bond dimension
force_cleanup=True, # Remove all fragment DMRG tmpfiles
)

bedmrg_ecorr.append(mybe.ebe_tot - mf.e_tot)
# Setting `force_cleanup=True` will clean the scratch directory after each
Expand Down Expand Up @@ -136,5 +136,5 @@
# and `[scratch]/dmrg.out`, which are the fragment DMRG inputs and outputs, respectively, used
# by `block2`.

#NOTE: Parameters in `schedule_kwargs` will overwrite any other DMRG kwargs.
#NOTE: The DMRG schedule kwargs and related syntax follows the standard notation used in block2.
# NOTE: Parameters in `schedule_kwargs` will overwrite any other DMRG kwargs.
# NOTE: The DMRG schedule kwargs and related syntax follows the standard notation used in block2.
2 changes: 1 addition & 1 deletion example/molbe_io_fcidump.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# can be generated using be2fcidump

from molbe import BE, be_var, fragpart
from molbe.misc import *
from molbe.misc import be2fcidump, libint2pyscf

be_var.PRINT_LEVEL = 3

Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package_dir={"": "src"},
python_requires=">=3.7",
install_requires=[
'numpy>=1.22.0',
'scipy>=1.7.0',
'pyscf>=2.0.0',
'matplotlib',
'libdmet @ git+https://github.com/gkclab/libdmet_preview.git',
"numpy>=1.22.0",
"scipy>=1.7.0",
"pyscf>=2.0.0",
"matplotlib",
"libdmet @ git+https://github.com/mcocdawc/libdmet_preview.git@add_fixes_for_BE",
],
)
1 change: 1 addition & 0 deletions src/kbe/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy



def get_veff(eri_, dm, S, TA, hf_veff, return_veff0=False):
from pyscf import scf

Expand Down
1 change: 1 addition & 0 deletions src/kbe/pbe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from .pfrag import Frags



class BE:
"""
Class for handling periodic bootstrap embedding (BE) calculations.
Expand Down
1 change: 1 addition & 0 deletions src/kbe/pfrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from .solver import schmidt_decomp_svd



class Frags:
"""
Class for handling fragments in periodic bootstrap embedding.
Expand Down
1 change: 0 additions & 1 deletion src/molbe/_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ def optimize(self, method, J0=None, trust_region=False):
import sys

from molbe.external.optqn import FrankQN

print("-----------------------------------------------------", flush=True)
print(" Starting BE optimization ", flush=True)
print(" Solver : ", self.solver, flush=True)
Expand Down
1 change: 1 addition & 0 deletions src/molbe/external/unrestricted_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy



def make_uhf_obj(fobj_a, fobj_b, frozen=False):
from pyscf import scf

Expand Down
1 change: 1 addition & 0 deletions src/molbe/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .helper import get_core



class fragpart:
"""Fragment/partitioning definition
Expand Down
1 change: 1 addition & 0 deletions src/molbe/misc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Author(s): Minsik Cho, Leah Weisburn

import os
import sys
import time

import numpy
Expand Down
1 change: 1 addition & 0 deletions src/molbe/ube.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .pfrag import Frags



class UBE(BE): # 🍠
def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions tests/chem_dm_kBE_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from kbe import BE, fragpart



class Test_kBE_Full(unittest.TestCase):
try:
import libdmet
Expand Down
1 change: 1 addition & 0 deletions tests/chempot_molBE_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from molbe import BE, fragpart



class TestBE_restricted(unittest.TestCase):
def test_h8_sto3g_ben(self):
# Linear Equidistant (r=1Å) H8 Chain, STO-3G
Expand Down
1 change: 1 addition & 0 deletions tests/dm_molBE_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from molbe import BE, fragpart



class TestBE_restricted(unittest.TestCase):
# TODO: Add test against known values (molecular_restrict_test)
def test_h8_sto3g_ben_trustRegion(self):
Expand Down
1 change: 1 addition & 0 deletions tests/dmrg_molBE_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from molbe import BE, fragpart



class TestBE_DMRG(unittest.TestCase):
try:
from pyscf import dmrgscf
Expand Down
1 change: 1 addition & 0 deletions tests/eri_onthefly_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from molbe import BE, fragpart



class TestDF_ontheflyERI(unittest.TestCase):
@unittest.skipIf(
os.getenv("QUEMB_SKIP_EXPENSIVE_TESTS") == "true",
Expand Down
1 change: 1 addition & 0 deletions tests/hf-in-hf_BE_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from molbe import BE, fragpart



class TestHFinHF_restricted(unittest.TestCase):
def test_h8_sto3g_ben(self):
# Linear Equidistant (r=1Å) H8 Chain, STO-3G
Expand Down
1 change: 1 addition & 0 deletions tests/ube-oneshot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from molbe import UBE, fragpart



class TestOneShot_Unrestricted(unittest.TestCase):
@unittest.skipIf(
not os.getenv("QUEMB_DO_KNOWN_TO_FAIL_TESTS") == "true",
Expand Down

0 comments on commit 8316165

Please sign in to comment.