From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Jan 20 2006 - 14:39:57 CST

Hi Lubos,

On Thu, Jan 19, 2006 at 08:58:15AM +0100, Mgr. Lubos Vrbka wrote:
...
[ using solvate as an example of code for replicating a periodic cell...]
...
> i checked the solvate.tcl (i have version 1.2), however still don't
> fully understand how it works.
>
> i think the part relevant for me starts around line 176 (it is a comment
> - read combined structure back). i don't need to load anything more
> since everything (the whole simulation box) is already loaded. however,
> i have a suspicion that i'll need the psf file for some reason - and i
> don't have it, this is a gromacs trajectory.

Well, as part of doing this you will have to build a psf anyway, since that's
what psfgen does, even though it's not of any particular use when you're all
done. It'll be helpful to force VMD to get the correct bond info etc.
So, jut do it to please VMD and psfgen if for no other reason... :-)
If you need help building an initial psf file for the unit cell,
The 'autopsf' plugin should help with that.

> then, the translation vector is created and all water molecules are
> shifted at the same time. this is clear.
> the next part (create a copy of the water molecule) is a mystery to me -
> probably because i never worked with psfgen, since these commands seem
> to be psfgen-related. it looks like (please correct me if i am wrong):
> 1) segment is one of the copies of the water box
> 2) place 'holder' for appropriate number of residues to this segment
> (foreach cycle and residue command)
> 3) enlarge the seglist variable (is it psfgen variable?)
> 4) cycle through all the original residues and set the properties of the
> 'holders' in the segment (i.e. coordinates with command coord)

I'm personally not a psfgen jockey, so I'll let one of the other guys
answer this, but you can also read up on psfgen in the NAMD tutorial
and in the psfgen docs. Jim or Peter can answer the psfgen-specific
questions you have below. But I have more comments...

> deleting the overlaping molecules doesn't apply in my case. then, moving
> the original coordinates back to their initial position - again, clear
> here...
>
> the solvate plugin copies all residues. i might do the same thing, but
> copying set of individual atoms (only OW, "HW.") might work as well. i'd
> first create the appropriate selection
> set wat [atomselect top "name OW \"HW.\""]
> but how to treat then the part of the code with segment?
>
> after this is worked out, i presume i just need to modify my atomselect
> commands like
> set sel [ atomselect top "segid $seglist ..... "]
> to treate all the replicas. is this true?
>
> also (since i won't need the replicas after the analysis is done, how
> can i safely delete all created segments?
>
> =====
>
> isn't there any (easier) route to this problem? re-imaging structure
> sequentially for every water doesn't seem to be the correct approach.
> how does it look like with the pbc support in measure and other
> commands? aren't there currently any workarounds?

There's no PBC functionality in any of the measure commands etc yet,
and even if there were, there are a lot of "gotcha" cases that have to
be avoided. Replicating whole structure is annoying, but less apt to
be flawed in some tricky way.

> thank you for your support and help. with best regards,
> lubos
>
> --
> .....................................................
> Mgr. Lubos Vrbka
>
> Center for Biomolecules and Complex Molecular Systems
> Institute of Organic Chemistry and Biochemistry
> Academy of Sciences of the Czech Republic
> Prague, Czech Republic
>
> http://www.molecular.cz/~vrbka
> .....................................................

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078