| | |
| | | } |
| | | |
| | | |
| | | |
| | | if(vesicle->tape->constareaswitch==2){ |
| | | /* check whether the darea is gt epsarea */ |
| | | for(i=0;i<vtx->tristar_no;i++) darea+=vtx->tristar[i]->area; |
| | | if(fabs(vesicle->area+darea-A0)>epsarea){ |
| | | //restore old state. |
| | | vtx=memcpy((void *)vtx,(void *)&backupvtx[0],sizeof(ts_vertex)); |
| | | for(i=0;i<vtx->neigh_no;i++){ |
| | | vtx->neigh[i]=memcpy((void *)vtx->neigh[i],(void *)&backupvtx[i+1],sizeof(ts_vertex)); |
| | | } |
| | | for(i=0;i<vtx->tristar_no;i++) triangle_normal_vector(vtx->tristar[i]); |
| | | //fprintf(stderr,"fajlam!\n"); |
| | | return TS_FAIL; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /* Vertices with spontaneous curvature may have spontaneous force perpendicular to the surface of the vesicle. additional delta energy is calculated in this function */ |
| | | delta_energy+=direct_force_energy(vesicle,vtx,backupvtx); |
| | | |
| | |
| | | retval=cell_add_vertex(vesicle->clist->cell[cellidx],vtx); |
| | | if(retval==TS_SUCCESS) cell_remove_vertex(backupvtx[0].cell,vtx); |
| | | } |
| | | |
| | | |
| | | if(vesicle->tape->constareaswitch==2){ |
| | | vesicle->area+=darea; |
| | | } |
| | | |
| | | |
| | | /* Entry point for plugin vm_before_montecarlo_constraint() function */ |
| | | vesicle->plist->pointer=vesicle->plist->chain->vm_new_state_accepted; |