Some symmetry operations fail to honor spacegroup setting

CA+=3De1ovv5yTeHD7SU=3DDgX1ktfJ68BJiUKvp6_26e33XDAcFx1Q@mail.gmail.com
Content-Type: text/plain; charset=3D"iso-8859-1"

Hi Jure,

Thanks for offering to fix up some of the rough edges here, any
contributions are greatly appreciated!

The eigen fix looks reasonable, but surprising that it didn’t get =
inherited
from a higher level directory.

For now, you might be better off basing your work off of master. The
QuantumEspresso patch needs some attention to see if it will work on all
platforms and there hasn’t been much activity on it in a while.

Dave

On Tue, Feb 4, 2014 at 5:39 AM, Jure Varlec jure.varlec@ki.si wrote:

Also, I had to add an include path for Eigen to fix building, do I
have
to make a separate branch for that single commit?
I’m not sure why that (adding an Eigen include path) would be =
necessary.
That should be covered by CMake. Why don’t you comment on your =
problems
with Eigen and we’ll see if it can be fixed outside of a patch.
=20
Well, CMake finds both Eigen2 and Eigen3, but build fails with ‘fatal
error:
Eigen/Core: No such file or directory’ unless I patch it with
=20
diff --git a/libavogadro/src/colors/CMakeLists.txt
b/libavogadro/src/colors/CMakeLists.txt
index a967516…c0836a8 100644
— a/libavogadro/src/colors/CMakeLists.txt
+++ b/libavogadro/src/colors/CMakeLists.txt
@@ -6,7 +6,7 @@ ADD_DEFINITIONS(-DQT_SHARED)
=20
set(DESTINATION_DIR {Avogadro_PLUGIN_INSTALL_DIR}/colors) =20 -include_directories({CMAKE_CURRENT_BINARY_DIR})
+include_directories({CMAKE_CURRENT_BINARY_DIR} {EIGEN_INCLUDE_DIR})
=20
set(LINK_LIBS avogadro)
set(PLUGIN_LABEL colors)


=20
=20
=20

--------------------------------------------------------------------------=

Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
=20

http://pubads.g.doubleclick.net/gampad/clk?id=3D121051231&iu=3D/4140/ostg.=
clktrk


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options

Dear avogadro developers,

I noticed that some symmetry code in the crystallography extension relies on
spglib and some relies on openbabel. This is problematic because it turns out
that openbabel fails to honor the spacegroup setting.

The material I work with has spacegroup 148 and rhombohedral cell. When I use
the Perceive Spacegroup action which uses spglib, it is perceived correctly.
However, the Fill Unit Cell action which uses openbabel to generate symmetry
operations gets it wrong. It generates 18 operations, which, if I’m reading
the tables correctly, corresponds to the hexagonal setting of spacegroup 148,
whereas the rhombohedral setting has 6 operations.

I wrote a short python script using pyspglib and it seems to work. I propose
to move more code in the cyrstallography extension to spglib. I’m willing to
do the work (at least some of it), starting with the Fill Unit Cell action.

My question is, how to go about this, gerrit-wise? This is the first time I’m
dealing with gerrit. There seem to be changes to AvoSpg yet to be merged, e.g.
in the QuantumEspressoInput branch. Should my branch depend on that one or
should I base it on master? Also, I had to add an include path for Eigen to
fix building, do I have to make a separate branch for that single commit? Is
there an easy way to check if an unmerged branch fixes the same problem?

Best regards
Jure Varlec

I wrote a short python script using pyspglib and it seems to work. I propose
to move more code in the cyrstallography extension to spglib. I’m willing to
do the work (at least some of it), starting with the Fill Unit Cell action.

Great, thanks!

My question is, how to go about this, gerrit-wise? This is the first time I’m
dealing with gerrit. There seem to be changes to AvoSpg yet to be merged, e.g.
in the QuantumEspressoInput branch. Should my branch depend on that one or
should I base it on master?

I’d base on master. Your code is likely to fall into the Crystallography extension itself, where that code makes the AvoSpg code available outside (e.g., to the Quantum Espresso extension).

Also, I had to add an include path for Eigen to fix building, do I have to make a separate branch for that single commit?

I’m not sure why that (adding an Eigen include path) would be necessary. That should be covered by CMake. Why don’t you comment on your problems with Eigen and we’ll see if it can be fixed outside of a patch.

Is there an easy way to check if an unmerged branch fixes the same problem?

I’ll leave that to someone with more Gerrit-fu. Based on what’s not merged in the Avogadro queue, I’d say “no.”

Thanks — this sounds great! (I think we’ve all assumed there would be bugs in handling space groups, so I’m glad to know of this one.)

Best regards,
-Geoff

Also, I had to add an include path for Eigen to fix building, do I have
to make a separate branch for that single commit?
I’m not sure why that (adding an Eigen include path) would be necessary.
That should be covered by CMake. Why don’t you comment on your problems
with Eigen and we’ll see if it can be fixed outside of a patch.

Well, CMake finds both Eigen2 and Eigen3, but build fails with ‘fatal error:
Eigen/Core: No such file or directory’ unless I patch it with

diff --git a/libavogadro/src/colors/CMakeLists.txt
b/libavogadro/src/colors/CMakeLists.txt
index a967516…c0836a8 100644
— a/libavogadro/src/colors/CMakeLists.txt
+++ b/libavogadro/src/colors/CMakeLists.txt
@@ -6,7 +6,7 @@ ADD_DEFINITIONS(-DQT_SHARED)

set(DESTINATION_DIR ${Avogadro_PLUGIN_INSTALL_DIR}/colors)

-include_directories({CMAKE_CURRENT_BINARY_DIR}) +include_directories({CMAKE_CURRENT_BINARY_DIR} ${EIGEN_INCLUDE_DIR})

set(LINK_LIBS avogadro)
set(PLUGIN_LABEL colors)

Hi Jure,

Thanks for offering to fix up some of the rough edges here, any
contributions are greatly appreciated!

The eigen fix looks reasonable, but surprising that it didn’t get inherited
from a higher level directory.

For now, you might be better off basing your work off of master. The
QuantumEspresso patch needs some attention to see if it will work on all
platforms and there hasn’t been much activity on it in a while.

Dave

On Tue, Feb 4, 2014 at 5:39 AM, Jure Varlec jure.varlec@ki.si wrote:

Also, I had to add an include path for Eigen to fix building, do I
have
to make a separate branch for that single commit?
I’m not sure why that (adding an Eigen include path) would be necessary.
That should be covered by CMake. Why don’t you comment on your problems
with Eigen and we’ll see if it can be fixed outside of a patch.

Well, CMake finds both Eigen2 and Eigen3, but build fails with ‘fatal
error:
Eigen/Core: No such file or directory’ unless I patch it with

diff --git a/libavogadro/src/colors/CMakeLists.txt
b/libavogadro/src/colors/CMakeLists.txt
index a967516…c0836a8 100644
— a/libavogadro/src/colors/CMakeLists.txt
+++ b/libavogadro/src/colors/CMakeLists.txt
@@ -6,7 +6,7 @@ ADD_DEFINITIONS(-DQT_SHARED)

set(DESTINATION_DIR ${Avogadro_PLUGIN_INSTALL_DIR}/colors)

-include_directories({CMAKE_CURRENT_BINARY_DIR}) +include_directories({CMAKE_CURRENT_BINARY_DIR} ${EIGEN_INCLUDE_DIR})

set(LINK_LIBS avogadro)
set(PLUGIN_LABEL colors)


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
avogadro-devel List Signup and Options

On Tue, Feb 4, 2014 at 5:39 AM, Jure Varlec jure.varlec@ki.si wrote:

Also, I had to add an include path for Eigen to fix building, do I have
to make a separate branch for that single commit?
I’m not sure why that (adding an Eigen include path) would be necessary.
That should be covered by CMake. Why don’t you comment on your problems
with Eigen and we’ll see if it can be fixed outside of a patch.

Well, CMake finds both Eigen2 and Eigen3, but build fails with ‘fatal error:
Eigen/Core: No such file or directory’ unless I patch it with

diff --git a/libavogadro/src/colors/CMakeLists.txt
b/libavogadro/src/colors/CMakeLists.txt
index a967516…c0836a8 100644
— a/libavogadro/src/colors/CMakeLists.txt
+++ b/libavogadro/src/colors/CMakeLists.txt
@@ -6,7 +6,7 @@ ADD_DEFINITIONS(-DQT_SHARED)

set(DESTINATION_DIR ${Avogadro_PLUGIN_INSTALL_DIR}/colors)

-include_directories({CMAKE_CURRENT_BINARY_DIR}) +include_directories({CMAKE_CURRENT_BINARY_DIR} ${EIGEN_INCLUDE_DIR})

set(LINK_LIBS avogadro)
set(PLUGIN_LABEL colors)

Are you building with Eigen 2 or 3? I just looked at master, and
libavogadro/src/CMakeLists.txt adds it to the include directories, the
same is not true for Eigen 3. There are still a number of rough edges
with the Eigen 3 support, we should take a pass at getting that to
build consistently. A lot of people (myself included) have Eigen
installed and can miss this.

I also don’t see anything that defines EIGEN_INCLUDE_DIR, both
variants have the major version number. Hope that helps.

Marcus

On Tuesday 04 of February 2014 09:56:01 Marcus D. Hanwell wrote:

Are you building with Eigen 2 or 3? I just looked at master, and
libavogadro/src/CMakeLists.txt adds it to the include directories, the
same is not true for Eigen 3. There are still a number of rough edges
with the Eigen 3 support, we should take a pass at getting that to
build consistently. A lot of people (myself included) have Eigen
installed and can miss this.

I also don’t see anything that defines EIGEN_INCLUDE_DIR, both
variants have the major version number. Hope that helps.

I’m building with both. Although Eigen is a header-only library, I’m running
Gentoo so both versions need to be installed as build-time dependencies of
various packages, they are at /usr/include/eigen{2,3}

Actually, when I touched one of CMakeLists and caused a reconfiguration, the
problem popped out elsewhere, then disappeared later. It seems that, starting
with an empty build directory, I have to run CMake twice, then it builds
successfully. This behaviour seems to be consistent.

Thanks
Jure

On Tue, Feb 4, 2014 at 10:45 AM, Jure Varlec jure.varlec@ki.si wrote:

On Tuesday 04 of February 2014 09:56:01 Marcus D. Hanwell wrote:

Are you building with Eigen 2 or 3? I just looked at master, and
libavogadro/src/CMakeLists.txt adds it to the include directories, the
same is not true for Eigen 3. There are still a number of rough edges
with the Eigen 3 support, we should take a pass at getting that to
build consistently. A lot of people (myself included) have Eigen
installed and can miss this.

I also don’t see anything that defines EIGEN_INCLUDE_DIR, both
variants have the major version number. Hope that helps.

I’m building with both. Although Eigen is a header-only library, I’m running
Gentoo so both versions need to be installed as build-time dependencies of
various packages, they are at /usr/include/eigen{2,3}

Actually, when I touched one of CMakeLists and caused a reconfiguration, the
problem popped out elsewhere, then disappeared later. It seems that, starting
with an empty build directory, I have to run CMake twice, then it builds
successfully. This behaviour seems to be consistent.

It is, I will see if I can reproduce. I don’t even see where
EIGEN_INCLUDE_DIR would get defined, and how it would solve any
problem. A git grep for it in the source tree turns up nothing, and we
should consistently choose Eigen 2 or 3 - mixing the two would not end
well.

Thanks for your feedback, I will try to dig a little deeper when I
have some time and see if we can clean things up a little more.

Marcus

Hi guys,

I don’t have a Windows machine to test the QuantumEspresso patch, but is there something I can do to help this along?

Jure, the QuantumEspresso patch does change some details about how spglib is integrated into Avogadro, but I believe I could re-work any changes you need to make back into the QuantumEspresso patch.

Finally, it might be easier to just prepare QuantumEspresso for Avogadro 2. There is already some python support for spglib, so it seems reasonable that I could move the the whole input builder into python fro use in Avogadro 2.

Albert

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

On Wed, Feb 5, 2014 at 2:20 AM, Albert DeFusco defusco@pitt.edu wrote:

Hi guys,

I don’t have a Windows machine to test the QuantumEspresso patch, but is there something I can do to help this along?

Jure, the QuantumEspresso patch does change some details about how spglib is integrated into Avogadro, but I believe I could re-work any changes you need to make back into the QuantumEspresso patch.

Finally, it might be easier to just prepare QuantumEspresso for Avogadro 2. There is already some python support for spglib, so it seems reasonable that I could move the the whole input builder into python fro use in Avogadro 2.

Albert

Message: 8
Date: Tue, 4 Feb 2014 08:56:49 -0500
From: David Lonie david.lonie@kitware.com
Subject: Re: [Avogadro-devel] Some symmetry operations fail to honor
spacegroup setting
To: Jure Varlec jure.varlec@ki.si
Cc: Avogadro-devel Devel avogadro-devel@lists.sourceforge.net
Message-ID:
CA+=e1ovv5yTeHD7SU=DgX1ktfJ68BJiUKvp6_26e33XDAcFx1Q@mail.gmail.com
Content-Type: text/plain; charset=“iso-8859-1”

Hi Jure,

Thanks for offering to fix up some of the rough edges here, any
contributions are greatly appreciated!

The eigen fix looks reasonable, but surprising that it didn’t get inherited
from a higher level directory.

For now, you might be better off basing your work off of master. The
QuantumEspresso patch needs some attention to see if it will work on all
platforms and there hasn’t been much activity on it in a while.

Dave

On Tue, Feb 4, 2014 at 5:39 AM, Jure Varlec jure.varlec@ki.si wrote:

Also, I had to add an include path for Eigen to fix building, do I
have
to make a separate branch for that single commit?
I’m not sure why that (adding an Eigen include path) would be necessary.
That should be covered by CMake. Why don’t you comment on your problems
with Eigen and we’ll see if it can be fixed outside of a patch.

Well, CMake finds both Eigen2 and Eigen3, but build fails with ‘fatal
error:
Eigen/Core: No such file or directory’ unless I patch it with

diff --git a/libavogadro/src/colors/CMakeLists.txt
b/libavogadro/src/colors/CMakeLists.txt
index a967516…c0836a8 100644
— a/libavogadro/src/colors/CMakeLists.txt
+++ b/libavogadro/src/colors/CMakeLists.txt
@@ -6,7 +6,7 @@ ADD_DEFINITIONS(-DQT_SHARED)

set(DESTINATION_DIR ${Avogadro_PLUGIN_INSTALL_DIR}/colors)

-include_directories({CMAKE_CURRENT_BINARY_DIR}) +include_directories({CMAKE_CURRENT_BINARY_DIR} ${EIGEN_INCLUDE_DIR})

set(LINK_LIBS avogadro)
set(PLUGIN_LABEL colors)


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
avogadro-devel List Signup and Options


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
avogadro-devel List Signup and Options


Atsushi Togo
http://atztogo.github.com/
atz.togo@gmail.com

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 :slight_smile:

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] Concise Space-Group Symbols
[2] ITVB 2001 Table A1.4.2.7 Hall symbols

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

On Tue, Feb 4, 2014 at 12:20 PM, Albert DeFusco defusco@pitt.edu wrote:

Hi guys,

I don’t have a Windows machine to test the QuantumEspresso patch, but is
there something I can do to help this along?

I’ll make a note to go through and test it out on windows. If I don’t hit
any issues I’ll go ahead and merge it in.

Finally, it might be easier to just prepare QuantumEspresso for Avogadro 2.

There is already some python support for spglib, so it seems reasonable
that I could move the the whole input builder into python fro use in
Avogadro 2.

That’d be cool – it would be a good test of the new scripted input
generator system. I’ll still try to get it into Avogadro 1.

Dear Jure,

I got the crystallographic database from
http://pmsl.planet.sci.kobe-u.ac.jp/~seto/?page_id=37&lang=en .

A) I’m not very familiar with C language. For example how should I do?
"R 3 -2=c " → "R 3 -2"c\0 " is a safe way in C?
B) The symmetry database assumes the crystal structure is set with one
of standard origins and one of sets of axes, i.e., numerical symmetry
operations change by the choices of them. The crystal structure a user
defines may not follow a good crystallographic manner. How do you use
the database in this case?
C) I saw this.

You say “They have 6 entries for P1”, but this sounds for me
crystallographically very strange. Table 1 in [1] just gives cetring
information, but there is no cetring for P1.

Best regards,

Togo

On Wed, Feb 5, 2014 at 7:56 PM, Jure Varlec jure.varlec@ki.si wrote:

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 :slight_smile:

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] Concise Space-Group Symbols
[2] ITVB 2001 Table A1.4.2.7 Hall symbols

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
avogadro-devel List Signup and Options


Atsushi Togo
http://atztogo.github.com/
atz.togo@gmail.com

Dear Togo,

A) Correct, C strings are null-terminated, meaning that string methods stop on
the first null character regardless of buffer size.

B) You are right, of course. Shows I’m a newbie :slight_smile: . But anyway, there should
be a way to get at the data. It’s up to the user to specify the needed
information. The current Set Spacegroup dialog in Avogadro is simply
inadequate. For an example, look at the screenshot from VESTA[1]. The GUI has
to present available options, therefore it must know about them. What do you
propose we do? Have Avogadro know about all possibilities, generate an
archetypal unit cell and pass it to spglib? Or have spglib generate possible
options and have Avogadro simply wrap them in a GUI? I haven’t thought this
through yet (it’s not my immediate concern), but I’m willing to implement a
GUI if someone helps me with a crystallographic point of view.

C) scratches head Well, you know this stuff way better than I do, so if
there’s no way to get a Hall symbol that’s not in spglib’s database, I’m OK.

[1]https://oblak.varlec.si/public.php?service=files&t=d431f5fb77db6a2e106ecc95eebf3b73

PS: what’s the attachment policy on this list?

Regards,

Jure

On Wednesday 05 of February 2014 23:19:37 Atsushi Togo wrote:

Dear Jure,

I got the crystallographic database from
http://pmsl.planet.sci.kobe-u.ac.jp/~seto/?page_id=37&lang=en .

A) I’m not very familiar with C language. For example how should I do?
"R 3 -2=c " → "R 3 -2"c\0 " is a safe way in C?
B) The symmetry database assumes the crystal structure is set with one
of standard origins and one of sets of axes, i.e., numerical symmetry
operations change by the choices of them. The crystal structure a user
defines may not follow a good crystallographic manner. How do you use
the database in this case?
C) I saw this.
openbabel/data/space-groups.txt at master · openbabel/openbabel · GitHub
You say “They have 6 entries for P1”, but this sounds for me
crystallographically very strange. Table 1 in [1] just gives cetring
information, but there is no cetring for P1.

Best regards,

Togo

Dear Jure,

A) OK. Thanks.
B) I’m fine to make a spglib interface to access the database. I will
work on that. Then, even if you have database, the design of GUI would
be e not easy. At least the designer should know the basic of
crystallography, then you have to very restrict the possible inputs of
lattice parameters and atomic positions to the standard settings. Most
users don’t know those crystallographic standard, so if you offer too
much freedoms to users, you may get a lot of questions from those
users. If you ignore crystallographic definitions and conventions, the
computer program breaks down mathematically.
C) My English skill is not enough to understand that you wrote. Hall
symbol proposes possible sets of symmetry operations with respect to
the choices of standard origins and axes. What I meant was, for
example No. 5 shown below, that there are 9 different ways to
represent it and you can recover 9 different sets of symmetry
operations from those Hall symbols following information of tables in
Concise Space-Group Symbols , i.e. Hall symbols are
very condensed way to represent matrix representations, and those
tables are just necessary to recover the matrix representations
following the recipe but not to generate the matrix representations by
multiplying all the information in the tables. But for P1, there is
only one.

 5:b1     C 1 2 1        C 2y
 5:b2     A 1 2 1        A 2y
 5:b3     I 1 2 1        I 2y
 5:c1     A 1 1 2        A 2
 5:c2     B 1 1 2        B 2
 5:c3     I 1 1 2        I 2
 5:a1     B 2 1 1        B 2x
 5:a2     C 2 1 1        C 2x
 5:a3     I 2 1 1        I 2x

Best regards,

Togo

On Thu, Feb 6, 2014 at 1:08 AM, Jure Varlec jure.varlec@ki.si wrote:

Dear Togo,

A) Correct, C strings are null-terminated, meaning that string methods stop on
the first null character regardless of buffer size.

B) You are right, of course. Shows I’m a newbie :slight_smile: . But anyway, there should
be a way to get at the data. It’s up to the user to specify the needed
information. The current Set Spacegroup dialog in Avogadro is simply
inadequate. For an example, look at the screenshot from VESTA[1]. The GUI has
to present available options, therefore it must know about them. What do you
propose we do? Have Avogadro know about all possibilities, generate an
archetypal unit cell and pass it to spglib? Or have spglib generate possible
options and have Avogadro simply wrap them in a GUI? I haven’t thought this
through yet (it’s not my immediate concern), but I’m willing to implement a
GUI if someone helps me with a crystallographic point of view.

C) scratches head Well, you know this stuff way better than I do, so if
there’s no way to get a Hall symbol that’s not in spglib’s database, I’m OK.

[1]https://oblak.varlec.si/public.php?service=files&t=d431f5fb77db6a2e106ecc95eebf3b73

PS: what’s the attachment policy on this list?

Regards,

Jure

On Wednesday 05 of February 2014 23:19:37 Atsushi Togo wrote:

Dear Jure,

I got the crystallographic database from
http://pmsl.planet.sci.kobe-u.ac.jp/~seto/?page_id=37&lang=en .

A) I’m not very familiar with C language. For example how should I do?
"R 3 -2=c " → "R 3 -2"c\0 " is a safe way in C?
B) The symmetry database assumes the crystal structure is set with one
of standard origins and one of sets of axes, i.e., numerical symmetry
operations change by the choices of them. The crystal structure a user
defines may not follow a good crystallographic manner. How do you use
the database in this case?
C) I saw this.
openbabel/data/space-groups.txt at master · openbabel/openbabel · GitHub
You say “They have 6 entries for P1”, but this sounds for me
crystallographically very strange. Table 1 in [1] just gives cetring
information, but there is no cetring for P1.

Best regards,

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
avogadro-devel List Signup and Options


Atsushi Togo
http://atztogo.github.com/
atz.togo@gmail.com

On Thursday 06 of February 2014 11:15:42 Atsushi Togo wrote:

Dear Jure,

A) OK. Thanks.
B) I’m fine to make a spglib interface to access the database. I will
work on that. Then, even if you have database, the design of GUI would
be e not easy. At least the designer should know the basic of
crystallography, then you have to very restrict the possible inputs of
lattice parameters and atomic positions to the standard settings. Most
users don’t know those crystallographic standard, so if you offer too
much freedoms to users, you may get a lot of questions from those
users. If you ignore crystallographic definitions and conventions, the
computer program breaks down mathematically.

I agree completely. But, IMHO as a beginner, having buttons to push and see
what happens is the best way to learn. But there is no rush, fixing bugs is
more important. For now, I wish simply to allow the user to choose the
spacegroup using the Hall symbol, which is better than the current Set
Spacegroup dialog. Is it OK with you if I use spgdb_get_spacegroup_type()
directly to get the list of Hall symbols?

C) My English skill is not enough to understand that you wrote. Hall
symbol proposes possible sets of symmetry operations with respect to
the choices of standard origins and axes. What I meant was, for
example No. 5 shown below, that there are 9 different ways to
represent it and you can recover 9 different sets of symmetry
operations from those Hall symbols following information of tables in
Concise Space-Group Symbols , i.e. Hall symbols are
very condensed way to represent matrix representations, and those
tables are just necessary to recover the matrix representations
following the recipe but not to generate the matrix representations by
multiplying all the information in the tables. But for P1, there is
only one.

 5:b1     C 1 2 1        C 2y
 5:b2     A 1 2 1        A 2y
 5:b3     I 1 2 1        I 2y
 5:c1     A 1 1 2        A 2
 5:c2     B 1 1 2        B 2
 5:c3     I 1 1 2        I 2
 5:a1     B 2 1 1        B 2x
 5:a2     C 2 1 1        C 2x
 5:a3     I 2 1 1        I 2x

Thank you for clarifying.

Regards,

Jure

more important. For now, I wish simply to allow the user to choose the
spacegroup using the Hall symbol, which is better than the current Set

I’d be happy to work with you on the GUI part of it. CrystalMaker, for example, has a really nice “browser” version and I’ve thought it would be nice to have both styles:

  1. Set the space group by typing Hall symbol and having auto-complete features
  2. Set the space group by “browsing” through lattice type, etc.

http://avogadro.cc/wiki/CrystalMaker

But I do think it’s easy enough to code the basic information into Avogadro (e.g., as a data table).

-Geoff

Dear Jure,

I pushed spglib (beta) version 1.6.0 to
Releases · atztogo/spglib · GitHub with
spg_get_spacegroup_type function.
I’m wondering how to access the database. Inside spglib, I defined
Hall symbol index, just counting from 1 to 530, by the order found at
http://pmsl.planet.sci.kobe-u.ac.jp/~seto/?page_id=37&lang=en (serial
No. column), but I’m not sure this is general definition or not.

Though I think you can guess, I write here shortly the usage (the
following is found in example/example.c)

static void test_spg_get_spacegroup_type(void)
{
SpglibSpacegroupType spgtype;
spgtype = spg_get_spacegroup_type(446);

printf(“*** Example of spg_get_spacegroup_type ***:\n”);
printf(“Number: %d\n”, spgtype.number);
printf(“Schoenflies: %s\n”, spgtype.schoenflies);
printf(“International: %s\n”, spgtype.international);
printf(“International: %s\n”, spgtype.international_full);
printf(“International: %s\n”, spgtype.international_short);
printf(“Hall symbol: %s\n”, spgtype.hall_symbol);
}

I hope I succeeded to remove space padding in symbols and to replace =
by " in Hall symbol as you requested.

Best regards,

Togo

On Thu, Feb 6, 2014 at 5:26 PM, Jure Varlec jure.varlec@ki.si wrote:

On Thursday 06 of February 2014 11:15:42 Atsushi Togo wrote:

Dear Jure,

A) OK. Thanks.
B) I’m fine to make a spglib interface to access the database. I will
work on that. Then, even if you have database, the design of GUI would
be e not easy. At least the designer should know the basic of
crystallography, then you have to very restrict the possible inputs of
lattice parameters and atomic positions to the standard settings. Most
users don’t know those crystallographic standard, so if you offer too
much freedoms to users, you may get a lot of questions from those
users. If you ignore crystallographic definitions and conventions, the
computer program breaks down mathematically.

I agree completely. But, IMHO as a beginner, having buttons to push and see
what happens is the best way to learn. But there is no rush, fixing bugs is
more important. For now, I wish simply to allow the user to choose the
spacegroup using the Hall symbol, which is better than the current Set
Spacegroup dialog. Is it OK with you if I use spgdb_get_spacegroup_type()
directly to get the list of Hall symbols?

C) My English skill is not enough to understand that you wrote. Hall
symbol proposes possible sets of symmetry operations with respect to
the choices of standard origins and axes. What I meant was, for
example No. 5 shown below, that there are 9 different ways to
represent it and you can recover 9 different sets of symmetry
operations from those Hall symbols following information of tables in
Concise Space-Group Symbols , i.e. Hall symbols are
very condensed way to represent matrix representations, and those
tables are just necessary to recover the matrix representations
following the recipe but not to generate the matrix representations by
multiplying all the information in the tables. But for P1, there is
only one.

 5:b1     C 1 2 1        C 2y
 5:b2     A 1 2 1        A 2y
 5:b3     I 1 2 1        I 2y
 5:c1     A 1 1 2        A 2
 5:c2     B 1 1 2        B 2
 5:c3     I 1 1 2        I 2
 5:a1     B 2 1 1        B 2x
 5:a2     C 2 1 1        C 2x
 5:a3     I 2 1 1        I 2x

Thank you for clarifying.

Regards,

Jure


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
avogadro-devel List Signup and Options


Atsushi Togo
http://atztogo.github.com/
atz.togo@gmail.com

On Friday 07 of February 2014 16:04:50 Atsushi Togo wrote:

I pushed spglib (beta) version 1.6.0 to
Releases · atztogo/spglib · GitHub with
spg_get_spacegroup_type function.
I’m wondering how to access the database. Inside spglib, I defined
Hall symbol index, just counting from 1 to 530, by the order found at
http://pmsl.planet.sci.kobe-u.ac.jp/~seto/?page_id=37&lang=en (serial
No. column), but I’m not sure this is general definition or not.

Thanks! I’ll import it today. IMHO, the nature of the index is not important,
so no need to worry. It is merely a way to iterate the database when searching
for a symbol.

Regards
Jure

On Thursday 06 of February 2014 22:15:28 Geoffrey Hutchison wrote:

I’d be happy to work with you on the GUI part of it. CrystalMaker, for
example, has a really nice “browser” version and I’ve thought it would be
nice to have both styles: 1) Set the space group by typing Hall symbol and
having auto-complete features 2) Set the space group by “browsing” through
lattice type, etc.

Great! I’ll keep the combo box until the bugs are fixed in order to push
something to Gerrit soon. The fixes were mostly simple, but learning the code
took some time. I hit a snag with the supercell extension, since it is not
obvious why it doesn’t work. Should I merge it with the crystallography
extension? Most of its code merely duplicates the Fill Unit Cell action, and
does it wrong somehow.

Regards,
Jure