From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Nov 05 2007 - 00:35:27 CST

On Fri, 2 Nov 2007, John Stone wrote:

hi,

please find attached a script that i wrote for similar
purposes. it will create a backup copy of a loaded trajectory
and then allows you to copy back the frames. the "backup"
is identified by the molecule name rather than number, and
thus making it independent from whatever happened before.

the script was written for a specific purpose, but you may
be able to adapt it for your needs. in my case it was important
to copy also properties that cannot be saved easily (e.g. user).
it would definitely be much more efficient to have this
implemented in c++ directly in VMD (or even implement this
as COW entries of hash tables).

johns suggestion to use a ramdisk (or tmpfs) might speed up
everything (provided you have enough memory).

cheers,
    axel.

>
> Hi,
> There's not presently a molecule cloning feature, but this is something
> I could definitely see being useful. For now my only suggestion is to do
> what you're already doing, but write to a memory-based filesystem (e.g. tmpfs)
> rather than a real disk. I'll see if I can find time to add cloning soon.
> I'll be out of town at conferences for much of the next two weeks, so I know
> I won't get to it until after returning...
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Thu, Nov 01, 2007 at 02:46:44PM -0400, dimka wrote:
>> Hi is there a way to clone a loaded molecule?
>>
>> for example, I have a molecule 0 loaded. I'm looking for a way
>> (through tcl) where same molecule will be cloned and loaded as
>> molecule N.
>>
>> right now in my script, I'm applying a series of transformations to a
>> molecule and saving the final coordinates if they fit certain
>> criteria. I'm re-reading the initial coordinates at each step, but I
>> would like to avoid this step and just revert to the original
>> coordinates.
>>
>> So i was thinking about reading the original coordinates into say
>> molecule 0, and cloning this molecule to which the transformations
>> will be applied. the number of steps will be somewhere between
>> 10k-100k so i'd like to avoid reading form HD as much as possible.
>>
>> dima
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
    Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.