source: src/Fragmentation/Summation/SetValues/FragmentForces.hpp@ 336da8

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator 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_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 336da8 was d200ae, checked in by Frederik Heber <heber@…>, 9 years ago

Added new SetValues FragmentForces.

  • struct is particle_forces used in fusion maps and vectors.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 * FragmentForces.hpp
3 *
4 * Created on: Oct 23, 2014
5 * Author: heber
6 */
7
8#ifndef FRAGMENTFORCES_HPP_
9#define FRAGMENTFORCES_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include <vector>
17
18#include "boost/serialization/export.hpp"
19#include "boost/serialization/vector.hpp"
20
21class FragmentForces : public std::vector< std::vector<double> >
22{
23 //!> let ostream access private parts
24 friend std::ostream & operator<<(std::ostream &ost, const FragmentForces &forces);
25
26public:
27 //!> typedef for a vector with three components
28 typedef std::vector<double> force_t;
29 //!> typedef for a vector containing the force per fragment atom
30 typedef std::vector<force_t> forces_t;
31
32 /** Default constructor for FragmentForces.
33 *
34 */
35 FragmentForces() {}
36
37 /** Equality operator.
38 *
39 * @param other other instance to check against
40 * @return true - both are equal, false - some FragmentForces differ
41 */
42 bool operator==(const FragmentForces& other) const;
43
44 bool operator!=(const FragmentForces& other) const
45 {
46 return (!(*this == other));
47 }
48
49private:
50 friend class boost::serialization::access;
51 // serialization
52 template <typename Archive>
53 void serialize(Archive& ar, const unsigned int version)
54 {
55 ar & boost::serialization::base_object<forces_t>(*this);
56 }
57};
58
59/** Function to print eigenvalues to ostream.
60 *
61 * @param ost output stream
62 * @param eigenvalues set of eigenvalues to print
63 * @return ref to given ostream for concatenation
64 */
65std::ostream & operator<<(std::ostream &ost, const FragmentForces &forces);
66
67// we need to give this class a unique key for serialization
68// its is only serialized through its base class FragmentJob
69BOOST_CLASS_EXPORT_KEY(FragmentForces)
70
71#endif /* FRAGMENTFORCES_HPP_ */
Note: See TracBrowser for help on using the repository browser.