# fitzkeelab/citrate-aunp-predict architecture

> Architecture diagram of the GitHub repository fitzkeelab/citrate-aunp-predict, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fitzkeelab/citrate-aunp-predict
- Repository: https://github.com/fitzkeelab/citrate-aunp-predict

## Overview

The repository predicts protein regions favorable for binding to citrate-capped gold nanoparticles. Users score residue accessibility into PDB B-factors, then can generate a surface-pseudoatom PDB from those scores and inspect the highest-scoring location. The two scoring scripts support either one selected chain or all chains. The README documents this workflow; the shown source confirms the NACCESS call and mesh-generation behavior. Sample PDBs are example data, not runtime components.

Main entry points: [`binding_surface.py`](https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/binding_surface.py) (Mesh generation), [`asa-alpha_bfac.py`](https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/asa-alpha_bfac.py) (Selected-chain scoring), [`asa-alpha_all_bfac.py`](https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/asa-alpha_all_bfac.py) (All-chain scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scoring["Residue scoring"]
  node_score_one["Selected-chain scoring<br/>[asa-alpha_bfac.py]"]
  node_score_all["All-chain scoring"]
  node_naccess["NACCESS"]
end

subgraph group_surface["Surface mapping"]
  node_surface_gen["Mesh generation<br/>[binding_surface.py]"]
end

subgraph group_outputs["PDB outputs"]
  node_scored_pdb["Scored PDB"]
  node_surface_pdb["Surface PDB"]
  node_peak["Peak score report"]
end

node_user(("Researcher"))

node_user -->|"selects chain"| node_score_one
node_user -->|"scores all chains"| node_score_all
node_score_one -->|"calculates RASA"| node_naccess
node_score_all -->|"calculates RASA"| node_naccess
node_score_one -->|"writes B-factors"| node_scored_pdb
node_score_all -->|"writes B-factors"| node_scored_pdb
node_user -->|"runs on scored PDB"| node_surface_gen
node_scored_pdb -->|"provides input"| node_surface_gen
node_surface_gen -->|"writes pseudoatoms"| node_surface_pdb
node_surface_gen -->|"prints maximum"| node_peak

click node_score_one "https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/asa-alpha_bfac.py"
click node_score_all "https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/asa-alpha_all_bfac.py"
click node_surface_gen "https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/binding_surface.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_score_one,node_score_all,node_naccess toneBlue
class node_surface_gen toneAmber
class node_scored_pdb,node_surface_pdb,node_peak toneMint
class node_user toneIndigo
```

## Components

### Residue scoring

- [Selected-chain scoring](https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/asa-alpha_bfac.py): `asa-alpha_bfac.py`
- [All-chain scoring](https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/asa-alpha_all_bfac.py): `asa-alpha_all_bfac.py`
- **NACCESS**

### Surface mapping

- [Mesh generation](https://github.com/fitzkeelab/citrate-aunp-predict/blob/main/binding_surface.py): `binding_surface.py`

### PDB outputs

- **Scored PDB**
- **Surface PDB**
- **Peak score report**

### Other components

- **Researcher**

## Connections

- Researcher → Selected-chain scoring: selects chain (evidence: `README.md`)
- Researcher → All-chain scoring: scores all chains (evidence: `README.md`)
- Selected-chain scoring → NACCESS: calculates RASA (evidence: `asa-alpha_bfac.py`)
- All-chain scoring → NACCESS: calculates RASA (evidence: `asa-alpha_all_bfac.py`)
- Selected-chain scoring → Scored PDB: writes B-factors (evidence: `asa-alpha_bfac.py`)
- All-chain scoring → Scored PDB: writes B-factors (evidence: `asa-alpha_all_bfac.py`)
- Researcher → Mesh generation: runs on scored PDB (evidence: `README.md`)
- Scored PDB → Mesh generation: provides input (evidence: `README.md`)
- Mesh generation → Surface PDB: writes pseudoatoms (evidence: `binding_surface.py`)
- Mesh generation → Peak score report: prints maximum (evidence: `binding_surface.py`)
