Trisurf Monte Carlo simulator
Samo Penic
2016-06-21 eb95833ea5316a0dcfff4e5144e6fd7bbbd261f2
Fix in number of spontaneous curvature vertices calculation
2 files modified
11 ■■■■■ changed files
src/initial_distribution.c 9 ●●●●● patch | view | raw | blame | history
src/tape 2 ●●● patch | view | raw | blame | history
src/initial_distribution.c
@@ -114,8 +114,17 @@
    int rndvtx;
    if(tape->number_of_vertices_with_c0>0){
        ts_fprintf(stderr,"Setting values for spontaneous curvature as defined in tape\n");
        j=0;
        for(i=0;i<tape->number_of_vertices_with_c0;i++){
            rndvtx=rand() % vesicle->vlist->n;
            if(fabs(vesicle->vlist->vtx[rndvtx]->c-tape->c0)<1e-15){
                j++;
                i--;
                if(j>10*vesicle->vlist->n){
                    fatal("cannot populate vesicle with vertices with spontaneous curvature. Too many spontaneous curvature vertices?",100);
                }
                continue;
            }
            vesicle->vlist->vtx[rndvtx]->c=tape->c0;
        }
        mean_curvature_and_energy(vesicle);
src/tape
@@ -86,7 +86,7 @@
#NirGov branch only!
#number of vertices with spontaneous curvature (integer)
number_of_vertices_with_c0=200
number_of_vertices_with_c0=1447
#spontaneous curvature (float)
c0=2.0
#energy of attraction of vertices with spontaneous curvature