From e984829db39b2778e4f66c34524329ad09749c45 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Mon, 11 Jul 2016 19:29:21 +0000 Subject: [PATCH] Added possibility of internal pegs. It can break the system however --- src/poly.c | 4 ++++ src/io.c | 1 + src/tape | 10 ++++++---- src/general.h | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/general.h b/src/general.h index a6f5114..4eab674 100644 --- a/src/general.h +++ b/src/general.h @@ -257,6 +257,7 @@ long int nczmax; long int npoly; long int nmono; + long int internal_poly; long int nfil; long int nfono; long int R_nucleus; diff --git a/src/io.c b/src/io.c index 147b655..f488ebe 100644 --- a/src/io.c +++ b/src/io.c @@ -1066,6 +1066,7 @@ CFG_SIMPLE_INT("nmono", &tape->nmono), CFG_SIMPLE_INT("nfil",&tape->nfil), CFG_SIMPLE_INT("nfono",&tape->nfono), + CFG_SIMPLE_INT("internal_poly",&tape->internal_poly), CFG_SIMPLE_INT("R_nucleus",&tape->R_nucleus), CFG_SIMPLE_FLOAT("R_nucleusX",&tape->R_nucleusX), CFG_SIMPLE_FLOAT("R_nucleusY",&tape->R_nucleusY), diff --git a/src/poly.c b/src/poly.c index 3c93d0c..252b1c6 100644 --- a/src/poly.c +++ b/src/poly.c @@ -83,6 +83,7 @@ if (vlist!=NULL){ /* Make straight grafted poylmers normal to membrane (polymer brush). Dist. between poly vertices put to 1*/ + ts_int intpoly=vesicle->tape->internal_poly; for (i=0;i<poly_list->n;i++){ xnorm=0.0; @@ -94,6 +95,9 @@ znorm-=poly_list->poly[i]->grafted_vtx->tristar[j]->znorm; } normlength=sqrt(xnorm*xnorm+ynorm*ynorm+znorm*znorm); + if(intpoly && i%2){ + normlength=-normlength; + } xnorm=xnorm/normlength; ynorm=ynorm/normlength; znorm=znorm/normlength; diff --git a/src/tape b/src/tape index 50b4272..69fd056 100644 --- a/src/tape +++ b/src/tape @@ -1,6 +1,6 @@ ####### Vesicle definitions ########### # nshell is a number of divisions of dipyramid -nshell=5 +nshell=17 # dmax is the max. bond length (in units l_min) dmax=1.7 # dmin_interspecies in the min. dist. between different vertex species (in units l_min) @@ -14,7 +14,7 @@ # (pswitch=1: calc. p*dV energy contribution) pswitch = 0 # pressure difference: p_inside - p_outside (in units kT/l_min^3): -pressure=-10.0 +pressure=10.0 #Constant volume constraint (0 disable constant volume, 1 enable wiht additional vertex move, 2 enable with epsvol) constvolswitch=0 @@ -25,11 +25,13 @@ ####### Polymer (brush) definitions ########### # npoly is a number of polymers attached to npoly distinct vertices on vesicle -npoly=0 +npoly=800 # nmono is a number of monomers in each polymer -nmono=2 +nmono=6 # Spring constant between monomers of the polymer k_spring=800 +#set to 1 if half of the polymeres are inside the vesicle +internal_poly=1 ####### Filament (inside the vesicle) definitions ########### # nfil is a number of filaments inside the vesicle -- Gitblit v1.9.3