Keith Robison (robison at golgi.harvard.edu) wrote:
: Spencer Muse (SVM1 at psuvm.psu.edu) wrote:
: : I would like to run plotfold from within a C program, using a system()
: : call. I see that the graphical versions (eg mountains, squiggles, etc)
: : have their own binaries. I need to get either text output or the .connect
: : file (menu options G and H). plotfold itself doesn't seem to work as a
: : system() call for me. Any suggestions on how I might do this? (All I
: : really want to access is the free energy of the optimal structure. A
: : simple way to do that from within a C program would be fine, too.)
Correct me if I'm wrong, but plotfold has to read the saved folding matrix?
This matrix is precisely what you need to read in: the elements of the
matrix (i,j) are the free energies of the optimal folding of the segment
between i and j (roughly), the element (1,N) is the total free energy.
For information about how this matrix is being stored into the .sav file,
consult the source code :-) (In fact, there are usually two energy arrays
used in the standard zuker program!)
: Are you running GCG under UNIX? If so, all the commands are somewhat
: strange aliases you should decompose before trying to use in any
: program [shell, C, etc]. You can get the alias by either
: "alias plotfold" or "which plotfold".
: I don't know whether the concept applies at all to the VMS versions,
: but its probably worth a check.
It does: "show symbol plotfold" tells you what program is run, like alias.
Usually it is not required to give the full path to the program, if the
system() call spawns a subprocess that inherits the parent's symbols.
: Keith Robison
:robison at mito.harvard.edu
Michael Schmitz
Biophysics Department, Uni-Duesseldorf