ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/interface.c
(Generate patch)

Comparing trunk/OOPSE/libBASS/interface.c (file contents):
Revision 378 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
Revision 1153 by gezelter, Tue May 11 04:21:52 2004 UTC

# Line 2 | Line 2
2   #include <stdlib.h>
3   #include <string.h>
4  
5 < #include <parse_interface.h>
6 < #include <BASS_interface.h>
7 < #include <simError.h>
5 > #include "parse_interface.h"
6 > #include "BASS_interface.h"
7 > #include "simError.h"
8   #ifdef IS_MPI
9 < #include <mpiBASS.h>
9 > #include "mpiBASS.h"
10   #endif
11  
12   void interface_error( event* the_event );
# Line 45 | Line 45 | void init_atom( int atom_index ){
45    free( the_event );  
46   }
47  
48 + void init_rigidbody( int rigidbody_index ){
49 +  event* the_event;
50 +
51 +  the_event = (event* )malloc( sizeof( event ) );
52 +  
53 +  the_event->event_type = RIGIDBODY;
54 +  the_event->err_msg = NULL;
55 +  the_event->evt.blk_index = rigidbody_index;
56 +
57 +  if( !event_handler( the_event ) ) interface_error( the_event );
58 + #ifdef IS_MPI
59 +  throwMPIEvent(the_event);
60 + #endif
61 +  
62 +  free( the_event );  
63 + }
64 +
65 + void init_cutoffgroup( int cutoffgroup_index ){
66 +  event* the_event;
67 +
68 +  the_event = (event* )malloc( sizeof( event ) );
69 +  
70 +  the_event->event_type = CUTOFFGROUP;
71 +  the_event->err_msg = NULL;
72 +  the_event->evt.blk_index = cutoffgroup_index;
73 +
74 +  if( !event_handler( the_event ) ) interface_error( the_event );
75 + #ifdef IS_MPI
76 +  throwMPIEvent(the_event);
77 + #endif
78 +  
79 +  free( the_event );  
80 + }
81 +
82   void init_atom( int atom_index ){
83    event* the_event;
84    
# Line 104 | Line 138 | void init_torsion( int torsion_index ){
138    the_event->event_type = TORSION;
139    the_event->err_msg = NULL;
140    the_event->evt.blk_index = torsion_index;
141 +
142 +  if( !event_handler( the_event ) ) interface_error( the_event );
143 + #ifdef IS_MPI
144 +  throwMPIEvent(the_event);
145 + #endif
146 +  
147 +  free( the_event );
148 + }
149  
150 + void init_zconstraint( int zconstraint_index ){
151 +  event* the_event;
152 +
153 +  the_event = (event* )malloc( sizeof( event ) );
154 +  
155 +  the_event->event_type = ZCONSTRAINT;
156 +  the_event->err_msg = NULL;
157 +  the_event->evt.blk_index = zconstraint_index;
158 +
159    if( !event_handler( the_event ) ) interface_error( the_event );
160   #ifdef IS_MPI
161    throwMPIEvent(the_event);
# Line 121 | Line 172 | void init_members( struct node_tag* the_node,
172   void init_members( struct node_tag* the_node,
173                     struct namespc the_namespc ){
174    event* the_event;
175 +  int i;
176  
177    the_event = (event* )malloc( sizeof( event ) );
178    
179 <  the_event->event_type = MEMBER;
179 >  the_event->event_type = MEMBERS;
180    the_event->err_msg = NULL;
129  the_event->evt.mbr.a = the_node->the_data.mbr.a;
130  the_event->evt.mbr.b = the_node->the_data.mbr.b;
131  the_event->evt.mbr.c = the_node->the_data.mbr.c;
132  the_event->evt.mbr.d = the_node->the_data.mbr.d;
181  
182 +  the_event->evt.mbrs.nMembers = the_node->the_data.mbrs.nMembers;
183 +
184 +  the_event->evt.mbrs.memberList = (int *) calloc(the_node->the_data.mbrs.nMembers,
185 +                                                  sizeof(int));
186 +
187 +  for (i = 0; i < the_node->the_data.mbrs.nMembers; i++) {
188 +    the_event->evt.mbrs.memberList[i] = the_node->the_data.mbrs.memberList[i];
189 +  }
190 +  
191    if( !event_handler( the_event ) ) interface_error( the_event );
192   #ifdef IS_MPI
193    throwMPIEvent(the_event);
194   #endif
195    
196 +  free( the_event->evt.mbrs.memberList );
197    free( the_event );
198   }
199  
# Line 222 | Line 280 | void init_orientation( struct node_tag* the_node,
280    
281    the_event->event_type = ORIENTATION;
282    the_event->err_msg = NULL;
283 <  the_event->evt.ornt.x = the_node->the_data.ort.x;
284 <  the_event->evt.ornt.y = the_node->the_data.ort.y;
285 <  the_event->evt.ornt.z = the_node->the_data.ort.z;
283 >  the_event->evt.ornt.phi   = the_node->the_data.ort.phi;
284 >  the_event->evt.ornt.theta = the_node->the_data.ort.theta;
285 >  the_event->evt.ornt.psi   = the_node->the_data.ort.psi;
286  
287    if( !event_handler( the_event ) ) interface_error( the_event );
288   #ifdef IS_MPI

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines