From 89434d44fc91bf6dbaf023b3f3218c892420d908 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Sun, 03 Jul 2016 20:00:18 +0000 Subject: [PATCH] fixed some of the issues while reconstructing wesicles. Added Nbw/Nb metrics to the tspoststat tool. --- src/energy.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/energy.c b/src/energy.c index 3173f67..0e57e71 100644 --- a/src/energy.c +++ b/src/energy.c @@ -1,3 +1,4 @@ +/* vim: set ts=4 sts=4 sw=4 noet : */ #include<stdlib.h> #include "general.h" #include "energy.h" @@ -184,3 +185,25 @@ return TS_SUCCESS; } + + + +ts_bool sweep_attraction_bond_energy(ts_vesicle *vesicle){ + int i; + for(i=0;i<vesicle->blist->n;i++){ + attraction_bond_energy(vesicle->blist->bond[i], vesicle->tape->w); + } + return TS_SUCCESS; +} + + +inline ts_bool attraction_bond_energy(ts_bond *bond, ts_double w){ + + if(fabs(bond->vtx1->c)>1e-16 && fabs(bond->vtx2->c)>1e-16){ + bond->energy=-w; + } + else { + bond->energy=0.0; + } + return TS_SUCCESS; +} -- Gitblit v1.9.3