;;; NUCLEIC -- 3D structure determination of a nucleic acid. ; Author: Marc Feeley (feeley@iro.umontreal.ca) ; ; Last modified: January 27, 1996 ; ; This program is a modified version of the program described in the paper: ; ; M. Feeley, M. Turcotte, G. Lapalme, "Using Multilisp for Solving ; Constraint Satisfaction Problems: an Application to Nucleic Acid 3D ; Structure Determination" published in the journal "Lisp and Symbolic ; Computation". ; ; The differences between this program and the original are described in ; the paper: ; ; "???" published in the "Journal of Functional Programming". ; -- MATH UTILITIES ----------------------------------------------------------- (import (rnrs base) (rnrs io simple) (rnrs arithmetic flonums)) (define-syntax nuc-const (syntax-rules () [(_ x* ...) '#(x* ...)])) (define constant-pi 3.14159265358979323846) (define constant-minus-pi -3.14159265358979323846) (define constant-pi/2 1.57079632679489661923) (define constant-minus-pi/2 -1.57079632679489661923) (define (math-atan2 y x) (cond ((fl>? x 0.0) (flatan (fl/ y x))) ((fl? x m) x m) (cdr l)))))) (define (run input) (most-distant-atom (pseudoknot input))) (define (main) (let* ((count (read)) (input1 (read)) (output (read)) (s2 (number->string count)) (s1 input1) (name "nucleic")) (run-r6rs-benchmark (string-append name ":" s2) count (lambda () (run (hide count input1))) (lambda (result) (and (number? result) (let ((x (fl/ result output))) (and (fl>? x 0.999999) (fl