Example #1
0
 /*
 * Transform all atomic coordinates from generalized to Cartesian.
 */
 void AtomStorage::transformGenToCart(const Boundary& boundary) 
 {
    if (isCartesian()) {
       UTIL_THROW("Error: Coordinates are Cartesian on entry");
    }
    Vector r;
    if (nAtom()) {
       AtomIterator atomIter;
       for (begin(atomIter); atomIter.notEnd(); ++atomIter) {
          r = atomIter->position();
          boundary.transformGenToCart(r, atomIter->position());
       }
    }
    if (nGhost()) {
       GhostIterator ghostIter;
       for (begin(ghostIter); ghostIter.notEnd(); ++ghostIter) {
          r = ghostIter->position();
          boundary.transformGenToCart(r, ghostIter->position());
       }
    }
    isCartesian_ = true;
 }