Changeset 47d041 for src/molecule_geometry.cpp
- Timestamp:
- Nov 3, 2011, 7:44:01 PM (14 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:
- 41a467
- Parents:
- 50e4e5
- git-author:
- Frederik Heber <heber@…> (10/27/11 11:53:58)
- git-committer:
- Frederik Heber <heber@…> (11/03/11 19:44:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_geometry.cpp
r50e4e5 r47d041 89 89 void molecule::CenterEdge(Vector *max) 90 90 { 91 // Info info(__func__); 91 92 Vector *min = new Vector; 92 93 93 // Log() << Verbose(3) << "Begin of CenterEdge." << endl;94 94 molecule::const_iterator iter = begin(); // start at first in list 95 95 if (iter != end()) { //list not empty? … … 105 105 } 106 106 } 107 // Log() << Verbose(4) << "Maximum is "; 108 // max->Output(out); 109 // Log() << Verbose(0) << ", Minimum is "; 110 // min->Output(out); 111 // Log() << Verbose(0) << endl; 107 LOG(1, "INFO: Maximum is " << *max << ", Minimum is " << *min << "."); 112 108 min->Scale(-1.); 113 109 (*max) += (*min); … … 115 111 } 116 112 delete(min); 117 // Log() << Verbose(3) << "End of CenterEdge." << endl;118 113 }; 119 114 … … 192 187 a->Scale(1./Num); // divide through total mass 193 188 } 194 // Log() << Verbose(1) << "Resulting center of gravity: "; 195 // a->Output(out); 196 // Log() << Verbose(0) << endl; 189 LOG(1, "INFO: Resulting center of gravity: " << *a << "."); 197 190 return a; 198 191 }; … … 253 246 } 254 247 // print InertiaTensor 255 DoLog(0) && (Log() << Verbose(0) << "The inertia tensor of molecule " 256 << getName() << " is:" 257 << InertiaTensor << endl); 248 LOG(1, "INFO: The inertia tensor of molecule " << getName() << " is:" << InertiaTensor); 258 249 259 250 delete CenterOfGravity; … … 275 266 276 267 for(int i=0;i<NDIM;i++) 277 DoLog(0) && (Log() << Verbose(0) << "eigenvalue = " << Eigenvalues[i] << ", eigenvector = " << InertiaTensor.column(i) << endl);278 279 DoLog(0) && (Log() << Verbose(0) << "Transforming to PAS ... ");268 LOG(0, "eigenvalue = " << Eigenvalues[i] << ", eigenvector = " << InertiaTensor.column(i)); 269 270 LOG(0, "STATUS: Transforming to PAS ... "); 280 271 281 272 // obtain first column, eigenvector to biggest eigenvalue … … 290 281 const double alpha = BiggestEigenvector.Angle(Axis); 291 282 292 DoLog(0) && (Log() << Verbose(0) << "Rotation angle is " << alpha << endl);283 LOG(1, "INFO: Rotation angle is " << alpha); 293 284 294 285 // and rotate … … 298 289 *(*iter) += *CenterOfGravity; 299 290 } 300 DoLog(0) && (Log() << Verbose(0) << "done." << endl);291 LOG(0, "STATUS: done."); 301 292 302 293 delete CenterOfGravity; … … 393 384 if (fabs(tmp) > MinMaxBondDistance.last) { // check against Min is not useful for components 394 385 flag = false; 395 DoLog(0) && (Log() << Verbose(0) << "Hit: atom " << (*iter)->getName() << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "." << endl);386 LOG(0, "Hit: atom " << (*iter)->getName() << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "."); 396 387 if (tmp > 0) 397 388 Translationvector[j] -= 1.; … … 404 395 Testvector *= matrix; 405 396 Center += Testvector; 406 L og() << Verbose(1) << "vector is: " << Testvector << endl;397 LOG(1, "vector is: " << Testvector); 407 398 if (saturation == DoSaturate) { 408 399 // now also change all hydrogens … … 415 406 Testvector *= matrix; 416 407 Center += Testvector; 417 L og() << Verbose(1) << "Hydrogen vector is: " << Testvector << endl;408 LOG(1, "Hydrogen vector is: " << Testvector); 418 409 } 419 410 } … … 439 430 440 431 // rotate on z-x plane 441 DoLog(0) && (Log() << Verbose(0) << "Begin of Aligning all atoms." << endl);432 LOG(0, "Begin of Aligning all atoms."); 442 433 alpha = atan(-n->at(0)/n->at(2)); 443 DoLog(1) && (Log() << Verbose(1) << "Z-X-angle: " << alpha << " ... ");434 LOG(1, "INFO: Z-X-angle: " << alpha << " ... "); 444 435 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 445 436 tmp = (*iter)->at(0); … … 457 448 n->at(0) = cos(alpha) * tmp + sin(alpha) * n->at(2); 458 449 n->at(2) = -sin(alpha) * tmp + cos(alpha) * n->at(2); 459 DoLog(1) && (Log() << Verbose(1) << "alignment vector after first rotation: " << n << endl);450 LOG(1, "alignment vector after first rotation: " << n); 460 451 461 452 // rotate on z-y plane 462 453 alpha = atan(-n->at(1)/n->at(2)); 463 DoLog(1) && (Log() << Verbose(1) << "Z-Y-angle: " << alpha << " ... ");454 LOG(1, "INFO: Z-Y-angle: " << alpha << " ... "); 464 455 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 465 456 tmp = (*iter)->at(1); … … 479 470 480 471 481 DoLog(1) && (Log() << Verbose(1) << "alignment vector after second rotation: " << n << endl);482 DoLog(0) && (Log() << Verbose(0) << "End of Aligning all atoms." << endl);472 LOG(1, "alignment vector after second rotation: " << n); 473 LOG(0, "End of Aligning all atoms."); 483 474 }; 484 475
Note:
See TracChangeset
for help on using the changeset viewer.