| 334 |
|
int i; |
| 335 |
|
short int no_atom, no_rigidbody; |
| 336 |
|
|
| 337 |
– |
// Fix for Rigid Bodies!!! Molecules may not have any atoms that |
| 338 |
– |
// they know about. They might have only rigid bodies (which then |
| 339 |
– |
// know about the atoms! |
| 340 |
– |
|
| 341 |
– |
|
| 337 |
|
if( !have_name ) return strdup( "MoleculeStamp error. Molecule's name" |
| 338 |
|
" was not given.\n" ); |
| 339 |
< |
|
| 340 |
< |
if( !have_rigidbodies && !have_atoms ){ |
| 341 |
< |
return strdup( "MoleculeStamp error. Molecule contains no atoms or RigidBodies." ); |
| 339 |
> |
|
| 340 |
> |
if( !have_atoms ){ |
| 341 |
> |
return strdup( "MoleculeStamp error. Molecule contains no atoms." ); |
| 342 |
|
} |
| 343 |
|
|
| 344 |
|
no_rigidbody = 0; |
| 366 |
|
} |
| 367 |
|
|
| 368 |
|
return NULL; |
| 369 |
< |
} |
| 375 |
< |
|
| 376 |
< |
|
| 377 |
< |
int MoleculeStamp::getTotAtoms() { |
| 378 |
< |
int total_atoms; |
| 379 |
< |
int i; |
| 380 |
< |
|
| 381 |
< |
total_atoms = n_atoms; |
| 382 |
< |
|
| 383 |
< |
if( rigidBodies != NULL ) { |
| 384 |
< |
for( i=0; i<n_rigidbodies; i++ ) |
| 385 |
< |
total_atoms += rigidBodies[i]->getNAtoms(); |
| 386 |
< |
} |
| 387 |
< |
|
| 388 |
< |
return total_atoms; |
| 389 |
< |
} |
| 390 |
< |
|
| 369 |
> |
} |