Changeset 776b64 for src/builder.cpp
- Timestamp:
- Oct 27, 2009, 4:11:22 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, 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:
- fb73b8
- Parents:
- ad37ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
rad37ab r776b64 254 254 } while ((j != -1) && (i<128)); 255 255 if (i >= 2) { 256 first->x.LSQdistance( atoms, i);256 first->x.LSQdistance((const Vector **)atoms, i); 257 257 258 258 first->x.Output((ofstream *)&cout); … … 592 592 { 593 593 cout << Verbose(0) << "Evaluating volume of the convex envelope."; 594 LinkedCell LCList(mol, 10.);595 594 class Tesselation *TesselStruct = NULL; 596 FindConvexBorder((ofstream *)&cout, mol, &LCList, NULL); 595 const LinkedCell *LCList = NULL; 596 LCList = new LinkedCell(mol, 10.); 597 FindConvexBorder((ofstream *)&cout, mol, TesselStruct, LCList, NULL); 597 598 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, TesselStruct, configuration); 598 cout << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl; 599 cout << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl;\ 600 delete(LCList); 599 601 delete(TesselStruct); 600 602 } … … 720 722 cin >> factor[2]; 721 723 valid = true; 722 mol->Scale( &factor);724 mol->Scale((const double ** const)&factor); 723 725 delete[](factor); 724 726 } … … 1588 1590 // get the boundary 1589 1591 class molecule *Boundary = new molecule(periode); 1592 class Tesselation *TesselStruct = NULL; 1590 1593 struct ConfigFileBuffer *FileBuffer = NULL; 1591 1594 PrepareFileBuffer(argv[argptr], FileBuffer); 1592 1595 LoadMolecule(Boundary, FileBuffer, periode, false); 1593 LinkedCell LCList(Boundary, 2.*radius); 1596 const LinkedCell *LCList = NULL; 1597 LCList = new LinkedCell(Boundary, 2.*radius); 1594 1598 element *oxygen = periode->FindElement(8); 1595 FindNonConvexBorder((ofstream *)&cout, Boundary, &LCList, radius, NULL); 1596 1597 CorrelationToSurfaceMap *surfacemap = CorrelationToSurface( (ofstream *)&cout, mol, oxygen, Boundary->TesselStruct, &LCList ); 1599 FindNonConvexBorder((ofstream *)&cout, Boundary, TesselStruct, LCList, radius, NULL); 1600 CorrelationToSurfaceMap *surfacemap = CorrelationToSurface( (ofstream *)&cout, mol, oxygen, TesselStruct, LCList ); 1598 1601 BinPairMap *binmap = BinData( (ofstream *)&cout, surfacemap, 0.5, 0., 0. ); 1599 1602 OutputCorrelation ( &binoutput, binmap ); 1600 1603 output.close(); 1601 1604 binoutput.close(); 1605 delete(LCList); 1602 1606 delete(FileBuffer); 1607 delete(TesselStruct); 1603 1608 delete(Boundary); 1604 1609 argptr+=3; … … 1675 1680 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl; 1676 1681 } else { 1677 class Tesselation T; 1682 class Tesselation *T = NULL; 1683 const LinkedCell *LCList = NULL; 1678 1684 string filename(argv[argptr+1]); 1679 1685 filename.append(".csv"); … … 1681 1687 cout << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl; 1682 1688 start = clock(); 1683 L inkedCell LCList(mol, atof(argv[argptr])*2.);1684 FindNonConvexBorder((ofstream *)&cout, mol, &LCList, atof(argv[argptr]), argv[argptr+1]);1685 //FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str());1689 LCList = new LinkedCell(mol, atof(argv[argptr])*2.); 1690 FindNonConvexBorder((ofstream *)&cout, mol, T, LCList, atof(argv[argptr]), argv[argptr+1]); 1691 //FindDistributionOfEllipsoids((ofstream *)&cout, T, &LCList, N, number, filename.c_str()); 1686 1692 end = clock(); 1687 1693 cout << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl; 1694 delete(LCList); 1688 1695 argptr+=2; 1689 1696 } … … 1806 1813 factor[1] = atof(argv[argptr+1]); 1807 1814 factor[2] = atof(argv[argptr+2]); 1808 mol->Scale( &factor);1815 mol->Scale((const double ** const)&factor); 1809 1816 for (int i=0;i<NDIM;i++) { 1810 1817 j += i+1; … … 1935 1942 cerr << "Not enough or invalid arguments given for convex envelope: -o <convex output file> <non-convex output file>" << endl; 1936 1943 } else { 1944 class Tesselation *TesselStruct = NULL; 1945 const LinkedCell *LCList = NULL; 1937 1946 cout << Verbose(0) << "Evaluating volume of the convex envelope."; 1938 1947 cout << Verbose(1) << "Storing tecplot convex data in " << argv[argptr] << "." << endl; 1939 1948 cout << Verbose(1) << "Storing tecplot non-convex data in " << argv[argptr+1] << "." << endl; 1940 L inkedCell LCList(mol, 10.);1941 //FindConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr]);1942 FindNonConvexBorder((ofstream *)&cout, mol, &LCList, 5., argv[argptr+1]);1943 // RemoveAllBoundaryPoints((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]);1944 double volumedifference = ConvexizeNonconvexEnvelope((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]);1945 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, mol->TesselStruct, &configuration);1949 LCList = new LinkedCell(mol, 10.); 1950 //FindConvexBorder((ofstream *)&cout, mol, LCList, argv[argptr]); 1951 FindNonConvexBorder((ofstream *)&cout, mol, TesselStruct, LCList, 5., argv[argptr+1]); 1952 // RemoveAllBoundaryPoints((ofstream *)&cout, TesselStruct, mol, argv[argptr]); 1953 double volumedifference = ConvexizeNonconvexEnvelope((ofstream *)&cout, TesselStruct, mol, argv[argptr]); 1954 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, TesselStruct, &configuration); 1946 1955 cout << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl; 1947 1956 cout << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl; 1957 delete(TesselStruct); 1958 delete(LCList); 1948 1959 argptr+=2; 1949 1960 }
Note:
See TracChangeset
for help on using the changeset viewer.