CederGroupHub / chgnet

Pretrained universal neural network potential for charge-informed atomistic modeling https://chgnet.lbl.gov
https://doi.org/10.1038/s42256-023-00716-3
Other
220 stars 60 forks source link

More descriptive names for single-letter variables #42

Closed janosh closed 1 year ago

janosh commented 1 year ago

Just a stylistic PR but improves readability imo. Single-letter variable names are a pet peeve of mine. From personal experience, more descriptive variable names make code easier to maintain in the long run, esp. for people who didn't write the code originally.

janosh commented 1 year ago

Is this split() method used anywhere? How is it different from torch.split()?

https://github.com/CederGroupHub/chgnet/blob/ce85dee18764824ca492b7150ae37bcd81635312/chgnet/model/model.py#L608-L618

codacy-production[bot] commented 1 year ago

Coverage summary from Codacy

Merging #42 (ce85dee18764824ca492b7150ae37bcd81635312) into main (da7a8d1213251828b8a002eef808f2f237bdc053) - See PR on Codacy

Coverage variation Diff coverage
Report missing for da7a8d1213251828b8a002eef808f2f237bdc053[^1] 33.33%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (da7a8d1213251828b8a002eef808f2f237bdc053) | Report Missing | Report Missing | Report Missing | | | Head commit (ce85dee18764824ca492b7150ae37bcd81635312) | 1172 | 882 | 75.26% | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#42) | 12 | 4 | **33.33%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

[^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.