Trisurf Monte Carlo simulator
Samo Penic
2018-12-09 88bdd70987e76a58ea0fd917f63aa0c682848116
testing confinement (preliminary)
3 files modified
21 ■■■■■ changed files
src/io.c 4 ●●●● patch | view | raw | blame | history
src/timestep.c 9 ●●●●● patch | view | raw | blame | history
src/vertexmove.c 8 ●●●●● patch | view | raw | blame | history
src/io.c
@@ -1195,8 +1195,8 @@
    cfg = cfg_init(opts, 0);
    retval=cfg_parse_buf(cfg, buffer);
    tape->plane_confinement_switch=cfg_getint(cfg,"plane_confinement_switch");
    tape->plane_d=cfg_getint(cfg,"plane_d");
    tape->plane_F=cfg_getint(cfg,"plane_F");
    tape->plane_d=cfg_getfloat(cfg,"plane_d");
    tape->plane_F=cfg_getfloat(cfg,"plane_F");
    if(retval==CFG_FILE_ERROR){
    fatal("No tape file.",100);
src/timestep.c
@@ -71,6 +71,15 @@
    ts_fprintf(stdout,"Setting area A0=%.17f\n",A0);
    epsvol=4.0*sqrt(2.0*M_PI)/pow(3.0,3.0/4.0)*V0/pow(vesicle->tlist->n,3.0/2.0);
    epsarea=A0/(ts_double)vesicle->tlist->n;
    //plane confinement part 1
    if(vesicle->tape->plane_confinement_switch){
        vesicle->confinement_plane.z_min=-vesicle->tape->plane_d/2.0;
        vesicle->confinement_plane.z_max=vesicle->tape->plane_d/2.0;
        ts_fprintf(stderr,"Vesicle confinement by plane set to (zmin, zmax)=(%e,%e).\n",vesicle->confinement_plane.z_min,vesicle->confinement_plane.z_max);
    }
  //  fprintf(stderr, "DVol=%1.16f (%1.16f), V0=%1.16f\n", epsvol,0.003e-2*V0,V0);
    if(start_iteration<inititer) ts_fprintf(stdout, "Starting simulation (first %d x %d MC sweeps will not be recorded on disk)\n", inititer, mcsweeps);
    for(i=start_iteration;i<inititer+iterations;i++){
src/vertexmove.c
@@ -88,6 +88,14 @@
    }
}
    // 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;
        }
    }
//#undef SQ
//self avoidance check with distant vertices
    cellidx=vertex_self_avoidance(vesicle, vtx);