Open sgbaird opened 3 years ago
Use of $CrystalData
actually seems to be causing a lot of issues for me when I'm trying to run things without a FrontEnd. Is there a way to use ImportCrystalData and ExpandCrystal without relying on $CrystalData
? E.g. by outputting the association directly from ImportCrystalData
and using the association as input to ExpandCrystal
, etc.?
Yes, it is probably due to the way $CrystalData
is defined:
$CrystalData := $CrystalData = Import[
FileNameJoin[{$MaXrdPath, "UserData", "CrystalData.m"}],
"Package"];
I think it may be more orderly to redefine $CrystalData
to be a String
instead of an Association
(or maybe create a new symbol for this: $CrystalDataFile
), which can point to a default structure data file. $CrystalData
could then be a computed property or we could make a simple function, e.g. CrystalData[]
, whose task is to import $CrystalDataFile
.
The dependent functions will have to be updated, but I think it will be better this way.
In the meantime, the functions ImportCrystalData
and ExpandCrystal
do have a "DataFile"
option. Also, you may have luck just defining $CrystalData
to be an empty association early in your terminal session.
There seems to be some issue with using the Global variable $CrystalData (I realize this is kind of a nested problem - wrapped in package then called in a Wolfram client without a Front End). Here's a MWE:
When called using Wolfram Client Library for Python:
I get the following warning :warning:
However, the output seems to be OK, except for the space group which seems to just output some unicode characters in place of 3-bar:
Doesn't seem to affect me a ton, but kind of strange.
Upon further inspection, taking it out of the wrapper package also gives the warning:
mp-134 cif file