Changeset 3c58f8
- Timestamp:
- Feb 4, 2011, 6:56:38 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:
- 4c2643
- Parents:
- 72d108
- git-author:
- Frederik Heber <heber@…> (02/02/11 09:43:01)
- git-committer:
- Frederik Heber <heber@…> (02/04/11 18:56:38)
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule.hpp
r72d108 r3c58f8 206 206 void SetNameFromFilename(const char *filename); 207 207 void SetBoxDimension(Vector *dim); 208 voidScanForPeriodicCorrection();208 bool ScanForPeriodicCorrection(); 209 209 bool VerletForceIntegration(char *file, config &configuration, const size_t offset); 210 210 double VolumeOfConvexEnvelope(bool IsAngstroem); -
src/molecule_fragmentation.cpp
r72d108 r3c58f8 1768 1768 * \param *out ofstream for debugging messages 1769 1769 */ 1770 voidmolecule::ScanForPeriodicCorrection()1770 bool molecule::ScanForPeriodicCorrection() 1771 1771 { 1772 1772 bond *Binder = NULL; … … 1777 1777 enum Shading *ColorList = NULL; 1778 1778 double tmp; 1779 bool LastBond = true; // only needed to due list construct 1779 1780 Vector Translationvector; 1780 1781 //std::deque<atom *> *CompStack = NULL; … … 1787 1788 for (int i=0;i<getAtomCount();i++) 1788 1789 ColorList[i] = (enum Shading)0; 1789 while(flag) {1790 if (flag) { 1790 1791 // remove bonds that are beyond bonddistance 1791 1792 Translationvector.Zero(); … … 1799 1800 //Log() << Verbose(3) << "Checking " << i << "th distance of " << *Binder->leftatom << " to " << *Binder->rightatom << ": " << tmp << "." << endl; 1800 1801 if (tmp > BondDistance) { 1801 OtherBinder = Binder->next; // note down binding partner for later re-insertion 1802 unlink(Binder); // unlink bond 1802 // OtherBinder = Binder->next; // note down binding partner for later re-insertion 1803 // if (OtherBinder != NULL) { 1804 // LastBond = false; 1805 // } else { 1806 // OtherBinder = Binder->previous; 1807 // LastBond = true; 1808 // } 1809 // unlink(Binder); // unlink bond 1803 1810 DoLog(2) && (Log() << Verbose(2) << "Correcting at bond " << *Binder << "." << endl); 1804 1811 flag = true; … … 1807 1814 } 1808 1815 } 1809 if (flag) { 1816 //if (flag) { 1817 if (0) { 1810 1818 // create translation vector from their periodically modified distance 1811 1819 for (int i=NDIM;i--;) { … … 1837 1845 } 1838 1846 // re-add bond 1839 link(Binder, OtherBinder); 1847 if (OtherBinder == NULL) { // is the only bond? 1848 //Do nothing 1849 } else { 1850 if (!LastBond) { 1851 link(Binder, OtherBinder); 1852 } else { 1853 link(OtherBinder, Binder); 1854 } 1855 } 1840 1856 } else { 1841 1857 DoLog(3) && (Log() << Verbose(3) << "No corrections for this fragment." << endl); … … 1847 1863 delete[](ColorList); 1848 1864 DoLog(2) && (Log() << Verbose(2) << "End of ScanForPeriodicCorrection." << endl); 1849 }; 1865 1866 return flag; 1867 }; -
src/moleculelist.cpp
r72d108 r3c58f8 506 506 RealSpaceMatrix cell_size = World::getInstance().getDomain().getM(); 507 507 RealSpaceMatrix cell_size_backup = cell_size; 508 int count=0; 508 509 509 510 // store the fragments as config and as xyz … … 519 520 520 521 // correct periodic 521 (*ListRunner)->ScanForPeriodicCorrection(); 522 if ((*ListRunner)->ScanForPeriodicCorrection()) { 523 count++; 524 } 522 525 523 526 // output xyz file … … 591 594 // printing final number 592 595 DoLog(2) && (Log() << Verbose(2) << "Final number of fragments: " << FragmentCounter << "." << endl); 596 597 // printing final number 598 DoLog(0) && (Log() << Verbose(0) << "For " << count << " fragments periodic correction would have been necessary." << endl); 593 599 594 600 // restore cell_size
Note:
See TracChangeset
for help on using the changeset viewer.