22 |
|
|
23 |
|
void clean_bonds(void); |
24 |
|
|
25 |
+ |
void initBondList(void){ |
26 |
+ |
bl_head = NULL; |
27 |
+ |
} |
28 |
|
|
29 |
|
void pov_write(FILE *out_file, struct coords *the_coords, int n_atoms, |
30 |
|
int d_hydrogens, int d_bonds, int d_atoms){ |
82 |
|
"\n" |
83 |
|
"\n"); |
84 |
|
|
85 |
< |
make_bonds(the_coords, n_atoms); |
85 |
> |
if( bl_head == NULL ) make_bonds(the_coords, n_atoms); |
86 |
|
|
87 |
|
current_bond = bl_head->next; |
88 |
|
|
133 |
|
current_bond = current_bond->next; |
134 |
|
} |
135 |
|
|
136 |
< |
clean_bonds(); |
136 |
> |
if( regenerateBonds )clean_bonds(); |
137 |
|
} |
138 |
|
} |
139 |
|
|
212 |
|
} |
213 |
|
|
214 |
|
bl_head->next = NULL; |
215 |
+ |
free( bl_head ); |
216 |
+ |
bl_head = NULL; |
217 |
|
} |
218 |
|
|
219 |
|
|