Merge pull request #132554 from markuskowa/add-ergoscf

ergoscf: init at 3.8

authored by

Sandro and committed by
GitHub
2f7babdb 1cc8723f

+61
+40
pkgs/applications/science/chemistry/ergoscf/default.nix
··· 1 + { lib, stdenv, fetchurl, blas, lapack } : 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "ergoscf"; 5 + version = "3.8"; 6 + 7 + src = fetchurl { 8 + url = "http://www.ergoscf.org/source/tarfiles/ergo-${version}.tar.gz"; 9 + sha256 = "1s50k2gfs3y6r5kddifn4p0wmj0yk85wm5vf9v3swm1c0h43riix"; 10 + }; 11 + 12 + buildInputs = [ blas lapack ]; 13 + 14 + patches = [ ./math-constants.patch ]; 15 + 16 + postPatch = '' 17 + patchShebangs ./test 18 + ''; 19 + 20 + configureFlags = [ 21 + "--enable-linalgebra-templates" 22 + "--enable-performance" 23 + ] ++ lib.optional stdenv.isx86_64 "--enable-sse-intrinsics"; 24 + 25 + LDFLAGS = "-lblas -llapack"; 26 + 27 + enableParallelBuilding = true; 28 + 29 + OMP_NUM_THREADS = 2; # required for check phase 30 + 31 + doCheck = true; 32 + 33 + meta = with lib; { 34 + description = "Quantum chemistry program for large-scale self-consistent field calculations"; 35 + homepage = "http://www.ergoscf.org"; 36 + license = licenses.gpl3Plus; 37 + maintainers = [ maintainers.markuskowa ]; 38 + platforms = platforms.linux; 39 + }; 40 + }
+19
pkgs/applications/science/chemistry/ergoscf/math-constants.patch
··· 1 + diff --git a/source/dft/functionals.h b/source/dft/functionals.h 2 + index fde49ba..f7a61fc 100644 3 + --- a/source/dft/functionals.h 4 + +++ b/source/dft/functionals.h 5 + @@ -59,6 +59,14 @@ 6 + #define EXTERN_C 7 + #endif 8 + 9 + +#ifndef M_PI 10 + +#define M_PI 3.14159265358979323846 11 + +#endif 12 + + 13 + +#ifndef M_SQRT2 14 + +#define M_SQRT2 1.41421356237309504880 15 + +#endif 16 + + 17 + typedef ergo_real real; 18 + 19 + #if defined(FUNC_PRECISION) && FUNC_PRECISION == 1
+2
pkgs/top-level/all-packages.nix
··· 30032 30032 30033 30033 d-seams = callPackage ../applications/science/chemistry/d-seams {}; 30034 30034 30035 + ergoscf = callPackage ../applications/science/chemistry/ergoscf { }; 30036 + 30035 30037 gwyddion = callPackage ../applications/science/chemistry/gwyddion {}; 30036 30038 30037 30039 jmol = callPackage ../applications/science/chemistry/jmol {