| 81 |
|
if( have_atoms ){ |
| 82 |
|
sprintf( errMsg, |
| 83 |
|
"MoleculeStamp error, n_atoms already declared" |
| 84 |
< |
"for molecule: %s\n", |
| 84 |
> |
" for molecule: %s\n", |
| 85 |
|
name); |
| 86 |
|
return strdup( errMsg ); |
| 87 |
|
} |
| 253 |
|
return strdup( errMsg ); |
| 254 |
|
} |
| 255 |
|
else return strdup("MoleculeStamp error, nAtoms not given before" |
| 256 |
< |
"first atom declaration." ); |
| 256 |
> |
" first atom declaration." ); |
| 257 |
|
} |
| 258 |
|
|
| 259 |
|
return NULL; |
| 271 |
|
return strdup( errMsg ); |
| 272 |
|
} |
| 273 |
|
else return strdup("MoleculeStamp error, nRigidBodies not given before" |
| 274 |
< |
"first rigidBody declaration." ); |
| 274 |
> |
" first rigidBody declaration." ); |
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
return NULL; |
| 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 |
> |
} |