: 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
Hello all,
I would like to write a basic python script to select residues for each state
using the iterate_state and output the results first in pymol console window
with the following format
frame 1 : resid ...
frame 2 : resid ...
...
### my script ##
from pymol import cmd, stored
mytra
To those who compile Open-Source PyMOL from the github repo:
We've removed Python 2 support from the master branch, the master branch now
requires Python 3.6 or later.
There is a new "py2" branch which marks the last Python 2 compatible state. We
have no plans to actively maintain this legacy b
Hi Anne,
This is not at all an obvious question, it's quite advanced! Impressive code
snippet for a newbie :-)
For the sliding window question, I suggest to have a look at the implementation
of "local_rms" from the psico package:
https://github.com/speleo3/pymol-psico/blob/master/psico/fitting
Hi,
I need to calculate the RMSD for the same residue, e.g. 131Thr, from 2 pdb
files for the same target. As I need a local alignment, I use a sliding window
of 5 residues (the residue of interest is in the middle.)
I have adapted the script from https://pymolwiki.org/index.php/RmsdByResidue
(a
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=
Dear PyMOLers,
I have trouble to find out, which command I could use in a python script
to get the b-factor and occupancy of a single atom.
In the script library, I only found examples getting b-factors iterating
over a selection.
Although, I could iterate over one atom, only, is there a more el
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
Dear PyMOLers,
I want to modify atomic coordinates in a python program and make
pictures with PyMOL for making a movie.
In your experience, is it better to call the python program from PyMOL
or to call PyMOL from the python program?
And could you please give me any good pointer for your prefer
andas/hashtable.c:22315)
>>> ValueError: numpy.dtype has the wrong size, try recompiling
>>>
>>> Obviously there is some conflict with PyMOLs python interpreter and the
>>> interpreter I installed pandas with. That’s fine, I’ll just compile pandas
>>> again
>> interpreter I installed pandas with. That’s fine, I’ll just compile pandas
>> against PyMOLs python library, but I don’t know how to do it.
>>
>> I used pip within pymol
>>
>> python
>> import pip
>> pip.main([‘install’,’pandas’,’—reinsta
some conflict with PyMOLs python interpreter and the
> interpreter I installed pandas with. That’s fine, I’ll just compile pandas
> against PyMOLs python library, but I don’t know how to do it.
>
> I used pip within pymol
>
> python
> import pip
> pip.main([‘install’,’pandas’
.
I used pip within pymol
python
import pip
pip.main([‘install’,’pandas’,’—reinstall’])
python end
but got something wrong with the certificate in the pypy server
/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL run on Sun Jun 21 18:35:15
2015
Getting page https://pypi.python.org/simple/pan
Hi,
I updated Python from 2.7.8 to 2.7.9 via installing python(x,y) (i.e.,
the science/math software, 0.8GB size, downloaded from
http://ftp.ntua.gr/pub/devel/pythonxy/Python(x,y)-2.7.9.0.exe) and now
PyMOL (1.7.2.1, which was running just fine under 2.7.8) launches just
the viewer giving this
Hi,
I just want to know if there have been some discussion about porting PyMOL
to python 3.
Osvaldo.
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce versi
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
Dear Pymol mailing list,
I am facing a problem with some python scripting involving pymol...
I have a python script which adds a new function to pymol
(align_all_to_all.py that I found on pymolwiki).
I added some features to it so that it can load pdbs and thus automate
the calculations.
Whene
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 PyMol users!
I'm learning of the python scripting for the solution of typical structural
bioinformatics problems. This time I'd like to integrate in pymol simple
script which will search for the selected motifs (just several amino acids
situated in adjacent positions along the sequence) and m
Hi,
This is a fairly basic question about syntax. How does one: as surface the
protein and pseudoatoms in the short script below? Moreover, and work with
the Lysine amines rather than the alpha carbons?
# for_gnp.py
# fetch a protein and create whole phage
cmd.fetch("1ifp", type="pdb1", multiple
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
Hi,
I tried to use the "cluster_count" script
(http://www.pymolwiki.org/index.php/Cluster_Count)
in a pymol.pml file. Unfortunately I get the following message:
---
PyMOL>cluster_count PO4
Traceback (most recent call last):
File "/home/sws2/Desktop/pymol/modules/pymol/parser.py", line 464, in p
it's on the wiki now:
http://pymolwiki.org/index.php/Pml2py
Cheers,
Thomas
Thomas Holder wrote, On 04/09/11 11:17:
> Michael Lerner wrote, On 04/08/11 20:16:
>> It's not elegant at all, but it's worth knowing that you can use
>> cmd.do("...") as a quick fix for lines that aren't immediately e
y-working script attached, have fun!
Cheers,
Thomas
--
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen
'''
http://sourceforge.net/mailarchive/message.php?msg_id=27331786
Subject: [PyMOL] Convert pml script to Pymol Python script
Date: Fri, 8 Apr 2011 1
Jason Vertrees wrote, On 04/08/11 20:09:
> Hi Matthias,
>
> There is no script that I'm aware of, but writing one should be rather
> straightforward because of how the API is organized:
>
> commandName arg1, arg2, arg3
>
> becomes
>
> cmd.commandName(arg1, arg2, arg3)
I would use the cmd.keywo
It's not elegant at all, but it's worth knowing that you can use
cmd.do("...") as a quick fix for lines that aren't immediately easy to
convert.
Even a mostly-working pml2py tool would be a useful addition to the wiki.
Cheers,
-Michael
On Fri, Apr 8, 2011 at 2:09 PM, Jason Vertrees <
jason.vert
Hi Matthias,
There is no script that I'm aware of, but writing one should be rather
straightforward because of how the API is organized:
commandName arg1, arg2, arg3
becomes
cmd.commandName(arg1, arg2, arg3)
The hardest part would be determining when to quote strings versus not
quoting numbers
Hi,
I have a few pml scripts for pymol that I would like to rewrite
properly in python, making use of Pymol's ability to interprete Python
scripts.
Do you know of an interpreter that converts pml scripts automatically
to python scripts for Pymol? Since the number of tasks that you can do
in pml i
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 insta
Hello,
How can I find out what version of python my current installation of
pymol is using ?
--
Thank you and Regards,
Vivek Ranjan
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first
:56 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Python Function with Unlimited Positional
Arguments
Hi PyMOLers,
I am trying to write a python script that will allow a user to
provide an unlimited number of positional arguments fo
Hi PyMOLers,
I am trying to write a python script that will allow a user to provide an
unlimited number of positional arguments for a function. I am use to the
following scheme for defining a function and its arguments:
def some_function ( x, y, z, file="false"):
#DO SOMETHING
return
Where
Hi I'm making a Plugin that uses SWIG python bindings.
I would like to distribute it in such a way that people who use
pre-compiled versions of PyMOL will be able to use it.
However, the python.h and python libraries PyMOL was compiled with and
the python.h and python libraries that the bindings
port PYMOL_PATH=/var/lib/python-support/python2.5/pymol/
> > python2.5 ${PYMOL_PATH}/__init__.py
> >
> > Cheers,
> > Warren
> > --
> > DeLano Scientific LLC
> > Subscriber Support Services
> > mailto:supp...@delsci.com
> >
> >
> >
py
>
> Cheers,
> Warren
> --
> DeLano Scientific LLC
> Subscriber Support Services
> mailto:supp...@delsci.com
>
>
> -Original Message-
> From: pymol-users-boun...@lists.sourceforge.net
> [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of
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
e.net
[mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Daniel Rigden
Sent: Tuesday, July 22, 2008 7:39 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] python/pymol malfunction on new Ubuntu installation
Dear all
First let me confess that my problem does not just involved p
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
Dear all
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 Ubuntu 8.04 install, is that python
can find modules when asked to
Hi all,
I am using the latest svn version of Pymol with python 2.5.2. Now I get
following traceback when clicking the set grid button of the apbs plugin:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/pmg_tk/__init__.py", line 35,
in run
PMGApp(pymol_instance,skin
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
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?
PyMOL>for x in range(10): cmd.label("(name ca and resi %d)" % x, "%s%s"
Dear PyMol users,
I would like to use PyMol classes for surface visualization.
Any idea where to find them?
Thanks,
Giacomo
Python programmers, who wish to extract information from O files, may
find the OdbParser module useful. The module reads both binary and
formatted O files, and is very simple to use. Try it! Simply import the
module, and use the get() method:
$ python
Python 2.3.4 (#1, Mar 10 2006, 06:12:09)
[
> . Fax:(650)-872-0273 Cell:(650)-346-1154
> . mailto:war...@delsci.com
>
>
> > -Original Message-
> > From: pymol-users-ad...@lists.sourceforge.net
> > [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of
> > Jerome PANSANEL
>
uary 06, 2006 5:06 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] Python scripting for Pymol
>
> Hi,
>
> I writing a small script in python, in order to export png
> picture from a MDL sdfile.
> Here is a sample of the function :
>
> def mol2png(ctf
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,
>
Hi,
I writing a small script in python, in order to export png picture from a MDL
sdfile.
Here is a sample of the function :
def mol2png(ctfile,name):
pymol.cmd.read_molstr(ctfile,name)
pymol.cmd.set("valence",1)
pymol.cmd.color("black","elem c")
pymol.cmd.color("red","elem o")
Hello PyMol gurus,
I am trying to make a simple movie with my molecule rotating 360
degrees. There are two molecules superimposed and one of them is turned
on for 6 frames then off for 6 frames. Hopefully this won't give anyone
epileptic seizures. So here is a part of my python script. The pro
gt; Sent: Wednesday, August 27, 2003 1:10 PM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] Python commands and variables
>
> Hi,
>
> I am new to Pymol with some experiences with Python.
> I have a basic question which maybe a little stupid.
> Does Pymal take Python comma
Hi,
I am new to Pymol with some experiences with Python.
I have a basic question which maybe a little stupid.
Does Pymal take Python commands in selecting atoms?
For instance:
i = range(1, 299)
select resi i
or, further:
for i in range(1, 299)
select resi i
I understand the above can be e
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
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 own copy of python as a subdirectory in the main
application dir
59 matches
Mail list logo