Code Monkey home page Code Monkey logo

gsas-ii's People

Contributors

bfrosik avatar briantoby avatar prjemian avatar vondreele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dgqyushen

gsas-ii's Issues

propogate rigid body uncertainties to atom coordinates

Rigid body parameters determine the uncertainties on atom coordinates for atoms in those groups. Likewise for Uiso and Uaniso values from TLS fits, etc. At present these s.u. values are not computed, but should be (from the rigid body derivatives and the covariance matrix). Report these in the CIF export.

gsas2full-5773-MacOSX-x86_64.sh errors

I tried to install GSAS-II via the self-installer downloads at https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/tag/v1.0.1, but the install failed (see commands below). I think the installer is looking for an exe file that I likely don't have (MacOS 14.4, Intel Core i7)

PS - The installer implies the version is 4446, but the download page implies 5773. Which is correct?

PSS - Do you want installer questions here, or in build tools (https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/). The new webpage guidance only directs here (https://advancedphotonsource.github.io/GSAS-II-tutorials/bug.html)

cd Downloads/
./gsas2full-4446-MacOSX-x86_64.sh 

Welcome to gsas2full 4446

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue

Do you accept the license terms? [yes|no]
[no] >>> yes

gsas2full will now be installed into this location:
/Users/**********/gsas2full

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/Users/**********/gsas2full] >>> /Users/**********/gsas2full-5773  
PREFIX=/Users/**********/gsas2full-5773
Unpacking payload ...
/Users/**********/gsas2full-5773/conda.exe: line 1: =============================================: command not found
/Users/**********/gsas2full-5773/conda.exe: line 2: syntax error near unexpected token `c'
/Users/**********/gsas2full-5773/conda.exe: line 2: ` Copyright (c) 2016, Continuum Analytics, Inc.'
ERROR: could not extract tar starting at offset 000000000000015246+9490254+2


Improve project CIF Exports

Note comments below from 2/12/24 email "GSAS-II CIF requests"

Hi, Brian and Bob:
A committee of the Commission on Powder Diffraction and IUCr staff in Chester have been working on making checkCIF and the publication process more powder diffraction friendly. Some progress has been made in eliminating irrelevant alerts, but a few things would be better fixed from your end.

  1. Could GSAS-II add
    the weighting scheme
    the excluded regions
    H-atom treatment
    the number of restraints
    to the CIF it writes? Or do we make the author add these?
  2. I gave them a CIF where the radiation was Mo. _diffrn_radiation_type was just K\a1,2. The Mo had to be added. Is this a glitch?
  3. There is the matter of the maximum shift/esd. If the refinement has converged, could this value be set to the convergence criterion, or could you just do the one more cycle suggested?
    Are these things doable?

They have fixed the problem of senseless esds on bond distances and angles involving non-refined H (!). They are also working on recognizing wavelengths and residuals which are art of loops.

Reply 2/15/24

I have to say that writing code to create CIFs is one of my least
favorite tasks, but I am certainly willing to work on improving the
CIFs that GSAS-II creates. What would make this task a lot easier
would be examples showing what GSAS-II produces and what would be
better. I’ll include some comments and questions below.

On Feb 12, 2024, at 2:56 PM, [email protected] wrote:

  1. Could GSAS-II add
    the weighting scheme

As far as I am aware, Rietveld is always weighted by experimental
uncertainties (which depends on the data provider getting that right),
except that we provide the possibility for changing the relative
importance of different data sets. How would all this be indicated in
CIF?

the excluded regions

This information is there, in that weights are set to zero for
excluded points, but I could specify the actual regions. I’m not sure
this was in pdCIF when I wrote the exporter or maybe I was just lazy.

H-atom treatment

What is being sought? How were the positions generated? Or how were
they refined? The former is going to need to be put in by the user,
but could go into the template for each phase. As for refinement, I
don’t think we offer a riding mode, but people can create their own
restraints and constraints so that could be messy.

the number of restraints

Is this number really worth anything? What about constraints? What
about the relative contributions of restraints to the total chi
squared? All of this can be produced.

  1. I gave them a CIF where the radiation was Mo.
    _diffrn_radiation_type was just K\a1,2. The Mo had to be added. Is
    this a glitch?

I’m not sure if we store the anode or perhaps just the wavelengths.
This will need some investigation and might be a no-can-do.

  1. There is the matter of the maximum shift/esd. If the refinement
    has converged, could this value be set to the convergence criterion,
    or could you just do the one more cycle suggested?

I’m not sure if I understand this. Are you saying to have the
refinement engine run for one more cycle after convergence is
detected? Or run a cycle of refinement just before creating the CIF
(I’d be reluctant to do that). What do you want reported for this?

I think most of this is doable. Maybe all.

Brian

cynarine_5.cif.gz
cynarine_5.gpx.gz
cynarine_H2O_R1.cif.gz
vege083.gpx.gz
vege083E_GSAS.cif.gz
vege083E.cif.gz

GSAS-II CSV Exporting bug

From "Konjeti, Vineeth" [email protected]:

Hey, I finally can get around to explaining the process of what I did to get this bug.

All work done on Windows 11.
I am using a similar GSAS-II project to the base.gpx file except this time, I have the Shelx HKLF 4 data attached and have already done a refinement cycle.

I click CSV file option or the Text File option under Export > "Single Crystal data as"
image

it asks me to give the file a name as usual
image

when I open the file up, it comes up empty
image

refinement.gpx.zip

Try out wx.html2 for web browser

wxpython offers a html viewer that may be better that the current webbrowser import for use with help & possibly tutorials. Maybe access to external codes (SUBGROUPS & ISODISTORT?).

Code outline:

import wx
import wx.html2

class Frame(wx.Frame):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        
        self.browser = wx.html2.WebView.New(self)

        self.Bind(wx.html2.EVT_WEBVIEW_NAVIGATING,
                  lambda v: self.SetTitle(v.URL))

if __name__ == "__main__":
    app = wx.App()
    frm = Frame(None)
    frm.browser.LoadURL("https://www.office.com/?auth=1") # Microsoft 365
    frm.Show()
    app.MainLoop()

Utilize Cinema: Debye-Scherrer

The LANL Cinema: Debye-Scherrer visualization package looks nice. What would be needed to allow GSAS-II to generate files that could be used in that?

Multibank sequential fitting

Allow grouping of histograms in sequential fitting: combined fits or for TOF instruments that produce multiple histograms.

Needs a tool (in controls) to select groups histograms into groups and save them (nested list?). Then in sequential fit, iterate over groups of histograms. Need to think how to display results in sequential fit table.

k-vector todos

  • (bug) NiO with space group R-3m and k=(0,0,3/2) with respect to the conventional cell (hexagonal axes). This one doesn't seem to work correctly: when searching high symmetry points, (0,0,3/2) doesn't appear in the list of potential solutions, which suggests there's a bug in either the conventional/primitive cell conversion or the d-spacing calculation.

  • The "HighSymPts & HighSymPaths" option actually searches only HighSymPaths. So we should change the label.

  • replacing the tolerance box with a "List top N results" box, that defaults to show the top 10 results (if there are more than 10, and all results otherwise).

  • isodistort implementation

  • List Avg. \delta(d) and Max. \delta(d) in the table, as well as Avg. \delta(d)/d.

Importer calling FabIO

FabIO reads lots of image types that GSAS-II does not. An importer could call FabIO. This requires matching FabIO metadata reporting to the GSAS-II input needs.

K-vector Search Discussion Notes

04102024


Agenda


  • Documentation needed for the k-vector search functionality -> howto?

  • How are those ARM32 binaries built? Do we have dedicated machines or virtual machines with the specific architecture?

  • I created a branch called develop from the main master branch and added in our new implementation of the k-vector search functionality. I tested it out, fixed several little bugs and I am now confident that the functionality is working robustly. This also includes the change of the k-vector search routine itself, which does need a bit of attention as detailed below.

  • Through testing against artificially generated data (for which we know exactly the ground truth k-vector), we found that we have to go with a fine k-grid for the k-vector searching. This proposes the need for fast calculation. Concerning the speedup, we introduced a combination of two types of solutions -- using multiprocessing together with Cython.

  • Question for @briantoby -- are we currently using any Cython in GSAS-II? Basically, a Cython file is something pretty much like Python code but can be compiled as C library to be imported into Python routine, which can significantly boost up the calculation. So I implemented multiprocessing in Cython and considering the two layers of speedup, we can now perform a heavy calculation with relatively acceptable amount of time (but still on the level of several hours).

  • Testing routine needed for internal people to test out the implementation before releasing to public. I will work on creating a script for people to easily test out the new implementation, with the develop branch.


Minutes


  • Add the Cython compiling stuff into the local build scripts

    Create new files for the new implementation

    Refer to those files that are not starting with G2 here

  • GSAS-II Web Documentation (here) contains general introduction to GSAS-II, meaning it is NOT the place to host the technical details.

    Refer to the source codes here for building the documentation with sphinx.

  • The repo here is for building up the tutorial website. We need to manually populate HTML files for new tutorials (by creating its own directory or putting into existing ones). If a new directory is created to host the new tutorials, we need to follow the instructions here to worry about getting the new directory into the website structure.

  • The GSAS-II development documentation (see here) is built from source RST files together with the docstring in GSAS-II source codes. The source RST files can be found here. To populate the docstring in GSAS-II python source codes into the rendered documentation, we only need to follow the source code structure and refer to certain classes/methods inside the RST file. The place to search for the source Python files for the doc building purpose is defined here.

    Concerning the documentation for the k-vector search, we want to put the reference to the k-vector search docstring into GSASIIutil.rst file which can be found here.

  • For creating the tutorials, relevant exercise files should go into the data subdirectory under certain directory for the specific tutorial. There is an index.htm file inside the data subdirectory -- we don't need to worry about it as it will be automatically generated based on the files we have in the data subdirectory.

  • Do a local build for sphinx to make sure the documentation is rendered as expected before pushing to the repo.

  • Refer to the GSASIImapvars.py and GSASIIscriptable.rst files for nitty-gritties of using reStructuredText.

04032024


Agenda


  • See the todo list in k_vector_search.py.

  • Easy way to have a local test version for beamline scientists to test out, e.g., the k-vector search functionality?

  • When clicking on different items in the tree, the menu options will be updated. How?


Minutes


  • Finish up the k-vector search new implementation.

  • Create a branch for hosting the new implementation of k-vector and we will work out a way for people to do the testing.

  • Brian walked through the implementation of the menu bar items => see notebook for more information.

    https://yr.iris-home.net/gsasiimenunotes

Import Goniometer radius

From user "Would it be possible to put the Goniometer radius in the instrument parameter file? It would be useful to make this instrument specific."

Likewise, the other stuff in the .samprm ('Type', 'Gonio. radius', 'InstrName') also makes sense in a .instprm file.

Thoughts: add to existing file; could somehow combine reading/writing the two.

Allow plotting in Q during fit

The plot shown during fitting can be in TOF or 2theta, but not Q. If the plotting mode has been set to Q, it would be nice if it stayed in Q.

Revisit logging: put info into notebook

The logging code, mostly commented out at present, would provide a useful track of what has been done in a refinement if placed into the GSAS-II notebook. Perhaps a filter on the notebook would also be useful to pick out only some types of entries there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.