deepmodeling / deepmodeling/dftio

[Code scan] Allow scalar-cutoff AtomicData.from_points without atomic numbers

Open Beginner friendly
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

This issue comes from a Codex global repository scan.

## Problem
The neighbor-list helper unconditionally requires `atomic_numbers`:

https://github.com/deepmodeling/dftio/blob/c9d128f24a74ef2911e1a28f5640357488beb196/dftio/data/AtomicData.py#L994

That breaks scalar-cutoff construction where species are not needed. `AtomicData.from_points(pos=..., r_max=2.0)` should be able to build a graph from positions and a scalar cutoff, but it fails before the cutoff is used.

## Suggested fix
Require `atomic_numbers` only when `r_max` is species-dependent, such as a dict keyed by atom type. Scalar cutoff paths should not assert atomic numbers are present.

Contributor guide

Open the contributing guide

Research direction

Start in dftio/data/AtomicData.py around line 994 and trace how AtomicData.from_points handles r_max and atomic_numbers. Verify the scalar-cutoff path with positions and r_max=2.0, then confirm species-dependent cutoff inputs still require atomic_numbers. Done means scalar-cutoff graph construction no longer fails when atomic_numbers is omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.