Changeset 260b2f
- Timestamp:
- Jul 7, 2009, 8:11: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:
- 02da9e
- Parents:
- 3d919e
- Location:
- src
- Files:
-
- 2 edited
-
boundary.cpp (modified) (2 diffs)
-
builder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r3d919e r260b2f 2379 2379 if (radius < RADIUS*RADIUS) { 2380 2380 helper.Scale(sqrt(RADIUS*RADIUS - radius)); 2381 cout << Verbose( 3) << "INFO: Distance of NewCircleCenter to NewSphereCenter is " << helper.Norm()<< "." << endl;2381 cout << Verbose(2) << "INFO: Distance of NewCircleCenter to NewSphereCenter is " << helper.Norm() << " with sphere radius " << RADIUS << "." << endl; 2382 2382 NewSphereCenter.AddVector(&helper); 2383 2383 NewSphereCenter.SubtractVector(&CircleCenter); … … 2390 2390 cout << Verbose(2) << "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << "." << endl; 2391 2391 2392 alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection);2392 alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection); 2393 2393 Otheralpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, OtherNewSphereCenter, OldSphereCenter, NormalVector, SearchDirection); 2394 2394 alpha = min(alpha, Otheralpha); 2395 // if there is a better candidate, drop the current list and add the new candidate2396 // otherwise ignore the new candidate and keep the list2397 if (*ShortestAngle > (alpha - HULLEPSILON)) {2398 optCandidate = new CandidateForTesselation(Candidate, BaseLine, OptCandidateCenter, OtherOptCandidateCenter);2399 if (fabs(alpha - Otheralpha) > MYEPSILON) {2400 optCandidate->OptCenter.CopyVector(&NewSphereCenter);2401 optCandidate->OtherOptCenter.CopyVector(&OtherNewSphereCenter);2402 } else {2403 optCandidate->OptCenter.CopyVector(&OtherNewSphereCenter);2404 optCandidate->OtherOptCenter.CopyVector(&NewSphereCenter);2405 }2406 // if there is an equal candidate, add it to the list without clearing the list2407 if ((*ShortestAngle - HULLEPSILON) < alpha) {2408 candidates->push_back(optCandidate);2409 cout << Verbose(1) << "ACCEPT: We have found an equally good candidate: " << *(optCandidate->point) << " with "2410 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl;2411 } else {2412 candidates->clear();2413 candidates->push_back(optCandidate);2414 cout << Verbose(1) << "ACCEPT: We have found a better candidate: " << *(optCandidate->point) << " with "2415 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl;2416 }2417 *ShortestAngle = alpha;2418 cout << Verbose(2) << "INFO: There are " << candidates->size() << " candidates in the list now." << endl;2419 } else {2420 if ((optCandidate != NULL) && (optCandidate->point != NULL))2421 cout << Verbose(1) << "REJECT: Old candidate: " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl;2422 else2423 cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl;2424 }2395 // if there is a better candidate, drop the current list and add the new candidate 2396 // otherwise ignore the new candidate and keep the list 2397 if (*ShortestAngle > (alpha - HULLEPSILON)) { 2398 optCandidate = new CandidateForTesselation(Candidate, BaseLine, OptCandidateCenter, OtherOptCandidateCenter); 2399 if (fabs(alpha - Otheralpha) > MYEPSILON) { 2400 optCandidate->OptCenter.CopyVector(&NewSphereCenter); 2401 optCandidate->OtherOptCenter.CopyVector(&OtherNewSphereCenter); 2402 } else { 2403 optCandidate->OptCenter.CopyVector(&OtherNewSphereCenter); 2404 optCandidate->OtherOptCenter.CopyVector(&NewSphereCenter); 2405 } 2406 // if there is an equal candidate, add it to the list without clearing the list 2407 if ((*ShortestAngle - HULLEPSILON) < alpha) { 2408 candidates->push_back(optCandidate); 2409 cout << Verbose(1) << "ACCEPT: We have found an equally good candidate: " << *(optCandidate->point) << " with " 2410 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2411 } else { 2412 candidates->clear(); 2413 candidates->push_back(optCandidate); 2414 cout << Verbose(1) << "ACCEPT: We have found a better candidate: " << *(optCandidate->point) << " with " 2415 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2416 } 2417 *ShortestAngle = alpha; 2418 cout << Verbose(2) << "INFO: There are " << candidates->size() << " candidates in the list now." << endl; 2419 } else { 2420 if ((optCandidate != NULL) && (optCandidate->point != NULL)) 2421 cout << Verbose(1) << "REJECT: Old candidate: " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl; 2422 else 2423 cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; 2424 } 2425 2425 2426 2426 } else { -
src/builder.cpp
r3d919e r260b2f 1493 1493 LinkedCell LCList(mol, atof(argv[argptr])); // \NOTE not twice the radius?? 1494 1494 Find_non_convex_border((ofstream *)&cout, mol, &T, &LCList, argv[argptr+1], atof(argv[argptr])); 1495 FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str());1495 //FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str()); 1496 1496 argptr+=2; 1497 1497 }
Note:
See TracChangeset
for help on using the changeset viewer.
