NAMD
Main Page
Namespaces
Classes
Files
File List
File Members
ComputeAngles.inl
Go to the documentation of this file.
1
7
#ifndef COMPUTEANGLE_INL
8
#define COMPUTEANGLE_INL
9
10
#include "
ComputeAngles.h
"
11
12
inline
AngleElem::AngleElem
() { ; }
13
14
inline
AngleElem::AngleElem
(
AtomID
atom0,
const
TupleSignature
*sig,
const
AngleValue
*v){
15
atomID
[0] = atom0;
16
atomID
[1] = atom0 + sig->
offset
[0];
17
atomID
[2] = atom0 + sig->
offset
[1];
18
value
= &v[sig->
tupleParamType
];
19
}
20
21
inline
AngleElem::AngleElem
(
const
Angle
*a,
const
AngleValue
*v)
22
{
23
atomID
[0] = a->
atom1
;
24
atomID
[1] = a->
atom2
;
25
atomID
[2] = a->
atom3
;
26
value
= &v[a->
angle_type
];
27
}
28
29
inline
AngleElem::AngleElem
(
AtomID
atom0,
AtomID
atom1,
AtomID
atom2)
30
{
31
if
(atom0 > atom2) {
// Swap end atoms so lowest is first!
32
AtomID
tmp = atom2; atom2 = atom0; atom0 = tmp;
33
}
34
atomID
[0] = atom0;
35
atomID
[1] = atom1;
36
atomID
[2] = atom2;
37
}
38
39
inline
int
AngleElem::operator==
(
const
AngleElem
&a)
const
40
{
41
return
(a.
atomID
[0] ==
atomID
[0] && a.
atomID
[1] ==
atomID
[1] &&
42
a.
atomID
[2] ==
atomID
[2]);
43
}
44
45
inline
int
AngleElem::operator<
(
const
AngleElem
&a)
const
46
{
47
return
(
atomID
[0] < a.
atomID
[0] ||
48
(
atomID
[0] == a.
atomID
[0] &&
49
(
atomID
[1] < a.
atomID
[1] ||
50
(
atomID
[1] == a.
atomID
[1] &&
51
atomID
[2] < a.
atomID
[2]) )));
52
}
53
54
#endif
55
AngleElem::AngleElem
AngleElem()
Definition:
ComputeAngles.inl:12
AtomID
int AtomID
Definition:
NamdTypes.h:29
AngleElem::operator<
int operator<(const AngleElem &a) const
Definition:
ComputeAngles.inl:45
AngleElem
Definition:
ComputeAngles.h:16
angle::atom2
int32 atom2
Definition:
structures.h:56
angle::atom1
int32 atom1
Definition:
structures.h:55
AngleElem::atomID
AtomID atomID[size]
Definition:
ComputeAngles.h:20
angle::atom3
int32 atom3
Definition:
structures.h:57
AngleValue
Definition:
Parameters.h:91
TupleSignature
Definition:
structures.h:192
angle::angle_type
Index angle_type
Definition:
structures.h:58
AngleElem::operator==
int operator==(const AngleElem &a) const
Definition:
ComputeAngles.inl:39
angle
Definition:
structures.h:53
ComputeAngles.h
TupleSignature::tupleParamType
Index tupleParamType
Definition:
structures.h:202
TupleSignature::offset
int * offset
Definition:
structures.h:198
AngleElem::value
const AngleValue * value
Definition:
ComputeAngles.h:40
Generated by
1.8.5