You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
23
10
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.
24
17
25
18
26
19
.. figure:: ../../images/diffpycmi_screenshot.png
@@ -30,38 +23,135 @@ updates.
30
23
31
24
Installation
32
25
============
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
33
80
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>
36
84
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
41
86
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,
45
88
46
-
conda create --name=py37 python=3.7
47
-
conda activate py37
89
+
.. code-block:: bash
48
90
49
-
Once Anaconda is ready, DiffPy-CMI can be installed from the "diffpy"
50
-
channel of Anaconda packages as follows ::
91
+
cmi install pdf
51
92
52
-
conda config --add channels diffpy
53
-
conda install diffpy-cmi
93
+
To check to see if the pack was installed, type,
54
94
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
57
96
58
-
conda update diffpy-cmi
97
+
cmi pack list
59
98
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,
64
100
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
0 commit comments