Trisurf Monte Carlo simulator
Samo Penic
2019-03-09 60c2b879f26c5f008af0df7d7f159d33077225ac
Cleanup of stretching energy plugin
1 files modified
22 ■■■■■ changed files
src/plugins/stretching_energy.c 22 ●●●●● patch | view | raw | blame | history
src/plugins/stretching_energy.c
@@ -1,6 +1,5 @@
#include <stdlib.h>
#include<math.h>
#include "general.h"
#include "energy.h"
@@ -8,13 +7,9 @@
char plugin_description[]= "Plugin adds stretching energy to Monte Carlo steps";
char plugin_author[] = "SAMO PENIC";
typedef struct {
    ts_double dstretchenergy;
    ts_double A0;
    ts_double epsarea;
} plugin_data;
ts_plugin_details *init (){
    ts_plugin_details *details=(ts_plugin_details *)calloc(1,sizeof(ts_plugin_details));
@@ -22,20 +17,6 @@
    details->data = (plugin_data *)calloc(1,sizeof(plugin_data)); //storing data
    return details;    
}
/*
ts_vesicle *after_vesicle_init(ts_vesicle *vesicle){
    plugin_data *data=(plugin_data *)vesicle->plist->pointer->plugin->details->data;
    ts_fprintf(stdout,"area volume initialized\n");
    centermass(vesicle);
    cell_occupation(vesicle);
    vesicle_area(vesicle);
    data->A0=vesicle->area;
    data->epsarea=data->A0/(ts_double)vesicle->tlist->n;
    return vesicle;
}
*/
void vm_energy_before_prepare(ts_vesicle *vesicle, ts_vertex *vtx){        
    if(vesicle->tape->stretchswitch==1){
@@ -45,7 +26,6 @@
        for(i=0;i<vtx->tristar_no;i++) data->dstretchenergy-=vtx->tristar[i]->energy;
    }
}
ts_double vm_energy_after_execute(ts_vesicle *vesicle, ts_vertex *vtx){
    //stretching energy 2 of 3
@@ -60,8 +40,6 @@
    }
    return 0.0;
}
void vm_new_state_rejected(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *old_vtx){
    //stretching energy 3 of 3