@@ -155,11 +155,11 @@ const
155155
156156 // CHECK
157157 if (opIDi < 0 || opIDi >= nops_) {
158- printf (" opIDi = %d out of %d ops\n " , opIDi, nops_);
158+ printf (" opIDi = %d out of %d ops\n " , opIDi, nops_);
159159 }
160160 if (j >= othr[i].Natom () || j < 0 ) {
161- printf (" j = %d out of %d atoms, i = %d out of %zu capacity.\n " , j, othr[i].Natom (),
162- i, operID.capacity ());
161+ printf (" j = %d out of %d atoms, i = %d out of %zu capacity.\n " , j, othr[i].Natom (),
162+ i, operID.capacity ());
163163 }
164164 // END CHECK
165165
@@ -295,6 +295,7 @@ const
295295 return amove;
296296}
297297
298+ // Action_XtalSymm::FindPrevious()
298299void Action_XtalSymm::FindPrevious (int & prevOpID, double & prevTx, double & prevTy, double & prevTz,
299300 double ptx, double pty, double ptz) const
300301{
@@ -349,31 +350,6 @@ void Action_XtalSymm::BuildAsuGrid()
349350 bool success = PointInPrimaryASU (pt[0 ], pt[1 ], pt[2 ]);
350351 if (!success) {
351352 FindPrevious (prevOpID, prevTx, prevTy, prevTz, ptx, pty, ptz);
352- /*
353- for (ii = -1; ii <= 1; ii++) {
354- for (jj = -1; jj <= 1; jj++) {
355- for (kk = -1; kk <= 1; kk++) {
356- for (m = 0; m < nops_; m++) {
357- pt = Vec3(ptx + (double)ii, pty + (double)jj, ptz + (double)kk);
358- pt = pt - T_[m];
359- pt = Rinv_[m] * pt;
360- if (PointInPrimaryASU(pt[0], pt[1], pt[2])) {
361-
362- // This is a solution, break out of all loops
363- prevOpID = m;
364- prevTx = (double)ii;
365- prevTy = (double)jj;
366- prevTz = (double)kk;
367- ii = 2;
368- jj = 2;
369- kk = 2;
370- m = nops_;
371- }
372- }
373- }
374- }
375- }
376- */
377353 }
378354 bool complete = true ;
379355 for (ii = 0 ; ii < 2 ; ii++) {
@@ -562,7 +538,7 @@ Action::RetType Action_XtalSymm::Setup(ActionSetup& setup)
562538 if (molInSolvent_[i]) {
563539 for (j = molLimits_[2 *i]; j < molLimits_[2 *i + 1 ]; j++) {
564540 LoneAtoms[j] = 0 ;
565- MoleAtoms[j] = 1 ;
541+ MoleAtoms[j] = 1 ;
566542 }
567543 }
568544 }
@@ -583,9 +559,9 @@ Action::RetType Action_XtalSymm::Setup(ActionSetup& setup)
583559 SolventList.clear ();
584560 SolventList.reserve (nnonasu);
585561 for (i = 0 ; i < setup.Top ().Natom (); i++) {
586- if (MoleAtoms[i] == 1 ) {
587- SolventList.push_back (i);
588- }
562+ if (MoleAtoms[i] == 1 ) {
563+ SolventList.push_back (i);
564+ }
589565 }
590566 SolventMolecules_ = AtomMask (SolventList, nnonasu);
591567 }
@@ -801,20 +777,20 @@ Action::RetType Action_XtalSymm::DoAction(int frameNum, ActionFrame& frm)
801777 }
802778 }
803779 }
804-
805- // Exit if the standard solution works well enough
806- if (bestRmsd < 1.0 ) {
807- bool stdworks = true ;
780+
781+ // Exit if the standard solution works well enough
782+ if (bestRmsd < 1.0 ) {
783+ bool stdworks = true ;
808784 for (j = 0 ; j < nops_; j++) {
809- if (trialOpID[j] != j) {
810- stdworks = false ;
811- }
812- }
813- if (stdworks) {
814- HowToGetThere[0 ] = nLead;
815- }
816- }
817-
785+ if (trialOpID[j] != j) {
786+ stdworks = false ;
787+ }
788+ }
789+ if (stdworks) {
790+ HowToGetThere[0 ] = nLead;
791+ }
792+ }
793+
818794 // If there is more to do, decrement i and keep on going
819795 if (HowToGetThere[0 ] < nLead && i > 0 ) {
820796 i--;
0 commit comments