| | |
| | | #include "poly.h" |
| | | #include "initial_distribution.h" |
| | | #include "io.h" |
| | | #include <math.h> |
| | | |
| | | ts_vesicle *parseDump(char *dumpfname) { |
| | | xmlDocPtr doc; |
| | | xmlNodePtr cur, cur1,cur2; |
| | | ts_vesicle *vesicle=NULL; |
| | | doc = xmlParseFile(dumpfname); |
| | | |
| | | int i; |
| | | if (doc == NULL ) { |
| | | fatal("Dump file could not be found or parsed. It is correct file?",1); |
| | | } |
| | |
| | | // END Point Position data & Bonds |
| | | cur = cur->next; |
| | | } |
| | | |
| | | xmlFreeDoc(doc); |
| | | |
| | | // vesicle->poly_list=init_poly_list(0, 0, vesicle->vlist, vesicle); |
| | | |
| | | set_vesicle_values_from_tape(vesicle); |
| | | init_normal_vectors(vesicle->tlist); |
| | | mean_curvature_and_energy(vesicle); |
| | | sweep_attraction_bond_energy(vesicle); |
| | | |
| | | if(vesicle->tape->stretchswitch==1){ |
| | | vesicle->tlist->a0=sqrt(3)/4.0*pow((vesicle->tape->dmax+1.0)/2.0,2); |
| | | for(i=0;i<vesicle->tlist->n;i++){ |
| | | stretchenergy(vesicle, vesicle->tlist->tria[i]); |
| | | } |
| | | } |
| | | /* TODO: filaments */ |
| | | |
| | | // ts_fprintf(stdout,"Restoration completed\n"); |
| | |
| | | //fprintf(stderr,"nvtx=%u\n",atoi((char *)nvtx)); |
| | | //TODO: check if nvtx is in agreement with nshell from tape |
| | | ts_vesicle *vesicle=init_vesicle(atoi((char *)nvtx),tape->ncxmax,tape->ncymax,tape->nczmax,tape->stepsize); |
| | | //vesicle->poly_list=init_poly_list(atoi((char *)npoly),atoi((char *)nmono), vesicle->vlist, vesicle); |
| | | // vesicle->poly_list=init_poly_list(atoi((char *)npoly),atoi((char *)nmono), vesicle->vlist, vesicle); |
| | | vesicle->poly_list=init_empty_poly_list(atoi((char *)npoly),atoi((char *)nmono)); |
| | | xmlFree(nvtx); |
| | | xmlFree(npoly); |
| | | xmlFree(nmono); |
| | |
| | | child = child->next; |
| | | } |
| | | |
| | | |
| | | vesicle->tape=tape; |
| | | set_vesicle_values_from_tape(vesicle); |
| | | // set_vesicle_values_from_tape(vesicle); |
| | | return vesicle; |
| | | } |
| | | |