1 |
< |
/* |
1 |
> |
/* |
2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
338 |
|
|
339 |
|
for( atomInfo = atomData->beginAtomInfo(i); atomInfo; |
340 |
|
atomInfo = atomData->nextAtomInfo(i) ) { |
341 |
< |
if (printDipole) |
342 |
< |
sprintf(buffer, |
343 |
< |
"%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f", |
344 |
< |
atomInfo->AtomType.c_str(), |
345 |
< |
atomInfo->pos[0], |
346 |
< |
atomInfo->pos[1], |
347 |
< |
atomInfo->pos[2], |
348 |
< |
atomInfo->dipole[0], |
349 |
< |
atomInfo->dipole[1], |
350 |
< |
atomInfo->dipole[2]); else |
351 |
< |
sprintf(buffer, "%s%15.8f%15.8f%15.8f", |
352 |
< |
atomInfo->AtomType.c_str(), atomInfo->pos[0], |
353 |
< |
atomInfo->pos[1], atomInfo->pos[2]); |
354 |
< |
|
341 |
> |
printf("SD type is %s\n", sd->getType().c_str()); |
342 |
> |
printf("XYZVisitor thinks %s\n", atomInfo->atomTypeName.c_str()); |
343 |
> |
if (printDipole) { |
344 |
> |
sprintf(buffer, |
345 |
> |
"%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f", |
346 |
> |
atomInfo->atomTypeName.c_str(), |
347 |
> |
atomInfo->pos[0], |
348 |
> |
atomInfo->pos[1], |
349 |
> |
atomInfo->pos[2], |
350 |
> |
atomInfo->dipole[0], |
351 |
> |
atomInfo->dipole[1], |
352 |
> |
atomInfo->dipole[2]); |
353 |
> |
} else { |
354 |
> |
sprintf(buffer, "%s%15.8f%15.8f%15.8f", |
355 |
> |
atomInfo->atomTypeName.c_str(), atomInfo->pos[0], |
356 |
> |
atomInfo->pos[1], atomInfo->pos[2]); |
357 |
> |
} |
358 |
> |
|
359 |
|
frame.push_back(buffer); |
360 |
|
} |
361 |
|
} |
525 |
|
continue; |
526 |
|
|
527 |
|
for( atomInfo = atomData->beginAtomInfo(i); atomInfo; |
528 |
< |
atomInfo = atomData->nextAtomInfo(i) ) { |
529 |
< |
replaceType(atomInfo->AtomType); |
528 |
> |
atomInfo = atomData->nextAtomInfo(i) ) { |
529 |
> |
atomInfo->atomTypeName = trimmedName(atomInfo->atomTypeName); |
530 |
|
} //end for(atomInfo) |
531 |
|
} //end for(atomIter) |
532 |
|
} //end if (waterTypeList.find(rbName) != waterTypeList.end()) |
533 |
|
} |
534 |
|
|
535 |
< |
void WaterTypeVisitor::replaceType(std::string&atomType) { |
536 |
< |
atomType = atomType.substr(0, atomType.find('_')); |
537 |
< |
} |
535 |
> |
std::string WaterTypeVisitor::trimmedName(const std::string&atomTypeName) { |
536 |
> |
return atomTypeName.substr(0, atomTypeName.find('_')); |
537 |
> |
} |
538 |
|
|
539 |
|
const std::string WaterTypeVisitor::toString() { |
540 |
|
char buffer[65535]; |