1 /* 2 * Copyright 2009-2020 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 #pragma once 21 #ifndef VOTCA_XTP_DELTAQ_FILTER_H 22 #define VOTCA_XTP_DELTAQ_FILTER_H 23 24 // Local VOTCA includes 25 #include "votca/xtp/qmfragment.h" 26 #include "votca/xtp/statefilter_base.h" 27 28 namespace votca { 29 namespace xtp { 30 31 /** 32 \brief ChargeTransfer_filter 33 tracks states according to how much charge is 34 on a fragment A and the rest of the molecule 35 */ 36 37 class DeltaQ_filter : public StateFilter_base { 38 public: Identify()39 std::string Identify() const final { return "chargetransfer"; } 40 41 void Initialize(const tools::Property& options) final; 42 43 void Info(Logger& log) const final; 44 NeedsInitialState()45 bool NeedsInitialState() const final { return false; } 46 47 void UpdateHist(const Orbitals& orb, QMState state) final; 48 49 std::vector<Index> CalcIndeces(const Orbitals& orb, 50 QMStateType type) const final; 51 52 void WriteToCpt(CheckpointWriter& w) final; 53 54 void ReadFromCpt(CheckpointReader& r) final; 55 56 private: 57 QMFragment<double> fragment_; 58 }; 59 60 } // namespace xtp 61 } // namespace votca 62 63 #endif // VOTCA_XTP_DELTAQ_FILTER_H 64