int main(int argc, char *argv[]) { t_x11 *x11; t_sc *sc; char *fn; x11 = GetX11(&argc, argv); if (argc > 1) { fn = argv[1]; } else { fn = "/usr/lib/X11/rgb.txt"; } if (!gmx_fexist(fn)) { fprintf(stderr, "Usage: %s rgb.txt\n", argv[0]); fprintf(stderr, "rgb.txt is usually somewhere in your X windows directories.\n"); exit(1); } sc = init_sc(x11, x11->root, fn); XMapWindow(x11->disp, sc->wd.self); XMapSubwindows(x11->disp, sc->wd.self); x11->MainLoop(x11); x11->CleanUp(x11); return 0; }
int gmx_view(int argc, char *argv[]) { const char *desc[] = { "[THISMODULE] is the GROMACS trajectory viewer. This program reads a", "trajectory file, a run input file and an index file and plots a", "3D structure of your molecule on your standard X Window", "screen. No need for a high end graphics workstation, it even", "works on Monochrome screens.[PAR]", "The following features have been implemented:", "3D view, rotation, translation and scaling of your molecule(s),", "labels on atoms, animation of trajectories,", "hardcopy in PostScript format, user defined atom-filters", "runs on MIT-X (real X), open windows and motif,", "user friendly menus, option to remove periodicity, option to", "show computational box.[PAR]", "Some of the more common X command line options can be used: ", "[TT]-bg[tt], [TT]-fg[tt] change colors, [TT]-font fontname[tt] changes the font." }; const char *bugs[] = { "Balls option does not work", "Some times dumps core without a good reason" }; output_env_t oenv; t_filenm fnm[] = { { efTRX, "-f", NULL, ffREAD }, { efTPR, NULL, NULL, ffREAD }, { efNDX, NULL, NULL, ffOPTRD } }; #define NFILE asize(fnm) if (parse_common_args(&argc, argv, PCA_CAN_TIME, NFILE, fnm, 0, NULL, asize(desc), desc, asize(bugs), bugs, &oenv)) { #if !GMX_X11 fprintf(stderr, "Compiled without X-Windows - can not run viewer.\n"); #else t_x11 *x11; if ((x11 = GetX11(&argc, argv)) == NULL) { fprintf(stderr, "Can't connect to X Server.\n" "Check your DISPLAY environment variable\n"); } else { init_gmx(x11, argv[0], NFILE, fnm, oenv); x11->MainLoop(x11); x11->CleanUp(x11); } #endif } return 0; }
int main(int argc, char *argv[]) { const char *desc[] = { "[TT]g_xrama[tt] shows a Ramachandran movie, that is, it shows", "the Phi/Psi angles as a function of time in an X-Window.[PAR]" "Static Phi/Psi plots for printing can be made with [TT]g_rama[tt].[PAR]", "Some of the more common X command line options can be used:[BR]", "[TT]-bg[tt], [TT]-fg[tt] change colors, [TT]-font fontname[tt], changes the font." }; output_env_t oenv; t_x11 *x11; t_topology *ramatop; t_app *app; t_filenm fnm[] = { { efTRX, "-f", NULL, ffREAD }, { efTPX, NULL, NULL, ffREAD } }; #define NFILE asize(fnm) CopyRight(stderr, argv[0]); parse_common_args(&argc, argv, PCA_CAN_TIME, NFILE, fnm, 0, NULL, asize(desc), desc, 0, NULL, &oenv); if ((x11 = GetX11(&argc, argv)) == NULL) { fprintf(stderr, "Can't open display, set your DISPLAY environment variable\n"); exit(1); } XSetForeground(x11->disp, x11->gc, x11->fg); app = init_app(x11, argc, argv); ramatop = init_rama(oenv, ftp2fn(efTRX, NFILE, fnm), ftp2fn(efTPX, NFILE, fnm), app->xr, 3); mk_gly(app); XMapWindow(x11->disp, app->wd.self); XMapSubwindows(x11->disp, app->wd.self); x11->MainLoop(x11); x11->CleanUp(x11); thanx(stderr); return 0; }
int main(int argc, char *argv[]) { t_x11 *x11; t_sc *sc; char *fn; x11=GetX11(&argc,argv); if (argc > 1) fn=argv[1]; else fn="/usr/lib/X11/rgb.txt"; sc=init_sc(x11,x11->root,fn); XMapWindow(x11->disp,sc->wd.self); XMapSubwindows(x11->disp,sc->wd.self); x11->MainLoop(x11); x11->CleanUp(x11); }
int main(int argc, char *argv[]) { t_x11 *x11; t_dlg *dlg; if ((x11=GetX11(&argc,argv))==NULL) { fprintf(stderr,"No X!\n"); exit(1); } if (argc > 1) { dlg=ReadDlg(x11,0,x11->title,x11->fg,x11->bg,argv[1],100,100,TRUE, TRUE,NULL,NULL); ShowDlg(dlg); x11->MainLoop(x11); } else fprintf(stderr,"Usage: %s [ X options ] infile\n",argv[0]); x11->CleanUp(x11); return 0; }
int main(int argc, char *argv[]) { const char *desc[] = { "[TT]highway[tt] is the GROMCAS highway simulator. It is an X-windows", "gadget that shows a (periodic) Autobahn with a user defined", "number of cars. Fog can be turned on or off to increase the", "number of crashes. Nice for a background CPU-eater. A sample", "input file is in [TT]$GMXDATA/top/highway.dat[tt]" }; output_env_t oenv; t_x11 *x11; t_xhighway *xhw; t_filenm fnm[] = { { efDAT, "-f", "highway", ffREAD } }; #define NFILE asize(fnm) CopyRight(stderr, argv[0]); parse_common_args(&argc, argv, 0, NFILE, fnm, 0, NULL, asize(desc), desc, 0, NULL, &oenv); if ((x11 = GetX11(&argc, argv)) == NULL) { fprintf(stderr, "Can't connect to X Server.\n" "Check your DISPLAY environment variable\n"); exit(1); } xhw = GetXHW(x11, opt2fn("-f", NFILE, fnm)); XMapWindow(x11->disp, xhw->main.self); XMapSubwindows(x11->disp, xhw->main.self); x11->MainLoop(x11); x11->CleanUp(x11); thanx(stderr); return 0; }