# Molclaw Fix Pdb

> Repair and clean PDB files with PDBFixer, returning repaired file path and topology counts.

- **Type:** Skill
- **Install:** `agentstack add skill-internscience-molclaw-molclaw-fix-pdb`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [InternScience](https://agentstack.voostack.com/s/internscience)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [InternScience](https://github.com/InternScience)
- **Source:** https://github.com/InternScience/MolClaw/tree/main/skills/L1_tools/molclaw-fix-pdb

## Install

```sh
agentstack add skill-internscience-molclaw-molclaw-fix-pdb
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# PDBFixer Repair

Note: 
- Local files are not directly accessible by the server. Please upload them to the server using `molclaw-file-transfer` before execution. 
- For PDB file inputs, it is recommended to preprocess them using `molclaw-pdbfixer` before execution.
- Please refer to skill `molclaw-scp-server` to complete tool invocation.

## Usage

### 1. PDB Repair

The description of tool *fix_pdb*.

```tex
Repair a PDB file using PDBFixer, optionally clean or model missing parts, write the repaired PDB (unless `dry_run`), and return topology counts.
Args:
    input_path (str): Path to the source PDB file to repair.
    output_path (str|None): Optional output file path for the repaired PDB. If omitted the tool writes to a run-specific folder.
    add_hydrogens (bool): Add missing hydrogens after filling atoms (default: False).
    ph (float): pH value used when adding hydrogens (default: 7.0).
    remove_heterogens (bool): Remove heterogens/ligands (keeps waters unless `remove_water` True).
    remove_water (bool): Remove water molecules (default: False).
    replace_nonstandard (bool): Replace nonstandard residues with standard counterparts (default: False).
    keep_chains (List[str]|None): If provided, retain only these chain IDs.
    add_missing_residues (bool): Attempt to model missing residues before filling atoms (default: False).
    dry_run (bool): Validate operations without writing the repaired file (default: False).
Return:
    status (str): 'success' or 'error'.
    msg (str): Human-readable summary or error message.
    output_dir (str|None): Run-specific directory under tool_result/pdbfixer_result.
    output_file (str|None): Path to the repaired PDB file (None for dry runs or on error).
    atom_count (int|None): Total atoms in the repaired topology when available.
    residue_count (int|None): Total residues in the repaired topology when available.
    chain_count (int|None): Total chains in the repaired topology when available.
```

How to use tool *fix_pdb* :

```python
response = await client.session.call_tool(
    "fix_pdb",
    arguments={
        "input_path": "/path/to/input.pdb",
        "output_path": None,
        "add_hydrogens": True,
        "ph": 7.0,
        "remove_heterogens": False,
        "remove_water": False,
        "replace_nonstandard": False,
        "keep_chains": None,
        "add_missing_residues": False,
        "dry_run": True,
    }
)
result = client.parse_result(response)
output_file = result.get("output_file")

```

#### Example parameter sets

```python
# 1) Main mode: basic repair with hydrogens added (dry-run for validation)
{
    "input_path": "/path/to/input.pdb",
    "add_hydrogens": True,
    "dry_run": True
}

# 2) Variant mode: keep specific chains and remove waters, write output
{
    "input_path": "/path/to/input.pdb",
    "keep_chains": ["A", "B"],
    "remove_water": True,
    "dry_run": False
}
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [InternScience](https://github.com/InternScience)
- **Source:** [InternScience/MolClaw](https://github.com/InternScience/MolClaw)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-internscience-molclaw-molclaw-fix-pdb
- Seller: https://agentstack.voostack.com/s/internscience
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
