Simpatico
v1.10
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
src
ddMd
configIos
DdMdOrderedConfigIo.h
1
#ifndef DDMD_DDMD_ORDERED_CONFIG_IO_H
2
#define DDMD_DDMD_ORDERED_CONFIG_IO_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
#include <ddMd/configIos/ConfigIo.h>
12
#include <util/space/Vector.h>
13
14
#include <vector>
15
16
namespace
DdMd
17
{
18
19
class
Simulation;
20
21
using namespace
Util
;
22
32
class
DdMdOrderedConfigIo
:
public
ConfigIo
33
{
34
35
public
:
36
42
DdMdOrderedConfigIo
(
bool
hasMolecules);
43
50
DdMdOrderedConfigIo
(
Simulation
& simulation,
bool
hasMolecules);
51
67
virtual
void
readConfig(std::ifstream& file,
MaskPolicy
maskPolicy);
68
78
virtual
void
writeConfig(std::ofstream& file);
79
80
private
:
81
82
/*
83
* Struct for atom data required in file format.
84
*/
85
struct
IoAtom {
86
87
Vector
position;
88
Vector
velocity;
89
int
typeId;
90
int
id;
91
AtomContext
context;
92
93
IoAtom()
94
: position(0.0),
95
velocity(0.0),
96
typeId(-1),
97
id(-1)
98
{}
99
100
};
101
102
/*
103
* Struct containing a Group<N> and a group id.
104
*/
105
template
<
int
N>
106
struct
IoGroup {
107
int
id;
108
Group<N>
group;
109
};
110
114
std::vector<IoAtom> atoms_;
115
119
bool
hasMolecules_;
120
126
template
<
int
N>
127
void
readGroups(std::ifstream& file,
128
const
char
* sectionLabel,
const
char
* nGroupLabel,
129
GroupDistributor<N>
& distributor);
130
136
template
<
int
N>
137
int
writeGroups(std::ofstream& file,
138
const
char
* sectionLabel,
const
char
* nGroupLabel,
139
GroupStorage<N>
& storage,
GroupCollector<N>
& collector);
140
141
};
142
143
}
144
#endif
Util::Vector
A Vector is a Cartesian vector.
Definition:
Vector.h:75
DdMd
Parallel domain decomposition (DD) MD simulation.
Definition:
ddMd/analyzers/Analyzer.cpp:12
DdMd::Simulation
Main object for a domain-decomposition MD simulation.
Definition:
ddMd/simulation/Simulation.h:84
DdMd::DdMdOrderedConfigIo
Native / default format for configuration files.
Definition:
DdMdOrderedConfigIo.h:32
DdMd::AtomContext
Descriptor for context of an Atom within a molecule and species.
Definition:
AtomContext.h:21
DdMd::GroupCollector
Class for collecting Groups from processors to master processor.
Definition:
ddMd/analyzers/trajectory/TrajectoryWriter.h:30
Util
Utility classes for scientific computation.
Definition:
accumulators.mod:1
DdMd::MaskPolicy
MaskPolicy
Enumeration of policies for suppressing ("masking") some pair interactions.
Definition:
ddMd/chemistry/MaskPolicy.h:29
DdMd::GroupStorage
A container for all the Group<N> objects on this processor.
Definition:
GroupCollector.h:21
DdMd::ConfigIo
Abstract reader/writer for configuration files.
Definition:
ddMd/configIos/ConfigIo.h:49
DdMd::Group
A group of covalently interacting atoms.
Definition:
ddMd/chemistry/Group.h:22
DdMd::GroupDistributor
Class template for distributing Group<N> objects among processors.
Definition:
GroupDistributor.h:91
Generated on Wed Mar 7 2018 12:59:38 for Simpatico by
1.8.11