| 45 |
|
bool BeadModel::createBeads(std::vector<BeadParam>& beads) { |
| 46 |
|
|
| 47 |
|
if (sd_->isAtom()) { |
| 48 |
< |
createSingleBead(static_cast<Atom*>(sd_), beads); |
| 48 |
> |
if (!createSingleBead(static_cast<Atom*>(sd_), beads)) { |
| 49 |
> |
sprintf( painCave.errMsg, |
| 50 |
> |
"BeadModel::createBeads Error: GayBerne and other non-spheric atoms should use RoughShell model\n"); |
| 51 |
> |
painCave.severity = OOPSE_ERROR; |
| 52 |
> |
painCave.isFatal = 1; |
| 53 |
> |
simError(); |
| 54 |
> |
return false; |
| 55 |
> |
} |
| 56 |
|
} |
| 57 |
|
else if (sd_->isRigidBody()) { |
| 58 |
|
RigidBody* rb = static_cast<RigidBody*>(sd_); |
| 59 |
|
std::vector<Atom*>::iterator ai; |
| 60 |
|
Atom* atom; |
| 61 |
|
for (atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) { |
| 62 |
< |
if (!createSingleBead(atom, beads)) |
| 62 |
> |
if (!createSingleBead(atom, beads)) { |
| 63 |
> |
sprintf( painCave.errMsg, |
| 64 |
> |
"BeadModel::createBeads Error: GayBerne and other non-spheric atoms should use RoughShell model\n"); |
| 65 |
> |
painCave.severity = OOPSE_ERROR; |
| 66 |
> |
painCave.isFatal = 1; |
| 67 |
> |
simError(); |
| 68 |
|
return false; |
| 69 |
+ |
} |
| 70 |
|
} |
| 71 |
|
} |
| 72 |
|
|