- Timestamp:
- Mar 3, 2010, 10:13:19 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:
- 70378e, a837d0, fd179f
- Parents:
- c5805a
- Location:
- src
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
rc5805a rb34306 8 8 ANALYSISHEADER = analysis_bonds.hpp analysis_correlation.hpp 9 9 10 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp triangleintersectionlist.cpp vector.cpp verbose.cpp 11 HEADER = ${ANALYSISHEADER} ${ATOMHEADER} bond.hpp bondgraph.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp errorlogger.hpp graph.hpp helpers.hpp info.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp log.hpp logger.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp triangleintersectionlist.cpp vector.hpp verbose.hpp 10 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp triangleintersectionlist.cpp vector.cpp verbose.cpp World.cpp 11 HEADER = ${ANALYSISHEADER} ${ATOMHEADER} bond.hpp bondgraph.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp errorlogger.hpp graph.hpp helpers.hpp info.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp log.hpp logger.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp triangleintersectionlist.cpp vector.hpp verbose.hpp World.hpp 12 12 13 13 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) -
src/analysis_correlation.cpp
rc5805a rb34306 18 18 #include "vector.hpp" 19 19 #include "verbose.hpp" 20 #include "World.hpp" 20 21 21 22 … … 56 57 if (Walker->nr < OtherWalker->nr) 57 58 if ((type2 == NULL) || (OtherWalker->type == type2)) { 58 distance = Walker->node->PeriodicDistance(OtherWalker->node, (*MolWalker)->cell_size);59 distance = Walker->node->PeriodicDistance(OtherWalker->node, World::get()->cell_size); 59 60 //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl; 60 61 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) ); … … 97 98 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++) 98 99 if ((*MolWalker)->ActiveFlag) { 99 double * FullMatrix = ReturnFullMatrixforSymmetric( (*MolWalker)->cell_size);100 double * FullMatrix = ReturnFullMatrixforSymmetric(World::get()->cell_size); 100 101 double * FullInverseMatrix = InverseMatrix(FullMatrix); 101 102 eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; … … 175 176 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 176 177 if ((type == NULL) || (Walker->type == type)) { 177 distance = Walker->node->PeriodicDistance(point, (*MolWalker)->cell_size);178 distance = Walker->node->PeriodicDistance(point, World::get()->cell_size); 178 179 Log() << Verbose(4) << "Current distance is " << distance << "." << endl; 179 180 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) ); … … 209 210 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++) 210 211 if ((*MolWalker)->ActiveFlag) { 211 double * FullMatrix = ReturnFullMatrixforSymmetric( (*MolWalker)->cell_size);212 double * FullMatrix = ReturnFullMatrixforSymmetric(World::get()->cell_size); 212 213 double * FullInverseMatrix = InverseMatrix(FullMatrix); 213 214 Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; … … 314 315 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++) 315 316 if ((*MolWalker)->ActiveFlag) { 316 double * FullMatrix = ReturnFullMatrixforSymmetric( (*MolWalker)->cell_size);317 double * FullMatrix = ReturnFullMatrixforSymmetric(World::get()->cell_size); 317 318 double * FullInverseMatrix = InverseMatrix(FullMatrix); 318 319 Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; -
src/boundary.cpp
rc5805a rb34306 17 17 #include "tesselation.hpp" 18 18 #include "tesselationhelpers.hpp" 19 #include "World.hpp" 19 20 20 21 #include<gsl/gsl_poly.h> … … 805 806 int N[NDIM]; 806 807 int n[NDIM]; 807 double *M = ReturnFullMatrixforSymmetric( filler->cell_size);808 double *M = ReturnFullMatrixforSymmetric(World::get()->cell_size); 808 809 double Rotations[NDIM*NDIM]; 809 810 double *MInverse = InverseMatrix(M); -
src/builder.cpp
rc5805a rb34306 68 68 #include "periodentafel.hpp" 69 69 #include "version.h" 70 #include "World.hpp" 70 71 71 72 /********************************************* Subsubmenu routine ************************************/ … … 103 104 Log() << Verbose(0) << "Enter absolute coordinates." << endl; 104 105 first = new atom; 105 first->x.AskPosition( mol->cell_size, false);106 first->x.AskPosition(World::get()->cell_size, false); 106 107 first->type = periode->AskElement(); // give type 107 108 mol->AddAtom(first); // add to molecule … … 114 115 if (!valid) eLog() << Verbose(2) << "Resulting position out of cell." << endl; 115 116 Log() << Verbose(0) << "Enter reference coordinates." << endl; 116 x.AskPosition( mol->cell_size, true);117 x.AskPosition(World::get()->cell_size, true); 117 118 Log() << Verbose(0) << "Enter relative coordinates." << endl; 118 first->x.AskPosition( mol->cell_size, false);119 first->x.AskPosition(World::get()->cell_size, false); 119 120 first->x.AddVector((const Vector *)&x); 120 121 Log() << Verbose(0) << "\n"; … … 131 132 second = mol->AskAtom("Enter atom number: "); 132 133 Log() << Verbose(0) << "Enter relative coordinates." << endl; 133 first->x.AskPosition( mol->cell_size, false);134 first->x.AskPosition(World::get()->cell_size, false); 134 135 for (int i=NDIM;i--;) { 135 136 first->x.x[i] += second->x.x[i]; … … 358 359 case 'b': // normal vector of mirror plane 359 360 Log() << Verbose(0) << "Enter normal vector of mirror plane." << endl; 360 n.AskPosition( mol->cell_size,0);361 n.AskPosition(World::get()->cell_size,0); 361 362 n.Normalize(); 362 363 break; … … 425 426 case 'b': // normal vector of mirror plane 426 427 Log() << Verbose(0) << "Enter normal vector of mirror plane." << endl; 427 n.AskPosition( mol->cell_size,0);428 n.AskPosition(World::get()->cell_size,0); 428 429 n.Normalize(); 429 430 break; … … 865 866 x.Zero(); 866 867 y.Zero(); 867 y.x[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude868 y.x[abs(axis)-1] = World::get()->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude 868 869 for (int i=1;i<faktor;i++) { // then add this list with respective translation factor times 869 870 x.AddVector(&y); // per factor one cell width further … … 888 889 mol->Translate(&x); 889 890 } 890 mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor;891 World::get()->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor; 891 892 } 892 893 } … … 945 946 Log() << Verbose(0) << "Current molecule is: " << mol->IndexNr << "\t" << mol->name << endl; 946 947 Log() << Verbose(0) << "Enter translation vector." << endl; 947 x.AskPosition( mol->cell_size,0);948 x.AskPosition(World::get()->cell_size,0); 948 949 mol->Center.AddVector((const Vector *)&x); 949 950 } … … 1005 1006 // center at set box dimensions 1006 1007 mol->CenterEdge(¢er); 1007 mol->cell_size[0] = center.x[0]; 1008 mol->cell_size[1] = 0; 1009 mol->cell_size[2] = center.x[1]; 1010 mol->cell_size[3] = 0; 1011 mol->cell_size[4] = 0; 1012 mol->cell_size[5] = center.x[2]; 1008 double * const cell_size = World::get()->cell_size; 1009 cell_size[0] = center.x[0]; 1010 cell_size[1] = 0; 1011 cell_size[2] = center.x[1]; 1012 cell_size[3] = 0; 1013 cell_size[4] = 0; 1014 cell_size[5] = center.x[2]; 1013 1015 molecules->insert(mol); 1014 1016 } … … 2105 2107 factor[2] = atof(argv[argptr+2]); 2106 2108 mol->Scale((const double ** const)&factor); 2109 double * const cell_size = World::get()->cell_size; 2107 2110 for (int i=0;i<NDIM;i++) { 2108 2111 j += i+1; 2109 2112 x.x[i] = atof(argv[NDIM+i]); 2110 mol->cell_size[j]*=factor[i];2113 cell_size[j]*=factor[i]; 2111 2114 } 2112 2115 delete[](factor); … … 2124 2127 j = -1; 2125 2128 Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl; 2129 double * const cell_size = World::get()->cell_size; 2126 2130 for (int i=0;i<6;i++) { 2127 mol->cell_size[i] = atof(argv[argptr+i]);2131 cell_size[i] = atof(argv[argptr+i]); 2128 2132 } 2129 2133 // center … … 2142 2146 j = -1; 2143 2147 Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl; 2148 double * const cell_size = World::get()->cell_size; 2144 2149 for (int i=0;i<6;i++) { 2145 mol->cell_size[i] = atof(argv[argptr+i]);2150 cell_size[i] = atof(argv[argptr+i]); 2146 2151 } 2147 2152 // center … … 2165 2170 mol->SetBoxDimension(&x); 2166 2171 // translate each coordinate by boundary 2172 double * const cell_size = World::get()->cell_size; 2167 2173 j=-1; 2168 2174 for (int i=0;i<NDIM;i++) { 2169 2175 j += i+1; 2170 2176 x.x[i] = atof(argv[argptr+i]); 2171 mol->cell_size[j] += x.x[i]*2.;2177 cell_size[j] += x.x[i]*2.; 2172 2178 } 2173 2179 mol->Translate((const Vector *)&x); … … 2300 2306 } else { 2301 2307 SaveFlag = true; 2308 double * const cell_size = World::get()->cell_size; 2302 2309 for (int axis = 1; axis <= NDIM; axis++) { 2303 2310 int faktor = atoi(argv[argptr++]); … … 2326 2333 x.Zero(); 2327 2334 y.Zero(); 2328 y.x[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude2335 y.x[abs(axis)-1] = cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude 2329 2336 for (int i=1;i<faktor;i++) { // then add this list with respective translation factor times 2330 2337 x.AddVector(&y); // per factor one cell width further … … 2347 2354 mol->Translate(&x); 2348 2355 } 2349 mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor;2356 cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] *= faktor; 2350 2357 } 2351 2358 } … … 2416 2423 if (molecules->ListOfMolecules.size() == 0) { 2417 2424 mol = new molecule(periode); 2418 if (mol->cell_size[0] == 0.) { 2425 double * const cell_size = World::get()->cell_size; 2426 if (cell_size[0] == 0.) { 2419 2427 Log() << Verbose(0) << "enter lower tridiagonal form of basis matrix" << endl << endl; 2420 2428 for (int i=0;i<6;i++) { 2421 2429 Log() << Verbose(1) << "Cell size" << i << ": "; 2422 cin >> mol->cell_size[i];2430 cin >> cell_size[i]; 2423 2431 } 2424 2432 } -
src/config.cpp
rc5805a rb34306 19 19 #include "molecule.hpp" 20 20 #include "periodentafel.hpp" 21 #include "World.hpp" 21 22 22 23 /******************************** Functions for class ConfigFileBuffer **********************/ … … 499 500 // case 'j': // BoxLength 500 501 // Log() << Verbose(0) << "enter lower triadiagonalo form of basis matrix" << endl << endl; 502 // double * const cell_size = World::get()->cell_size; 501 503 // for (int i=0;i<6;i++) { 502 504 // Log() << Verbose(0) << "Cell size" << i << ": "; 503 // cin >> mol->cell_size[i];505 // cin >> cell_size[i]; 504 506 // } 505 507 // break; … … 965 967 // Unit cell and magnetic field 966 968 ParseForParameter(verbose,FileBuffer, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */ 967 mol->cell_size[0] = BoxLength[0]; 968 mol->cell_size[1] = BoxLength[3]; 969 mol->cell_size[2] = BoxLength[4]; 970 mol->cell_size[3] = BoxLength[6]; 971 mol->cell_size[4] = BoxLength[7]; 972 mol->cell_size[5] = BoxLength[8]; 969 double * const cell_size = World::get()->cell_size; 970 cell_size[0] = BoxLength[0]; 971 cell_size[1] = BoxLength[3]; 972 cell_size[2] = BoxLength[4]; 973 cell_size[3] = BoxLength[6]; 974 cell_size[4] = BoxLength[7]; 975 cell_size[5] = BoxLength[8]; 973 976 //if (1) fprintf(stderr,"\n"); 974 977 … … 1169 1172 1170 1173 ParseForParameter(verbose,file, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */ 1171 mol->cell_size[0] = BoxLength[0]; 1172 mol->cell_size[1] = BoxLength[3]; 1173 mol->cell_size[2] = BoxLength[4]; 1174 mol->cell_size[3] = BoxLength[6]; 1175 mol->cell_size[4] = BoxLength[7]; 1176 mol->cell_size[5] = BoxLength[8]; 1174 double * const cell_size = World::get()->cell_size; 1175 cell_size[0] = BoxLength[0]; 1176 cell_size[1] = BoxLength[3]; 1177 cell_size[2] = BoxLength[4]; 1178 cell_size[3] = BoxLength[6]; 1179 cell_size[4] = BoxLength[7]; 1180 cell_size[5] = BoxLength[8]; 1177 1181 if (1) fprintf(stderr,"\n"); 1178 1182 config::DoPerturbation = 0; … … 1312 1316 // bring MaxTypes up to date 1313 1317 mol->CountElements(); 1318 const double * const cell_size = World::get()->cell_size; 1314 1319 ofstream * const output = new ofstream(filename, ios::out); 1315 1320 if (output != NULL) { … … 1382 1387 *output << endl; 1383 1388 *output << "BoxLength\t\t\t# (Length of a unit cell)" << endl; 1384 *output << mol->cell_size[0] << "\t" << endl;1385 *output << mol->cell_size[1] << "\t" << mol->cell_size[2] << "\t" << endl;1386 *output << mol->cell_size[3] << "\t" << mol->cell_size[4] << "\t" << mol->cell_size[5] << "\t" << endl;1389 *output << cell_size[0] << "\t" << endl; 1390 *output << cell_size[1] << "\t" << cell_size[2] << "\t" << endl; 1391 *output << cell_size[3] << "\t" << cell_size[4] << "\t" << cell_size[5] << "\t" << endl; 1387 1392 // FIXME 1388 1393 *output << endl; -
src/molecule.cpp
rc5805a rb34306 23 23 #include "tesselation.hpp" 24 24 #include "vector.hpp" 25 #include "World.hpp" 25 26 26 27 /************************************* Functions for class molecule *********************************/ … … 45 46 for(int i=MAX_ELEMENTS;i--;) 46 47 ElementsInMolecule[i] = 0; 47 cell_size[0] = cell_size[2] = cell_size[5]= 20.;48 cell_size[1] = cell_size[3] = cell_size[4]= 0.;49 48 strcpy(name,"none"); 50 49 }; … … 159 158 double *matrix = NULL; 160 159 bond *Binder = NULL; 160 double * const cell_size = World::get()->cell_size; 161 161 162 162 // Log() << Verbose(3) << "Begin of AddHydrogenReplacementAtom." << endl; … … 603 603 void molecule::SetBoxDimension(Vector *dim) 604 604 { 605 double * const cell_size = World::get()->cell_size; 605 606 cell_size[0] = dim->x[0]; 606 607 cell_size[1] = 0.; … … 693 694 bool molecule::CheckBounds(const Vector *x) const 694 695 { 696 double * const cell_size = World::get()->cell_size; 695 697 bool result = true; 696 698 int j =-1; -
src/molecule.hpp
rc5805a rb34306 82 82 class molecule : public PointCloud { 83 83 public: 84 double cell_size[6];//!< cell size85 84 const periodentafel * const elemente; //!< periodic table with each element 86 85 atom *start; //!< start of atom list -
src/molecule_fragmentation.cpp
rc5805a rb34306 18 18 #include "molecule.hpp" 19 19 #include "periodentafel.hpp" 20 #include "World.hpp" 20 21 21 22 /************************************* Functions for class molecule *********************************/ … … 843 844 844 845 Leaf->BondDistance = mol->BondDistance; 845 for(int i=NDIM*2;i--;)846 Leaf->cell_size[i] = mol->cell_size[i];847 846 848 847 // first create the minimal set of atoms from the KeySet … … 1654 1653 atom *Walker = NULL; 1655 1654 atom *OtherWalker = NULL; 1655 double * const cell_size = World::get()->cell_size; 1656 1656 double *matrix = ReturnFullMatrixforSymmetric(cell_size); 1657 1657 enum Shading *ColorList = NULL; -
src/molecule_geometry.cpp
rc5805a rb34306 15 15 #include "memoryallocator.hpp" 16 16 #include "molecule.hpp" 17 #include "World.hpp" 17 18 18 19 /************************************* Functions for class molecule *********************************/ … … 26 27 bool status = true; 27 28 const Vector *Center = DetermineCenterOfAll(); 29 double * const cell_size = World::get()->cell_size; 28 30 double *M = ReturnFullMatrixforSymmetric(cell_size); 29 31 double *Minv = InverseMatrix(M); … … 46 48 { 47 49 bool status = true; 50 double * const cell_size = World::get()->cell_size; 48 51 double *M = ReturnFullMatrixforSymmetric(cell_size); 49 52 double *Minv = InverseMatrix(M); … … 226 229 void molecule::TranslatePeriodically(const Vector *trans) 227 230 { 231 double * const cell_size = World::get()->cell_size; 228 232 double *M = ReturnFullMatrixforSymmetric(cell_size); 229 233 double *Minv = InverseMatrix(M); … … 252 256 { 253 257 atom *Walker = start; 258 double * const cell_size = World::get()->cell_size; 254 259 double *matrix = ReturnFullMatrixforSymmetric(cell_size); 255 260 double *inversematrix = InverseMatrix(cell_size); -
src/molecule_graph.cpp
rc5805a rb34306 17 17 #include "memoryallocator.hpp" 18 18 #include "molecule.hpp" 19 #include "World.hpp" 19 20 20 21 struct BFSAccounting … … 106 107 LinkedCell *LC = NULL; 107 108 bool free_BG = false; 109 double * const cell_size = World::get()->cell_size; 108 110 109 111 if (BG == NULL) { -
src/moleculelist.cpp
rc5805a rb34306 19 19 #include "memoryallocator.hpp" 20 20 #include "periodentafel.hpp" 21 #include "World.hpp" 21 22 22 23 /*********************************** Functions for class MoleculeListClass *************************/ … … 638 639 int FragmentCounter = 0; 639 640 ofstream output; 640 641 double cell_size_backup[6]; 642 double * const cell_size = World::get()->cell_size; 643 644 // backup cell_size 645 for (int i=0;i<6;i++) 646 cell_size_backup[i] = cell_size[i]; 641 647 // store the fragments as config and as xyz 642 648 for (MoleculeList::iterator ListRunner = ListOfMolecules.begin(); ListRunner != ListOfMolecules.end(); ListRunner++) { … … 682 688 j += k + 1; 683 689 BoxDimension.x[k] = 2.5 * (configuration->GetIsAngstroem() ? 1. : 1. / AtomicLengthToAngstroem); 684 (*ListRunner)->cell_size[j] += BoxDimension.x[k] * 2.;690 cell_size[j] = BoxDimension.x[k] * 2.; 685 691 } 686 692 (*ListRunner)->Translate(&BoxDimension); … … 724 730 // printing final number 725 731 Log() << Verbose(2) << "Final number of fragments: " << FragmentCounter << "." << endl; 732 733 // restore cell_size 734 for (int i=0;i<6;i++) 735 cell_size[i] = cell_size_backup[i]; 726 736 727 737 return result; -
src/vector.cpp
rc5805a rb34306 15 15 #include "vector.hpp" 16 16 #include "verbose.hpp" 17 #include "World.hpp" 17 18 18 19 #include <gsl/gsl_linalg.h>
Note:
See TracChangeset
for help on using the changeset viewer.