@@ -6825,7 +6825,8 @@ SpaceGroupExplorer::SpaceGroupExplorer(PowderPatternDiffraction *pd):
6825
6825
6826
6826
SPGScore SpaceGroupExplorer::Run (const string &spgId, const bool fitprofile,
6827
6827
const bool verbose, const bool restore_orig,
6828
- const bool update_display)
6828
+ const bool update_display, const REAL relative_length_tolerance,
6829
+ const REAL absolute_angle_tolerance_degree)
6829
6830
{
6830
6831
cctbx::sgtbx::space_group sg;
6831
6832
try
@@ -6847,11 +6848,13 @@ SPGScore SpaceGroupExplorer::Run(const string &spgId, const bool fitprofile,
6847
6848
throw ObjCrystException (emsg);
6848
6849
}
6849
6850
}
6850
- return this ->Run (sg, fitprofile, verbose, restore_orig, update_display);
6851
+ return this ->Run (sg, fitprofile, verbose, restore_orig, update_display,
6852
+ relative_length_tolerance, absolute_angle_tolerance_degree);
6851
6853
}
6852
6854
6853
6855
SPGScore SpaceGroupExplorer::Run (const cctbx::sgtbx::space_group &spg, const bool fitprofile, const bool verbose,
6854
- const bool restore_orig, const bool update_display)
6856
+ const bool restore_orig, const bool update_display,
6857
+ const REAL relative_length_tolerance, const REAL absolute_angle_tolerance_degree)
6855
6858
{
6856
6859
TAU_PROFILE (" SpaceGroupExplorer::Run()" ," void (wxCommandEvent &)" ,TAU_DEFAULT);
6857
6860
TAU_PROFILE_TIMER (timer1," SpaceGroupExplorer::Run()LSQ-P1" ," " , TAU_FIELD);
@@ -6871,7 +6874,7 @@ SPGScore SpaceGroupExplorer::Run(const cctbx::sgtbx::space_group &spg, const boo
6871
6874
const cctbx::sgtbx::space_group_symbols s = spg.match_tabulated_settings ();
6872
6875
const string hm=s.universal_hermann_mauguin ();
6873
6876
const cctbx::uctbx::unit_cell uc (scitbx::af::double6 (a,b,c,d*RAD2DEG,e*RAD2DEG,f*RAD2DEG));
6874
- if (!spg.is_compatible_unit_cell (uc,0.01 , 0.1 ))
6877
+ if (!spg.is_compatible_unit_cell (uc,relative_length_tolerance,absolute_angle_tolerance_degree ))
6875
6878
{
6876
6879
throw ObjCrystException (" Spacegroup is not compatible with unit cell." );
6877
6880
}
@@ -6976,7 +6979,8 @@ SPGScore SpaceGroupExplorer::Run(const cctbx::sgtbx::space_group &spg, const boo
6976
6979
}
6977
6980
6978
6981
void SpaceGroupExplorer::RunAll (const bool fitprofile_all, const bool verbose, const bool keep_best,
6979
- const bool update_display, const bool fitprofile_p1)
6982
+ const bool update_display, const bool fitprofile_p1,
6983
+ const REAL relative_length_tolerance, const REAL absolute_angle_tolerance_degree)
6980
6984
{
6981
6985
Crystal *pCrystal=&(mpDiff->GetCrystal ());
6982
6986
@@ -6999,7 +7003,7 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
6999
7003
cctbx::sgtbx::space_group_symbols s=it.next ();
7000
7004
if (s.number ()==0 ) break ;
7001
7005
cctbx::sgtbx::space_group spg (s);
7002
- if (spg.is_compatible_unit_cell (uc,0.01 , 0.1 )) nbspg++;
7006
+ if (spg.is_compatible_unit_cell (uc,relative_length_tolerance, absolute_angle_tolerance_degree )) nbspg++;
7003
7007
// if(s.universal_hermann_mauguin().size()>hmlen) hmlen=s.universal_hermann_mauguin().size();
7004
7008
}
7005
7009
if (verbose) cout << boost::format (" Beginning spacegroup exploration... %u to go...\n " ) % nbspg;
@@ -7018,7 +7022,7 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
7018
7022
cctbx::sgtbx::space_group_symbols s=it.next ();
7019
7023
if (s.number ()==0 ) break ;
7020
7024
cctbx::sgtbx::space_group spg (s);
7021
- bool compat=spg.is_compatible_unit_cell (uc,0.01 , 0.1 );
7025
+ bool compat=spg.is_compatible_unit_cell (uc,relative_length_tolerance,absolute_angle_tolerance_degree );
7022
7026
if (compat)
7023
7027
{
7024
7028
i++;
@@ -7041,8 +7045,9 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
7041
7045
}
7042
7046
else
7043
7047
{
7044
- if (((s.number ()==1 ) && fitprofile_p1) || fitprofile_all) mvSPG.push_back (this ->Run (spg, true , false , false , update_display));
7045
- else mvSPG.push_back (this ->Run (spg, false , false , true , update_display));
7048
+ if (((s.number ()==1 ) && fitprofile_p1) || fitprofile_all) mvSPG.push_back (this ->Run (spg, true , false , false , update_display,
7049
+ relative_length_tolerance, absolute_angle_tolerance_degree));
7050
+ else mvSPG.push_back (this ->Run (spg, false , false , true , update_display,relative_length_tolerance,absolute_angle_tolerance_degree));
7046
7051
if (s.number () == 1 ) nb_refl_p1 = mvSPG.back ().nbreflused ;
7047
7052
mvSPG.back ().ngof *= mpDiff->GetNbReflBelowMaxSinThetaOvLambda () / (float )nb_refl_p1;
7048
7053
mvSPGExtinctionFingerprint.insert (make_pair (fgp, mvSPG.back ()));
0 commit comments