Skip to content

Commit 5861e15

Browse files
committed
Merge commit '8a7643a8fc370d20b790690518c8d7f52c00b5c6'
* commit '8a7643a8fc370d20b790690518c8d7f52c00b5c6': Update lattice parameters from symmetry constraints *before* throwing an exception due to angles outside ]0 ; pi[
2 parents 6f038c8 + 8a7643a commit 5861e15

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ObjCryst/ObjCryst/UnitCell.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -354,23 +354,23 @@ void UnitCell::Init(const REAL a, const REAL b, const REAL c, const REAL alpha,
354354
//mSpaceGroup.Print();
355355
mSpaceGroup.ChangeSpaceGroup(SpaceGroupId);
356356
//mSpaceGroup.Print();
357-
if((alpha<=0)||(alpha>=M_PI)) throw ObjCrystException("alpha must be within ]0;pi[");
358-
if((beta<=0) ||(beta>=M_PI)) throw ObjCrystException("beta must be within ]0;pi[");
359-
if((gamma<=0)||(gamma>=M_PI)) throw ObjCrystException("gamma must be within ]0;pi[");
360357
mCellDim(0)=a;
361358
mCellDim(1)=b;
362359
mCellDim(2)=c;
363360
mCellDim(3)=alpha;
364361
mCellDim(4)=beta;
365362
mCellDim(5)=gamma;
366363
mClockLatticePar.Click();
364+
this->UpdateLatticePar();
365+
if((mCellDim(3)<=0)||(mCellDim(3)>=M_PI)) throw ObjCrystException("alpha must be within ]0;pi[");
366+
if((mCellDim(4)<=0)||(mCellDim(4)>=M_PI)) throw ObjCrystException("beta must be within ]0;pi[");
367+
if((mCellDim(5)<=0)||(mCellDim(5)>=M_PI)) throw ObjCrystException("gamma must be within ]0;pi[");
367368

368369
mClockMetricMatrix.Reset();
369370
mClockLatticeParUpdate.Reset();
370371

371372
this->InitRefParList();
372373
this->InitMatrices();
373-
this->UpdateLatticePar();
374374
this->SetName(name);
375375

376376
VFN_DEBUG_EXIT("UnitCell::Init(a,b,c,alpha,beta,gamma,Sg,name):End",10)

0 commit comments

Comments
 (0)