Ticket #10262 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Space group reflection conditions

Reported by: Michael Wedel Owned by: Michael Wedel
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: anders.markvardsen@… Blocked By: #10280, #10281, #10282, #10283
Blocking: #10247 Tester: Anders Markvardsen

Description (last modified by Michael Wedel) (diff)

Currently, MantidGeometry contains the class ReflectionCondition, which represents integral reflection conditions, required for describing Bravais lattices. In parts of the POLDI code (and most likely others as well), this is for example used to determine which reflections are allowed in a certain structure.

Since I have already made some changes to point groups in #9993 and also #10135, I would like to expand this a little bit and add reflection conditions for glide planes and screw axes #ITA, making a small step towards representation of space groups - in the very limited context of determining which reflections are allowed in a certain space group.

In this first step, I would like to introduce a new class in MantidGeometry, called SpaceGroup, which is basically a composition of a PointGroup-object and a collection of ReflectionCondition-objects and an interface to wrap these, along these lines:

class SpaceGroup
{
public:
   SpaceGroup(size_t number, const PointGroup_sptr &pointGroup, const std::vector<ReflectionCondition_sptr> &reflectionConditions);

   size_t getNumber() const;

   bool isAllowed(const Kernel::V3D &hkl) const;
}

There will be some logic that checks that there's only one integral reflection condition object and that the selected reflection conditions are compatible with the crystal class (contained in the point group).

Furthermore, I want to add a factory that produces SpaceGroup-objects from the space group number according to the International Tables.

Finally, both the interface and the factory will be exported to Python.

ITA: International Tables for Crystallography (2006). Vol. A, ch. 2.2, pp. 29-32

Attachments

class diagram.png (106.5 KB) - added by Michael Wedel 6 years ago.

Change History

comment:1 Changed 6 years ago by Michael Wedel

  • Description modified (diff)

comment:2 Changed 6 years ago by Anders Markvardsen

  • Owner changed from Michael Wedel to Anders Markvardsen
  • Status changed from new to infoneeded

Hi Michael,

Since a SpaceGroup class may end up being a widely used class, do you mine provided the following additional information:

  1. A class diagram (uml) diagram that shows your suggested connection between SpaceGroup, PointGroup, ReflectionCondition and Factory class

Preliminary reading your SpaceGroup constructor:

SpaceGroup(size_t number, const PointGroup_sptr &pointGroup, const std::vector<ReflectionCondition_sptr> &reflectionConditions);

I have the following questions/concerns.

  1. Why do you need this constructor? Can't you initiate the space group from a space group symbol alone?
  1. In this constructor I don't understand the argument size_t number. Or at least not sure. Is it the number of space group elements?

comment:3 Changed 6 years ago by Anders Markvardsen

  • Owner changed from Anders Markvardsen to Michael Wedel

Michael, please accept my apologies I did not mean to change the owner

comment:4 Changed 6 years ago by Michael Wedel

After some discussions with Anders, I created a UML-diagram of how I imagine new classes and their relations.

To implement this, the ticket needs to be split up into several tasks:

  • Change Geometry::SymmetryOperation to have a translational component, make construction from strings like [x, -y, z] possible. This will most likely affect the factory, but using this method it is no longer necessary to have a different class for each operation. Symmetry operations do not even need to be registered, it's just transformation from a string.
  • Implement SpaceGroup, along with TabulatedSpaceGroup and GeneratedSpaceGroup subclasses. TabulatedSpaceGroup will be initialized from the complete list of symmetry operations that are in a space group. This is surely practical for low symmetry groups that only contain a few operations. More complex groups can be constructed by using a simplified algorithm that makes use of the concept of "space group generators", which make it possible to construct even highest symmetry cubic groups from only a few symmetry operations. I expect this to be much easier to test and verify. Anders suggested a systemtest for this purpose - I agree. The factory will make sure that initialization of the groups is only performed once, new instances will be cloned from existing ones.
  • Implement the notion of a "scatterer" in order to be able to calculate structure factors. I realize it could be useful to have some kind of factory for those as well.
  • Modify CrystalStructure so that it uses the new classes.

Changed 6 years ago by Michael Wedel

comment:5 Changed 6 years ago by Michael Wedel

  • Blocked By 10280 added

comment:6 Changed 6 years ago by Michael Wedel

  • Blocked By 10281 added

comment:7 Changed 6 years ago by Michael Wedel

  • Blocked By 10282 added

comment:8 Changed 6 years ago by Michael Wedel

  • Blocked By 10283 added

comment:9 Changed 6 years ago by Michael Wedel

  • Cc anders.markvardsen@… added

I divided the tasks into 4 separate tickets:

  • SymmetryOperation-adjustments: #10280
  • SpaceGroup implementation: #10281
  • Scatterer implementation #10282
  • Adjustments to CrystalStructure #10283

comment:10 Changed 6 years ago by Anders Markvardsen

  • Status changed from infoneeded to new

Looks good.

For the class diagram consider adding PointGroup to show that it is a collection of SymmetryOperators also. You may add a method to the SpaceGroup that returns the point group symmetry operators or point group symbol, so that user can go create spacegroup and then optionally create point group from space.

comment:11 Changed 6 years ago by Anders Markvardsen

  • Status changed from new to assigned

comment:12 Changed 6 years ago by Michael Wedel

Yes, I will do that. I did not include PointGroup in the diagram, because I was not sure where to put it exactly. But I like the idea of just picking the right symmetry operations from space group to create the point group and let SpaceGroup be kind of an "alternative factory" for point groups.

comment:13 Changed 6 years ago by Michael Wedel

  • Blocking 10247 added

comment:14 Changed 6 years ago by Michael Wedel

  • Status changed from assigned to verify
  • Resolution set to fixed

All four tickets have been closed, so I'm marking this umbrella-ticket as fixed. The final class diagram is attached to #10282 (I don't want to duplicate this here).

comment:15 Changed 6 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:16 Changed 6 years ago by Anders Markvardsen

Work has been completed

comment:17 Changed 6 years ago by Anders Markvardsen

  • Status changed from verifying to closed

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11104

Note: See TracTickets for help on using tickets.