Skip to content

Commit a4be78f

Browse files
authored
Merge pull request #65 from cadenmyers13/cmi-name-update
docs: CMI name update and installation update
2 parents 09efee2 + 10dc537 commit a4be78f

29 files changed

+215
-115
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Sphinx sources for the [diffpy.org][site] web page.
99
- [Where to Make Changes](#where-to-make-changes)
1010
- [Adding Citations](#adding-citations)
1111
- [Adding Publications that Describe a DiffPy Project (the "Reference" Section)](#reference-section-1)
12-
- [Adding Other Publications (the "Publication Using DiffPy-CMI" Section)](#reference-section-2)
12+
- [Adding Other Publications (the "Publication Using diffpy.cmi" Section)](#reference-section-2)
1313
- [New Version of Existing Project](#new-version)
1414
- [New Project](#publishing-new-project)
1515
- [Publishing Changes](#publishing-changes)
@@ -107,8 +107,8 @@ you add the reference to the proper section and do so in descending reverse chro
107107
(i.e., the newest citations should appear at the top of their respective sections).
108108

109109
<a name="reference-section-note">*Note:*</a> In this example, the citation is for a publication
110-
which describes a product of the DiffPy-CMI project (namely, PDFgetN3). For publications which
111-
describe a component of DiffPy-CMI, we provide a link to download the publication directly from
110+
which describes a product of the diffpy.cmi project (namely, PDFgetN3). For publications which
111+
describe a component of diffpy.cmi, we provide a link to download the publication directly from
112112
the [diffpy.org][site] website. Here, the link is provided via the `|downloadJuhasJac18|` tag
113113
which is the identifier for another snippet within [abbreviations.txt](https://github.com/diffpy/diffpy.github.io/blob/source/abbreviations.txt#L294) following the definition
114114
of `|citeJuhasJac18|`, seen here as:
@@ -130,10 +130,10 @@ placed within `pdfgetx`'s documentation directory and referenced accordingly wit
130130

131131

132132
<a name="reference-section-2"></a>
133-
### Adding Other Publications (the "Publication Using DiffPy-CMI" Section)
133+
### Adding Other Publications (the "Publication Using diffpy.cmi" Section)
134134

135-
Adding references to publications that do not describe the release/use of a product within the DiffPy-CMI
136-
project (e.g., papers which use some component of DiffPy-CMI), we simply provide the usual citation text (with
135+
Adding references to publications that do not describe the release/use of a product within the diffpy.cmi
136+
project (e.g., papers which use some component of diffpy.cmi), we simply provide the usual citation text (with
137137
appropriate DOI link). To add a citation of this type, refer to the information in [Reference Section](#reference-section-1), but
138138
disregard everything starting at, and following, the [Note](#reference-section-note).
139139

_includes/substitutions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.. define global names and alias here
2+
.. |diffpycmi| replace:: diffpy.cmi

_templates/menu01.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ul class="dropdown-menu menu01"
88
role="menu"
99
aria-labelledby="dLabelMenu01">
10-
<li><a href="{{pathto('products/diffpycmi/index')}}">DiffPy-CMI</a></li>
10+
<li><a href="{{pathto('products/diffpycmi/index')}}">diffpy.cmi</a></li>
1111
<li><a href="{{pathto('products/xPDFsuite')}}">xPDFsuite</a></li>
1212
<li><a href="{{pathto('products/pdfgetx')}}">PDFgetX3, PDFgetN3 and PDFgetS3</a></li>
1313
<li><a href="{{pathto('products/pdfgui')}}">PDFgui</a></li>

abbreviations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767

6868
.. |DiffPyCMI| replace::
69-
:doc:`DiffPy-CMI </products/diffpycmi/index>`
69+
:doc:`diffpy.cmi </products/diffpycmi/index>`
7070

7171
.. |citeShiPRL14| replace:: Chenyang Shi, Majid Beidaghi, Michael
7272
Naguib, Olha Mashtalir, Yury Gogotsi, and Simon J. L. Billinge,

conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
# The encoding of source files.
4141
#source_encoding = 'utf-8-sig'
4242

43+
# The reST default prolog, included at the beginning of every source file.
44+
rst_prolog = """
45+
.. include:: _includes/substitutions.rst
46+
"""
47+
4348
# The master toctree document.
4449
master_doc = 'index'
4550

products/diffpycmi/LICENSE.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National
1414
Laboratory
1515

1616

17-
The "DiffPy-CMI" is distributed subject to the following license conditions:
17+
The "diffpy.cmi" is distributed subject to the following license conditions:
1818

1919

2020
SOFTWARE LICENSE AGREEMENT
2121

22-
Software: DiffPy-CMI
22+
Software: diffpy.cmi
2323

2424

25-
(1) The "Software", below, refers to the aforementioned DiffPy-CMI (in either
25+
(1) The "Software", below, refers to the aforementioned diffpy.cmi (in either
2626
source code, or binary form and accompanying documentation).
2727

2828
Part of the software was derived from the DANSE, ObjCryst++ (with permission),

products/diffpycmi/cmi_exchange.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ CMI Exchange
22
=============
33

44
The `CMI Exchange`_ is a collection of community developed scripts,
5-
functions, and IPython plugins that make use of the DiffPy-CMI
6-
framework. If you are new to DiffPy-CMI it is a great place to get
7-
started. If you've been working with DiffPy-CMI for a while and feel
5+
functions, and IPython plugins that make use of the |diffpycmi|
6+
framework. If you are new to |diffpycmi| it is a great place to get
7+
started. If you've been working with |diffpycmi| for a while and feel
88
that others would benefit from seeing your code please contribute!
99

1010
.. _cmi exchange: https://github.com/diffpy/cmi_exchange#cmi-exchange

products/diffpycmi/contents.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. _contents:
22

3-
DiffPy-CMI Contents
3+
|diffpycmi| Contents
44
===================
55

6-
The DiffPy-CMI release includes Python and C++ libraries developed by
6+
The |diffpycmi| release includes Python and C++ libraries developed by
77
the DiffPy team as well as external libraries necessary for functionality.
88

99
Libraries developed by the DiffPy team

products/diffpycmi/contributecode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
How to Contribute Code
22
======================
33

4-
The DiffPy-CMI bundle consists of the following projects, all hosted on
4+
The |diffpycmi| bundle consists of the following projects, all hosted on
55
github. To contribute code simply fork the project you'd like to work
66
on and issue a pull request.
77

products/diffpycmi/index.rst

Lines changed: 140 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
##########
2-
DiffPy-CMI
2+
|diffpycmi|
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
80+
81+
cmi install <pack_name>
82+
cmi install <profile_name>
83+
cmi install </absolute/path/to/profile>
84+
85+
.. admonition:: Example installation
86+
87+
For example, to install the pack for PDF modeling, type,
88+
89+
.. code-block:: bash
90+
91+
cmi install pdf
92+
93+
To check to see if the pack was installed, type,
94+
95+
.. code-block:: bash
96+
97+
cmi pack list
98+
99+
The output should look something like this,
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
33129
34-
Use of this software is subject to the conditions in
35-
software :doc:`LICENSE <license>`.
130+
The output should look something like this,
36131

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|.
132+
.. code-block:: bash
41133
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. ::
134+
ch03NiModelling
135+
ch05Fit2Phase
136+
ch06RefineCrystalStructureGen
137+
ch07StructuralPhaseTransitions
138+
ch08NPRefinement
139+
ch11ClusterXYZ
45140
46-
conda create --name=py37 python=3.7
47-
conda activate py37
141+
To copy the example for bulk Ni PDF fitting, type,
48142

49-
Once Anaconda is ready, DiffPy-CMI can be installed from the "diffpy"
50-
channel of Anaconda packages as follows ::
143+
.. code-block:: bash
51144
52-
conda config --add channels diffpy
53-
conda install diffpy-cmi
145+
cmi example copy ch03NiModelling
54146
55-
The software distribution over Anaconda makes it easy to publish
56-
frequent software updates. To update your installation later use ::
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.
57149

58-
conda update diffpy-cmi
150+
You can then run the fitting script with,
59151

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.
152+
.. code-block:: bash
64153
154+
python ch03NiModelling/solutions/diffpy-cmi/fitBulkNi.py
65155
66156
What next?
67157
==========
@@ -78,11 +168,14 @@ What next?
78168
Tutorials
79169
=========
80170

81-
* ADD2019_ school and conference --
82-
https://github.com/diffpy/add2019-diffpy-cmi
171+
* A step-by-step tutorial on using diffpy.cmi for PDF analysis is available at the documentation site for
172+
``diffpy.cmi`` -- https://www.diffpy.org/diffpy.cmi/tutorials/index.html.
83173

84-
.. _ADD2019: https://workshops.ill.fr/event/133/page/32-home
174+
* Worked examples and experimental data from the book *Atomic Pair Distribution Function Analysis: A Primer* are freely available at our
175+
`GitHub repository <https://github.com/Billingegroup/pdfttp_data>`_.
85176

177+
* ADD2019 school and conference --
178+
https://github.com/diffpy/add2019-diffpy-cmi.
86179

87180
Documentation
88181
=============
@@ -101,16 +194,16 @@ at the links below.
101194
* |doc-libdiffpy|_ -- C++ library for calculation of PDF and other real-space
102195
quantities
103196

104-
See :ref:`DiffPy-CMI contents <contents>` for a complete list
105-
of open-source libraries that are included in DiffPy-CMI and
197+
See :ref:`diffpy.cmi contents <contents>` for a complete list
198+
of open-source libraries that are included in |diffpycmi| and
106199
their respective project pages.
107200

108201

109202
Reference
110203
=========
111204

112205
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
206+
we ask you to acknowledge the use of |diffpycmi| by citing the following
114207
paper:
115208

116209
* |citeJuhasAca15|

0 commit comments

Comments
 (0)