\(\renewcommand\AA{\text{Å}}\)
20. GSAS-II Web Modules
These modules are used to access external web sites.
20.1. SUBGROUPS: Interface Bilbao SUBGROUPS & k-SUBGROUPSMAG web pages
Extraction of space subgroups for a given space group and a propagation vector
from the GSAS version of SUBGROUPS & k-SUBGROUPSMAG web page on the Bilbao Crystallographic server. Note that the web pages are special to GSAS-II.
This uses the GSASIIpath.postURL() function for web access.
20.1.1. Module SUBGROUPS
Routines that access the Bilbao Crystallographic Server.
Note that there is a test for some of these routines in
file tests/run_bilbao.py.
- GSASII.SUBGROUPS.BCS_init(threadCallback=None)[source]
Initialize access to the Bilbao Crystallographic Server.
- Returns:
True if initialization fails due to the lack of a key
- GSASII.SUBGROUPS.BilbaoGetStructure(csdict, rowdict, stru, pagelist=None, dlg=None, dlgNum=None, prefix='')[source]
Get the structure for a specified supergroup using the results from BilbaoSymSearch1
- GSASII.SUBGROUPS.BilbaoLowSymSea1(formDict, row, pagelist=None)[source]
Using a candidate higher symmetry unit cell from
BilbaoSymSearch1()for monoclinic and triclinic cells, create a list of possible supergroups. Those that match the possible lattice types are marked for potential follow-up to see if coordinates can be are consistent with that symmetry.- Returns:
latticeList,valsdict,tbl where
latticeList: a list of the possible Bravais lattice types
valsdict: a dict with values needed for the next web form
- tbl a list of supergroups with four values per entry,
True/False if the lattice type matches,
a label with the space group number and the index (sg@ind),
the space group number and a lattice type (cell & centering)
- GSASII.SUBGROUPS.BilbaoLowSymSea2(num, valsdict, row, savedcookies, pagelist=None)[source]
For a selected cell & supergroup from
BilbaoLowSymSea1(), see if the coordinates are consistent with the supergroup
- GSASII.SUBGROUPS.BilbaoReSymSearch(key, result, maxdelta=2, pagelist=None)[source]
Perform a supergroup search on a result from previously identified supergroup that was found in
find2SearchAgain()from the returned web pages. Provides results about the same as fromBilbaoSymSearch1()- Returns:
formDict,csdict,rowdict where formDict will contain values to be used in the next call to Bilbao
csdict will be used to select which entries will be used in the next search and rowdict contains possible supergroup settings.
- GSASII.SUBGROUPS.BilbaoSymSearch1(sgnum, phase, maxdelta=2, angtol=None, pagelist=None, keepCell=False)[source]
Perform a search for a supergroup consistent with a phase using the Bilbao Pseudosymmetry search (PSEUDO) program, see C. Capillas, E.S. Tasci, G. de la Flor, D. Orobengoa, J.M. Perez-Mato and M.I. Aroyo. “A new computer tool at the Bilbao Crystallographic Server to detect and characterize pseudosymmetry”. Z. Krist. (2011), 226(2), 186-196 DOI:10.1524/zkri.2011.1321.
The phase must be in a standard setting.
- Parameters:
sgnum (int) – A space group number (1-230)
phase (dict) – a GSAS-II phase object (see Phase Information). Note that the phase must be in a standard setting (see
GetStdSGset()).maxdelta (float) – Allowed distance tolerance in pseudosym search (default 2)
angtol (float) – Allowed tolerance for cell angles, used for finding possible unit cells in from triclinic or monoclinic cells, ignored otherwise. Defaults to None, which will cause 5 degrees to be used.
pagelist (list) – a list to contain references to the text of web pages created by the Bilbao web site. If None (default) the web pages are not saved.
keepCell (bool) – if False (default) and the cell is monoclinic or triclinic, a search is made for higher symmetry cells. If True, the search is made with the current cell.
- Returns:
formDict,csdict,rowdict,stru where the contents will change depending on the space group, but formDict will contain values to be used in the next call to Bilbao
For monoclinic and triclinic unit cells: csdict will be None and rowdict (rowlist) will be a list containing unit cells of higher symmetry matching the input unit cell to be used for searching for supergroups.
For higher symmetry unit cells, csdict will be used to select which entries will be used in the next search and rowdict contain possible supergroup settings.
- GSASII.SUBGROUPS.GetNonStdSubgroups(SGData, kvec, star=False, landau=False, maximal=False)[source]
Run Bilbao’s SUBGROUPS for a non-standard space group. This requires doing a post to the Bilbao site, which returns all subgroups of the entered space group as the text of a web page with a table containing the space group symbol, the transformation matrix and index for each subgroup.
- Params list kvec:
propogation vector as a list of nine string fractions or blank
- Params SGData:
space group object (see Space Group object)
- Returns:
(error,text) error: if True no error or False; where text containts a possible web page text
- GSASII.SUBGROUPS.GetNonStdSubgroupsmag(SGData, kvec, star=False, landau=False, maximal=False)[source]
Run Bilbao’s k-Subgroupsmag for a non-standard space group. This requires doing a post to the Bilbao site, which returns all magnetic subgroups of the entered subgroup as the text of a web page with a table containing the BNS magnetic space group symbol, the transformation matrix and index for each subgroup.
- Params list kvec:
propogation vector as a list of three numbers
- Params SGData:
space group object (see Space Group object)
- Returns:
(error,text) error: if True no error or False; where text containts a possible web page text
- GSASII.SUBGROUPS.GetStdSGset(SGData=None, oprList=[])[source]
Determine the standard setting for a space group from either a list of symmetry operators or a space group object using the Bilbao Crystallographic Server utility IDENTIFY GROUP
- Parameters:
oprList (list) – a list of symmetry operations (example: [‘x,y,z’, ‘-x,-y,-z’]). Supply either this or SGData, not both.
SGData – from
GSASIIspc.SpcGroup()Supply either this or oprList, not both.
- Returns:
(sgnum, sgnam, xformM, offsetV) where:
sgnum is the space group number,
sgnam is the space group short H-M name (as used in GSAS-II)
xformM is 3x3 numpy matrix relating the old cell & coordinates to the new
offsetV is the vector of offset to be applied to the coordinates
Note that the new cell is given by G2lat.TransformCell([a,b,…],xformM)
- GSASII.SUBGROUPS.RegisterProgressDialog(pgbar=None)[source]
Register a ProgressDialog so it is updated while waiting for the Bilbao server to respond. To reset, when the ProgressDialog is destroyed, call with no argument.
- Returns:
the result from BCS_init, True if initialization fails due to the lack of a key.
- GSASII.SUBGROUPS.createStdSetting(cifFile, rd)[source]
Use the Bilbao “CIF to Standard Setting” web service to obtain a structure in a standard setting. Then update the reader object with the space group, cell and atom positions from this. This is called from the CIF importer in
G2phase_CIFwhen a structure is encountered that has different symmetry operators from what GSAS-II generates.
- GSASII.SUBGROUPS.find2SearchAgain(pagelist, req='@')[source]
Scan through web pages from supergroup tests and pull out where coordinates pass the tests to be potentially used to search entries to be used to search for a higher symmetry setting.
- GSASII.SUBGROUPS.scanBilbaoMinsup(page0)[source]
Scan the output from Bilbao minsup search. Obtains a set of cells and symmetry.
- Returns:
formDict,csdict,rowdict where: * formDict: has the information to be submitted on the next form * csdict: a dict of True/False values with the defaults for continued
searching on each row
rowdict: a dict with the information for each cell/sym that was found. The contents of each row are list elements:
HM symbol, sgnum, index, index i_k, TR mat, Trans Cell, WP valid, latt_valid
- GSASII.SUBGROUPS.scanBilbaoPseudocell(page0)[source]
Scan the output from Bilbao minsup search. Obtains a set of cells and symmetry.
- Returns:
formDict,csdict,rowdict where: * formDict: has the information to be submitted on the next form * csdict: is None
searching on each row
rowdict: a dict with the information for each cell/sym that was found.
20.2. ISODISTORT: Interface to BYU ISODISTORT web pages
Uses the BYU ISODISTORT web site to search over all k-points for a structure or to relate a parent and child structure by irreps. This uses the mod:requests package.
- GSASII.ISODISTORT.GetISODISTORT(Phase)[source]
Run Stokes & Campbell ISODISTORT. This requires doing a post to the BYU upload site with a cif file, which returns a BYU local copy. This is then sent to the BYU form site with various options, which returns all subgroups of the entered space group as the text of a web page with a table containing the space group symbol, the transformation matrix and index for each subgroup. Selection of one of these is returned to the BYU form site which returns the text of a cif file to be used to create the new phase which can apply the distortion mode constraints
- Params dict Phase:
GSAS-II phase data
- Returns:
radio: dict of possible distortion structures
- Returns:
data2: list of str input for next run of isositortform for extracting cif file
- GSASII.ISODISTORT.GetISODISTORTcif(Phase)[source]
Run Stokes & Campbell ISODISTORT. Selection of one of the order parameter disrections is returned to the BYU form site which returns the text of a cif file to be used to create the new phase which can apply the distortion mode constraints
- Params dict Phase:
GSAS-II phase data; contains result of GetISODISTORT above & selection
- Returns:
CIFfile str: name of cif file created by this in local directory