Changeset df793a for src/builder.cpp
- Timestamp:
- Oct 9, 2008, 6:27:56 PM (17 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:
- ad85c2
- Parents:
- ba4432
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
rba4432 rdf793a 953 953 cout << Verbose(1) << "Depth-First-Search Analysis." << endl; 954 954 MoleculeLeafClass *Subgraphs = NULL; // list of subgraphs from DFS analysis 955 int *MinimumRingSize = NULL; 955 int *MinimumRingSize = new int[mol->AtomCount]; 956 atom ***ListOfLocalAtoms = NULL; 957 int FragmentCounter = 0; 958 class StackClass<bond *> *BackEdgeStack = NULL; 959 class StackClass<bond *> *LocalBackEdgeStack = NULL; 956 960 mol->CreateAdjacencyList((ofstream *)&cout, atof(argv[argptr]), configuration.GetIsAngstroem()); 957 961 mol->CreateListOfBondsPerAtom((ofstream *)&cout); 958 Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, MinimumRingSize); 959 delete[](MinimumRingSize); 962 Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, BackEdgeStack); 960 963 if (Subgraphs != NULL) { 964 Subgraphs->next->FillBondStructureFromReference((ofstream *)&cout, mol, (FragmentCounter = 0), ListOfLocalAtoms, false); // we want to keep the created ListOfLocalAtoms 961 965 while (Subgraphs->next != NULL) { 962 966 Subgraphs = Subgraphs->next; 967 LocalBackEdgeStack = new StackClass<bond *> (Subgraphs->Leaf->BondCount); 968 Subgraphs->Leaf->PickLocalBackEdges((ofstream *)&cout, ListOfLocalAtoms[FragmentCounter++], BackEdgeStack, LocalBackEdgeStack); 969 Subgraphs->Leaf->CyclicStructureAnalysis((ofstream *)&cout, BackEdgeStack, MinimumRingSize); 970 delete(LocalBackEdgeStack); 963 971 delete(Subgraphs->previous); 964 972 } 965 973 delete(Subgraphs); 974 for (int i=0;i<FragmentCounter;i++) 975 Free((void **)&ListOfLocalAtoms[FragmentCounter], "ParseCommandLineOptions: **ListOfLocalAtoms[]"); 976 Free((void **)&ListOfLocalAtoms, "ParseCommandLineOptions: ***ListOfLocalAtoms"); 966 977 } 978 delete(BackEdgeStack); 979 delete[](MinimumRingSize); 967 980 } 968 981 argptr+=1; … … 1255 1268 int Z; 1256 1269 int j, axis, count, faktor; 1257 int *MinimumRingSize = NULL; 1270 clock_t start,end; 1271 // int *MinimumRingSize = NULL; 1258 1272 MoleculeLeafClass *Subgraphs = NULL; 1259 clock_t start,end;1273 // class StackClass<bond *> *BackEdgeStack = NULL; 1260 1274 element **Elements; 1261 1275 Vector **vectors; … … 1423 1437 1424 1438 case 'o': // create the connection matrix 1425 cout << Verbose(0) << "What's the maximum bond distance: "; 1426 cin >> tmp1; 1427 start = clock(); 1428 mol->CreateAdjacencyList((ofstream *)&cout, tmp1, configuration.GetIsAngstroem()); 1429 //mol->CreateListOfBondsPerAtom((ofstream *)&cout); 1430 Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, MinimumRingSize); 1431 while (Subgraphs->next != NULL) { 1432 Subgraphs = Subgraphs->next; 1433 delete(Subgraphs->previous); 1439 { 1440 cout << Verbose(0) << "What's the maximum bond distance: "; 1441 cin >> tmp1; 1442 start = clock(); 1443 mol->CreateAdjacencyList((ofstream *)&cout, tmp1, configuration.GetIsAngstroem()); 1444 mol->CreateListOfBondsPerAtom((ofstream *)&cout); 1445 // Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, BackEdgeStack); 1446 // while (Subgraphs->next != NULL) { 1447 // Subgraphs = Subgraphs->next; 1448 // Subgraphs->Leaf->CyclicStructureAnalysis((ofstream *)&cout, BackEdgeStack, MinimumRingSize); 1449 // delete(Subgraphs->previous); 1450 // } 1451 // delete(Subgraphs); // we don't need the list here, so free everything 1452 // delete[](MinimumRingSize); 1453 // Subgraphs = NULL; 1454 end = clock(); 1455 cout << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl; 1434 1456 } 1435 delete(Subgraphs); // we don't need the list here, so free everything1436 delete[](MinimumRingSize);1437 Subgraphs = NULL;1438 end = clock();1439 cout << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl;1440 1457 break; 1441 1458
Note:
See TracChangeset
for help on using the changeset viewer.