Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ dev_tests/
/doc/.LaTeX/Manual.pdf*
/doc/.LaTeX/**/*.synctex*
/README.html

# Python cache
__pycache__/
*.pyc
.ipynb_checkpoints/
outputs/
.DS_Store
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
-Date
-Name
-changes
--------------
November 07, 2025
Name: Qihao Cheng
Changes: utils/pdos/, utils/atom/
1. Add projected density of states (PDOS) post-processing module, including configuration file, example scripts, and sample outputs.
2. Add atomic utilities and related submodules (mesh, pseudo, scf, xc, etc.) for standalone atomic DFT calculations.

--------------
October 03, 2025
Name: Sayan Bhowmik
Expand Down
2 changes: 1 addition & 1 deletion src/initialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -3722,7 +3722,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
}

fprintf(output_fp,"***************************************************************************\n");
fprintf(output_fp,"* SPARC (version October 03, 2025) *\n");
fprintf(output_fp,"* SPARC (version November 07, 2025) *\n");
fprintf(output_fp,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n");
fprintf(output_fp,"* Distributed under GNU General Public License 3 (GPL) *\n");
fprintf(output_fp,"* Start time: %s *\n",c_time_str);
Expand Down
22 changes: 22 additions & 0 deletions utils/atom/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Atomic DFT Solver Package

This package provides a comprehensive implementation of Atomic Density Functional Theory
solver using finite element method.

Main class:
AtomicDFTSolver: Main solver class for atomic DFT calculations

Example:
>>> from delta.atomic_dft import AtomicDFTSolver
>>> solver = AtomicDFTSolver(atomic_number=13, xc_functional="GGA_PBE")
>>> results = solver.solve()
"""

__version__ = "0.1.0"

# Main solver class
from .solver import AtomicDFTSolver

# Make AtomicDFTSolver easily accessible
__all__ = ["AtomicDFTSolver"]
1 change: 1 addition & 0 deletions utils/atom/delta/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .pipeline import DeltaLearningPipeline # noqa: F401
13 changes: 13 additions & 0 deletions utils/atom/delta/dataset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from __future__ import annotations
import numpy as np
from typing import Dict, Any

def save_delta_npz(path: str, snapshot, ref_v: Dict[str, np.ndarray], other_v: Dict[str, np.ndarray]) -> None:
"""Persist Δ-learning data to NPZ."""
np.savez_compressed(
path,
r=snapshot.r_quad, rho=snapshot.rho,
vx_ref=ref_v.get("vx"), vc_ref=ref_v.get("vc"),
vx_other=other_v.get("vx"), vc_other=other_v.get("vc"),
meta=snapshot.meta
)
12 changes: 12 additions & 0 deletions utils/atom/delta/pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from __future__ import annotations
from typing import Tuple, Dict, Any

class DeltaLearningPipeline:
"""High-level Δ-learning pipeline at fixed density snapshots. Placeholder."""
def __init__(self, solver, xc_evaluator):
self.solver = solver
self.xc_eval = xc_evaluator

def run_once(self, xc_ref: str, xc_other: str, include_tau: bool = False) -> Tuple[Any, Dict[str, Any], Dict[str, Any], Dict[str, Any]]:
"""Return (snapshot, ref_v, other_v, delta)."""
raise NotImplementedError
2 changes: 2 additions & 0 deletions utils/atom/mesh/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .builder import Quadrature1D, Mesh1D, LagrangeShapeFunctions # noqa: F401
from .operators import RadialOperatorsBuilder # noqa: F401
Loading
Loading