NAMD
ComputeAniso.inl
Go to the documentation of this file.
1
7
#ifndef COMPUTEANISO_INL
8
#define COMPUTEANISO_INL
9
10
#include "
ComputeAniso.h
"
11
12
inline
AnisoElem::AnisoElem
() { ; }
13
14
inline
AnisoElem::AnisoElem
(
AtomID
atom0,
const
TupleSignature
*sig,
const
AnisoValue
*v){
15
NAMD_die
(
"Can't use Aniso with memory optimized version of NAMD."
);
16
// atomID[0] = atom0;
17
// atomID[1] = atom0 + sig->offset[0];
18
// atomID[2] = atom0 + sig->offset[1];
19
// atomID[3] = atom0 + sig->offset[2];
20
// value = &v[sig->tupleParamType];
21
}
22
23
inline
AnisoElem::AnisoElem
(
const
Aniso
*a,
const
AnisoValue
*v)
24
{
25
atomID
[0] = a->
atom1
;
26
atomID
[1] = a->
atom2
;
27
atomID
[2] = a->
atom3
;
28
atomID
[3] = a->
atom4
;
29
value
= a;
// expect v to be NULL
30
}
31
32
inline
AnisoElem::AnisoElem
(
AtomID
atom0,
AtomID
atom1,
33
AtomID
atom2,
AtomID
atom3)
34
{
35
// do not rearrange atom ordering of Aniso
36
// the first atom is special
37
atomID
[0] = atom0;
38
atomID
[1] = atom1;
39
atomID
[2] = atom2;
40
atomID
[3] = atom3;
41
}
42
43
inline
int
AnisoElem::operator==
(
const
AnisoElem
&a)
const
44
{
45
return
(a.
atomID
[0] ==
atomID
[0] && a.
atomID
[1] ==
atomID
[1] &&
46
a.
atomID
[2] ==
atomID
[2] && a.
atomID
[3] ==
atomID
[3]);
47
}
48
49
inline
int
AnisoElem::operator<
(
const
AnisoElem
&a)
const
50
{
51
return
(
atomID
[0] < a.
atomID
[0] ||
52
(
atomID
[0] == a.
atomID
[0] &&
53
(
atomID
[1] < a.
atomID
[1] ||
54
(
atomID
[1] == a.
atomID
[1] &&
55
(
atomID
[2] < a.
atomID
[2] ||
56
(
atomID
[2] == a.
atomID
[2] &&
57
atomID
[3] < a.
atomID
[3]
58
))))));
59
}
60
61
#endif
62
AnisoElem::AnisoElem
AnisoElem()
Definition:
ComputeAniso.inl:12
AnisoElem
Definition:
ComputeAniso.h:18
aniso
Definition:
structures.h:132
aniso::atom2
int32 atom2
Definition:
structures.h:135
aniso::atom3
int32 atom3
Definition:
structures.h:136
AnisoElem::operator<
int operator<(const AnisoElem &a) const
Definition:
ComputeAniso.inl:49
TupleSignature
Definition:
structures.h:194
NAMD_die
void NAMD_die(const char *err_msg)
Definition:
common.C:147
ComputeAniso.h
aniso::atom1
int32 atom1
Definition:
structures.h:134
AtomID
int32 AtomID
Definition:
NamdTypes.h:35
AnisoElem::atomID
AtomID atomID[size]
Definition:
ComputeAniso.h:22
AnisoElem::operator==
int operator==(const AnisoElem &a) const
Definition:
ComputeAniso.inl:43
aniso::atom4
int32 atom4
Definition:
structures.h:137
AnisoElem::value
const AnisoValue * value
Definition:
ComputeAniso.h:43
Generated by
1.8.14