Skip to content

Detect Wyckoff positions automatically from coordinates#189

Merged
AndrewSazonov merged 55 commits into
developfrom
wyckoff-letter-detection
Jun 3, 2026
Merged

Detect Wyckoff positions automatically from coordinates#189
AndrewSazonov merged 55 commits into
developfrom
wyckoff-letter-detection

Conversation

@AndrewSazonov
Copy link
Copy Markdown
Member

When you build or load a crystal structure, EasyDiffraction now determines each atom site's Wyckoff letter and multiplicity automatically from its coordinates and space group, so you no longer have to enter them by hand. The full space-group Wyckoff table is also exposed as a read-only derived category — letter, multiplicity, site symmetry, and coordinates — and the detected multiplicity is used consistently across calculators and reports.

Existing projects and CIF files keep any Wyckoff letters you supplied, and structures whose space group is outside the bundled table still preserve their stored letters safely.

The branch also includes the completed space-group reference database (all 230 groups, with canonical Wyckoff coordinate templates) that this detection builds on.

@AndrewSazonov AndrewSazonov added the [scope] enhancement Adds/improves features (major.MINOR.patch) label Jun 3, 2026
@AndrewSazonov AndrewSazonov merged commit 4d9e315 into develop Jun 3, 2026
23 of 24 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 89.18129% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.09%. Comparing base (78721de) to head (38b3c1c).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...easydiffraction/crystallography/crystallography.py 85.14% 8 Missing and 7 partials ⚠️
...ablocks/structure/categories/atom_sites/default.py 84.78% 9 Missing and 5 partials ⚠️
...tructure/categories/space_group_wyckoff/default.py 96.38% 2 Missing and 1 partial ⚠️
src/easydiffraction/core/validation.py 66.66% 1 Missing and 1 partial ⚠️
src/easydiffraction/io/cif/iucr_writer.py 85.71% 1 Missing and 1 partial ⚠️
src/easydiffraction/analysis/calculators/cryspy.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #189      +/-   ##
===========================================
+ Coverage    85.99%   86.09%   +0.09%     
===========================================
  Files          258      262       +4     
  Lines        21764    22044     +280     
  Branches      2534     2570      +36     
===========================================
+ Hits         18717    18979     +262     
- Misses        2089     2102      +13     
- Partials       958      963       +5     
Flag Coverage Δ
integration 69.11% <70.76%> (-0.03%) ⬇️
unittests 80.02% <88.30%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easydiffraction/analysis/fitting.py 85.25% <100.00%> (ø)
src/easydiffraction/crystallography/__init__.py 100.00% <100.00%> (ø)
...ructure/categories/space_group_wyckoff/__init__.py 100.00% <100.00%> (ø)
...tructure/categories/space_group_wyckoff/factory.py 100.00% <100.00%> (ø)
.../easydiffraction/datablocks/structure/item/base.py 98.16% <100.00%> (+0.18%) ⬆️
src/easydiffraction/display/plotters/plotly.py 82.65% <100.00%> (-0.11%) ⬇️
src/easydiffraction/report/fit_plot.py 89.67% <100.00%> (+2.66%) ⬆️
src/easydiffraction/analysis/calculators/cryspy.py 78.06% <66.66%> (+0.09%) ⬆️
src/easydiffraction/core/validation.py 93.69% <66.66%> (-1.55%) ⬇️
src/easydiffraction/io/cif/iucr_writer.py 83.58% <85.71%> (+0.20%) ⬆️
... and 3 more

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant