Skip to content

Commit

Permalink
Started code clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
erikkjellgren committed Feb 5, 2024
1 parent ecc6acf commit be232ca
Show file tree
Hide file tree
Showing 40 changed files with 517 additions and 1,883 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
max-line-length = 200
ignore = E203, E741, N803, N806, N813, W503
ignore = E203, E741, N801, N802, N803, N806, N812, N813, W503
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/ambv/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
additional_dependencies:
Expand Down Expand Up @@ -51,4 +51,4 @@ repos:
hooks:
- id: pydocstyle
args:
- --ignore=D100,D101,D104,D203,D213,D406,D407,D413,R0915
- --ignore=D100,D101,D104,D203,D213,D406,D407,D413
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ disable=duplicate-code,
too-many-branches,
too-many-instance-attributes,
too-many-locals,
too-many-nested-blocks
too-many-nested-blocks,
too-many-statements
9 changes: 9 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

sphinx:
configuration: docs/conf.py
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Build Status](https://travis-ci.com/erikkjellgren/SlowQuant.svg?branch=master)](https://travis-ci.com/erikkjellgren/SlowQuant)
[![Coverage Status](https://coveralls.io/repos/github/erikkjellgren/SlowQuant/badge.svg?branch=master)](https://coveralls.io/github/erikkjellgren/SlowQuant?branch=master)
[![Documentation Status](https://readthedocs.org/projects/slowquant/badge/?version=latest)](http://slowquant.readthedocs.io/en/latest/?badge=latest)

# SlowQuant
Expand Down Expand Up @@ -33,6 +31,7 @@ Just use [PySCF](https://github.com/pyscf/pyscf) instead.

| Feature | Last living commit |
|-----------------------|------------------------------------------|
| KS-DFT | 1b9c5669ab72dfceee0a69c8dca1c67dd4b31bfd |
| MP2 | 46bf811dfcf217ce0c37ddec77d34ef00da769c3 |
| RPA | 46bf811dfcf217ce0c37ddec77d34ef00da769c3 |
| Geometry Optimization | 46bf811dfcf217ce0c37ddec77d34ef00da769c3 |
Expand Down
12 changes: 2 additions & 10 deletions slowquant/SlowQuant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# pylint: disable=C0103
from slowquant.dft.dftclass import _KSDFT
from slowquant.grid.gridclass import _Grid
from slowquant.hartreefock.hartreefockclass import _HartreeFock
from slowquant.logger import _Logger
from slowquant.molecularintegrals.integralclass import _Integral
Expand All @@ -11,11 +9,10 @@
class SlowQuant:
def __init__(self) -> None:
"""Initialize SlowQuant."""
self.molecule: _Molecule | None = None
self.molecule: _Molecule
self.integral: _Integral
self.hartree_fock: _HartreeFock
self.properties: _Properties
self.grid: _Grid
self.logger = _Logger()

def set_molecule(
Expand Down Expand Up @@ -44,10 +41,9 @@ def set_basis_set(self, basis_set: str) -> None:
Args:
basis_set: Name of basis set.
"""
if self.molecule is not None:
if hasattr(self, "molecule"):
self.molecule._set_basis_set(basis_set) # pylint: disable=W0212
self.integral = _Integral(self.molecule)
self.grid = _Grid(self.molecule)
else:
self.logger.add_to_log("Cannot set basis set, molecule is not defined.", is_warning=True)

Expand All @@ -58,7 +54,3 @@ def init_hartree_fock(self) -> None:
def init_properties(self) -> None:
"""Initialize Hartree-Fock module."""
self.properties = _Properties(self.molecule, self.integral)

def init_kohn_sham_dft(self) -> None:
"""Initialize Kohn-Sham DFT module."""
self.ksdft = _KSDFT(self.molecule, self.integral, self.grid)
110 changes: 0 additions & 110 deletions slowquant/dft/dft_in_memory.py

This file was deleted.

63 changes: 0 additions & 63 deletions slowquant/dft/dftclass.py

This file was deleted.

1 change: 0 additions & 1 deletion slowquant/dft/dftfunctions.py

This file was deleted.

0 comments on commit be232ca

Please sign in to comment.