Changeset 38bcbe
- Timestamp:
- Apr 23, 2021, 8:43:27 PM (5 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- ea30e6
- Parents:
- 4de4f6
- git-author:
- Frederik Heber <frederik.heber@…> (10/04/20 21:45:25)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/23/21 20:43:27)
- Files:
-
- 4 edited
-
doc/userguide/userguide.xml (modified) (1 diff)
-
src/Actions/MoleculeAction/StretchBondAction.cpp (modified) (1 diff)
-
src/Bond/StretchBond.cpp (modified) (2 diffs)
-
src/Graph/BondGraph.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/userguide/userguide.xml
r4de4f6 r38bcbe 1277 1277 undo).</para> 1278 1278 </warning> 1279 <note>The action will uses typical bond distances, taken from 1280 <link linkend='bond.create-adjacency'>bond-table</link> to scale 1281 the bond length if the desired bond length is non-positive.</note> 1279 1282 </section> 1280 1283 <section xml:id="bond.change-bond-angle"> -
src/Actions/MoleculeAction/StretchBondAction.cpp
r4de4f6 r38bcbe 62 62 const std::vector< atom *> atoms = World::getInstance().getSelectedAtoms(); 63 63 StretchBondUtil stretcher(atoms); 64 bool status = stretcher(params.bonddistance.get()); 64 65 const double bonddistance = params.bonddistance.get(); 66 bool status = stretcher(bonddistance); 65 67 66 68 if (status) { -
src/Bond/StretchBond.cpp
r4de4f6 r38bcbe 51 51 #include "Descriptors/AtomIdDescriptor.hpp" 52 52 #include "Descriptors/MoleculeIdDescriptor.hpp" 53 #include "Element/element.hpp" 54 #include "Graph/BondGraph.hpp" 53 55 #include "Graph/BoostGraphCreator.hpp" 54 56 #include "Graph/BreadthFirstSearchGatherer.hpp" … … 93 95 } 94 96 95 bool StretchBondUtil::operator()( constdouble newdistance)97 bool StretchBondUtil::operator()(double newdistance) 96 98 { 99 if (newdistance <= 0.) { 100 // get typical distance from table 101 BondGraph *&BG = World::getInstance().getBondGraph(); 102 newdistance = BG->GetBondLength( 103 atoms[0]->getElementNo(), 104 atoms[1]->getElementNo()); 105 LOG(1, "INFO: Using typical bond distance of " << newdistance 106 << " between " << atoms[0]->getElement().getSymbol() << " and " 107 << atoms[1]->getElement().getSymbol() << "."); 108 } 109 97 110 const Vector NormalVector = (atoms[0]->getPosition() - atoms[1]->getPosition())* (1./olddistance); 98 111 const double shift = 0.5*(newdistance - olddistance); -
src/Graph/BondGraph.hpp
r4de4f6 r38bcbe 414 414 } 415 415 416 private:417 /** Convenience function to place access to World::getLinkedCell() into source module.418 *419 * @return ref to LinkedCell_View420 */421 LinkedCell::LinkedCell_View getLinkedCell(const double max_distance) const;422 423 /** Convenience function to place access to World::getDomain() into source module.424 *425 * @return ref to Box426 */427 Box &getDomain() const;428 429 /** Convenience function to place access to WorldTime::getTime() into source module.430 *431 * @return current time step432 */433 unsigned int getTime() const;434 435 416 /** Returns the BondLengthMatrix entry for a given index pair. 436 417 * \param firstelement index/atom number of first element (row index) … … 441 422 int firstelement, 442 423 int secondelement) const; 424 425 private: 426 /** Convenience function to place access to World::getLinkedCell() into source module. 427 * 428 * @return ref to LinkedCell_View 429 */ 430 LinkedCell::LinkedCell_View getLinkedCell(const double max_distance) const; 431 432 /** Convenience function to place access to World::getDomain() into source module. 433 * 434 * @return ref to Box 435 */ 436 Box &getDomain() const; 437 438 /** Convenience function to place access to WorldTime::getTime() into source module. 439 * 440 * @return current time step 441 */ 442 unsigned int getTime() const; 443 443 444 444 /** Returns bond criterion for given pair based on a bond length matrix.
Note:
See TracChangeset
for help on using the changeset viewer.
