t_del_atoms_params *delp;
int i;
t_3dvec dist;
-
+ u8 outer;
+
+ outer=0;
stage=mdrun->stage.current->data;
delp=stage->params;
+ if(delp->r<0)
+ outer=1;
+
for(i=0;i<moldyn->count;i++) {
v3_sub(&dist,&(delp->o),&(moldyn->atom[i].r));
//printf("%d ----> %f %f %f = %f | %f\n",i,dist.x,dist.y,dist.z,v3_absolute_square(&dist),delp->r*delp->r);
if(v3_absolute_square(&dist)<=(delp->r*delp->r)) {
- del_atom(moldyn,moldyn->atom[i].tag);
- printf("%s atom deleted: %d %d %d\n",ME,
- moldyn->atom[i].tag,moldyn->atom[i].element,
- moldyn->atom[i].brand);
+ if(!outer) {
+ del_atom(moldyn,moldyn->atom[i].tag);
+ printf("%s atom deleted: %d %d %d\n",ME,
+ moldyn->atom[i].tag,
+ moldyn->atom[i].element,
+ moldyn->atom[i].brand);
+ }
+ }
+ else {
+ if(outer) {
+ del_atom(moldyn,moldyn->atom[i].tag);
+ printf("%s atom deleted: %d %d %d\n",ME,
+ moldyn->atom[i].tag,
+ moldyn->atom[i].element,
+ moldyn->atom[i].brand);
+ }
}
}