Importing a .gve file into the indexer with indexer.readgvfile calls unitcell.cellfromstring to build a unitcell from the parameters at the top of the .gve file.
This means that, for .gve files with spacegroup-style symmetries, a str type symmetry is passed to the unitcell.__init__ method.
For numeric (i.e spacegroup) symmetries, this means we don't properly detect that a spacegroup is being supplied.
This patch fixes the bug - if the symmetry is a string, it checks if the string is a digit, and converts to int if possible before continuing the init.
Importing a .gve file into the indexer with
indexer.readgvfile
callsunitcell.cellfromstring
to build a unitcell from the parameters at the top of the .gve file. This means that, for .gve files with spacegroup-style symmetries, astr
type symmetry is passed to theunitcell.__init__
method. For numeric (i.e spacegroup) symmetries, this means we don't properly detect that a spacegroup is being supplied. This patch fixes the bug - if the symmetry is a string, it checks if the string is a digit, and converts to int if possible before continuing the init.