Skip to content

Commit 16d3b3a

Browse files
committed
add k-vec/ISODISTORT tutorial, with minor fix to catch uninstalled sympy
1 parent 6697417 commit 16d3b3a

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

GSASII/GSASIIpwdGUI.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5206,6 +5206,13 @@ def OnISODISTORT_kvec(event):
52065206
'''Search for k-vector using the ISODISTORT web service.
52075207
Developed by Yuanpeng Zhang with help from Branton Campbell.
52085208
'''
5209+
if symbols is None:
5210+
G2G.G2MessageBox(G2frame,
5211+
'Unable to perform ISODISTORT kvec search without the sympy module. Use Help/Add packages... to address','No sympy')
5212+
return
5213+
# symbolic "variables" needed below for routine to_fraction_strs()
5214+
a, b, g = symbols('a b g')
5215+
52095216
def _showWebPage(event):
52105217
'Show a web page when the user presses the "show" button'
52115218
import tempfile
@@ -5259,8 +5266,6 @@ def grab_all_kvecs(out_html):
52595266
else:
52605267
return None
52615268

5262-
a, b, g = symbols('a b g')
5263-
52645269
def frac_str(value, max_den=1000):
52655270
# Try to get a rational exactly; if huge, fall back to bounded approximation
52665271
try:
@@ -5323,10 +5328,6 @@ def setup_kvec_input(k_vec, k_vec_dict, isocif_cif):
53235328
return data_update
53245329

53255330
# start of OnISODISTORT_kvec computations
5326-
if symbols is None:
5327-
G2G.G2MessageBox(G2frame,
5328-
'Unable to perform ISODISTORT kvec search without the sympy module. Use Help/Add packages... to address','No sympy')
5329-
return
53305331
try:
53315332
import requests
53325333
except:

GSASII/tutorialIndex.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,14 @@
9595
['Magnetic-V', 'Magnetic-V.htm',"Magnetic Structure Analysis-V",
9696
'''Analysis of a complex Type IV antiferromagnet with two propagation vectorse using Bilbao k-SUBGROUPSMAG from TOF neutron powder data'''],
9797

98-
['k_vec_tutorial', 'k_vec_tutorial.html', 'k-vector searching in GSAS-II #1',
98+
['k_vec_tutorial', 'k_vec_tutorial.html', 'k-vector searching in GSAS-II #1 (all-zero vector)',
9999
'''Search neutron diffraction data of Er2Ge2O7 for a all-zero magnetic k-vector'''],
100100

101-
['k_vec_tutorial_non_zero', 'k_vec_tutorial_non_zero.html', 'k-vector searching in GSAS-II #2',
101+
['k_vec_tutorial_non_zero', 'k_vec_tutorial_non_zero.html', 'k-vector searching in GSAS-II #2 (non-zero vector)',
102102
'''Search neutron diffraction data used in Magnetic Structure Analysis-III for a non-zero magnetic k-vector'''],
103+
104+
['k_vec_isodistort', 'k_vec_isodistort.html', 'Use of ISODISTORT with a k-vector found by GSAS-II',
105+
'''Use ISODISTORT to find isotropic subgroups that are compatible with a magnetic k-vector'''],
103106

104107
#['ExampleDir', 'ExamplePage.html', 'Example Tutorial Title', '''Example descriptive text'''],
105108

0 commit comments

Comments
 (0)