[chimera-dev] sort a list of residues based on the id.position values

Jean Didier Pie Marechal JeanDidier.Marechal at uab.cat
Fri Oct 26 06:49:12 PDT 2012


Hi guys,

how could I sort a list of residues based on their id.position value?

thanks a lot
jd


Dr. Jean-Didier Maréchal
Lecturer
The Computational Biotechnological Chemistry Team
Unitat de Química Física
Departament de Química
Universitat Autònoma de Barcelona
Edifici C.n.
08193 Cerdanyola (Barcelona)
Tel: +34.935814936
e-mail: JeanDidier.Marechal at uab.es
www: http://asklipio.qf.uab.es

----- Missatge original -----
De: chimera-dev-request at cgl.ucsf.edu
Data: Dijous, Octubre 18, 2012 9:00 pm
Assumpte: Chimera-dev Digest, Vol 102, Issue 5

> Send Chimera-dev mailing list submissions to
> 	chimera-dev at cgl.ucsf.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> or, via email, send a message with subject or body 'help' to
> 	chimera-dev-request at cgl.ucsf.edu
> 
> You can reach the person managing the list at
> 	chimera-dev-owner at cgl.ucsf.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Chimera-dev digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Moving a residue and an VRML object (Tom Goddard)
>   2. Re: Moving a residue and an VRML object (Greg Couch)
>   3. Re: Moving a residue and an VRML object (Eric Pettersen)
> 
> 
> --------------------------------------------------------------------
> --
> 
> Message: 1
> Date: Wed, 17 Oct 2012 13:25:18 -0700
> From: Tom Goddard <goddard at sonic.net>
> To: ladam <ladam at smbh.univ-paris13.fr>
> Cc: chimera-dev at cgl.ucsf.edu
> Subject: Re: [chimera-dev] Moving a residue and an VRML object
> Message-ID: <507F142E.4080906 at sonic.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> The arrow you drew has no idea that the atoms have moved, so of 
> course 
> it doesn't move with them.  If you just want to rigidly rotate the 
> whole 
> molecule in Python you can change the matrix that places it in space
> 
>     mol.openState.xform = xf
> 
> instead of changing the coordinates of atoms.  Then you could 
> rigidly 
> move the VRML model in the same way so that the arrow stays in the 
> same 
> position relative to the molecule.
> 
>     vrml.openState.xform = xf
> 
> If you are not moving the molecule rigidly then you really do need 
> to 
> move individual atoms and then you will have to delete the old 
> arrow and 
> make a new arrow if it is intended to have its ends follow certain 
> atoms.
>     Tom
> 
> 
> -------- Original Message --------
> Subject: [chimera-dev] Moving a residue and an VRML object
> From: ladam
> To: chimera-dev at cgl.ucsf.edu
> Date: 10/17/12 4:45 AM
> > Hi all,
> > I have a problem associating a vrml object an a molecule :
> > Let's say I have an arrow created using the bild format to which 
> I gave
> > 0.0 0.0 0.0 coordinates.
> > This arrow and the molecule translate/rotate together using the 
> mouse.> Now if I translate / rotate my molecule using the setcoord 
> command on
> > the atoms in a python script, the arrow won't follow up the 
> molecule.> I tried the addAssociatedModel command to link the arrow 
> and the
> > molecule but still the same result.
> > How can I handle this?
> > Thanks for your attention
> >
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 17 Oct 2012 15:21:35 -0700
> From: Greg Couch <gregc at cgl.ucsf.edu>
> To: Tom Goddard <goddard at sonic.net>
> Cc: chimera-dev at cgl.ucsf.edu, ladam <ladam at smbh.univ-paris13.fr>
> Subject: Re: [chimera-dev] Moving a residue and an VRML object
> Message-ID: <507F2F6F.30800 at cgl.ucsf.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Salut,
> 
> The other trick is to give the VRML model the same model id and 
> submodel 
> id as its associated model.  Then the openState is identical, so 
> there 
> would be no need to copy the transformation matrix.  Again, this 
> only 
> works for rigid rotations.
> 
>     -- Greg
> 
> On 10/17/2012 01:25 PM, Tom Goddard wrote:
> > The arrow you drew has no idea that the atoms have moved, so of 
> course 
> > it doesn't move with them.  If you just want to rigidly rotate 
> the 
> > whole molecule in Python you can change the matrix that places it 
> in 
> > space
> >
> >     mol.openState.xform = xf
> >
> > instead of changing the coordinates of atoms.  Then you could 
> rigidly 
> > move the VRML model in the same way so that the arrow stays in 
> the 
> > same position relative to the molecule.
> >
> >     vrml.openState.xform = xf
> >
> > If you are not moving the molecule rigidly then you really do 
> need to 
> > move individual atoms and then you will have to delete the old 
> arrow 
> > and make a new arrow if it is intended to have its ends follow 
> certain 
> > atoms.
> >
> >     Tom
> >
> >
> > -------- Original Message --------
> > Subject: [chimera-dev] Moving a residue and an VRML object
> > From: ladam
> > To: chimera-dev at cgl.ucsf.edu
> > Date: 10/17/12 4:45 AM
> >> Hi all,
> >> I have a problem associating a vrml object an a molecule :
> >> Let's say I have an arrow created using the bild format to which 
> I gave
> >> 0.0 0.0 0.0 coordinates.
> >> This arrow and the molecule translate/rotate together using the 
> mouse.>> Now if I translate / rotate my molecule using the setcoord 
> command on
> >> the atoms in a python script, the arrow won't follow up the 
> molecule.>> I tried the addAssociatedModel command to link the 
> arrow and the
> >> molecule but still the same result.
> >> How can I handle this?
> >> Thanks for your attention
> >>
> >
> > _______________________________________________
> > Chimera-dev mailing list
> > Chimera-dev at cgl.ucsf.edu
> > http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 17 Oct 2012 15:26:03 -0700
> From: Eric Pettersen <pett at cgl.ucsf.edu>
> To: ladam <ladam at smbh.univ-paris13.fr>
> Cc: chimera-dev BB <chimera-dev at cgl.ucsf.edu>
> Subject: Re: [chimera-dev] Moving a residue and an VRML object
> Message-ID: <C66C5891-76C8-4D20-B82E-572E6F919DF2 at cgl.ucsf.edu>
> Content-Type: text/plain; charset="us-ascii"
> 
> On Oct 17, 2012, at 3:21 PM, Greg Couch wrote:
> 
> > Salut,
> > 
> > The other trick is to give the VRML model the same model id and 
> submodel id as its associated model.  Then the openState is 
> identical, so there would be no need to copy the transformation 
> matrix.  Again, this only works for rigid rotations.
> 
> ...and the simplest way to do this is to supply the "sameAs" 
> keyword, with the associated model as the argument, to the 
> openModels.add() or openModels.open() call that you use.
> 
> --Eric
> 
> 
>                        Eric Pettersen
>                        UCSF Computer Graphics Lab
>                        http://www.cgl.ucsf.edu
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-
> dev/attachments/20121017/e8cca434/attachment-0001.html>
> 
> ------------------------------
> 
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> 
> 
> End of Chimera-dev Digest, Vol 102, Issue 5
> *******************************************
> 





More information about the Chimera-dev mailing list