- Timestamp:
- Jun 26, 2010, 11:52:50 AM (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:
- 63d2b8
- Parents:
- f66b67
- Location:
- src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/RepeatBoxAction.cpp
rf66b67 rd10eb6 61 61 (cout << "Repeating box " << Repeater << " times for (x,y,z) axis." << endl); 62 62 double * const cell_size = World::getInstance().getDomain(); 63 double *M_double = ReturnFullMatrixforSymmetric(cell_size); 64 Matrix M = Matrix(M_double); 65 delete[] M_double; 63 Matrix M = ReturnFullMatrixforSymmetric(cell_size); 66 64 Vector x,y; 67 65 int n[NDIM]; -
src/Matrix.cpp
rf66b67 rd10eb6 135 135 return factor*mat; 136 136 } 137 138 /** Blows the 6-dimensional \a cell_size array up to a full NDIM by NDIM matrix. 139 * \param *symm 6-dim array of unique symmetric matrix components 140 * \return allocated NDIM*NDIM array with the symmetric matrix 141 */ 142 Matrix ReturnFullMatrixforSymmetric(const double * const symm) 143 { 144 Matrix matrix; 145 matrix.at(0,0) = symm[0]; 146 matrix.at(1,0) = symm[1]; 147 matrix.at(2,0) = symm[3]; 148 matrix.at(0,1) = symm[1]; 149 matrix.at(1,1) = symm[2]; 150 matrix.at(2,1) = symm[4]; 151 matrix.at(0,2) = symm[3]; 152 matrix.at(1,2) = symm[4]; 153 matrix.at(2,2) = symm[5]; 154 return matrix; 155 }; -
src/Matrix.hpp
rf66b67 rd10eb6 50 50 Matrix operator*(const Matrix&,const double); 51 51 52 Matrix ReturnFullMatrixforSymmetric(const double * const cell_size); 53 52 54 #endif /* MATRIX_HPP_ */ -
src/analysis_correlation.cpp
rf66b67 rd10eb6 136 136 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++){ 137 137 if ((*MolWalker)->ActiveFlag) { 138 double * FullMatrix_double = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 139 Matrix FullMatrix = Matrix(FullMatrix_double); 138 Matrix FullMatrix = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 140 139 Matrix FullInverseMatrix = FullMatrix.invert(); 141 delete[](FullMatrix_double);142 140 DoeLog(2) && (eLog()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl); 143 141 eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; … … 247 245 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++) 248 246 if ((*MolWalker)->ActiveFlag) { 249 double * FullMatrix_double = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 250 Matrix FullMatrix = Matrix(FullMatrix_double); 247 Matrix FullMatrix = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 251 248 Matrix FullInverseMatrix = FullMatrix.invert(); 252 delete[] FullMatrix_double;253 249 DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl); 254 250 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { … … 353 349 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++) 354 350 if ((*MolWalker)->ActiveFlag) { 355 double * FullMatrix_double = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 356 Matrix FullMatrix = Matrix(FullMatrix_double); 351 Matrix FullMatrix = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 357 352 Matrix FullInverseMatrix = FullMatrix.invert(); 358 delete[](FullMatrix_double);359 353 DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl); 360 354 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { -
src/boundary.cpp
rf66b67 rd10eb6 765 765 int N[NDIM]; 766 766 int n[NDIM]; 767 double *M_double = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 768 Matrix M = Matrix(M_double); 769 delete[](M_double); 767 Matrix M = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 770 768 Matrix Rotations; 771 769 Matrix MInverse = M.invert(); -
src/helpers.cpp
rf66b67 rd10eb6 117 117 }; 118 118 119 /** Blows the 6-dimensional \a cell_size array up to a full NDIM by NDIM matrix.120 * \param *symm 6-dim array of unique symmetric matrix components121 * \return allocated NDIM*NDIM array with the symmetric matrix122 */123 double * ReturnFullMatrixforSymmetric(const double * const symm)124 {125 double *matrix = new double[NDIM * NDIM];126 matrix[0] = symm[0];127 matrix[1] = symm[1];128 matrix[2] = symm[3];129 matrix[3] = symm[1];130 matrix[4] = symm[2];131 matrix[5] = symm[4];132 matrix[6] = symm[3];133 matrix[7] = symm[4];134 matrix[8] = symm[5];135 return matrix;136 };137 138 139 119 /** Comparison function for GSL heapsort on distances in two molecules. 140 120 * \param *a -
src/helpers.hpp
rf66b67 rd10eb6 52 52 bool IsValidNumber( const char *string); 53 53 int CompareDoubles (const void * a, const void * b); 54 double * ReturnFullMatrixforSymmetric(const double * const cell_size);55 54 void performCriticalExit(); 56 55 -
src/molecule.cpp
rf66b67 rd10eb6 308 308 } // (signs are correct, was tested!) 309 309 } 310 double *matrix_double = ReturnFullMatrixforSymmetric(cell_size); 311 matrix = Matrix(matrix_double); 312 delete[](matrix_double); 310 matrix = ReturnFullMatrixforSymmetric(cell_size); 313 311 Orthovector1.MatrixMultiplication(matrix); 314 312 InBondvector -= Orthovector1; // subtract just the additional translation -
src/molecule_fragmentation.cpp
rf66b67 rd10eb6 1710 1710 atom *OtherWalker = NULL; 1711 1711 double * const cell_size = World::getInstance().getDomain(); 1712 double *matrix_double = ReturnFullMatrixforSymmetric(cell_size); 1713 Matrix matrix = Matrix(matrix_double); 1714 delete[](matrix_double); 1712 Matrix matrix = ReturnFullMatrixforSymmetric(cell_size); 1715 1713 enum Shading *ColorList = NULL; 1716 1714 double tmp; -
src/molecule_geometry.cpp
rf66b67 rd10eb6 35 35 const Vector *CenterBox = DetermineCenterOfBox(); 36 36 double * const cell_size = World::getInstance().getDomain(); 37 double *M_double = ReturnFullMatrixforSymmetric(cell_size); 38 Matrix M = Matrix(M_double); 39 delete[](M_double); 37 Matrix M = ReturnFullMatrixforSymmetric(cell_size); 40 38 Matrix Minv = M.invert(); 41 39 … … 59 57 bool status = true; 60 58 double * const cell_size = World::getInstance().getDomain(); 61 double *M_double = ReturnFullMatrixforSymmetric(cell_size); 62 Matrix M = Matrix(M_double); 63 delete[](M_double); 59 Matrix M = ReturnFullMatrixforSymmetric(cell_size); 64 60 Matrix Minv = M.invert(); 65 61 … … 159 155 160 156 const double *cell_size = World::getInstance().getDomain(); 161 double *M_double = ReturnFullMatrixforSymmetric(cell_size); 162 Matrix M = Matrix(M_double); 163 delete[](M_double); 157 Matrix M = ReturnFullMatrixforSymmetric(cell_size); 164 158 a->MatrixMultiplication(M); 165 159 … … 250 244 { 251 245 double * const cell_size = World::getInstance().getDomain(); 252 double *M_double = ReturnFullMatrixforSymmetric(cell_size); 253 Matrix M = Matrix(M_double); 254 delete[](M_double); 246 Matrix M = ReturnFullMatrixforSymmetric(cell_size); 255 247 Matrix Minv = M.invert(); 256 248 … … 282 274 { 283 275 double * const cell_size = World::getInstance().getDomain(); 284 double *matrix_double = ReturnFullMatrixforSymmetric(cell_size); 285 Matrix matrix = Matrix(matrix_double); 286 delete[](matrix_double); 276 Matrix matrix = ReturnFullMatrixforSymmetric(cell_size); 287 277 Matrix inversematrix = matrix.invert(); 288 278 double tmp;
Note:
See TracChangeset
for help on using the changeset viewer.