Skip to content

Commit 7de3566

Browse files
Merge pull request #255 from 1040403998/feat/add-qihao-pdos
2 parents 8508eba + 0f4d833 commit 7de3566

59 files changed

Lines changed: 32598 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ dev_tests/
1717
/doc/.LaTeX/Manual.pdf*
1818
/doc/.LaTeX/**/*.synctex*
1919
/README.html
20+
21+
# Python cache
22+
__pycache__/
23+
*.pyc
24+
.ipynb_checkpoints/
25+
outputs/
26+
.DS_Store

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
-Date
33
-Name
44
-changes
5+
--------------
6+
November 07, 2025
7+
Name: Qihao Cheng
8+
Changes: utils/pdos/, utils/atom/
9+
1. Add projected density of states (PDOS) post-processing module, including configuration file, example scripts, and sample outputs.
10+
2. Add atomic utilities and related submodules (mesh, pseudo, scf, xc, etc.) for standalone atomic DFT calculations.
11+
512
--------------
613
October 03, 2025
714
Name: Sayan Bhowmik

src/initialization.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3722,7 +3722,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
37223722
}
37233723

37243724
fprintf(output_fp,"***************************************************************************\n");
3725-
fprintf(output_fp,"* SPARC (version October 03, 2025) *\n");
3725+
fprintf(output_fp,"* SPARC (version November 07, 2025) *\n");
37263726
fprintf(output_fp,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n");
37273727
fprintf(output_fp,"* Distributed under GNU General Public License 3 (GPL) *\n");
37283728
fprintf(output_fp,"* Start time: %s *\n",c_time_str);

utils/atom/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""
2+
Atomic DFT Solver Package
3+
4+
This package provides a comprehensive implementation of Atomic Density Functional Theory
5+
solver using finite element method.
6+
7+
Main class:
8+
AtomicDFTSolver: Main solver class for atomic DFT calculations
9+
10+
Example:
11+
>>> from delta.atomic_dft import AtomicDFTSolver
12+
>>> solver = AtomicDFTSolver(atomic_number=13, xc_functional="GGA_PBE")
13+
>>> results = solver.solve()
14+
"""
15+
16+
__version__ = "0.1.0"
17+
18+
# Main solver class
19+
from .solver import AtomicDFTSolver
20+
21+
# Make AtomicDFTSolver easily accessible
22+
__all__ = ["AtomicDFTSolver"]

utils/atom/delta/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .pipeline import DeltaLearningPipeline # noqa: F401

utils/atom/delta/dataset.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from __future__ import annotations
2+
import numpy as np
3+
from typing import Dict, Any
4+
5+
def save_delta_npz(path: str, snapshot, ref_v: Dict[str, np.ndarray], other_v: Dict[str, np.ndarray]) -> None:
6+
"""Persist Δ-learning data to NPZ."""
7+
np.savez_compressed(
8+
path,
9+
r=snapshot.r_quad, rho=snapshot.rho,
10+
vx_ref=ref_v.get("vx"), vc_ref=ref_v.get("vc"),
11+
vx_other=other_v.get("vx"), vc_other=other_v.get("vc"),
12+
meta=snapshot.meta
13+
)

utils/atom/delta/pipeline.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from __future__ import annotations
2+
from typing import Tuple, Dict, Any
3+
4+
class DeltaLearningPipeline:
5+
"""High-level Δ-learning pipeline at fixed density snapshots. Placeholder."""
6+
def __init__(self, solver, xc_evaluator):
7+
self.solver = solver
8+
self.xc_eval = xc_evaluator
9+
10+
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]]:
11+
"""Return (snapshot, ref_v, other_v, delta)."""
12+
raise NotImplementedError

utils/atom/mesh/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .builder import Quadrature1D, Mesh1D, LagrangeShapeFunctions # noqa: F401
2+
from .operators import RadialOperatorsBuilder # noqa: F401

0 commit comments

Comments
 (0)