From afdcccd135ed693cd053484db87f8bb1ed3f554e Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 8 May 2023 22:37:26 +0900 Subject: [PATCH 1/3] python3Packages.mmcif-pdbx: init at 2.0.1 --- .../python-modules/mmcif-pdbx/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/mmcif-pdbx/default.nix diff --git a/pkgs/development/python-modules/mmcif-pdbx/default.nix b/pkgs/development/python-modules/mmcif-pdbx/default.nix new file mode 100644 index 000000000000..05d43d54f25d --- /dev/null +++ b/pkgs/development/python-modules/mmcif-pdbx/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "mmcif-pdbx"; + version = "2.0.1"; + format = "pyproject"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "Electrostatics"; + repo = "mmcif_pdbx"; + rev = "refs/tags/v${version}"; + hash = "sha256-ymMQ/q4IMoq+B8RvIdL0aqolKxyE/4rnVfd4bUV5OUY="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pdbx" + ]; + + meta = with lib; { + description = "Yet another version of PDBx/mmCIF Python implementation"; + homepage = "https://github.com/Electrostatics/mmcif_pdbx"; + changelog = "https://github.com/Electrostatics/mmcif_pdbx/releases/tag/v${version}"; + license = licenses.cc0; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 06e00fe5b650..f76266323a5f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6215,6 +6215,8 @@ self: super: with self; { enablePython = true; }); + mmcif-pdbx = callPackage ../development/python-modules/mmcif-pdbx { }; + mmcv = callPackage ../development/python-modules/mmcv { }; mmh3 = callPackage ../development/python-modules/mmh3 { }; From f9741e3dcb443f4111c5b3fb35366da8bf6347a5 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 8 May 2023 22:56:14 +0900 Subject: [PATCH 2/3] python3Packages.propka: init at 3.5.0 --- .../python-modules/propka/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/propka/default.nix diff --git a/pkgs/development/python-modules/propka/default.nix b/pkgs/development/python-modules/propka/default.nix new file mode 100644 index 000000000000..0894e05a9886 --- /dev/null +++ b/pkgs/development/python-modules/propka/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "propka"; + version = "3.5.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jensengroup"; + repo = "propka"; + rev = "refs/tags/v${version}"; + hash = "sha256-NbvrlapBALGbUyBqdqDcDG/igDf/xqxC35DzVUrbHlo="; + }; + + propagatedBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "propka" + ]; + + meta = with lib; { + description = "A predictor of the pKa values of ionizable groups in proteins and protein-ligand complexes based in the 3D structure"; + homepage = "https://github.com/jensengroup/propka"; + changelog = "https://github.com/jensengroup/propka/releases/tag/v${version}"; + license = licenses.lgpl21Only; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f76266323a5f..1daf4c35ec0b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7497,6 +7497,8 @@ self: super: with self; { prodict = callPackage ../development/python-modules/prodict { }; + propka = callPackage ../development/python-modules/propka { }; + proxy_tools = callPackage ../development/python-modules/proxy_tools { }; py-nextbusnext = callPackage ../development/python-modules/py-nextbusnext { }; From 22716330eb97ae7336f9ed04b19a5e3568f5635f Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 10 May 2023 01:01:31 +0900 Subject: [PATCH 3/3] pdb2pqr: init at 3.6.1 --- .../python-modules/pdb2pqr/default.nix | 73 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 77 insertions(+) create mode 100644 pkgs/development/python-modules/pdb2pqr/default.nix diff --git a/pkgs/development/python-modules/pdb2pqr/default.nix b/pkgs/development/python-modules/pdb2pqr/default.nix new file mode 100644 index 000000000000..e7d6e462c622 --- /dev/null +++ b/pkgs/development/python-modules/pdb2pqr/default.nix @@ -0,0 +1,73 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pythonRelaxDepsHook +, mmcif-pdbx +, numpy +, propka +, requests +, docutils +, pytestCheckHook +, pandas +, testfixtures +}: + +buildPythonPackage rec { + pname = "pdb2pqr"; + version = "3.6.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-wFak5tKOsPYRflBW8viWEjM6Cku5JkWB6mWVyINYh1g="; + }; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "docutils" + ]; + + propagatedBuildInputs = [ + mmcif-pdbx + numpy + propka + requests + docutils + ]; + + nativeCheckInputs = [ + pytestCheckHook + pandas + testfixtures + ]; + + disabledTests = [ + # these tests have network access + "test_short_pdb" + "test_basic_cif" + "test_long_pdb" + "test_ligand_biomolecule" + "test_log_output_in_pqr_location" + "test_propka_apo" + "test_propka_pka" + "test_basic" + ]; + + pythonImportsCheck = [ + "pdb2pqr" + ]; + + meta = with lib; { + description = "Software for determining titration states, adding missing atoms, and assigning charges/radii to biomolecules"; + homepage = "https://www.poissonboltzmann.org/"; + changelog = "https://github.com/Electrostatics/pdb2pqr/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be8e7b5ed278..490f46dd93bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37179,6 +37179,8 @@ with pkgs; openmolcas = callPackage ../applications/science/chemistry/openmolcas { }; + pdb2pqr = with python3Packages; toPythonApplication pdb2pqr; + pymol = callPackage ../applications/science/chemistry/pymol { }; quantum-espresso = callPackage ../applications/science/chemistry/quantum-espresso { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1daf4c35ec0b..60b9c0ad352f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7244,6 +7244,8 @@ self: super: with self; { pcpp = callPackage ../development/python-modules/pcpp { }; + pdb2pqr = callPackage ../development/python-modules/pdb2pqr { }; + pdf2image = callPackage ../development/python-modules/pdf2image { }; pdfkit = callPackage ../development/python-modules/pdfkit { };