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

Add vispy plotting of crystal structure to pyspinw #161

Merged
merged 35 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
13a992f
Add vsipy and qt dependencies to pyproject.toml
RichardWaiteSTFC Dec 6, 2023
f773eee
Force R2023a in gh-actions build_wheel (R2023b just released)
mducle Nov 1, 2023
9c985de
Add class to plot crystal structure using vispy
RichardWaiteSTFC Dec 22, 2023
b6d86e6
Get color of bonds and atoms from spinw object
RichardWaiteSTFC Dec 22, 2023
adc7c95
Add class attributes to control visual properties
RichardWaiteSTFC Dec 22, 2023
2f01040
Add option to plot plane of rotation
RichardWaiteSTFC Jan 2, 2024
d38e829
Fix bug getting color of cells with multiple atoms
RichardWaiteSTFC Jan 2, 2024
74d05f0
Add option to plot single-ion ellipsoids
RichardWaiteSTFC Jan 3, 2024
30c117a
Fix bugs for no aniso defined and 1 atom unit cells
RichardWaiteSTFC Jan 3, 2024
a0735bd
Suppport plotting of DM bonds
RichardWaiteSTFC Jan 4, 2024
9dcbaa9
Support multiple matrices per bonds
RichardWaiteSTFC Jan 4, 2024
bf14f4a
Add option to adjust scale of DM arrow
RichardWaiteSTFC Jan 4, 2024
04a02a7
Get size from atomdata and fix bug for g/aniso in multi-atom cells
RichardWaiteSTFC Jan 4, 2024
18a1816
Put arrow along bond axis for DM bonds at midpoint not end
RichardWaiteSTFC Jan 4, 2024
546d03d
Make sure only retrieving single-ion matrices for magnetic atoms
RichardWaiteSTFC Jan 5, 2024
ea2433e
Add option to plot 3D polyhedra (i.e. plotchem)
RichardWaiteSTFC Jan 8, 2024
50ed59f
Pre-allocate memory for vector between atoms 1 and 2 in plotchem
RichardWaiteSTFC Jan 9, 2024
198abee
Support 2D polygons in 3D plotchem
RichardWaiteSTFC Jan 9, 2024
327013e
Factor out function/method to label faces of 2D mesh
RichardWaiteSTFC Jan 9, 2024
91454fd
Set default empty args to None to avoid mutable default arguments bug
RichardWaiteSTFC Jan 10, 2024
4ab5d31
Improve formatting and fix typo
RichardWaiteSTFC Jan 10, 2024
072a640
Use warnings.warn instead of print
RichardWaiteSTFC Jan 11, 2024
8020dfe
Get atom position and size withotu looping over unit-cells
RichardWaiteSTFC Jan 12, 2024
374f450
Get bond vertices without looping over unit-cells
RichardWaiteSTFC Jan 12, 2024
57314b5
Plot single_ion ellipsoids without looping over self.unit_cells
RichardWaiteSTFC Jan 12, 2024
cdb7334
Plot spins and rotaiton planes without loop over self.unit_cells
RichardWaiteSTFC Jan 12, 2024
cf8d7a6
Remove self.unit_cells and now redundant class attributes/methods
RichardWaiteSTFC Jan 12, 2024
51d3560
Plot rotatiion planes in a single mesh
RichardWaiteSTFC Jan 15, 2024
b87d0eb
Increase absToll in af33kagome to fix flaky test
RichardWaiteSTFC Jan 15, 2024
98a52e2
Plot polyhedra with a single mesh
RichardWaiteSTFC Jan 15, 2024
c7c0f9c
Plot single-ion ellipsoids as a single mesh
RichardWaiteSTFC Jan 15, 2024
f6c99df
Fix single-ion bug when no matrix/transform defined
RichardWaiteSTFC Jan 16, 2024
96e581f
Add doc string for SuperCell init
RichardWaiteSTFC Jan 16, 2024
ea21e6c
Remove Simple from class names and add plot_label flag for atom label
RichardWaiteSTFC Jan 16, 2024
be98824
Allow user to change alpha of mesh visuals (polyhedra, planes etc.)
RichardWaiteSTFC Jan 16, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/build_pyspinw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1 # v1.1.0 required for Windows/MacOS support
with:
release: latest
release: R2023a
- name: Run python test
run: |
pip install scipy
Expand Down
3 changes: 3 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ include = [ { path = "pyspinw/ctfs/*" } ]
python = ">=3.8,<=3.12"
libpymcr = ">=0.1.3"
numpy = "^1.21.4"
pyqt5="~5.15"
vispy=">=0.14.1"

# Optional dependencies
pytest = {version = ">=7.0.0", optional = true}
pytest-cov = {version = ">=3,<5", optional = true}
Expand Down
1 change: 1 addition & 0 deletions python/pyspinw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import os
import libpymcr
from . import plotting


# Generate a list of all the MATLAB versions available
Expand Down
Loading
Loading