diff --git a/swfiles/@spinw/genlattice.m b/swfiles/@spinw/genlattice.m index a4dc97823..52360db08 100644 --- a/swfiles/@spinw/genlattice.m +++ b/swfiles/@spinw/genlattice.m @@ -129,11 +129,14 @@ ' instead']); if ~isempty(param.sym) error('spinw:genlattice:WrongInput', ... - 'Both sym and spgr provided - note sym will be used.'); + 'Both sym and spgr provided - please only use sym.'); else param.sym = param.spgr; end end +if ~isempty(param.sym) && isnumeric(param.sym) && param.sym == 0 + param.sym = []; +end if any(strcmp('angled', varargin(1:2:end))) && ... any(strcmp('angle', varargin(1:2:end))) warning('spinw:genlattice:WrongInput', ... @@ -293,4 +296,4 @@ obj.unit.nformula = int32(param.nformula); -end \ No newline at end of file +end diff --git a/tutorials/publish/tutorial4.m b/tutorials/publish/tutorial4.m index 3a693a3cf..75b9ebaef 100644 --- a/tutorials/publish/tutorial4.m +++ b/tutorials/publish/tutorial4.m @@ -2,7 +2,7 @@ % We define a square lattice in the ab plane, with Cu+ ions with S=1 spin. AFsq = spinw; -AFsq.genlattice('lat_const',[3 3 6],'angled',[90 90 90],'sym',0) +AFsq.genlattice('lat_const',[3 3 6],'angled',[90 90 90]) AFsq.addatom('r',[0 0 0],'S', 1,'label','Cu1','color','b') AFsq.table('atom') plot(AFsq)