Morten Kjeldgaard wrote:
> You can do that like so:
>
> write ${.id_m}_* .undo.pdb ;
>
> remembering that ${.id_m} is a variable that records the name of the
> last clicked molecule. Put that in the @yes macro instead of pdb_write
> and put the following line in the @undo macro:
>
> read .undo.pdb
>
> instead of the pdb_read line. Please be aware though, that these
> macros may have undesired side-effects if you have several molecules
> in your O session, and you are clicking at both of them! Of course you
> can hardwire the molecule name...
I have modified the scripts following Mortens advice. I also hardwired
the mol-name 'current' to the working molecule. This is done to comply
with the nomenclature of the pdb-read command, where you distinct
between ca trace and all atom objects.
I have also added a 'mol current' command in the @yes script, this
ensures that you will not accidentally overwrite you .undo.pdb files
with another molecule.
Thus, @yes and @undo will only work on mol 'current'. If you work on
several pdbs in the same o file you can make separate scripts for each
ex. @yes1 and @yes2 for mol1 and mol2.
Enjoy!
Jesper
P.S. please report any bugs directly to me.
--
Jesper L. Karlsen
Scientific Computing staff
Centre for Structural Biology
Department of Molecular Biology
University of Aarhus
Gustav Wieds Vej 10C
8000 Århus C
Phone: +45 8942 5257
E-mail: jelka@bioxray.dk
read .undo1.pdb
ca ; obj currca end
zo ; obj currea end
$ rm -f .undo.pdb
$ mv .undo1.pdb .undo.pdb
$ mv .undo2.pdb .undo1.pdb
$ mv .undo3.pdb .undo2.pdb
$ mv .undo4.pdb .undo3.pdb
$ mv .undo5.pdb .undo4.pdb
$ rm -f undo5.pdb
$ mv .undo4.pdb .undo5.pdb
$ mv .undo3.pdb .undo4.pdb
$ mv .undo2.pdb .undo3.pdb
$ mv .undo1.pdb .undo2.pdb
$ mv .undo.pdb .undo1.pdb
mol current
write ${.id_m}_* .undo.pdb ;
yes
_______________________________________________
o-info mailing list (moderated)
o-info@o-info.bioxray.dk
http://o-info.bioxray.dk/mailman/listinfo/o-info
This archive was generated by hypermail 2b29 : Tue Mar 20 2007 - 03:13:39 CST