Stianpr20 / MaXrd

Symmetry data and utilities related to crystallography and X-ray scattering
MIT License
24 stars 3 forks source link

Did something change that affects how atom positions are placed relative to the unit cell? #9

Open sgbaird opened 1 year ago

sgbaird commented 1 year ago

I'm using the most recent version of MaXrd (3.0.0, again nice work on the paclet installation) in LatticePlane, and I'm running into unwanted behavior relative to a previous version (dating back to around the time these issues were opened or shortly after https://github.com/Stianpr20/MaXrd/issues/7 https://github.com/Stianpr20/MaXrd/issues/4).

Before, the HKL planes I defined seemed to be lining up correctly with the atom positions for Fe3C (mp-510623, Pnma), but now there doesn't seem to be the anticipated overlap. Meanwhile, Al (mp-134, Fm-3m) appears to be the same as before, if I'm not mistaken. Here's a zip of the two CIF files mp-134-mp-510623.zip.

Here are the coordinates for Fe3C (Fe and C, respectively):

{{{0.892203,0.460793,1.49141},{1.62289,6.27851,3.73684},{4.13798,3.83045,2.99943},{3.40729,2.90886,0.754008},{4.13798,6.27851,2.99943},{3.40729,0.460793,0.754008},{0.892203,2.90886,1.49141},{1.62289,3.83045,3.73684},{0.184411,1.68483,3.75938},{2.33068,5.05448,1.51395},{4.84577,5.05448,0.731469},{2.6995,1.68483,2.97689}},{{0.618742,5.05448,2.51906},{1.89635,1.68483,0.273636},{4.41144,1.68483,1.97179},{3.13383,5.05448,4.21721}}}

image

I had also made a custom ImportCrystalData and ExpandCrystal (related https://github.com/Stianpr20/MaXrd/issues/5), so that may also be part of the issue.

I'm still in the troubleshooting phase and sorry if some of this is vague. Curious if you have any thoughts or suggestions on troubleshooting this.

Stianpr20 commented 1 year ago

I would suspect that any differences in the produced atom positions would come from using either SymmetryEquivalentPositions or ExpandCrystal, but I cannot find any differences when comparing the output of those functions of versions 2.4.0, 2.5.0, 3.0.0 and 3.1.0 with the two crystals you included here.

I thought it would be most likely that you'd use version 2.5.0 before since it's from 2021-05-04.

Perhaps you could make a minimal working example that generates the nice figure above with intersecting lattices, and I can debug the problem from there.