Changes in src/config.cpp [29812d:f66195]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/config.cpp
r29812d rf66195 5 5 */ 6 6 7 #include "atom.hpp" 7 8 #include "config.hpp" 9 #include "element.hpp" 8 10 #include "memoryallocator.hpp" 11 #include "molecule.hpp" 12 #include "periodentafel.hpp" 9 13 10 14 /******************************** Functions for class ConfigFileBuffer **********************/ … … 964 968 965 969 // check size of vectors 966 if ( mol->Trajectories[neues].R.size() <= (unsigned int)(repetition)) {970 if (neues->Trajectory.R.size() <= (unsigned int)(repetition)) { 967 971 //cout << "Increasing size for trajectory array of " << keyword << " to " << (repetition+10) << "." << endl; 968 mol->Trajectories[neues].R.resize(repetition+10);969 mol->Trajectories[neues].U.resize(repetition+10);970 mol->Trajectories[neues].F.resize(repetition+10);972 neues->Trajectory.R.resize(repetition+10); 973 neues->Trajectory.U.resize(repetition+10); 974 neues->Trajectory.F.resize(repetition+10); 971 975 } 972 976 973 977 // put into trajectories list 974 978 for (int d=0;d<NDIM;d++) 975 mol->Trajectories[neues].R.at(repetition).x[d] = neues->x.x[d];979 neues->Trajectory.R.at(repetition).x[d] = neues->x.x[d]; 976 980 977 981 // parse velocities if present … … 983 987 neues->v.x[2] = 0.; 984 988 for (int d=0;d<NDIM;d++) 985 mol->Trajectories[neues].U.at(repetition).x[d] = neues->v.x[d];989 neues->Trajectory.U.at(repetition).x[d] = neues->v.x[d]; 986 990 987 991 // parse forces if present … … 993 997 value[2] = 0.; 994 998 for (int d=0;d<NDIM;d++) 995 mol->Trajectories[neues].F.at(repetition).x[d] = value[d];999 neues->Trajectory.F.at(repetition).x[d] = value[d]; 996 1000 997 1001 // cout << "Parsed position of step " << (repetition) << ": ("; 998 1002 // for (int d=0;d<NDIM;d++) 999 // cout << mol->Trajectories[neues].R.at(repetition).x[d] << " "; // next step1003 // cout << neues->Trajectory.R.at(repetition).x[d] << " "; // next step 1000 1004 // cout << ")\t("; 1001 1005 // for (int d=0;d<NDIM;d++) 1002 // cout << mol->Trajectories[neues].U.at(repetition).x[d] << " "; // next step1006 // cout << neues->Trajectory.U.at(repetition).x[d] << " "; // next step 1003 1007 // cout << ")\t("; 1004 1008 // for (int d=0;d<NDIM;d++) 1005 // cout << mol->Trajectories[neues].F.at(repetition).x[d] << " "; // next step1009 // cout << neues->Trajectory.F.at(repetition).x[d] << " "; // next step 1006 1010 // cout << ")" << endl; 1007 1011 } … … 1011 1015 repetition--; 1012 1016 cout << "Found " << repetition << " trajectory steps." << endl; 1013 mol->MDSteps = repetition; 1017 if (repetition <= 1) // if onyl one step, desactivate use of trajectories 1018 mol->MDSteps = 0; 1019 else 1020 mol->MDSteps = repetition; 1014 1021 } else { 1015 1022 // find the maximum number of MD steps so that we may parse last one (Ion_Type1_1 must always be present, because is the first atom)
Note:
See TracChangeset
for help on using the changeset viewer.