3838
3939Python bindings to ObjCryst++, the Object-Oriented Crystallographic Library.
4040
41-
4241For more information about the pyobjcryst library, please consult our `online documentation <https://diffpy.github.io/pyobjcryst >`_.
4342
43+ ``pyobjcryst `` is an open-source software package originally developed as a part of the DiffPy-CMI
44+ complex modeling initiative which originated in the DANSE project
45+ at Columbia University. It was further developed at Brookhaven National Laboratory,
46+ and Columbia University and the European Synchrotron Radiation Source (ESRF) and is now
47+ maintained at Columbia and ESRF.
48+ The pyobjcryst sources are hosted at https://github.com/diffpy/pyobjcryst.
49+
4450Citation
4551--------
4652
47- If you use pyobjcryst in a scientific publication, we would like you to cite this package as
53+ If you use diffpy.srfit in a scientific publication, we would like you to cite this package as
54+
55+
56+ P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge,
57+ `Complex modeling: a strategy and software program for combining
58+ multiple information sources to solve ill posed structure and
59+ nanostructure inverse problems
60+ <http://dx.doi.org/10.1107/S2053273315014473> `__,
61+ *Acta Crystallogr. A * **71 **, 562-568 (2015).
62+
63+ and
64+
65+ V. Favre-Nicolin and R. Cerný
66+ `FOX, 'free objects for crystallography': a modular approach to ab initio structure determination
67+ from powder diffraction
68+ <https://doi.org/10.1107/S0021889802015236> `__,
69+ *J. Appl. Cryst. * **35 **, 734-743 (2002)
4870
49- pyobjcryst Package, https://github.com/diffpy/pyobjcryst
71+ The second paper describes the c++ crystallographic objects in
72+ ``ObjCryst++ `` that are wrapped by ``pyobjcryst ``
5073
5174Installation
5275------------
5376
77+ The latest release of ``pyobjcryst `` runs in python versions 3.11, 3.12 and 3.13. You may
78+ specify an earlier release if you need it to run in an earlier version of Python.
79+
5480The preferred method is to use `Miniconda Python
5581<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
82+ or `mamba <https://mamba.readthedocs.io/en/latest/ >`__
5683and install from the "conda-forge" channel of Conda packages.
84+ mamba works in the same way as conda but has the advantage of being much
85+ faster when resolving dependencies during installation. It also uses by
86+ default the conda-forge repository, which is what almost all users would want.
5787
5888To add "conda-forge" to the conda channels, run the following in a terminal. ::
5989
@@ -71,7 +101,30 @@ To confirm that the installation was successful, type ::
71101
72102The output should print the latest version displayed on the badges above.
73103
74- If the above does not work, you can use ``pip `` to download and install the latest release from
104+ To use mamba, replace ``conda `` with ``mamba `` in the commands above.
105+
106+ pyobjcryst is also included in the ``diffpy.cmi `` collection of packages for
107+ structure analysis and so can be installed by ::
108+
109+ conda install -c conda-forge diffpy.cmi
110+
111+ Optional graphical dependencies for jupyter notebooks
112+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113+ Some of the classes can produce graphical outputs, which can be
114+ displayed in a jupyter notebook:
115+
116+ * a Crystal structure can be displayed in 3D: this requires the
117+ ``py3dmol `` and ``ipywidgets `` modules. See the notebook
118+ ``docs/examples/cystal_3d_widget.ipynb ``
119+ * a PowderPattern can be displayed (and live-updated) if
120+ ``matplotlib `` and ``ipympl `` are installed. See the
121+ notebook ``docs/examples/structure-solution-powder-cimetidine.ipynb ``
122+
123+ Alternative methods of installation
124+ -----------------------------------
125+
126+ These approaches are not recommended but reproduced here for advanced users.
127+ You can use ``pip `` to download and install the latest release from
75128`Python Package Index <https://pypi.python.org >`_.
76129To install using ``pip `` into your ``pyobjcryst_env `` environment, type ::
77130
@@ -91,20 +144,38 @@ parallel jobs (-j4)::
91144 conda install --file requirements/conda.txt
92145 scons -j4 dev
93146
94- See ``scons -h `` for description of build targets and options. Need to install test dependencies
95- (``requirements/test.txt ``) to run SCons test mode.
147+ See ``scons -h `` for description of build targets and options.
96148
97- Optional graphical dependencies for jupyter notebooks
98- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99- Some of the classes can produce graphical outputs, which can be
100- displayed in a jupyter notebook:
149+ Alternatively, on Ubuntu Linux the required software can be installed using ::
150+
151+ sudo apt-get install \
152+ python-setuptools python-numpy scons \
153+ build-essential python-dev libboost-all-dev
154+
155+ If this doesn't work, please see the `requirements/conda.txt ` file for the
156+ latest list of requirements.
157+
158+ The ``libobjcryst `` library can also be installed as per the instructions at
159+ https://github.com/diffpy/libobjcryst. Make sure other required software are
160+ also in place and then run from the pyobjcryst directory ::
161+
162+ pip install .
163+
164+ You may need to use sudo with system Python so the process is allowed to copy files to system
165+ directories, unless you are installing into a conda environment. If administrator (root) access is not
166+ available, see the usage information from python setup.py install --help for options to install
167+ to a user-writable location.
168+
169+ Testing your installation
170+ -------------------------
171+
172+ The installation integrity can be verified by executing the included tests with
173+
174+ First install test dependencies then type pytest::
175+
176+ conda install --file requirements/tests.txt
177+ pytest
101178
102- * a Crystal structure can be displayed in 3D: this requires the
103- ``py3dmol `` and ``ipywidgets `` modules. See the notebook
104- ``docs/examples/cystal_3d_widget.ipynb ``
105- * a PowderPattern can be displayed (and live-updated) if
106- ``matplotlib `` and ``ipympl `` are installed. See the
107- notebook ``docs/examples/structure-solution-powder-cimetidine.ipynb ``
108179
109180Getting Started
110181---------------
0 commit comments