Skip to content

Commit 087c066

Browse files
MNT: update tutorial project .ddp3 files.
1 parent 6d5b55f commit 087c066

File tree

8 files changed

+10
-12
lines changed

8 files changed

+10
-12
lines changed
-978 KB
Binary file not shown.
951 KB
Binary file not shown.

src/diffpy/pdfgui/doc/tutorial/Ni.stru

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ title structure Ni FCC
22
format pdffit
33
scale 1.000000
44
sharp 0.000000, 0.000000, 1.000000, 0.000000
5-
spcgr Fm-3m
5+
spcgr Fm-3m
66
cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000
77
dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000
88
ncell 1, 1, 1, 4
9-
atoms
9+
atoms
1010
NI 0.00000000 0.00000000 0.00000000 1.0000
1111
0.00000000 0.00000000 0.00000000 0.0000
1212
0.00250000 0.00250000 0.00250000
@@ -27,7 +27,7 @@ NI 0.50000000 0.00000000 0.50000000 1.0000
2727
0.00000000 0.00000000 0.00000000
2828
NI 0.50000000 0.50000000 0.00000000 1.0000
2929
0.00000000 0.00000000 0.00000000 0.0000
30-
0.00250000 0.00250000 0.00250000
30+
0.00250000 0.00250000 0.00250000
3131
0.00000000 0.00000000 0.00000000
3232
0.00000000 0.00000000 0.00000000
3333
0.00000000 0.00000000 0.00000000
-127 KB
Binary file not shown.
128 KB
Binary file not shown.
-18 KB
Binary file not shown.
190 KB
Binary file not shown.

src/diffpy/pdfgui/doc/tutorial/tui_mno_bond_lengths.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
are plotted versus temperature and saved to "mno-bond-lengths.dat" file.
88
'''
99

10-
from __future__ import print_function
11-
1210
# PDFgui project file
13-
project_file = 'lmo-template.ddp'
11+
project_file = 'lmo-template.ddp3'
1412
output_file = 'mno-bond-lengths.dat'
1513

1614
# Import tui (Text User Interface) functions from diffpy.pdfgui
@@ -28,9 +26,9 @@
2826

2927
def shortestBond_MnO(stru):
3028
"""extract the shortest MnO bond length in a structure.
31-
29+
3230
stru -- initial or refined phase from a PDFgui project
33-
31+
3432
Return the shortest bond length.
3533
"""
3634
pf.reset()
@@ -54,15 +52,15 @@ def shortestBond_MnO(stru):
5452

5553
# Save bond lengths to a file
5654
outfile = open(output_file, 'w')
57-
print("# Shortest Mn-O bond length extracted from", project_file, file=outfile)
58-
print("# temperature(K) bond_length(A)", file=outfile)
55+
print("# Shortest Mn-O bond length extracted from {}".format(project_file), file = outfile)
56+
print("# temperature(K) bond_length(A)", file = outfile)
5957
for t, b in zip(temperatures, MnO_bond_lengths):
60-
print(t, b, file=outfile)
58+
print("{}, {}".format(t, b), file = outfile)
6159
outfile.close()
6260

6361
dashline = 78 * '-'
6462
print(dashline)
65-
print("Mn-O bond lengths saved to", output_file)
63+
print("Mn-O bond lengths saved to {}".format(output_file))
6664
print(dashline)
6765

6866
# Plot results using matplotlib; pylab is a part of matplotlib that

0 commit comments

Comments
 (0)