Skip to content

Conversation

@dafda1
Copy link
Contributor

@dafda1 dafda1 commented Jun 27, 2025

Had an issue with the Constraints object not having a 'Phase' key. The only key in Constraints is 'data' and the corresponding value is a dictionary with the 'Phase' key. Fixed by specifying 'data' key.

Had an issue with the Constraints object not having a 'Phase' key. The only key in Constraints is 'data' and the corresponding value is a dictionary with the 'Phase' key. Fixed by specifying 'data' key.
@briantoby
Copy link
Collaborator

@dafda1 I'd like to understand this change a bit better. It should only be relevant when reading CIFs generated by the ISODISTORT web site, where there are constraints generated from the irrep modes. Is this what you are doing?

If not, probably this should be fixed by making sure that readers leave self.data['Constraints'] empty. How did you generate an error here?

@dafda1
Copy link
Contributor Author

dafda1 commented Jun 27, 2025

@dafda1 I'd like to understand this change a bit better. It should only be relevant when reading CIFs generated by the ISODISTORT web site, where there are constraints generated from the irrep modes. Is this what you are doing?

If not, probably this should be fixed by making sure that readers leave self.data['Constraints'] empty. How did you generate an error here?

Hi Brian, thanks for looking into this!

I am indeed trying to read a CIF generated through ISODISTORT, and I get this error at the stage where I'm adding a phase to the G2Project object by reading the ISODISTORT CIF:
#add starting structure
phase = gpxproj.add_phase(phasefile = starting_structure, phasename = "TbScO3_Pnma", histograms = histograms)

in which starting_structure is the path to the ISODISTORT CIF. I've attached the CIF in question and the script, thought it may have other dependencies.
run_sequential_refinements_ISODISTORT.py.txt
TbScO3_Pnma_BT_GSAS_20520421_refExtinction_ISODISTORT.cif.txt

dafda1 added 2 commits June 28, 2025 17:14
Had error mentioning abspath only takes 1 (positional) argument and two were given, related to the calling of "abspath(path2GSAS2, 'G2.py')". Assumed that this should be the path to 'G2.py' in the path2GSAS2 directory, so used os.path.join(path2GSAS2, 'G2.py') to join them together so that is the argument in abspath. Worked fine after this change, with the following console output:
Python installed at  /mnt/ceph/home/f1118524/.conda/envs/G2env/bin/python3.13
GSAS-II installed at /mnt/ceph/home/f1118524/.conda/envs/G2env/G2/GSASII
G2.py at             /mnt/ceph/home/f1118524/.conda/envs/G2env/G2/GSASII/G2.py
GSASII icon at       /mnt/ceph/home/f1118524/.conda/envs/G2env/G2/GSASII/icons/gsas2.png
Created Desktop shortcut calling gnome-terminal as file
	/home/f1118524/Desktop/GSASII.desktop
Created Menu shortcut calling gnome-terminal as file
	/home/f1118524/.local/share/applications/GSASII.desktop
Created '/mnt/ceph/home/f1118524/.conda/envs/G2env/Reset2FreshGSASII.sh' to reset GSAS-II installation when all else fails...
@briantoby
Copy link
Collaborator

thanks for the install issue! We don't do enough Linux testing.

@briantoby briantoby merged commit e0d9adb into AdvancedPhotonSource:main Jun 28, 2025
@briantoby
Copy link
Collaborator

Tested. The constraints generated in scripting show up in GUI so they are going to the right place. @dafda1 good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants