| 17 |
|
the_event->evt.blk_index = comp_index; |
| 18 |
|
|
| 19 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 20 |
< |
|
| 20 |
> |
#ifdef MPI |
| 21 |
> |
throwMPIEvent(the_event); |
| 22 |
> |
#endif |
| 23 |
> |
|
| 24 |
|
free( the_event ); |
| 25 |
|
} |
| 26 |
|
|
| 34 |
|
the_event->evt.blk_index = mol_index; |
| 35 |
|
|
| 36 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 37 |
+ |
#ifdef MPI |
| 38 |
+ |
throwMPIEvent(the_event); |
| 39 |
+ |
#endif |
| 40 |
|
|
| 41 |
|
free( the_event ); |
| 42 |
|
} |
| 51 |
|
the_event->evt.blk_index = atom_index; |
| 52 |
|
|
| 53 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 54 |
+ |
#ifdef MPI |
| 55 |
+ |
throwMPIEvent(the_event); |
| 56 |
+ |
#endif |
| 57 |
|
|
| 58 |
|
free( the_event ); |
| 59 |
|
} |
| 68 |
|
the_event->evt.blk_index = bond_index; |
| 69 |
|
|
| 70 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 71 |
+ |
#ifdef MPI |
| 72 |
+ |
throwMPIEvent(the_event); |
| 73 |
+ |
#endif |
| 74 |
|
|
| 75 |
|
free( the_event ); |
| 76 |
|
} |
| 85 |
|
the_event->evt.blk_index = bend_index; |
| 86 |
|
|
| 87 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 88 |
+ |
#ifdef MPI |
| 89 |
+ |
throwMPIEvent(the_event); |
| 90 |
+ |
#endif |
| 91 |
|
|
| 92 |
|
free( the_event ); |
| 93 |
|
} |
| 102 |
|
the_event->evt.blk_index = torsion_index; |
| 103 |
|
|
| 104 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 105 |
+ |
#ifdef MPI |
| 106 |
+ |
throwMPIEvent(the_event); |
| 107 |
+ |
#endif |
| 108 |
|
|
| 109 |
|
free( the_event ); |
| 110 |
|
} |
| 128 |
|
the_event->evt.mbr.d = the_node->the_data.mbr.d; |
| 129 |
|
|
| 130 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 131 |
+ |
#ifdef MPI |
| 132 |
+ |
throwMPIEvent(the_event); |
| 133 |
+ |
#endif |
| 134 |
|
|
| 135 |
|
free( the_event ); |
| 136 |
|
} |
| 146 |
|
the_event->evt.cnstr = the_node->the_data.cnstr.constraint_val; |
| 147 |
|
|
| 148 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 149 |
+ |
#ifdef MPI |
| 150 |
+ |
throwMPIEvent(the_event); |
| 151 |
+ |
#endif |
| 152 |
|
|
| 153 |
|
free( the_event ); |
| 154 |
|
} |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 186 |
+ |
#ifdef MPI |
| 187 |
+ |
throwMPIEvent(the_event); |
| 188 |
+ |
#endif |
| 189 |
|
|
| 190 |
|
free( the_event ); |
| 191 |
|
} |
| 203 |
|
the_event->evt.pos.z = the_node->the_data.pos.z; |
| 204 |
|
|
| 205 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 206 |
+ |
#ifdef MPI |
| 207 |
+ |
throwMPIEvent(the_event); |
| 208 |
+ |
#endif |
| 209 |
|
|
| 210 |
|
free( the_event ); |
| 211 |
|
} |
| 223 |
|
the_event->evt.ornt.z = the_node->the_data.ort.z; |
| 224 |
|
|
| 225 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 226 |
+ |
#ifdef MPI |
| 227 |
+ |
throwMPIEvent(the_event); |
| 228 |
+ |
#endif |
| 229 |
|
|
| 230 |
|
free( the_event ); |
| 231 |
|
} |
| 232 |
|
|
| 200 |
– |
void init_start_index( struct node_tag* the_node, |
| 201 |
– |
struct namespc the_namespc ){ |
| 202 |
– |
event* the_event; |
| 203 |
– |
int* si_array; |
| 204 |
– |
int n_elements = 0; |
| 205 |
– |
int index = 0; |
| 233 |
|
|
| 207 |
– |
struct integer_list_tag* head; |
| 208 |
– |
struct integer_list_tag* current; |
| 209 |
– |
|
| 210 |
– |
the_event = (event* )malloc( sizeof( event ) ); |
| 211 |
– |
|
| 212 |
– |
the_event->event_type = ORIENTATION; |
| 213 |
– |
the_event->err_msg = NULL; |
| 214 |
– |
|
| 215 |
– |
head = the_node->the_data.il_head; |
| 216 |
– |
n_elements++; |
| 217 |
– |
|
| 218 |
– |
current = head->next; |
| 219 |
– |
while( current != NULL ){ |
| 220 |
– |
n_elements++; |
| 221 |
– |
current = current->next; |
| 222 |
– |
} |
| 223 |
– |
|
| 224 |
– |
the_event->evt.si.n_elements = n_elements; |
| 225 |
– |
si_array = ( int* ) calloc( n_elements, sizeof( int ) ); |
| 226 |
– |
|
| 227 |
– |
si_array[index] = head->the_int; |
| 228 |
– |
|
| 229 |
– |
current = head->next; |
| 230 |
– |
while( current != NULL ){ |
| 231 |
– |
index++; |
| 232 |
– |
si_array[index] = current->the_int; |
| 233 |
– |
current = current->next; |
| 234 |
– |
} |
| 235 |
– |
the_event->evt.si.array = si_array; |
| 236 |
– |
|
| 237 |
– |
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 238 |
– |
|
| 239 |
– |
free( the_event ); |
| 240 |
– |
} |
| 241 |
– |
|
| 234 |
|
void end_of_block( void ){ |
| 235 |
|
event* the_event; |
| 236 |
|
|
| 240 |
|
the_event->err_msg = NULL; |
| 241 |
|
|
| 242 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
| 243 |
+ |
#ifdef MPI |
| 244 |
+ |
throwMPIEvent(the_event); |
| 245 |
+ |
#endif |
| 246 |
|
|
| 247 |
|
free( the_event ); |
| 248 |
|
} |