Hi<br><br>thanks for your reply. I tried patching as you described it, but I got the error message:<br><br>patch: **** `>' expected at line 18 of patch<br><br>Franzi<br><br>---<br>Franziska Hoffgaard<br>PhD Student<br>
Bioinformatics & Theo. Biology Group<br>TU Darmstadt<br><br><div class="gmail_quote">2009/5/26 Berk Hess <span dir="ltr"><<a href="mailto:gmx3@hotmail.com">gmx3@hotmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
Hi,<br><br>I just saw that 4.0 uses a new mtx format which can also efficiently store sparse matrices.<br>Please try if my modified gmxdump for 4.0.5 works?<br>Store the data below in a file called fix and then do:<br>patch gmxdump.c fix<br>
<br>Berk<br><br>61a62,63 <br>> #include "sparsematrix.h" <br>> #include "mtxio.h" <br>364a367,402 <br>
> static void list_mtx(char *fn) <br>> { <br>> int nrow,ncol,i,j,k; <br>> real *full=NULL,value; <br>
> gmx_sparsematrix_t * sparse=NULL; <br>> <br>> gmx_mtxio_read(fn,&nrow,&ncol,&full,&sparse); <br>> <br>
> if (full == NULL) {<br>> snew(full,nrow*ncol);<br>> for(i=0;i<nrow*ncol;i++) {<br>> full[i] = 0;<br>> }<br>><br>> for(i=0;i<sparse->nrow;i++) {<br>> for(j=0;j<sparse->ndata[i];j++) {<br>
> k = sparse->data[i][j].col;<br>> value = sparse->data[i][j].value;<br>> full[i*ncol+k] = value;<br>> full[k*ncol+i] = value;<br>> }<br>> }<br>> gmx_sparsematrix_destroy(sparse);<br>
> }<br>><br>> printf("%d %d\n",nrow,ncol);<br>> for(i=0; i<nrow; i++) {<br>> for(j=0; j<ncol; j++) {<br>> printf(" %g",full[i*ncol+j]);<br>> }<br>> printf("\n");<br>
> }<br>><br>> sfree(full);<br>> }<br>><br>381a420<br>> { efMTX, "-mtx", "hessian", ffOPTRD },<br>409a449,450<br>> else if (ftp2bSet(efMTX,NFILE,fnm))<br>> list_mtx(ftp2fn(efMTX,NFILE,fnm));<div class="im">
<br><br><br><hr>Express yourself instantly with MSN Messenger! <a href="http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/" target="_blank">MSN Messenger</a></div></div>
<br>_______________________________________________<br>
gmx-users mailing list <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
Please don't post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can't post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br></blockquote></div><br>