From fedf2b217113800a15f367e111e2dbcad4a3c92c Mon Sep 17 00:00:00 2001
From: Miha <mihaf@hapi.(none)>
Date: Thu, 06 Feb 2014 17:39:37 +0000
Subject: [PATCH] Polymers thermicaly move now! HArmonic potential added.

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

diff --git a/src/energy.c b/src/energy.c
index 3b1779c..1e37e08 100644
--- a/src/energy.c
+++ b/src/energy.c
@@ -19,9 +19,12 @@
     return TS_SUCCESS;
 }
 
-inline ts_bool energy_poly_vertex(ts_vertex *vtx,ts_poly *poly){
-	
-}
+
+inline ts_bool bond_energy(ts_bond *bond,ts_poly *poly){
+	bond->energy=poly->k*pow(bond->bond_length-1,2);
+	return TS_SUCCESS;
+};
+
 
 inline ts_bool energy_vertex(ts_vertex *vtx){
 //    ts_vertex *vtx=&vlist->vertex[n]-1; // Caution! 0 Indexed value!

--
Gitblit v1.9.3