How do you select atoms from residue N and from N+1 when
writing a script to output dihedral angles that span two residues.
(i.e., the omega torsion angle that describes the planarity of the
peptide plane.)
Best regards,
Blaine
Blaine Mooers
Assistant Professor
Department of Biochemistry and
While lecturing about how to use PyMOL, it would be useful to have size 20 or
larger font displayed in the command history window so
that people in the back of the room can read the output when projected on a
screen.
How might this be accomplished?
Best regards,
Blaine Mooers
Blaine
I saw Jason Vertrees update of http://www.pymolwiki.org/index.php/3d_pdf.
It has the address to the source code for u3d-1.4.3. I could not compile earlier
versions of this program on a Mac running Snow Leopard, but I had
success with this version. I followed Jason's directions for compiling on
From: Troels Emtekær Linnet [tlin...@gmail.com]
Sent: Wednesday, March 13, 2013 4:19 AM
To: Mooers, Blaine H.M. (HSC)
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] PyMOL to 3D PDF
Yeah.
That is a cool feature, and is kind of the future of publishing
Dear PyMOLers,
I can set the grid in the apbs_tools gui using the default file locations
(they are correct; I checked), but I get kernel dump when I try to run apbs.
A gui pops up with the message that MacPyMOL crashed although the PyMOL guis
are still open and functional. The pop-u gui gives
I have a question related to the hot-key question. I have defined a list of
aliases in a python script.
I would like to advance through the list by hitting the space bar, return key,
or the scroll wheel on
the mouse. Set_key does not work on the spacebar or the return key.
Best regards,
Dear PyMOL Users,
I serve as the 2016-2017 chair of the Stanford Synchrotron Radiation
Lightsource (SSRL) Users Executive Committee (UEC). This is a volunteer group
that is independent of SSRL.
You probably have heard that the proposed DOE budget absorbs a large cut in
part by shutting down
Hi Markus,
I can answer part of your question.
There are error messages about print statement in python2 needing to be
converted to print() functions for python3.
You can run the program 2to3 on your python scripts to convert them from python2
to python3. This program probably came with your
Hi Lorenzo,
You can import numpy and replace your lists of coordinates with NumPy arrays.
Operations with numpy arrays can be >100 times faster than with lists in for
loops.
See the last example the following blog post for inspiration:
Hi James,
You can put Jared's commands (below the load command is replaced with the fetch
command)
in a bash script called cntRei.sh and pass the PDB-ID from the command line.
The $1 is a place holder for the first argument on the command line, the PDB-ID
in this case.
This will enable easy
Hi Ryan,
I think that the manual page for polymer will answer your question clearly
https://pymol.org/dokuwiki/doku.php?id=selection:polymer
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of
Hi Elmira,
If you are using windows, Open Source PyMOL for python3.6 can be found here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol
If you are using Mac, Open Source PyMOL via macports still depends on Python2.7
by default.
However, you can install PyMOL built with the macports python3.6
There are three pymol Wiki pages that describe how to install open-source PyMOL
on Linus, Windows, and Mac.
https://pymolwiki.org/index.php/Linux_Install
https://pymolwiki.org/index.php/Windows_Install
https://pymolwiki.org/index.php/MAC_Install
I have installed open-source PyMOL on Windows10,
To: Mooers, Blaine H.M. (HSC)
Cc: pymol-users
Subject: Re: [EXTERNAL] [PyMOL] Differentiate between bond types by color and
representation
Hi Blaine,
Yes, that's essentially what I'm doing. My worry is that since this doubles the
amount of coordinates to keep track of, it will be detrimental
Hi Lorenzo,
You could make an object out of the elastic bonds with the 'create' command,
show it as sticks, and use the stick_color setting to color the sticks only.
You could make different objects for different subsets of the elastic bonds and
color them differently.
Here is an example of
Hi Jorge,
You can use the "bond" command if the structures to be linked are in the same
molecular object.
You may have to use the "create" command with both objects in a selection to
merge two objects into one.
bond [atom1, atom2 [,order]]
You can control the bond thickness via the
Hi Sumudu,
Homebrew gave a clang++ error. This may be due a recent upgrade of Xcode
which replaced MacOSX10.14.sdk with MacOSX10.15.sdk inside the Xcode.app.
If this happened to you, do the following:
cd
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
Hi Chris,
Here is a one compound setting command (copy and paste at the PyMOL command
prompt above the viewport) that turns on valence for the ligand bonds
in ligand RZS of the covid-19 protease structure PDB 5R82 while turning
off the valence for the protein bonds.
set valence, on, resn RZS;
Your attached Python script was scrubbed by my email server.
It might be best to paste the script into your e-mail message.
You might have picked up hidden codes in your copy and paste operations.
You could try the roundview.py script described 20% of the way down on
this website
Hi Jianhao,
Any easy solution is to use cmd.do with lets you issue pml commands in Python:
cmd.do('label (n. CA and (resi 800-850 and chain A)), "%s%s"%(resn, resi)')
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of
Hi Mungo,
See https://pymol.org/dokuwiki/doku.php?id=properties.
This command will print the dictionary of properties for all of the atoms:
iterate /4zho//A/*/*, print(properties.all)
Note the Python3 print() function.
The documentation needs to be updated.
Best regards,
Blaine
Blaine
The O3' to P bond lengths are 2.2 Angstroms when they should 1.6 Angstroms.
This is outside the bond length range that PyMOL accepts so the bond is absent
when you display the model as line or stick model.
This is why the cartoon is missing or broken.
5FUR is a 8.5 Angstrom cryo EM structure.
Hi Adam,
On my first attempt with Jared's commands, I pasted both for loops at the top
PyMOL prompt with a semicolon between the commands.
This failed because I created a Python syntax error.
When I issued Jared's commands one at a time, they worked.
Alternatively, rewrite Jared's for loops
Hi Thomas,
If you display the SASA of the protein in PyMOL's viewport,
you will see that it and that of the ligand have huge overlaps
How do you define the interface in such a situation and how
do you interpret it?
The interface of the molecular surfaces seems easier to interpret.
Best
Hi ZHANG Cheng,
Did you try?
set all_states, on;spectrum b
Another approach would to split the states into separate objects and then apply
the
spectrum command to each object.
split_states protein.pdb; prefix=test;spectrum b,,test*
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate
Hi Aswini,
Enter at the PyMOL prompt below the command history window the following
command:
remove not polymer
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
Hi Antonio,
I got the same error message after the second line but this worked for me.
/Applications/PyMOL.app/Contents/bin/python
>>>from pymol import cmd
>>>fcmd.fetch("5da6")
>>>fcmd.do("show sticks; hide cartoon;orient")
>>>fcmd.util.cbac('all')
>>>fcmd.png("testcbacSticks.png")
Best
[272699...@qq.com]
Sent: Monday, August 31, 2020 5:56 AM
To: Mooers, Blaine H.M. (HSC); pymol-users
Subject: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the
frames in one object in Pymol?
Hi Blaine,
Thank you for your suggestion. "set all_states, on" coul
Hi Petro,
PyMOL is telling you to slow down the
issuing of your commands. PyMOL
needs time to catch up.
Try importing the time module and using the
sleep function at strategic places in your code
https://www.datacamp.com/community/tutorials/python-time-sleep
Best regards,
Blaine
Blaine
Hi Jeff,
I would se the pdb file 1nmr as a template to reformat your file accordingly:
fetch 1nmr, type=pdb.
Open it with a text editor
You will see the that END is used only once, at the every bottom of the file
after the last model.
This is why you are not seeing multiple models with
PyMOL from macports has been rock solid for several years.
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center (BRC) Rm. 466
975 NE
Hi Jeff,
I do not know the answer to your question. This is a work around.
Try dropping ray=0 and adding the draw command with the dimensions in pixels
(width, height).
cmd.draw(1600,1600);cmd.png('test1600.png')
I would not use the Educational PyMOL for the kind of serious work that you are
:48 AM
To: Mooers, Blaine H.M. (HSC); pymol-users
Subject: Re: [EXTERNAL] [PyMOL] png command in Educational Pymol
Hi Blaine,
I've just checked on trial 26 day version of Pymol it use always RAY=1
while I run pymol from script regardless of ray flag (tested with
ray=1, ray=0, without ray as in you
Hi Neena,
The default palette for coloring the B-factor is the rainbow palette:
https://pymolwiki.org/index.php/Palette_Colorbars
You can control the range of B-factors to which the scale is applied with the
spectrum command:
spectrum b, rainbow, minimum=10, maximum=50
Best regards,
Blaine
Hi Yeping,
You might try using the your atoms selection as input to the script listed here
https://pymolwiki.org/index.php/ListSelection2
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma
Hi Nazi,
Enter at the PyMOL>
orient; turn z, 90
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center (BRC) Rm. 466
975 NE 10th
Hi Shay,
cmd.do() allows you to run pml code.
Try
cmd.do("fetch 1lw9;show cell;png testcell.png")
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young
Hi Vitali,
Maybe ambient was set to a large negative value.
Doing so has not impact on line drawings.
Try resetting it to the default value.
set ambient, 0.1
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
Hi Charles,
This pml script does want you want,
# Color the carvons atoms of the sidechain the same as the color of the CA atom
col=[]
# edit resi here
iterate resi 10+20+30 and name ca,
col.append((chain,resi,name,cmd.get_color_tuple(color)))
# Define the colors ca10, ca20, and ca40
Hi Juliet,
It would help others to report more specifics like the version of PyMOL that
you are using
(it is printed on the first line in the command history window
when you start PyMOL) and whether it is the incentive product or open source.
I suspect that the Python interpreter that runs
Hi Patricia,
You can copy and paste these commands below one at a time at the upper PyMOL>
prompt just below the command history window.
Hit return after each paste operation.
alter (chain A),chain='F'
sort
For more information, see
https://pymolwiki.org/index.php?title=Alter=no
Best
73104-5419
____
From: Mooers, Blaine H.M. (HSC) [blaine-moo...@ouhsc.edu]
Sent: Tuesday, October 27, 2020 4:54 AM
To: sunyeping; pymol-users
Subject: Re: [PyMOL] [EXTERNAL] present b factor putty on select
Hi sunyeping,
You are right; there is a way via the co
Hi sunyeping,
You are right; there is a way via the command line:
preset.b_factor_putty(selection='all')
Replace "all" with your selection.
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of
Hi Jason,
Did you create a kernel for the python interpreter that is used by PyMOL?
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research
Hi Fred,
You can select the dummy atoms to keep via the id identifier by entering the
following command at the PyMOL prompt:
select keep, id 1 or id 6 or id 12 or id 18 or id 24
Then you could remove the dummy atoms outside of the selection by entering the
following command at the PyMOL
Hi Hrutvik,
After run script.py, enter 'load filenane' to run the function.
Your function load() only prints the PyMOL commands that you want to execute.
Add below or above the print lines, add these indented lines.
cmd.do("load 1u8q.pdb")
cmd.do("color red, (chain y)" )
You might
To: Mooers, Blaine H.M. (HSC); Jarrett Johnson
Cc: pymol-users@lists.sourceforge.net
Subject: [EXTERNAL] RE: [PyMOL] renumber
Blain,
The command will not change the numbering of amino acids starting from #1. But
if you got missing ones, like in my case, it will. Except for those having also
dbset.log << EOF
renum 1 chain H
renum 1 chain L
end
EOF
```
Hope that helps.
Cheers,
Jared
From: Oganesyan, Vaheh
<mailto:vaheh.oganes...@astrazeneca.com>
Reply: Oganesyan, Vaheh
<mailto:vaheh.oganes...@astrazeneca.com>
Date: June 15, 2020 at 1:28:23 PM
To: Mooers, Blaine H.M
0VWnSB3Yss=>
or, via email, send a message with subject or body 'help' to
pymol-users-requ...@lists.sourceforge.net
You can reach the person managing the list at
pymol-users-ow...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of P
Hi Charles,
Make sure that PyMOL's present working directory is where the pdb files are
stored.
Copy and paste each of the four lines below one at a time on the command line
in PyMOL.
run list_hb.py
import glob
chains = [('A','B'), ('A','C'), ('A','D'), ('A','E'), ('B','C'), ('B','D'),
_
From: Chen, Qiang [q...@pitt.edu]
Sent: Monday, June 15, 2020 10:18 PM
To: Mooers, Blaine H.M. (HSC); pymol-users@lists.sourceforge.net
Subject: [EXTERNAL] Re: hydrogen bond list for a series of files
Thanks, Dr. Mooers.
I modified a little.
It seems the pdb files
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center (BRC) Rm. 466
975 NE 10th Street, BRC 466
Oklahoma City, OK 73104-5419
From: Ali Kusay [akus8...@uni.sydney.edu.au]
Sent: Sunday, June 21, 2020 7:41 AM
To: Mooers, Blaine H.M. (HSC
Hi Vaheh,
alter vh, resi=str(int(resi)+0)
will not change the residue numbers because 0 is being added.
Replace 0 with your desired residue number offset.
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
Hi Yong,
Maybe you tried this already, but you might try reducing the use of RAM by
superposing all 500 structures represented as CA traces
('ribbons' in PyMOL) or even show the CA atoms as lines (show lines, name ca
and i. *) and then switch representation after alignment.
Best regards,
ooers, Blaine H.M. (HSC)"
wrote:
Hi Patricia,
You can copy and paste these commands below one at a time at the upper PyMOL>
prompt just below the command history window.
Hit return after each paste operation.
alter (chain A),chain='F'
sort
For more information, see
https://urldefense.p
Hi Jeff,
You can use Python commands to reformat the output.
The Python commands can be included in your Python script or
with the pml code that you pass with the -d keyword in the terminal
if the Python code is separated by semicolons from the pml code.
My email security system mangled the
Hi Michael,
PyMOL will search your home directory for your pymolrc.pml file.
I would store it there.
You can check that pymol is finding it by starting PyMOL and
going to the pull-down menus File-->Edit pyrmolrc.
PyMOL's built-in editor should find and open your pymolrc.pml file.
Best regards,
<https://urldefense.proofpoint.com/v2/url?u=https-3A__pymol.org_edu_faq.php=DwMFaQ=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks=H3QkLbCmhos8V00vJyuUau1ptNGcudWdH4VGKdTaHbU=UQ4HfX4kGVvTsIoXylaT19Or6Xzlk6UjUJUkVvAKKws=>
>
> Cheers,
> Thomas
>
> On Tue,
GKdTaHbU=UQ4HfX4kGVvTsIoXylaT19Or6Xzlk6UjUJUkVvAKKws=>
>
> Cheers,
> Thomas
>
> On Tue, Oct 20, 2020 at 1:18 PM Mooers, Blaine H.M. (HSC)
> mailto:blaine-moo...@ouhsc.edu>> wrote:
> >
> > Hi Jeff,
> >
> > I have the incentive version of PyMOL.
> > I
Hi Neena,
Thank you for attaching your PDB file.
That was a good idea.
It was very helpful for trouble-shooting.
Look inside yourPDB file with a text editor.
Your pdbPDB file is incomplete in three ways:
1) The third column of atom types lacks CA (Calpha) atoms.
PyMOL cannot recognize your
: http://www.bioinformatics.org/pdbeditor/wiki/.
Best regards,
Blaine
From: Kamil Steczkiewicz [kamil.steczkiew...@gmail.com]
Sent: Wednesday, July 07, 2021 2:29 AM
To: Neena Susan Eappen
Cc: Mooers, Blaine H.M. (HSC); zb2...@cumc.columbia.edu; pymol-users
Hi Arun,
I am able to run your script (run ELM_ellipsoid.py) in PyMOL without reported
errors or warnings,
and it displays an ellipsoid centered on the hardwired position in the script.
It looks like you
need to edit the script to supply the center of mass of your structure, the
lengths of
(Arun: this is a resent e-mail. My first e-mail was deleted along with spam
messages. Thomas Holder asked me to resend it.)
Hi Arun,
I am able to run your script (run ELM_ellipsoid.py) in PyMOL without reported
errors or warnings,
and it displays an ellipsoid centered on the hardwired position
Hi Jeff,
In the png file that you posted last week, the smaller spheres
were a lot smaller. They reminded me of nb_spheres.
Did you turn on the display of nb_spheres in your .pymolrc file?
Best regards,
Blaine
From: Jeff Saxon [jmsstarli...@gmail.com]
Hi Isreal,
I converted the script with 2to3 using the command in a terminal:
2to3 pucker.py -w
The modified script ran as advertised on the Wiki in
pymol 2.4.0 on both DNA and RNA fetched as cif (new default) or as pdb.
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Hi Mohammad,
I can confirm that the interfaceResidues.py script works in PyMOL version 1.5.2
running with Python3.8 on Mac OS 10.15.7.
You did not find interface residues in 1ak4 because chains A and B are more
than 15 Angstroms apart.
They have no direct interactions and hence have no
mad Goodarzi [mohammad.goda...@gmail.com]
Sent: Monday, August 16, 2021 9:19 AM
To: Mooers, Blaine H.M. (HSC)
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [EXTERNAL] [PyMOL] extract interference residue
Hi Blaine,
How can I extract them? do you know ?
Thanks
Mo
On Sun, Aug 15,
Dear PyMOL Users mailing list,
Today is the last day to register for the SSRL/LCLS User Meeting that starts on
Monday.
It is free and virtual. https://events.bizzabo.com/SLAC-UsersMeeting-2021/home.
The poster session runs 12 - 1 PM Pacific Time M-Th.
You use the gathertown software to attend
Hi Sunyeping,
Enter on the upper command line in PyMOL, "conda install pandas" to gain access
to the pandas from PyMOL.
Alternatively, you can install pymol in an anaconda env, activate that env, and
then install pandas in that env.
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate
-users@lists.sourceforge.net
Subject: Re: [PyMOL] [EXTERNAL] create a 26 bp RNA from a 13 bp system
Message: 1
Date: Thu, 11 Nov 2021 01:21:47 +
From: "Mooers, Blaine H.M. (HSC)"
mailto:blaine-moo...@ouhsc.edu>>
To: amirhossein taghavi
mailto:taghavi.amirhoss...@gmail.com>
I second G.V.'s question. It touches upon a problem that I have been having.
The cartoon representation is shown when the
structure is loaded from disk or fetched from the PDB.
The default cartoon representation overrides the settings in my pymolrc file.
I have the following in my .pymolrc
Hi Amir,
No, not automatically. Your RNA is very distorted from
the standard A-form. I doubt any modeling program
can accurately extend such a distorted helix. Maybe
someone else will prove me wrong.
Your RNA does not have the expected
doughnut cross-section of the A-form when
viewed down the
Hi Enrico,
You do not need the first line of your script.
This one-liner worked for me in the terminal.
pymol -c -d
"cmd.fetch('3nd3');cmd.show('surface');cmd.set('transparency','0.5');cmd.save('surf.pse');cmd.png('surf.png')"
You might test reversing the order of the cmd.png() and
Hi Tom,
An alternative is to be to show your students how to install Anaconda and then
install open source PyMOL,
which lacks a few minor features of the incentive version but has more features
than the student version.
https://anaconda.org/conda-forge/pymol-open-source.
It is likely that
Hi Martin,
Which version of PyMOL are you using?
How did you install PyMOL?
These details matter because there are several paths for installing PyMOL on
Linux.
Some paths use the system python and some do not.
The incentive PyMOL has Anaconda Python bundled inside.
You could install Ancaonda3
Hi Joaodejota,
The shortcut "yrb" will color the molecular surface to highlight hydrophobicity
using the method of Hagemans et al. 2015.
The shortcut is part of a collection of shortcuts found here
https://github.com/MooersLab/pymolshortcuts/blob/master/README.md
Best regards,
Blaine
Blaine
Hi Prathvi,
You will find answers to the first three questions on the PyMOL wiki:
https://pymolwiki.org/index.php/Selection_Algebra
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology, College of Medicine
Director of the Laboratory of
Hi Chao,
Try issuing the following command at the PyMOL> prompt:
set display_scale_factor, 2
It enlarges the font of the sequence in the viewport and the text in the
internal GUI.
It only takes whole numbers.
Try larger intergers; you can always return to 2 or 1.
It is useful when giving
Hi Petro,
APBS is a plugin and not directly part of PyMOL.
You can run apbs from the command line via subprocess in Python.
https://apbs.readthedocs.io/en/latest/using/index.html
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology,
Hi Petro,
Add the following to your .pymolrc file (pymolrc.pml on Windows)
cmd.do("hide cartoon")
cmd.do("show sticks")
# I also add these lines to my pymolrc
set bg_rgb, white
set stick_radius, 0.125
set valence, off
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department
Hi Luigi ,
Please include the version of PyMOL that you are using.
The APBS Tools are under the "legacy plugins" in the incentive version (2.5.7).
These are absent in the open source PyMOL (2.5.0).
There was a relatively recent change in the Python libraries used to generate
the widgets in
a Data Science
Workshop<https://mediasite.ouhsc.edu/Mediasite/Channel/python>
From: Luigi Marongiu, PhD
Sent: Sunday, November 26, 2023 8:17 AM
To: Luigi Marongiu, PhD
Cc: Mooers, Blaine H.M. (HSC) ;
pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] [
Hi Katayoun,
You can use the command turn.
Enter 'help turn' at the PyMOL prompt to get the documentation about how to use
it.
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Physiology
College of Medicine
University of Oklahoma Health Sciences
83 matches
Mail list logo