Skip to content

spglib-2.1.0 shows warnings when using get_spacegroup method but spglib-2.0.2 does not #336

@wangzyphysics

Description

@wangzyphysics

The spglib is an useful tool to analysis the symmetry information for giving structure.

Here we want to use the spglib to analysis the symmetry info of given structure by spglib.get_spacegroup and spglib.refine_cell method in some different tolerances including 0.00001, 0.0001, 0.001, 0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, but in spglib-2.1.0, it shows this:

spglib: No point group was found (line 405, /tmp/pip-install-wo87okks/spglib/src/pointgroup.c).
spglib: Attempt 0 tolerance = 1.000000e-03 failed(line 800, /tmp/pip-install-wo87okks/spglib/src/spacegroup.c).
spglib: No point group was found (line 405, /tmp/pip-install-wo87okks/spglib/src/pointgroup.c).
spglib: Attempt 1 tolerance = 9.500000e-04 failed(line 800, /tmp/pip-install-wo87okks/spglib/src/spacegroup.c).
spglib: No point group was found (line 405, /tmp/pip-install-wo87okks/spglib/src/pointgroup.c).
spglib: Attempt 2 tolerance = 9.025000e-04 failed(line 800, /tmp/pip-install-wo87okks/spglib/src/spacegroup.c).
spglib: No point group was found (line 405, /tmp/pip-install-wo87okks/spglib/src/pointgroup.c).
spglib: Attempt 3 tolerance = 8.573750e-04 failed(line 800, /tmp/pip-install-wo87okks/spglib/src/spacegroup.c).

but in older version such as spglib-2.0.2, this warning does not show

Here is the structure info and test script which can be used to repeat the warning above:

BN
1.0
  2.13478593     -0.00047962     -0.00000019
 -1.06780826      1.84853908     -0.00000019
 -0.00000004     -0.00000007      1.94254452
 B N
 1 1
direct
0.00002343  0.99997657  0.50000000
0.66667658  0.33332342  0.00000000
import spglib as spg
from ase.io import read

version = ".".join(map(str, spg.get_version()))
print(f"spg version: {version}")

atoms = read("POSCAR")
cell = atoms.cell
position = atoms.get_scaled_positions()
number = atoms.get_atomic_numbers()
print(spg.get_spacegroup((cell, position, number)))
print(spg.get_spacegroup((cell, position, number), 0.00001))
print(spg.get_spacegroup((cell, position, number), 0.0001))
print(spg.get_spacegroup((cell, position, number), 0.001))
print(spg.get_spacegroup((cell, position, number), 0.01))
print(spg.get_spacegroup((cell, position, number), 0.1))
print(spg.get_spacegroup((cell, position, number), 0.2))
print(spg.get_spacegroup((cell, position, number), 0.3))
print(spg.get_spacegroup((cell, position, number), 0.4))
print(spg.get_spacegroup((cell, position, number), 0.5))
print(spg.get_spacegroup((cell, position, number), 0.6))
print(spg.get_spacegroup((cell, position, number), 0.7))
print(spg.get_spacegroup((cell, position, number), 0.8))

Is this a bug? or something that i did to occur this?

Looking forward to a reply, thx~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions