Introduction To GSAS & GSAS-II: R.B. Von Dreele, APS, Argonne National Laboratory, USA

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Introduction to GSAS & GSAS-II

R.B. Von Dreele, APS, Argonne National Laboratory, USA


[email protected]

Presented at 44th Course: The Power of Powder Diffraction, Erice,


Italy, 2-12 June, 2011
A bit of history

GSAS – conceived in 1982-1983 by A.C. Larson & R.B. Von Dreele


1st version released in Dec. 1985
•Designed for multiple data (histograms) & phases –
“Premise of GSAS”
•Did single crystal & powders from start
•Only TOF neutrons (& buggy)
•Objective – a tool to give to users at LANSCE for diffraction –
can take home & do it themselves!
•Only for VMS - VAXFortran
•Was “OOP” before OOP invented
•Coherent data structure (ISAM for EXP file)
•Complexity of multidata/phases – required a “smart” control
file editor - EXPEDT

2
A bit more of history
Later – add CW neutrons & CW x-rays (powder data)
SGI unix version & then PC (MS-DOS) version
also Linux version (briefly HP UX version)
2001 – EXPGUI developed by B.H. Toby
Recent – spherical harmonics texture & proteins
New Windows, MacOSX, Fedora & RedHat linux versions
All identical code – g77 Fortran; 50 pgms. & ~800 subroutines
GrWin & X graphics via pgplot
EXPGUI – all Tcl/Tk – user additions welcome
Basic structure is essentially unchanged 20+ yrs later

3
Structure of GSAS
1. Multiple programs - each with specific purpose
editing, powder preparation, least squares, etc.
2. User interface – EXPEDT – control file complexity
edit control data & problem parameters for
calculations - multilevel menus & help listings
text interface (no mouse!)
visualize “tree” structure for menus
3. Common file structure – all named as “experiment.ext”
experiment name used throughout, extension
differs by type of file
4. Graphics - both screen & hardcopy
5. EXPGUI – graphical interface (windows, buttons, edit boxes,
etc.); incomplete overlap with EXPEDT but with useful extra
features – by B. H. Toby

4
GSAS & EXPGUI interfaces
GSAS – EXPEDT (and everything else):
EXPEDT
EXPEDT
data setup option (<?>,D,F,K,L,P,R,S,X) >
data setup options: On console screen
<?> - Type this help listing
D
F
-
-
Distance/angle calculation set up
Fourier calculation set up
Keyboard input – text & numbers
K n -
L -
Delete all but the last n history records
Least squares refinement set up
1 letter commands – menu help
P - Powder data preparation
R - Review data in the experiment file Layers of menus – tree structure
S - Single crystal data preparation
X - Exit from EXPEDT Type ahead thru layers of menus
Macros ($M, $R & $X commands)

Numbers – real: ‘0.25’, or ‘1/3’, or ‘2.5e-5’ all allowed


Drag & drop for file names

EXPEDT – very complex; error checking; ask questions ONCE; &


don’t ask what user shouldn’t have to know (symmetry
operators, form factors, etc.) – result of the “Premise”

5
GSAS Macro files (example)
Add some atoms in expedt – starts at opening prompt &
ends by terminating expedt; includes setting scale factor
& some other stuff  A bit cryptic?
k l a !We need to insert the atoms
i 10 sb 0 0 0 1 Sb i / !Enter the Antimony atom
i n o 1/4 1/4 1/4 1 O i / !Enter the Oxygen atom
i n f .064 .136 .394 1 F i / ! and the Fluorine atom
v 10:12 x u !Refine both position and Thermal motion
x !We are finished with the atoms
o h !Let's set the histogram scale factor up properly
c .4 !Change it to .4
x x !Exit back to the main LS menu
l !Edit the LS control data
c 5 !Run 5 cycles
f n !Refine on F, not FSQ
s 1.5 / !Limit the data to F>3Sig(F)
n 5 !Set Rfree on 5% of data
x !We are done with the LS control editing
x !We are done with the LS data editing
x !Exit from EXPEDT

Comments on each line after “!”

6
PC-GSAS – GUI only for access to GSAS programs
pull down menus for GSAS programs

(Windows only - not linux)

7
GSAS & EXPGUI interfaces

EXPGUI:
Access to GSAS
Typical GUI – edit boxes,
buttons, pull downs etc.
Liveplot – powder pattern

8
GSAS-II: A fresh start
Fill in what’s missing from
GSAS:
- Indexing
- Structure solution
Base code – python
Mixed in old GSAS Fortran
Graphics –
GSASII – fresh start matplotlib,OpenGL
GUI – wxPython
Math – numpy,scipy
Current: python 2.6 & 2.7

Brief demo?
GSAS-II: A new General Structure Analysis System
 Goals:
– Cover crystallographic data analysis from raw data to final result
– Same premise as for GSAS; combined data analysis
– A complete system in a modern, easily accessible computer
language – Python
– Modern Graphical User Interface (GUI)
– Open source – Python
– All modern platforms (Windows, Linux & Mac OS10+) – Python
– Reuse a bit of old GSAS – Fortran; e.g. space group stuff
– Presently aimed at x-ray scattering : include neutrons in future
– More “General” – include small angle, PDF, reflectrometries
GSAS-II: A screen shot – 3 frame layout
Main menu
Data tree

Submenu

Data tabs

Data window

Drawing tabs
Graphics window
Another screen shot of GSAS-II – multipattern peak
fitting
Progress bar
Data tree

Data items – peak list

Console – output messages


Console – list output

12
GSAS-II Current capabilities: 2D images
Calibration – tilted detector (e.g. 45 about vertical axis)

Ellipses – sections of
Debye-Scherrer cones

Ellipse centers – not on


beam center!

Fitting only requires


material (LaB6) and l
(e.g. don’t need to know
distance – get that from
fit)

Choice of color scheme –


“Paired” is shown
GSAS-II Current capabilities: 2D images
Integration

Multiple pie shaped sections with


definable starting azimuth

Lower & upper limits on 2Q


Masks – spots, arcs, rings &
polygons (not shown)
Effective replacement for Fit2D

Unlimited workspaces – as many


images as you want.
Image combination –
sum/difference
Image formats – tiff, MAR345, e.g.
all I could find at APS.
GSAS-II Current capabilities: Powder patterns

Waterfall plots or contour plots

Peaks can be selected/fitted &


indexed to identify lattice –
modification of algorithm by
A. Coelho.
GSAS-II Current capabilities:
Pair Distribution Functions
Multiple PDFs – example: 183
images/183 powder
patterns/183 G(R)s calculated
Shows transition as T varied

Simple interface – one


for each PDF; easy
controls
GSAS-II More capabilities:
Structure drawing

Polyhedra
Van der Waals
Balls & sticks
Thermal ellipsoids
All selectable by atom
GSAS-II Future – fill in rest of the maze
 Pawley/le Bail
refinement
 Charge flipping
 Monte Carlo/Simulated
Annealing
 Rietveld refinement
 Result Analysis
– Bonds & angles
– Validation
 CIF Publication
 Other scattering
– PDF (done)
– Small angle
– Reflectometry
NB – nonatomistic
models
GSAS & GSAS-II Availability
 Subversion server at Argonne:
https://subversion.xor.anl.aps.gov
 GSAS & EXPGUI: find it under EXPGUI (don’t go to GSAS –
that’s source for us only); easy installation/upgrade
 Erice - //ERICE_SERVER/GSAS – Win, Linux & Mac OSX
 pyGSAS/trunk & pyGSAS/Examples
– But not much instruction for
downloading/installing/running; hopefully soon
– You will need python 2.6-2.7, matplotlib, numpy, scipy,
pyOpenGL, wxPython – easy from Enthought
 Also Fprime & Absorb: find under pyFprime
 A plug for APS & 11BM – go to http://11bm.xor.aps.anl.gov
12 detector/analyzer diffractometer with mail-in program…

You might also like