ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/visitors/OtherVisitor.cpp
(Generate patch)

Comparing trunk/src/visitors/OtherVisitor.cpp (file contents):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1455 by gezelter, Thu Jun 24 20:44:18 2010 UTC

# Line 290 | Line 290 | namespace OpenMD {
290          return;
291      } else
292        return;
293
294    AtomType* at = dynamic_cast<Atom *>(sd)->getAtomType();
295    std::string bn = baseTypeName(at);
293  
294      if (posOnly_){
295        for( atomInfo = atomData->beginAtomInfo(i); atomInfo;
# Line 300 | Line 297 | namespace OpenMD {
297          if (atomInfo->hasCharge) {
298            sprintf(buffer,
299                    "%s%15.8f%15.8f%15.8f%15.8f",
300 <                  bn.c_str(),
300 >                  atomInfo->atomTypeName.c_str(),
301                    atomInfo->pos[0],
302                    atomInfo->pos[1],
303                    atomInfo->pos[2],
# Line 308 | Line 305 | namespace OpenMD {
305          } else {
306            sprintf(buffer,
307                  "%s%15.8f%15.8f%15.8f",
308 <                  bn.c_str(),
308 >                  atomInfo->atomTypeName.c_str(),
309                    atomInfo->pos[0],
310                    atomInfo->pos[1],
311                    atomInfo->pos[2]);
# Line 321 | Line 318 | namespace OpenMD {
318          if (atomInfo->hasCharge) {
319          sprintf(buffer,
320                  "%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f",
321 <                bn.c_str(),
321 >                atomInfo->atomTypeName.c_str(),
322                  atomInfo->pos[0],
323                  atomInfo->pos[1],
324                  atomInfo->pos[2],
# Line 332 | Line 329 | namespace OpenMD {
329          } else {
330          sprintf(buffer,
331                  "%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f",
332 <                bn.c_str(),
332 >                atomInfo->atomTypeName.c_str(),
333                  atomInfo->pos[0],
334                  atomInfo->pos[1],
335                  atomInfo->pos[2],
# Line 380 | Line 377 | namespace OpenMD {
377      return atomTypeName.substr(0, atomTypeName.find('-'));
378    }
379  
383  std::string XYZVisitor::baseTypeName(AtomType* at) {
384    std::vector<AtomType*> ayb = at->allYourBase();
385    return ayb[ayb.size()-1]->getName();
386  }
387
380    const std::string XYZVisitor::toString() {
381      char        buffer[65535];
382      std::string result;

Comparing trunk/src/visitors/OtherVisitor.cpp (property svn:keywords):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1455 by gezelter, Thu Jun 24 20:44:18 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines