source: src/Atom/AtomicInfo.hpp@ 6145577

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 6145577 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
RevLine 
[e41c48]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
[56f73b]11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
[5cdd83]16#include "LinearAlgebra/Vector.hpp"
17#include "types.hpp"
[56f73b]18
[c26617]19#include <vector>
20
21#include "Bond/BondInfo.hpp"
[6145577]22#include "WorldTime.hpp"
[c26617]23
[e41c48]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();
[6145577]34 AtomicInfo(const atom &_atom, const unsigned int _step = WorldTime::getTime());
[08111a]35 AtomicInfo(const AtomicInfo &_atominfo);
[e41c48]36 ~AtomicInfo();
37
[6145577]38 bool setAtom(atom &_atom, const unsigned int _step = WorldTime::getTime()) const;
[e41c48]39 atomId_t getId() const;
40
41 AtomicInfo& operator=(const AtomicInfo&);
42
43private:
44 Vector Position;
45 const element * Type;
[2034f3]46 double charge;
[e41c48]47 Vector Velocity;
[7e51e1]48 Vector Force;
[3867a7]49 atomId_t FatherId;
50 moleculeId_t MolId;
[e41c48]51 atomId_t Id;
[560bbe]52 int Nr;
[c26617]53 std::vector<BondInfo> bonds;
[e41c48]54};
55
56
57#endif /* ATOMICINFO_HPP_ */
Note: See TracBrowser for help on using the repository browser.