Skip to content

Commit 1a57216

Browse files
committed
flatten ipi driver file structure
1 parent 57f9265 commit 1a57216

File tree

8 files changed

+12
-21
lines changed

8 files changed

+12
-21
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ Requires Python >= 3.11.
1212
pip install .
1313
```
1414

15-
Note: At the moment you need `marathon-dev` from `https://github.com/sirmarcel/marathon-dev` on the `hermes-reorg` branch. This will be fixed soon.
15+
Note: At the moment you need `marathon-dev` from `https://github.com/sirmarcel/marathon-dev` on the `hermes-reorg` branch. This will be fixed soon.
16+
17+
```bash
18+
pip install git+https://github.com/sirmarcel/marathon-dev.git@hermes-reorg
19+
```
1620

1721
## Usage
1822

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "lorem-jax"
2020
requires-python = ">=3.11"
2121

2222
[project.scripts]
23-
lorem-install-ipi-driver = "lorem.dynamics._install_ipi_driver:install_ipi_driver"
23+
lorem-install-ipi-driver = "lorem._install_ipi_driver:install_ipi_driver"
2424
lorem-train = "lorem.train:main"
2525

2626
[tool.pytest.ini_options]

src/lorem/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
except ModuleNotFoundError:
88
comms = None
99

10-
from .dynamics import LOREMCalculator
11-
1210
# These modules require marathon and jaxpme at import time.
1311
# When those are not installed (e.g. CI), we skip them.
1412
try:
@@ -21,7 +19,6 @@
2119

2220
__all__ = [
2321
"__version__",
24-
"LOREMCalculator",
2522
"Lorem",
2623
"LoremBEC",
2724
"to_sample",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def install_ipi_driver():
1818
pes_dir = Path(ipi_spec.submodule_search_locations[0]) / "pes"
1919

2020
# Locate source driver module
21-
source_spec = find_spec("lorem.dynamics.ipi")
21+
source_spec = find_spec("lorem.ipi")
2222
if source_spec is None or source_spec.origin is None:
23-
raise FileNotFoundError("Could not locate lorem.dynamics.ipi module")
23+
raise FileNotFoundError("Could not locate lorem.ipi module")
2424
source_path = Path(source_spec.origin)
2525

2626
target_path = pes_dir / "lorem.py"

src/lorem/dynamics/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/lorem/dynamics/ase.py

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@
44

55
from ipi.pes.ase import ASEDriver
66

7-
from lorem import LOREMCalculator
7+
from lorem.calculator import Calculator
88

99
__DRIVER_NAME__ = "lorem"
1010
__DRIVER_CLASS__ = "LOREM_driver"
1111

1212

1313
class LOREM_driver(ASEDriver):
14-
def __init__(self, template, model_path, device="cpu", *args, **kwargs):
15-
super().__init__(template, *args, **kwargs)
16-
14+
def __init__(self, template, model_path, *args, **kwargs):
1715
self.model_path = model_path
18-
self.device = device
16+
super().__init__(template, *args, **kwargs)
1917
self.capabilities.append("BEC")
2018

2119
def check_parameters(self):
2220
super().check_parameters()
23-
self.ase_calculator = LOREMCalculator.from_checkpoint(self.model_path)
21+
self.ase_calculator = Calculator.from_checkpoint(self.model_path)

0 commit comments

Comments
 (0)