python3Packages.geometric: 0.9.7.2 -> 1.0

+67 -4
+50
pkgs/development/python-modules/geometric/ase-is-optional.patch
··· 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 1 + { buildPythonPackage 2 + , lib 3 + , fetchFromGitHub 4 + , networkx 5 + , numpy 6 + , scipy 7 + , six 3 8 , pytestCheckHook 4 9 }: 5 10 6 11 buildPythonPackage rec { 7 12 pname = "geometric"; 8 - version = "0.9.7.2"; 13 + version = "1.0"; 9 14 10 15 src = fetchFromGitHub { 11 16 owner = "leeping"; 12 17 repo = "geomeTRIC"; 13 18 rev = version; 14 - hash = "sha256-QFpfY6tWqcda6AJT17YBEuwu/4DYPbIMJU1c9/gHjaA="; 19 + hash = "sha256-y8dh4vZ/d1KL1EpDrle8CH/KIDMCKKZdAyJVgUFjx/o="; 15 20 }; 16 21 22 + patches = [ 23 + ./ase-is-optional.patch 24 + ]; 25 + 17 26 propagatedBuildInputs = [ 18 27 networkx 19 28 numpy 20 29 scipy 21 30 six 22 31 ]; 32 + 33 + preCheck = '' 34 + export OMP_NUM_THREADS=2 35 + ''; 23 36 24 37 checkInputs = [ pytestCheckHook ]; 25 38