Settle.h

Go to the documentation of this file.
00001 
00007 #ifndef SETTLE_H__
00008 #define SETTLE_H__
00009 
00010 #include "Vector.h"
00011 #include "Tensor.h"
00012 
00013 /*
00014 
00015 Oxygen at a0, hydrogens at b0, c0, center of mass at the origin.
00016 
00017                    |
00018                    |
00019                    |
00020                 a0 .-------
00021                    |   |
00022                    |   ra
00023                    |   | 
00024 ---------------------------------------
00025            |       |        |
00026            rb      |---rc---|
00027            |       |        |
00028     b0 .-----------|        c0 .
00029   
00030 SETTLE for step one of velocity verlet.
00031 ref: positions before unconstrained step
00032 mass: masses
00033 pos: on input: positions after unconstrained step; on output: the new 
00034                positions.
00035 vel: on input: velocities after unconstrained step; on output: the new
00036                velocities.
00037 ra, rb, rc: canonical positions of water atoms; see above diagram
00038 */
00039 
00041 void settle1init(BigReal pmO, BigReal pmH, BigReal hhdist, BigReal ohdist,
00042                  BigReal &mOrmT, BigReal &mHrmT, BigReal &ra,
00043                  BigReal &rb, BigReal &rc, BigReal &rra);
00044 
00046 int settle1(const Vector *ref, Vector *pos, Vector *vel, BigReal invdt,
00047                  BigReal mOrmT, BigReal mHrmT, BigReal ra,
00048                  BigReal rb, BigReal rc, BigReal rra);
00049 
00050 template <int veclen>
00051 void settle1_SIMD(const Vector *ref, Vector *pos,
00052   BigReal mOrmT, BigReal mHrmT, BigReal ra,
00053   BigReal rb, BigReal rc, BigReal rra);
00054 
00055 struct RattleParam {
00056   int ia;
00057   int ib;
00058   BigReal dsq;
00059   BigReal rma;
00060   BigReal rmb;
00061 };
00062 
00063 template <int veclen>
00064 void rattlePair(const RattleParam* rattleParam,
00065   const BigReal *refx, const BigReal *refy, const BigReal *refz,
00066   BigReal *posx, BigReal *posy, BigReal *posz);
00067 
00068 void rattleN(const int icnt, const RattleParam* rattleParam,
00069   const BigReal *refx, const BigReal *refy, const BigReal *refz,
00070   BigReal *posx, BigReal *posy, BigReal *posz,
00071   const BigReal tol2, const int maxiter,
00072   bool& done, bool& consFailure);
00073 
00074 extern int settle2(BigReal mO, BigReal mH, const Vector *pos,
00075                    Vector *vel, BigReal dt, Tensor *virial); 
00076 #endif

Generated on Tue Nov 21 01:17:15 2017 for NAMD by  doxygen 1.4.7