[PyMOL] on PDB display and calculation

2015-11-22 Thread Smith Liu
Dear All,


Once I have displayed a tetramer PDB by pymol, is any way I can get the central 
axis of the tetramer and display it? Is any way I can get the cross-section of 
the tetramer (perpendicular to the central axis) and display it? If the 
tetramer is asymmetric, then how to get the central axis and cross-section?


Smith



--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140___
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] default fetch format

2015-11-22 Thread Thomas Holder
Hi Albert,

> May I ask is there any superior features of mmCIF format against PDB format?

It solves all the identifier limitations of the PDB format, like number of 
chains, number of residues, and number of atoms. Besides that, the PDB format 
will be phased out by the wwPDB in favor of the mmCIF format, which is the new 
standard since 2014.

See also
http://mmcif.wwpdb.org/docs/faqs/pdbx-mmcif-faq-general.html

Cheers,
  Thomas

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


--
___
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] default fetch format

2015-11-22 Thread Albert
Hi Thomas:

thanks a lot for helpful advice.

May I ask is there any superior features of mmCIF format against PDB format?

regards

Albert

On 11/22/2015 04:15 PM, Thomas Holder wrote:
> Hi Albert,
>
> Unfortunately the default fetch type can't be configured. But you can 
> override the fetch command. Example which you could place in your ~/.pymolrc 
> file:
>
> python
> from pymol import cmd
>
> def fetchpdb(*args, **kwargs):
>  if 'type' not in kwargs:
>  kwargs['type'] = 'pdb'
>  return cmd.fetch(*args, **kwargs)
>
> cmd.extend('fetch', fetchpdb)
> python end
>
> However, if you don't have a compelling reason to work with PDB instead of 
> mmCIF, then I recommend to give the new mmCIF default a try.
>
> Cheers,


--
___
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] default fetch format

2015-11-22 Thread Thomas Holder
Hi Albert,

Unfortunately the default fetch type can't be configured. But you can override 
the fetch command. Example which you could place in your ~/.pymolrc file:

python
from pymol import cmd

def fetchpdb(*args, **kwargs):
if 'type' not in kwargs:
kwargs['type'] = 'pdb'
return cmd.fetch(*args, **kwargs)

cmd.extend('fetch', fetchpdb)
python end

However, if you don't have a compelling reason to work with PDB instead of 
mmCIF, then I recommend to give the new mmCIF default a try.

Cheers,
  Thomas

On 19 Nov 2015, at 13:47, Albert  wrote:

> Hello:
> 
> I noticed that if we run command:
> 
> fetch 2ac1
> 
> to get PDB into pymol in Version 1.8.0, it downloaded .cif file by 
> default. I am just wondering is it possible to change the default format 
> as .pdb file?
> 
> thanks a lot
> 
> Albert

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


--
___
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] can we clone representation?

2015-11-22 Thread Thomas Holder
Hi Albert,

This functionality is not built-in to PyMOL, but is rather simple to implement 
with a script. See attachment. The script adds a "clone_reps" command which 
takes two selections (just like the VMD plugin).

Example:

run clonerep.py
fetch 1a00 1hbb, async=0
as cartoon, 1a00
spectrum count, rainbow, 1a00

# clone color and representations
clone_reps 1a00, 1hbb

# clone only color
clone_reps 1a00, 1hbb, props=color

# clone from chain A to all other chains
clone_reps 1a00 & chain A, all, match=resi name

Cheers,
  Thomas

from pymol import cmd
@cmd.extend
def clone_reps(fromsele, tosele, match='chain resi name', props='reps color'):
'''
DESCRIPTION

Clone color and representation from one selection to another.

ARGUMENTS

fromsele = str: source selection

tosele = str: target selection

match = str: space separated list of atom identifiers to use for
matching the two selections {default: chain resi name}

props = str: space separated list of atom properties to clone
{default: reps color}

EXAMPLE

fetch 1a00 1hbb, async=0
as cartoon, 1a00
spectrum count, rainbow, 1a00
clone_reps 1a00, 1hbb

SEE ALSO

scene, iterate, alter
'''
match = '(' + ','.join(match.split()) + ')'
props = '(' + ','.join(props.split()) + ')'
space = {'_lookup': {}}
cmd.iterate(fromsele, '_lookup[' + match + '] = ' + props, space=space)
cmd.alter(tosele, props + ' = _lookup.get(' + match + ', ' + props + ')', space=space)
cmd.rebuild(tosele)

On 21 Nov 2015, at 10:04, Albert  wrote:

> Hello:
> 
> I've shown an object as cartoon and displaced sticks with various 
> colors. I am just wondering, can we clone all representation from object 
> 1 to object 2 with some command in Pymol? As far as I known, this is 
> possible in VMD:
> 
> http://www.ks.uiuc.edu/Research/vmd/plugins/clonerep/
> 
> Thank you very much
> 
> Albert

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.

--
___
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

[PyMOL] Pymol v1.7.6.0 measurement wizard crash

2015-11-22 Thread Noel Edwards
Hi,



I'd really appreciate any help with the following issue I am experiencing with 
the measurement wizard in Pymol.  I am running Pymol version 1.7.6.0 on Windows 
(the problem occurs on two different machines).



With mouse mode in 3-button editing mode, I can select the first atom using the 
measurement wizard, but when I click on the second atom the program crashes.  
Below is the log, in case it is of any use:



wizard measurement
refresh_wizard
cmd.get_wizard().do_dirty()
cmd.get_wizard().do_dirty()
cmd.get_wizard().do_dirty()
cmd.select('sele','none')
cmd.select('sele',"sele) or ((Carboxy_bind_figure`29))) and not 
Carboxy_bind_figure`29))) and (sele",enable=1)
cmd.get_wizard().do_select('''sele''')
cmd.get_wizard().do_dirty()
cmd.get_wizard().do_dirty()
cmd.get_wizard().do_dirty()
cmd.select('_indicate_mw',"_indicate_mw) or ((Carboxy_bind_figure`24))) and 
not Carboxy_bind_figure`24))) and (_indicate_mw",enable=1)
cmd.get_wizard().do_select('''_indicate_mw''')
cmd.get_wizard().do_dirty()



I have noticed this only happens on my Windows machines (MacPymol works fine).  
"Why not just use MacPymol?!" I hear you ask?  I only have access to Pymol on 
Windows at work and moreover it's annoying.



Any help would be greatly appreciated.



Thanks,

Noel








--
___
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] on async

2015-11-22 Thread Sampson, Jared M.
Hi Smith -

I assume you’re referring to something like `fetch 1xyz, async=0`.  This means 
that the PyMOL interpreter should wait until the PDB file is downloaded and 
loaded before continuing with the next step.

Normally, the commands will be issued one immediately after the other and the 
next one may start before the current one finishes.  So multiple commands may 
be running at the same time, or asynchronously.

For example, if you were to run a script containing the following:

fetch 1xyz
as cartoon
color blue, chain A

Depending on the speed of the download, the protein would likely end up looking 
just like if you only called `fetch 1xyz`, as the other two commands will have 
started (and finished) before the `fetch` is complete.

Cheers,
Jared


On Nov 21, 2015, at 6:11 AM, Smith Liu 
mailto:smith_liu...@163.com>> wrote:

Dear All,

Will you please tell me the meaning of "async"in pymol script?

Smith



--
___
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

--
___
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