Candidate_v1.7.0
stable
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * StretchBond.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Oct 4, 2020
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 | #ifndef BOND_STRETCHBOND_HPP_
|
|---|
| 10 | #define BOND_STRETCHBOND_HPP_
|
|---|
| 11 |
|
|---|
| 12 | // include config.h
|
|---|
| 13 | #ifdef HAVE_CONFIG_H
|
|---|
| 14 | #include <config.h>
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | #include <vector>
|
|---|
| 18 |
|
|---|
| 19 | #include "LinearAlgebra/Vector.hpp"
|
|---|
| 20 |
|
|---|
| 21 | #include "Graph/BoostGraphHelpers.hpp"
|
|---|
| 22 | #include "types.hpp"
|
|---|
| 23 |
|
|---|
| 24 | class atom;
|
|---|
| 25 | class bond;
|
|---|
| 26 | class Box;
|
|---|
| 27 | class molecule;
|
|---|
| 28 |
|
|---|
| 29 | /**
|
|---|
| 30 | * Helper class for stretching bonds in a molecule.
|
|---|
| 31 | */
|
|---|
| 32 | class StretchBondUtil {
|
|---|
| 33 | public:
|
|---|
| 34 | StretchBondUtil(const std::vector< atom *> atoms);
|
|---|
| 35 |
|
|---|
| 36 | /**
|
|---|
| 37 | * Stretches the bond of two given atoms.
|
|---|
| 38 | *
|
|---|
| 39 | */
|
|---|
| 40 | bool operator()(const double newdistance);
|
|---|
| 41 |
|
|---|
| 42 | const std::vector<Vector>& getShift() const { return Shift; }
|
|---|
| 43 |
|
|---|
| 44 | double getOldDistance() const { return olddistance; }
|
|---|
| 45 |
|
|---|
| 46 | const std::vector< BoostGraphHelpers::Nodeset_t > & getBondSides() const { return bondside_sets; }
|
|---|
| 47 |
|
|---|
| 48 | const molecule & getMolecule() const { return *mol; }
|
|---|
| 49 |
|
|---|
| 50 | private:
|
|---|
| 51 | static bool addEdgePredicate(
|
|---|
| 52 | const bond &_bond,
|
|---|
| 53 | const std::vector<atomId_t> &_atomids);
|
|---|
| 54 |
|
|---|
| 55 | const std::vector< atom *> atoms;
|
|---|
| 56 | molecule *mol;
|
|---|
| 57 | double olddistance;
|
|---|
| 58 | std::vector<Vector> Shift;
|
|---|
| 59 | std::vector<atomId_t> atomids;
|
|---|
| 60 | const Box &domain;
|
|---|
| 61 |
|
|---|
| 62 | std::vector< BoostGraphHelpers::Nodeset_t > bondside_sets;
|
|---|
| 63 | };
|
|---|
| 64 |
|
|---|
| 65 | #endif /* BOND_STRETCHBOND_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.