votca 2024.2-dev
Loading...
Searching...
No Matches
orb2fchk.cc
Go to the documentation of this file.
1/*
2 * Copyright 2009-2021 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#include "orb2fchk.h"
21
22// Third party includes
23#include <boost/algorithm/string.hpp>
24
25// Local VOTCA includes
27#include "votca/xtp/orbitals.h"
29
30namespace votca {
31namespace xtp {
32
34
36 orbfile_ = job_name_ + ".orb";
37 state_ = options.get(".qmstate").as<QMState>();
38 diff2gs_ = options.get(".diff2gs").as<bool>();
39}
40
44 log_.setCommonPreface("\n... ...");
45
46 Orbitals orbitals;
47 XTP_LOG(Log::error, log_) << "Loading data from " << orbfile_ << std::flush;
49 << "Using density of state: " << state_.ToString() << std::flush;
50 orbitals.ReadFromCpt(orbfile_);
51
52 GaussianWriter writer(log_);
53 writer.WriteFile(basename_, orbitals, state_, diff2gs_);
54
55 return true;
56}
57
58} // namespace xtp
59} // namespace votca
class to manage program options with xml serialization functionality
Definition property.h:55
Property & get(const std::string &key)
get existing property
Definition property.cc:79
T as() const
return value as type
Definition property.h:283
void WriteFile(const std::string &basename, const Orbitals &orbitals, const QMState state=QMState(QMStateType::statetype::Gstate, 0, false), bool diff2gs=false) const
void setReportLevel(Log::Level ReportLevel)
Definition logger.h:185
void setMultithreading(bool maverick)
Definition logger.h:186
void setCommonPreface(const std::string &preface)
Definition logger.h:198
std::string orbfile_
Definition orb2fchk.h:48
std::string basename_
Definition orb2fchk.h:47
void ParseOptions(const tools::Property &options)
Definition orb2fchk.cc:33
container for molecular orbitals
Definition orbitals.h:46
void ReadFromCpt(const std::string &filename)
Definition orbitals.cc:692
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Definition qmstate.h:132
std::string ToString() const
Definition qmstate.cc:146
std::string job_name_
Definition qmtool.h:50
#define XTP_LOG(level, log)
Definition logger.h:40
base class for all analysis tools
Definition basebead.h:33
static Level current_level
Definition globals.h:30