Multi Resolution Molecular Dynamics
0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
RestoreH5MD.hpp
Go to the documentation of this file.
1
// Copyright 2024 Sebastian Eibl
2
// Copyright 2026 Julian Friedrich Hille
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// https://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
16
#pragma once
17
18
#include <string>
19
20
#include "cmake.hpp"
21
#include "
data/Atoms.hpp
"
22
#include "
data/Subdomain.hpp
"
23
#include "
hdf5.hpp
"
24
25
namespace
mrmd::io
26
{
32
class
RestoreH5MD
33
{
34
public
:
35
explicit
RestoreH5MD
(
const
std::string& particleGroupName =
"atoms"
)
36
: particleGroupName_(particleGroupName)
37
{
38
}
39
40
void
restore
(
const
std::string& filename,
41
data::Subdomain
& subdomain,
42
data::Atoms
& atoms,
43
const
idx_t
frameIndex = -1);
44
45
bool
restorePos
=
true
;
46
bool
restoreVel
=
true
;
47
bool
restoreForce
=
true
;
48
bool
restoreType
=
true
;
49
bool
restoreMass
=
true
;
50
bool
restoreCharge
=
true
;
51
bool
restoreRelativeMass
=
true
;
52
53
std::string
posDataset
=
"position"
;
54
std::string
velDataset
=
"velocity"
;
55
std::string
forceDataset
=
"force"
;
56
std::string
typeDataset
=
"type"
;
57
std::string
massDataset
=
"mass"
;
58
std::string
chargeDataset
=
"charge"
;
59
std::string
relativeMassDataset
=
"relativeMass"
;
60
61
private
:
62
template
<
typename
T>
63
void
read(
hid_t
fileId,
64
const
std::string& dataset,
65
std::vector<T>&
data
,
66
const
idx_t
frameIndex);
67
68
std::string particleGroupName_;
69
};
70
71
}
// namespace mrmd::io
Atoms.hpp
Subdomain.hpp
mrmd::io::RestoreH5MD::restoreVel
bool restoreVel
Definition
RestoreH5MD.hpp:46
mrmd::io::RestoreH5MD::restorePos
bool restorePos
Definition
RestoreH5MD.hpp:45
mrmd::io::RestoreH5MD::velDataset
std::string velDataset
Definition
RestoreH5MD.hpp:54
mrmd::io::RestoreH5MD::RestoreH5MD
RestoreH5MD(const std::string &particleGroupName="atoms")
Definition
RestoreH5MD.hpp:35
mrmd::io::RestoreH5MD::chargeDataset
std::string chargeDataset
Definition
RestoreH5MD.hpp:58
mrmd::io::RestoreH5MD::restore
void restore(const std::string &filename, data::Subdomain &subdomain, data::Atoms &atoms, const idx_t frameIndex=-1)
Definition
RestoreH5MD.cpp:224
mrmd::io::RestoreH5MD::restoreMass
bool restoreMass
Definition
RestoreH5MD.hpp:49
mrmd::io::RestoreH5MD::relativeMassDataset
std::string relativeMassDataset
Definition
RestoreH5MD.hpp:59
mrmd::io::RestoreH5MD::restoreCharge
bool restoreCharge
Definition
RestoreH5MD.hpp:50
mrmd::io::RestoreH5MD::massDataset
std::string massDataset
Definition
RestoreH5MD.hpp:57
mrmd::io::RestoreH5MD::restoreType
bool restoreType
Definition
RestoreH5MD.hpp:48
mrmd::io::RestoreH5MD::typeDataset
std::string typeDataset
Definition
RestoreH5MD.hpp:56
mrmd::io::RestoreH5MD::restoreForce
bool restoreForce
Definition
RestoreH5MD.hpp:47
mrmd::io::RestoreH5MD::restoreRelativeMass
bool restoreRelativeMass
Definition
RestoreH5MD.hpp:51
mrmd::io::RestoreH5MD::forceDataset
std::string forceDataset
Definition
RestoreH5MD.hpp:55
mrmd::io::RestoreH5MD::posDataset
std::string posDataset
Definition
RestoreH5MD.hpp:53
hdf5.hpp
mrmd::data
All fundamental data containers used in MRMD.
mrmd::data::Atoms
DeviceAtoms Atoms
Definition
Atoms.hpp:177
mrmd::io
Save and load simulation data.
mrmd::io::hid_t
int hid_t
Definition
hdf5.hpp:72
mrmd::idx_t
int64_t idx_t
Definition
datatypes.hpp:91
mrmd::data::Subdomain
Axis-aligned simulation box with a surrounding ghost layer.
Definition
Subdomain.hpp:46
mrmd
io
RestoreH5MD.hpp
Generated by
1.15.0