Toggle-ncs-ghosts-script
Jump to navigation
Jump to search
;; this bind the "g" key: (add-key-binding "Toggle Ghosts" "g" (lambda () (let ((keyboard-ghosts-mol (let ((ls (model-molecule-list))) (let loop ((ls ls)) (cond ((null? ls) -1) ((ncs-ghosts (car ls)) (car ls)) (else (loop (cdr ls)))))))) (if (= (draw-ncs-ghosts-state keyboard-ghosts-mol) 0) (set-draw-ncs-ghosts keyboard-ghosts-mol 1) (set-draw-ncs-ghosts keyboard-ghosts-mol 0)))))