Skip to content

Releases: Stianpr20/MaXrd

4.0.0

28 Apr 23:47
Compare
Choose a tag to compare

Structural changes

  • Point- and space group data have been distributed to single files for each group.
  • Fractions that are added/subtracted with placeholder string symbols in $SpaceGroups are now operated on explicitly with the Plus/Subtract functions instead of the +/- operator in order to clear associated suggestion from the Wolfram linting, e.g., 1/2 + "x" is replaced by Plus[1/2, "x"].
  • Placeholder symbols in $SpaceGroups and $TransformationMatrices(a, b, c, h, k, l) are now stored as strings to avoid explicitly setting the context to Global` .
  • Now using a MaXrd.wl file in stead of Definitions.nb master notebook, and each function is defined in its designated file.
  • Converted paclet context with publisher ID to conform to Paclet Repository structure.

Miscellaneous

  • For FindPixelClusters, changed the default setting of "PixelDataFile" to FileNameJoin[{$MaXrdPath, "Kernel", "Data", "UserData", "PixelData.m"}].
  • Changed structure of optional second argument of SymmetryEquivalentPositions and ExpandCrystal.
  • For ImportCrystalData, renamed option "ExtractSubdata" to "ExtractSubData".
  • Fixed a string concatenation bug in UnitCellTransformation.
  • Changed some local variable names to avoid confusion.
  • Renamed various error message names and local variables to longer, more understandable names.
  • Minor bug fixes and typo corrections.

3.1.0

05 Feb 09:32
Compare
Choose a tag to compare
  • Added option "ShowUnitVectorLabels" to CrystalPlot.
  • Fixed a bug with the "HighlightReflections" option of ReciprocalImageCheck where it would not filter away symmetry equivalent reflections that were in a plane different form the viewing plane.
  • Minor documentation corrections and edits.

3.0.0

17 May 18:34
28abf9e
Compare
Choose a tag to compare

New content

  • Created a MergeDomains function for conveniently stacking multiple domains.
  • Created the function ResizeStructure which can normalise the unit cell to the new dimensions after an embedding is completed, split the unit cell into sections, or translate the unit cell relative to its content.
  • Factorised new snippet InputCheck["RecognizeFractions", _] (updated SymmetryEquivalentPositions).

Improvements to space group database

  • Reflection conditions added to $SpaceGroups.
  • SystematicAbsentQ updated to make use of "ReflectionConditions" now stored in $SpaceGroups.
  • "PermutableIndices" added to the "Property" association of relevant space groups, which will have values "Cyclically" (numbers 195–206) or True (numbers 207–230).

Improvements to DistortStructure and EmbedStructure

  • Changed DistortStructure to require a three-dimensional functional input instead.
  • New option "ReturnConverter" added to DistortStructure.
  • Added new option "DistortHost" to EmbedStructure.
  • Refactored the permutation options in EmbedStructure and enabled random sampling of discrete values.
  • Expanded the permutation options of EmbedStructure to accept conditions based on entity name.

Improvements to ReciprocalImageCheck

  • New options "HighlightReflections" and "HighlightSymmetry" added to ReciprocalImageCheck which are used to generate overlay of coloured disks indicating where the given reflections would be.
  • "RoundPixels" option of ReciprocalImageCheck deprecated (always True).
  • Option "ShowLattice" of ReciprocalImageCheck renamed to "LatticeSize" with default value None.
  • Option "GridThickness" added.

Improvements to ReciprocalSpaceSimulation

  • ReciprocalSpaceSimulation now includes the option "StructureFactorThreshold" to filter away weak reflections.
  • ReciprocalSpaceSimulation: added scaling of node radii by structure factor; option: "IntensityScaling".

Structural changes

  • Deprecated $MaXrdFunctions since the same list can be obtained with ?MaXrd`* or Names["MaXrd`*"].
  • Mathematica code sections in documentation pages have been removed; all definitions are accessible in the main definition notebook (MaXrd > Kernel > Definitions.nb).
  • Loading MaXrd will initialize the symbols a, b, c, h, k, l, \[Alpha], \[Beta], and \[Gamma] on the Global` context in the Wolfram Language session.
  • Removed the Messages.m file; usage messages now stored in Definitions.nb.
  • Deprecated $MaXrdChangelog (viewing the Changelog.md file is simple enough).

Miscellaneous

  • Snippet InputCheck["CrystalQ", _] now has a third Boolean option to control abortion.
  • Updated documentation pages for SystematicAbsentQ, StructureFactorTable and DistortStructure.
  • Option "Threshold" of SystematicAbsentQ deprecated.
  • Refactored code in InputCheck snippet "GetCentringVectors" and added «reverse» setting "r".
  • Added another possible setting for the "ExpandIntoNegative" option in ExpandCrystal: "PlanarOnly", which will only use the negative directions of a and b.
  • Minor documentation improvements (SynthesiseStructure).
  • Fixed a bug in SynthesiseStructure by improving InputCheck snippet "RotationTransformation" (anchors are now scalable with unit cell dimensions).
  • Attempts at plotting a single atom/element with CrystalPlot which are not present in $CrystalData now gives an error and aborts the process.
  • StructureFactor now aborts if input crystal label is not recognized.
  • Fixed a bug where SystematicAbsentQ would fail if special positions were not given for a non-conventional space group setting.

2.5.0

27 Jul 09:25
Compare
Choose a tag to compare

New content

  • Reintroduced ReciprocalImageCheck and FindPixelClusters; now more efficiently integrated with MaXrd and more general purposed.
  • Created a GetAtomCoordinates function which works with crystal labels and crystal plots.
  • Changed the name of EquivalentIsotropicADP to TransformAtomicDisplacementParameters and added a method for transforming atomic displacement parameters given a transformation matrix P.
  • Added "AugmentedMatrix" option to GetSymmetryOperations; StructureFactor, SystematicAbsentQ and ToStandardSetting updated to comply with changes.
  • Added Boolean option "IgnoreTranslations" to GetSymmetryOperations in order to simplify use with SymmetryEquivalentReflections.
  • Added the Boolean option "Radians" to GetLatticeParameters.
  • Added the Boolean option "Bonds" to CrystalPlot along with configuration option "BondRadius".
  • Added the option "AtomRadius" to CrystalPlot that can be used to set a fixed radius for all atoms. This takes precedence over "AtomRadiusType", but is ignored when it is set to a non-positive number.
  • Created InputCheck["GetAtomData", _] for querying atom data of crystals.
  • Added possibility to plot ellipsoids in CrystalPlot using stored ADPs.

Improvements and fixes

  • Misspelling of SchoenfliesSymbol in $SpaceGroup[[71]] (thanks to ungerade).
  • Fixed a formatting bug on the SynthesiseStructure documentation page.
  • When using the signature of SynthesiseStructure expecting domain input, the map now recognises more general replacement commands (e.g. _Integer -> "SomeEntity").
  • Merged GetLatticeParameters with GetCrystalMetric, and refactored the latter.
  • Refactored InputCheck["GetCentringVectors", _] to also accept crystal entries and space group representations.
  • Refactored SymmetryEquivalentPositions and SymmetryEquivalentReflections to use augmented matrix representations of symmetry operations.
  • Altered InputCheck["GetCrystalSpaceGroup", _] to accept space group entires and return them.
  • Updated InputCheck["CrystalQ", _] to also check for temporary crystal data. It now returns the crystal data as well.

Miscellaneous

  • Minimised large documentation files by clearing large output cells.
  • Removed SynthesiseStructure::DomainPatternMismatch error check; input blocks/supercells now replace a single domain cell, regardless of block size.
  • Wavelength values assume angstrom by default in the functions AttenuationCoefficient, BraggAngle, DarwinWidth, ExtinctionLength, GetAtomicScatteringFactors, GetScatteringCrossSections, ImportCrystalData, ReciprocalSpaceSimulation, ReflectionList, StructureFactor and StructureFactorTable; this is now made clear in the documentation pages (thanks to Sterling Baird (sgbaird)).
  • Changed the way essential data are initialised.

2.4.0

03 Sep 21:45
Compare
Choose a tag to compare

Improvements to SynthesiseStructure

  • Creating single element (or void) unit cells now possible with SynthesiseStructure[<chemical symbol>, _, _].
  • Added "Shuffled" as a possible setting to the "SelectionMethod" option in SynthesiseStructure.
  • Added Boolean option "Padding" to SynthesiseStructure which utilises the InputCheck["PadDomain", _, _] snippet.
  • Refactored SynthesiseStructure; when inputting a list of entities, an appropriate domain representation will be created and relayed to the function expecting a domain signature.
  • "UsePlacementBuffer" option of SynthesiseStructure deprecated; "Padding" will now be used instead.
  • If a domain is not covered in the mapping from integers to entities in SynthesiseStructure, empty cells will now be used instead of throwing an error.

Improvements to EmbedStructure

  • Enabled the possibility to embed in void (message EmbedStructure::VoidHost removed).

Improvements to space group database

  • Removed entries such as HermannMauguinFullAlt in space groups with multiple origins.
  • For rhombohedral space groups, the note specifying obverse setting was moved to the alternative settings section.
  • Regenerated $GroupSymbolRedirect.
  • Minor error corrections.

New InputCheck snippets

  • Added snippet InputCheck["GenerateTargetPositions", _] (currently used in ConstructDomains, DomainPlot, EmbedStructure, ExpandCrystal and SynthesiseStructure).
  • Added snippet InputCheck["PadDomain", _, _].
  • Added snippets InputCheck["ShallowDisplayCrystal", _] (employed in: ImportCrystalData, UnitCellTransformation).
  • Added snippets InputCheck["FilterSpecialLabels", _] and InputCheck["HandleSpecialLabels", _] for processing chemical element symbols and "Void".
  • Added snippet InputCheck["CrystalEntityQ", _].

Miscellaneous

  • Added the option ImageDimensions to SimulateDiffractionPattern for specifying the width and height of the produced image (ExportCrystalData and InputCheck["GetReciprocalImageOrientation", __] also updated to comply with this change).
  • Appended a missing _alt to the CIF definition _space_group_name_H-M in the list of space group search keys in ImportCrystalData.
  • Fixed errors in the $GroupSymbolRedirect data file (thanks to Tobias Hadamek for finding this).
  • ImportCrystalData now takes away tildes (~) if they are present in the chemical formulas.
  • Fixed a bug where GetScatteringCrossSections would not work on Windows due to different line break implementations (thanks to Tobias Hadamek for discovering this).
  • An error is now given when attempting to use a chemical symbol or "Void" for the name a crystal to be imported from a cif file through ImportCrystalData.
  • CrystalPlot will now plot empty structures without errors.
  • Demo file DemoBlocksAB.m removed (these structures will now be generated on demand).
  • Updated code part B.2 in InputCheck["InterpretSpaceGroup", __] to find origin choice automatically.

2.3.0

04 Aug 10:22
Compare
Choose a tag to compare

New content

  • Option "ShowProgress" added to ConstructDomain.
  • Option "AtomRadiusType" added to CrystalPlot.
  • Added the possibility to filter "Host" or "Guest" atoms only with the "OpacityMap" option of CrystalPlot.
  • Added another example to the "SectorRegions" in ConstructDomains.
  • Added a modulation example to the DistortStructure documentation.
  • Added the possibility for ConstructDomains to store and return the a complete collection of the states in every cycle, and DomainPlot to present such a series.

Improvements and fixes

  • Fixed broken hyperlinks in the See Also section in the documentation of ExpandCrystal and CrystalPlot.
  • Fixed a bug where ConstructDomains would finish each iteration after only three cell visits.
  • Set a default Windows path for DIFFUSE in SimulateDiffractionPackage.
  • Altered SimulateDiffractionPattern to use discus through discus_suite.
  • Fixed a bug in SimulateDiffractionPattern["DISCUS", _, _] where the structure size would not be correctly assessed.
  • Fixed a bug where "UnitCellAtomsCount" would not be correctly updated when using SynthesiseStructure.
  • Default plot options for CrystalPlot in cases of trigonal or hexagonal systems have changed ViewPoint to {0, 0, Infinity} and ViewAngle to 90° for more intuitive visual representations.
  • The use of EmbedStructure with guest and host parameters will now store a "Component" key in the atom data.
  • Default/suggested paths for Linux added to the "ProgramPaths" option of SimulateDiffractionPattern.
  • Fixed a bug in SimulateDiffractionPattern["DISCUS", _, _] where the procedure would not halt despite missing the DISCUS program.
  • Fixed a bug with too long assembly list in SynthesiseStructure.
  • ConstructDomains now exits early if a single domain reaches complete domination.
  • Fixed an issue where InputCheck["ProcessWavelength", _, _] would not work as expected in combination with BraggAngle.
  • CrystalPlot now exits more gracefully if the atom data list is empty.
  • AtomicMass was renamed to StandardAtomicWeight in $PeriodicTable and affected functions updated to comply with this change.
  • Minor documentation updates.

2.2.0

02 Jun 14:51
Compare
Choose a tag to compare
  • Added the Boolean option "IgnoreSymmetry" to ExpandCrystal.
  • Fixed a bug in SynthesiseStructure that would occur if the input units did not have a Notes key.
  • Improved assembly performance of SynthesiseStructure.
  • Fixed bug encountered when using SynthesiseStructure with blocks not having size 1x1x1.
  • Swapped sections 1C and 1D in the internal code for UnitCellTransformation to avoid an error for crystals missing notes.
  • Added the Boolean option "ReturnData" to SimulateDiffractionPattern.
  • Fixed a bug in "RelatedFunctionsGraph".
  • Added twin example to the documentation pages of ReciprocalSpaceSimulation.
  • Added coordinate transformation example to the documentation pages of GetCrystalMetric.
  • docbuild.xml file updated to work with both macOS and Windows.
  • Updated references (./Misc/References.bib)
  • README.md file updated with a Functionality section.
  • Minor documentation updates.

2.1.1

16 Jan 23:07
Compare
Choose a tag to compare
  • Added more examples to the SimulateDiffractionPattern documentation page.
  • When specifying a probability distribution of entities with EmbedStructure, the procedure now more closely fulfills that distribution instead of using RandomChoice.
  • Updated ImportCrystalData to use the data file in the UserData directory by default (changed the "DataFile" option).
  • Added "DataFile" option to EmbedStructure and ExpandCrystal.
  • Factorised data file operations for ImportCrystalData, EmbedStructure and ExpandCrystal into a InputCheck snippet with label "Update$CrystalDataFile".
  • Minor updates in the documentation (SimulateDiffractionPattern, EmbedStructure) and in the package unit test.

2.1.0

12 Jan 18:38
Compare
Choose a tag to compare

New content

  • Added the option "IncludeStructureSizeInfo" to ExportCrystalData.
  • Added the option "ScalingFactor" to SimulateDiffractionPattern.

Improvements and fixes

  • Fixed a bug in SimulateDiffractionPattern where the use of DISCUS would not work correctly.
  • Created a UserData directory in the package root and moved CrystalData.m here. $CrystalData and ResetCrystalData updated to conform with this change.
  • ImportCrystalData now returns instead of aborting if user cancels import.
  • Improved the package unit test.
  • $MaXrdPath updated with support for Windows.
  • Minor documentation updates.

2.0.0

05 Jan 14:33
Compare
Choose a tag to compare

Changes

  • InputCheck["DomainRotation"] has been replaced with InputCheck["RotationTransformation"], which is more versatile (now used in DomainPlot, EmbedStructure and SynthesiseStructure) and uses different rotation options ("RotationAnchorReference", "RotationAnchorShift", "RotationAxes").
  • Angular input parameters in BraggAngle, DomainPlot, EmbedStructure, ReflectionList and SynthesiseStructure are now expected to be in radians. This seems to be more universally adopted and makes it clearer when input is in degrees.
  • "DISCUSPlot" changed name to SimulateDiffractionPattern", as both "DISCUS" and "DIFFUSE" can now be used to generate simulations.
  • Edited init.m to print message in case of insufficient Mathematica version.
  • InputCheck declarations reorganised so snippet labels are always the first parameter (affected: "CrystalQ", "GetCentringVectors", "GetCrystalFormulaUnits", "GetCrystalSpaceGroup", "GetCrystalWavelength", "GetEnergyWavelength", "GetPointSpaceGroupCrystal", "InterpretElement", "InterpretSpaceGroup", "PointGroupQ", "PointSpaceGroupQ", "Polarisation").

New content

  • Added functionality to ConstructDomains that simplifies creation of sector domains/regions.
  • SynthesiseStructure now has a designated routine for domains.
  • "OpacityMap" option added to CrystalPlot.
  • Created the tutorial Using the rotation options aimed at the usage of DomainPlot, EmbedStructure and SynthesiseStructure.
  • ExportCrystalData now supports a new format: "DIFFUSE".
  • Implemented "DIFFUSE" as an alternative method of producing simulated diffraction patterns (through Darren Goossens' ZMC program).
  • New snippet "GetReciprocalImageOrientation" added to InputCheck.
  • Created the function ResetCrystalData.

Miscellaneous

  • DistortStructure now checks the dimensions of input.
  • Fixed a bug where GetCrystalMetric had problems with lattice parameters expressed as quantities.
  • Interstitial defect example added to DistortStructure.
  • Minor documentation updates.
  • Corrected misspelling of AsymmetricUnitCellCount in ExpandCrystal.
  • Option "Flag" in ExportCrystalData changed to "Detailed" (now a Boolean type).
  • EmbedStructure now calculates the (mean) number of atoms per unit cell for the new structure.
  • Fixed a bug in GetSymmetryData where the label "Setting" would not work as expected.
  • Renamed error message GetElements::formula to GetElements::InvalidFormula and ::invalid to ::InvalidElement.
  • Error messages of InputCheck updated.
  • A unit test for the package has been written.
  • Reorganised internal layout of the package.
  • Documentation pages updated.