# tommyhuangthu/evoef architecture

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

- Interactive diagram: https://gitdiagram.com/tommyhuangthu/evoef
- Repository: https://github.com/tommyhuangthu/evoef

## Overview

EvoEF is a command-line physical energy tool for protein structures. The principal workflow accepts a PDB and a command, then computes stability or binding energy, or produces repaired, hydrogen-optimized, or mutant models. The README also documents a mutation-analysis workflow that compares reference and mutant stability or binding scores. Source excerpts establish the CLI and core data/energy modules, but do not show most command implementations; those internal links are therefore omitted or marked unverified.

Main entry points: [`src/ProgramFunction.cpp`](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp) (Command operations), [`src/Structure.cpp`](https://github.com/tommyhuangthu/evoef/blob/master/src/Structure.cpp) (PDB structure), [`src/Residue.cpp`](https://github.com/tommyhuangthu/evoef/blob/master/src/Residue.cpp) (Residue model), [`src/Rotamer.cpp`](https://github.com/tommyhuangthu/evoef/blob/master/src/Rotamer.cpp) (Rotamer modeling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Command interface"]
  node_cli["CLI options<br/>[Main.cpp]"]
  node_commands["Command operations"]
end

subgraph group_structure["Structure modeling"]
  node_pdb["PDB structure<br/>[Structure.cpp]"]
  node_repair["Structure repair"]
  node_mutants["Mutant building"]
  node_hydrogens["Hydrogen optimization"]
  node_rotamers["Rotamer modeling<br/>[Rotamer.cpp]"]
end

subgraph group_scoring["Energy scoring"]
  node_energy["Energy calculations"]
  node_energy_terms["Energy function<br/>[EnergyFunction.cpp]"]
  node_stability["Stability score"]
  node_binding["Binding score"]
  node_eef_params["EEF1 parameters<br/>[EEF1Parameter.cpp]"]
  node_foldef_params["FOLDEF parameters"]
end

subgraph group_foundation["Molecular foundation"]
  node_atoms["Atom parameters<br/>[AtomParamsSet.cpp]"]
  node_topology["Residue topology"]
  node_residues["Residue model<br/>[Residue.cpp]"]
  node_chains["Chain model<br/>[Chain.cpp]"]
  node_design_sites["Design sites<br/>[DesignSite.cpp]"]
  node_utility["File and data utilities<br/>[Utility.cpp]"]
  node_geometry["Geometry calculations<br/>[GeometryCalc.cpp]"]
end

node_user(("User"))
node_score_output["Scores or models"]

node_user -->|"provides command"| node_cli
node_cli -->|"dispatches"| node_commands
node_commands -.->|"loads structure"| node_pdb
node_commands -.->|"runs repair"| node_repair
node_commands -.->|"builds mutants"| node_mutants
node_commands -.->|"optimizes hydrogens"| node_hydrogens
node_commands -.->|"computes stability"| node_stability
node_commands -.->|"computes binding"| node_binding
node_repair -.->|"uses rotamers"| node_rotamers
node_mutants -.->|"optimizes rotamers"| node_rotamers
node_hydrogens -.->|"uses rotamers"| node_rotamers
node_stability -.->|"scores structure"| node_energy
node_binding -.->|"scores interaction"| node_energy
node_energy -->|"uses terms"| node_energy_terms
node_pdb -->|"models chains"| node_chains
node_chains -->|"contains residues"| node_residues
node_residues -->|"loads atom parameters"| node_atoms
node_residues -->|"uses topology"| node_topology
node_pdb -->|"creates design sites"| node_design_sites
node_design_sites -->|"holds rotamers"| node_rotamers
node_energy_terms -->|"scores residues"| node_residues
node_atoms -->|"loads parameters"| node_eef_params
node_atoms -->|"loads parameters"| node_foldef_params
node_pdb -->|"reads coordinate file"| node_utility
node_energy_terms -.->|"uses geometry"| node_geometry
node_repair -->|"writes model"| node_score_output
node_mutants -->|"writes models"| node_score_output
node_hydrogens -->|"writes model"| node_score_output
node_stability -->|"returns score"| node_score_output
node_binding -->|"returns score"| node_score_output

click node_cli "https://github.com/tommyhuangthu/evoef/blob/master/src/Main.cpp"
click node_commands "https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp"
click node_pdb "https://github.com/tommyhuangthu/evoef/blob/master/src/Structure.cpp"
click node_repair "https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp"
click node_mutants "https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp"
click node_hydrogens "https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp"
click node_rotamers "https://github.com/tommyhuangthu/evoef/blob/master/src/Rotamer.cpp"
click node_energy "https://github.com/tommyhuangthu/evoef/blob/master/src/EnergyComputation.cpp"
click node_energy_terms "https://github.com/tommyhuangthu/evoef/blob/master/src/EnergyFunction.cpp"
click node_stability "https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp"
click node_binding "https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp"
click node_atoms "https://github.com/tommyhuangthu/evoef/blob/master/src/AtomParamsSet.cpp"
click node_topology "https://github.com/tommyhuangthu/evoef/blob/master/src/ResidueTopology.cpp"
click node_residues "https://github.com/tommyhuangthu/evoef/blob/master/src/Residue.cpp"
click node_chains "https://github.com/tommyhuangthu/evoef/blob/master/src/Chain.cpp"
click node_design_sites "https://github.com/tommyhuangthu/evoef/blob/master/src/DesignSite.cpp"
click node_eef_params "https://github.com/tommyhuangthu/evoef/blob/master/src/EEF1Parameter.cpp"
click node_foldef_params "https://github.com/tommyhuangthu/evoef/blob/master/src/FOLDEFParameter.cpp"
click node_utility "https://github.com/tommyhuangthu/evoef/blob/master/src/Utility.cpp"
click node_geometry "https://github.com/tommyhuangthu/evoef/blob/master/src/GeometryCalc.cpp"

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_cli,node_commands,node_user toneBlue
class node_pdb,node_repair,node_mutants,node_hydrogens,node_rotamers toneAmber
class node_energy,node_energy_terms,node_stability,node_binding,node_eef_params,node_foldef_params toneMint
class node_atoms,node_topology,node_residues,node_chains,node_design_sites,node_utility,node_geometry toneRose
class node_score_output toneIndigo
```

## Components

### Command interface

- [CLI options](https://github.com/tommyhuangthu/evoef/blob/master/src/Main.cpp): `src/Main.cpp`
- [Command operations](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp): `src/ProgramFunction.cpp`

### Structure modeling

- [PDB structure](https://github.com/tommyhuangthu/evoef/blob/master/src/Structure.cpp): `src/Structure.cpp`
- [Structure repair](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp): `src/ProgramFunction.cpp`
- [Mutant building](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp): `src/ProgramFunction.cpp`
- [Hydrogen optimization](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp): `src/ProgramFunction.cpp`
- [Rotamer modeling](https://github.com/tommyhuangthu/evoef/blob/master/src/Rotamer.cpp): `src/Rotamer.cpp`

### Energy scoring

- [Energy calculations](https://github.com/tommyhuangthu/evoef/blob/master/src/EnergyComputation.cpp): `src/EnergyComputation.cpp`
- [Energy function](https://github.com/tommyhuangthu/evoef/blob/master/src/EnergyFunction.cpp): `src/EnergyFunction.cpp`
- [Stability score](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp): `src/ProgramFunction.cpp`
- [Binding score](https://github.com/tommyhuangthu/evoef/blob/master/src/ProgramFunction.cpp): `src/ProgramFunction.cpp`
- [EEF1 parameters](https://github.com/tommyhuangthu/evoef/blob/master/src/EEF1Parameter.cpp): `src/EEF1Parameter.cpp`
- [FOLDEF parameters](https://github.com/tommyhuangthu/evoef/blob/master/src/FOLDEFParameter.cpp): `src/FOLDEFParameter.cpp`

### Molecular foundation

- [Atom parameters](https://github.com/tommyhuangthu/evoef/blob/master/src/AtomParamsSet.cpp): `src/AtomParamsSet.cpp`
- [Residue topology](https://github.com/tommyhuangthu/evoef/blob/master/src/ResidueTopology.cpp): `src/ResidueTopology.cpp`
- [Residue model](https://github.com/tommyhuangthu/evoef/blob/master/src/Residue.cpp): `src/Residue.cpp`
- [Chain model](https://github.com/tommyhuangthu/evoef/blob/master/src/Chain.cpp): `src/Chain.cpp`
- [Design sites](https://github.com/tommyhuangthu/evoef/blob/master/src/DesignSite.cpp): `src/DesignSite.cpp`
- [File and data utilities](https://github.com/tommyhuangthu/evoef/blob/master/src/Utility.cpp): `src/Utility.cpp`
- [Geometry calculations](https://github.com/tommyhuangthu/evoef/blob/master/src/GeometryCalc.cpp): `src/GeometryCalc.cpp`

### Other components

- **User**
- **Scores or models**

## Connections

- User → CLI options: provides command (evidence: `README.md`)
- CLI options → Command operations: dispatches (evidence: `src/Main.cpp`)
- Command operations → PDB structure: loads structure
- Command operations → Structure repair: runs repair (evidence: `src/ProgramFunction.cpp`)
- Command operations → Mutant building: builds mutants (evidence: `src/ProgramFunction.cpp`)
- Command operations → Hydrogen optimization: optimizes hydrogens (evidence: `src/ProgramFunction.cpp`)
- Command operations → Stability score: computes stability (evidence: `src/ProgramFunction.cpp`)
- Command operations → Binding score: computes binding (evidence: `src/ProgramFunction.cpp`)
- Structure repair → Rotamer modeling: uses rotamers
- Mutant building → Rotamer modeling: optimizes rotamers
- Hydrogen optimization → Rotamer modeling: uses rotamers
- Stability score → Energy calculations: scores structure
- Binding score → Energy calculations: scores interaction
- Energy calculations → Energy function: uses terms
- PDB structure → Chain model: models chains
- Chain model → Residue model: contains residues
- Residue model → Atom parameters: loads atom parameters
- Residue model → Residue topology: uses topology
- PDB structure → Design sites: creates design sites (evidence: `src/Structure.cpp`)
- Design sites → Rotamer modeling: holds rotamers
- Energy function → Residue model: scores residues
- Atom parameters → EEF1 parameters: loads parameters (evidence: `src/AtomParamsSet.cpp`)
- Atom parameters → FOLDEF parameters: loads parameters (evidence: `src/AtomParamsSet.cpp`)
- PDB structure → File and data utilities: reads coordinate file (evidence: `src/Structure.cpp`)
- Energy function → Geometry calculations: uses geometry
- Structure repair → Scores or models: writes model (evidence: `README.md`)
- Mutant building → Scores or models: writes models (evidence: `README.md`)
- Hydrogen optimization → Scores or models: writes model (evidence: `README.md`)
- Stability score → Scores or models: returns score (evidence: `README.md`)
- Binding score → Scores or models: returns score (evidence: `README.md`)
