tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.geometric: 0.9.7.2 -> 1.0
Roberto Di Remigio Eikås
3 years ago
defcd6b6
f690a10b
+67
-4
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
geometric
ase-is-optional.patch
default.nix
+50
pkgs/development/python-modules/geometric/ase-is-optional.patch
···
1
1
+
From aff6e4411980ac9cbe112a050c3a34ba7e305a43 Mon Sep 17 00:00:00 2001
2
2
+
From: =?UTF-8?q?Roberto=20Di=20Remigio=20Eik=C3=A5s?=
3
3
+
<robertodr@users.noreply.github.com>
4
4
+
Date: Fri, 11 Nov 2022 09:20:25 +0100
5
5
+
Subject: [PATCH] Do not import ASE stuff at the top
6
6
+
7
7
+
Since it is an optional add-on and it's not listed in the installation requirements.
8
8
+
---
9
9
+
geometric/tests/test_ase_engine.py | 7 ++++++-
10
10
+
1 file changed, 6 insertions(+), 1 deletion(-)
11
11
+
12
12
+
diff --git a/geometric/tests/test_ase_engine.py b/geometric/tests/test_ase_engine.py
13
13
+
index 8750763..34239b5 100644
14
14
+
--- a/geometric/tests/test_ase_engine.py
15
15
+
+++ b/geometric/tests/test_ase_engine.py
16
16
+
@@ -10,7 +10,6 @@
17
17
+
- geometry optimisation w/ ASE internal calc
18
18
+
"""
19
19
+
import numpy as np
20
20
+
-from ase.calculators.lj import LennardJones
21
21
+
from pytest import fixture, raises
22
22
+
23
23
+
from geometric.ase_engine import EngineASE
24
24
+
@@ -37,6 +36,8 @@ def molecule_h2o() -> Molecule:
25
25
+
26
26
+
@using_ase
27
27
+
def test_construction(molecule_h2o):
28
28
+
+ from ase.calculators.lj import LennardJones
29
29
+
+
30
30
+
lj_calc = LennardJones()
31
31
+
engine = EngineASE(molecule_h2o, lj_calc)
32
32
+
assert engine.calculator == lj_calc
33
33
+
@@ -44,6 +45,8 @@ def test_construction(molecule_h2o):
34
34
+
35
35
+
@using_ase
36
36
+
def test_from_args(molecule_h2o):
37
37
+
+ from ase.calculators.lj import LennardJones
38
38
+
+
39
39
+
lj_calc = LennardJones(sigma=1.4, epsilon=3.0)
40
40
+
41
41
+
# create equivalent engines in two ways
42
42
+
@@ -68,6 +71,8 @@ def test_from_args(molecule_h2o):
43
43
+
44
44
+
@using_ase
45
45
+
def test_from_string(molecule_h2o):
46
46
+
+ from ase.calculators.lj import LennardJones
47
47
+
+
48
48
+
engine = EngineASE.from_calculator_string(
49
49
+
molecule_h2o, calculator_import="ase.calculators.lj.LennardJones"
50
50
+
)
+17
-4
pkgs/development/python-modules/geometric/default.nix
···
1
1
-
{ buildPythonPackage, lib, fetchFromGitHub
2
2
-
, networkx, numpy, scipy, six
1
1
+
{ buildPythonPackage
2
2
+
, lib
3
3
+
, fetchFromGitHub
4
4
+
, networkx
5
5
+
, numpy
6
6
+
, scipy
7
7
+
, six
3
8
, pytestCheckHook
4
9
}:
5
10
6
11
buildPythonPackage rec {
7
12
pname = "geometric";
8
8
-
version = "0.9.7.2";
13
13
+
version = "1.0";
9
14
10
15
src = fetchFromGitHub {
11
16
owner = "leeping";
12
17
repo = "geomeTRIC";
13
18
rev = version;
14
14
-
hash = "sha256-QFpfY6tWqcda6AJT17YBEuwu/4DYPbIMJU1c9/gHjaA=";
19
19
+
hash = "sha256-y8dh4vZ/d1KL1EpDrle8CH/KIDMCKKZdAyJVgUFjx/o=";
15
20
};
16
21
22
22
+
patches = [
23
23
+
./ase-is-optional.patch
24
24
+
];
25
25
+
17
26
propagatedBuildInputs = [
18
27
networkx
19
28
numpy
20
29
scipy
21
30
six
22
31
];
32
32
+
33
33
+
preCheck = ''
34
34
+
export OMP_NUM_THREADS=2
35
35
+
'';
23
36
24
37
checkInputs = [ pytestCheckHook ];
25
38