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