Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (read-xyz)
- (let ((natoms (read)) ; number of atoms
- (rest-of-line (read-line)) ; discard the rest of the line
- (comment-line (read-line))) ; any text
- (let loop ((n natoms)
- (acc '()))
- (if (zero? n)
- ;; (list natoms rest-of-line comment (reverse acc))
- (list natoms comment-line (reverse acc))
- (let ((symbol (read))
- (x (read))
- (y (read))
- (z (read)))
- (loop (- n 1)
- (cons (list symbol (list x y z)) acc)))))))
- 15
- This is uranyl with some waters
- U -0.414633333333333 0.213933333333333 0.048566666666667
- O 1.186425751635119 0.980622195189284 0.121046706417034
- O -2.015692418301786 -0.552755528522618 -0.023913373083700
- O -1.400296137734070 2.330651998063650 -0.474962349653488
- H -2.374231172314353 2.490621981130683 -0.635773272586715
- H -0.901393783370848 3.192476432338561 -0.566368505340978
- O 0.580464534891958 -1.904327988632390 0.553410186515704
- H 0.085625448774497 -2.768968442594905 0.640192467091476
- H 1.556649317569456 -2.062595989295014 0.701783061513602
- O -0.109385653277192 -0.209486930054325 -2.286303549628824
- H -0.768228170218269 -0.667146175042155 -2.883358449405985
- H 0.699067364115980 0.046446395180368 -2.816305296514802
- O -0.722212952773571 0.638425892167969 2.384031196221085
- H -1.532165379339123 0.390423939301528 2.915512238286563
- H -0.057700948432124 1.089330366457678 2.979941383373171
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement