- Timestamp:
- Apr 10, 2018, 6:43:12 AM (7 years ago)
- Branches:
- 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
- Children:
- 6145577
- Parents:
- efd020
- git-author:
- Frederik Heber <frederik.heber@…> (08/03/17 10:46:48)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/10/18 06:43:12)
- Location:
- src/Atom
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Atom/TesselPoint.cpp
refd020 r8c6b68 58 58 }; 59 59 60 void TesselPoint::removeStep (const unsigned int _step)60 void TesselPoint::removeSteps(const unsigned int _firststep, const unsigned int _laststep) 61 61 { 62 ASSERT(0, "TesselPoint::removeStep () should never be called, TesselPoints don't have trajectories.");63 AtomInfo::removeTrajectoryStep (_step);62 ASSERT(0, "TesselPoint::removeSteps() should never be called, TesselPoints don't have trajectories."); 63 AtomInfo::removeTrajectorySteps(_firststep, _laststep); 64 64 }; 65 65 -
src/Atom/TesselPoint.hpp
refd020 r8c6b68 43 43 * This allows to decrease all trajectories contained in different classes 44 44 * by one consistently. This is implemented by the topmost class which calls 45 * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses. 45 * the real functions, \sa removeTrajectorySteps(), by all necessary subclasses. 46 * 47 * \param _firststep first step in interval to be removed 48 * \param _laststep last step in interval to be removed 46 49 */ 47 virtual void removeStep (const unsigned int _step);50 virtual void removeSteps(const unsigned int _firststep, const unsigned int _laststep); 48 51 49 52 /** Getter for this. -
src/Atom/atom.cpp
refd020 r8c6b68 108 108 } 109 109 110 void atom::removeStep (const unsigned int _step)111 { 112 LOG(4,"atom::removeStep () called.");110 void atom::removeSteps(const unsigned int _firststep, const unsigned int _laststep) 111 { 112 LOG(4,"atom::removeSteps() called."); 113 113 // append to position, velocity and force vector 114 AtomInfo::removeTrajectoryStep (_step);114 AtomInfo::removeTrajectorySteps(_firststep, _laststep); 115 115 // append to ListOfBonds vector 116 BondedParticleInfo::removeTrajectoryStep (_step);116 BondedParticleInfo::removeTrajectorySteps(_firststep, _laststep); 117 117 } 118 118 -
src/Atom/atom.hpp
refd020 r8c6b68 79 79 * This allows to decrease all trajectories contained in different classes 80 80 * by one consistently. This is implemented by the topmost class which calls 81 * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses. 82 */ 83 virtual void removeStep(const unsigned int _step); 81 * the real functions, \sa removeTrajectorySteps(), by all necessary subclasses. 82 * 83 * \param _firststep first step in interval to be removed 84 * \param _laststep last step in interval to be removed 85 */ 86 virtual void removeSteps(const unsigned int _firststep, const unsigned int _laststep); 84 87 85 88 /** Output of a single atom with given numbering. -
src/Atom/atom_atominfo.cpp
refd020 r8c6b68 101 101 } 102 102 103 void AtomInfo::removeTrajectoryStep(const unsigned int _step) 103 void AtomInfo::eraseInTrajctory( 104 VectorTrajectory_t &_trajectory, 105 const unsigned int _firststep, const unsigned int _laststep) 106 { 107 const VectorTrajectory_t::iterator firstiter = _trajectory.lower_bound(_firststep); 108 const VectorTrajectory_t::iterator lastiter = _trajectory.upper_bound(_laststep); 109 _trajectory.erase(firstiter, lastiter); 110 } 111 112 void AtomInfo::removeTrajectorySteps(const unsigned int _firststep, const unsigned int _laststep) 104 113 { 105 114 NOTIFY(TrajectoryChanged); 106 AtomicPosition.erase(_step);107 AtomicVelocity.erase(_step);108 AtomicForce.erase(_step);109 LOG(5,"AtomInfo::removeTrajectoryStep () called, size is ("115 eraseInTrajctory(AtomicPosition, _firststep, _laststep); 116 eraseInTrajctory(AtomicVelocity, _firststep, _laststep); 117 eraseInTrajctory(AtomicForce, _firststep, _laststep); 118 LOG(5,"AtomInfo::removeTrajectorySteps() called, size is (" 110 119 << AtomicPosition.size() << "," 111 120 << AtomicVelocity.size() << "," -
src/Atom/atom_atominfo.hpp
refd020 r8c6b68 58 58 virtual void UpdateStep(const unsigned int _step)=0; 59 59 60 /** Pops the last stepin all trajectory vectors.60 /** Pops all steps in the interval [\a _firststep, \a _laststep] in all trajectory vectors. 61 61 * 62 62 * This allows to decrease all trajectories contained in different classes 63 63 * by one consistently. This is implemented by the topmost class which calls 64 * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses. 65 */ 66 virtual void removeStep(const unsigned int _step)=0; 64 * the real functions, \sa removeTrajectorySteps(), by all necessary subclasses. 65 * 66 * \param _firststep first step in interval to be removed 67 * \param _laststep last step in interval to be removed 68 */ 69 virtual void removeSteps(const unsigned int _firststep, const unsigned int _laststep)=0; 67 70 68 71 /** DEPRECATED: Getter for element indicated by AtomicElement. … … 314 317 /** Function used by this and inheriting classes to decrease the trajectory 315 318 * vectors by one. 316 */ 317 void removeTrajectoryStep(const unsigned int _step); 319 * 320 * \param _firststep first step in interval to be removed 321 * \param _laststep last step in interval to be removed 322 */ 323 void removeTrajectorySteps(const unsigned int _firststep, const unsigned int _laststep); 318 324 319 325 // make these protected only such that deriving atom class still has full … … 325 331 VectorTrajectory_t AtomicVelocity; //!< velocity vector of atom, giving last velocity within cell 326 332 VectorTrajectory_t AtomicForce; //!< Force vector of atom, giving last force within cell 333 334 /** Helper function to avoid an interval of steps in VectorTrajectory_t. 335 * 336 * \param _trajectory trajectory to remove in 337 * \param _firststep first step in interval to be removed 338 * \param _laststep last step in interval to be removed 339 */ 340 static void eraseInTrajctory( 341 VectorTrajectory_t &_trajectory, 342 const unsigned int _firststep, const unsigned int _laststep); 327 343 328 344 private: -
src/Atom/atom_bondedparticleinfo.cpp
refd020 r8c6b68 51 51 } 52 52 53 void BondedParticleInfo::removeTrajectoryStep (const unsigned int _step)53 void BondedParticleInfo::removeTrajectorySteps(const unsigned int _firststep, const unsigned int _laststep) 54 54 { 55 ListOfBonds.erase(_step); 56 LOG(5,"BondedParticleInfo::removeTrajectoryStep() called, size is " << ListOfBonds.size()); 55 const BondTrajectory_t::iterator firstiter = ListOfBonds.lower_bound(_firststep); 56 const BondTrajectory_t::iterator lastiter = ListOfBonds.upper_bound(_laststep); 57 ListOfBonds.erase(firstiter, lastiter); 58 LOG(5,"BondedParticleInfo::removeTrajectorySteps() called, size is " << ListOfBonds.size()); 57 59 } 58 60 -
src/Atom/atom_bondedparticleinfo.hpp
refd020 r8c6b68 52 52 * This allows to decrease all trajectories contained in different classes 53 53 * by one consistently. This is implemented by the topmost class which calls 54 * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses. 54 * the real functions, \sa removeTrajectorySteps(), by all necessary subclasses. 55 * 56 * \param _firststep first step in interval to be removed 57 * \param _laststep last step in interval to be removed 55 58 */ 56 virtual void removeStep (const unsigned int _step)=0;59 virtual void removeSteps(const unsigned int _firststep, const unsigned int _laststep)=0; 57 60 58 61 /** Const accessor to ListOfBonds of WorldTime::CurrentTime. … … 131 134 /** Function used by this and inheriting classes to reduce the ListOfBonds 132 135 * vector by one. 136 * 137 * \param _firststep first step in interval to be removed 138 * \param _laststep last step in interval to be removed 133 139 */ 134 void removeTrajectoryStep (const unsigned int _step);140 void removeTrajectorySteps(const unsigned int _firststep, const unsigned int _laststep); 135 141 136 142 typedef std::map<unsigned int, BondList> BondTrajectory_t;
Note:
See TracChangeset
for help on using the changeset viewer.