From def8b5262e183297ccee42ebbf9ebdb89c10f44c Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Sun, 03 Jul 2016 18:21:13 +0000
Subject: [PATCH] restoring vertices with spontaneous curvatures seems to work, however, the dumped energy differs on last few decimal places

---
 src/energy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/energy.c b/src/energy.c
index cc5ccde..0e57e71 100644
--- a/src/energy.c
+++ b/src/energy.c
@@ -200,7 +200,7 @@
 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;
+		bond->energy=-w;
 	}
 	else {
 		bond->energy=0.0;

--
Gitblit v1.9.3