VMD-L Mailing List
From: Jérôme Hénin (jerome.henin_at_ibpc.fr)
Date: Thu Jun 01 2017 - 14:45:52 CDT
- Next message: Robert Elder: "Suggested fix for 'restore_reps' command"
- Previous message: Charles McAnany: "Three dcdplugin.c questions, and the DCD binary format."
- In reply to: John Stone: "Re: Reordering atomselection before saving trajectory"
- Next in thread: Jacob D Durrant: "Re: Reordering atomselection before saving trajectory"
- Reply: Jacob D Durrant: "Re: Reordering atomselection before saving trajectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Jacob,
there is no simple ways to swap the identity of atoms, but you can swap
their coordinates, provided they have exactly the same number of atoms:
proc swapcoords {selA selB} {
set A [atomselect top "$selA"]
set B [atomselect top "$selB"]
set tmp_coords [$A get {x y z}]
$A set {x y z} [$B get {x y z}]
$B set {x y z} $tmp_coords
}
swapcoords "chain A" "chain B"
Best,
Jerome
On 31 May 2017 at 17:37, John Stone <johns_at_ks.uiuc.edu> wrote:
> Hi Jacob,
> This isn't a built-in feature of VMD. You'd either need to write new
> C/C++ code
> to do this, or do it in a script of some sort. None of the obvious options
> for implementing this are very elegant unfortunately.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Sun, May 14, 2017 at 12:28:32AM +0000, Jacob D Durrant wrote:
> > Is it possible to reorder the atoms of a selection prior to output?
> Let me
> > explain my scenario.
> > I have simulated a protein that is a trimer. Let's say it has chain
> IDs A,
> > B, and C. There's a pocket at the interface of each monomer. So
> pocket AB,
> > BC, and CA. I saved the timer trajectory as three different
> trajectories
> > containing the alpha carbons of all protein atoms, as well as all the
> > atoms of the binding-pocket residues. My hope is to concatenate these
> > three trajectories and align them by the alpha carbons. I'll then
> cluster
> > based on the binding-pocket atoms.
> > But to align the concatenated trajectory in VMD, I need to reorder the
> > chains so they line up across the three monomeric trajectories. For
> > pockets AB and CA to line up, for example, I need to align the alpha
> > carbons of chain A to those of chain C, and the alpha carbons of
> chain B
> > to chain A. But that would require me to reverse the order of chain C
> and
> > A in the second trajectory.
> > I hope this makes sense. Thanks for your help!Â
> > --
> >
> > Sent from my mobile.
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/
>
>
- Next message: Robert Elder: "Suggested fix for 'restore_reps' command"
- Previous message: Charles McAnany: "Three dcdplugin.c questions, and the DCD binary format."
- In reply to: John Stone: "Re: Reordering atomselection before saving trajectory"
- Next in thread: Jacob D Durrant: "Re: Reordering atomselection before saving trajectory"
- Reply: Jacob D Durrant: "Re: Reordering atomselection before saving trajectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]