Skip to content

Commit e532e6b

Browse files
committed
docs: update installation instructions
1 parent 09efee2 commit e532e6b

File tree

1 file changed

+138
-48
lines changed

1 file changed

+138
-48
lines changed

products/diffpycmi/index.rst

Lines changed: 138 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
##########
2-
DiffPy-CMI
2+
DiffPy.CMI
33
##########
44

5-
DiffPy-CMI is our complex modeling framework. It is a highly flexible
6-
library of Python modules for robust modeling of nanostructures in
7-
crystals, nanomaterials, and amorphous materials.
8-
9-
The software provides functionality for storage and manipulation of
10-
structure data and calculation of structure-based quantities, such as
11-
PDF, SAS, bond valence sums, atom overlaps, bond lengths, and
12-
coordinations. Most importantly the DiffPy-CMI package contains a
13-
fitting framework for combining multiple experimental inputs in a single
14-
optimization problem.
15-
16-
This is an early release of code that is under intense development, with
17-
support for installation on Unix, Linux, and Macintosh machines. The
18-
scope and documentation of the project will evolve rapidly, but we want
19-
to make the code available at the earliest possible date. Please make
20-
use of the software and provide feedback and suggestions for
21-
improvement, but please be patient and check back frequently for
22-
updates.
5+
Diffpy.cmi is designed as an extensible complex modeling infrastructure.
6+
Users and developers can readily integrate novel data types and constraints
7+
into custom workflows. While widely used for advanced analysis of structural
8+
data, the framework is general and can be applied to any problem where model
9+
parameters are refined to fit calculated quantities to data.
2310

11+
Diffpy.cmi is a community-driven project that supports Unix, Linux, macOS,
12+
and Windows platforms. It is designed to be used in Python scripts enabling
13+
flexible scripting and automation for advanced and reproducible workflows.
14+
Users are encouraged to leverage the software for their modeling needs and
15+
to contribute feedback, use cases, and extensions through the project
16+
community.
2417

2518

2619
.. figure:: ../../images/diffpycmi_screenshot.png
@@ -30,38 +23,135 @@ updates.
3023

3124
Installation
3225
============
26+
To install ``diffpy.cmi``, create a new conda environment or activate an existing environment and install the package from the conda-forge channel.
27+
28+
.. code-block:: bash
29+
30+
conda create -n diffpy.cmi-env
31+
conda install -c conda-forge diffpy.cmi
32+
conda activate diffpy.cmi-env
33+
34+
To confirm that the installation was successful, type
35+
36+
.. code-block:: bash
37+
38+
cmi --version
39+
40+
The output should print the latest version.
41+
42+
If the above does not work, you can use ``pip`` to download and install the latest release from
43+
`Python Package Index <https://pypi.python.org>`_.
44+
To install using ``pip`` into your ``diffpy.cmi_env`` environment, type
45+
46+
.. code-block:: bash
47+
48+
pip install diffpy.cmi
49+
50+
Pack and Profile Installation
51+
-----------------------------
52+
53+
Use the `cmi` command-line interface to install and manage modular optional dependencies, known as `packs`,
54+
and to configure or execute user-defined workflows that combine multiple packs with optional post-installation steps,
55+
known as `profiles`. To use `cmi`, you can run the following example commands:
56+
57+
Show available commands and options with,
58+
59+
.. code-block:: bash
60+
61+
cmi -h
62+
63+
List installed and available packs and profiles,
64+
65+
.. code-block:: bash
66+
67+
cmi pack list
68+
cmi profile list
69+
70+
Show details of a specific pack or profile,
71+
72+
.. code-block:: bash
73+
74+
cmi pack show <pack_name>
75+
cmi profile show <profile_name>
76+
77+
Install a pack or profile (by name or path),
78+
79+
.. code-block:: bash
3380
34-
Use of this software is subject to the conditions in
35-
software :doc:`LICENSE <license>`.
81+
cmi install <pack_name>
82+
cmi install <profile_name>
83+
cmi install </absolute/path/to/profile>
3684
37-
As of version 3.0 DiffPy-CMI is available for Linux and
38-
Mac as a collection of packages for Anaconda Python. As
39-
a first step download and install **Anaconda for Python 3.7**
40-
from |anaconda-download|.
85+
.. admonition:: Example installation
4186

42-
.. note::
43-
DiffPy-CMI is available from the "diffpy" channel of Anaconda packages. It requires Python 3.5 or later or 2.7. It is recommended to install it in a separate Anaconda environment, for example *py37* or other preferred python versions.
44-
Make sure that *py37* environment is activated when working with DiffPy-CMI. ::
87+
For example, to install the pack for PDF modeling, type,
4588

46-
conda create --name=py37 python=3.7
47-
conda activate py37
89+
.. code-block:: bash
4890
49-
Once Anaconda is ready, DiffPy-CMI can be installed from the "diffpy"
50-
channel of Anaconda packages as follows ::
91+
cmi install pdf
5192
52-
conda config --add channels diffpy
53-
conda install diffpy-cmi
93+
To check to see if the pack was installed, type,
5494

55-
The software distribution over Anaconda makes it easy to publish
56-
frequent software updates. To update your installation later use ::
95+
.. code-block:: bash
5796
58-
conda update diffpy-cmi
97+
cmi pack list
5998
60-
If you don't want to use Anaconda you can
61-
:doc:`install DiffPy-CMI from sources <install>`. Note that
62-
this method takes more time and requires more experience
63-
with the operating system.
99+
The output should look something like this,
64100

101+
.. code-block:: bash
102+
103+
Installed:
104+
- core
105+
- pdf
106+
Available to install:
107+
- plotting
108+
- tests
109+
- docs
110+
111+
112+
Download examples
113+
-----------------
114+
115+
To list and copy example scripts and data to your working directory, type,
116+
117+
.. code-block:: bash
118+
119+
cmi example list
120+
cmi example copy <example_name>
121+
122+
.. admonition:: Example
123+
124+
For example, to see the example scripts for PDF fitting, type,
125+
126+
.. code-block:: bash
127+
128+
cmi example list
129+
130+
The output should look something like this,
131+
132+
.. code-block:: bash
133+
134+
ch03NiModelling
135+
ch05Fit2Phase
136+
ch06RefineCrystalStructureGen
137+
ch07StructuralPhaseTransitions
138+
ch08NPRefinement
139+
ch11ClusterXYZ
140+
141+
To copy the example for bulk Ni PDF fitting, type,
142+
143+
.. code-block:: bash
144+
145+
cmi example copy ch03NiModelling
146+
147+
This will copy the example directory ``ch03NiModelling`` to your current working directory. Within this directory exists
148+
the scripts and data to fit the bulk Ni PDF.
149+
150+
You can then run the fitting script with,
151+
152+
.. code-block:: bash
153+
154+
python ch03NiModelling/solutions/diffpy-cmi/fitBulkNi.py
65155
66156
What next?
67157
==========
@@ -78,11 +168,11 @@ What next?
78168
Tutorials
79169
=========
80170

81-
* ADD2019_ school and conference --
82-
https://github.com/diffpy/add2019-diffpy-cmi
83-
84-
.. _ADD2019: https://workshops.ill.fr/event/133/page/32-home
171+
* Worked examples and experimental data from the book are freely available at our
172+
`GitHub repository <https://github.com/Billingegroup/pdfttp_data>`_.
85173

174+
* ADD2019 school and conference --
175+
https://github.com/diffpy/add2019-diffpy-cmi
86176

87177
Documentation
88178
=============
@@ -101,16 +191,16 @@ at the links below.
101191
* |doc-libdiffpy|_ -- C++ library for calculation of PDF and other real-space
102192
quantities
103193

104-
See :ref:`DiffPy-CMI contents <contents>` for a complete list
105-
of open-source libraries that are included in DiffPy-CMI and
194+
See :ref:`DiffPy.CMI contents <contents>` for a complete list
195+
of open-source libraries that are included in DiffPy.CMI and
106196
their respective project pages.
107197

108198

109199
Reference
110200
=========
111201

112202
If you use this software in a research work which leads to publication,
113-
we ask you to acknowledge the use of DiffPy-CMI by citing the following
203+
we ask you to acknowledge the use of DiffPy.CMI by citing the following
114204
paper:
115205

116206
* |citeJuhasAca15|

0 commit comments

Comments
 (0)