Metadata-Version: 2.4
Name: poraque
Version: 26.8.6
Summary: For machine-learned density functional
Project-URL: Homepage, https://github.com/seixas-research/poraque
Author-email: Leandro Seixas Rocha <leandro.rocha@ilum.cnpem.br>
License: MIT License
        
        Copyright (c) 2026 Leandro Seixas Rocha
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Requires-Dist: ase
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pytest
Requires-Dist: scipy
Requires-Dist: torch>=2.0
Description-Content-Type: text/markdown

<h1 align="center" style="margin-top:20px; margin-bottom:50px;">

<a href="https://github.com/seixas-research/poraque" target="_blank" rel="noopener noreferrer">
  <picture>
    <source srcset="https://raw.githubusercontent.com/seixas-research/poraque/refs/heads/main/assets/logo/logo_dark.png" media="(prefers-color-scheme: dark)">
    <source srcset="https://raw.githubusercontent.com/seixas-research/poraque/refs/heads/main/assets/logo/logo_light.png" media="(prefers-color-scheme: light)">
    <img src="https://raw.githubusercontent.com/seixas-research/poraque/refs/heads/main/assets/logo/logo_light.png" style="height: auto; width: auto; max-height: 100px; " alt="Poraquê logo">
  </picture>
</a>
</h1>

[![License: MIT](https://img.shields.io/github/license/seixas-research/poraque?color=green&style=for-the-badge)](LICENSE)

# Poraquê

Poraquê is a research code for electronic structure and machine learning on
3D scalar fields (external potential, charge density, kinetic energy density).

## Status

| Area | State |
| --- | --- |
| `poraque.fields` | 3D scalar fields (`EXTCAR`/`CHGCAR`/`TAUCAR`) on one shared grid |
| `poraque.fields.io` | Pluggable ingestion — VASP working; Quantum ESPRESSO and GPAW scaffolded |
| `poraque.ml` | Fourier Neural Operator pipeline, handles per-material grid shapes |
| Everything else | Legacy; being reorganized |

## Scripts

```bash
# Validate the external-potential model against reference VASP EXTCAR files
python scripts/validate_vasp_data.py --fit-sigma --form-factor

# Train the two neural operators (EXTCAR -> CHGCAR, CHGCAR -> TAUCAR)
python scripts/train_fno.py --resolution 32 --epochs 200
```

## Notes

- `plan/pi_fno.md` — roadmap for the physics-informed operator (PI-FNO).
- `plan/fno_physics.md` — how KS-DFT and OF-DFT relate to what the two models learn.

## Installation

```bash
git clone https://github.com/seixas-research/poraque.git
cd poraque
pip install -e .
```

## License

Open source under the [MIT License](LICENSE).
