Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

Unlisted patch versions (e.g. v0.7.1, v0.7.3, v0.7.6, v0.7.7) contain only dependency or build updates with no user-visible changes.

## Unreleased

### moyo

- Fix swapped arithmetic crystal class numbers 56 and 57 for space groups 187-190: `-6m2P` is No. 56 and `-62mP` is No. 57 per International Tables for Crystallography, Volume C (2004), Table 1.4.2.1. The symbols reported for these space groups were already correct; only the numbers exposed via `MoyoDataset` and `moyopy.SpaceGroupType.arithmetic_number` change. Same fix as spglib/spglib#632 (#398)

## v0.14.0 - 2026-07-04

### moyo
Expand Down
4 changes: 2 additions & 2 deletions moyo/src/data/arithmetic_crystal_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ const ARITHMETIC_CRYSTAL_CLASS_DATABASE: [ArithmeticCrystalClassEntry; 73] = [
ArithmeticCrystalClassEntry::new(53, "6/mP", GeometricCrystalClass::C6h, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(54, "622P", GeometricCrystalClass::D6, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(55, "6mmP", GeometricCrystalClass::C6v, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(56, "-62mP", GeometricCrystalClass::D3h, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(57, "-6m2P", GeometricCrystalClass::D3h, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(56, "-6m2P", GeometricCrystalClass::D3h, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(57, "-62mP", GeometricCrystalClass::D3h, BravaisClass::hP),
ArithmeticCrystalClassEntry::new(58, "6/mmmP", GeometricCrystalClass::D6h, BravaisClass::hP),
// Crystal system: cubic
ArithmeticCrystalClassEntry::new(59, "23P", GeometricCrystalClass::T, BravaisClass::cP),
Expand Down
31 changes: 27 additions & 4 deletions moyo/src/data/hall_symbol_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3874,7 +3874,7 @@ static HALL_SYMBOL_DATABASE: [HallSymbolEntry; 530] = [
HallSymbolEntry::new(
481,
187,
57,
56,
"",
"P -6 2",
"P -6 m 2",
Expand All @@ -3884,7 +3884,7 @@ static HALL_SYMBOL_DATABASE: [HallSymbolEntry; 530] = [
HallSymbolEntry::new(
482,
188,
57,
56,
"",
"P -6c 2",
"P -6 c 2",
Expand All @@ -3894,7 +3894,7 @@ static HALL_SYMBOL_DATABASE: [HallSymbolEntry; 530] = [
HallSymbolEntry::new(
483,
189,
56,
57,
"",
"P -6 -2",
"P -6 2 m",
Expand All @@ -3904,7 +3904,7 @@ static HALL_SYMBOL_DATABASE: [HallSymbolEntry; 530] = [
HallSymbolEntry::new(
484,
190,
56,
57,
"",
"P -6c -2c",
"P -6 2 c",
Expand Down Expand Up @@ -4349,6 +4349,7 @@ static HALL_SYMBOL_DATABASE: [HallSymbolEntry; 530] = [
#[cfg(test)]
mod tests {
use super::{HALL_SYMBOL_DATABASE, HallSymbolEntry};
use crate::data::arithmetic_crystal_class::arithmetic_crystal_class_entry;
use crate::data::hall_symbol::HallSymbol;

fn iter_hall_symbol_entry() -> impl Iterator<Item = &'static HallSymbolEntry> {
Expand All @@ -4362,4 +4363,26 @@ mod tests {
assert_eq!(48 % hs.traverse().len(), 0);
}
}

#[test]
fn test_arithmetic_crystal_class_for_sg_187_to_190() {
// International Tables for Crystallography, Volume C (2004), Table 1.4.2.1
let expected = [
(187, 56, "-6m2P"),
(188, 56, "-6m2P"),
(189, 57, "-62mP"),
(190, 57, "-62mP"),
];
for (number, arithmetic_number, symbol) in expected {
for entry in iter_hall_symbol_entry().filter(|entry| entry.number == number) {
assert_eq!(entry.arithmetic_number, arithmetic_number);
assert_eq!(
arithmetic_crystal_class_entry(entry.arithmetic_number)
.unwrap()
.symbol,
symbol
);
}
}
}
}
4 changes: 2 additions & 2 deletions moyo/src/data/point_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ impl PointGroupRepresentative {
53 => 469,
54 => 471,
55 => 477,
56 => 483,
57 => 481,
56 => 481,
57 => 483,
58 => 485,
// Cubic
59 => 489,
Expand Down
Loading