Changeset c67e16
- Timestamp:
- Apr 28, 2008, 1:46:05 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:
- 555063
- Parents:
- 140e34
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/moleculelist.cpp
r140e34 rc67e16 418 418 if (Walker->type->Z == runner->Z) { 419 419 if ((Walker->GetTrueFather() != NULL) && (Walker->GetTrueFather() != Walker)) {// if there is a real father, prints its index 420 cerr<< "Walker is " << *Walker << " with true father " << *( Walker->GetTrueFather()) << ", its number " << Walker->GetTrueFather()->nr << " and index " << SortIndex[Walker->GetTrueFather()->nr] << "." << endl;420 //cout << "Walker is " << *Walker << " with true father " << *( Walker->GetTrueFather()) << ", its number " << Walker->GetTrueFather()->nr << " and index " << SortIndex[Walker->GetTrueFather()->nr] << "." << endl; 421 421 output << SortIndex[Walker->GetTrueFather()->nr] << "\t"; 422 422 } else // otherwise a -1 to indicate an added saturation hydrogen -
src/molecules.cpp
r140e34 rc67e16 186 186 double *matrix; 187 187 188 *out << Verbose(3) << "Begin of AddHydrogenReplacementAtom." << endl;188 // *out << Verbose(3) << "Begin of AddHydrogenReplacementAtom." << endl; 189 189 // create vector in direction of bond 190 190 InBondVector.CopyVector(&TopReplacement->x); … … 196 196 // due to TopReplacement or Origin being on the wrong side! 197 197 if (bondlength > BondDistance) { 198 *out << Verbose(4) << "InBondVector is: ";199 InBondVector.Output(out);200 *out << endl;198 // *out << Verbose(4) << "InBondVector is: "; 199 // InBondVector.Output(out); 200 // *out << endl; 201 201 OrthoVector1.Zero(); 202 202 for (int i=0;i<NDIM;i++) { … … 211 211 Free((void **)&matrix, "molecule::AddHydrogenReplacementAtom: *matrix"); 212 212 bondlength = InBondVector.Norm(); 213 *out << Verbose(4) << "Corrected InBondVector is now: ";214 InBondVector.Output(out);215 *out << endl;213 // *out << Verbose(4) << "Corrected InBondVector is now: "; 214 // InBondVector.Output(out); 215 // *out << endl; 216 216 } // periodic correction finished 217 217 … … 244 244 FirstOtherAtom->x.AddVector(&InBondVector); // ... and add distance vector to replacement atom 245 245 AllWentWell = AllWentWell && AddAtom(FirstOtherAtom); 246 *out << Verbose(4) << "Added " << *FirstOtherAtom << " at: ";247 FirstOtherAtom->x.Output(out);248 *out << endl;246 // *out << Verbose(4) << "Added " << *FirstOtherAtom << " at: "; 247 // FirstOtherAtom->x.Output(out); 248 // *out << endl; 249 249 Binder = AddBond(BottomOrigin, FirstOtherAtom, 1); 250 250 Binder->Cyclic = false; … … 271 271 } 272 272 if (FirstOtherAtom != NULL) { // then we just have this double bond and the plane does not matter at all 273 *out << Verbose(3) << "Regarding the double bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") to be constructed: Taking " << FirstOtherAtom->Name << " and " << SecondOtherAtom->Name << " along with " << TopOrigin->Name << " to determine orthogonal plane." << endl;273 // *out << Verbose(3) << "Regarding the double bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") to be constructed: Taking " << FirstOtherAtom->Name << " and " << SecondOtherAtom->Name << " along with " << TopOrigin->Name << " to determine orthogonal plane." << endl; 274 274 275 275 // determine the plane of these two with the *origin … … 309 309 // OrthoVector1.Output(out); 310 310 // *out << endl; 311 *out << Verbose(3) << "Half the bond angle is " << bondangle << ", sin and cos of it: " << sin(bondangle) << ", " << cos(bondangle) << endl;311 // *out << Verbose(3) << "Half the bond angle is " << bondangle << ", sin and cos of it: " << sin(bondangle) << ", " << cos(bondangle) << endl; 312 312 FirstOtherAtom->x.Zero(); 313 313 SecondOtherAtom->x.Zero(); … … 326 326 AllWentWell = AllWentWell && AddAtom(FirstOtherAtom); 327 327 AllWentWell = AllWentWell && AddAtom(SecondOtherAtom); 328 *out << Verbose(4) << "Added " << *FirstOtherAtom << " at: ";329 FirstOtherAtom->x.Output(out);330 *out << endl;331 *out << Verbose(4) << "Added " << *SecondOtherAtom << " at: ";332 SecondOtherAtom->x.Output(out);333 *out << endl;328 // *out << Verbose(4) << "Added " << *FirstOtherAtom << " at: "; 329 // FirstOtherAtom->x.Output(out); 330 // *out << endl; 331 // *out << Verbose(4) << "Added " << *SecondOtherAtom << " at: "; 332 // SecondOtherAtom->x.Output(out); 333 // *out << endl; 334 334 Binder = AddBond(BottomOrigin, FirstOtherAtom, 1); 335 335 Binder->Cyclic = false; … … 359 359 // we need to vectors orthonormal the InBondVector 360 360 AllWentWell = AllWentWell && OrthoVector1.GetOneNormalVector(&InBondVector); 361 *out << Verbose(3) << "Orthovector1: ";362 OrthoVector1.Output(out);363 *out << endl;361 // *out << Verbose(3) << "Orthovector1: "; 362 // OrthoVector1.Output(out); 363 // *out << endl; 364 364 AllWentWell = AllWentWell && OrthoVector2.MakeNormalVector(&InBondVector, &OrthoVector1); 365 *out << Verbose(3) << "Orthovector2: ";366 OrthoVector2.Output(out);367 *out << endl;365 // *out << Verbose(3) << "Orthovector2: "; 366 // OrthoVector2.Output(out); 367 // *out << endl; 368 368 369 369 // create correct coordination for the three atoms … … 374 374 f = b/sqrt(3.); // length for OrthVector1 375 375 g = b/2.; // length for OrthVector2 376 *out << Verbose(3) << "Bond length and half-angle: " << l << ", " << alpha << "\t (b,d,f,g) = " << b << ", " << d << ", " << f << ", " << g << ", " << endl;377 *out << Verbose(3) << "The three Bond lengths: " << sqrt(d*d+f*f) << ", " << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << ", " << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << endl;376 // *out << Verbose(3) << "Bond length and half-angle: " << l << ", " << alpha << "\t (b,d,f,g) = " << b << ", " << d << ", " << f << ", " << g << ", " << endl; 377 // *out << Verbose(3) << "The three Bond lengths: " << sqrt(d*d+f*f) << ", " << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << ", " << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << endl; 378 378 factors[0] = d; 379 379 factors[1] = f; … … 400 400 AllWentWell = AllWentWell && AddAtom(SecondOtherAtom); 401 401 AllWentWell = AllWentWell && AddAtom(ThirdOtherAtom); 402 *out << Verbose(4) << "Added " << *FirstOtherAtom << " at: ";403 FirstOtherAtom->x.Output(out);404 *out << endl;405 *out << Verbose(4) << "Added " << *SecondOtherAtom << " at: ";406 SecondOtherAtom->x.Output(out);407 *out << endl;408 *out << Verbose(4) << "Added " << *ThirdOtherAtom << " at: ";409 ThirdOtherAtom->x.Output(out);410 *out << endl;402 // *out << Verbose(4) << "Added " << *FirstOtherAtom << " at: "; 403 // FirstOtherAtom->x.Output(out); 404 // *out << endl; 405 // *out << Verbose(4) << "Added " << *SecondOtherAtom << " at: "; 406 // SecondOtherAtom->x.Output(out); 407 // *out << endl; 408 // *out << Verbose(4) << "Added " << *ThirdOtherAtom << " at: "; 409 // ThirdOtherAtom->x.Output(out); 410 // *out << endl; 411 411 Binder = AddBond(BottomOrigin, FirstOtherAtom, 1); 412 412 Binder->Cyclic = false; … … 425 425 } 426 426 427 *out << Verbose(3) << "End of AddHydrogenReplacementAtom." << endl;427 // *out << Verbose(3) << "End of AddHydrogenReplacementAtom." << endl; 428 428 return AllWentWell; 429 429 }; … … 606 606 vector *min = new vector; 607 607 608 *out << Verbose(3) << "Begin of CenterEdge." << endl;608 // *out << Verbose(3) << "Begin of CenterEdge." << endl; 609 609 atom *ptr = start->next; // start at first in list 610 610 if (ptr != end) { //list not empty? … … 621 621 } 622 622 } 623 *out << Verbose(4) << "Maximum is ";624 max->Output(out);625 *out << ", Minimum is ";626 min->Output(out);627 *out << endl;623 // *out << Verbose(4) << "Maximum is "; 624 // max->Output(out); 625 // *out << ", Minimum is "; 626 // min->Output(out); 627 // *out << endl; 628 628 629 629 for (int i=0;i<NDIM;i++) { … … 634 634 } 635 635 delete(min); 636 *out << Verbose(3) << "End of CenterEdge." << endl;636 // *out << Verbose(3) << "End of CenterEdge." << endl; 637 637 }; 638 638 … … 1867 1867 line >> AtomNr; 1868 1868 if ((AtomNr >= 0) && (AtomNr < AtomCount)) { 1869 CurrentSet.insert(AtomNr); 1869 CurrentSet.insert(AtomNr); // insert at end, hence in same order as in file! 1870 1870 status++; 1871 1871 } // else it's "-1" or else and thus must not be added … … 2790 2790 molecule *Leaf = new molecule(elemente); 2791 2791 2792 *out << Verbose(1) << "Begin of StoreFragmentFromKeyset." << endl;2792 // *out << Verbose(1) << "Begin of StoreFragmentFromKeyset." << endl; 2793 2793 2794 2794 Leaf->BondDistance = BondDistance; … … 2802 2802 // first create the minimal set of atoms from the KeySet 2803 2803 for(KeySet::iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) { 2804 FatherOfRunner = FindAtom((*runner)); 2804 FatherOfRunner = FindAtom((*runner)); // find the id 2805 2805 SonList[FatherOfRunner->nr] = Leaf->AddCopyAtom(FatherOfRunner); 2806 2806 } 2807 2807 2808 2808 // create the bonds between all: Make it an induced subgraph and add hydrogen 2809 *out << Verbose(2) << "Creating bonds from father graph (i.e. induced subgraph creation)." << endl;2809 // *out << Verbose(2) << "Creating bonds from father graph (i.e. induced subgraph creation)." << endl; 2810 2810 Runner = Leaf->start; 2811 2811 while (Runner->next != Leaf->end) { … … 2816 2816 for (int i=0;i<NumberOfBondsPerAtom[FatherOfRunner->nr];i++) { // go through every bond of father 2817 2817 OtherFather = ListOfBondsPerAtom[FatherOfRunner->nr][i]->GetOtherAtom(FatherOfRunner); 2818 *out << Verbose(2) << "Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->nr] << " is bound to " << *OtherFather;2818 // *out << Verbose(2) << "Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->nr] << " is bound to " << *OtherFather; 2819 2819 if (SonList[OtherFather->nr] != NULL) { 2820 *out << ", whose son is " << *SonList[OtherFather->nr] << "." << endl;2820 // *out << ", whose son is " << *SonList[OtherFather->nr] << "." << endl; 2821 2821 if (OtherFather->nr > FatherOfRunner->nr) { // add bond (nr check is for adding only one of both variants: ab, ba) 2822 *out << Verbose(3) << "Adding Bond: " << Leaf->AddBond(Runner, SonList[OtherFather->nr], ListOfBondsPerAtom[FatherOfRunner->nr][i]->BondDegree) << "." << endl;2822 // *out << Verbose(3) << "Adding Bond: " << Leaf->AddBond(Runner, SonList[OtherFather->nr], ListOfBondsPerAtom[FatherOfRunner->nr][i]->BondDegree) << "." << endl; 2823 2823 //NumBonds[Runner->nr]++; 2824 2824 } else { 2825 *out << Verbose(3) << "Not adding bond, labels in wrong order." << endl;2825 // *out << Verbose(3) << "Not adding bond, labels in wrong order." << endl; 2826 2826 } 2827 2827 } else { 2828 *out << ", who has no son in this fragment molecule." << endl;2828 // *out << ", who has no son in this fragment molecule." << endl; 2829 2829 #ifdef ADDHYDROGEN 2830 *out << Verbose(3) << "Adding Hydrogen to " << Runner->Name << " and a bond in between." << endl;2830 // *out << Verbose(3) << "Adding Hydrogen to " << Runner->Name << " and a bond in between." << endl; 2831 2831 Leaf->AddHydrogenReplacementAtom(out, ListOfBondsPerAtom[FatherOfRunner->nr][i], Runner, FatherOfRunner, OtherFather, ListOfBondsPerAtom[FatherOfRunner->nr],NumberOfBondsPerAtom[FatherOfRunner->nr], IsAngstroem); 2832 2832 #endif … … 2845 2845 //Leaflet->Leaf->ScanForPeriodicCorrection(out); 2846 2846 Free((void **)&SonList, "molecule::StoreFragmentFromStack: **SonList"); 2847 *out << Verbose(1) << "End of StoreFragmentFromKeyset." << endl;2847 // *out << Verbose(1) << "End of StoreFragmentFromKeyset." << endl; 2848 2848 return Leaf; 2849 2849 }; … … 3508 3508 bool flag = true; 3509 3509 3510 *out << Verbose(1) << "Begin of ScanForPeriodicCorrection." << endl;3510 // *out << Verbose(1) << "Begin of ScanForPeriodicCorrection." << endl; 3511 3511 3512 3512 ColorList = (enum Shading *) Malloc(sizeof(enum Shading)*AtomCount, "molecule::ScanForPeriodicCorrection: *ColorList"); … … 3526 3526 OtherBinder = Binder->next; // note down binding partner for later re-insertion 3527 3527 unlink(Binder); // unlink bond 3528 *out << Verbose(2) << "Correcting at bond " << *Binder << "." << endl;3528 // *out << Verbose(2) << "Correcting at bond " << *Binder << "." << endl; 3529 3529 flag = true; 3530 3530 break; … … 3564 3564 link(Binder, OtherBinder); 3565 3565 } else { 3566 *out << Verbose(2) << "No corrections for this fragment." << endl;3566 // *out << Verbose(2) << "No corrections for this fragment." << endl; 3567 3567 } 3568 3568 //delete(CompStack); … … 3573 3573 Free((void **)&ColorList, "molecule::ScanForPeriodicCorrection: *ColorList"); 3574 3574 Free((void **)&matrix, "molecule::ScanForPeriodicCorrection: *matrix"); 3575 *out << Verbose(1) << "End of ScanForPeriodicCorrection." << endl;3575 // *out << Verbose(1) << "End of ScanForPeriodicCorrection." << endl; 3576 3576 }; 3577 3577
Note:
See TracChangeset
for help on using the changeset viewer.