\(\renewcommand\AA{\text{Å}}\)

18. GSAS-II Web Modules

These modules are used to access external web sites.

18.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 GSASIIIO.postURL() function for web access.

SUBGROUPS.BilbaoLowSymSea1(valsdict, row, savedcookies, 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)

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

SUBGROUPS.BilbaoReSymSearch(key, postdict, 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 from BilbaoSymSearch1()

Returns:

valsdict,csdict,rowdict,savedcookies where valsdict will contain values to be used in the next call to Bilbao and savedcookies will contain a cookie needed for this as well.

csdict will be used to select which entries will be used in the next search and rowdict contains possible supergroup settings.

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:

valsdict,csdict,rowdict,savedcookies where the contents will change depending on the space group, but valsdict will contain values to be used in the next call to Bilbao and savedcookies will contain a cookie needed for this as well.

  • 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.

SUBGROUPS.BilbaoSymSearch2(valsdict, csdict, rowdict, savedcookies, pagelist=None, dlg=None, ophsnam='?')[source]

Perform a supergroup search from the list of identified supergroups found in BilbaoSymSearch1 (typically where the cell is higher symmetry than monoclinic or triclinic; see BilbaoLowSymSea1() and BilbaoLowSymSea2() for the low symmetry case.)

SUBGROUPS.GetNonStdSubgroups(SGData, kvec, star=False, landau=False, maximal=False)[source]

Run Bilboa’s SUBGROUPS for a non-standard space group. This requires doing a post to the Bilboa 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

SUBGROUPS.GetNonStdSubgroupsmag(SGData, kvec, star=False, landau=False, maximal=False)[source]

Run Bilboa’s k-Subgroupsmag for a non-standard space group. This requires doing a post to the Bilboa 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

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)

SUBGROUPS.GetSupergroup(SGnum, dlg=None)[source]

Get supergroups for a space group in a standard setting using the Bilbao Crystallographic Server utility “Minimal Supergroups of Space Groups” (minsup)

This routine is not fully tested and is not currently implemented.

Parameters:

SGnum (int) – a space group number (1-230)

Returns:

a list of supergroups where each entry in the list contains [sgnum, sgnam, index, xtype, url, xformlist) where:

  • sgnum is the space group number,

  • sgnam is the space group short H-M name (no spacing, not GSAS-II usage)

  • index (int) is the change in asymmetric unit size

  • xtype (char) is the transformation type (t,k)

  • url is a link to compute the subgroup transformations

  • xformlist is a list containing all the subgroup transformations. xformlist contains [(M,V), (M,V),… ] where:

    • M is 3x3 numpy matrix relating the old cell & coordinates to the new

    • V is the vector of offset to be applied to the coordinates

    Note that the new cell is given by G2lat.TransformCell([a,b,…],M)

SUBGROUPS.applySym(xform, cell)[source]

Determine a unit cell according to a supergroup transformation computed with the Bilbao Crystallographic Server utility “Minimal Supergroups of Space Groups” (minsup) utility.

The required symmetry is applied to the cell and the cell is scaled so that the unit cell volume is unchanged beyond the scaling in the transformation matrix.

This is not used in GSAS-II at present. Some additional thought is likely needed to to drop unit cells that are too far from the required lattice symmetry.

Parameters:
  • xform (list) – a list of transformations from GetSupergroup()

  • cell (list) – the unit cell to be transformmed.

Returns:

a list of two cells for each transformation matrix in xform. The first cell in each pair is the scaled cell where lattice symmetry has been applied, while the second cell is the direct transform of the input cell.

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.

SUBGROUPS.parseBilbaoCheckLattice(page)[source]

find the cell options from the web page returned by Bilbao PseudoLattice

SUBGROUPS.saveNewPhase(G2frame, phData, newData, phlbl, msgs, orgFilName)[source]

create a .gpx file from a structure from the BilbaoSite pseudosym site saved in newData

SUBGROUPS.subBilbaoCheckLattice(spgNum, cell, tol=5)[source]

submit a unit cell to Bilbao PseudoLattice

SUBGROUPS.test()[source]

This tests that routines in Bilbao Crystallographic Server are accessible and produce output that we can parse. The output is displayed but not checked to see that it agrees with what has been provided previously.

18.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.

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

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