Closed RichardWaiteSTFC closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
ea5ea33
) 40.48% compared to head (be98824
) 40.51%. Report is 4 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
4 files ±0 106 suites ±0 14m 18s :stopwatch: + 1m 9s 619 tests ±0 619 :white_check_mark: +1 0 :zzz: ±0 0 :x: - 1 1 766 runs ±0 1 766 :white_check_mark: +2 0 :zzz: ±0 0 :x: - 2
Results for commit be988244. ± Comparison against base commit 735d30a0.
:recycle: This comment has been updated with latest results.
Can now plot single-ion ellipsoids - this example is adapted from tutorial 32
s=m.spinw();
s.genlattice('sym','P 4','lat_const',[8, 8, 6])
s.addatom('r',[1/4, 1/4, 0],'S',1)
s.gencoupling()
s.addmatrix('label','A','value',1-np.eye(3))
s.addaniso('A')
super_cell = SuperCellSimple(s, extent=(2,1,1), plot_mag=True, plot_bonds=True, plot_atoms=True, plot_cell=True, plot_axes=True, plot_plane=True, ion_type="aniso")
super_cell.plot()
There is a small difference compared to the current MATLAB plotting which scales the eigenvalues such that hard-axis is squashed to 0 - I can do this if required but it seems misleading?
Supports DM bonds now - but think I need to get the arrows to terminate before entering the atom marker. Example adapted from tutorial 32
s = m.spinw();
s.genlattice('lat_const',[6, 4, 4],'sym','-x,y,z','label','m_x') # 'angled',[90 90 120],
s.addatom('r',[0.3, 0.5, 0.5],'S',1) # [3/8, 1/2, 1/2]
s.gencoupling('maxDistance', 6)
s.addmatrix('label','DM1','value',[0, 0, 1],'color','blue')
s.addmatrix('label','DM2','value',[0, 1, 0],'color','purple')
s.addcoupling('mat','DM1','bond',1)
s.addcoupling('mat','DM2','bond',1)
super_cell = SuperCellSimple(s, extent=(2,1,1), plot_mag=True, plot_bonds=True, plot_atoms=True, plot_cell=True, plot_axes=True, plot_plane=True, ion_type=None)
super_cell.plot()
Compared to existing MATLAB
Have now put arrow along DM bond at mid-point for now
Thanks. Plotting things as a single mesh seems to have speed up by a factor of 2-3x. Plotting a 5x5x5 supercell of the triAF
model used to take ~15s with the original code, ~10s with the code which eliminated the UnitCellSimple
copies and now takes ~5s with the single mesh.
Class to plot supercells with atoms, bonds and magnetic structures (in rotating frame representation only - i.e. from
spinw.magstr
) instantiated with aspinw
objectTo Test
Test the following systems with multiple and non-integer unit cells along different direction.
(1) Plot magnetic structure (and rotation plane of moment) of a triangular AFM over multiple unit cells
(2) Plot single-ion anisotropy ellipsoid (example from tutorial 32)
(3) Plot multiple DM bonds (example taken from tutorial 32)
(4) Plot unit cell with no bonds, but different sized atoms (and atoms of same type with different labels)
(5) Add polyhedra to
luvo
example above like so(6) Plot
luvo
with a complicated-ish magnetic structure (and compare to existing MATLAB)(7) Plot 2D polygons in 3D
(8) Any other systems you can think of!
Fixes #150