Skip to content

Commit 5719c39

Browse files
authored
Merge pull request #117 from avmarchenko/master
Updated documentation for some widgets and pcf functions/classes.
2 parents 7471bd5 + 60f3043 commit 5719c39

9 files changed

Lines changed: 54 additions & 38 deletions

File tree

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ install:
4040
- conda install -c conda-forge pandoc pypandoc nbsphinx ipython
4141
- conda install -q -c conda-forge python-coveralls coverage pytest pytest-cov
4242
- conda install -q -c conda-forge numexpr nodejs ipywidgets
43+
# - conda install -q -c exaanalytics exa
44+
- pip install exa
4345
- pip install travis-sphinx codacy-coverage
44-
- git clone https://github.com/exa-analytics/exa.git
45-
- cd exa
46-
- pip install .
47-
- cd ../
48-
- pip install -e .
46+
# - git clone https://github.com/exa-analytics/exa.git
47+
# - cd exa
48+
# - pip install .
49+
# - cd ../
50+
# - pip install -e .
4951

5052
script:
5153
- export PYTHONDONTWRITEBYTECODE=1

RELEASE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ rm -r dist/*
2626
Publish to `TestPyPI`_ (~/.pypirc required).
2727
This requires `wheel` and `twine` to be installed.
2828
```bash
29-
python setup.py sdist
30-
python setup.py bdist_wheel
31-
twine upload --repository [which] dist/*
29+
python setup.py sdist #python setup.py bdist_wheel
30+
twine upload dist/*
3231
```
3332
The variable `which` refers to the alias for the testing or production
3433
repository listed in ~/.pypirc.
@@ -47,13 +46,13 @@ npm publish
4746
Publish to the `exa-analytics`_ channel on `Anaconda Cloud`.
4847
This requires that the package hase been released on `PyPI`.
4948
This requires the anaconda package `conda-build` and `anaconda-client` (run `anaconda login`).
50-
It is convenient to use a `.condarc` file to add the `conda-forge` channel
51-
since some auxiliary packages come from there.
49+
It is convenient to use a `.condarc` file to add the `conda-forge` and
50+
`exaanalytics` channels since some auxiliary packages come from there.
5251
Note that to test a build, set uploading to false (anaconda_upload: false in .condarc) and
5352
in the meta.yaml source change the url to `git_url: ./`.
5453
```bash
5554
conda build . # conda build . --output to see location
5655
# For other python version, conda build --python x.x
5756
conda convert -f --platform all /path/to/conda-bld/pltfrm/exa-...tar.bz2 -o /path/to/outputdir/
58-
conda upload /path/to/build/build.tar.bz2 # For each build
57+
anaconda upload /path/to/build/build.tar.bz2 # For each build
5958
```

exatomic/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
exa.version_info
1212
exa.__verion__
1313
"""
14-
version_info = (0, 3, 11)
14+
version_info = (0, 4, 0)
1515
__version__ = ".".join(map(str, version_info))

exatomic/algorithms/pcf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ def radial_pair_correlation(universe, a, b, dr=0.05, start=1.0, stop=13.0,
6868
the volume sampled during computation of two body properties divided by
6969
the number of properties used in the histogram (the triple summation
7070
above, divided by the normalization for the radial distance outward).
71+
72+
Warning:
73+
Using a start and stop length different from 0 and simple cubic cell dimension
74+
will cause the y axis magnitudes to be inaccurate. This can be remedied by
75+
rescaling values appropriately.
7176
"""
7277
bins = np.arange(start, stop, dr) # Discrete values of r for histogram
7378
if isinstance(a, str):

exatomic/core/universe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def add_molecular_orbitals(self, field_params=None, mocoefs=None,
275275
uni.field.field_values # The generated scalar fields
276276
277277
Args:
278-
field_params (dict, pd.Series): see :meth:`exatomic.algorithms.orbital_util.make_fps`
278+
field_params (dict, pd.Series): see :func:`exatomic.algorithms.orbital_util.make_fps`
279279
mocoefs (str): column in :class:`~exatomic.core.orbital.MOMatrix`
280280
vector (iter): indices of orbitals to evaluate (0-based)
281281
frame (int): frame of atomic positions for the orbitals

exatomic/widgets/widget.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,22 @@ def __init__(self, *scenes, **kwargs):
324324

325325
@register
326326
class UniverseWidget(ExatomicBox):
327-
""":class:`~exatomic.container.Universe` viewing widget."""
327+
"""
328+
Visualize a :class:`~exatomic.core.universe.Universe`.
329+
330+
.. code-block:: python
331+
332+
u = exatomic.Universe.load(exatomic.base.resource("adf-lu-valid.hdf5"))
333+
scenekwargs = dict(atomcolors=dict(Lu="black"))
334+
exatomic.UniverseWidget(u, scenekwargs=scenekwargs) # In Jupyter notebook
335+
336+
scenekwargs = dict(atomcolors=dict(Lu="#f442f1"), atomradii=dict(Lu=1.0))
337+
exatomic.UniverseWidget(u, scenekwargs=scenekwargs) # In Jupyter notebook
338+
339+
Args:
340+
uni: The Universe object
341+
scenekwargs (dict): Keyword args to be passed to :class:`~exatomic.widgets.widget_base.ExatomicScene`
342+
"""
328343
def _frame_folder(self, nframes):
329344
playable = bool(nframes <= 1)
330345
flims = dict(min=0, max=nframes-1, step=1, value=0)

exatomic/widgets/widget_base.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@
2828

2929
@register
3030
class ExatomicScene(DOMWidget):
31-
"""A three.js sandbox for 3D visualization."""
32-
31+
"""
32+
A custom scene (three.js scene) used for visualization
33+
of an atomic universe.
34+
35+
Custom parameters can be inspected using ``vars``. Parameters
36+
include field dimensions, the universe itself, field colors,
37+
widths, heights for the widget, etc.
38+
"""
3339
_model_module_version = Unicode(__js_version__).tag(sync=True)
3440
_view_module_version = Unicode(__js_version__).tag(sync=True)
3541
_view_module = Unicode('exatomic').tag(sync=True)
@@ -69,7 +75,6 @@ class ExatomicScene(DOMWidget):
6975

7076
def _handle_custom_msg(self, msg, callback):
7177
"""Custom message handler."""
72-
7378
if msg['type'] == 'image':
7479
self._save_image(msg['content'])
7580
elif msg['type'] == 'camera':

meta.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
11
{% set name = "exatomic" %}
2-
{% set version = "0.3.11" %}
2+
{% set version = "0.4.0" %}
33

44
package:
55
name: {{ name }}
66
version: {{ version }}
77

88
source:
9-
fn: {{ name }}-{{ version }}.tar.gz
10-
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
9+
url: https://github.com/exa-analytics/{{ name }}/archive/v{{ version }}.tar.gz
1110

1211
requirements:
1312
build:
1413
- python
1514
- setuptools
1615

1716
run:
18-
- python
1917
- numpy
20-
- scipy
21-
- matplotlib
22-
- seaborn
23-
- networkx
2418
- pandas
25-
- notebook
26-
- nose
2719
- numba
28-
- six
29-
- pytables
30-
- sphinx
31-
- sphinx_rtd_theme
32-
- pandoc
33-
- nbsphinx
20+
- seaborn
21+
- ipywidgets
22+
- sympy
23+
- numexpr
3424
- exa
3525
- sympy
3626
- symengine
@@ -43,4 +33,4 @@ about:
4333
home: https://exa-analytics.github.io/{{ name }}
4434
license: Apache-2.0
4535
license_file: LICENSE
46-
summary: A unified platform for theoretical and computational chemists.
36+
summary: A unified platform for theoretical and computational chemists

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ def run(self):
140140
},
141141
'zip_safe': False,
142142
'license': "Apache License Version 2.0",
143-
'author': "Thomas J. Duignan and Alex Marchenko",
143+
'author': "Thomas J. Duignan, Alex Marchenko and contributors",
144144
'author_email': "exa.data.analytics@gmail.com",
145145
'maintainer_email': "exa.data.analytics@gmail.com",
146146
'url': "https://exa-analytics.github.io/" + name,
147-
'download_url': "https://github.com/exa-analytics/{}/archive/{}.tar.gz".format(name, version),
148-
'keywords': ["quantum", "chemistry", "hpc", "jupyter", "notebook", "visualization"],
147+
'download_url': "https://github.com/exa-analytics/{}/archive/v{}.tar.gz".format(name, version),
148+
'keywords': ["quantum chemistry", "jupyter notebook", "visualization"],
149149
'classifiers': [
150-
"Development Status :: 3 - Alpha",
150+
"Development Status :: 4 - Beta",
151151
"Environment :: Web Environment",
152152
"Intended Audience :: Developers",
153153
"Intended Audience :: Science/Research",

0 commit comments

Comments
 (0)