: Re: [PyMOL] Python script with iterate_state and selection command
Hi Stéphane,
Pedro is correct, you should change the selection like he suggested.
You also need to:
- Make a state specific selection with cmd.select(..., state=i)
- Adjust the loop to start at 1 and not at 0
- Use
> Stéphane Abel, Ph.D.
> CEA Centre de Saclay
> DRF/JOLIOT/I2BC-S/SB2SM/LBMS
> Bat 528, Office 138C
> Gif-sur-Yvette, F-91191 FRANCE
> Phone (portable) : +33 6 49 37 70 60
> ____________
> De : Pedro Lacerda [psl
60
De : Pedro Lacerda [pslace...@gmail.com]
Envoyé : lundi 22 juin 2020 16:26
À : ABEL Stephane
Cc : pymol-users
Objet : Re: [PyMOL] Python script with iterate_state and selection command
Hi,
Not sure if I understood your code but maybe you want change
Hi,
Not sure if I understood your code but maybe you want change Myselection to:
Myselection="resname SOL within 3.5 of resname CHO"
-- Pedro Lacerda
Em seg, 22 de jun de 2020 10:44, ABEL Stephane
escreveu:
> Hello all,
>
> I would like to write a basic python script to select residues for ea
Hi Dirk,
cmd.iterate is actually the most efficient function to access atom properties.
If you want a wrapper which directly gets b and q for one atom, it could look
like this (returns a dictionary):
from pymol import cmd
@cmd.extend
def get_signle_atom_props(selection, props=['b', 'q'], quiet=
I vastly prefer calling the python program from pymol
You can call any python program using pymol as:
pymol -r program.py — arg1 arg2 arg3
Or, my full preferred method is:
pymol -qrck program.py — arg1 arg2 arg3
These make it quieter, stay on the command line, and not read the .pymolrc file
Hi,
When you call cmd.extend(), it does not add the function to pymol.cmd.
Just call it directly:
Change
pymol.cmd.align_all_to_all()
to
align_all_to_all()
You may need to import it if you haven't already (and make sure it is in
the PYTHONPATH).
HTH,
Matt Baumgartner
On 09/02/2014 10:38 AM
Hi James,
On the pymol-wiki there is a script called findseq (
http://pymolwiki.org/index.php/Findseq)
That does what you want (or at least the first part of your request)
Best regards,
Folmer
2014-04-05 13:29 GMT+02:00 James Starlight :
> Dear PyMol users!
>
> I'm learning of the python scrip
Dear Pascal,
Do you have any errors/warning when launching PyMOL?
If you fetch a structure in your PML file, be sure that the structure is
downloaded before to start the plugin (use: fetch pdb_code, async=0)
Can you send me some part of your PML file, so I can help you to debug?
Best regards,
Hi Pascal,
PyMOL treats .pml and .py files differently. The "cluster_count"
script was written as a .py file as needs to be used as such.
run cluster_count.py
cluster_count PO4
worked just fine when run as a Python file.
Cheers,
-- Jason
On Tue, Jul 9, 2013 at 6:06 AM, Pascal Auffinger
wrot
On Mon, 12 Jul 2010 10:37:07 -0400 Vivek Ranjan wrote:
> Hello,
>
> How can I find out what version of python my current installation of
> pymol is using ?
One way is simply to type "python" in a terminal window and you should see
something like:
Python 2.6.5+ (release26-maint, Jul 1 2010, 00
import sys
print sys.version
> -Original Message-
> From: Vivek Ranjan [mailto:vran...@gmail.com]
> Sent: Monday, July 12, 2010 10:37 AM
> To: Pymol
> Subject: [PyMOL] python
>
> Hello,
>
> How can I find out what version of python my current installation of
> pymol is using ?
>
> --
>
Sean,
You need a keyword argument list as well, so that the effective PyMOL
class instance (_self) can be passed in by keyword (actual use of _self
is only strictly required when you have multiple PyMOLs active in a
single Python interpreter).
# pml input:
python
def my_fn(*arg, **kwd):
pri
rors, there is little chance of PyMOL
> building or running correctly.
>
> Cheers,
> Warren
>
> -Original Message-
> From: pymol-users-boun...@lists.sourceforge.net
> [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Daniel Rigden
> Sent: Tuesda
Warren
Thanks for the quick reply. I tried what you suggested but I get the
same error.
How can I check how the path has been configured? It seems as if there
is only one python so there shouldn't be scope for confusion; I can only
find one site.py, for example, in
/usr/lib/python2.5/site.py
Michael
Like I said, the problem is not pymol-specific; no modules can be found
even when explicitly pointing PYTHONHOME to them.
Pymol0.99 off the website works fine since it comes packaged with its
own python modules. The one I'd like to get to work is a 1.0rc2
obtained from synaptic. It loca
Daniel,
Any time you see the "import site failed" error from Python, you can infer that
there is a problem with the Python interpreter being unable to access its
required libraries. Messages after that aren't typically informative.
This usually a path configuration issue, but I think it can al
On Tue, Jul 22, 2008 at 03:38:53PM +0100, Daniel Rigden wrote:
> First let me confess that my problem does not just involved pymol.
> However, it is hampering my use of pymol amongst other things and there
> must be many python experts who read this list.
>
> My problem, on a completely fresh Ubun
Hi Louis,
* Clark, Louis [2007-07-04 12:01] wrote:
> Dear user-group,
>
> I'm trying to learn how to use python commands inside pymol .pml
> scripts. I seem to be missing some understanding about how the
> interface works. Could somebody tell me how to fix this command below?
>
>
>
> PyM
Hmmm.
With a little messing around, it seems that this works at the pymol prompt:
for x in range(10): cmd.label("(name ca and resi %d)" % x, '"%s%s\" %
(resi, resn)')
The only difference is in the quoting. Double quotes inside single quotes.
gilleain
On 7/4/07, Clark, Louis wrote:
Dear
Hi,
pymol.cmd.refresh() doesn't work when the function is placed before
cmd.png(), but works when placed after.
As cmd.refresh() is much faster than time.sleep(1), the script is now
quicker (I used this function to get the 2D pictures from a sdf file
containing less than 100 structures).
here is
Jerome,
Try calling
pymol.cmd.refresh()
before
pymol.cmd.png(name)
Cheers,
Warren
--
Warren L. DeLano, Ph.D.
Principal Scientist
. DeLano Scientific LLC
. 400 Oyster Point Blvd., Suite 213
. South San Francisco, CA 94080 USA
. Biz:(650)-872-0942
Hi,
I tried a similar, but simpler, example :
def mol2png(name):
cmd.png(name)
cmd.delete(name)
called as 'mol2png("1a2pA")', given that I have an object called "1a2pA"
loaded.
It works just fine on my laptop (mac).
Odd.
gilleain torrance
On 1/6/06, Jerome PANSANEL wrote:
>
> Hi,
>
Yes, but you need to write in Python directly. For example:
from pymol import cmd
cmd.select("mysel","none")
for i in range(10,20): cmd.select("mysel","mysel or resi %d"%i)
Would work in a ".py" file.
Cheers,
Warren
--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scient
At 10:50 AM -0700 4/30/03, wgsc...@chemistry.ucsc.edu wrote:
Coincidently that was the exact same program that hosed my python
installation too.
I had set up my computer to run the python based AutoDock Tools
interface to the docking program AutoDock. The installer for this
program puts its ow
25 matches
Mail list logo