Re: [o-info] undo-button in O

From: Morten Kjeldgaard (mok@bioxray.dk)
Date: Tue Feb 06 2007 - 04:01:15 CST


> Ever wanted to undo the ca-trace you just accepted in o.
> Here is a simple way to make a undo-button that gives you the 
> possibility to roll back as long as you want to.
> The o-macros I have attached to this mail uses the object 'current' 
> and keeps backup 5 x back.
Rather than writing out the molecule as a PDB file, it is probably 
better to write out all the datablocks associated with the current 
molecule, because then you preserve any other datablocks you may have 
created from the same molecule. 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...

Cheers,
Morten

-- 
Morten Kjeldgaard, Asc. professor, Ph.D.
Department of Molecular Biology, Aarhus University
Gustav Wieds Vej 10 C, DK-8000 Aarhus C, Denmark
Lab +45 89425026 * Mobile +45 51860147 * Fax +45 86123178
Home +45 86188180 * http://www.bioxray.dk/~mok

_______________________________________________
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