source: src/Atom/AtomicInfo.hpp@ c87d6e

AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Enhanced_StructuralOptimization_continued Exclude_Hydrogens_annealWithBondGraph ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity PythonUI_with_named_parameters StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since c87d6e was 6145577, checked in by Frederik Heber <frederik.heber@…>, 7 years ago

FIX: ForceAnnealingAction's Undo is again working.

  • AtomicInfo::setAtom() and SetAtomsFromAtomicInfo() now accept a time step. This allows to undo changes to the old state (where forces might have been passed to) and the current state (modified by time integration).
  • TESTFIX: ForceAnnealing's undo test.conf was no longer valid since the additional time stepping is extracted (and the tests were changed already). I.e. the extra trajectory step is because of step-world-time and not because of force-annealing. Hence, it should not be undone here.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * AtomicInfo.hpp
3 *
4 * Created on: Aug 10, 2010
5 * Author: heber
6 */
7
8#ifndef ATOMICINFO_HPP_
9#define ATOMICINFO_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include "LinearAlgebra/Vector.hpp"
17#include "types.hpp"
18
19#include <vector>
20
21#include "Bond/BondInfo.hpp"
22#include "WorldTime.hpp"
23
24class atom;
25class element;
26class molecule;
27
28/** This is for storing and transfering the information contained within an atom.
29 * This is needed for Undo/Redo operations of AtomActions.
30 */
31class AtomicInfo {
32public:
33 AtomicInfo();
34 AtomicInfo(const atom &_atom, const unsigned int _step = WorldTime::getTime());
35 AtomicInfo(const AtomicInfo &_atominfo);
36 ~AtomicInfo();
37
38 bool setAtom(atom &_atom, const unsigned int _step = WorldTime::getTime()) const;
39 atomId_t getId() const;
40
41 AtomicInfo& operator=(const AtomicInfo&);
42
43private:
44 Vector Position;
45 const element * Type;
46 double charge;
47 Vector Velocity;
48 Vector Force;
49 atomId_t FatherId;
50 moleculeId_t MolId;
51 atomId_t Id;
52 int Nr;
53 std::vector<BondInfo> bonds;
54};
55
56
57#endif /* ATOMICINFO_HPP_ */
Note: See TracBrowser for help on using the repository browser.