Re: [PyMOL] small molecule geometry gets whacked in creating multi-state object

2010-11-17 Thread Robert Campbell
Hi Seth and Jason,

I just tried out Jason's commands and while that works for this case I can't
verify that it fails in Seth's case.  While checking the command line options
for create, I did notice that, like the load command, the create command also
has a discrete flag.  It is not described in the help (i.e. when typing help
create), but it is listed in the PYMOL API syntax and it is clearly listed
when you type: create ?.

So I would suggest that you should try your usual script but add a
discrete=1 flag to it.

Cheers,
Rob


 On Tue, 16 Nov 2010 21:46:17 -0500 Jason Vertrees
jason.vertr...@schrodinger.com wrote:

 Hi Seth,
 
 When using the create command, you need to specify target and source
 states.  Here's an example.  Let's assume 1oky and 1t46 are the same
 protein (they're really close, so good for this example).  They both
 have ligands, 1t46 has STI and 1oky has STU.  I can (1) load each
 structure. using fetch:
 
 # fetch the proteins from the PDB, or local file system
 fetch 1t46 1oky, async=0
 
 # align the two proteins (you may not need this step for your application)
 align 1t46, 1oky
 
 and then (2) extract their small molecules, into a new multi-state
 object, called 'ligands using the 'create' command:
 
 # create the object called 'ligands' and put 'resn STI' from state 1
 into state 1
 create ligands, 1t46 and resn STI, 1, 1
 
 # create the object called 'ligands,' which in PyMOL re-creating an
 object that already exists
 # will add another state, and put 'resn STU' from state 1 into state 2
 create ligands, 1oky and resn STU, 1, 2
 
 Hide the first two objects and then use the arrow keys to switch from
 state 1 to state 2.
 
 Cheers,
 
 -- Jason
 
 
 
 On Tue, Nov 16, 2010 at 12:51 PM, Seth Harris set...@gmail.com wrote:
  Hi Jason,
  The end result I am trying to get is a single multi-state object that has
  a different small molecule stored in each state, so that you can use the
  cursor keys and flip through the various ligands (i.e. states) all aligned
  at a given binding site. So what Robert described generates such an
  object, but does so at the point of loading the ligand from an external
  file. I was just trying to see if there was a way to get there from
  objects already loaded in pymol. For instance, I'd have a protein:small
  molecule structure loaded and aligned, and I want to bring just the
  aligned small molecule into one of the states of the multi-state object.
  When I use the create command all kinds of extra bonds were being drawn
  within a given ligand, along with atom colors changing unpredictably. I
  assumed that different small molecules have matching atom names across
  the various states and likely that was causing the trouble. But when
  loaded with the discrete flag it avoids this. Essentially, I was
  imagining something like the 'create' command along with the discrete
  flag. I was searching for some pdb's to share and further explore this
  with. I think it would happen with most any small molecule structure from
  the PDB. Anyway, the workaround seemed to be that once I had loaded the
  protein:small molecule, aligned it, I could save out the aligned small
  molecule only in a temp file, and load it back in to the multi state
  object with the discrete=1 and carry on through all the objects I wanted
  and at the end delete the temp file. The part I thought was a bit clunky
  was having to save the file back out to the file system in order to bring
  it back in with the load command just to be able to get access to the
  'discrete' flag. That's where I thought I might be missing something if I
  explained the case further. Thanks,
  Seth

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
robert.campb...@queensu.cahttp://pldserver1.biochem.queensu.ca/~rlc

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] small molecule geometry gets whacked in creating multi-state object

2010-11-16 Thread Jason Vertrees
Hi Seth,

When using the create command, you need to specify target and source
states.  Here's an example.  Let's assume 1oky and 1t46 are the same
protein (they're really close, so good for this example).  They both
have ligands, 1t46 has STI and 1oky has STU.  I can (1) load each
structure. using fetch:

# fetch the proteins from the PDB, or local file system
fetch 1t46 1oky, async=0

# align the two proteins (you may not need this step for your application)
align 1t46, 1oky

and then (2) extract their small molecules, into a new multi-state
object, called 'ligands using the 'create' command:

# create the object called 'ligands' and put 'resn STI' from state 1
into state 1
create ligands, 1t46 and resn STI, 1, 1

# create the object called 'ligands,' which in PyMOL re-creating an
object that already exists
# will add another state, and put 'resn STU' from state 1 into state 2
create ligands, 1oky and resn STU, 1, 2

Hide the first two objects and then use the arrow keys to switch from
state 1 to state 2.

Cheers,

-- Jason



On Tue, Nov 16, 2010 at 12:51 PM, Seth Harris set...@gmail.com wrote:
 Hi Jason,
 The end result I am trying to get is a single multi-state object that has a
 different small molecule stored in each state, so that you can use the
 cursor keys and flip through the various ligands (i.e. states) all aligned
 at a given binding site. So what Robert described generates such an object,
 but does so at the point of loading the ligand from an external file. I was
 just trying to see if there was a way to get there from objects already
 loaded in pymol. For instance, I'd have a protein:small molecule structure
 loaded and aligned, and I want to bring just the aligned small molecule into
 one of the states of the multi-state object. When I use the create command
 all kinds of extra bonds were being drawn within a given ligand, along with
 atom colors changing unpredictably. I assumed that different small molecules
 have matching atom names across the various states and likely that was
 causing the trouble. But when loaded with the discrete flag it avoids
 this. Essentially, I was imagining something like the 'create' command along
 with the discrete flag.
 I was searching for some pdb's to share and further explore this with. I
 think it would happen with most any small molecule structure from the PDB.
 Anyway, the workaround seemed to be that once I had loaded the protein:small
 molecule, aligned it, I could save out the aligned small molecule only in a
 temp file, and load it back in to the multi state object with the discrete=1
 and carry on through all the objects I wanted and at the end delete the temp
 file. The part I thought was a bit clunky was having to save the file back
 out to the file system in order to bring it back in with the load command
 just to be able to get access to the 'discrete' flag. That's where I thought
 I might be missing something if I explained the case further.
 Thanks,
 Seth

 On Tue, Nov 16, 2010 at 5:37 AM, Jason Vertrees
 jason.vertr...@schrodinger.com wrote:

 Seth,

 I don't understand your question.  I think you're looking for the
 copy or extract command
 (http://www.pymolwiki.org/index.php/Extract).  If not, please try
 rewording the question.

 Cheers,

 -- Jason

 On Fri, Nov 12, 2010 at 12:55 PM, Seth Harris set...@gmail.com wrote:
  Thanks Robert and Jason
  Indeed, I have different small molecules as Robert surmised and
  subsequent
  ones affect the connectivity of the earlier ones (and representations
  for
  some reasons, colors and spheres, etc. become unpredictable) when using
  the
  create command. I had noted that discrete flag for the load command,
  but
  not having separate files from these aligned in the right spot is there
  really nothing similar to do on the fly without saving out the newly
  aligned
  (using the surrounding protein) and extracted ligand into its own pdb
  file
  and loading that back in again with the discrete flag on? That will
  work,
  but seemed a bit clunky!
  Thanks again for the tips to that functional route!
  Cheers,
  Seth
 
 
  
  Hi Seth,
 
  On Tue, 09 Nov 2010 22:54:59 -0500 Jason Vertrees
  jason.vertr...@schrodinger.com wrote:
 
  Hi Seth,
 
  I haven't seen that (in this scenario).  Can you send me a few PDB
  examples?
 
  Cheers,
 
  -- Jason
 
  On Mon, Nov 8, 2010 at 10:13 PM, Seth Harris set...@gmail.com wrote:
   Hi all,
   I feel I should know this one. I have a program looping through
   structures
   and bringing each small molecule into a single multi-state object so
   I
   can
   tab through the states.
   I do:
   create all_lig, this_ligand, 1, 1
   then go on to the next one:
   create all_lig, next_ligand, 1, 2
   and so on
   however, the bonds get all messed up, presumably with atom names
   confused? I tried issuing a rebuild all_lig in between adding but
   that
   didn't seem to help. What am I missing?
 
  It sounds like you are loading a set of *different* structures 

Re: [PyMOL] small molecule geometry gets whacked in creating multi-state object

2010-11-12 Thread Seth Harris
Thanks Robert and Jason

Indeed, I have different small molecules as Robert surmised and subsequent
ones affect the connectivity of the earlier ones (and representations for
some reasons, colors and spheres, etc. become unpredictable) when using the
create command. I had noted that discrete flag for the load command, but
not having separate files from these aligned in the right spot is there
really nothing similar to do on the fly without saving out the newly aligned
(using the surrounding protein) and extracted ligand into its own pdb file
and loading that back in again with the discrete flag on? That will work,
but seemed a bit clunky!

Thanks again for the tips to that functional route!

Cheers,
Seth




Hi Seth,

On Tue, 09 Nov 2010 22:54:59 -0500 Jason Vertrees
jason.vertr...@schrodinger.com wrote:

 Hi Seth,

 I haven't seen that (in this scenario).  Can you send me a few PDB
examples?

 Cheers,

 -- Jason

 On Mon, Nov 8, 2010 at 10:13 PM, Seth Harris set...@gmail.com wrote:
  Hi all,
  I feel I should know this one. I have a program looping through
structures
  and bringing each small molecule into a single multi-state object so I
can
  tab through the states.
  I do:
  create all_lig, this_ligand, 1, 1
  then go on to the next one:
  create all_lig, next_ligand, 1, 2
  and so on
  however, the bonds get all messed up, presumably with atom names
  confused? I tried issuing a rebuild all_lig in between adding but that
  didn't seem to help. What am I missing?

It sounds like you are loading a set of *different* structures into the
multi-state object.  I don't think you can do this properly with the
create command.  I think the only way to do this and retain the correct
bonding information is to use the load command directly with the
discrete=1
option.

So, you need to do:

load this_ligand, all_lig, discrete=1
load next_ligand, all_lig, discrete=1

Cheers,
Rob

--
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Botterell Hall Rm 644
Department of Biochemistry, Queen's University,
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] small molecule geometry gets whacked in creating multi-state object. rebuild?

2010-11-10 Thread Jason Vertrees
On Wed, Nov 10, 2010 at 8:55 AM, Robert Campbell
robert.campb...@queensu.ca wrote:
 So, you need to do:

 load this_ligand, all_lig, discrete=1
 load next_ligand, all_lig, discrete=1

Great point, Robert.  In PyMOL when you load without specifying the
discrete flag or set it to zero, any series of states is considered as
one actual object that varies in coordinates (eg. trajectories).  To
save space, PyMOL shares atomic information (except for coordinates).
When we use, discrete=1 as in
  load myTrajectory.pdb, discrete=1
this makes each state its own object and does not share the atom information.

In Seth's case, it looks like that difference was confusing PyMOL.

Cheers,

-- Jason

On Wed, Nov 10, 2010 at 8:55 AM, Robert Campbell
robert.campb...@queensu.ca wrote:
 Hi Seth,

 On Tue, 09 Nov 2010 22:54:59 -0500 Jason Vertrees
 jason.vertr...@schrodinger.com wrote:

 Hi Seth,

 I haven't seen that (in this scenario).  Can you send me a few PDB examples?

 Cheers,

 -- Jason

 On Mon, Nov 8, 2010 at 10:13 PM, Seth Harris set...@gmail.com wrote:
  Hi all,
  I feel I should know this one. I have a program looping through structures
  and bringing each small molecule into a single multi-state object so I can
  tab through the states.
  I do:
  create all_lig, this_ligand, 1, 1
  then go on to the next one:
  create all_lig, next_ligand, 1, 2
  and so on
  however, the bonds get all messed up, presumably with atom names
  confused? I tried issuing a rebuild all_lig in between adding but that
  didn't seem to help. What am I missing?

 It sounds like you are loading a set of *different* structures into the
 multi-state object.  I don't think you can do this properly with the
 create command.  I think the only way to do this and retain the correct
 bonding information is to use the load command directly with the discrete=1
 option.

 So, you need to do:

 load this_ligand, all_lig, discrete=1
 load next_ligand, all_lig, discrete=1

 Cheers,
 Rob

 --
 Robert L. Campbell, Ph.D.
 Senior Research Associate/Adjunct Assistant Professor
 Botterell Hall Rm 644
 Department of Biochemistry, Queen's University,
 Kingston, ON K7L 3N6  Canada
 Tel: 613-533-6821            Fax: 613-533-2497
 robert.campb...@queensu.ca    http://pldserver1.biochem.queensu.ca/~rlc

 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net/sfu/SAP-dev2dev
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net




-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net