https://wiki.uni-konstanz.de/ccp4/index.php?title=Save-partial.scm&feed=atom&action=history Save-partial.scm - Revision history 2024-03-29T08:54:54Z Revision history for this page on the wiki MediaWiki 1.39.6 https://wiki.uni-konstanz.de/ccp4/index.php?title=Save-partial.scm&diff=104&oldid=prev Wgscott: New page: <pre> (define (save-partial imol atom-selection filename) (if (valid-model-molecule? imol) (begin (let ((imol-new (new-molecule-by-atom-selection imol atom-selection)))... 2008-02-09T20:20:35Z <p>New page: &lt;pre&gt; (define (save-partial imol atom-selection filename) (if (valid-model-molecule? imol) (begin (let ((imol-new (new-molecule-by-atom-selection imol atom-selection)))...</p> <p><b>New page</b></p><div>&lt;pre&gt;<br /> <br /> (define (save-partial imol atom-selection filename)<br /> <br /> (if (valid-model-molecule? imol)<br /> (begin<br /> (let ((imol-new <br /> (new-molecule-by-atom-selection imol atom-selection)))<br /> (if (not (valid-model-molecule? imol-new))<br /> (let ((s &quot;That atom selection did not create a valid molecule&quot;))<br /> (add-status-bar-text s))<br /> (let ((s (string-append &quot;Saved partial model to &quot;<br /> filename)))<br /> (write-pdb-file imol-new filename)<br /> (add-status-bar-text s)<br /> (close-molecule imol-new)))))))<br /> <br /> <br /> (let ((menu (coot-menubar-menu &quot;Extensions&quot;)))<br /> <br /> (add-simple-coot-menu-menuitem<br /> menu &quot;Save Partial Model...&quot;<br /> (lambda () <br /> <br /> (molecule-chooser-gui <br /> &quot;Save a selection from molecule: &quot;<br /> (lambda (imol) <br /> (let ((cv (coot-version)))<br /> (if (string&lt;? cv &quot;0.3.3&quot;)<br /> (generic-double-entry &quot;Atom Selection: &quot; &quot;Coordinates Filename: &quot;<br /> &quot;//A/1-10&quot; &quot;save.pdb&quot; &quot; Save Partial Model &quot;<br /> (lambda (atom-selection-str pdb-name)<br /> (save-partial imol atom-selection-str pdb-name)))<br /> (generic-double-entry &quot;Atom Selection: &quot; &quot;Coordinates Filename: &quot;<br /> &quot;//A/1-10&quot; &quot;save.pdb&quot; #f #f &quot; Save Partial Model &quot;<br /> (lambda (atom-selection-str pdb-name button-state)<br /> (save-partial imol atom-selection-str pdb-name))))))))))<br /> <br /> &lt;/pre&gt;</div> Wgscott