@@ -10,14 +10,16 @@ libdiffpy is a C++ library for calculating atomic pair distribution function
1010distances and directions up to specified maximum distance. The atomic
1111structure models are represented by classes for non-periodic, periodic or
1212structures with space group symmetries. libdiffpy supports Crystal and
13- Molecule classes from the ObjCryst crystallographic library. Calculators
14- support two evaluation models - BASIC, which performs a full pair-summation
15- every time, and OPTIMIZED, which updates only pair contributions that have
16- changed since the last evaluation. libdiffpy supports object serialization
17- and parallel computations using parallel map function. PDF calculations can
18- be performed in two modes - either as a real-space summation of peak profiles
19- (PDFCalculator) or as a reciprocal-space Debye summation and Fourier transform
20- of the total scattering structure function (DebyePDFCalculator).
13+ Molecule classes from the [ ObjCryst crystallographic library] (
14+ https://sourceforge.net/projects/objcryst ).
15+ Calculators support two evaluation models - BASIC, which performs a full
16+ pair-summation every time, and OPTIMIZED, which updates only pair
17+ contributions that have changed since the last evaluation. libdiffpy supports
18+ object serialization and parallel computations using parallel map function.
19+ PDF calculations can be performed in two modes - either as a real-space
20+ summation of peak profiles (PDFCalculator) or as a reciprocal-space Debye
21+ summation and Fourier transform of the total scattering structure function
22+ (DebyePDFCalculator).
2123
2224The calculator objects in libdiffpy share common procedure for iteration
2325over atom pairs and only specialize the processing of pair contributions.
@@ -42,34 +44,39 @@ Recommended software:
4244 https://github.com/diffpy/libobjcryst
4345* ` cxxtest ` - CxxTest Unit Testing Framework, http://cxxtest.com
4446
45- On Ubuntu Linux the required software can be installed using the
46- system package manager:
47+ The required software is commonly available in the system package manager.
48+ For example, on Ubuntu Linux the required software can be installed using
4749
4850``` sh
4951sudo apt-get install \
5052 build-essential scons libboost-dev libgsl0-dev
5153```
5254
53- For Mac OS X machine with the MacPorts package manager the installation
54- command is
55+ libdiffpy is also available as a pre-compiled package for
56+ [ Anaconda Python] ( https://www.continuum.io/downloads ) . A Python
57+ interface to libdiffpy is provided by Anaconda package diffpy.srreal.
5558
56- ``` sh
57- sudo port install scons boost gsl
58- ```
5959
60- For other packages see their project pages for installation instructions.
60+ ## INSTALLATION
61+
62+ ### Installation from sources
6163
64+ Use sources from the git repository or extract the latest source
65+ bundle from https://github.com/diffpy/libdiffpy/releases/latest .
6266
63- ## INSTALLATION
67+ ``` sh
68+ tar xzf libdiffpy-VERSION.tar.gz
69+ cd libdiffpy-VERSION
70+ ```
6471
65- To build and install the libdiffpy library from sources, run
72+ To build and install the libdiffpy library use
6673
6774``` sh
6875sudo scons -j4 install
6976```
7077
7178This installs libdiffpy for all users under the ` /usr/local ` directory.
72- If administrator (root) access is not available, see the usage info from
79+ If administrator (root) access is not available, see the output from
7380` scons --help ` for options to install to a user-writable location.
7481
7582To verify libdiffpy installation, compile and run the included
@@ -83,8 +90,45 @@ c++ testlib.cpp -ldiffpy
8390
8491If compilation fails because of missing header files or missing libdiffpy
8592library, adjust the ` CPATH ` and ` LIBRARY_PATH ` environment variables or
86- use the ` -I ` or ` -L ` compiler options. If the libdiffpy shared library
87- cannot be found at runtime, adjust the ` LD_LIBRARY_PATH ` environment variable.
93+ use the ` -I ` or ` -L ` compiler options. If the shared library libdiffpy
94+ is unavailable at runtime, add a ` -Wl,-rpath,SomePath ` option to the
95+ c++ command or adjust the ` LD_LIBRARY_PATH ` environment variable.
96+
97+ ### Installation for Anaconda Python
98+
99+ The libdiffpy library can be installed from the "diffpy" channel
100+ of Anaconda packages
101+
102+ ``` sh
103+ conda config --add channels diffpy
104+ conda install libdiffpy
105+ ```
106+
107+ libdiffpy is also included in the "diffpy-cmi" collection of packages
108+ for structure analysis
109+
110+ ``` sh
111+ conda install diffpy-cmi
112+ ```
113+
114+ When compiling with the Anaconda version of libdiffpy it is essential to
115+ specify header path, library path and runtime path of the active Anaconda
116+ environment
117+
118+ ``` sh
119+ # resolve prefix directory P of the active Anaconda environment
120+ P=" $( conda info --json | grep default_prefix | cut -d\" -f4) "
121+ cd examples
122+ c++ testlib.cpp -I$P /include -L$P /lib -Wl,-rpath,$P /lib -ldiffpy
123+ ./a.out
124+ ```
125+
126+ On Mac OS X the libdiffpy package is built for OS X version
127+ 10.6 which may be incompatible with codes emitted on newer OS.
128+ To fix this add ` -mmacosx-version-min=10.6 ` option to the
129+ c++ compiler or set it with an environment variable as
130+ ` export MACOSX_DEPLOYMENT_TARGET=10.6 ` .
131+
88132
89133## DEVELOPMENT
90134
0 commit comments