Changeset a251a3
- Timestamp:
- May 26, 2008, 10:52:00 AM (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:
- 9a1b84
- Parents:
- 040f93
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
r040f93 ra251a3 931 931 cout << Verbose(0) << "Creating connection matrix..." << endl; 932 932 start = clock(); 933 mol->CreateAdjacencyList((ofstream *)&cout, atof(argv[argptr++]) );933 mol->CreateAdjacencyList((ofstream *)&cout, atof(argv[argptr++]), configuration.GetIsAngstroem()); 934 934 cout << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl; 935 935 if (mol->first->next != mol->last) { … … 1116 1116 } 1117 1117 if (mol->first->next != mol->last) // if connect matrix is present already, redo it 1118 mol->CreateAdjacencyList((ofstream *)&cout, mol->BondDistance );1118 mol->CreateAdjacencyList((ofstream *)&cout, mol->BondDistance, configuration.GetIsAngstroem()); 1119 1119 // free memory 1120 1120 delete[](Elements); … … 1159 1159 cin >> tmp1; 1160 1160 start = clock(); 1161 mol->CreateAdjacencyList((ofstream *)&cout, tmp1 );1161 mol->CreateAdjacencyList((ofstream *)&cout, tmp1, configuration.GetIsAngstroem()); 1162 1162 //mol->CreateListOfBondsPerAtom((ofstream *)&cout); 1163 1163 Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, false, MinimumRingSize); -
src/molecules.cpp
r040f93 ra251a3 1318 1318 * \param *out out stream for printing the matrix, NULL if no output 1319 1319 * \param bonddistance length of linked cells (i.e. maximum minimal length checked) 1320 */ 1321 void molecule::CreateAdjacencyList(ofstream *out, double bonddistance) 1320 * \param IsAngstroem whether coordinate system is gauged to Angstroem or Bohr radii 1321 */ 1322 void molecule::CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem) 1322 1323 { 1323 1324 atom *Walker = NULL, *OtherWalker = NULL; … … 1329 1330 vector x; 1330 1331 1331 BondDistance = bonddistance; 1332 BondDistance = bonddistance; // * ((IsAngstroem) ? 1. : 1./AtomicLengthToAngstroem); 1332 1333 *out << Verbose(0) << "Begin of CreateAdjacencyList." << endl; 1333 1334 // remove every bond from the list … … 1407 1408 /// \todo periodic check is missing here! 1408 1409 //*out << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistance(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl; 1409 MinDistance = OtherWalker->type->CovalentRadius + Walker->type->CovalentRadius; 1410 MinDistance = OtherWalker->type->CovalentRadius + Walker->type->CovalentRadius; 1411 MinDistance *= (IsAngstroem) ? 1. : 1./AtomicLengthToAngstroem; 1410 1412 MaxDistance = MinDistance + BONDTHRESHOLD; 1411 1413 MinDistance -= BONDTHRESHOLD; … … 1414 1416 *out << Verbose(0) << "Adding Bond between " << *Walker << " and " << *OtherWalker << "." << endl; 1415 1417 AddBond(Walker->father, OtherWalker->father, 1); // also increases molecule::BondCount 1418 BondCount++; 1416 1419 } else { 1417 1420 //*out << Verbose(1) << "Not Adding: Wrong label order or distance too great." << endl; … … 1428 1431 delete(CellList[i]); 1429 1432 } 1430 Free((void **)&CellList, "molecule::CreateAdjacencyList - ** CellList"); 1431 1433 Free((void **)&CellList, "molecule::CreateAdjacencyList - ** CellList"); 1434 1432 1435 // create the adjacency list per atom 1433 1436 CreateListOfBondsPerAtom(out); -
src/molecules.hpp
r040f93 ra251a3 279 279 280 280 /// Initialising routines in fragmentation 281 void CreateAdjacencyList(ofstream *out, double bonddistance );281 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem); 282 282 void CreateListOfBondsPerAtom(ofstream *out); 283 283
Note:
See TracChangeset
for help on using the changeset viewer.