| 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; |
| 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], |
| 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]); |
| 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], |
| 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], |
| 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; |