Skip to content

Commit 7a80444

Browse files
committed
Add conda instructions to README.
Finish conversion to RST format. Advise about DiffPy-CMI.
1 parent 2a9580f commit 7a80444

File tree

1 file changed

+77
-49
lines changed

1 file changed

+77
-49
lines changed

README.rst

+77-49
Original file line numberDiff line numberDiff line change
@@ -5,79 +5,107 @@
55
:target: http://codecov.io/github/diffpy/diffpy.pdffit2?branch=master
66

77

8-
diffpy.pdffit2 - real space structure refinement to atomic PDF
9-
10-
The diffpy.pdffit2 package enables calculation and refinement of atomic
11-
Pair Distribution Function (PDF) from crystal structure model. It is
12-
used as a computational engine by PDFgui. All refinements possible
13-
in PDFgui can be done with diffpy.pdffit2, it is a lower level library
14-
and requires fair Python knowledge. The package includes a pdffit2
15-
command-line application, which tries to mimic the old PDFFIT program.
16-
The pdffit2 program launches Python interactive session with several
17-
libraries and functions preloaded for convenience. The pdffit2 program
18-
is suitable for interactive use, however refinement scripts should be
19-
rather written as normal Python; this is more reliable and needs only
20-
few extra lines of code.
8+
PDFfit2
9+
========================================================================
10+
11+
Real space structure refinement to atomic pair distribution function.
12+
13+
The diffpy.pdffit2 package provides functions for calculation and
14+
refinement of atomic Pair Distribution Function (PDF) from crystal
15+
structure model. It is used as a computational engine by PDFgui. All
16+
refinements possible in PDFgui can be done with diffpy.pdffit2,
17+
although less conveniently and with a fair knowledge of Python.
18+
The package includes an extension for the interactive `IPython
19+
<http://ipython.org>`__ shell, which tries to mimic the old PDFFIT
20+
program. To start IPython with this extension and also with plotting
21+
functions enabled, use ::
22+
23+
ipython --ext=diffpy.pdffit2.ipy_ext --pylab
24+
25+
The IPython extension is suitable for interactive use, however
26+
refinement scripts should be preferably written as a standard
27+
Python code. This is more reliable and needs only a few extra
28+
statements.
2129

2230
To learn more about diffpy.pdffit2 library, see the examples directory
2331
included in this distribution or the API documentation at
24-
25-
http://docs.danse.us/diffraction/diffpy.pdffit2
32+
http://www.diffpy.org/doc/pdffit2.
2633

2734

2835
REQUIREMENTS
36+
------------------------------------------------------------------------
2937

30-
diffpy.pdffit2 requires Python2.5 and the following external software:
31-
32-
setuptools -- software distribution tools for Python
33-
python-dev -- header files for interfacing Python with C
34-
GSL -- GNU Scientific Library for C
35-
g++ -- GNU C++ compiler
38+
diffpy.pdffit2 requires Python 2.6 or 2.7 and the following external
39+
software:
3640

37-
On Ubuntu Linux the required software can be easily installed using
38-
the system package manager:
41+
* ``setuptools`` - software distribution tools for Python
42+
* ``python-dev`` - header files for interfacing Python with C
43+
* ``GSL`` - GNU Scientific Library for C
44+
* ``g++`` - GNU C++ compiler
45+
* ``diffpy.Structure`` - simple storage and manipulation of atomic
46+
structures, https://github.com/diffpy/diffpy.Structure
3947

40-
sudo aptitude install \
41-
python-setuptools python-dev libgsl0-dev g++
48+
We recommend to use `Anaconda Python <https://www.continuum.io/downloads>`_
49+
as it allows to install all software dependencies together with
50+
PDFfit2. For other Python distributions it is necessary to
51+
install the required software separately. As an example, on Ubuntu
52+
Linux some of the required software can be installed using ::
4253

43-
For other Linux distributions use their respective package manager; note
44-
the packages may have slightly different names. diffpy.pdffit2 should work on
45-
other Unix-like operating systems and on Mac as well. Please, search the web
46-
for instructions how to install external dependencies on your particular
47-
system.
54+
sudo apt-get install \
55+
python-setuptools python-dev libgsl0-dev build-essential
4856

4957

5058
INSTALLATION
59+
------------------------------------------------------------------------
60+
61+
The preferred method is to use Anaconda Python and install from the
62+
"diffpy" channel of Anaconda packages ::
63+
64+
conda config --add channels diffpy
65+
conda install diffpy.pdffit2
66+
67+
If you don't use Anaconda or prefer to install from sources, make
68+
sure the required software is in place and run ::
69+
70+
python setup.py install
71+
72+
By default the files get installed to standard system directories,
73+
which may require the use of ``sudo`` for write permissions. If
74+
administrator (root) access is not available, consult the output from
75+
``python setup.py install --help`` for options to install as a regular
76+
user to other locations. The installation integrity can be
77+
verified by changing to the HOME directory and running ::
78+
79+
python -m diffpy.pdffit2.tests.rundeps
80+
81+
Anaconda Python allows to later update PDFfit2 using ::
5182

52-
Once the requirements are satisfied, diffpy.pdffit2 can be installed with
83+
conda update diffpy.pdffit2
5384

54-
python setup.py install
85+
With other Python distributions use the easy_install program to
86+
upgraded to the latest version ::
5587

56-
This installs the library and the pdffit2 program to the default system
57-
directories. See the usage info "./setup.py install --help" for options
58-
to install under different locations. Note that installation to non-standard
59-
directories you may require adjustment to the PATH and PYTHONPATH environment
60-
variables.
88+
easy_install --upgrade diffpy.pdffit2
6189

62-
The Python setuptools library provides "easy_install" script, which can
63-
be used to update diffpy.pdffit2 installation or even to perform a new
64-
install without explicit need to download and unzip the code:
6590

66-
easy_install -U diffpy.pdffit2
91+
DEVELOPMENT
92+
------------------------------------------------------------------------
6793

68-
This checks the package repository at http://www.diffpy.org/packages/
69-
for any newer releases of diffpy.pdffit2 and if present, it updates the
70-
installation. The easy_install can be also used to get in sync with the
71-
latest development sources in the subversion repository:
94+
PDFfit2 is not developed anymore and is only maintained due to its
95+
status of a sole computational engine for PDFgui. We don't expect any
96+
major developments to the code beyond simple bug fixes and compatibility
97+
features. The source code to PDFfit2 is available in a git repository
98+
at https://github.com/diffpy/diffpy.pdffit2.
7299

73-
easy_install -U \
74-
svn://[email protected]/diffraction/diffraction/diffpy.pdffit2/trunk
100+
For an actively developed codes for PDF simulations see the
101+
DiffPy-CMI framework at http://www.diffpy.org.
75102

76103

77104
CONTACTS
105+
------------------------------------------------------------------------
78106

79107
For more information on diffpy.pdffit2 please visit the project web-page:
80108

81-
http://www.diffpy.org/
109+
http://www.diffpy.org/
82110

83-
or email Prof. Simon Billinge at [email protected]
111+
or email Prof. Simon Billinge at [email protected].

0 commit comments

Comments
 (0)