source: src/Fragmentation/Homology/unittests/stubs/FragmentStub.cpp@ 312c0d

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since 312c0d was 312c0d, checked in by Frederik Heber <heber@…>, 12 years ago

FIX: HomologyContainerUnitTest does not require libMolecuilderUI anymore.

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