Skip to content

Incorrect Default Symmetry Operation in P1 Space Group Returns Three Projection Operations Instead of Identity #4230

Closed
@ztn9709

Description

@ztn9709

Python version

Python 3.12

Pymatgen version

2024.10.29

Operating system version

No response

Current behavior

When a structure does not contain any _symmetry_equiv_pos_as_xyz keys and pymatgen defaults to the P1 space group, the code currently generates three symmetry operations based on ("x", "y", "z"). This results in three separate projection operations along each axis rather than a single identity operation, which P1 space group should have.

in class pymatgen.io.cif.CifParser, method get_symops
if not sym_ops: msg = "No _symmetry_equiv_pos_as_xyz type key found. Defaulting to P1." warnings.warn(msg) self.warnings.append(msg) sym_ops = [SymmOp.from_xyz_str(s) for s in ("x", "y", "z")]

Expected Behavior

It should be: sym_ops = [SymmOp.from_xyz_str(s) for s in ["x,y,z"]] to get correct result.

Minimal example

No response

Relevant files to reproduce this bug

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions