| 5 |  | #include "MakeStamps.hpp" | 
| 6 |  | #include "MoleculeStamp.hpp" | 
| 7 |  | #include "RigidBodyStamp.hpp" | 
| 8 | + | #include "CutoffGroupStamp.hpp" | 
| 9 |  | #include "simError.h" | 
| 10 |  | #ifdef IS_MPI | 
| 11 |  | #include "mpiBASS.h" | 
| 284 |  | int MakeStamps::rigidBodyEnd( event* the_event ){ | 
| 285 |  |  | 
| 286 |  | the_event->err_msg = current_rigidbody->checkMe(); | 
| 287 | + | if( the_event->err_msg != NULL ) return 0; | 
| 288 | + |  | 
| 289 | + | return 1; | 
| 290 | + | } | 
| 291 | + |  | 
| 292 | + | int MakeStamps::newCutoffGroup( event* the_event ){ | 
| 293 | + |  | 
| 294 | + | current_cutoffgroup = new CutoffGroupStamp; | 
| 295 | + |  | 
| 296 | + | the_event->err_msg = current_mol->addCutoffGroup( current_cutoffgroup, | 
| 297 | + | the_event->evt.blk_index ); | 
| 298 | + | if( the_event->err_msg != NULL ) return 0; | 
| 299 | + | return 1; | 
| 300 | + | } | 
| 301 | + |  | 
| 302 | + | int MakeStamps::cutoffGroupAssign( event* the_event ){ | 
| 303 | + |  | 
| 304 | + | switch( the_event->evt.asmt.asmt_type ){ | 
| 305 | + |  | 
| 306 | + | case STRING: | 
| 307 | + | the_event->err_msg = | 
| 308 | + | current_cutoffgroup->assignString( the_event->evt.asmt.lhs, | 
| 309 | + | the_event->evt.asmt.rhs.sval ); | 
| 310 | + | if( the_event->err_msg != NULL ) return 0; | 
| 311 | + | return 1; | 
| 312 | + | break; | 
| 313 | + |  | 
| 314 | + | case DOUBLE: | 
| 315 | + | the_event->err_msg = | 
| 316 | + | current_cutoffgroup->assignDouble( the_event->evt.asmt.lhs, | 
| 317 | + | the_event->evt.asmt.rhs.dval ); | 
| 318 | + | if( the_event->err_msg != NULL ) return 0; | 
| 319 | + | return 1; | 
| 320 | + | break; | 
| 321 | + |  | 
| 322 | + | case INT: | 
| 323 | + | the_event->err_msg = | 
| 324 | + | current_cutoffgroup->assignInt( the_event->evt.asmt.lhs, | 
| 325 | + | the_event->evt.asmt.rhs.ival ); | 
| 326 | + | if( the_event->err_msg != NULL ) return 0; | 
| 327 | + | return 1; | 
| 328 | + | break; | 
| 329 | + |  | 
| 330 | + | default: | 
| 331 | + | the_event->err_msg = strdup( "MakeStamp error. Invalid CutoffGroup" | 
| 332 | + | " assignment type" ); | 
| 333 | + | return 0; | 
| 334 | + | break; | 
| 335 | + | } | 
| 336 | + | return 0; | 
| 337 | + | } | 
| 338 | + |  | 
| 339 | + | int MakeStamps::cutoffGroupMembers( event* the_event ){ | 
| 340 | + |  | 
| 341 | + | int i; | 
| 342 | + |  | 
| 343 | + | if( the_event->evt.mbrs.nMembers > 0 ){ | 
| 344 | + |  | 
| 345 | + | for (i = 0; i < the_event->evt.mbrs.nMembers; i++) { | 
| 346 | + | current_cutoffgroup->addMember(the_event->evt.mbrs.memberList[i]); | 
| 347 | + | } | 
| 348 | + |  | 
| 349 | + | return 1; | 
| 350 | + |  | 
| 351 | + | } else { | 
| 352 | + | the_event->err_msg = strdup( "MakeStamp error. No members in memberList " | 
| 353 | + | " for this CutoffGroup."); | 
| 354 | + | return 0; | 
| 355 | + |  | 
| 356 | + | } | 
| 357 | + | } | 
| 358 | + |  | 
| 359 | + | int MakeStamps::cutoffGroupEnd( event* the_event ){ | 
| 360 | + |  | 
| 361 | + | the_event->err_msg = current_cutoffgroup->checkMe(); | 
| 362 |  | if( the_event->err_msg != NULL ) return 0; | 
| 363 |  |  | 
| 364 |  | return 1; |