Skip to content
Open
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
2 changes: 1 addition & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ IMPROVEMENTS
the list of atoms inside the group.

BUG FIXES
* Correct EstimateCellVolume estimation for orthorombic F
* Correct EstimateCellVolume estimation for orthorhombic F
* Correct calculation of integrated figures of merit (Rwp, etc..)
with multiple crystalline phases (https://github.com/vincefn/objcryst/pull/53)
* + several minor issues
Expand Down
4 changes: 2 additions & 2 deletions Fox/src/Fox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ int main (int argc, char *argv[])
} else {
wxMessageDialog d(NULL,_T("Failed loading file:\n")+name,_T("Error"),wxOK|wxICON_ERROR);
d.ShowModal();
}
}
};
}
else
Expand Down Expand Up @@ -1047,7 +1047,7 @@ int main (int argc, char *argv[])
} else {
wxMessageDialog d(NULL,_T("Failed loading file:\n")+name,_T("Error"),wxOK|wxICON_ERROR);
d.ShowModal();
}
}
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion Fox/src/foxgrid/FoxGridSlave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void FoxGridSlave::CheckJobsAndStartCalculation()
WriteLogMessage("ERROR: Can't write a file " + proc->dir + _T("\\input.xml"));
return;
}

wxString cmd_content;
wxString appname = wxApp::GetInstance()->argv[0];
if(rand) {
Expand Down
2 changes: 1 addition & 1 deletion ObjCryst/ObjCryst/Crystal.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Crystal:public UnitCell
public:
/// Default Constructor
Crystal();
/** \brief Crystal Constructor (orthorombic)
/** \brief Crystal Constructor (orthorhombic)
* \param a,b,c : unit cell dimension, in angstroems
* \param SpaceGroupId: space group symbol or number
*/
Expand Down
34 changes: 17 additions & 17 deletions ObjCryst/ObjCryst/Indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ float EstimateCellVolume(const float dmin, const float dmax, const float nbrefl,
}
// "*.85" means using D0_min rather than D0
if(system==MONOCLINIC) {C0=1.047;D0=0.786*.85;}
if(system==ORTHOROMBIC){C0=0.524;D0=1.36 *.85;}
if(system==ORTHORHOMBIC){C0=0.524;D0=1.36 *.85;}
if(system==HEXAGONAL) {C0=0.150;D0=1.04 *.85;}
if(system==RHOMBOEDRAL){C0=0.230;D0=1.04 *.85;}
if(system==TETRAGONAL) {C0=0.214;D0=1.25 *.85;}
Expand Down Expand Up @@ -121,7 +121,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return par[0]+par[1]*par[1]*h*h + par[2]*par[2]*k*k + par[3]*par[3]*l*l + 2*par[1]*par[3]*par[4]*h*l;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return par[0]+par[1]*par[1]*h*h + par[2]*par[2]*k*k + par[3]*par[3]*l*l;
break;
Expand Down Expand Up @@ -162,7 +162,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return 2*par[1]*par[1]*h + 2*par[1]*par[3]*par[4]*l;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return 2*par[1]*par[1]*h;
break;
Expand Down Expand Up @@ -203,7 +203,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return 2*par[2]*par[2]*k;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return 2*par[2]*par[2]*k;
break;
Expand Down Expand Up @@ -244,7 +244,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return 2*par[3]*par[3]*l + 2*par[1]*par[3]*par[4]*h;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return 2*par[3]*par[3]*l;
break;
Expand Down Expand Up @@ -287,7 +287,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return 2*par[1]*h*h + 2*par[3]*par[4]*h*l;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return 2*par[1]*h*h;
break;
Expand Down Expand Up @@ -328,7 +328,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return 2*par[2]*k*k;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return 2*par[2]*k*k;
break;
Expand Down Expand Up @@ -369,7 +369,7 @@ float RecUnitCell::hkl2d(const float h,const float k,const float l,REAL *derivpa
return 2*par[3]*l*l + 2*par[1]*par[4]*h*l;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
return 2*par[3]*l*l;
break;
Expand Down Expand Up @@ -520,7 +520,7 @@ void RecUnitCell::hkl2d_delta(const float h,const float k,const float l,
}
}
}
case ORTHOROMBIC: //OK
case ORTHORHOMBIC: //OK
{
dmin= p0m + p1m*p1m*h*h + p2m*p2m*k*k + p3m*p3m*l*l;
dmax= p0p + p1p*p1p*h*h + p2p*p2p*k*k + p3p*p3p*l*l;
Expand Down Expand Up @@ -593,7 +593,7 @@ vector<float> RecUnitCell::DirectUnitCell(const bool equiv)const
sgammaa=1;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
aa=par[1];
bb=par[2];
Expand Down Expand Up @@ -962,7 +962,7 @@ float Score(const PeakList &dhkl, const RecUnitCell &rpar, const unsigned int nb
case MONOCLINIC:
sk0=1;sl0=-1;
break;
case ORTHOROMBIC:
case ORTHORHOMBIC:
sk0=1;sl0=1;
break;
case HEXAGONAL:
Expand Down Expand Up @@ -1274,7 +1274,7 @@ void CellExplorer::Evolution(unsigned int ng,const bool randomize,const float f,
}
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
break;
case HEXAGONAL:
break;
Expand Down Expand Up @@ -1622,7 +1622,7 @@ bool DichoIndexed(const PeakList &dhkl, const RecUnitCell &par,const RecUnitCell
sk0=1;sl0=-1;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
sk0=1;sl0=1;
break;
case HEXAGONAL:
Expand Down Expand Up @@ -1894,7 +1894,7 @@ unsigned int CellExplorer::RDicVol(RecUnitCell par0,RecUnitCell dpar, unsigned i
if(vq0[2].first>0) {par0.par[3]=vq0[2].second/vq0[2].first ; vdepth[2]=mDicVolDepthReport;dpar.par[3]*=.0625;}
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
if(vq0[0].first>0) {par0.par[1]=vq0[0].second/vq0[0].first ; vdepth[0]=mDicVolDepthReport;dpar.par[1]*=.0625;}//pow((float)0.5,(int)(mDicVolDepthReport-depth));}
if(vq0[1].first>0) {par0.par[2]=vq0[1].second/vq0[1].first ; vdepth[1]=mDicVolDepthReport;dpar.par[2]*=.0625;}//pow((float)0.5,(int)(mDicVolDepthReport-depth));}
Expand Down Expand Up @@ -2410,7 +2410,7 @@ void CellExplorer::DicVol(const float minScore,const unsigned int minDepth,const
}//x4
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
if(false)
{
Expand Down Expand Up @@ -2730,7 +2730,7 @@ void CellExplorer::Init()
mMin[4]=0;mAmp[4]=amp_crossp;
mnpar=5;
break;
case ORTHOROMBIC:
case ORTHORHOMBIC:
mMin[1]=min_latt;mAmp[1]=max_latt-min_latt;
mMin[2]=min_latt;mAmp[2]=max_latt-min_latt;
mMin[3]=min_latt;mAmp[3]=max_latt-min_latt;
Expand Down Expand Up @@ -2773,7 +2773,7 @@ void CellExplorer::Init()
nb2=1;
break;
}
case ORTHOROMBIC:
case ORTHORHOMBIC:
{
nb1=3;
break;
Expand Down
6 changes: 4 additions & 2 deletions ObjCryst/ObjCryst/Indexing.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ namespace ObjCryst
*
*/
enum CrystalSystem
{ TRICLINIC, MONOCLINIC, ORTHOROMBIC, HEXAGONAL, RHOMBOEDRAL, TETRAGONAL, CUBIC};
{ TRICLINIC, MONOCLINIC, ORTHORHOMBIC, HEXAGONAL, RHOMBOEDRAL, TETRAGONAL, CUBIC,
ORTHOROMBIC=ORTHORHOMBIC // Fix historical typo for backwards compatibility
};

enum CrystalCentering
{ LATTICE_P,LATTICE_I,LATTICE_A,LATTICE_B,LATTICE_C,LATTICE_F};
Expand Down Expand Up @@ -91,7 +93,7 @@ class RecUnitCell
* d*_hkl^2 = par[0] + par[1] h^2 + par[1] k^2 + par[2]^2 l^2 + par[3] hk + par[4] kl + par[5] hl
* for monoclinic:
* d*_hkl^2 = zero + par[0]^2 h^2 + par[1]^2 k^2 + par[2]^2 l^2 + par[0]*par[2]*par[3] hl
* for orthorombic:
* for orthorhombic:
* d*_hkl^2 = zero + par[0]^2 h^2 + par[1]^2 k^2 + par[2]^2 l^2
* for hexagonal:
* d*_hkl^2 = zero + par[0]^2 h^2 + par[0]^2 k^2 + par[2]^2 l^2 + sqrt(3)/2*par[0]^2 hk
Expand Down
4 changes: 2 additions & 2 deletions ObjCryst/ObjCryst/UnitCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class UnitCell:public RefinableObj
public:
/// Default Constructor
UnitCell();
/** \brief UnitCell Constructor (orthorombic)
/** \brief UnitCell Constructor (orthorhombic)
* \param a,b,c : unit cell dimension, in angstroems
* \param SpaceGroupId: space group symbol or number
*/
Expand Down Expand Up @@ -251,7 +251,7 @@ class UnitCell:public RefinableObj
* \warning EXPERIMENTAL
*
* Normally lattice parameters are constrained by the space group choice
* (e.g. a=b=c and angles =90� for cubic spacegroups). Using this option
* (e.g. a=b=c and angles =90� for cubic spacegroups). Using this option
* allows you to override this, and choose any lattice parameter. THis works
* as long as symmetry operations are applied to fractionnal coordinates.
*
Expand Down
30 changes: 15 additions & 15 deletions ObjCryst/wxCryst/wxPowderPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2313,9 +2313,9 @@ wxWindow(parent,-1),mpGraph(graph),mpPeakList(&peaklist),mpCellExplorer(0),mpCry
mpLog->AppendText(wxString::Format(_T(" Cubic F v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,CUBIC ,LATTICE_F,1.2),EstimateCellVolume(dmin,dmax,nb,CUBIC ,LATTICE_F,0.3)));
mpLog->AppendText(wxString::Format(_T(" Tetragonal P v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,TETRAGONAL ,LATTICE_P,1.2),EstimateCellVolume(dmin,dmax,nb,TETRAGONAL ,LATTICE_P,0.3)));
mpLog->AppendText(wxString::Format(_T(" Tetragonal I v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,TETRAGONAL ,LATTICE_I,1.2),EstimateCellVolume(dmin,dmax,nb,TETRAGONAL ,LATTICE_I,0.3)));
mpLog->AppendText(wxString::Format(_T(" Orthorombic P v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,LATTICE_P,1.2),EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,LATTICE_P,0.3)));
mpLog->AppendText(wxString::Format(_T(" Orthorombic I,C v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,LATTICE_I,1.2),EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,LATTICE_I,0.3)));
mpLog->AppendText(wxString::Format(_T(" Orthorombic F v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,LATTICE_F,1.2),EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,LATTICE_F,0.3)));
mpLog->AppendText(wxString::Format(_T(" Orthorombic P v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,LATTICE_P,1.2),EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,LATTICE_P,0.3)));
mpLog->AppendText(wxString::Format(_T(" Orthorombic I,C v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,LATTICE_I,1.2),EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,LATTICE_I,0.3)));
mpLog->AppendText(wxString::Format(_T(" Orthorombic F v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,LATTICE_F,1.2),EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,LATTICE_F,0.3)));
mpLog->AppendText(wxString::Format(_T(" Hexagonal v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,HEXAGONAL ,LATTICE_P,1.2),EstimateCellVolume(dmin,dmax,nb,HEXAGONAL ,LATTICE_P,0.3)));
mpLog->AppendText(wxString::Format(_T(" Monoclinic P v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,MONOCLINIC ,LATTICE_P,1.2),EstimateCellVolume(dmin,dmax,nb,MONOCLINIC ,LATTICE_P,0.3)));
mpLog->AppendText(wxString::Format(_T(" Monoclinic C v=%6.0f -> %6.0f A\n"),EstimateCellVolume(dmin,dmax,nb,MONOCLINIC ,LATTICE_C,1.2),EstimateCellVolume(dmin,dmax,nb,MONOCLINIC ,LATTICE_C,0.3)));
Expand Down Expand Up @@ -2486,17 +2486,17 @@ void WXCellExplorer::OnIndex(wxCommandEvent &event)
case 4:cent=LATTICE_C;centc='C';break;
case 5:cent=LATTICE_F;centc='F';break;
}
minv=EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,cent,1.5);
maxv=EstimateCellVolume(dmin,dmax,nb,ORTHOROMBIC,cent,0.4*weak_f);
minv=EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,cent,1.5);
maxv=EstimateCellVolume(dmin,dmax,nb,ORTHORHOMBIC,cent,0.4*weak_f);
mpCellExplorer->SetVolumeMinMax(minv,maxv);
lengthmax=pow(maxv,(float)(1/3.0))*3;
if(lengthmax<25)lengthmax=25;
mpCellExplorer->SetLengthMinMax(3,lengthmax);
mpCellExplorer->SetCrystalSystem(ORTHOROMBIC);
mpCellExplorer->SetCrystalSystem(ORTHORHOMBIC);
mpCellExplorer->SetCrystalCentering(cent);
mpLog->AppendText(wxString::Format(_T("ORTHOROMBIC %c: V= %6.0f -> %6.0f A^3, max length=%6.2fA"),centc,minv,maxv,lengthmax));
mpLog->AppendText(wxString::Format(_T("ORTHORHOMBIC %c: V= %6.0f -> %6.0f A^3, max length=%6.2fA"),centc,minv,maxv,lengthmax));
t0=chrono.seconds();
if(dlgProgress.Update(4,wxString::Format(_T("ORTHOROMBIC %c (%u spurious), V=%6.0f-%6.0f, l<%6.2fA\n")
if(dlgProgress.Update(4,wxString::Format(_T("ORTHORHOMBIC %c (%u spurious), V=%6.0f-%6.0f, l<%6.2fA\n")
_T("Best Score=%6.1f"),centc,
nbSpurious,minv,maxv,lengthmax,mpCellExplorer->GetBestScore()))==false) break;
mpCellExplorer->DicVol(reportOnScore,reportOnDepth,stopOnScore,stopOnDepth);
Expand Down Expand Up @@ -2612,7 +2612,7 @@ void WXCellExplorer::OnIndex(wxCommandEvent &event)
{
case TRICLINIC:sys="TRICLINIC"; break;
case MONOCLINIC:sys="MONOCLINIC"; break;
case ORTHOROMBIC:sys="ORTHOROMBIC"; break;
case ORTHORHOMBIC:sys="ORTHORHOMBIC"; break;
case HEXAGONAL:sys="HEXAGONAL"; break;
case RHOMBOEDRAL:sys="RHOMBOEDRAL"; break;
case TETRAGONAL:sys="TETRAGONAL"; break;
Expand Down Expand Up @@ -2678,7 +2678,7 @@ void WXCellExplorer::OnSelectCell(wxCommandEvent &event)
{
case TRICLINIC:mpCrystal->ChangeSpaceGroup("P-1");break;
case MONOCLINIC:mpCrystal->ChangeSpaceGroup("P2/m");break;
case ORTHOROMBIC:mpCrystal->ChangeSpaceGroup("Pmmm");break;
case ORTHORHOMBIC:mpCrystal->ChangeSpaceGroup("Pmmm");break;
case HEXAGONAL:mpCrystal->ChangeSpaceGroup("P6/mmm");break;
case RHOMBOEDRAL:mpCrystal->ChangeSpaceGroup("R-3m");break;
case TETRAGONAL:mpCrystal->ChangeSpaceGroup("P4/mmm");break;
Expand All @@ -2691,7 +2691,7 @@ void WXCellExplorer::OnSelectCell(wxCommandEvent &event)
switch(pos->first.mlattice)
{
case MONOCLINIC:mpCrystal->ChangeSpaceGroup("I2/m");break;
case ORTHOROMBIC:mpCrystal->ChangeSpaceGroup("I222");break;
case ORTHORHOMBIC:mpCrystal->ChangeSpaceGroup("I222");break;
case TETRAGONAL:mpCrystal->ChangeSpaceGroup("I4/mmm");break;
case CUBIC:mpCrystal->ChangeSpaceGroup("Im-3m");break;
}
Expand All @@ -2702,7 +2702,7 @@ void WXCellExplorer::OnSelectCell(wxCommandEvent &event)
switch(pos->first.mlattice)
{
case MONOCLINIC:mpCrystal->ChangeSpaceGroup("A2/m");break;
case ORTHOROMBIC:mpCrystal->ChangeSpaceGroup("Amm2");break;
case ORTHORHOMBIC:mpCrystal->ChangeSpaceGroup("Amm2");break;
}
break;
}
Expand All @@ -2711,15 +2711,15 @@ void WXCellExplorer::OnSelectCell(wxCommandEvent &event)
switch(pos->first.mlattice)
{
case MONOCLINIC:mpCrystal->ChangeSpaceGroup("C2/m");break;
case ORTHOROMBIC:mpCrystal->ChangeSpaceGroup("Cmmm");break;
case ORTHORHOMBIC:mpCrystal->ChangeSpaceGroup("Cmmm");break;
}
break;
}
case LATTICE_F://,LATTICE_A,LATTICE_B,LATTICE_C};
{
switch(pos->first.mlattice)
{
case ORTHOROMBIC:mpCrystal->ChangeSpaceGroup("Fmmm");break;
case ORTHORHOMBIC:mpCrystal->ChangeSpaceGroup("Fmmm");break;
case CUBIC:mpCrystal->ChangeSpaceGroup("Fm-3m");break;
}
break;
Expand Down Expand Up @@ -3209,7 +3209,7 @@ void WXCellExplorer::OnExportIndexingResults(wxCommandEvent &event)
{
case TRICLINIC:sys="TRICLINIC"; break;
case MONOCLINIC:sys="MONOCLINIC"; break;
case ORTHOROMBIC:sys="ORTHOROMBIC"; break;
case ORTHORHOMBIC:sys="ORTHORHOMBIC"; break;
case HEXAGONAL:sys="HEXAGONAL"; break;
case RHOMBOEDRAL:sys="RHOMBOEDRAL"; break;
case TETRAGONAL:sys="TETRAGONAL"; break;
Expand Down