Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    r29812d rf66195  
    55 */
    66
     7#include "atom.hpp"
    78#include "config.hpp"
     9#include "element.hpp"
    810#include "memoryallocator.hpp"
     11#include "molecule.hpp"
     12#include "periodentafel.hpp"
    913
    1014/******************************** Functions for class ConfigFileBuffer **********************/
     
    964968
    965969            // check size of vectors
    966             if (mol->Trajectories[neues].R.size() <= (unsigned int)(repetition)) {
     970            if (neues->Trajectory.R.size() <= (unsigned int)(repetition)) {
    967971              //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);
    971975            }
    972976
    973977            // put into trajectories list
    974978            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];
    976980
    977981            // parse velocities if present
     
    983987              neues->v.x[2] = 0.;
    984988            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];
    986990
    987991            // parse forces if present
     
    993997              value[2] = 0.;
    994998            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];
    9961000
    9971001  //            cout << "Parsed position of step " << (repetition) << ": (";
    9981002  //            for (int d=0;d<NDIM;d++)
    999   //              cout << mol->Trajectories[neues].R.at(repetition).x[d] << " ";          // next step
     1003  //              cout << neues->Trajectory.R.at(repetition).x[d] << " ";          // next step
    10001004  //            cout << ")\t(";
    10011005  //            for (int d=0;d<NDIM;d++)
    1002   //              cout << mol->Trajectories[neues].U.at(repetition).x[d] << " ";          // next step
     1006  //              cout << neues->Trajectory.U.at(repetition).x[d] << " ";          // next step
    10031007  //            cout << ")\t(";
    10041008  //            for (int d=0;d<NDIM;d++)
    1005   //              cout << mol->Trajectories[neues].F.at(repetition).x[d] << " ";          // next step
     1009  //              cout << neues->Trajectory.F.at(repetition).x[d] << " ";          // next step
    10061010  //            cout << ")" << endl;
    10071011          }
     
    10111015      repetition--;
    10121016      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;
    10141021    } else {
    10151022      // 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.