Trisurf Monte Carlo simulator
Samo Penic
2019-03-08 2afc2f4f1dd89518995f1b5a539aea932aecab65
src/plugins/constant_volume.c
@@ -57,16 +57,12 @@
      if(fabs(vesicle->volume+data->dvol-data->V0)>data->epsvol) return TS_FAIL;
   }
   return TS_SUCCESS;
//   if(vesicle->tape->constvolswitch==2){
//   /*check whether the dvol is gt than epsvol */
//      if(fabs(vesicle->volume+data->dvol-data->V0)>data->epsvol) return TS_FAIL;
//This part doesn't work as expected yet. Delta_energy_cv shoould be accounted for in the total energy change.
}
/*   }else if(vesicle->tape->constvolswitch == 1){
   retval=constvolume(vesicle, vtx, -dvol, &delta_energy_cv, &constvol_vtx_moved,&constvol_vtx_backup);
   if(retval==TS_FAIL){ // if we couldn't move the vertex to assure constant volume
      return TS_FAIL;
   } */
      return TS_SUCCESS;
void vm_new_state_accepted(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *old_vtx){
   if(vesicle->tape->constvolswitch >0){
      plugin_data *data=(plugin_data *)vesicle->plist->pointer->plugin->details->data;
      vesicle->volume+=data->dvol;
   }
}