Simpatico
v1.10
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
src
tools
chemistry
tools/chemistry/Group.h
1
#ifndef TOOLS_GROUP_H
2
#define TOOLS_GROUP_H
3
4
/*
5
* Simpatico - Simulation Package for Polymeric and Molecular Liquids
6
*
7
* Copyright 2010 - 2017, The Regents of the University of Minnesota
8
* Distributed under the terms of the GNU General Public License.
9
*/
10
11
namespace
Tools
12
{
13
19
template
<
int
N>
20
class
Group
21
{
22
public
:
23
27
int
atomIds
[N];
28
32
int
typeId
;
33
37
int
id
;
38
39
};
40
41
42
// Associated function declarations
43
51
template
<
int
N>
52
std::istream&
operator>>
(std::istream& in,
Group<N>
&group)
53
{
54
in >> group.
id
;
55
in >> group.
typeId
;
56
for
(
int
i=0; i < N; ++i) {
57
in >> group.
atomIds
[i];
58
}
59
return
in;
60
}
61
71
template
<
int
N>
72
std::ostream& operator << (std::ostream& out, const Group<N> &group)
73
{
74
out.width(10);
75
out << group.id;
76
out.width(10);
77
out << group.typeId;
78
for
(
int
i = 0; i < N; ++i) {
79
out.width(10);
80
out << group.atomIds[i];
81
}
82
return
out;
83
}
84
85
}
86
#endif
Tools::Group::typeId
int typeId
Integer index for the type of group.
Definition:
tools/chemistry/Group.h:32
Tools::operator>>
std::istream & operator>>(std::istream &in, Group< N > &group)
istream extractor (>>) for a Group.
Definition:
tools/chemistry/Group.h:52
Tools::Group::atomIds
int atomIds[N]
Array of integer ids of atoms in this group.
Definition:
tools/chemistry/Group.h:27
Tools
Single-processor classes for pre- and post-processing MD trajectories.
Definition:
tools/analyzers/Analyzer.cpp:13
Tools::Group
A group of covalently interacting atoms.
Definition:
tools/chemistry/Group.h:20
Tools::Group::id
int id
Global id for this group.
Definition:
tools/chemistry/Group.h:37
Generated on Wed Mar 7 2018 12:59:39 for Simpatico by
1.8.11