votca 2024-dev
Loading...
Searching...
No Matches
dlpolytopologyreader.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
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 * http://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 */
17
18#ifndef VOTCA_CSG_DLPOLYTOPOLOGYREADER_H
19#define VOTCA_CSG_DLPOLYTOPOLOGYREADER_H
20
21// Standard includes
22#include <string>
23
24// VOTCA includes
26
27// Local VOTCA includes
28#include "votca/csg/topology.h"
30
31namespace votca {
32namespace csg {
33
43 public:
45
58 bool ReadTopology(std::string file, Topology &top) override;
59
61 void setFname(std::string name) {
62 fname_ = name;
63 return;
64 }
66 std::string getFname() { return fname_; }
67
68 private:
69 std::string fname_;
72 std::string NextKeyline_(std::ifstream &fs, const char *wspace);
75 std::string NextKeyInt_(std::ifstream &fs, const char *wspace,
76 const std::string &word, Index &ival);
79 bool isKeyInt_(const std::string &line, const char *wspace,
80 const std::string &word, Index &ival);
81};
82
83} // namespace csg
84} // namespace votca
85
86#endif // VOTCA_CSG_DLPOLYTOPOLOGYREADER_H
class for reading dlpoly topology files
const tools::MolarForceUnit force_unit
void setFname(std::string name)
set the topology file name: name.dlpf (convention: ".dlpf"="FIELD")
std::string NextKeyline_(std::ifstream &fs, const char *wspace)
const tools::MolarEnergyUnit molar_energy_unit
const tools::DistanceUnit distance_unit
Set default units.
std::string getFname()
get the topology file name: name.dlpf (convention: ".dlpf"="FIELD")
bool isKeyInt_(const std::string &line, const char *wspace, const std::string &word, Index &ival)
const tools::VelocityUnit velocity_unit
std::string NextKeyInt_(std::ifstream &fs, const char *wspace, const std::string &word, Index &ival)
bool ReadTopology(std::string file, Topology &top) override
read a topology file
topology of the whole system
Definition topology.h:81
@ kilojoules_per_mole_angstrom
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26