Changeset bc3953 for molecuilder/src/molecules.cpp
- Timestamp:
- Aug 20, 2009, 3:40:49 PM (16 years ago)
- Children:
- 2aea0b, 390a2b
- Parents:
- 6c6d84
- File:
-
- 1 edited
-
molecuilder/src/molecules.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.cpp
r6c6d84 rbc3953 176 176 * Increases molecule::last_atom and gives last number to added atom. 177 177 * \param *pointer allocated and set atom 178 * \return true - succeeded, false - atom not found in list178 * \return pointer to the newly added atom 179 179 */ 180 180 atom * molecule::AddCopyAtom(atom *pointer) … … 612 612 return copy; 613 613 }; 614 615 616 /** 617 * Copies all atoms of a molecule which are within the defined parallelepiped. 618 * 619 * @param offest for the origin of the parallelepiped 620 * @param three vectors forming the matrix that defines the shape of the parallelpiped 621 */ 622 molecule* molecule::CopyMoleculeFromSubRegion(Vector offset, double *parallelepiped) { 623 molecule *copy = new molecule(elemente); 624 atom *Walker = start; 625 626 while(Walker->next != end) { 627 Walker = Walker->next; 628 if (Walker->x.IsInParallelepiped(offset, parallelepiped)) { 629 cout << "Adding atom " << *Walker << endl; 630 copy->AddCopyAtom(Walker); 631 } 632 } 633 634 //TODO: copy->BuildInducedSubgraph((ofstream *)&cout, this); 635 636 return copy; 637 } 614 638 615 639 /** Adds a bond to a the molecule specified by two atoms, \a *first and \a *second.
Note:
See TracChangeset
for help on using the changeset viewer.
