Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acsf fix #143

Merged
merged 18 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: dependencies
- name: install
if: always()
run: |
cd ${GITHUB_WORKSPACE}/scripts && ./dependencies.sh
- name: lint
cd ${GITHUB_WORKSPACE}/scripts && ./install.sh
- name: format
if: always()
run: |
cd ${GITHUB_WORKSPACE}/scripts && ./lint.sh
- name: install
cd ${GITHUB_WORKSPACE}/scripts && ./format.sh
- name: lint
if: always()
run: |
cd ${GITHUB_WORKSPACE}/scripts && ./install.sh
cd ${GITHUB_WORKSPACE}/scripts && ./lint.sh
- name: test
if: always()
run: |
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

# Used to host cibuildwheel
- uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.13.1

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Build status](https://github.com/SINGROUP/dscribe/actions/workflows/actions.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/SINGROUP/dscribe/badge.svg?branch=master)](https://coveralls.io/github/SINGROUP/dscribe?branch=master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

DScribe is a Python package for transforming atomic structures into fixed-size
numerical fingerprints. These fingerprints are often called "descriptors" and
Expand Down
9 changes: 0 additions & 9 deletions devrequirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion docs/2.1.x/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 979ed1add00f32f4bc116afafadc8e3c
config: d2b1800fed63e4715a5ada69f6a537e2
tags: 645f666f9bcd5a90fca523b33c5a78b7
45 changes: 30 additions & 15 deletions docs/2.1.x/_modules/dscribe/core/lattice.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dscribe.core.lattice &mdash; DScribe 2.1.x documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/style.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/style.css?v=7d1ac55c" />


<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script defer="defer" src="../../../_static/js/versions.js"></script>
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=c41997dc"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script defer="defer" src="../../../_static/js/versions.js?v=413e22da"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="author" title="About these documents" href="../../../about.html" />
<link rel="index" title="Index" href="../../../genindex.html" />
Expand Down Expand Up @@ -97,10 +99,13 @@ <h1>Source code for dscribe.core.lattice</h1><div class="highlight"><pre>
<span class="sd">See the License for the specific language governing permissions and</span>
<span class="sd">limitations under the License.</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>


<div class="viewcode-block" id="Lattice"><a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice">[docs]</a><span class="k">class</span> <span class="nc">Lattice</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<div class="viewcode-block" id="Lattice">
<a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice">[docs]</a>
<span class="k">class</span> <span class="nc">Lattice</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A lattice object. Essentially a matrix with conversion matrices. In</span>
<span class="sd"> general, it is assumed that length units are in Angstroms and angles are in</span>
Expand Down Expand Up @@ -144,7 +149,9 @@ <h1>Source code for dscribe.core.lattice</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">_inv_matrix</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">inv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_matrix</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_inv_matrix</span>

<div class="viewcode-block" id="Lattice.get_cartesian_coords"><a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice.get_cartesian_coords">[docs]</a> <span class="k">def</span> <span class="nf">get_cartesian_coords</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fractional_coords</span><span class="p">):</span>
<div class="viewcode-block" id="Lattice.get_cartesian_coords">
<a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice.get_cartesian_coords">[docs]</a>
<span class="k">def</span> <span class="nf">get_cartesian_coords</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fractional_coords</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns the cartesian coordinates given fractional coordinates.</span>

Expand All @@ -156,7 +163,10 @@ <h1>Source code for dscribe.core.lattice</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">fractional_coords</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_matrix</span><span class="p">)</span></div>

<div class="viewcode-block" id="Lattice.get_fractional_coords"><a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice.get_fractional_coords">[docs]</a> <span class="k">def</span> <span class="nf">get_fractional_coords</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cart_coords</span><span class="p">):</span>

<div class="viewcode-block" id="Lattice.get_fractional_coords">
<a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice.get_fractional_coords">[docs]</a>
<span class="k">def</span> <span class="nf">get_fractional_coords</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cart_coords</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns the fractional coordinates given cartesian coordinates.</span>

Expand All @@ -168,6 +178,7 @@ <h1>Source code for dscribe.core.lattice</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">cart_coords</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">inv_matrix</span><span class="p">)</span></div>


<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">lengths</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_lengths</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
Expand Down Expand Up @@ -206,7 +217,9 @@ <h1>Source code for dscribe.core.lattice</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">Lattice</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">reciprocal_lattice</span><span class="o">.</span><span class="n">matrix</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">))</span>

<div class="viewcode-block" id="Lattice.get_points_in_sphere"><a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice.get_points_in_sphere">[docs]</a> <span class="k">def</span> <span class="nf">get_points_in_sphere</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">frac_points</span><span class="p">,</span> <span class="n">center</span><span class="p">,</span> <span class="n">r</span><span class="p">,</span> <span class="n">zip_results</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<div class="viewcode-block" id="Lattice.get_points_in_sphere">
<a class="viewcode-back" href="../../../doc/dscribe.core.html#dscribe.core.lattice.Lattice.get_points_in_sphere">[docs]</a>
<span class="k">def</span> <span class="nf">get_points_in_sphere</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">frac_points</span><span class="p">,</span> <span class="n">center</span><span class="p">,</span> <span class="n">r</span><span class="p">,</span> <span class="n">zip_results</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Find all points within a sphere from the point taking into account</span>
<span class="sd"> periodic boundary conditions. This includes sites in other periodic</span>
Expand Down Expand Up @@ -282,7 +295,9 @@ <h1>Source code for dscribe.core.lattice</h1><div class="highlight"><pre>
<span class="n">shifted_coords</span><span class="p">[</span><span class="n">within_r</span><span class="p">],</span>
<span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">d_2</span><span class="p">[</span><span class="n">within_r</span><span class="p">]),</span>
<span class="n">indices</span><span class="p">[</span><span class="n">within_r</span><span class="p">[</span><span class="mi">0</span><span class="p">]],</span>
<span class="p">)</span></div></div>
<span class="p">)</span></div>
</div>

</pre></div>

</div>
Expand Down
Loading
Loading