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