summaryrefslogtreecommitdiff
path: root/sci-chemistry/pdb2pqr
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry/pdb2pqr')
-rw-r--r--sci-chemistry/pdb2pqr/Manifest9
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pka13
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pqr13
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-flags.patch45
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch15
-rw-r--r--sci-chemistry/pdb2pqr/metadata.xml15
-rw-r--r--sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild129
7 files changed, 239 insertions, 0 deletions
diff --git a/sci-chemistry/pdb2pqr/Manifest b/sci-chemistry/pdb2pqr/Manifest
new file mode 100644
index 000000000000..afca6d9fee2d
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/Manifest
@@ -0,0 +1,9 @@
+AUX pdb2pka 270 SHA256 ae1112d6b793b10399a4ae14dc5cfd0518c463121d98e00ab08b2827db061303 SHA512 c6e66fa73a3119ea84a9bf304c9c8701a6eaf32870ba8c1755bfd8f2055e20af2f2ebc01fd2bf6a663e5873f3d6da7387a439efac3dcb7d4a415c176cb2f761b WHIRLPOOL ef5d1fac1bacd6403219e36955701b2a2d33a2aa9936b2334ed7ea48346b1cae74481bb634ba67f9250e7bac73723ce2e4da6c759b87c57111fad166624f0b82
+AUX pdb2pqr 263 SHA256 f07b197ec4903125e9566b394ed6a620f56511413bf14ba5fdd3484302d166e2 SHA512 5f8c963fc5addf782579b9312f601ec4547573c7ab88df5a6e38c71c9e31e7b7eea3cde99bdac8f8270f3646d933a0b510a94046e3a30736f75953af5d160b8d WHIRLPOOL 8e4889677ec874a88f3d485b133d3e92a3618d0ed90f4199d05add55f1819df94be762d3950ef9bd21db1112fa75adf26f909d04fdc57c4686cccb3244687fd2
+AUX pdb2pqr-1.9.0-flags.patch 1392 SHA256 478b86cf3871e39b9d231a10474abbcade07eceb32db2a83c0e68bbd2c1f5f32 SHA512 deed0aef88dc43515745204f2b4209bd6b42702d9004d48797d642b8f497229424bd0bb92017982cec54c448ea35de563bd42017cd5dc042840acae8495d135b WHIRLPOOL 7280c677dbfeb309c6c66d495c857a581fbac80801f9241c20ff17a2c6f4e051929f675807ec30f8dce1fd5337937c76e857b955570f2c1f134855a2b7c0ec2c
+AUX pdb2pqr-1.9.0-install-py.patch 578 SHA256 c82c11eb421a839710d40bfb3de4d99852ef69dc9b35b1ac31f7b51b36ff512d SHA512 902ad717e32790e9c691851dc4b92412f07ac79caf74b2b5794a10fa75cca7fa19e8814df4d8ba71bd2ecc98a3d777d0b79e6e43009171a32e8c99756d81d4d2 WHIRLPOOL 94348fe88a1910e916ca0d428a78636e5fe8371582a80dbbbda07d433d1fb8a35157a73d525eac88bd9dac6dc1c3a913288fdb7bd06f7584553b0b5c17aa17da
+DIST pdb2pqr-src-1.9.0.tar.gz 9051969 SHA256 d9d91bf27a023732be33d1d780ef283ae28d3b0e256c53e86c37ac001dd7ef53 SHA512 7f3f191cca9879a0e166e82700c706f8c99bb66558a218e54845f10c3324b6c45d413da80b0782d96a8d56df1463262609db075aba3768db3942cb928ee7b98f WHIRLPOOL 4a4b883200dad3e7467392e508c2372ad6876e78005da14e5747f3b7b12d0e3d5695e3cc590812b835ae67703819b201620809dff05af0a7c363c23d22046bae
+EBUILD pdb2pqr-1.9.0-r1.ebuild 2911 SHA256 cf72fe67cd6beb7ca8ed88eaf06b5aceac4d325436b91e14f80be762273c4e0a SHA512 88d06dee9fcb6423a2cae4fbb8e1e175ef6b8b45bb371b556b2fd15314d2d11c5ec9ffec294f8fb814f03f2f1dfb37d92574361b9a8aa89c9c42c483a5dd79d8 WHIRLPOOL dd2c3bfc02521198a1c2bebfbd9c412b710fb2e7dde1f47f9870588ad540adf949b79fa51ce3e8c9da6688c639f9f87313fff9b04581797086b0ab7202b0dad5
+MISC ChangeLog 2547 SHA256 4328c0ec1b00310f457a27f7a68745f3b238bfdb2efee23abf23263c4a6e7149 SHA512 cbf16398e70334c83b038ce306d4c34ec3759fcf5bb676a788aa8a0c4635da9eec0967614a2157e97789553d0a2baa0914f74856548e6e7ac0a1a95b09530c07 WHIRLPOOL 79f6f4e5ae532b7a027fd3f2cbc80116b5880f33b06f8e8d9fde6efb12ee797fcdeb27f14b5bc72adb42b6490fbe0a2e9001f4a37fe35448d323df675d509aa6
+MISC ChangeLog-2015 8157 SHA256 c05694b5d9f6956e9beb4ef67234f8f8807c0f707696deafcd58dffbb48ec23c SHA512 515f7a96bd3a1b80b11f46d20d3865c5aab7975ff0c8c77266dbf26b5e54dc0718fc006a6d733bbd4f1946e6975df9dfd98232e6393bf38b7891392f57ffc4aa WHIRLPOOL 660a27a3c807e7a445e54ebba830cb0c84b1ab6d5ae9c20d7a9dafcea45af8f343cd608a4103f560a061cd7081b9b76a50cd0a4cfdd9c4be1b22333c341aaa09
+MISC metadata.xml 511 SHA256 c9214899d35b2713d0c9c36519ec66e3ac944aec2e7c0f464a90eb1aeba65829 SHA512 11a010eea3bbbaaf4150a23dadcd10c45737745d51a3341cd7e69cc8537215f313d1ab57059eff265e73e34aeaef435585bb652f5497508dd12b99f67b8580c0 WHIRLPOOL cbf77bc71337cce17e27394685b4e0b7e46156771da61ff48976d4e8e524a57362184c781b82cf6795a15874030869e8a590f9ce2196083232c277a4cfab7ced
diff --git a/sci-chemistry/pdb2pqr/files/pdb2pka b/sci-chemistry/pdb2pqr/files/pdb2pka
new file mode 100644
index 000000000000..2406b0c4773f
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/files/pdb2pka
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import subprocess
+import site
+import sys
+import os
+
+sitepackages = site.getsitepackages()[0]
+
+_cmd=[os.path.join(sitepackages, "pdb2pqr", "pdb2pka", "pka.py")]
+_cmd.extend(sys.argv[1:])
+
+subprocess.call(_cmd, stdout=sys.stdout, stderr=sys.stderr)
diff --git a/sci-chemistry/pdb2pqr/files/pdb2pqr b/sci-chemistry/pdb2pqr/files/pdb2pqr
new file mode 100644
index 000000000000..8c0635aea94e
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/files/pdb2pqr
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import subprocess
+import site
+import sys
+import os
+
+sitepackages = site.getsitepackages()[0]
+
+_cmd=[os.path.join(sitepackages, "pdb2pqr", "pdb2pqr.py")]
+_cmd.extend(sys.argv[1:])
+
+subprocess.call(_cmd, stdout=sys.stdout, stderr=sys.stderr)
diff --git a/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-flags.patch b/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-flags.patch
new file mode 100644
index 000000000000..fac32b233e6b
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-flags.patch
@@ -0,0 +1,45 @@
+ pdb2pka/SConscript | 9 ++++++++-
+ pdb2pka/substruct/SConscript | 6 ++++++
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/pdb2pka/SConscript b/pdb2pka/SConscript
+index 583cdc5..6c30011 100644
+--- a/pdb2pka/SConscript
++++ b/pdb2pka/SConscript
+@@ -1,4 +1,11 @@
+ Import('env')
++import os
++
++env['CCFLAGS'].extend(os.environ['CXXFLAGS'].split())
++env['LINKFLAGS'].extend(os.environ['LDFLAGS'].split())
++env['CXX'] = os.environ['CXX']
++env['LINK'] = os.environ['CXX']
++
+
+ if env['REBUILD_SWIG']:
+ pyc = env.LoadableModule('_pMC_mult', ['pMC_mult.cpp', 'pMC_mult.i'])
+@@ -9,4 +16,4 @@ Default(pyc)
+
+ algorithms_module = SConscript('substruct/SConscript')
+
+-Return('pyc algorithms_module')
+\ No newline at end of file
++Return('pyc algorithms_module')
+diff --git a/pdb2pka/substruct/SConscript b/pdb2pka/substruct/SConscript
+index 7dbcdb0..56fb577 100644
+--- a/pdb2pka/substruct/SConscript
++++ b/pdb2pka/substruct/SConscript
+@@ -1,7 +1,13 @@
+ import distutils
+ import numpy
++import os
+ Import('env')
+
++env['CCFLAGS'].extend(os.environ['CXXFLAGS'].split())
++env['LINKFLAGS'].extend(os.environ['LDFLAGS'].split())
++env['CXX'] = os.environ['CXX']
++env['LINK'] = os.environ['CXX']
++
+ env.Append(CPPPATH=[distutils.sysconfig.get_python_inc(), numpy.get_include()])
+
+ algorithms_pyc = env.LoadableModule('Algorithms', ['Algorithms.cpp'])
diff --git a/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch b/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch
new file mode 100644
index 000000000000..2695b013c66a
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch
@@ -0,0 +1,15 @@
+ SConscript-install.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/SConscript-install.py b/SConscript-install.py
+index e2f9f09..1fdf1a8 100644
+--- a/SConscript-install.py
++++ b/SConscript-install.py
+@@ -41,6 +41,7 @@ def installFile(file_name, build_target='install'):
+ if GetOption("clean"):
+ env.Default(result)
+ Alias(build_target, env.Install(env['PREFIX']+dirname(file_name), result))
++ Alias(build_target, env.Install(env['PREFIX']+dirname(file_name), target))
+ else:
+ Alias(build_target, env.Install(env['PREFIX']+dirname(file_name), target))
+
diff --git a/sci-chemistry/pdb2pqr/metadata.xml b/sci-chemistry/pdb2pqr/metadata.xml
new file mode 100644
index 000000000000..36fd8c04ac52
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <use>
+ <flag name="opal">Add web interface via opal</flag>
+ <flag name="pdb2pka">Install experimental pdb2pka interface</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Electrostatics/apbs-pdb2pqr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild b/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild
new file mode 100644
index 000000000000..8b58ae48c5c7
--- /dev/null
+++ b/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit scons-utils fortran-2 flag-o-matic python-r1 toolchain-funcs
+
+DESCRIPTION="An automated pipeline for performing Poisson-Boltzmann electrostatics calculations"
+HOMEPAGE="http://www.poissonboltzmann.org/"
+SRC_URI="https://github.com/Electrostatics/apbs-${PN}/releases/download/${P}/${PN}-src-${PV}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+IUSE="doc examples opal +pdb2pka"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-chemistry/openbabel-python[${PYTHON_USEDEP}]
+ opal? ( dev-python/zsi[${PYTHON_USEDEP}] )
+ pdb2pka? ( sci-chemistry/apbs[${PYTHON_USEDEP},-mpi] )"
+DEPEND="${RDEPEND}
+ dev-lang/swig:0"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-flags.patch
+ "${FILESDIR}"/${P}-install-py.patch
+)
+
+pkg_setup() {
+ if [[ -z ${MAXATOMS} ]]; then
+ einfo "If you like to have support for more then 10000 atoms,"
+ einfo "export MAXATOMS=\"your value\""
+ export MAXATOMS=10000
+ else
+ einfo "Allow usage of ${MAXATOMS} during calculations"
+ fi
+ fortran-2_pkg_setup
+}
+
+src_prepare() {
+ find -type f \( -name "*\.pyc" -o -name "*\.pyo" \) -delete || die
+
+ export CXXFLAGS="${CXXFLAGS}"
+ export LDFLAGS="${LDFLAGS}"
+
+ epatch "${PATCHES[@]}"
+ tc-export CXX
+ rm -rf scons || die
+
+ python_copy_sources
+}
+
+src_configure() {
+ python_configure() {
+ cd "${BUILD_DIR}" || die
+
+ cat > build_config.py <<- EOF
+ PREFIX="${D}/$(python_get_sitedir)/${PN}"
+ #URL="http://<COMPUTER NAME>/pdb2pqr/"
+ APBS="${EPREFIX}/usr/bin/apbs"
+ #OPAL="http://nbcr-222.ucsd.edu/opal2/services/pdb2pqr_1.8"
+ #APBS_OPAL="http://nbcr-222.ucsd.edu/opal2/services/apbs_1.3"
+ MAX_ATOMS=${MAXATOMS}
+ BUILD_PDB2PKA=$(usex pdb2pka True False)
+ REBUILD_SWIG=True
+ EOF
+ }
+
+ python_foreach_impl python_configure
+}
+
+src_compile() {
+ python_compile() {
+ cd "${BUILD_DIR}" || die
+ escons
+ }
+ python_foreach_impl python_compile
+}
+
+src_test() {
+ python_test() {
+ local myesconsargs=( -j1 )
+ cd "${BUILD_DIR}" || die
+ escons test
+ escons advtest
+ escons complete-test
+ }
+ python_foreach_impl python_test
+}
+
+src_install() {
+ dodir /usr/share/doc/${PF}/html
+ python_install() {
+ local lib
+
+ cd "${BUILD_DIR}" || die
+
+ escons install
+
+ find "${D}$(python_get_sitedir)"/${PN}/{jmol,examples,doc,contrib} -delete || die
+
+ python_doscript "${FILESDIR}"/{${PN},pdb2pka}
+
+ for lib in apbslib.py{,c,o}; do
+ dosym ../../apbs/${lib} $(python_get_sitedir)/${PN}/pdb2pka/${lib}
+ done
+ dosym ../../_apbslib.so $(python_get_sitedir)/${PN}/pdb2pka/_apbslib.so
+ python_optimize
+ }
+ python_foreach_impl python_install
+
+ if use doc; then
+ pushd doc > /dev/null
+ docinto html
+ dodoc -r *.html images pydoc
+ popd > /dev/null
+ fi
+
+ use examples && \
+ insinto /usr/share/${PN}/ && \
+ doins -r examples
+
+ dodoc *md NEWS
+}