{"id":6039,"library":"propka","title":"PROPKA: Heuristic pKa calculations with ligands","description":"PROPKA 3 is a Python library and command-line tool for predicting the pKa values of ionizable groups in proteins and protein-ligand complexes based on their 3D structure. It is actively maintained by the Jensen Group, with regular updates addressing bug fixes, performance improvements, and new features. The current version is 3.5.1.","status":"active","version":"3.5.1","language":"en","source_language":"en","source_url":"https://github.com/jensengroup/propka","tags":["pKa prediction","protein","ligand","computational chemistry","biophysics","molecular modeling"],"install":[{"cmd":"pip install propka","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Runtime environment. PROPKA 3 requires Python 3.10 or higher.","package":"Python","optional":false}],"imports":[{"note":"The primary entry point for programmatic execution is often within the `propka.run` module. You'll typically interact with functions like `run_propka`.","symbol":"run_propka","correct":"from propka import run"},{"note":"While `propka` is the package name, direct top-level imports for specific calculation functions are less common. Instead, functions are typically accessed through submodules like `propka.run` or `propka.molecular_container`.","wrong":"from propka import calculate_pka_values","symbol":"propka","correct":"import propka"}],"quickstart":{"code":"import os\nimport propka.run\n\n# Example: Create a dummy PDB file for demonstration\n# In a real scenario, you would load an existing PDB file.\nexample_pdb_content = \"\"\"\nATOM      1  N   ALA A   1       0.000   0.000   0.000  1.00 20.00           N\nATOM      2  CA  ALA A   1       1.458   0.000   0.000  1.00 20.00           C\nATOM      3  C   ALA A   1       2.155   1.234   0.000  1.00 20.00           C\nATOM      4  O   ALA A   1       1.614   2.352   0.000  1.00 20.00           O\nATOM      5  CB  ALA A   1       2.000  -1.200   0.000  1.00 20.00           C\n\"\"\"\n\nwith open(\"dummy.pdb\", \"w\") as f:\n    f.write(example_pdb_content)\n\n# Run PROPKA programmatically\n# The output will typically be written to a .pka file\n# and potentially to standard output.\n\ntry:\n    # propka.run.run_propka expects a list of filenames\n    pka_results = propka.run.run_propka([\"dummy.pdb\"])\n\n    # The 'pka_results' object contains detailed pKa information.\n    # For a simple print of the summary (similar to command line output):\n    print(\"\\nPROPKA Calculation Summary (dummy.pdb):\")\n    # Note: Accessing results directly from the returned object might require\n    # traversing its internal structure, e.g., MolecularContainer.\n    # The exact structure depends on the PROPKA version and options.\n    # For demonstration, we'll indicate successful execution and refer to the .pka file.\n    print(\"Results written to dummy.pka and available in the returned object.\")\n\n    # You can read the generated .pka file for detailed results\n    # with open(\"dummy.pka\", \"r\") as f:\n    #     print(f.read())\n\nexcept Exception as e:\n    print(f\"An error occurred during PROPKA calculation: {e}\")\nfinally:\n    # Clean up the dummy PDB file and output if they exist\n    if os.path.exists(\"dummy.pdb\"):\n        os.remove(\"dummy.pdb\")\n    if os.path.exists(\"dummy.pka\"):\n        os.remove(\"dummy.pka\")","lang":"python","description":"This quickstart demonstrates how to use PROPKA as a Python module to calculate pKa values for a protein structure. It creates a minimal dummy PDB file, runs the `propka.run.run_propka` function, and prints a success message, indicating that detailed results are written to a `.pka` file."},"warnings":[{"fix":"Upgrade your Python interpreter to version 3.10 or newer.","message":"PROPKA 3.5.0 dropped support for Python 3.6 and 3.7. Ensure your environment uses Python 3.10 or higher for the latest versions.","severity":"breaking","affected_versions":">=3.5.0"},{"fix":"Provide input directly as PDB files instead of using custom PROPKA input formats or the removed argument.","message":"Version 3.4.0 removed the `--generate-propka-input` argument and direct PROPKA input file support. Input should now be provided primarily via PDB files.","severity":"breaking","affected_versions":">=3.4.0"},{"fix":"Refer to the latest API documentation and changelog for each minor version update when integrating programmatically. Consider pinning exact minor versions in production if API stability is critical.","message":"The API for `propka` is still evolving and is not guaranteed to be stable between minor releases (e.g., changes between 3.2 and 3.3). This may require adjustments to programmatic integrations.","severity":"breaking","affected_versions":"All 3.x versions (especially minor releases)"},{"fix":"Always install `propka` via `pip install propka` and refer to the official documentation (jensengroup/propka on GitHub) for Python module usage to ensure you are using the correct and supported library.","message":"Older, separate `propka.py` scripts (e.g., for PyMOL integration) exist and are distinct from the `propka` Python package. Using these older scripts can lead to confusion or incompatibility.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use the `propka3` executable or `python -m propka` for command-line invocation.","message":"The command-line tool is `propka3`, not `propka`. When running from the command line, use `propka3 FILENAME.pdb` or `python -m propka FILENAME.pdb`.","severity":"gotcha","affected_versions":"All 3.x versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}