| 15 |
|
// Globals ************************************************ |
| 16 |
|
|
| 17 |
|
typedef enum { GLOBAL_BLK, MOLECULE_BLK, ATOM_BLK, BOND_BLK, BEND_BLK, |
| 18 |
< |
TORSION_BLK, COMPONENT_BLK, ZCONSTRAINT_BLK } block_type; |
| 18 |
> |
TORSION_BLK, COMPONENT_BLK, ZCONSTRAINT_BLK, |
| 19 |
> |
RIGIDBODY_BLK } block_type; |
| 20 |
|
|
| 21 |
|
block_type current_block = GLOBAL_BLK; |
| 22 |
|
#define MAX_NEST 20 // the max number of nested blocks |
| 101 |
|
handled = the_stamps->newTorsion( the_event ); |
| 102 |
|
break; |
| 103 |
|
|
| 104 |
+ |
case RIGIDBODY: |
| 105 |
+ |
incr_block( RIGIDBODY_BLK ); |
| 106 |
+ |
handled = the_stamps->newRigidBody( the_event ); |
| 107 |
+ |
break; |
| 108 |
+ |
|
| 109 |
|
case ASSIGNMENT: |
| 110 |
|
handled = the_stamps->moleculeAssign( the_event ); |
| 111 |
|
break; |
| 118 |
|
default: |
| 119 |
|
the_event->err_msg = |
| 120 |
|
strdup( "Not a valid molecule event\n" ); |
| 121 |
+ |
return 0; |
| 122 |
+ |
} |
| 123 |
+ |
break; |
| 124 |
+ |
|
| 125 |
+ |
|
| 126 |
+ |
case RIGIDBODY_BLK: |
| 127 |
+ |
|
| 128 |
+ |
switch( the_event->event_type ){ |
| 129 |
+ |
|
| 130 |
+ |
case ASSIGNMENT: |
| 131 |
+ |
handled = the_stamps->rigidBodyAssign( the_event ); |
| 132 |
+ |
break; |
| 133 |
+ |
|
| 134 |
+ |
case MEMBERS: |
| 135 |
+ |
handled = the_stamps->rigidBodyMembers( the_event ); |
| 136 |
+ |
break; |
| 137 |
+ |
|
| 138 |
+ |
case BLOCK_END: |
| 139 |
+ |
decr_block(); |
| 140 |
+ |
handled = the_stamps->rigidBodyEnd( the_event ); |
| 141 |
+ |
break; |
| 142 |
+ |
|
| 143 |
+ |
default: |
| 144 |
+ |
the_event->err_msg = |
| 145 |
+ |
strdup( "Not a valid RigidBody event\n" ); |
| 146 |
|
return 0; |
| 147 |
|
} |
| 148 |
|
break; |
| 149 |
+ |
|
| 150 |
|
|
| 151 |
|
case ATOM_BLK: |
| 152 |
|
|
| 184 |
|
handled = the_stamps->bondAssign( the_event ); |
| 185 |
|
break; |
| 186 |
|
|
| 187 |
< |
case MEMBER: |
| 188 |
< |
handled = the_stamps->bondMember( the_event ); |
| 187 |
> |
case MEMBERS: |
| 188 |
> |
handled = the_stamps->bondMembers( the_event ); |
| 189 |
|
break; |
| 190 |
|
|
| 191 |
|
case CONSTRAINT: |
| 212 |
|
handled = the_stamps->bendAssign( the_event ); |
| 213 |
|
break; |
| 214 |
|
|
| 215 |
< |
case MEMBER: |
| 216 |
< |
handled = the_stamps->bendMember( the_event ); |
| 215 |
> |
case MEMBERS: |
| 216 |
> |
handled = the_stamps->bendMembers( the_event ); |
| 217 |
|
break; |
| 218 |
|
|
| 219 |
|
case CONSTRAINT: |
| 240 |
|
handled = the_stamps->torsionAssign( the_event ); |
| 241 |
|
break; |
| 242 |
|
|
| 243 |
< |
case MEMBER: |
| 244 |
< |
handled = the_stamps->torsionMember( the_event ); |
| 243 |
> |
case MEMBERS: |
| 244 |
> |
handled = the_stamps->torsionMembers( the_event ); |
| 245 |
|
break; |
| 246 |
|
|
| 247 |
|
case CONSTRAINT: |