Ticket #10283 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Modify CrystalStructure to use space group and scatterers

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

Description

The last step of #10262 will be to change the existing CrystalStructure-class so that it uses the features implemented in #10281 and #10282.

At that point it will be possible to construct a crystal structure with the scatterers in the asymmetric unit and use the information about the space group to generate all scatterers in the unit cell and obtain structure factors for reflections (given by HKL).

Change History

comment:1 Changed 6 years ago by Anders Markvardsen

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Michael Wedel

  • Cc anders.markvardsen@… added

comment:3 Changed 6 years ago by Michael Wedel

Generation of symmetrically equivalent scatterers is performed directly by the scatterers, so CrystalStructure will not need to do this.

An important question I can see is generation of crystal structures. It must be possible to construct a crystal structure from a file.

For our purposes at POLDI it will be enough (for now) to be able to read a file with a structure like this:

# Crystal structure of Silicon
# Unit cell
5.43 5.43 5.43 90 90 90
# Space group
F d -3 m
# Element x y z occupancy Uiso
Si 0.0 0.0 0.0 1.0 0.05

What would be a good way to do this?

comment:4 Changed 6 years ago by Michael Wedel

  • Status changed from assigned to inprogress
Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:5 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:6 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:7 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:8 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:9 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:10 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:11 Changed 6 years ago by Michael Wedel

  • Blocking 10426 added

comment:12 Changed 6 years ago by Michael Wedel

I have moved the loading issue to another ticket (#10426), because it's really a separate issue. But in this context I realized that I need to change the interface of IScatterer a bit, to make string based creation easier later on, so I will probably have to rebase this branch or pull in master after #10282 has been closed.

comment:13 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:14 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:15 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:16 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:17 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:18 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:19 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:20 Changed 6 years ago by Michael Wedel

Last edited 6 years ago by Michael Wedel (previous) (diff)

comment:21 Changed 6 years ago by Michael Wedel

Rebased this branch to use the changes from #10282. I assume no one had checked out this branch previously.

comment:22 Changed 6 years ago by Michael Wedel

Since there had to be some changes to #10282 in the end, I have to delete the old branch for this ticket and push a new one. Sorry for the confusion, but this ticket was very close to #10282, so I wanted to see "how things work out" with the different approaches.

comment:23 Changed 6 years ago by Michael Wedel

Refs #10283. Modified PointGroupFactory to accept space group symbols

Changeset: 4b91b23818a270b8383d2f0b0e118cc4b9916ab3

comment:24 Changed 6 years ago by Michael Wedel

Refs #10283. Adding a symbol to ReflectionCondition

Changeset: ebe9d89687a06ef66219b6cb901f9364229644b3

comment:25 Changed 6 years ago by Michael Wedel

Refs #10283. Adapted CrystalStructure.

Changeset: a010cb2a7adc4770550acd6ab38ee978dc3b3cb8

comment:26 Changed 6 years ago by Michael Wedel

Refs #10283. Added more documentation.

Changeset: 649a81fa8a2dda4f96cc5206bdd7431b7a146eeb

comment:27 Changed 6 years ago by Michael Wedel

Refs #10283. Added unit test for comparison

Using ReflectionCondition and structure factor calculation should give the same result for the same input.

Changeset: 166c4c52be3f30c90fffd7f254691c210ef08eb2

comment:28 Changed 6 years ago by Michael Wedel

Refs #10283. Moving calculation of F and d

Putting those calculations in their own methods makes it easier to add other calculations later.

Changeset: 09c0ed966e267f0c90bd023cc63450ee5fb6e0c3

comment:29 Changed 6 years ago by Michael Wedel

Refs #10283. Re-adding F2 method to BraggScatterer

Changeset: 833b402d769cbff916c1eb1a3abe1ac1fdd88872

comment:30 Changed 6 years ago by Michael Wedel

Refs #10283. Adapting CrystalStructure to final design of scatterer

Changeset: e8d3117e658a19382540a35769509f36a64ec43f

comment:31 Changed 6 years ago by Michael Wedel

Refs #10283. Suppressing some gmock warnings.

Changeset: 88b46d5eda9e3b3658e29ae2f247c90bc5bd1ce8

comment:32 Changed 6 years ago by Michael Wedel

Refs #10283. Adding possibility to clear CompositeBraggScatterer.

Changeset: 69c0a8f5ce057af561de7d71b8326dfb786d6837

comment:33 Changed 6 years ago by Michael Wedel

Refs #10283. Some cleaning up in CrystalStructure

Changeset: 71a226f089eb88967950857f8de063b251cb1ab3

comment:34 Changed 6 years ago by Michael Wedel

Refs #10283. Replacing front and back with substr

Changeset: ffa54aa778d1c92c4c9617d451281ff401daffc5

comment:35 Changed 6 years ago by Michael Wedel

Refs #10283. Changing back constructor of CrystalStructure

Apparently VS does not like boost::make_shared as default argument in a constructor.

Changeset: ad1be5459e570a0a0a418f8eaff6fd4f55e7efaf

comment:36 Changed 6 years ago by Michael Wedel

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

Notes

The "old" interface and behaviour of CrystalStructure is mostly preserved. The only caveat is that point group and centering cannot be set if a space group has been set before. I think this is reasonable behaviour, since the space group determines both.

Testing information

Code review. The general design was covered in #10282, which contains also the UML diagram. I did not change PointGroup/PointGroupFactory, so for now PointGroupFactory "transforms" a given space group symbol to the corresponding point group symbol and creates a point group from that. Has the limitation that currently only centrosymmetric space groups can be used that way (because only the Laue classes are present in the point group department).

comment:37 Changed 6 years ago by Anders Markvardsen

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

comment:38 Changed 6 years ago by Anders Markvardsen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/10283_adapt_crystal_structure'

Full changeset: 3562e896522d6d25022f031292261d1a02bd781e

comment:39 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11125

Note: See TracTickets for help on using tickets.