| 98 |
|
break; |
| 99 |
|
|
| 100 |
|
case ATOM_HEAD: |
| 101 |
+ |
if( the_namespc.type != MOLECULE_HEAD && the_namespc.type != RIGIDBODY_HEAD ){ |
| 102 |
+ |
print_tree_error( the_node, |
| 103 |
+ |
"The atom block is not in a molecule or rigidBody namespace" ); |
| 104 |
+ |
} |
| 105 |
+ |
else{ |
| 106 |
+ |
init_atom( the_node->index ); |
| 107 |
+ |
current_namespc.index = the_node->index; |
| 108 |
+ |
current_namespc.type = the_node->type; |
| 109 |
+ |
walk_down( the_node->stmt_list, current_namespc ); |
| 110 |
+ |
} |
| 111 |
+ |
break; |
| 112 |
+ |
|
| 113 |
+ |
case RIGIDBODY_HEAD: |
| 114 |
|
if( the_namespc.type != MOLECULE_HEAD ){ |
| 115 |
|
print_tree_error( the_node, |
| 116 |
< |
"The atom block is not in a molecule namespace" ); |
| 116 |
> |
"The rigid body block is not in a molecule namespace" ); |
| 117 |
|
} |
| 118 |
|
else{ |
| 119 |
< |
init_atom( the_node->index ); |
| 119 |
> |
init_rigidbody( the_node->index ); |
| 120 |
|
current_namespc.index = the_node->index; |
| 121 |
|
current_namespc.type = the_node->type; |
| 122 |
|
walk_down( the_node->stmt_list, current_namespc ); |
| 225 |
|
break; |
| 226 |
|
|
| 227 |
|
case POSITION_STMT: |
| 228 |
< |
if( the_namespc.type != ATOM_HEAD ){ |
| 228 |
> |
if( the_namespc.type != ATOM_HEAD && the_namespc.type != RIGIDBODY_HEAD){ |
| 229 |
|
print_tree_error( the_node, |
| 230 |
|
"position statement is not located in an " |
| 231 |
< |
"atom block" ); |
| 231 |
> |
"atom or rigidBody block" ); |
| 232 |
|
} |
| 233 |
|
|
| 234 |
|
init_position( the_node, the_namespc ); |
| 235 |
|
break; |
| 236 |
|
|
| 237 |
|
case ORIENTATION_STMT: |
| 238 |
< |
if( the_namespc.type != ATOM_HEAD ){ |
| 238 |
> |
if( the_namespc.type != ATOM_HEAD && the_namespc.type != RIGIDBODY_HEAD){ |
| 239 |
|
print_tree_error( the_node, |
| 240 |
|
"orientation statement is not located in an " |
| 241 |
< |
"atom block" ); |
| 241 |
> |
"atom or rigidBody block" ); |
| 242 |
|
} |
| 243 |
|
|
| 244 |
|
init_orientation( the_node, the_namespc ); |
| 290 |
|
err_msg ); |
| 291 |
|
break; |
| 292 |
|
|
| 293 |
+ |
case RIGIDBODY_HEAD: |
| 294 |
+ |
sprintf( painCave.errMsg, |
| 295 |
+ |
"Parse tree error: rigidBody head node error -> %s\n", |
| 296 |
+ |
err_msg ); |
| 297 |
+ |
break; |
| 298 |
+ |
|
| 299 |
|
case ATOM_HEAD: |
| 300 |
|
sprintf( painCave.errMsg, |
| 301 |
|
"Parse tree error: atom head node error [%d] -> %s\n", |