source: src/Fragmentation/Homology/unittests/stubs/FragmentStub.cpp@ 8d5db8

Fix_FitPotential_needs_atomicnumbers
Last change on this file since 8d5db8 was 8d5db8, checked in by Frederik Heber <heber@…>, 9 years ago

MPQCData additionally stores the atomic number per nuclei.

  • Property mode set to 100644
File size: 4.3 KB
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2012 University of Bonn. All rights reserved.
5 * Copyright (C) 2013 Frederik Heber. All rights reserved.
6 * Please see the COPYING file or "Copyright notice" in builder.cpp for details.
7 *
8 *
9 * This file is part of MoleCuilder.
10 *
11 * MoleCuilder is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * MoleCuilder is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with MoleCuilder. If not, see <http://www.gnu.org/licenses/>.
23 */
24
25/*
26 * FragmentMock.cpp
27 *
28 * Created on: Dec 20, 2012
29 * Author: heber
30 */
31
32
33// include config.h
34#ifdef HAVE_CONFIG_H
35#include <config.h>
36#endif
37
38// include headers that implement a archive in simple text format
39// otherwise BOOST_CLASS_EXPORT_IMPLEMENT has no effect
40#include <boost/archive/text_oarchive.hpp>
41#include <boost/archive/text_iarchive.hpp>
42
43#include "CodePatterns/MemDebug.hpp"
44
45#include "Fragmentation/Summation/SetValues/Fragment.hpp"
46
47#include <iostream>
48#include <vector>
49
50/** Default constructor of class Fragment.
51 *
52 */
53Fragment::Fragment() {}
54
55/** Constructor of class Fragment.
56 *
57 * @param _positions given positions
58 * @param _atomicnumbers given atomic numbers
59 * @param _charges given charges
60 */
61Fragment::Fragment(
62 const positions_t &_positions,
63 const atomicnumbers_t &_atomicnumbers,
64 const charges_t &_charges)
65{}
66
67/** Adding another fragment onto this one.
68 *
69 * \note The operation is area-conserving, i.e. the new area is the sum of
70 * both areas.
71 *
72 * @param other other fragment
73 * @return ref to this instance
74 */
75Fragment& Fragment::operator+=(const Fragment &other)
76 { return *this; }
77
78/** Assignment operator.
79 *
80 * @param other other fragment to make ourselves equal to
81 * @return ref to this instance
82 */
83Fragment& Fragment::operator=(const Fragment &other)
84{ return *this; }
85
86/** Subtracting another fragment from this one.
87 *
88 * @param other other fragment
89 * @return ref to this instance
90 */
91Fragment& Fragment::operator-=(const Fragment &other)
92{ return *this; }
93
94/** Getter for all stored positions.
95 *
96 * @return vector of positions
97 */
98Fragment::positions_t Fragment::getPositions() const
99{ return positions_t(); }
100
101/** Getter for all stored atomic numbers.
102 *
103 * @return vector of atomic numbers
104 */
105Fragment::atomicnumbers_t Fragment::getAtomicNumbers() const
106{ return atomicnumbers_t(); }
107
108/** Getter for all stored charges.
109 *
110 * @return vector of charges
111 */
112Fragment::charges_t Fragment::getCharges() const
113{ return charges_t(); }
114
115/** Equality operator.
116 *
117 * @param other other instance to check against
118 * @return true - both are equal, false - some nucleus_t differ
119 */
120bool Fragment::operator==(const Fragment& other) const
121{ return true; }
122
123/** Creates type nucleus_t from given \a position and \a charge.
124 *
125 * @param position position of nucleus to create
126 * @param charge charge of nucleus to create
127 * @return nucleus with given \a position and \a charge
128 */
129// static nucleus_t Fragment::createNucleus(const position_t &position, const double charge);
130
131/** Helper function to check whether two positions are equal.
132 *
133 * @param a first position
134 * @param b second position
135 * @return a equals b within numerical precision
136 */
137// static bool Fragment::isPositionEqual(const position_t &a, const position_t &b);
138
139//
140//// we need to explicitly instantiate the serialization functions
141//BOOST_CLASS_EXPORT_IMPLEMENT(Fragment)
142
143/** Equality operator for two nuclei.
144 *
145 * @param a first nuclei
146 * @param b second nuclei
147 * @return true - both have same position and charge, false - either charge or position is different
148 */
149bool operator==(const Fragment::nucleus_t &a, const Fragment::nucleus_t &b)
150{ return true; }
151
152std::ostream & operator<<(std::ostream &ost, const Fragment::nucleus_t &n)
153{ return ost; }
154
155std::ostream & operator<<(std::ostream &ost, const Fragment &f)
156{ return ost; }
Note: See TracBrowser for help on using the repository browser.