{"id":6024,"library":"pdb2pqr","title":"PDB2PQR","description":"PDB2PQR is a Python software package designed to automate the preparation of biomolecular structures for continuum solvation calculations and various other modeling, analysis, and simulation tasks. It processes PDB files, adding missing heavy atoms and hydrogens, optimizing hydrogen bonding, estimating titration states, and assigning atomic charges and radii from various force fields to generate PQR files. The current version is 3.7.1, and the project maintains an active release cadence with updates typically on an annual or semi-annual basis.","status":"active","version":"3.7.1","language":"en","source_language":"en","source_url":"https://github.com/Electrostatics/pdb2pqr","tags":["chemistry","molecular biology","science","bioinformatics","structural biology"],"install":[{"cmd":"pip install pdb2pqr","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required Python version as specified by the package metadata.","package":"python","version":">=3.11, <4","optional":false}],"imports":[],"quickstart":{"code":"import subprocess\nimport os\n\n# Create a dummy PDB file for demonstration\npdb_content = \"\"\"\nHETATM    1  N   UNL A   1      -0.003  -0.003   0.000  1.00  0.00           N\nHETATM    2  C   UNL A   1       1.400   0.001   0.000  1.00  0.00           C\nHETATM    3  O   UNL A   1       2.000  -0.800   0.000  1.00  0.00           O\nEND\n\"\"\"\nwith open(\"dummy.pdb\", \"w\") as f:\n    f.write(pdb_content)\n\ninput_pdb = \"dummy.pdb\"\noutput_pqr = \"dummy.pqr\"\n\ntry:\n    # Run pdb2pqr as a command-line tool via subprocess\n    # Using --keep-chain to preserve chain IDs, --ff=PARSE for force field, --clean for minimal processing\n    # Note: For complex proteins, you would typically use options like --with-ph, --titration-state-method=propka, etc.\n    command = [\n        \"pdb2pqr\",\n        \"--keep-chain\",\n        \"--ff=PARSE\",\n        \"--clean\", # Use --clean to skip optimization for a minimal example\n        input_pdb,\n        output_pqr\n    ]\n    print(f\"Executing command: {' '.join(command)}\")\n    result = subprocess.run(command, capture_output=True, text=True, check=True)\n    print(\"PDB2PQR ran successfully.\")\n    print(\"STDOUT:\", result.stdout)\n    print(\"STDERR:\", result.stderr)\n\n    if os.path.exists(output_pqr):\n        print(f\"Generated PQR file: {output_pqr}\")\n        with open(output_pqr, \"r\") as f:\n            print(\"\\nContent of dummy.pqr:\")\n            print(f.read())\n    else:\n        print(\"Error: PQR file not generated.\")\n\nexcept FileNotFoundError:\n    print(\"Error: 'pdb2pqr' command not found. Please ensure pdb2pqr is installed and in your PATH.\")\nexcept subprocess.CalledProcessError as e:\n    print(f\"Error running pdb2pqr: {e}\")\n    print(\"STDOUT:\", e.stdout)\n    print(\"STDERR:\", e.stderr)\nfinally:\n    # Clean up dummy files\n    if os.path.exists(input_pdb):\n        os.remove(input_pdb)\n    if os.path.exists(output_pqr):\n        os.remove(output_pqr)\n","lang":"python","description":"PDB2PQR is primarily used as a command-line tool. This quickstart demonstrates how to execute it from Python using the `subprocess` module to convert a PDB file to PQR format. It creates a simple dummy PDB file, runs the `pdb2pqr` command, and then prints the output PQR file content. For real-world usage, the command-line arguments would be expanded to include options for force fields, pH calculation, hydrogen bonding optimization, etc."},"warnings":[{"fix":"Replace all calls to `pdb2pqr30` with `pdb2pqr` in your scripts.","message":"The primary executable name changed from `pdb2pqr30` to `pdb2pqr` in version 3.6.0. While `pdb2pqr30` is still available, it is slated for future deprecation. Users should update scripts to use `pdb2pqr` to ensure future compatibility.","severity":"breaking","affected_versions":">=3.6.0"},{"fix":"Ensure PDB files contain only one ligand to be parameterized or remove/ignore additional ligands. Delete solvent molecules (e.g., waters) before processing if they are not intended to be part of the PQR output.","message":"PDB2PQR has limitations regarding ligand processing, specifically it cannot handle more than one ligand per structure. This includes multiple copies of the same ligand, where only one will be processed. Additionally, residues not recognized by the chosen force field will be omitted from the output. Users should pre-process PDB files to remove unwanted residues (e.g., waters) or ensure only a single ligand is present.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your Python environment is compatible with the installed PDB2PQR version. For 3.7.1, use Python 3.11, 3.12, or 3.13.","message":"As of version 3.7.1, PDB2PQR requires Python versions `>=3.11` and `<4`. Older versions (e.g., v3.6.0) supported `>=3.8` to `3.11`. Upgrading PDB2PQR may necessitate updating your Python environment, and using it with unsupported Python versions can lead to installation or runtime errors.","severity":"gotcha","affected_versions":">=3.7.1"},{"fix":"Be aware of these limitations when processing structures with uncommon CHARMM protonation states or non-experimental origins. Manual review of the output may be necessary.","message":"There are confirmed issues with naming conventions when using the CHARMM force field for uncommon protonation states. There is also a potential problem when adding hydrogens to non-experimental computer-generated structures.","severity":"gotcha","affected_versions":">=3.6.2"},{"fix":"Install PDB2PQR locally and configure any dependent tools to use the local executable instead of the discontinued NBCR web service. The official web service is now at `server.poissonboltzmann.org`.","message":"The web service provided by the National Biomedical Computation Resource (NBCR) was discontinued on April 30, 2020. Any tools or scripts (e.g., older Chimera integrations) that relied on this specific web service will no longer function unless PDB2PQR is installed locally and configured to use a local backend.","severity":"deprecated","affected_versions":"All versions (if relying on the NBCR web service)"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}