Changeset 1142
- Timestamp:
- Sep 5, 2008, 10:01:52 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/molvisviewer.tcl
r1013 r1142 30 30 } 31 31 32 set debug 132 set debug 0 33 33 proc debug { args } { 34 34 global debug … … 518 518 _send "loadpdb -defer \"$data1\" $model $state" 519 519 set _dataobjs($model-$state) 1 520 puts stderr "loaded model $model into state $state"521 520 } 522 521 if {"" != $data2} { 523 522 _send "loadpdb -defer \"$data2\" $model $state" 524 523 set _dataobjs($model-$state) 1 525 puts stderr "loaded model $model into state $state"526 524 } 527 525 } … … 597 595 _update 598 596 } 597 set w [winfo width $itk_component(3dview)] 598 set h [winfo height $itk_component(3dview)] 599 _send "screen $w $h" 599 600 600 601 set _inrebuild 0 -
trunk/gui/scripts/visviewer.tcl
r1141 r1142 23 23 set _servers(nanovis) "" 24 24 set _servers(pymol) "" 25 set _servers(nanovis) "128.210.189.216:2000"26 set _servers(pymol) "128.210.189.216:2020"27 25 28 26 protected variable _dispatcher "" ;# dispatcher for !events -
trunk/lang/tcl/scripts/library.tcl
r1042 r1142 410 410 } 411 411 set path [lindex $args 0] 412 413 412 set node [find $path] 414 413 if {$node == ""} { -
trunk/packages/vizservers/pymolproxy/pymolproxy.c
r1137 r1142 49 49 50 50 static FILE *flog; 51 static int debug = 0;51 static int debug = 1; 52 52 53 53 static void … … 831 831 PymolProxy *pymol = (PymolProxy *) cdata; 832 832 int state = 1; 833 int tmpf;834 833 int arg, defer = 0, push = 0, varg = 1; 835 char filename[] = "/tmp/fileXXXXXX.pdb";836 834 837 835 if (pymol == NULL) 838 836 return(TCL_ERROR); 839 840 837 clear_error(pymol); 841 838 pdbdata = name = NULL; /* Suppress compiler warning. */ … … 859 856 pymol->need_update = !defer || push; 860 857 pymol->immediate_update |= push; 861 862 tmpf = open(filename,O_RDWR|O_TRUNC|O_CREAT,0700); 863 864 if (tmpf <= 0) 865 fprintf(stderr,"pymolproxy: error opening file %d\n",errno); 866 867 write(tmpf,pdbdata,strlen(pdbdata)); 868 close(tmpf); 869 870 sendf(pymol, "load %s, %s, %d\n", filename, name, state); 858 859 { 860 char fileName[200]; 861 FILE *f; 862 size_t nBytes, nWritten; 863 864 sprintf(fileName, "/tmp/pymol%d.pdb", getpid()); 865 f = fopen(fileName, "w"); 866 trace("pymolproxy: open file %s as %x\n", fileName, f); 867 if (f == NULL) { 868 trace("pymolproxy: failed to open %s %d\n", fileName, errno); 869 perror("pymolproxy"); 870 } 871 nBytes = strlen(pdbdata); 872 nWritten = fwrite(pdbdata, sizeof(char), nBytes, f); 873 if (nBytes != nWritten) { 874 trace("pymolproxy: short write %d wanted %d bytes\n", nWritten, 875 nBytes); 876 perror("pymolproxy"); 877 } 878 fclose(f); 879 sendf(pymol, "load %s, %s, %d\n", fileName, name, state); 880 } 871 881 sendf(pymol, "zoom buffer=2\n"); 872 /* Can't clean up the temporary file, since we don't when pymol will be873 * done reading it. */874 882 return(pymol->status); 875 883 } … … 1389 1397 main(int argc, char *argv[]) 1390 1398 { 1399 flog = stderr; 1391 1400 if (debug) { 1392 flog = stderr; 1393 flog = fopen("/tmp/pymolproxy.log", "w"); 1401 char fileName[200]; 1402 sprintf(fileName, "/tmp/pymolproxy%d.log", getpid()); 1403 flog = fopen(fileName, "w"); 1394 1404 } 1395 1405 ProxyInit(fileno(stdout), fileno(stdin), argv + 1);
Note: See TracChangeset
for help on using the changeset viewer.