Sorry. the beginning of the code was truncated. Here are the leading lines. #include <stdlib.h> #include <stdio.h> #define REALYL double //#define DEBUG typedef struct { On 5/24/07, Keith McLaughlin <kmclau at gmail.com> wrote: > > Hi all. > > I am currently trying to find a way to read binary files into rasmol, > rather than having to convert to xyz first. Here is the code that I use to > convert from bin to xyz, which I'd like to integrate into rasmol. Any tips > or ideas wqhere I should start? > char symbol[2]; > float pos[3]; > REALYL EatomRB; > } singleatom; > > main (int argc, char * argv[]) > { > FILE * fp; int flen,np,npread; REALYL Axyz[3]; REALYL curtime; > singleatom * atoms, * atomsformated; unsigned char buffer[1024]; int i; > > if (argc < 2) { > fprintf(stderr, "Usage: bin2xyz <file.bin>\n"); > return; > } > fp = fopen (argv[1],"rb"); > if (fp == NULL) { > fprintf(stderr, "ERROR: <%s> not found!\n",argv[1]); > return; > } > > fseek(fp,0,SEEK_SET); > fread(&flen,sizeof(flen),1,fp); > fread(&np,sizeof(np),1,fp); > fread(Axyz,sizeof(REALYL),3,fp); > fread(&curtime,sizeof(REALYL),1,fp); > > atoms=malloc(sizeof(singleatom)*(np+1)); > atomsformated=atoms+np; > if (atoms == NULL) { > fprintf(stderr, "ERROR: Out of memory!\n"); > return; > } > #ifdef DEBUG > fread(buffer,12*4,1,fp); > for (i=0;i<12*4;i++) fprintf(stdout,"%02X ",buffer[i]); > fprintf(stdout,"\n"); > return; > #endif > npread=fread(atoms,22,np,fp); > if (npread < np) { > fprintf(stderr, "WARNING: data record truncated! Expecting %d , found > %d .\n",np,npread); > } > fprintf(stdout, " %d\n %lf %lf %lf %lf (fs)\n", npread, > Axyz[0],Axyz[1],Axyz[2],curtime); > for (i=0;i<npread;i++) { > memmove (atomsformated,(char *) atoms +i*22,2); > memmove (&(atomsformated->pos[0]),(char *) atoms +i*22+2,20); > fprintf(stdout, "%c%c %20.4lf %20.4lf %20.4lf %20.10lf\n", > atomsformated->symbol[0],atomsformated->symbol[1], > atomsformated->pos[0],atomsformated->pos[1],atomsformated->pos[2], > atomsformated->EatomRB); > } > free(atoms); > fclose(fp); > } > > > > On 4/15/07, Keith McLaughlin < kmclaugh at physics.cas.usf.edu> wrote: > > > > Disregard that last issue I had. I found the 2.7.1 src and was able to > > compile it without any problems. Thanks a bunch. You've been a huge help. > > > > Keith McLaughlin > > > > On 4/15/07, Keith McLaughlin <kmclaugh at physics.cas.usf.edu> wrote: > > > > > > Herbert, > > > > > > The workstation I use is 1240x1028, but we are also experimenting with > > > a visual cluster with 4096x2304. > > > > > > I tried to compile after changing graphics.h, and a lot of this cc: > > > unrecognized option `-no-cpp-precomp'. When I try to load an atom, I crash > > > with the error "too many new atom types." Here is my entire output: > > > > > > [16:41:22 | scandium]<~/Desktop/RasMol_2.7.2.1.1/src>$ make > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o rasmol.o rasmol.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o molecule.o molecule.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o abstree.o abstree.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o cmndline.o cmndline.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o command.o command.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o transfor.o transfor.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o render.o render.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o repres.o repres.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o x11win.o x11win.c > > > cc: unrecognized option `-no-cpp-precomp' > > > x11win.c: In function `HandleIPCCommand': > > > x11win.c:2228: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > x11win.c :2265: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o pixutils.o pixutils.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o outfile.o outfile.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o script.o script.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o infile.o infile.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o tokens.o tokens.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o cif_fract.o cif_fract.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o cif.o cif.c > > > cc: unrecognized option `-no-cpp-precomp' > > > cif.c: In function `cif_free_node': > > > cif.c:494: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > cif.c: In function `cif_copy_string': > > > cif.c:1331: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > cif.c:1340: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > cif.c: In function `cif_free_string': > > > cif.c:1357: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > cif.c: In function `cif_free_handle': > > > cif.c:1385: warning: dereferencing type-punned pointer will break > > > strict-aliasing rules > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o cif_ctonum.o cif_ctonum.c > > > cc: unrecognized option `-no-cpp-precomp' > > > cif_ctonum.c:191:1: warning: "_USE_RASMOL_H_" redefined > > > <command line>:7:1: warning: this is the location of the previous > > > definition > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o cif_stx.o cif_stx.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o multiple.o multiple.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o vector.o vector.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o wbrotate.o wbrotate.c > > > cc: unrecognized option `-no-cpp-precomp' > > > /usr/bin/cc -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -I/usr/X11R6/include -D__powerpc__ -D__DARWIN__ -DNO_ALLOCA > > > -DX_LOCALE -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DTHIRTYTWOBIT > > > -D_USE_RASMOL_H_ -c -o langsel.o langsel.c > > > cc: unrecognized option `-no-cpp-precomp' > > > rm -f rasmol > > > /usr/bin/cc -o rasmol -g -O2 -Wall -Wpointer-arith -no-cpp-precomp > > > -L/usr/X11R6/lib rasmol.o molecule.o abstree.o cmndline.o command.o > > > transfor.o render.o repres.o x11win.o pixutils.o outfile.o > > > script.o infile.o tokens.o cif_fract.o cif.o cif_ctonum.o > > > cif_stx.o multiple.o vector.o wbrotate.o langsel.o -lm -lXi > > > -lXext -lX11 > > > cc: unrecognized option `-no-cpp-precomp' > > > rm -f rasmol._man > > > cd `dirname rasmol` && \ > > > ln -s `basename rasmol.man` `basename rasmol._man` > > > > > > Additionally, I'd prefer source for 2.7.1, but not sure where to find > > > that. The issue I had with 2.7.2 with the colors is mentioned on the > > > README page: > > > > > > > This release is not fully debugged and has some serious problems. > > > > This release is intended for testing and experimentation and not for > > > > production use. Comments and suggestions would be appreciated. We are aware > > > > fo the following deficiencies: > > > > > > > > - RasMol may have difficulty in allocating colors for > > > > molecules after the first. The fix for this interacts with some other > > > > pending changes, and should be ready for the next release. > > > > > > > > > > > > > > Thanks a lot for your help Herbert! > > > > > > Sincerely, > > > Keith McLaughlin > > > > > > > > > > > > > > > On 4/14/07, Herbert J. Bernstein <yaya at bernstein-plus-sons.com> wrote: > > > > > > > > You should be able to automate the set write on command by using an > > > > external script or by redirecting stdin. The redirected file must > > > > end > > > > with the execution of your script and the exit command. > > > > > > > > I'll add a command to set the screen size from the command line, > > > > but until that is ready, it is easy to change the startup default > > > > size in a rebuild by changing the values DefaultWide and DefaultHigh > > > > in graphics.h. If you send me your screen dimensions, I'll make you > > > > such a binary. > > > > > > > > -- Herbert > > > > > > > > > > > > At 7:01 PM -0400 4/14/07, Keith McLaughlin wrote: > > > > >Thanks for your feedback. I will try to monitor the memory > > > > consumption and > > > > >such and I'll update. > > > > > > > > > >Closing rasmol between runs is not an option unless there is a way > > > > to make > > > > >rasmol automatically open fullscreen. Additionally, I believe the > > > > command > > > > >"set write on" needs to be entered manually. I'm not sure that it > > > > is > > > > >possible to automate this. > > > > > > > > > >On 4/13/07, Dr. Christoph Gille <christoph.gille at charite.de > > > > > wrote: > > > > >> > > > > >> > > > > >>I do not think that increasing > > > > >>RAM would solve the problem. > > > > >> > > > > >>If the RAM would be a problem the entire computer would be > > > > >>frozen. > > > > >> > > > > >>Since the computer is still responsive it has sufficient memory. > > > > >> > > > > >>Nevertheless, > > > > >>can you monitor memory consumption i.e. > > > > >>calling ps aux | fgrep rasmol ... after each image > > > > >>or using top or gps or whatever monitor. > > > > >> > > > > >>As a solution, can you close the rasmol instance in your script > > > > >>and start a new one > > > > >>after 400 files ? > > > > >> > > > > >>If the number of written files is about the > > > > >>same each time > > > > >>independently of the size of the protein > > > > >>it could also be that file pointers are not closed. > > > > >> > > > > >>You could have a look at the > > > > >>source code and check whether > > > > >>the file pointers are closed. > > > > >> > > > > >> > > > > >> > > > > >>> Hello all; > > > > >>> > > > > >>> My research involves 4 million atom MD simulations and we've > > > > decided to > > > > >>use > > > > >>> rasmol for visualization. From my experiences, I have two > > > > questions and > > > > >>am > > > > >>> hoping that someone here may be able to help. > > > > >>> > > > > >>> 1. Currently I'm using version 2.7.1 because it doesn't have > > > > the > > > > >>coloring > > > > >>> problems when loading images one after another. Unfortunately, > > > > after > > > > >>about > > > > >>> 500 images rasmol gives an error and is unable to load any new > > > > images > > > > >>saying > > > > >>> that the file is not found, or something to that effect. Does > > > > anyone > > > > >>have > > > > >>> experience with handling this? > > > > >>> > > > > >>> 2. We are planning on some upgrades, and are kind of curious as > > > > to which > > > > >>> components will help the most with increasing the speed in > > > > which these > > > > >>files > > > > >>> are loaded: memory or video memory, or perhaps processor. We > > > > mostly > > > > >>suspect > > > > >>> that adding more memory would be the best choice, but I'd like > > > > to hear > > > > >>other > > > > >>> opinions. > > > > >>> > > > > >>> Thanks! > > > > >>> -- > > > > >>> Keith McLaughlin > > > > >>> University of South Florida > > > > >>> Physics Dept. PHY225 > > > > >>> 4202 E. Fowler Ave > > > > >>> Tampa, FL 33620 > > > > >>> > > > > >>> -- > > > > >>> Keith McLaughlin > > > > >>> University of South Florida > > > > >>> Physics Dept. PHY225 > > > > >>> 4202 E. Fowler Ave > > > > >>> Tampa, FL 33620 > > > > >>> _______________________________________________ > > > > >>> Molvis-list mailing list > > > > >>> Molvis-list at bioinformatics.org > > > > >>> https://bioinformatics.org/mailman/listinfo/molvis-list > > > > >>> > > > > >> > > > > >> > > > > >>_______________________________________________ > > > > >>Molvis-list mailing list > > > > >> Molvis-list at bioinformatics.org > > > > >> https://bioinformatics.org/mailman/listinfo/molvis-list > > > > >> > > > > > > > > > > > > > > > > > > > >-- > > > > >Keith McLaughlin > > > > >University of South Florida > > > > >Physics Dept. PHY225 > > > > >4202 E. Fowler Ave > > > > >Tampa, FL 33620 > > > > >_______________________________________________ > > > > >Molvis-list mailing list > > > > > Molvis-list at bioinformatics.org > > > > > https://bioinformatics.org/mailman/listinfo/molvis-list > > > > > > > > > > > > -- > > > > ===================================================== > > > > Herbert J. Bernstein, Professor of Computer Science > > > > Dowling College, Kramer Science Center, KSC 121 > > > > Idle Hour Blvd, Oakdale, NY, 11769 > > > > > > > > +1-631-244-3035 > > > > yaya at dowling.edu > > > > ===================================================== > > > > _______________________________________________ > > > > Molvis-list mailing list > > > > Molvis-list at bioinformatics.org > > > > https://bioinformatics.org/mailman/listinfo/molvis-list > > > > > > > > > > > > > > > > -- > > > Keith McLaughlin > > > University of South Florida > > > Physics Dept. PHY225 > > > 4202 E. Fowler Ave > > > Tampa, FL 33620 > > > > > > > > > > > -- > > Keith McLaughlin > > University of South Florida > > Physics Dept. PHY225 > > 4202 E. Fowler Ave > > Tampa, FL 33620 > > > > > > -- > Keith McLaughlin > University of South Florida > Department of Physics (PHY225) > 4202 E. Fowler Ave > Tampa, FL 33620 > -- Keith McLaughlin University of South Florida Department of Physics (PHY225) 4202 E. Fowler Ave Tampa, FL 33620