Skip to content

Kvec talks to isodistort #139

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

Open
wants to merge 351 commits into
base: master
Choose a base branch
from
Open

Kvec talks to isodistort #139

wants to merge 351 commits into from

Conversation

Kvieta1990
Copy link
Collaborator

@Kvieta1990 Kvieta1990 commented Feb 12, 2025

I added in the capability to communicate with the isodistort server after the k-vector search in GSAS-II. Once we get the searched k-vector table, we can select either of the k vectors in the table and click on the button to talk to isodistort.

Currently, I am only outputting all the CIF files corresponding to all the isotropic subgroups associated with the selected k vector. The next step will be to incorporate those CIF files into independent GSAS-II project file, which I may need help from @briantoby

N.B. For the moment, I am outputting all the CIF files into os.getpwd(). Not sure whether this is the optimal solution. Also, after the output is done, I am having a message box saying the job is done and include the output path in the message box. However, it seems the path in the message box would be wrapped up and I don't know the way to control the message box window size so that the path can be displayed in a single line.

Here is the file that we can use for testing and further development.
Ba6Co6_nuc_refine.gpx.zip

@Kvieta1990 Kvieta1990 added the enhancement New feature or request label Feb 12, 2025
@Kvieta1990 Kvieta1990 requested a review from briantoby February 12, 2025 16:38
@Kvieta1990 Kvieta1990 self-assigned this Feb 12, 2025
@briantoby
Copy link
Collaborator

The routine GSASIIphsGUI...OnApplySubgroups() shows code that creates multiple .gpx files.

  • Line 4168 saves the current project.
  • Then I delete sections of the project that would not be correct after the phase is updated (this is probably not needed if a magnetic phase will be added rather than replacing a phase).
  • The code inside the loop replaces the phase
  • Once the loop is done (line 4250) the .gpx file saved in 4168 is reread
  • The _ShowPhase routine opens the data tree to the previously displayed location so the user see the same info as previously displayed.

Note that G2frame.GSASprojectfile is the name of the current .gpx file and G2frame.LastGPXdir is the directory where that file was saved. There is also a path, G2frame.dirname but I'm really not sure what that is used for. At one time we tracked a directory where data would be read from (for example with tutorials). I'm not sure if that still works, but that might be what G2frame.dirname is all about.

@briantoby
Copy link
Collaborator

As far as message box goes, I think you are referring to wx.MessageBox which is somewhat unpredictable. It uses a native widget to Linux, Windows and Mac can all behave differently (and probably different on different flavors of Linux.) To deal with that, I plan to change GSASIIctrlGUI.G2MessageBox to create its own window, but I have not gotten around to that.

You can use GSASIIctrlGUI.ShowScrolledInfo, where you can control the size of the window (but it does wrap text that is too wide for the supplied width). It would not be that hard to add an option to ShowScrolledInfo to turn off text wrapping or perhaps a routine to create a window that scrolls and does not wrap. I don't think one would want to make the window expand to fit the text (in case the text is really long).

@Kvieta1990
Copy link
Collaborator Author

Thanks a lot Brian for your comments! I will work further on this branch and I will let you know when the PR is ready for you to check again before merging into master. Thanks!

@briantoby
Copy link
Collaborator

If you need any help, please ask

tacaswell and others added 13 commits February 19, 2025 17:51
* BLD: do not track build product

* BLD: add pycifrw dep to pyproject.toml

* BLD: be forgiving about a detached head

This happens on CI

* keep git_version.py file; but have build create an alternate ignored file (saved_version.py)

* BLD: get generated executables into install-editable pixi install (assumes a lot w/r path names)

* BLD: remove broken windows build from self-test suite

---------

Co-authored-by: BHT <[email protected]>
Not sure why Bob's changes did not get into last merge
@Kvieta1990
Copy link
Collaborator Author

Got the project generated successfully but it seems that the phase in the new generated project file is not changed. Not sure why. will keep working on this.

Kvieta1990 and others added 7 commits June 6, 2025 11:54
Fixed and replaced xrange with range in NIST_profile/profile_functions_class.py
Fix GSASIIscriptable via update to profile_functions_class.py. Alas, I just learned that Marcus is no longer with us, sigh, so I will just have to accept this change.
Merge remote-tracking branch 'origin/main' into kvec_isodistort_zyp
@briantoby
Copy link
Collaborator

I have made changes but was prepared to test them. I think this will now rename the phase properly in the data tree for the created .gpx files. Please let me know if there are any non-obvious bugs that I have created

vondreele and others added 20 commits June 17, 2025 14:28
Add option to save as csv file the bond/angle distributions from RMCProfile result
so that it is ready to merge into main as a FF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants