Changeset eddea2
- Timestamp:
- May 30, 2010, 5:29:38 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:
- 8048a4
- Parents:
- 5d12d2
- git-author:
- Frederik Heber <heber@…> (05/30/10 17:03:25)
- git-committer:
- Frederik Heber <heber@…> (05/30/10 17:29:38)
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule.hpp
r5d12d2 reddea2 249 249 Vector * DetermineCenterOfGravity(); 250 250 Vector * DetermineCenterOfAll() const; 251 Vector * DetermineCenterOfBox() const; 251 252 void SetNameFromFilename(const char *filename); 252 253 void SetBoxDimension(Vector *dim); -
src/molecule_geometry.cpp
r5d12d2 reddea2 27 27 bool status = true; 28 28 const Vector *Center = DetermineCenterOfAll(); 29 const Vector *CenterBox = DetermineCenterOfBox(); 29 30 double * const cell_size = World::getInstance().getDomain(); 30 31 double *M = ReturnFullMatrixforSymmetric(cell_size); … … 33 34 // go through all atoms 34 35 ActOnAllVectors( &Vector::SubtractVector, *Center); 36 ActOnAllVectors( &Vector::SubtractVector, *CenterBox); 35 37 ActOnAllVectors( &Vector::WrapPeriodically, (const double *)M, (const double *)Minv); 36 38 … … 142 144 }; 143 145 146 /** Returns vector pointing to center of the domain. 147 * \return pointer to center of the domain 148 */ 149 Vector * molecule::DetermineCenterOfBox() const 150 { 151 Vector *a = new Vector(0.5,0.5,0.5); 152 153 const double *cell_size = World::getInstance().getDomain(); 154 double *M = ReturnFullMatrixforSymmetric(cell_size); 155 a->MatrixMultiplication(M); 156 Free(&M); 157 158 return a; 159 }; 160 144 161 /** Returns vector pointing to center of gravity. 145 162 * \param *out output stream for debugging … … 236 253 237 254 // go through all atoms 238 ActOnAllVectors( &Vector:: SubtractVector, *trans);255 ActOnAllVectors( &Vector::AddVector, *trans); 239 256 ActOnAllVectors( &Vector::WrapPeriodically, (const double *)M, (const double *)Minv); 240 257 -
src/vector.cpp
r5d12d2 reddea2 543 543 // truncate to [0,1] for each axis 544 544 for (int i=0;i<NDIM;i++) { 545 x[i] += 0.5; // set to center of box545 //x[i] += 0.5; // set to center of box 546 546 while (x[i] >= 1.) 547 547 x[i] -= 1.; -
tests/regression/testsuite.at
r5d12d2 reddea2 267 267 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t 1. 1. 1.], 0, [stdout], [stderr]) 268 268 AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore]) 269 AT_CLEANUP 270 271 # 6. Periodic translation 272 AT_SETUP([Molecules - Periodic translation]) 273 AT_KEYWORDS([Molecules]) 274 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/pre/test.* .], 0) 275 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -T 12. 12. 12.], 0, [stdout], [stderr]) 276 AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/post/$file], 0, [ignore], [ignore]) 269 277 AT_CLEANUP 270 278
Note:
See TracChangeset
for help on using the changeset viewer.