Dear Togo,

Good to see you here!

I spent the last two days groveling through spglib source looking for the best 
way to fix Avogadro's spacegroup support. There I learned about Hall symbols, 
which I didn't know about because The Big Giant Book of Spacegroups™ I have 
here does not mention them. According to [1], it's because I only have Volume 
A. Oh well, not being a crystallographer I learn as I go :)

Looking at OpenBabel source, it turns out it's not as limited as I first 
thought, it has a complete database, but very underdocumented API. Therefore, 
fixing the bug I wrote about in the is easily doable by enhancing spglib API.

I updated the bundled spglib to version 1.5.2 which includes spg_get_dataset() 
function. Having access to the Hall symbol, it is now possible to tell 
OpenBabel the exact spacegroup. Well, almost.

I propose the following changes to spglib:

A) Sanitizing string fields in SpglibDataset
The string fields in the database contain padding at the end. A null character 
should terminate the useful part of the string. For compatibility with 
OpenBabel, [1], and, possibly, other software, the '=' character in the Hall 
symbol should be replaced with '"'. After these two changes, 
OpenBabel::SpaceGroup::GetSpaceGroup() successfully returns the correct 
spacegroup object. In the long term, should spglib be compatible with [2]?

B) Allow access to the spglib data without knowing the full unit cell.
We need this in order to get symmetry operations when the unit cell is still 
incomplete and to provide more detailed choices in the GUI. There should be a 
function to fetch data given a Hall symbol, and an interface allowing 
iteration through all spacegroups. The data returned should include symmetry 
operations. One option is keeping SpglibDataset with cell-specific fields 
zeroed out, or maybe something like

  struct {
    SpacegroupType info;
    int n_operations;
    int (*rotations)[3][3];
    double (*translations)[3];
  };

C) There is additional data to take into account.
Please take a look at table 1 in [1]. OpenBabel uses these symbols in their 
data explicitly. Look at the space-groups.txt file installed with OpenBabel. 
They have 6 entries for P1, unlike spglib or, for that matter, table 6 in [1]. 
While I'm not sure what this means for spacegroup perception (does it have 
something to do with the origin_shift field?), I do know that spglib cannot 
return the Hall symbols required to identify those spacegroups to OpenBabel. 
What do you think?

[1] http://cci.lbl.gov/sginfo/hall_symbols.html
[2] http://cci.lbl.gov/sginfo/itvb_2001_table_a1427_hall_symbols.html

Regards,

Jure

On Wednesday 05 of February 2014 10:45:27 Atsushi Togo wrote:
> Dear Albert,
> 
> I'm a developer of spglib. Please let me know If you have some request
> or need some modification on spglib side for your convenience.
> 
> Best,
> 
> Togo
> 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel

Reply via email to