@@ -6825,7 +6825,8 @@ SpaceGroupExplorer::SpaceGroupExplorer(PowderPatternDiffraction *pd):
68256825
68266826SPGScore SpaceGroupExplorer::Run (const string &spgId, const bool fitprofile,
68276827 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)
68296830{
68306831 cctbx::sgtbx::space_group sg;
68316832 try
@@ -6847,11 +6848,13 @@ SPGScore SpaceGroupExplorer::Run(const string &spgId, const bool fitprofile,
68476848 throw ObjCrystException (emsg);
68486849 }
68496850 }
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);
68516853}
68526854
68536855SPGScore 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)
68556858{
68566859 TAU_PROFILE (" SpaceGroupExplorer::Run()" ," void (wxCommandEvent &)" ,TAU_DEFAULT);
68576860 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
68716874 const cctbx::sgtbx::space_group_symbols s = spg.match_tabulated_settings ();
68726875 const string hm=s.universal_hermann_mauguin ();
68736876 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 ))
68756878 {
68766879 throw ObjCrystException (" Spacegroup is not compatible with unit cell." );
68776880 }
@@ -6976,7 +6979,8 @@ SPGScore SpaceGroupExplorer::Run(const cctbx::sgtbx::space_group &spg, const boo
69766979}
69776980
69786981void 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)
69806984{
69816985 Crystal *pCrystal=&(mpDiff->GetCrystal ());
69826986
@@ -6999,7 +7003,7 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
69997003 cctbx::sgtbx::space_group_symbols s=it.next ();
70007004 if (s.number ()==0 ) break ;
70017005 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++;
70037007 // if(s.universal_hermann_mauguin().size()>hmlen) hmlen=s.universal_hermann_mauguin().size();
70047008 }
70057009 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
70187022 cctbx::sgtbx::space_group_symbols s=it.next ();
70197023 if (s.number ()==0 ) break ;
70207024 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 );
70227026 if (compat)
70237027 {
70247028 i++;
@@ -7041,8 +7045,9 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
70417045 }
70427046 else
70437047 {
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));
70467051 if (s.number () == 1 ) nb_refl_p1 = mvSPG.back ().nbreflused ;
70477052 mvSPG.back ().ngof *= mpDiff->GetNbReflBelowMaxSinThetaOvLambda () / (float )nb_refl_p1;
70487053 mvSPGExtinctionFingerprint.insert (make_pair (fgp, mvSPG.back ()));
0 commit comments