Changeset 9879f6 for src/molecule_dynamics.cpp
- Timestamp:
- Mar 5, 2010, 10:16:47 AM (16 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, Candidate_v1.7.0, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- d3347e
- Parents:
- e87acf
- git-author:
- Frederik Heber <heber@…> (03/05/10 10:08:44)
- git-committer:
- Frederik Heber <heber@…> (03/05/10 10:16:47)
- File:
-
- 1 edited
-
src/molecule_dynamics.cpp (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_dynamics.cpp
re87acf r9879f6 27 27 gsl_matrix *A = gsl_matrix_alloc(NDIM,NDIM); 28 28 gsl_vector *x = gsl_vector_alloc(NDIM); 29 atom * Runner = mol->start;30 29 atom *Sprinter = NULL; 31 30 Vector trajectory1, trajectory2, normal, TestVector; 32 31 double Norm1, Norm2, tmp, result = 0.; 33 32 34 while (Runner->next != mol->end) { 35 Runner = Runner->next; 36 if (Runner == Walker) // hence, we only go up to the Walker, not beyond (similar to i=0; i<j; i++) 33 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 34 if ((*iter) == Walker) // hence, we only go up to the Walker, not beyond (similar to i=0; i<j; i++) 37 35 break; 38 36 // determine normalized trajectories direction vector (n1, n2) … … 42 40 trajectory1.Normalize(); 43 41 Norm1 = trajectory1.Norm(); 44 Sprinter = Params.PermutationMap[ Runner->nr]; // find second target point42 Sprinter = Params.PermutationMap[(*iter)->nr]; // find second target point 45 43 trajectory2.CopyVector(&Sprinter->Trajectory.R.at(Params.endstep)); 46 trajectory2.SubtractVector(& Runner->Trajectory.R.at(Params.startstep));44 trajectory2.SubtractVector(&(*iter)->Trajectory.R.at(Params.startstep)); 47 45 trajectory2.Normalize(); 48 46 Norm2 = trajectory1.Norm(); 49 47 // check whether either is zero() 50 48 if ((Norm1 < MYEPSILON) && (Norm2 < MYEPSILON)) { 51 tmp = Walker->Trajectory.R.at(Params.startstep).Distance(& Runner->Trajectory.R.at(Params.startstep));49 tmp = Walker->Trajectory.R.at(Params.startstep).Distance(&(*iter)->Trajectory.R.at(Params.startstep)); 52 50 } else if (Norm1 < MYEPSILON) { 53 51 Sprinter = Params.PermutationMap[Walker->nr]; // find first target point 54 52 trajectory1.CopyVector(&Sprinter->Trajectory.R.at(Params.endstep)); // copy first offset 55 trajectory1.SubtractVector(& Runner->Trajectory.R.at(Params.startstep)); // subtract second offset53 trajectory1.SubtractVector(&(*iter)->Trajectory.R.at(Params.startstep)); // subtract second offset 56 54 trajectory2.Scale( trajectory1.ScalarProduct(&trajectory2) ); // trajectory2 is scaled to unity, hence we don't need to divide by anything 57 55 trajectory1.SubtractVector(&trajectory2); // project the part in norm direction away 58 56 tmp = trajectory1.Norm(); // remaining norm is distance 59 57 } else if (Norm2 < MYEPSILON) { 60 Sprinter = Params.PermutationMap[ Runner->nr]; // find second target point58 Sprinter = Params.PermutationMap[(*iter)->nr]; // find second target point 61 59 trajectory2.CopyVector(&Sprinter->Trajectory.R.at(Params.endstep)); // copy second offset 62 60 trajectory2.SubtractVector(&Walker->Trajectory.R.at(Params.startstep)); // subtract first offset … … 65 63 tmp = trajectory2.Norm(); // remaining norm is distance 66 64 } else if ((fabs(trajectory1.ScalarProduct(&trajectory2)/Norm1/Norm2) - 1.) < MYEPSILON) { // check whether they're linear dependent 67 // Log() << Verbose(3) << "Both trajectories of " << *Walker << " and " << * Runner<< " are linear dependent: ";65 // Log() << Verbose(3) << "Both trajectories of " << *Walker << " and " << *(*iter) << " are linear dependent: "; 68 66 // Log() << Verbose(0) << trajectory1; 69 67 // Log() << Verbose(0) << " and "; 70 68 // Log() << Verbose(0) << trajectory2; 71 tmp = Walker->Trajectory.R.at(Params.startstep).Distance(& Runner->Trajectory.R.at(Params.startstep));69 tmp = Walker->Trajectory.R.at(Params.startstep).Distance(&(*iter)->Trajectory.R.at(Params.startstep)); 72 70 // Log() << Verbose(0) << " with distance " << tmp << "." << endl; 73 71 } else { // determine distance by finding minimum distance 74 // Log() << Verbose(3) << "Both trajectories of " << *Walker << " and " << * Runner<< " are linear independent ";72 // Log() << Verbose(3) << "Both trajectories of " << *Walker << " and " << *(*iter) << " are linear independent "; 75 73 // Log() << Verbose(0) << endl; 76 74 // Log() << Verbose(0) << "First Trajectory: "; … … 88 86 gsl_matrix_set(A, 1, i, trajectory2.x[i]); 89 87 gsl_matrix_set(A, 2, i, normal.x[i]); 90 gsl_vector_set(x,i, (Walker->Trajectory.R.at(Params.startstep).x[i] - Runner->Trajectory.R.at(Params.startstep).x[i]));88 gsl_vector_set(x,i, (Walker->Trajectory.R.at(Params.startstep).x[i] - (*iter)->Trajectory.R.at(Params.startstep).x[i])); 91 89 } 92 90 // solve the linear system by Householder transformations … … 96 94 // Log() << Verbose(0) << " with distance " << tmp << "." << endl; 97 95 // test whether we really have the intersection (by checking on c_1 and c_2) 98 TestVector.CopyVector(& Runner->Trajectory.R.at(Params.startstep));96 TestVector.CopyVector(&(*iter)->Trajectory.R.at(Params.startstep)); 99 97 trajectory2.Scale(gsl_vector_get(x,1)); 100 98 TestVector.AddVector(&trajectory2); … … 131 129 { 132 130 double result = 0.; 133 atom * Runner = mol->start; 134 while (Runner->next != mol->end) { 135 Runner = Runner->next; 136 if ((Params.PermutationMap[Walker->nr] == Params.PermutationMap[Runner->nr]) && (Walker->nr < Runner->nr)) { 131 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 132 if ((Params.PermutationMap[Walker->nr] == Params.PermutationMap[(*iter)->nr]) && (Walker->nr < (*iter)->nr)) { 137 133 // atom *Sprinter = PermutationMap[Walker->nr]; 138 // Log() << Verbose(0) << *Walker << " and " << * Runner<< " are heading to the same target at ";134 // Log() << Verbose(0) << *Walker << " and " << *(*iter) << " are heading to the same target at "; 139 135 // Log() << Verbose(0) << Sprinter->Trajectory.R.at(endstep); 140 136 // Log() << Verbose(0) << ", penalting." << endl; … … 167 163 // go through every atom 168 164 atom *Runner = NULL; 169 atom *Walker = start; 170 while (Walker->next != end) { 171 Walker = Walker->next; 165 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 172 166 // first term: distance to target 173 Runner = Params.PermutationMap[ Walker->nr]; // find target point174 tmp = ( Walker->Trajectory.R.at(Params.startstep).Distance(&Runner->Trajectory.R.at(Params.endstep)));167 Runner = Params.PermutationMap[(*iter)->nr]; // find target point 168 tmp = ((*iter)->Trajectory.R.at(Params.startstep).Distance(&Runner->Trajectory.R.at(Params.endstep))); 175 169 tmp *= Params.IsAngstroem ? 1. : 1./AtomicLengthToAngstroem; 176 170 result += Params.PenaltyConstants[0] * tmp; … … 178 172 179 173 // second term: sum of distances to other trajectories 180 result += SumDistanceOfTrajectories( Walker, this, Params);174 result += SumDistanceOfTrajectories((*iter), this, Params); 181 175 182 176 // third term: penalty for equal targets 183 result += PenalizeEqualTargets( Walker, this, Params);177 result += PenalizeEqualTargets((*iter), this, Params); 184 178 } 185 179 … … 224 218 } 225 219 226 atom *Runner = NULL; 227 atom *Walker = mol->start; 228 while (Walker->next != mol->end) { 229 Walker = Walker->next; 230 Runner = mol->start; 231 while(Runner->next != mol->end) { 232 Runner = Runner->next; 233 Params.DistanceList[Walker->nr]->insert( DistancePair(Walker->Trajectory.R.at(Params.startstep).Distance(&Runner->Trajectory.R.at(Params.endstep)), Runner) ); 220 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 221 for (molecule::const_iterator runner = mol->begin(); runner != mol->end(); ++runner) { 222 Params.DistanceList[(*iter)->nr]->insert( DistancePair((*iter)->Trajectory.R.at(Params.startstep).Distance(&(*runner)->Trajectory.R.at(Params.endstep)), (*runner)) ); 234 223 } 235 224 } … … 243 232 void CreateInitialLists(molecule *mol, struct EvaluatePotential &Params) 244 233 { 245 atom *Walker = mol->start; 246 while (Walker->next != mol->end) { 247 Walker = Walker->next; 248 Params.StepList[Walker->nr] = Params.DistanceList[Walker->nr]->begin(); // stores the step to the next iterator that could be a possible next target 249 Params.PermutationMap[Walker->nr] = Params.DistanceList[Walker->nr]->begin()->second; // always pick target with the smallest distance 250 Params.DoubleList[Params.DistanceList[Walker->nr]->begin()->second->nr]++; // increase this target's source count (>1? not injective) 251 Params.DistanceIterators[Walker->nr] = Params.DistanceList[Walker->nr]->begin(); // and remember which one we picked 252 Log() << Verbose(2) << *Walker << " starts with distance " << Params.DistanceList[Walker->nr]->begin()->first << "." << endl; 234 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 235 Params.StepList[(*iter)->nr] = Params.DistanceList[(*iter)->nr]->begin(); // stores the step to the next iterator that could be a possible next target 236 Params.PermutationMap[(*iter)->nr] = Params.DistanceList[(*iter)->nr]->begin()->second; // always pick target with the smallest distance 237 Params.DoubleList[Params.DistanceList[(*iter)->nr]->begin()->second->nr]++; // increase this target's source count (>1? not injective) 238 Params.DistanceIterators[(*iter)->nr] = Params.DistanceList[(*iter)->nr]->begin(); // and remember which one we picked 239 Log() << Verbose(2) << *(*iter) << " starts with distance " << Params.DistanceList[(*iter)->nr]->begin()->first << "." << endl; 253 240 } 254 241 }; … … 291 278 void MakeInjectivePermutation(molecule *mol, struct EvaluatePotential &Params) 292 279 { 293 atom *Walker = mol->start;280 molecule::const_iterator iter = mol->begin(); 294 281 DistanceMap::iterator NewBase; 295 282 double Potential = fabs(mol->ConstrainedPotential(Params)); 296 283 284 if (mol->empty()) { 285 eLog() << Verbose(1) << "Molecule is empty." << endl; 286 return; 287 } 297 288 while ((Potential) > Params.PenaltyConstants[2]) { 298 289 PrintPermutationMap(mol->AtomCount, Params); 299 Walker = Walker->next;300 if ( Walker == mol->end) // round-robin at the end301 Walker = mol->start->next;302 if (Params.DoubleList[Params.DistanceIterators[ Walker->nr]->second->nr] <= 1) // no need to make those injective that aren't290 iter++; 291 if (iter == mol->end()) // round-robin at the end 292 iter = mol->begin(); 293 if (Params.DoubleList[Params.DistanceIterators[(*iter)->nr]->second->nr] <= 1) // no need to make those injective that aren't 303 294 continue; 304 295 // now, try finding a new one 305 Potential = TryNextNearestNeighbourForInjectivePermutation(mol, Walker, Potential, Params);296 Potential = TryNextNearestNeighbourForInjectivePermutation(mol, (*iter), Potential, Params); 306 297 } 307 298 for (int i=mol->AtomCount; i--;) // now each single entry in the DoubleList should be <=1 … … 350 341 Params.StepList = Malloc<DistanceMap::iterator>(AtomCount, "molecule::MinimiseConstrainedPotential: Params.*StepList"); 351 342 int round; 352 atom * Walker = NULL, *Runner = NULL, *Sprinter = NULL;343 atom *Sprinter = NULL; 353 344 DistanceMap::iterator Rider, Strider; 354 345 … … 377 368 Log() << Verbose(2) << "Starting round " << ++round << ", at current potential " << OldPotential << " ... " << endl; 378 369 OlderPotential = OldPotential; 370 molecule::const_iterator iter; 379 371 do { 380 Walker = start; 381 while (Walker->next != end) { // pick one 382 Walker = Walker->next; 372 iter = begin(); 373 for (; iter != end(); ++iter) { 383 374 PrintPermutationMap(AtomCount, Params); 384 Sprinter = Params.DistanceIterators[ Walker->nr]->second; // store initial partner385 Strider = Params.DistanceIterators[ Walker->nr]; //remember old iterator386 Params.DistanceIterators[ Walker->nr] = Params.StepList[Walker->nr];387 if (Params.DistanceIterators[ Walker->nr] == Params.DistanceList[Walker->nr]->end()) {// stop, before we run through the list and still on388 Params.DistanceIterators[ Walker->nr] == Params.DistanceList[Walker->nr]->begin();375 Sprinter = Params.DistanceIterators[(*iter)->nr]->second; // store initial partner 376 Strider = Params.DistanceIterators[(*iter)->nr]; //remember old iterator 377 Params.DistanceIterators[(*iter)->nr] = Params.StepList[(*iter)->nr]; 378 if (Params.DistanceIterators[(*iter)->nr] == Params.DistanceList[(*iter)->nr]->end()) {// stop, before we run through the list and still on 379 Params.DistanceIterators[(*iter)->nr] == Params.DistanceList[(*iter)->nr]->begin(); 389 380 break; 390 381 } 391 //Log() << Verbose(2) << "Current Walker: " << * Walker << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[Walker->nr]->second << "." << endl;382 //Log() << Verbose(2) << "Current Walker: " << *(*iter) << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[(*iter)->nr]->second << "." << endl; 392 383 // find source of the new target 393 Runner = start->next;394 while(Runner != end) { // find the source whose toes we might be stepping on (Walker's new target should be in use by another already)395 if (Params.PermutationMap[ Runner->nr] == Params.DistanceIterators[Walker->nr]->second) {396 //Log() << Verbose(2) << "Found the corresponding owner " << * Runner << " to " << *PermutationMap[Runner->nr] << "." << endl;384 molecule::const_iterator runner = begin(); 385 for (; runner != end(); ++runner) { // find the source whose toes we might be stepping on (Walker's new target should be in use by another already) 386 if (Params.PermutationMap[(*runner)->nr] == Params.DistanceIterators[(*iter)->nr]->second) { 387 //Log() << Verbose(2) << "Found the corresponding owner " << *(*runner) << " to " << *PermutationMap[(*runner)->nr] << "." << endl; 397 388 break; 398 389 } 399 Runner = Runner->next;400 390 } 401 if ( Runner != end) { // we found the other source391 if (runner != end()) { // we found the other source 402 392 // then look in its distance list for Sprinter 403 Rider = Params.DistanceList[ Runner->nr]->begin();404 for (; Rider != Params.DistanceList[ Runner->nr]->end(); Rider++)393 Rider = Params.DistanceList[(*runner)->nr]->begin(); 394 for (; Rider != Params.DistanceList[(*runner)->nr]->end(); Rider++) 405 395 if (Rider->second == Sprinter) 406 396 break; 407 if (Rider != Params.DistanceList[ Runner->nr]->end()) { // if we have found one408 //Log() << Verbose(2) << "Current Other: " << * Runner << " with old/next candidate " << *PermutationMap[Runner->nr] << "/" << *Rider->second << "." << endl;397 if (Rider != Params.DistanceList[(*runner)->nr]->end()) { // if we have found one 398 //Log() << Verbose(2) << "Current Other: " << *(*runner) << " with old/next candidate " << *PermutationMap[(*runner)->nr] << "/" << *Rider->second << "." << endl; 409 399 // exchange both 410 Params.PermutationMap[ Walker->nr] = Params.DistanceIterators[Walker->nr]->second; // put next farther distance into PermutationMap411 Params.PermutationMap[ Runner->nr] = Sprinter; // and hand the old target to its respective owner400 Params.PermutationMap[(*iter)->nr] = Params.DistanceIterators[(*iter)->nr]->second; // put next farther distance into PermutationMap 401 Params.PermutationMap[(*runner)->nr] = Sprinter; // and hand the old target to its respective owner 412 402 PrintPermutationMap(AtomCount, Params); 413 403 // calculate the new potential … … 416 406 if (Potential > OldPotential) { // we made everything worse! Undo ... 417 407 //Log() << Verbose(3) << "Nay, made the potential worse: " << Potential << " vs. " << OldPotential << "!" << endl; 418 //Log() << Verbose(3) << "Setting " << * Runner << "'s source to " << *Params.DistanceIterators[Runner->nr]->second << "." << endl;408 //Log() << Verbose(3) << "Setting " << *(*runner) << "'s source to " << *Params.DistanceIterators[(*runner)->nr]->second << "." << endl; 419 409 // Undo for Runner (note, we haven't moved the iteration yet, we may use this) 420 Params.PermutationMap[ Runner->nr] = Params.DistanceIterators[Runner->nr]->second;410 Params.PermutationMap[(*runner)->nr] = Params.DistanceIterators[(*runner)->nr]->second; 421 411 // Undo for Walker 422 Params.DistanceIterators[ Walker->nr] = Strider; // take next farther distance target423 //Log() << Verbose(3) << "Setting " << * Walker << "'s source to " << *Params.DistanceIterators[Walker->nr]->second << "." << endl;424 Params.PermutationMap[ Walker->nr] = Params.DistanceIterators[Walker->nr]->second;412 Params.DistanceIterators[(*iter)->nr] = Strider; // take next farther distance target 413 //Log() << Verbose(3) << "Setting " << *(*iter) << "'s source to " << *Params.DistanceIterators[(*iter)->nr]->second << "." << endl; 414 Params.PermutationMap[(*iter)->nr] = Params.DistanceIterators[(*iter)->nr]->second; 425 415 } else { 426 Params.DistanceIterators[ Runner->nr] = Rider; // if successful also move the pointer in the iterator list416 Params.DistanceIterators[(*runner)->nr] = Rider; // if successful also move the pointer in the iterator list 427 417 Log() << Verbose(3) << "Found a better permutation, new potential is " << Potential << " vs." << OldPotential << "." << endl; 428 418 OldPotential = Potential; … … 434 424 //Log() << Verbose(0) << endl; 435 425 } else { 436 eLog() << Verbose(1) << * Runner<< " was not the owner of " << *Sprinter << "!" << endl;426 eLog() << Verbose(1) << *(*runner) << " was not the owner of " << *Sprinter << "!" << endl; 437 427 exit(255); 438 428 } 439 429 } else { 440 Params.PermutationMap[ Walker->nr] = Params.DistanceIterators[Walker->nr]->second; // new target has no source!430 Params.PermutationMap[(*iter)->nr] = Params.DistanceIterators[(*iter)->nr]->second; // new target has no source! 441 431 } 442 Params.StepList[ Walker->nr]++; // take next farther distance target432 Params.StepList[(*iter)->nr]++; // take next farther distance target 443 433 } 444 } while ( Walker->next != end);434 } while (++iter != end()); 445 435 } while ((OlderPotential - OldPotential) > 1e-3); 446 436 Log() << Verbose(1) << "done." << endl; … … 489 479 // Get the Permutation Map by MinimiseConstrainedPotential 490 480 atom **PermutationMap = NULL; 491 atom * Walker = NULL, *Sprinter = NULL;481 atom *Sprinter = NULL; 492 482 if (!MapByIdentity) 493 483 MinimiseConstrainedPotential(PermutationMap, startstep, endstep, configuration.GetIsAngstroem()); … … 508 498 mol = World::get()->createMolecule(); 509 499 MoleculePerStep->insert(mol); 510 Walker = start; 511 while (Walker->next != end) { 512 Walker = Walker->next; 500 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 513 501 // add to molecule list 514 Sprinter = mol->AddCopyAtom( Walker);502 Sprinter = mol->AddCopyAtom((*iter)); 515 503 for (int n=NDIM;n--;) { 516 Sprinter->x.x[n] = Walker->Trajectory.R.at(startstep).x[n] + (PermutationMap[Walker->nr]->Trajectory.R.at(endstep).x[n] - Walker->Trajectory.R.at(startstep).x[n])*((double)step/(double)MaxSteps);504 Sprinter->x.x[n] = (*iter)->Trajectory.R.at(startstep).x[n] + (PermutationMap[(*iter)->nr]->Trajectory.R.at(endstep).x[n] - (*iter)->Trajectory.R.at(startstep).x[n])*((double)step/(double)MaxSteps); 517 505 // add to Trajectories 518 506 //Log() << Verbose(3) << step << ">=" << MDSteps-1 << endl; 519 507 if (step < MaxSteps) { 520 Walker->Trajectory.R.at(step).x[n] = Walker->Trajectory.R.at(startstep).x[n] + (PermutationMap[Walker->nr]->Trajectory.R.at(endstep).x[n] - Walker->Trajectory.R.at(startstep).x[n])*((double)step/(double)MaxSteps);521 Walker->Trajectory.U.at(step).x[n] = 0.;522 Walker->Trajectory.F.at(step).x[n] = 0.;508 (*iter)->Trajectory.R.at(step).x[n] = (*iter)->Trajectory.R.at(startstep).x[n] + (PermutationMap[(*iter)->nr]->Trajectory.R.at(endstep).x[n] - (*iter)->Trajectory.R.at(startstep).x[n])*((double)step/(double)MaxSteps); 509 (*iter)->Trajectory.U.at(step).x[n] = 0.; 510 (*iter)->Trajectory.F.at(step).x[n] = 0.; 523 511 } 524 512 }
Note:
See TracChangeset
for help on using the changeset viewer.
