Ignore:
Timestamp:
Oct 9, 2009, 2:35:14 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
7c2f6b
Parents:
e71890
Message:

First half of molecule_dynamics.cpp is refactored into smaller parts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/atom.cpp

    re71890 r104cf4  
    99#include "element.hpp"
    1010#include "memoryallocator.hpp"
     11#include "parser.hpp"
    1112#include "vector.hpp"
    1213
     
    297298};
    298299
     300/** Evaluates some constraint potential if atom moves from \a startstep at once to \endstep in trajectory.
     301 * \param startstep trajectory begins at
     302 * \param endstep trajectory ends at
     303 * \param **PermutationMap if atom switches places with some other atom, there is no translation but a permutaton noted here (not in the trajectories of each).
     304 * \param *Force Force matrix to store result in
     305 */
     306void atom::EvaluateConstrainedForce(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force)
     307{
     308  double constant = 10.;
     309  atom *Sprinter = PermutationMap[nr];
     310  // set forces
     311  for (int i=NDIM;i++;)
     312    Force->Matrix[0][nr][5+i] += 2.*constant*sqrt(Trajectory.R.at(startstep).Distance(&Sprinter->Trajectory.R.at(endstep)));
     313};
Note: See TracChangeset for help on using the changeset viewer.