| | |
| | | /* vesicle_volume(vesicle); |
| | | fprintf(stderr,"Volume in the beginning=%1.16e\n", vesicle->volume); |
| | | */ |
| | | |
| | | /* fix data structure for flipped bond */ |
| | | ts_flip_bond(k,it,km,kp, bond,lm, lp, lm2, lp1, vesicle->tape->w); |
| | | |
| | |
| | | delta_energy+=it->xk* it->energy; |
| | | delta_energy+=bond->energy; /* attraction with neighboring vertices, that have spontaneous curvature */ |
| | | //Neigbours of k, it, km, kp don't change its energy. |
| | | if(vesicle->tape->stretchswitch==1){ |
| | | oldenergy+=lm->energy+lp->energy; |
| | | stretchenergy(vesicle,lm); |
| | | stretchenergy(vesicle,lp); |
| | | delta_energy+=lm->energy+lp->energy; |
| | | } |
| | | |
| | | delta_energy-=oldenergy; |
| | | if(vesicle->pswitch == 1 || vesicle->tape->constvolswitch>0){ |
| | |
| | | // fprintf(stderr,"Restoration complete!!!\n"); |
| | | // vesicle_volume(vesicle); |
| | | // fprintf(stderr,"Volume after fail=%1.16e\n", vesicle->volume); |
| | | if(vesicle->tape->stretchswitch==1){ |
| | | stretchenergy(vesicle,lm); |
| | | stretchenergy(vesicle,lp); |
| | | } |
| | | |
| | | return TS_FAIL; |
| | | } |