# vahtras/loprop architecture

> Architecture diagram of the GitHub repository vahtras/loprop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vahtras/loprop
- Repository: https://github.com/vahtras/loprop

## Overview

##### Main Components

a) Input Processing Layer
- File handlers for Dalton output files (.tar.gz)
- Configuration parsers for input parameters

b) Core Processing Components
- LoProp algorithm implementation (loprop/core.py)
- Quantum chemistry interfaces
- Dalton interface (loprop/dalton.py)
- VeloxChem interface (loprop/veloxchem.py)

c) Calculation Modules
- Atomic dipoles calculator
- Quadrupoles calculator
- Polarizabilities calculator

d) Output Generation
- Results formatter
- File writers

**[Input Files] → [Input Processing Layer]**
- ↓
**[Configuration] → [Core Processing Engine] ← [Quantum Chemistry Interfaces]**
- ↓
- [Calculation Modules]
- ↓
- [Output Generation]

##### Specific Elements

a) Input Section:
- Dalton output files (.tar.gz)
- Command-line parameters
- Configuration options

b) Processing Section:
- Interfaces to quantum chemistry programs
- Data transformation flows

c) Calculation Section:
- Data flow between calculations

d) Output Section:
- Results formatting
- File output generation

##### Important Relationships to Highlight

- Data flow from input files through the processing pipeline
- Interaction between the core engine and quantum chemistry interfaces
- Demonstrate how different calculation modules interact with the core engine
- Flow of results to output generation

##### Technical Details

- Python dependencies (numpy, scipy)
- File format specifications
- Key computational algorithms
- Testing framework integration

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        IF[Input Files]
        CP[Command Line Parameters]
        CF[Configuration]
    end

    subgraph Processing
        IPL[Input Processing Layer]
        CPE[Core Processing Engine]:::core
        QCI[Quantum Chemistry Interfaces]
        
        subgraph "QC Interfaces"
            DI[Dalton Interface]:::qc
            VI[VeloxChem Interface]:::qc
        end
    end

    subgraph Calculation
        AD[Atomic Dipoles]
        QD[Quadrupoles]
        PL[Polarizabilities]
    end

    subgraph Output
        RF[Results Formatter]
        FW[File Writers]
    end

    subgraph Testing
        TF[Testing Framework]:::test
        WT[Water Tests]:::test
        MT[Methane Tests]:::test
        BT[Bond Tests]:::test
        EH[Exception Tests]:::test
    end

    subgraph CI/CD
        CC[CircleCI]:::ci
        GA[GitHub Actions]:::ci
        TC[Travis CI]:::ci
    end

    IF --> IPL
    CP --> IPL
    CF --> IPL
    IPL --> CPE
    QCI --> CPE
    DI --> QCI
    VI --> QCI
    CPE --> AD
    CPE --> QD
    CPE --> PL
    AD --> RF
    QD --> RF
    PL --> RF
    RF --> FW

    classDef core fill:#90EE90
    classDef qc fill:#D3D3D3
    classDef test fill:#FFB6C1
    classDef ci fill:#ADD8E6

    click CPE "https://github.com/vahtras/loprop/blob/master/loprop/core.py"
    click DI "https://github.com/vahtras/loprop/blob/master/loprop/dalton.py"
    click VI "https://github.com/vahtras/loprop/blob/master/loprop/veloxchem.py"
    click TF "https://github.com/vahtras/loprop/tree/master/tests/"
    click WT "https://github.com/vahtras/loprop/tree/master/tests/h2o/"
    click MT "https://github.com/vahtras/loprop/tree/master/tests/ch4_absorption/"
    click BT "https://github.com/vahtras/loprop/blob/master/tests/test_bond.py"
    click EH "https://github.com/vahtras/loprop/blob/master/tests/test_exceptions.py"
    click CC "https://github.com/vahtras/loprop/blob/master/.circleci/config.yml"
    click GA "https://github.com/vahtras/loprop/blob/master/.github/workflows/pythonapp.yml"
    click TC "https://github.com/vahtras/loprop/blob/master/.travis.yml"
```
