# Create spacegroups with Wolfram language?

**URL:** <https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978>\
**Category:** Questions\
**Tags:** physics, group-theory\
**Created:** [April 28, 2022, 1:07pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978 "2022-04-28T13:07:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [April 28, 2022, 1:07pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/1 "2022-04-28T13:07:04Z")

</div>

It’s well known that [SpaceGroups](https://mathworld.wolfram.com/SpaceGroups.html) play a key role in crystallography, solid state physics and quantum mechanics. But It seems that they are not built in Wolfram language. So, I want to know the trick to build them with Wolfram language from scratch.

Regards,  
HZ

---

<div class="post-metadata">

**Author:** ![jasonb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jasonb/32/20741_2.png) [@jasonb](https://community.wolfram.com/u/jasonb)\
**Post date:** [April 28, 2022, 5:29pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/2 "2022-04-28T17:29:50Z")

</div>

You could start with

```auto
EntityList["FiniteGroup"]

```

and go from there.

---

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [April 28, 2022, 11:37pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/3 "2022-04-28T23:37:21Z")

</div>

Thank you for your tip. But I still can’t figure out how to do the corresponding group operations based on the retrieved entity type results:

1. For space group, the entity type should be “CrystallographicSpaceGroup”.

2. I tried with the following:

3. The [Magnetic space group](https://en.wikipedia.org/wiki/Magnetic_space_group) is the most comprehensive types of space group, which can’t be found in any entity type.

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [April 29, 2022, 2:25am UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/4 "2022-04-29T02:25:35Z")

</div>

I know **nothing** about Space Groups, but I did find [this](https://wolfram.discourse.group/t/17931/1) post. Not sure if it helps you.

---

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [April 29, 2022, 3:12am UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/5 "2022-04-29T03:12:18Z")

</div>

The author of [the above referred post](https://wolfram.discourse.group/t/17931/1) is a friend of mine. The group theory data used there is based on the famous [BC book](https://www.amazon.co.jp/Mathematical-Theory-Symmetry-Solids-Representation/dp/0199582580), rather than being generated entirely from scratch.

---

<div class="post-metadata">

**Author:** ![jasonb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jasonb/32/20741_2.png) [@jasonb](https://community.wolfram.com/u/jasonb)\
**Post date:** [April 29, 2022, 5:22pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/6 "2022-04-29T17:22:15Z")

</div>

> I tried with the following:
> 
> In[66]:= Entity[“CrystallographicSpaceGroup”,   
> {“CrystallographicSpaceGroup”, 186}]
> 
> Out[66]= Entity[“CrystallographicSpaceGroup”,   
> {“CrystallographicSpaceGroup”, 186}]
> 
> As you can see, the output is identical to the input.

What did you want it to do? If you have an `Entity` then you need to look at its `"Properties"` to see if it has something useful.

It’s very unclear to me what you want to do, or what you mean by building the space group by scratch.

---

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [April 30, 2022, 1:19am UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/7 "2022-04-30T01:19:04Z")

</div>

> If you have an Entity then you need to look at its “Properties” to see if it has something useful.

According to your above comment, I tried the following:

```
EntityProperties["CrystallographicSpaceGroup"]

{EntityProperty["CrystallographicSpaceGroup", "BravaisLattice"], 
 EntityProperty["CrystallographicSpaceGroup", "CrystalFamily"], 
 EntityProperty["CrystallographicSpaceGroup", 
  "CrystallographicPointGroup"], 
 EntityProperty["CrystallographicSpaceGroup", "CrystalSystems"], 
 EntityProperty["CrystallographicSpaceGroup", "EntityClasses"], 
 EntityProperty["CrystallographicSpaceGroup", 
  "HermannMauguinNotation"], 
 EntityProperty["CrystallographicSpaceGroup", "LatticeSystem"], 
 EntityProperty["CrystallographicSpaceGroup", "Name"]}

```

But I still don’t know how to make further use of it.

> It’s very unclear to me what you want to do,

Many things can be done if I have the specific representation of a space group, such as computing the multiplication table, character table, and irreducible representation, etc.

> or what you mean by building the space group by scratch.

I say this because I didn’t know of any such entities at the time of posting this issue.

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [April 30, 2022, 3:06am UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/8 "2022-04-30T03:06:50Z")

</div>

You can get the values for those properties like this

```
Entity["CrystallographicSpaceGroup", {"CrystallographicSpaceGroup", 186}]["PropertyAssociation"]

```

---

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [April 30, 2022, 3:34am UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/9 "2022-04-30T03:34:51Z")

</div>

How to get the specific group elements that allow further manipulation of the group. For example, as shown below, given by [the SpaceGroupIrep package](https://github.com/goodluck1982/SpaceGroupIrep):

 ![Selection_216.png](https://global.discourse-cdn.com/wolfram/original/3X/3/3/33369485f22c708fb4e270381bb7b7df679e48e1.png)

---

<div class="post-metadata">

**Author:** ![jasonb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jasonb/32/20741_2.png) [@jasonb](https://community.wolfram.com/u/jasonb)\
**Post date:** [April 30, 2022, 12:02pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/10 "2022-04-30T12:02:43Z")

</div>

I am still confused by your question. You ask how to get the specific group elements, and then show a screenshot where you do exactly that.

Clearly you already know how to get the group elements in a computational form using the package you linked to, a package which github lists you as a contributor to. Why not use just use the package? Is there some way in which that package is insufficient for your needs?

---

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [April 30, 2022, 2:30pm UTC](https://community.wolfram.com/t/create-spacegroups-with-wolfram-language/19978/11 "2022-04-30T14:30:38Z")

</div>

Although [the SpaceGroupIrep package](https://github.com/goodluck1982/SpaceGroupIrep) has great application value for many problems in quantum mechanics and condensed matter physics. It is essentially a database-based tool, that is to say, it has not implemented the low-level group theory related algorithm. The space group information implemented in this package has its own definition format. As a result, it can not directly use the relevant group theory manipulation commands provided by wolfram language to facilitate the related study.
