RE: [PyMOL] H-bond display

2003-07-18 Thread Gareth Stockwell
index returns the internal indexing, which will correspond
> to cmd.get_model
> 
> help identify
> help index
> 
> Cheers,
> Warren
> 
> 
> --
> mailto:war...@delanoscientific.com
> Warren L. DeLano, Ph.D.
> Principal Scientist
> DeLano Scientific LLC
> Voice (650)-346-1154 
> Fax   (650)-593-4020
> 
> > -Original Message-
> > From: Gareth Stockwell [mailto:gar...@ebi.ac.uk]
> > Sent: Friday, July 18, 2003 8:50 AM
> > To: Warren L. DeLano
> > Cc: 'pymol-users'
> > Subject: RE: [PyMOL] H-bond display
> > 
> > Warren,
> > 
> > I started having a look at this, but I am getting stuck with atom 
> > indices.  If I make two selections, (lb) and (rb), by clicking on 
> > atoms in an object called 'x', then I can get the indices and objects 
> > of those atoms by doing
> > 
> > x1 = cmd.identify("lb",1)
> > x2 = cmd.identify("rb",1)
> > 
> > In my example, printing out x1 and x2 gives the following: [('x', 2)]
> > [('x', 16)]
> > 
> > As I clicked on these atoms, the GUI told me that they were,
> > respectively:
> > VAL: /x/1ATP/E/15/CA
> > LYS: /x/1ATP/E/16/NZ
> > 
> > But now, if I dump out the contents of the model.atom array, using 
> > this
> > code:
> > 
> > m = cmd.get_model("x")
> > i = 1
> > for a in m.atom:
> > print str(i) + " -> " + a.chain + "/" + a.resn + "." \
> >  + a.resi + "/" + a.name
> > i = i+1
> > 
> > Then I see the following
> > 1 -> E/VAL.15/N
> > 2 -> E/VAL.15/CA
> > 3 -> E/VAL.15/CB
> > 4 -> E/VAL.15/CG1
> > 5 -> E/VAL.15/CG2
> > 6 -> E/VAL.15/C
> > 7 -> E/VAL.15/O
> > 8 -> E/LYS.16/N
> > 9 -> E/LYS.16/CA
> > 10 -> E/LYS.16/CB
> > 11 -> E/LYS.16/CG
> > 12 -> E/LYS.16/CD
> > 13 -> E/LYS.16/CE
> > 14 -> E/LYS.16/NZ
> > 15 -> E/LYS.16/C
> > 16 -> E/LYS.16/O
> > 17 -> E/GLU.17/N
> > 18 -> E/GLU.17/CA
> > 19 -> E/GLU.17/C
> > 20 -> E/GLU.17/O
> > 
> > So atom number 2 is correct (VAL.15/CA), but in this array, atom 16 is
> 
> > the O, not NZ in LYS.16.  I presume that ChemPy is re-ordering the 
> > atoms some time during the get_model call - how do I resolve this?
> > 
> > Gareth
> > 
> > 
> > On Fri, 2003-07-18 at 16:36, Warren L. DeLano wrote:
> > > Gareth,
> > >
> > >   CGO is currently the way to go...
> > >
> > > Cheers,
> > > Warren
> > >
> > >
> > > --
> > > mailto:war...@delanoscientific.com
> > > Warren L. DeLano, Ph.D.
> > > Principal Scientist
> > > DeLano Scientific LLC
> > > Voice (650)-346-1154
> > > Fax   (650)-593-4020
> > >
> > > > -Original Message-
> > > > From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-
> 
> > > > ad...@lists.sourceforge.net] On Behalf Of Gareth Stockwell
> > > > Sent: Friday, July 18, 2003 2:46 AM
> > > > To: pymol-users
> > > > Subject: [PyMOL] H-bond display
> > > >
> > > >
> > > > I am using distance objects at the moment, to display h-bonding 
> > > > contacts.  My question is ... is there any easy way to display the
> 
> > > > direction of an h-bond using distances (i.e. putting a little 
> > > > arrow on the dashed line)?
> > > >
> > > > I am prepared to bash out some functions which do this using CGOs,
> 
> > > > but of course I won't if it's already implemented!
> > > >
> > > > Gareth
> > > >
> > > >
> > > > --
> > > > Gareth Stockwell 
> > > > European Bioinformatics Institute
> > > >
> > > >
> > > >
> > > > ---
> > > > This SF.net email is sponsored by: VM Ware
> > > > With VMware you can run multiple operating systems on a single
> > > machine.
> > > > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines 
> > > > at
> > > the
> > > > same time. Free trial click here: 
> > > > http://www.vmware.com/wl/offer/345/0
> > > > ___
> > > > PyMOL-users mailing list
> > > > PyMOL-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/pymol-users
> > >
> > >
> > >
> > > ---
> > > This SF.net email is sponsored by: VM Ware
> > > With VMware you can run multiple operating systems on a single 
> > > machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual 
> > > machines at the same time. Free trial click here: 
> > > http://www.vmware.com/wl/offer/345/0
> > > ___
> > > PyMOL-users mailing list
> > > PyMOL-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/pymol-users
> > --
> > Gareth Stockwell 
> > European Bioinformatics Institute
> 
> 
> 
> ---
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
-- 
Gareth Stockwell 
European Bioinformatics Institute




RE: [PyMOL] H-bond display

2003-07-18 Thread Warren L. DeLano
Gareth,

cmd.identify returns the input indexing, which will correspond
to the PDB file.

cmd.index returns the internal indexing, which will correspond
to cmd.get_model

help identify
help index

Cheers,
Warren


--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

> -Original Message-
> From: Gareth Stockwell [mailto:gar...@ebi.ac.uk]
> Sent: Friday, July 18, 2003 8:50 AM
> To: Warren L. DeLano
> Cc: 'pymol-users'
> Subject: RE: [PyMOL] H-bond display
> 
> Warren,
> 
> I started having a look at this, but I am getting stuck with atom 
> indices.  If I make two selections, (lb) and (rb), by clicking on 
> atoms in an object called 'x', then I can get the indices and objects 
> of those atoms by doing
> 
> x1 = cmd.identify("lb",1)
> x2 = cmd.identify("rb",1)
> 
> In my example, printing out x1 and x2 gives the following: [('x', 2)]
> [('x', 16)]
> 
> As I clicked on these atoms, the GUI told me that they were,
> respectively:
> VAL: /x/1ATP/E/15/CA
> LYS: /x/1ATP/E/16/NZ
> 
> But now, if I dump out the contents of the model.atom array, using 
> this
> code:
> 
> m = cmd.get_model("x")
>   i = 1
>   for a in m.atom:
>   print str(i) + " -> " + a.chain + "/" + a.resn + "." \
>+ a.resi + "/" + a.name
>   i = i+1
> 
> Then I see the following
> 1 -> E/VAL.15/N
> 2 -> E/VAL.15/CA
> 3 -> E/VAL.15/CB
> 4 -> E/VAL.15/CG1
> 5 -> E/VAL.15/CG2
> 6 -> E/VAL.15/C
> 7 -> E/VAL.15/O
> 8 -> E/LYS.16/N
> 9 -> E/LYS.16/CA
> 10 -> E/LYS.16/CB
> 11 -> E/LYS.16/CG
> 12 -> E/LYS.16/CD
> 13 -> E/LYS.16/CE
> 14 -> E/LYS.16/NZ
> 15 -> E/LYS.16/C
> 16 -> E/LYS.16/O
> 17 -> E/GLU.17/N
> 18 -> E/GLU.17/CA
> 19 -> E/GLU.17/C
> 20 -> E/GLU.17/O
> 
> So atom number 2 is correct (VAL.15/CA), but in this array, atom 16 is

> the O, not NZ in LYS.16.  I presume that ChemPy is re-ordering the 
> atoms some time during the get_model call - how do I resolve this?
> 
> Gareth
> 
> 
> On Fri, 2003-07-18 at 16:36, Warren L. DeLano wrote:
> > Gareth,
> >
> > CGO is currently the way to go...
> >
> > Cheers,
> > Warren
> >
> >
> > --
> > mailto:war...@delanoscientific.com
> > Warren L. DeLano, Ph.D.
> > Principal Scientist
> > DeLano Scientific LLC
> > Voice (650)-346-1154
> > Fax   (650)-593-4020
> >
> > > -Original Message-
> > > From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-

> > > ad...@lists.sourceforge.net] On Behalf Of Gareth Stockwell
> > > Sent: Friday, July 18, 2003 2:46 AM
> > > To: pymol-users
> > > Subject: [PyMOL] H-bond display
> > >
> > >
> > > I am using distance objects at the moment, to display h-bonding 
> > > contacts.  My question is ... is there any easy way to display the

> > > direction of an h-bond using distances (i.e. putting a little 
> > > arrow on the dashed line)?
> > >
> > > I am prepared to bash out some functions which do this using CGOs,

> > > but of course I won't if it's already implemented!
> > >
> > > Gareth
> > >
> > >
> > > --
> > > Gareth Stockwell 
> > > European Bioinformatics Institute
> > >
> > >
> > >
> > > ---
> > > This SF.net email is sponsored by: VM Ware
> > > With VMware you can run multiple operating systems on a single
> > machine.
> > > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines 
> > > at
> > the
> > > same time. Free trial click here: 
> > > http://www.vmware.com/wl/offer/345/0
> > > ___
> > > PyMOL-users mailing list
> > > PyMOL-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/pymol-users
> >
> >
> >
> > ---
> > This SF.net email is sponsored by: VM Ware
> > With VMware you can run multiple operating systems on a single 
> > machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual 
> > machines at the same time. Free trial click here: 
> > http://www.vmware.com/wl/offer/345/0
> > ___
> > PyMOL-users mailing list
> > PyMOL-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/pymol-users
> --
> Gareth Stockwell 
> European Bioinformatics Institute




RE: [PyMOL] H-bond display

2003-07-18 Thread Gareth Stockwell
Warren,

I started having a look at this, but I am getting stuck with atom
indices.  If I make two selections, (lb) and (rb), by clicking on atoms
in an object called 'x', then I can get the indices and objects of those
atoms by doing

x1 = cmd.identify("lb",1)
x2 = cmd.identify("rb",1)

In my example, printing out x1 and x2 gives the following:
[('x', 2)]
[('x', 16)]

As I clicked on these atoms, the GUI told me that they were,
respectively:
VAL: /x/1ATP/E/15/CA
LYS: /x/1ATP/E/16/NZ

But now, if I dump out the contents of the model.atom array, using this
code:

m = cmd.get_model("x")
i = 1
for a in m.atom:
print str(i) + " -> " + a.chain + "/" + a.resn + "." \
 + a.resi + "/" + a.name
i = i+1

Then I see the following
1 -> E/VAL.15/N
2 -> E/VAL.15/CA
3 -> E/VAL.15/CB
4 -> E/VAL.15/CG1
5 -> E/VAL.15/CG2
6 -> E/VAL.15/C
7 -> E/VAL.15/O
8 -> E/LYS.16/N
9 -> E/LYS.16/CA
10 -> E/LYS.16/CB
11 -> E/LYS.16/CG
12 -> E/LYS.16/CD
13 -> E/LYS.16/CE
14 -> E/LYS.16/NZ
15 -> E/LYS.16/C
16 -> E/LYS.16/O
17 -> E/GLU.17/N
18 -> E/GLU.17/CA
19 -> E/GLU.17/C
20 -> E/GLU.17/O

So atom number 2 is correct (VAL.15/CA), but in this array, atom 16 is
the O, not NZ in LYS.16.  I presume that ChemPy is re-ordering the atoms
some time during the get_model call - how do I resolve this?

Gareth


On Fri, 2003-07-18 at 16:36, Warren L. DeLano wrote:
> Gareth,
> 
>   CGO is currently the way to go...
> 
> Cheers,
> Warren
> 
> 
> --
> mailto:war...@delanoscientific.com
> Warren L. DeLano, Ph.D.
> Principal Scientist
> DeLano Scientific LLC
> Voice (650)-346-1154 
> Fax   (650)-593-4020
> 
> > -Original Message-
> > From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-
> > ad...@lists.sourceforge.net] On Behalf Of Gareth Stockwell
> > Sent: Friday, July 18, 2003 2:46 AM
> > To: pymol-users
> > Subject: [PyMOL] H-bond display
> > 
> > 
> > I am using distance objects at the moment, to display h-bonding
> > contacts.  My question is ... is there any easy way to display the
> > direction of an h-bond using distances (i.e. putting a little arrow on
> > the dashed line)?
> > 
> > I am prepared to bash out some functions which do this using CGOs, but
> > of course I won't if it's already implemented!
> > 
> > Gareth
> > 
> > 
> > --
> > Gareth Stockwell 
> > European Bioinformatics Institute
> > 
> > 
> > 
> > ---
> > This SF.net email is sponsored by: VM Ware
> > With VMware you can run multiple operating systems on a single
> machine.
> > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at
> the
> > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> > ___
> > PyMOL-users mailing list
> > PyMOL-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/pymol-users
> 
> 
> 
> ---
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
-- 
Gareth Stockwell 
European Bioinformatics Institute




RE: [PyMOL] H-bond display

2003-07-18 Thread Warren L. DeLano
Gareth,

CGO is currently the way to go...

Cheers,
Warren


--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

> -Original Message-
> From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-
> ad...@lists.sourceforge.net] On Behalf Of Gareth Stockwell
> Sent: Friday, July 18, 2003 2:46 AM
> To: pymol-users
> Subject: [PyMOL] H-bond display
> 
> 
> I am using distance objects at the moment, to display h-bonding
> contacts.  My question is ... is there any easy way to display the
> direction of an h-bond using distances (i.e. putting a little arrow on
> the dashed line)?
> 
> I am prepared to bash out some functions which do this using CGOs, but
> of course I won't if it's already implemented!
> 
> Gareth
> 
> 
> --
> Gareth Stockwell 
> European Bioinformatics Institute
> 
> 
> 
> ---
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single
machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at
the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users