Changeset d74077 for src/moleculelist.cpp
- Timestamp:
- Jul 31, 2010, 3:23:10 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:
- 8f4df1
- Parents:
- 5fbaeb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/moleculelist.cpp
r5fbaeb rd74077 182 182 size=0.; 183 183 for (molecule::const_iterator iter = (*ListRunner)->begin(); iter != (*ListRunner)->end(); ++iter) { 184 counts[(*iter)-> type->getNumber()]++;185 if ((*iter)-> x.DistanceSquared(Origin) > size)186 size = (*iter)-> x.DistanceSquared(Origin);184 counts[(*iter)->getType()->getNumber()]++; 185 if ((*iter)->DistanceSquared(Origin) > size) 186 size = (*iter)->DistanceSquared(Origin); 187 187 } 188 188 // output Index, Name, number of atoms, chemical formula … … 354 354 for (molecule::const_iterator iter = srcmol->begin(); iter != srcmol->end(); ++iter) { 355 355 DoLog(2) && (Log() << Verbose(2) << "INFO: Current Walker is " << **iter << "." << endl); 356 if (!TesselStruct->IsInnerPoint((*iter)-> x, LCList)) {356 if (!TesselStruct->IsInnerPoint((*iter)->getPosition(), LCList)) { 357 357 CopyAtoms[(*iter)->nr] = (*iter)->clone(); 358 358 mol->AddAtom(CopyAtoms[(*iter)->nr]); … … 501 501 for (molecule::const_iterator iter = (*ListRunner)->begin(); iter != (*ListRunner)->end(); ++iter) { 502 502 //Log() << Verbose(1) << "(*iter): " << *(*iter) << " with first bond " << *((*iter)->ListOfBonds.begin()) << "." << endl; 503 if (((*iter)-> type->Z == 1) && (((*iter)->father == NULL)504 || ((*iter)->father-> type->Z != 1))) { // if it's a hydrogen503 if (((*iter)->getType()->Z == 1) && (((*iter)->father == NULL) 504 || ((*iter)->father->getType()->Z != 1))) { // if it's a hydrogen 505 505 for (molecule::const_iterator runner = (*ListRunner)->begin(); runner != (*ListRunner)->end(); ++runner) { 506 506 //Log() << Verbose(2) << "Runner: " << *(*runner) << " with first bond " << *((*iter)->ListOfBonds.begin()) << "." << endl; 507 507 // 3. take every other hydrogen that is the not the first and not bound to same bonding partner 508 508 Binder = *((*runner)->ListOfBonds.begin()); 509 if (((*runner)-> type->Z == 1) && ((*runner)->nr > (*iter)->nr) && (Binder->GetOtherAtom((*runner)) != Binder->GetOtherAtom((*iter)))) { // (hydrogens have only one bonding partner!)509 if (((*runner)->getType()->Z == 1) && ((*runner)->nr > (*iter)->nr) && (Binder->GetOtherAtom((*runner)) != Binder->GetOtherAtom((*iter)))) { // (hydrogens have only one bonding partner!) 510 510 // 4. evaluate the morse potential for each matrix component and add up 511 distance = (*runner)-> x.distance((*iter)->x);511 distance = (*runner)->distance(*(*iter)); 512 512 //Log() << Verbose(0) << "Fragment " << (*ListRunner)->name << ": " << *(*runner) << "<= " << distance << "=>" << *(*iter) << ":" << endl; 513 513 for (int k = 0; k < a; k++) { … … 599 599 if ((*ListRunner)->hasElement((*elemIter).first)) { // if this element got atoms 600 600 for(molecule::iterator atomIter = (*ListRunner)->begin(); atomIter !=(*ListRunner)->end();++atomIter){ 601 if ((*atomIter)-> type->getNumber() == (*elemIter).first) {601 if ((*atomIter)->getType()->getNumber() == (*elemIter).first) { 602 602 if (((*atomIter)->GetTrueFather() != NULL) && ((*atomIter)->GetTrueFather() != (*atomIter))) {// if there is a rea 603 603 //Log() << Verbose(0) << "Walker is " << *Walker << " with true father " << *( Walker->GetTrueFather()) << ", it … … 1089 1089 if (AtomMask[Father->nr]) // apply mask 1090 1090 #ifdef ADDHYDROGEN 1091 if ((*iter)-> type->Z != 1) // skip hydrogen1091 if ((*iter)->getType()->Z != 1) // skip hydrogen 1092 1092 #endif 1093 1093 RootStack[FragmentCounter].push_front((*iter)->nr);
Note:
See TracChangeset
for help on using the changeset viewer.