-
Notifications
You must be signed in to change notification settings - Fork 18
Powder pattern calculation is not updated when the spacegroup is changed #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
vincefn
added a commit
to vincefn/objcryst
that referenced
this issue
Nov 1, 2022
…n when the spacegroup is changed, or when the lattice parameters change (the latter only outside of an optimisation). This is done by making all the HKL attributes mutable, and overloading the SetHKL and GenHKLFullSpace, GenHKLFullSpace2 with a protected const version, which should only be used for powder diffraction (and not single crystal data). This should address diffpy/pyobjcryst#32 Removed mCorrTextureEllipsoid.InitRefParList() from PowderPatternDiffraction::GenHKLFullSpace since the parameter initialisation is already done in the TextureEllipsoid constructor.
vincefn
added a commit
to diffpy/libobjcryst
that referenced
this issue
Nov 2, 2022
…jcryst * 'master' of github.com:vincefn/objcryst: Enable automatic re-generation of HKL's for a PowderPatternDiffraction when the spacegroup is changed, or when the lattice parameters change (the latter only outside of an optimisation). This is done by making all the HKL attributes mutable, and overloading the SetHKL and GenHKLFullSpace, GenHKLFullSpace2 with a protected const version, which should only be used for powder diffraction (and not single crystal data). This should address diffpy/pyobjcryst#32 Update makefile to wxwidgets 3.2 and fftw to 3.3.10 ; update macOS Xcode project to make a universal binary with X86_64 and ARM64 architectures RefinableObj: change list<> to std::list<> to avoid compiler ambiguity with boost list. PowderPatternDiffraction: add GetFhklObsSq() and HasFhklObsSq() Correct update check code for YYYYNNN format. disable glcanvasegl for wxWindgets compilation under linux to avoid linking errors (?) Update wiki2pdf.py for python 3 Update Fox version. Add fenske-hall z-matrix with hydrogens to cimetidine tutorial. Update macOS build config and makefile with wxwidgets 3.1.6. Remove obsolete makefiles. Update changelog and windows project files Use a valid XML output for a Molecule RigidGroup, writing atoms as Atom1, Atom2 etc... instead of repeating the Atom attribute. Fixes vincefn/objcryst#52. The saved files will not be backwards-compatible (readable but the list of atoms in the rigid group will not be read) Fix double loop in PowderPattern::PrepareIntegratedRfactor. Better GetFormula for Crystal and Molecule Crystal::XMLInput(): add a hook to re-use atomic scattering power when mDeleteSubObjInDestructor is False. This is useful when re-loading Crystal configurations using their xml descriptions repeatedly, notably in python. Add relative_length_tolerance and absolute_angle_tolerance_degree to SpaceGroupExplorer::Run() and RunAll() Correct precision for Crystal::GetFormula() Add access to the weight (g/mol) for ScatteringPowerAtom and Crystal Add access to the weight (g/mol) for ScatteringPowerAtom and Crystal CreateCrystalFromCIF: throw exception if no crystal structure is found Add int_ptr() function to enable unique identification of objects through their address - useful in python where the wrapped object has a different address
vincefn
added a commit
to diffpy/libobjcryst
that referenced
this issue
Nov 2, 2022
* upstream-objcryst: Enable automatic re-generation of HKL's for a PowderPatternDiffraction when the spacegroup is changed, or when the lattice parameters change (the latter only outside of an optimisation). This is done by making all the HKL attributes mutable, and overloading the SetHKL and GenHKLFullSpace, GenHKLFullSpace2 with a protected const version, which should only be used for powder diffraction (and not single crystal data). This should address diffpy/pyobjcryst#32 Update makefile to wxwidgets 3.2 and fftw to 3.3.10 ; update macOS Xcode project to make a universal binary with X86_64 and ARM64 architectures
This now works in release 2.2.4 with libobjcryst 2022.1.3 and bcf1eba |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whenever atoms are moved in a crystal, the associated calculated powder is updated, but not when the spacegroup is changed. This requires calling
Prepare()
manually, which is inconvenient.There are two parts required for the change:
ScatteringData::SetCrystal
, and also compare it tomClockGeomStructFact
inScatteringData::CalcGeomStructFactor
to make sure te structure factors are recomputedThe first is easy enough, but the second part is complicated because doing this automatically means calling
GenHKLFullSpace
(anon-const
method) duringCalcPowderPattern
(which isconst
). So the only way to achieve this transparently will be to:mH
,mK
etc.. mutableGenHKLFullSpace
,SetHKL
... functions which areconst
and can be used when auto-generating reflections for a powder patternThe text was updated successfully, but these errors were encountered: