ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/visitors/OtherVisitor.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/visitors/OtherVisitor.cpp (file contents):
Revision 3115 by tim, Thu May 26 22:45:00 2005 UTC vs.
Revision 3116 by chuckv, Tue Jan 16 22:18:04 2007 UTC

# Line 235 | Line 235 | namespace oopse {
235        if (!evaluator.isDynamic()) {
236          seleMan.setSelectionSet(evaluator.evaluate());
237        }
238 <
238 >      posOnly_ = false;
239      }
240  
241    XYZVisitor::XYZVisitor(SimInfo *info, const std::string& script) :
# Line 248 | Line 248 | namespace oopse {
248        if (!evaluator.isDynamic()) {
249          seleMan.setSelectionSet(evaluator.evaluate());
250        }
251 <          
251 >      posOnly_ = false;
252      }
253      
254    void XYZVisitor::visit(Atom *atom) {
# Line 291 | Line 291 | namespace oopse {
291      } else
292        return;
293  
294 <    for( atomInfo = atomData->beginAtomInfo(i); atomInfo;
295 <         atomInfo = atomData->nextAtomInfo(i) ) {
296 <      sprintf(buffer,
297 <              "%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f",
298 <              atomInfo->atomTypeName.c_str(),
299 <              atomInfo->pos[0],
300 <              atomInfo->pos[1],
301 <              atomInfo->pos[2],
302 <              atomInfo->dipole[0],
303 <              atomInfo->dipole[1],
304 <              atomInfo->dipole[2]);
305 <      frame.push_back(buffer);
294 >    if (posOnly_){
295 >      for( atomInfo = atomData->beginAtomInfo(i); atomInfo;
296 >           atomInfo = atomData->nextAtomInfo(i) ) {
297 >        sprintf(buffer,
298 >                "%s%15.8f%15.8f%15.8f",
299 >                atomInfo->atomTypeName.c_str(),
300 >                atomInfo->pos[0],
301 >                atomInfo->pos[1],
302 >                atomInfo->pos[2]);
303 >        frame.push_back(buffer);
304 >      }
305 >    }else{
306 >      for( atomInfo = atomData->beginAtomInfo(i); atomInfo;
307 >           atomInfo = atomData->nextAtomInfo(i) ) {
308 >        sprintf(buffer,
309 >                "%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f",
310 >                atomInfo->atomTypeName.c_str(),
311 >                atomInfo->pos[0],
312 >                atomInfo->pos[1],
313 >                atomInfo->pos[2],
314 >                atomInfo->dipole[0],
315 >                atomInfo->dipole[1],
316 >                atomInfo->dipole[2]);
317 >        frame.push_back(buffer);
318 >      }
319      }
320    }
321  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines