Skip to content

Commit 923d6da

Browse files
authored
Merge pull request #72 from sbillinge/readme
docs: synchronize readme with old one
2 parents 2e22303 + 9f63032 commit 923d6da

File tree

1 file changed

+90
-19
lines changed

1 file changed

+90
-19
lines changed

README.rst

Lines changed: 90 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,52 @@
3838

3939
Python bindings to ObjCryst++, the Object-Oriented Crystallographic Library.
4040

41-
4241
For 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+
4450
Citation
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

5174
Installation
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+
5480
The 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/>`__
5683
and 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

5888
To add "conda-forge" to the conda channels, run the following in a terminal. ::
5989

@@ -71,7 +101,35 @@ To confirm that the installation was successful, type ::
71101

72102
The 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+
Getting Started
124+
---------------
125+
126+
You may consult our `online documentation <https://pyobjcryst.readthedocs.io/en/stable/>`_ for tutorials and API references.
127+
128+
Alternative methods of installation
129+
-----------------------------------
130+
131+
These approaches are not recommended but reproduced here for advanced users.
132+
You can use ``pip`` to download and install the latest release from
75133
`Python Package Index <https://pypi.python.org>`_.
76134
To install using ``pip`` into your ``pyobjcryst_env`` environment, type ::
77135

@@ -91,25 +149,38 @@ parallel jobs (-j4)::
91149
conda install --file requirements/conda.txt
92150
scons -j4 dev
93151

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.
152+
See ``scons -h`` for description of build targets and options.
96153

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:
154+
Alternatively, on Ubuntu Linux the required software can be installed using ::
101155

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``
156+
sudo apt-get install \
157+
python-setuptools python-numpy scons \
158+
build-essential python-dev libboost-all-dev
108159

109-
Getting Started
110-
---------------
160+
If this doesn't work, please see the `requirements/conda.txt` file for the
161+
latest list of requirements.
162+
163+
The ``libobjcryst`` library can also be installed as per the instructions at
164+
https://github.com/diffpy/libobjcryst. Make sure other required software are
165+
also in place and then run from the pyobjcryst directory ::
166+
167+
pip install .
168+
169+
You may need to use sudo with system Python so the process is allowed to copy files to system
170+
directories, unless you are installing into a conda environment. If administrator (root) access is not
171+
available, see the usage information from python setup.py install --help for options to install
172+
to a user-writable location.
173+
174+
Testing your installation
175+
-------------------------
176+
177+
The installation integrity can be verified by executing the included tests with
178+
179+
First install test dependencies then type pytest::
180+
181+
conda install --file requirements/tests.txt
182+
pytest
111183

112-
You may consult our `online documentation <https://diffpy.github.io/pyobjcryst>`_ for tutorials and API references.
113184

114185
Support and Contribute
115186
----------------------

0 commit comments

Comments
 (0)