Skip to content

Commit 52e592a

Browse files
Merge pull request #91 from dragonyanglong/next
update readme and tutorial files.
2 parents 6d5b55f + 5f8be91 commit 52e592a

File tree

10 files changed

+13
-15
lines changed

10 files changed

+13
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Notable differences from version 1.1.2.
44

5-
## Version 2.0.0 – 2023-05-04
5+
## Version 2.0.1 – 2023-05-11
66

77
### Added
88

@@ -12,6 +12,7 @@ Notable differences from version 1.1.2.
1212
### Changed
1313

1414
- Update wxpython to 4.1.1 and remove incompatible align flags.
15+
- Update tutorial project files for py3.
1516

1617
### Deprecated
1718

@@ -20,4 +21,3 @@ Notable differences from version 1.1.2.
2021
### Fixed
2122

2223
- Incompatible conversion between bytes and str from py2 to py3.
23-
-

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ is available in the doc/Farrow-jpcm-2007.pdf paper.
2020
REQUIREMENTS
2121
------------------------------------------------------------------------
2222

23-
PDFgui requires Python 3.7, 3.8, 3.9, or 2.7 and several third-party
23+
PDFgui requires Python 3.8+ or 2.7 and several third-party
2424
libraries that are used by PDFgui and its components.
2525

2626
* setuptools - tools for installing Python packages
-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)