Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop pandas requirement #180

Merged
merged 1 commit into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pdb2pqr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from tempfile import NamedTemporaryFile
from pathlib import Path
from math import isclose
import pandas
import propka.lib
import propka.output as pk_out
import propka.input as pk_in
Expand Down Expand Up @@ -497,8 +496,8 @@ def run_propka(args, biomolecule):
:type args: argparse.Namespace
:param biomolecule: biomolecule object
:type biomolecule: Biomolecule
:return: (DataFrame of assigned pKa values, pKa information from PROPKA)
:rtype: (pandas.DataFrame, str)
:return: (DataFrame-convertible table of assigned pKa values, pKa information from PROPKA)
:rtype: (list, str)
"""
# TODO - eliminate need to write temporary file
lines = io.print_biomolecule_atoms(
Expand Down Expand Up @@ -561,8 +560,7 @@ def run_propka(args, biomolecule):
else:
row_dict["coupled_group"] = None
rows.append(row_dict)
df = pandas.DataFrame(rows)
return df, pka_str
return rows, pka_str


def non_trivial(args, biomolecule, ligand, definition, is_cif):
Expand Down Expand Up @@ -621,7 +619,7 @@ def non_trivial(args, biomolecule, ligand, definition, is_cif):
biomolecule.apply_pka_values(
forcefield_.name,
args.ph,
dict(zip(pka_df.group_label, pka_df.pKa)),
dict((row['group_label'], row['pKa']) for row in pka_df),
)
_LOGGER.info("Adding hydrogens to biomolecule.")
biomolecule.add_hydrogens()
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
long_description=LONG_DESCRIPTION,
install_requires=[
"propka >= 3.2",
"pandas >= 1.0",
"mmcif_pdbx>=1.1.2",
"numpy",
"requests",
],
url="http://www.poissonboltzmann.org",
Expand All @@ -59,7 +59,11 @@
),
package_data={"pdb2pqr": ["dat/*.xml", "dat/*.DAT", "dat/*.names"]},
python_requires=">=3.5",
tests_require=["pytest", "testfixtures"],
tests_require=[
"pandas >= 1.0",
"pytest",
"testfixtures",
],
test_suite="tests",
license="BSD",
classifiers=[
Expand Down