Changeset 4e10f5 for src/boundary.cpp
- Timestamp:
- Jul 7, 2010, 4:08:32 PM (15 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:
- 77a570
- Parents:
- 5630bd (diff), 192f6e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/boundary.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r5630bd r4e10f5 301 301 * \param *out output stream for debugging 302 302 * \param *mol molecule structure with Atom's and Bond's. 303 * \param *BoundaryPts set of boundary points to use or NULL 303 304 * \param *TesselStruct Tesselation filled with points, lines and triangles on boundary on return 304 305 * \param *LCList atoms in LinkedCell list … … 306 307 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename. 307 308 */ 308 void FindConvexBorder(const molecule* mol, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename)309 void FindConvexBorder(const molecule* mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename) 309 310 { 310 311 Info FunctionInfo(__func__); … … 317 318 318 319 // 1. Find all points on the boundary 319 if (BoundaryP oints == NULL) {320 BoundaryFreeFlag = true;321 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct);320 if (BoundaryPts == NULL) { 321 BoundaryFreeFlag = true; 322 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct); 322 323 } else { 323 DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl); 324 BoundaryPoints = BoundaryPts; 325 DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl); 324 326 } 325 327 326 328 // printing all inserted for debugging 327 for (int axis=0; axis < NDIM; axis++) 328 { 329 DoLog(1) && (Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl); 330 int i=0; 331 for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 332 if (runner != BoundaryPoints[axis].begin()) 333 DoLog(0) && (Log() << Verbose(0) << ", " << i << ": " << *runner->second.second); 334 else 335 DoLog(0) && (Log() << Verbose(0) << i << ": " << *runner->second.second); 336 i++; 337 } 338 DoLog(0) && (Log() << Verbose(0) << endl); 339 } 329 for (int axis=0; axis < NDIM; axis++) { 330 DoLog(1) && (Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl); 331 int i=0; 332 for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 333 if (runner != BoundaryPoints[axis].begin()) 334 DoLog(0) && (Log() << Verbose(0) << ", " << i << ": " << *runner->second.second); 335 else 336 DoLog(0) && (Log() << Verbose(0) << i << ": " << *runner->second.second); 337 i++; 338 } 339 DoLog(0) && (Log() << Verbose(0) << endl); 340 } 340 341 341 342 // 2. fill the boundary point list … … 343 344 for (Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) 344 345 if (!TesselStruct->AddBoundaryPoint(runner->second.second, 0)) 345 Do eLog(2) && (eLog()<< Verbose(2) << "Point " << *(runner->second.second) << " is already present!" << endl);346 DoLog(2) && (Log()<< Verbose(2) << "Point " << *(runner->second.second) << " is already present." << endl); 346 347 347 348 DoLog(0) && (Log() << Verbose(0) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl); … … 677 678 678 679 IsAngstroem = configuration->GetIsAngstroem(); 680 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct); 679 681 GreatestDiameter = GetDiametersOfCluster(BoundaryPoints, mol, TesselStruct, IsAngstroem); 680 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct);681 682 LinkedCell *LCList = new LinkedCell(mol, 10.); 682 FindConvexBorder(mol, TesselStruct, (const LinkedCell *&)LCList, NULL);683 FindConvexBorder(mol, BoundaryPoints, TesselStruct, (const LinkedCell *&)LCList, NULL); 683 684 delete (LCList); 685 delete[] BoundaryPoints; 684 686 685 687 … … 689 691 else 690 692 clustervolume = ClusterVolume; 693 694 delete TesselStruct; 691 695 692 696 for (int i = 0; i < NDIM; i++) … … 741 745 mol->CenterInBox(); 742 746 } 747 delete GreatestDiameter; 743 748 // update Box of atoms by boundary 744 749 mol->SetBoxDimension(&BoxLengths); … … 895 900 } 896 901 } 902 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 903 delete LCList[*ListRunner]; 904 delete TesselStruct[(*ListRunner)]; 905 } 897 906 898 907 return Filling;
Note:
See TracChangeset
for help on using the changeset viewer.
