NAMD
Main Page
Namespaces
Classes
Files
File List
File Members
ComputeStir.h
Go to the documentation of this file.
1
7
/* Barry Isralewitz, July 2001 */
8
9
#ifndef COMPUTESTIR_H
10
#define COMPUTESTIR_H
11
12
#include "
ComputeHomePatch.h
"
13
#include "
ReductionMgr.h
"
14
#include "
Vector.h
"
15
#include "
Tensor.h
"
16
17
18
class
ComputeStir
:
public
ComputeHomePatch
19
{
20
21
public
:
22
ComputeStir
(
ComputeID
c,
PatchID
pid);
// Constructor
23
virtual
~ComputeStir
();
// Destructor
24
25
virtual
void
doForce
(
FullAtom
* p,
Results
* r);
26
27
SubmitReduction
*
reduction
;
28
private
:
29
30
Bool
stirOn;
31
BigReal
omega;
//rotation speed in radians/timestep
32
BigReal
startingTheta;
//rotation offset in radians, normally zero
33
// even for restarted runs
34
// since offset is automatically calculated
35
// as omega * firsttimestep
36
// useful to change speeds midrun
37
// or start torque mid-run, without losing
38
// track of timestep for handy bookeeping
39
Tensor
matMult (
Tensor
,
Tensor
);
//multiplies two matrices
40
Tensor
arbRotMat (
BigReal
theta);
//make arbRotation matrix
41
// needs pre/post translation
42
Vector
axisUnit;
//rotation axis direction
43
Vector
pivot;
//rotation axis pivot
44
void
printTensor (
Tensor
&);
//for debug printing
45
void
initVars ();
//initialize the matrices needed
46
BigReal
distanceToRay(
Vector
,
Vector
,
Vector
);
// find dist. to Ray
47
BigReal
findHeight(
Vector
);
//find height along vector
48
Vector
projectionOnRay (
Vector
,
Vector
,
Vector
);
//find projection on ray
49
Vector
placeThetaRadius (
BigReal
,
BigReal
,
BigReal
);
//find point given theta
50
//and radius
51
52
BigReal
findTheta (
Vector
refPos);
53
Tensor
leftMat, rightMat;
// for arbitary rotations and related
54
// coordinate operations
55
61
};
62
63
#endif
64
65
66
67
68
69
70
Results
Definition:
PatchTypes.h:58
ComputeID
int ComputeID
Definition:
NamdTypes.h:183
Vector
Definition:
Vector.h:64
ComputeStir::doForce
virtual void doForce(FullAtom *p, Results *r)
Definition:
ComputeStir.C:288
ComputeStir::reduction
SubmitReduction * reduction
Definition:
ComputeStir.h:27
ComputeStir
Definition:
ComputeStir.h:18
Tensor.h
ComputeHomePatch
Definition:
ComputeHomePatch.h:25
SubmitReduction
Definition:
ReductionMgr.h:304
Bool
int Bool
Definition:
common.h:133
ComputeStir::ComputeStir
ComputeStir(ComputeID c, PatchID pid)
Definition:
ComputeStir.C:19
ReductionMgr.h
PatchID
int PatchID
Definition:
NamdTypes.h:182
FullAtom
Definition:
NamdTypes.h:100
Vector.h
ComputeStir::~ComputeStir
virtual ~ComputeStir()
Definition:
ComputeStir.C:39
ComputeHomePatch.h
Tensor
Definition:
Tensor.h:15
BigReal
double BigReal
Definition:
common.h:114
Generated by
1.8.5