Ticket #10426 (assigned)
Create Loader for CrystalStructure
Reported by: | Michael Wedel | Owned by: | Michael Wedel |
---|---|---|---|
Priority: | major | Milestone: | Release 3.5 |
Component: | Framework | Keywords: | CORE |
Cc: | anders.markvardsen@… | Blocked By: | #10283 |
Blocking: | Tester: |
Description
In ticket #10283 CrystalStructure was adjusted so it can be constructed from a unit cell, space group and scatterers.
In order to be able to access crystal structures in algorithms, I think it would be useful to implement something similar to LoadInstrument, let's say LoadCrystalStructure. The algorithm would read a file that contains all necessary information to construct a CrystalStructure object and store it in the selected workspace.
I have tried to find a suitable storage location for CrystalStructure and for the moment the most logical approach I could find was to store it in ExperimentInfo -> Sample.
For this, I would like to modify sample so it's able to hold a vector of CrystalStructure_sptr's (for the case of multi-phase samples). Anders already pointed out that Sample is a core part of Mantid, so if there's an alternative which does not go so deep into the framework I'd be happy to know.
I have attached a small diagram of the change I plan to make to Sample. One thing I am not sure are the changes to saveNexus/loadNexus. I checked how it's done in OrientedLattice, but in the nexus reference I could not find suitable fields (for example in NXCrystal) - how is this handled in other cases where data is stored that are not covered by the standard? Would shape_xml be an example for orientation?
For each crystal structure I would have to store a unit cell (just as in OrientedLattice), a string with the space group symbol and a string which stores information about the scatterers.