program helixside(distances, helixsidep, data, output); (* helixside: distances converted to DNA helical angle. Dr. Thomas D. Schneider National Institutes of Health National Cancer Institute Center for Cancer Research Nanobiology Program Molecular Information Theory Group Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu (use only if first address fails) http://www.ccrnp.ncifcrf.gov/~toms/ *) label 1; (* end of program *) const (* begin module version *) version = 1.00; (* of helixside.p 2007 Jun 25 2007 Jun 25, 1.00: origin *) updateversion = 1.00; (* defines lowest acceptable current parameter file *) (* end module version *) (* begin module describe.helixside *) (* name helixside: distances converted to DNA helical angle. synopsis helixside(distances: in, helixsidep: in, data: out, output: out) files distances: Distances on DNA data: distances on DNA followed by helical angle. helixsidep: parameters to control the program. The file must contain the following parameters, one per line: parameterversion: The version number of the program. This allows the user to be warned if an old parameter file is used. output: messages to the user description Convert distances to helical angle. examples documentation see also author Thomas Dana Schneider bugs technical notes *) (* end module describe.helixside *) var distances, (* file used by this program *) helixsidep, (* file used by this program *) data: text; (* file used by this program *) (* begin module halt *) procedure halt; (* stop the program. the procedure performs a goto to the end of the program. you must have a label: label 1; declared, and also the end of the program must have this label: 1: end. examples are in the module libraries. this is the only goto in the delila system. *) begin writeln(output,' program halt.'); goto 1 end; (* end module halt version = 'delmod 6.16 84 mar 12 tds/gds'; *) (* begin module helixside.themain *) procedure themain(var distances, helixsidep, data: text); (* the main procedure of the program *) var parameterversion: real; (* parameter version number *) d: integer; (* Distance in bases on DNA *) angle: real; (* angle on DNA *) modulo: real; (* distance modulo twist *) twist: real; (* bases per twist of DNA, generally 10.6 *) begin writeln(output,'helixside ',version:4:2); reset(helixsidep); readln(helixsidep, parameterversion); if round(100*parameterversion) < round(100*updateversion) then begin writeln(output, 'You have an old parameter file!'); halt end; twist := 10.6; reset(distances); rewrite(data); while not eof(distances) do begin readln(distances, d); modulo := abs(d); while modulo > twist do modulo := modulo - twist; angle := 360*modulo/twist; writeln(data, d:10,' ', angle:10:1); end; end; (* end module helixside.themain *) begin themain(distances, helixsidep, data); 1: end.