Changeset a67d19 for src/molecule_geometry.cpp
- Timestamp:
- Apr 22, 2010, 2:00:03 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:
- 299554
- Parents:
- 6613ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_geometry.cpp
r6613ec ra67d19 280 280 if ((fabs(tmp)) > BondDistance) { 281 281 flag = false; 282 Log() << Verbose(0) << "Hit: atom " << Walker->Name << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "." << endl;282 DoLog(0) && (Log() << Verbose(0) << "Hit: atom " << Walker->Name << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "." << endl); 283 283 if (tmp > 0) 284 284 Translationvector.x[j] -= 1.; … … 291 291 Testvector.MatrixMultiplication(matrix); 292 292 Center.AddVector(&Testvector); 293 Log() << Verbose(1) << "vector is: ";293 DoLog(1) && (Log() << Verbose(1) << "vector is: "); 294 294 Testvector.Output(); 295 Log() << Verbose(0) << endl;295 DoLog(0) && (Log() << Verbose(0) << endl); 296 296 #ifdef ADDHYDROGEN 297 297 // now also change all hydrogens … … 303 303 Testvector.MatrixMultiplication(matrix); 304 304 Center.AddVector(&Testvector); 305 Log() << Verbose(1) << "Hydrogen vector is: ";305 DoLog(1) && (Log() << Verbose(1) << "Hydrogen vector is: "); 306 306 Testvector.Output(); 307 Log() << Verbose(0) << endl;307 DoLog(0) && (Log() << Verbose(0) << endl); 308 308 } 309 309 } … … 352 352 } 353 353 // print InertiaTensor for debugging 354 Log() << Verbose(0) << "The inertia tensor is:" << endl;354 DoLog(0) && (Log() << Verbose(0) << "The inertia tensor is:" << endl); 355 355 for(int i=0;i<NDIM;i++) { 356 356 for(int j=0;j<NDIM;j++) 357 Log() << Verbose(0) << InertiaTensor[i*NDIM+j] << " ";358 Log() << Verbose(0) << endl;359 } 360 Log() << Verbose(0) << endl;357 DoLog(0) && (Log() << Verbose(0) << InertiaTensor[i*NDIM+j] << " "); 358 DoLog(0) && (Log() << Verbose(0) << endl); 359 } 360 DoLog(0) && (Log() << Verbose(0) << endl); 361 361 362 362 // diagonalize to determine principal axis system … … 370 370 371 371 for(int i=0;i<NDIM;i++) { 372 Log() << Verbose(1) << "eigenvalue = " << gsl_vector_get(eval, i);373 Log() << Verbose(0) << ", eigenvector = (" << evec->data[i * evec->tda + 0] << "," << evec->data[i * evec->tda + 1] << "," << evec->data[i * evec->tda + 2] << ")" << endl;372 DoLog(1) && (Log() << Verbose(1) << "eigenvalue = " << gsl_vector_get(eval, i)); 373 DoLog(0) && (Log() << Verbose(0) << ", eigenvector = (" << evec->data[i * evec->tda + 0] << "," << evec->data[i * evec->tda + 1] << "," << evec->data[i * evec->tda + 2] << ")" << endl); 374 374 } 375 375 376 376 // check whether we rotate or not 377 377 if (DoRotate) { 378 Log() << Verbose(1) << "Transforming molecule into PAS ... ";378 DoLog(1) && (Log() << Verbose(1) << "Transforming molecule into PAS ... "); 379 379 // the eigenvectors specify the transformation matrix 380 380 ActOnAllVectors( &Vector::MatrixMultiplication, (const double *) evec->data ); 381 Log() << Verbose(0) << "done." << endl;381 DoLog(0) && (Log() << Verbose(0) << "done." << endl); 382 382 383 383 // summing anew for debugging (resulting matrix has to be diagonal!) … … 404 404 } 405 405 // print InertiaTensor for debugging 406 Log() << Verbose(0) << "The inertia tensor is:" << endl;406 DoLog(0) && (Log() << Verbose(0) << "The inertia tensor is:" << endl); 407 407 for(int i=0;i<NDIM;i++) { 408 408 for(int j=0;j<NDIM;j++) 409 Log() << Verbose(0) << InertiaTensor[i*NDIM+j] << " ";410 Log() << Verbose(0) << endl;411 } 412 Log() << Verbose(0) << endl;409 DoLog(0) && (Log() << Verbose(0) << InertiaTensor[i*NDIM+j] << " "); 410 DoLog(0) && (Log() << Verbose(0) << endl); 411 } 412 DoLog(0) && (Log() << Verbose(0) << endl); 413 413 } 414 414 … … 433 433 434 434 // rotate on z-x plane 435 Log() << Verbose(0) << "Begin of Aligning all atoms." << endl;435 DoLog(0) && (Log() << Verbose(0) << "Begin of Aligning all atoms." << endl); 436 436 alpha = atan(-n->x[0]/n->x[2]); 437 Log() << Verbose(1) << "Z-X-angle: " << alpha << " ... ";437 DoLog(1) && (Log() << Verbose(1) << "Z-X-angle: " << alpha << " ... "); 438 438 while (ptr->next != end) { 439 439 ptr = ptr->next; … … 451 451 n->x[0] = cos(alpha) * tmp + sin(alpha) * n->x[2]; 452 452 n->x[2] = -sin(alpha) * tmp + cos(alpha) * n->x[2]; 453 Log() << Verbose(1) << "alignment vector after first rotation: ";453 DoLog(1) && (Log() << Verbose(1) << "alignment vector after first rotation: "); 454 454 n->Output(); 455 Log() << Verbose(0) << endl;455 DoLog(0) && (Log() << Verbose(0) << endl); 456 456 457 457 // rotate on z-y plane 458 458 ptr = start; 459 459 alpha = atan(-n->x[1]/n->x[2]); 460 Log() << Verbose(1) << "Z-Y-angle: " << alpha << " ... ";460 DoLog(1) && (Log() << Verbose(1) << "Z-Y-angle: " << alpha << " ... "); 461 461 while (ptr->next != end) { 462 462 ptr = ptr->next; … … 475 475 n->x[2] = -sin(alpha) * tmp + cos(alpha) * n->x[2]; 476 476 477 Log() << Verbose(1) << "alignment vector after second rotation: ";477 DoLog(1) && (Log() << Verbose(1) << "alignment vector after second rotation: "); 478 478 n->Output(); 479 Log() << Verbose(1) << endl;480 Log() << Verbose(0) << "End of Aligning all atoms." << endl;479 DoLog(1) && (Log() << Verbose(1) << endl); 480 DoLog(0) && (Log() << Verbose(0) << "End of Aligning all atoms." << endl); 481 481 }; 482 482
Note:
See TracChangeset
for help on using the changeset viewer.