votca 2024.1-dev
Loading...
Searching...
No Matches
qmmolecule.cc
Go to the documentation of this file.
1/*
2 * Copyright 2016 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20// VOTCA includes
21#include <votca/csg/pdbwriter.h>
22#include <votca/csg/xyzreader.h>
23#include <votca/csg/xyzwriter.h>
25
26// Local VOTCA includes
30
31using namespace std;
32using namespace votca::tools;
33
34namespace votca {
35namespace xtp {
36
37void QMMolecule::WriteXYZ(std::string filename, std::string header) const {
38 csg::XYZWriter writer;
39 writer.Open(filename, false);
40 writer.Write(*this, header);
41 writer.Close();
42 return;
43}
44
45void QMMolecule::LoadFromFile(std::string filename) {
46 csg::XYZReader reader;
47 reader.Open(filename);
48 reader.ReadFile<QMMolecule>(*this);
49 reader.Close();
50}
51} // namespace xtp
52} // namespace votca
class for reading xyz files
Definition xyzreader.h:46
void ReadFile(T &container)
Definition xyzreader.h:64
bool Open(const std::string &file) override
open a trajectory file
Definition xyzreader.cc:52
void Close() override
Definition xyzreader.cc:62
void Close() override
Definition xyzwriter.cc:32
void Open(std::string file, bool bAppend=false) override
Definition xyzwriter.cc:24
void Write(Topology *conf) override
Definition xyzwriter.cc:34
void LoadFromFile(std::string filename)
Definition qmmolecule.cc:45
void WriteXYZ(std::string filename, std::string header) const
Definition qmmolecule.cc:37
STL namespace.
base class for all analysis tools
Definition basebead.h:33