Trisurf Monte Carlo simulator
Samo Penic
2019-02-28 36dba86649e71d2a56657320ddf98a1af2055023
src/vertexmove.c
@@ -35,13 +35,6 @@
    vtx->y=vtx->y+r*sintheta*sin(phi);
    vtx->z=vtx->z+r*costheta;
// plane confinement check whether the new position of vertex will be out of bounds
   if(vesicle->tape->plane_confinement_switch){
      if(vtx->z>vesicle->confinement_plane.z_max || vtx->z<vesicle->confinement_plane.z_min){
      vtx=memcpy((void *)vtx,(void *)&backupvtx[0],sizeof(ts_vertex));
      return TS_FAIL;
      }
   }
/* Entry point for plugin vm_hard_constraint() function */
   ts_plugin_chain *ptr=vesicle->plist->chain->vm_hard_constraint;
@@ -53,14 +46,21 @@
      }
      ptr=ptr->next;
   }
/* End of vm_hard_constraint() */
//if all the tests are successful, then energy for vtx and neighbours is calculated
/* Backuping the neighbours */
   for(i=0;i<vtx->neigh_no;i++){
   memcpy((void *)&backupvtx[i+1],(void *)vtx->neigh[i],sizeof(ts_vertex));
   }
/* Entry point for plugin vm_energy_before_prepare() */
   vesicle->plist->pointer=vesicle->plist->chain->vm_energy_before_prepare;
   while(vesicle->plist->pointer!=NULL){
      vesicle->plist->pointer->plugin->function->vm_energy_before_prepare(vesicle, vtx);
      vesicle->plist->pointer=vesicle->plist->pointer->next;
   }
/* Calculate energy for vtx and neighbours */
   if(vesicle->pswitch == 1 || vesicle->tape->constvolswitch>0){
      for(i=0;i<vtx->tristar_no;i++) dvol-=vtx->tristar[i]->volume;
   }