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

Open Beginner friendly
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

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.

Dominant language
No language data
Stars
19
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepmodeling/tbplas

All issues in deepmodeling/tbplas

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.