Changeset 205ccd
- Timestamp:
- Jul 10, 2009, 9:19:23 PM (16 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:
- 042f82
- Parents:
- d1df9b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecules.cpp
rd1df9b r205ccd 853 853 // go through all atoms 854 854 ptr = start->next; // start at first in list 855 if (ptr != end) { //list not empty? 856 while (ptr->next != end) { // continue with second if present 857 ptr = ptr->next; 858 //ptr->Output(1,1,out); 859 // multiply its vector with matrix inverse 860 x.CopyVector(&ptr->x); 855 while (ptr != end) { // continue with second if present 856 //ptr->Output(1,1,out); 857 // multiply its vector with matrix inverse 858 x.CopyVector(&ptr->x); 859 x.Translate(trans); 860 x.MatrixMultiplication(Minv); 861 // truncate to [0,1] for each axis 862 for (int i=0;i<NDIM;i++) { 863 value = floor(fabs(x.x[i])); // next lower integer 864 if (x.x[i] >=0) { 865 x.x[i] -= value; 866 } else { 867 x.x[i] += value+1; 868 } 869 } 870 // matrix multiply 871 x.MatrixMultiplication(M); 872 ptr->x.CopyVector(&x); 873 for (int j=0;j<MDSteps;j++) { 874 x.CopyVector(&Trajectories[ptr].R.at(j)); 861 875 x.Translate(trans); 862 876 x.MatrixMultiplication(Minv); 863 877 // truncate to [0,1] for each axis 864 878 for (int i=0;i<NDIM;i++) { 865 value = floor( fabs(x.x[i])); // next lower integer879 value = floor(x.x[i]); // next lower integer 866 880 if (x.x[i] >=0) { 867 881 x.x[i] -= value; … … 872 886 // matrix multiply 873 887 x.MatrixMultiplication(M); 874 ptr->x.CopyVector(&x); 875 for (int j=0;j<MDSteps;j++) { 876 x.CopyVector(&Trajectories[ptr].R.at(j)); 877 x.Translate(trans); 878 x.MatrixMultiplication(Minv); 879 // truncate to [0,1] for each axis 880 for (int i=0;i<NDIM;i++) { 881 value = floor(x.x[i]); // next lower integer 882 if (x.x[i] >=0) { 883 x.x[i] -= value; 884 } else { 885 x.x[i] += value+1; 886 } 887 } 888 // matrix multiply 889 x.MatrixMultiplication(M); 890 Trajectories[ptr].R.at(j).CopyVector(&x); 891 } 888 Trajectories[ptr].R.at(j).CopyVector(&x); 892 889 } 890 ptr = ptr->next; 893 891 } 894 892 delete(M);
Note:
See TracChangeset
for help on using the changeset viewer.