deepmodeling / deepmodeling/tbplas

[Code scan] Forward c in make_graphene_rect's reshape path

Open Beginner friendly
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
19
Forks
6
PR merge metrics
No merged PRs in 30d

Description

This issue comes from a Codex global scan of deepmodeling/tbplas at commit 4d3652b3dba8eb930e4869a6d41074f62d703692.

Severity: Medium

`make_graphene_rect(from_scratch=False, c=...)` rebuilds the rectangular cell by reshaping a diamond graphene cell, but it calls `make_graphene_diamond(t=t)` without forwarding `c`. Callers who request a non-default c-axis get a reshaped cell based on `c=1.0` instead.

Code reference:
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/materials/graphene.py#L68-L71

Suggested fix: call `make_graphene_diamond(c=c, t=t)` in the reshape branch.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read tbplas/materials/graphene.py around lines 68-71 and trace the reshape branch of make_graphene_rect. Verify that a non-default c value is passed through to the diamond-cell construction and that the resulting rectangular cell uses that value.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.