38
38
39
39
Python bindings to ObjCryst++, the Object-Oriented Crystallographic Library.
40
40
41
-
42
41
For more information about the pyobjcryst library, please consult our `online documentation <https://diffpy.github.io/pyobjcryst >`_.
43
42
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
+
44
50
Citation
45
51
--------
46
52
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)
48
70
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 ``
50
73
51
74
Installation
52
75
------------
53
76
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
+
54
80
The preferred method is to use `Miniconda Python
55
81
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
82
+ or `mamba <https://mamba.readthedocs.io/en/latest/ >`__
56
83
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.
57
87
58
88
To add "conda-forge" to the conda channels, run the following in a terminal. ::
59
89
@@ -71,7 +101,35 @@ To confirm that the installation was successful, type ::
71
101
72
102
The output should print the latest version displayed on the badges above.
73
103
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
75
133
`Python Package Index <https://pypi.python.org >`_.
76
134
To install using ``pip `` into your ``pyobjcryst_env `` environment, type ::
77
135
@@ -91,25 +149,38 @@ parallel jobs (-j4)::
91
149
conda install --file requirements/conda.txt
92
150
scons -j4 dev
93
151
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.
96
153
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 ::
101
155
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
108
159
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
111
183
112
- You may consult our `online documentation <https://diffpy.github.io/pyobjcryst >`_ for tutorials and API references.
113
184
114
185
Support and Contribute
115
186
----------------------
0 commit comments