| 4 |
|
|
| 5 |
|
#include "MakeStamps.hpp" |
| 6 |
|
#include "MoleculeStamp.hpp" |
| 7 |
+ |
#include "RigidBodyStamp.hpp" |
| 8 |
|
#include "simError.h" |
| 9 |
|
#ifdef IS_MPI |
| 10 |
|
#include "mpiBASS.h" |
| 223 |
|
return 1; |
| 224 |
|
} |
| 225 |
|
|
| 225 |
– |
int MakeStamps::rigidBodyPosition( event* the_event ){ |
| 226 |
– |
|
| 227 |
– |
current_rigidbody->setPosition( the_event->evt.pos.x, |
| 228 |
– |
the_event->evt.pos.y, |
| 229 |
– |
the_event->evt.pos.z ); |
| 230 |
– |
return 1; |
| 231 |
– |
} |
| 232 |
– |
|
| 233 |
– |
|
| 234 |
– |
int MakeStamps::rigidBodyOrientation( event* the_event ){ |
| 235 |
– |
|
| 236 |
– |
current_rigidbody->setOrientation( the_event->evt.ornt.x, |
| 237 |
– |
the_event->evt.ornt.y, |
| 238 |
– |
the_event->evt.ornt.z ); |
| 239 |
– |
return 1; |
| 240 |
– |
} |
| 241 |
– |
|
| 226 |
|
int MakeStamps::rigidBodyAssign( event* the_event ){ |
| 227 |
|
|
| 228 |
|
switch( the_event->evt.asmt.asmt_type ){ |
| 274 |
|
|
| 275 |
|
the_event->err_msg = current_mol->addAtom( current_atom, |
| 276 |
|
the_event->evt.blk_index ); |
| 277 |
+ |
|
| 278 |
|
if( the_event->err_msg != NULL ) return 0; |
| 279 |
|
return 1; |
| 280 |
|
} |
| 383 |
|
return 0; |
| 384 |
|
} |
| 385 |
|
|
| 386 |
< |
int MakeStamps::bondMember( event* the_event ){ |
| 386 |
> |
int MakeStamps::bondMembers( event* the_event ){ |
| 387 |
|
|
| 388 |
< |
current_bond->members( the_event->evt.mbr.a, |
| 389 |
< |
the_event->evt.mbr.b ); |
| 388 |
> |
current_bond->members( the_event->evt.mbrs.a, |
| 389 |
> |
the_event->evt.mbrs.b ); |
| 390 |
|
return 1; |
| 391 |
|
} |
| 392 |
|
|
| 446 |
|
return 0; |
| 447 |
|
} |
| 448 |
|
|
| 449 |
< |
int MakeStamps::bendMember( event* the_event ){ |
| 449 |
> |
int MakeStamps::bendMembers( event* the_event ){ |
| 450 |
|
|
| 451 |
< |
current_bend->members( the_event->evt.mbr.a, |
| 452 |
< |
the_event->evt.mbr.b, |
| 453 |
< |
the_event->evt.mbr.c ); |
| 451 |
> |
current_bend->members( the_event->evt.mbrs.a, |
| 452 |
> |
the_event->evt.mbrs.b, |
| 453 |
> |
the_event->evt.mbrs.c ); |
| 454 |
|
return 1; |
| 455 |
|
} |
| 456 |
|
|
| 510 |
|
return 0; |
| 511 |
|
} |
| 512 |
|
|
| 513 |
< |
int MakeStamps::torsionMember( event* the_event ){ |
| 513 |
> |
int MakeStamps::torsionMembers( event* the_event ){ |
| 514 |
|
|
| 515 |
< |
current_torsion->members( the_event->evt.mbr.a, |
| 516 |
< |
the_event->evt.mbr.b, |
| 517 |
< |
the_event->evt.mbr.c, |
| 518 |
< |
the_event->evt.mbr.d ); |
| 515 |
> |
current_torsion->members( the_event->evt.mbrs.a, |
| 516 |
> |
the_event->evt.mbrs.b, |
| 517 |
> |
the_event->evt.mbrs.c, |
| 518 |
> |
the_event->evt.mbrs.d ); |
| 519 |
|
return 1; |
| 520 |
|
} |
| 521 |
|
|
| 532 |
|
|
| 533 |
|
return 1; |
| 534 |
|
} |
| 535 |
+ |
|
| 536 |
+ |
int MakeStamps::newMember( event* the_event ){ |
| 537 |
+ |
|
| 538 |
+ |
current_member = new MemberStamp; |
| 539 |
+ |
|
| 540 |
+ |
the_event->err_msg = current_rigidbody->addMember( current_member, |
| 541 |
+ |
the_event->evt.blk_index ); |
| 542 |
+ |
if( the_event->err_msg != NULL ) return 0; |
| 543 |
+ |
|
| 544 |
+ |
return 1; |
| 545 |
+ |
} |
| 546 |
+ |
|
| 547 |
+ |
int MakeStamps::memberAssign( event* the_event ){ |
| 548 |
+ |
|
| 549 |
+ |
switch( the_event->evt.asmt.asmt_type ){ |
| 550 |
+ |
|
| 551 |
+ |
case STRING: |
| 552 |
+ |
current_member->assignString( the_event->evt.asmt.lhs, |
| 553 |
+ |
the_event->evt.asmt.rhs.sval ); |
| 554 |
+ |
return 1; |
| 555 |
+ |
break; |
| 556 |
+ |
|
| 557 |
+ |
case DOUBLE: |
| 558 |
+ |
current_member->assignDouble( the_event->evt.asmt.lhs, |
| 559 |
+ |
the_event->evt.asmt.rhs.dval ); |
| 560 |
+ |
return 1; |
| 561 |
+ |
break; |
| 562 |
+ |
|
| 563 |
+ |
case INT: |
| 564 |
+ |
current_member->assignInt( the_event->evt.asmt.lhs, |
| 565 |
+ |
the_event->evt.asmt.rhs.ival ); |
| 566 |
+ |
return 1; |
| 567 |
+ |
break; |
| 568 |
+ |
|
| 569 |
+ |
default: |
| 570 |
+ |
the_event->err_msg = strdup( "MakeStamp error. Invalid member" |
| 571 |
+ |
" assignment type" ); |
| 572 |
+ |
return 0; |
| 573 |
+ |
break; |
| 574 |
+ |
} |
| 575 |
+ |
return 0; |
| 576 |
+ |
} |
| 577 |
+ |
|
| 578 |
+ |
int MakeStamps::memberEnd( event* the_event ){ |
| 579 |
+ |
|
| 580 |
+ |
the_event->err_msg = current_member->checkMe(); |
| 581 |
+ |
if( the_event->err_msg != NULL ) return 0; |
| 582 |
+ |
|
| 583 |
+ |
return 1; |
| 584 |
+ |
} |