Skip to content

support Z'=1/3, 1/6 - #341

Open
KenHino wants to merge 1 commit into
MaterSim:masterfrom
KenHino:fix/hexagonal-site-symmetry
Open

KenHino wants to merge 1 commit into
MaterSim:masterfrom
KenHino:fix/hexagonal-site-symmetry

Conversation

@KenHino

@KenHino KenHino commented Sep 25, 2026

Copy link
Copy Markdown

Fix molecular placement on special Wyckoff positions of trigonal/hexagonal groups

Summary

pyxtal_molecule.get_orientations_in_wp returns no orientation for any special Wyckoff position of a trigonal or hexagonal space group (143–194), whatever the molecule's point group.
As a result, from_random cannot place a molecule on such a site and raises Symm_CompatibilityError, e.g. benzene (D6h) on the three-fold axis (6c) or the -3 site (3a) of R-3:

from pyxtal import pyxtal
c = pyxtal(molecular=True)
c.from_random(3, 148, ["Benzene"], [6], sites=[["6c"]])
# pyxtal.msg.Symm_CompatibilityError: Molecular symmetry is compatible with WP site

and Tris{2-[(2,6-dimethylphenyl)amino]ethyl}amine.

General positions and the inversion sites of the same groups are unaffected, which is why existing tests did not catch this.

Cause

get_orientations_in_wp and is_compatible_symmetry compare the site symmetry from Wyckoff_position.get_site_symm_wo_translation() against the molecule's Cartesian point-group operations.
That method returns the stored operations in fractional coordinates.
For hexagonal axes a 3-fold rotation is (-y, x-y, z), i.e. [[0,-1,0],[1,-1,0],[0,0,1]], which is not orthogonal.
OperationAnalyzer then cannot identify it as a rotation (type general, no axis), and PointGroupAnalyzer.is_valid_op applies it to Cartesian coordinates, which distorts the molecule, so every candidate orientation is rejected.

Changes

  • Wyckoff_position.get_site_symm_wo_translation gains space: Literal["fractional", "euclidean"] = "fractional". "euclidean" uses get_site_symm_ops(), which differs from the stored operations only when self.euclidean is set.
  • get_orientations_in_wp and is_compatible_symmetry request space="euclidean".
  • The default stays "fractional", because is_pure_translation compares the result with the fractional generators and must keep doing so. Behaviour for groups 1–142 and 195–230 is unchanged.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant