https://pymolwiki.org/api.php?action=feedcontributions&user=Momeara&feedformat=atomPyMOLWiki - User contributions [en]2024-03-29T02:15:16ZUser contributionsMediaWiki 1.35.7https://pymolwiki.org/index.php?title=Linux_Install&diff=4476Linux Install2007-12-06T16:45:14Z<p>Momeara: /* Compiling By Hand */</p>
<hr />
<div>Installing PyMol is quite straightforward.<br />
<br />
=PyMol=<br />
Installing PyMol is very simple, even from source. On Linux, you need the following requirements:<br />
* [http://www.python.org/ Python] (with distutils)<br />
* [http://pmw.sf.net Pmw] (Python Megawidgets)<br />
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])<br />
* libpng<br />
<br />
== Generic Linux ==<br />
<br />
=== Quick Install for Latest Features ===<br />
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL. Building PyMOL is generally '''very''' simple. <br />
<br />
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have some sort of superuser (root) access, and have internet access. It will download the most current version from [http://pymol.sf.net PyMOL's Projet Page] and install it. This should install PyMOL onto your system so that any users on your system can use it. To easily get the latest version, do the following:<br />
<source lang="python"><br />
mkdir pymol_temp<br />
cd pymol_temp<br />
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol<br />
cd pymol<br />
sudo python setup.py install<br />
sudo python setup2.py install<br />
sudo cp ./pymol /usr/local/bin/pymol<br />
</source><br />
Now, just remove the '''pymol_temp''' directory if you want and you're done.<br />
<br />
=== 0.99rc1 note! ===<br />
For those keeping current via CVS, building from source, or installing precompiled unix binaries, here is a quick "heads up!" intended to save you some minor grief: For the last six years, the PyMOL launch script has been called '''pymol.com''' instead of simply "pymol". I can't remember why I did things that way, but PyMOL's ".com" convention is different from the most everything else and for no good reason. The launch script should just be the name of the program.<br />
<br />
Therefore, as of 0.99rc1, the launch script will simply be "pymol". No big deal right? Well, not so fast: symbolic links, shell aliases, external scripts, package builders, and end-user habits may all need to be adjusted after installing this next version. That is why I haven't changed this before now -- but we should clean this up before 1.0. So, remember: if you update to PyMOL 0.99rc1 (when it's released) and suddenly can't launch PyMOL, that is likely what is going on. Either reset your pointers to '''./pymol''', or symlink '''./pymol''' to '''./pymol.com''' to preserve the status quo.<br />
<br />
=== From Source ===<br />
* untar the compressed package;<br />
* cd into the newly untarred directory (should be '''pymol''' or '''pymol-version''').<br />
* execute <source lang="python">python setup.py install # you may need to be root</source><br />
* execute <source lang="python">python setup2.py install # you may need to be root</source><br />
* execute <source lang="python">cp ./pymol.com SOME_PATH # where SOME_PATH is some directory in your $PATH</source><br />
or for the latest version, <br />
* execute <source lang="python">cp ./pymol SOME_PATH # where SOME_PATH is some directory in your $PATH</source><br />
The executable name is "pymol.com".<br />
<br />
=== From Package ===<br />
Download the appropriate RPM and use 'rpm' to install it. Typically,<br />
rpm -Uvh rpmFileName.rpm<br />
<br />
===Compiling By Hand===<br />
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues. To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand. The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run. In the most recent available version (0.99rc1) this includes<br />
* tcl-8_4_11.tgz <br />
* tk-8_4_11.tgz <br />
* zlib-1_2_3.tgz <br />
* libpng-1_2_8.tgz <br />
* python-2_4_2.tgz <br />
* numeric-24_2.tgz <br />
* pmw-1_2.tgz <br />
* freetype-2_1_10.tgz <br />
--and-- <br />
* (freeglut-2_4_0.tgz <br />
--or-- <br />
* glut-3_7_6.tgz) <br />
<br />
<br />
<br />
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.<br />
<br />
Here's the basic steps to install by source:<br />
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]<br />
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory<br />
# cd pymol<br />
# cd ext<br />
# vi build.com # edit the build file<br />
# cd ..<br />
# cp setup/Rules.make . # or correct Rules.make file for your machine<br />
# vi Rules.make # make appropriate changes<br />
# vi setup.py # make appropriate changes<br />
# make<br />
<br />
Warnings:<br />
* if you're using a 64-bit machine, lib becomes lib64 for almost everything<br />
* ensure you have the correct Python path and version (is it 2.3? 2.4?)<br />
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])<br />
LIBP= $(exec_installdir)/lib'''''64'''''/python$(VERSION)<br />
<br />
Copy the appropriate setup/Rules.XXX file to the base PyMol dir. You'll have to edit the file for your system. Then run 'make'.<br />
<br />
== Fedora Core Linux (x86) ==<br />
PyMOL RPMs are available for Fedora Core 1 & 2, provided by Morten Kjeldgaard. These can be manually downloaded by browsing from: [http://apt.bioxray.dk/]<br />
<br />
Alternatively, PyMOL can be installed using [http://linux.duke.edu/projects/yum/ Yum] (an automated package installer and updater, installed by default in Fedora). This can be done by adding the following lines to your /etc/yum.conf file:<br />
<br />
[xray]<br />
name=MOKs RPM Repository fedora $releasever - $basearch - xray<br />
baseurl=http://apt.bioxray.dk/fedora/fc$releasever/$basearch/xray<br />
<br />
<br />
you may also need to add the pgp key for the repository before yum will get packages from it by either saying:<br />
<br />
rpm --import http://www.bioxray.dk/~mok/404825e7.asc<br />
<br />
or with older versions of rpm:<br />
<br />
wget http://www.bioxray.dk/~mok/404825e7.asc<br />
rpm --import 404825e7.asc<br />
<br />
<br />
And then issuing the following command as root:<br />
<br />
yum install pymol<br />
<br />
== Gentoo Linux (x86) ==<br />
as root:<br />
emerge pymol<br />
be sure to have the proper OpenGL configuration. For example:<br />
opengl-update ati<br />
opengl-update nvidia<br />
list of available versions of [http://packages.gentoo.org/packages/?category=sci-chemistry;name=pymol pymol for gentoo]<br />
<br />
== SuSe ==<br />
=== 32-bit (x86) ===<br />
See [[#Generic Linux]] above.<br />
<br />
=== 64-bit (x86_64) ===<br />
See [[#Generic Linux]] above. Some details for problem solving are here. 64-bit Python install is quite easy. Make sure your nvidia driver is installed (or ATI, but I have no experience there).<br />
<br />
To install PyMol<br />
*Ensure your system has it's distutils in place and ready to use. Try the following check:<br />
<source lang="python"><br />
from distutils import *<br />
</source><br />
*Download the [http://pymol.org/ source]<br />
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].<br />
** To install Pmw, just decompress it and then move the base director "Pwm" to /usr/lib64/python2.3/site-packages/. You can test that it's there by testing the import, see below:<br />
<source lang="python"><br />
import * from Pmw<br />
</source><br />
If errors erupt, investigate.<br />
* decompress the source and cd into the PyMol directory that was just decompressed.<br />
* If upgrading see [[:Category: Upgrading PyMol|below]].<br />
* Now enter the following...<br />
<code><br />
python setup.py build<br><br />
sudo python setup.py install<br><br />
sudo python setup2.py<br />
</code><br />
* The sudo commands will need a root password or someone with sudo capabilities.<br />
<br />
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:<br />
<source lang="python"><br />
sudo cp ./pymol.com /usr/local/bin<br />
</source><br />
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''. So, for later versions (~0.99+) use<br />
<source lang="python"><br />
sudo cp ./pymol /usr/local/bin<br />
</source><br />
<br />
<br />
You should now have a working PyMol install. <br />
<br />
'''pymol.com''' should now run your new PyMol install.<br />
<br />
==Ubuntu Linux (x86 32,64; mac ppc)==<br />
<br />
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png<br />
<br />
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command<br />
<br />
sudo apt-get install pymol<br />
<br />
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated. <br />
<br />
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.<br />
<br />
=Preparing your System=<br />
See [[Linux_XFree86_Configuration]].<br />
<br />
==Graphics==<br />
===XFree86 Config===<br />
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.<br />
<br />
[[Category:Installation|Linux Installation]]<br />
<br />
===Xorg===<br />
Adding a <br />
Stereo 3<br />
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): <br />
<br />
ModeLine "1280x1024_118.00" 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync<br />
<br />
appears to slightly improve the stereo quality, in particular when one<br />
displays labels and/or dashes/dots.<br />
<br />
For those having possible driver issues, this link might help<br />
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]<br />
<br />
===xorg.conf for stereo in Fedora Core 6===<br />
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the "Device" section of xorg.conf has the following line in it:<br />
<br />
<pre><br />
Driver "nvidia"<br />
</pre><br />
<br />
Add the following section to the end of xorg.conf to disable "Composite", which is incompatible with stereographics.<br />
<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Disable"<br />
EndSection<br />
</pre><br />
<br />
In Section "Screen" add the following line to enable quad-buffered stereo:<br />
<br />
<pre>Option "Stereo" "3"</pre><br />
<br />
=Problems=<br />
<br />
==Input==<br />
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running. Such examples could be SCIM, KINPUT/2 or the like. Try turning off the IME and restarting PyMol to get the widgets to recognize your input.<br />
<br />
==libnvidia-tls.so.1: cannot handle TLS data==<br />
<br />
If you get an error, upon invoking pymol, of the form<br />
<br />
<pre><br />
Traceback (most recent call last):<br />
File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 109, in ?<br />
import pymol<br />
File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 353, in ?<br />
import _cmd<br />
ImportError: libnvidia-tls.so.1: cannot handle TLS data<br />
</pre><br />
<br />
then try changing the permissons on libnvidia-tls.so.1. i.e,<br />
<br />
<pre> sudo chmod 777 /usr/lib/libnvidia-tls.so.1 </pre></div>Momearahttps://pymolwiki.org/index.php?title=Linux_Install&diff=4475Linux Install2007-12-06T16:43:48Z<p>Momeara: /* Compiling By Hand */</p>
<hr />
<div>Installing PyMol is quite straightforward.<br />
<br />
=PyMol=<br />
Installing PyMol is very simple, even from source. On Linux, you need the following requirements:<br />
* [http://www.python.org/ Python] (with distutils)<br />
* [http://pmw.sf.net Pmw] (Python Megawidgets)<br />
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])<br />
* libpng<br />
<br />
== Generic Linux ==<br />
<br />
=== Quick Install for Latest Features ===<br />
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL. Building PyMOL is generally '''very''' simple. <br />
<br />
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have some sort of superuser (root) access, and have internet access. It will download the most current version from [http://pymol.sf.net PyMOL's Projet Page] and install it. This should install PyMOL onto your system so that any users on your system can use it. To easily get the latest version, do the following:<br />
<source lang="python"><br />
mkdir pymol_temp<br />
cd pymol_temp<br />
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol<br />
cd pymol<br />
sudo python setup.py install<br />
sudo python setup2.py install<br />
sudo cp ./pymol /usr/local/bin/pymol<br />
</source><br />
Now, just remove the '''pymol_temp''' directory if you want and you're done.<br />
<br />
=== 0.99rc1 note! ===<br />
For those keeping current via CVS, building from source, or installing precompiled unix binaries, here is a quick "heads up!" intended to save you some minor grief: For the last six years, the PyMOL launch script has been called '''pymol.com''' instead of simply "pymol". I can't remember why I did things that way, but PyMOL's ".com" convention is different from the most everything else and for no good reason. The launch script should just be the name of the program.<br />
<br />
Therefore, as of 0.99rc1, the launch script will simply be "pymol". No big deal right? Well, not so fast: symbolic links, shell aliases, external scripts, package builders, and end-user habits may all need to be adjusted after installing this next version. That is why I haven't changed this before now -- but we should clean this up before 1.0. So, remember: if you update to PyMOL 0.99rc1 (when it's released) and suddenly can't launch PyMOL, that is likely what is going on. Either reset your pointers to '''./pymol''', or symlink '''./pymol''' to '''./pymol.com''' to preserve the status quo.<br />
<br />
=== From Source ===<br />
* untar the compressed package;<br />
* cd into the newly untarred directory (should be '''pymol''' or '''pymol-version''').<br />
* execute <source lang="python">python setup.py install # you may need to be root</source><br />
* execute <source lang="python">python setup2.py install # you may need to be root</source><br />
* execute <source lang="python">cp ./pymol.com SOME_PATH # where SOME_PATH is some directory in your $PATH</source><br />
or for the latest version, <br />
* execute <source lang="python">cp ./pymol SOME_PATH # where SOME_PATH is some directory in your $PATH</source><br />
The executable name is "pymol.com".<br />
<br />
=== From Package ===<br />
Download the appropriate RPM and use 'rpm' to install it. Typically,<br />
rpm -Uvh rpmFileName.rpm<br />
<br />
===Compiling By Hand===<br />
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues. To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand. The '''ext''' package is available from the Source Forge download section and contains all the necessary software to make PyMol run. In the most recent available version (0.99rc1) this includes<br />
* tcl-8_4_11.tgz <br />
* tk-8_4_11.tgz <br />
* zlib-1_2_3.tgz <br />
* libpng-1_2_8.tgz <br />
* python-2_4_2.tgz <br />
* numeric-24_2.tgz <br />
* pmw-1_2.tgz <br />
* freetype-2_1_10.tgz <br />
<br />
and <br />
<br />
* freeglut-2_4_0.tgz <br />
or <br />
* glut-3_7_6.tgz <br />
<br />
<br />
<br />
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.<br />
<br />
Here's the basic steps to install by source:<br />
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]<br />
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory<br />
# cd pymol<br />
# cd ext<br />
# vi build.com # edit the build file<br />
# cd ..<br />
# cp setup/Rules.make . # or correct Rules.make file for your machine<br />
# vi Rules.make # make appropriate changes<br />
# vi setup.py # make appropriate changes<br />
# make<br />
<br />
Warnings:<br />
* if you're using a 64-bit machine, lib becomes lib64 for almost everything<br />
* ensure you have the correct Python path and version (is it 2.3? 2.4?)<br />
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])<br />
LIBP= $(exec_installdir)/lib'''''64'''''/python$(VERSION)<br />
<br />
Copy the appropriate setup/Rules.XXX file to the base PyMol dir. You'll have to edit the file for your system. Then run 'make'.<br />
<br />
== Fedora Core Linux (x86) ==<br />
PyMOL RPMs are available for Fedora Core 1 & 2, provided by Morten Kjeldgaard. These can be manually downloaded by browsing from: [http://apt.bioxray.dk/]<br />
<br />
Alternatively, PyMOL can be installed using [http://linux.duke.edu/projects/yum/ Yum] (an automated package installer and updater, installed by default in Fedora). This can be done by adding the following lines to your /etc/yum.conf file:<br />
<br />
[xray]<br />
name=MOKs RPM Repository fedora $releasever - $basearch - xray<br />
baseurl=http://apt.bioxray.dk/fedora/fc$releasever/$basearch/xray<br />
<br />
<br />
you may also need to add the pgp key for the repository before yum will get packages from it by either saying:<br />
<br />
rpm --import http://www.bioxray.dk/~mok/404825e7.asc<br />
<br />
or with older versions of rpm:<br />
<br />
wget http://www.bioxray.dk/~mok/404825e7.asc<br />
rpm --import 404825e7.asc<br />
<br />
<br />
And then issuing the following command as root:<br />
<br />
yum install pymol<br />
<br />
== Gentoo Linux (x86) ==<br />
as root:<br />
emerge pymol<br />
be sure to have the proper OpenGL configuration. For example:<br />
opengl-update ati<br />
opengl-update nvidia<br />
list of available versions of [http://packages.gentoo.org/packages/?category=sci-chemistry;name=pymol pymol for gentoo]<br />
<br />
== SuSe ==<br />
=== 32-bit (x86) ===<br />
See [[#Generic Linux]] above.<br />
<br />
=== 64-bit (x86_64) ===<br />
See [[#Generic Linux]] above. Some details for problem solving are here. 64-bit Python install is quite easy. Make sure your nvidia driver is installed (or ATI, but I have no experience there).<br />
<br />
To install PyMol<br />
*Ensure your system has it's distutils in place and ready to use. Try the following check:<br />
<source lang="python"><br />
from distutils import *<br />
</source><br />
*Download the [http://pymol.org/ source]<br />
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].<br />
** To install Pmw, just decompress it and then move the base director "Pwm" to /usr/lib64/python2.3/site-packages/. You can test that it's there by testing the import, see below:<br />
<source lang="python"><br />
import * from Pmw<br />
</source><br />
If errors erupt, investigate.<br />
* decompress the source and cd into the PyMol directory that was just decompressed.<br />
* If upgrading see [[:Category: Upgrading PyMol|below]].<br />
* Now enter the following...<br />
<code><br />
python setup.py build<br><br />
sudo python setup.py install<br><br />
sudo python setup2.py<br />
</code><br />
* The sudo commands will need a root password or someone with sudo capabilities.<br />
<br />
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:<br />
<source lang="python"><br />
sudo cp ./pymol.com /usr/local/bin<br />
</source><br />
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''. So, for later versions (~0.99+) use<br />
<source lang="python"><br />
sudo cp ./pymol /usr/local/bin<br />
</source><br />
<br />
<br />
You should now have a working PyMol install. <br />
<br />
'''pymol.com''' should now run your new PyMol install.<br />
<br />
==Ubuntu Linux (x86 32,64; mac ppc)==<br />
<br />
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png<br />
<br />
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command<br />
<br />
sudo apt-get install pymol<br />
<br />
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated. <br />
<br />
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.<br />
<br />
=Preparing your System=<br />
See [[Linux_XFree86_Configuration]].<br />
<br />
==Graphics==<br />
===XFree86 Config===<br />
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.<br />
<br />
[[Category:Installation|Linux Installation]]<br />
<br />
===Xorg===<br />
Adding a <br />
Stereo 3<br />
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): <br />
<br />
ModeLine "1280x1024_118.00" 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync<br />
<br />
appears to slightly improve the stereo quality, in particular when one<br />
displays labels and/or dashes/dots.<br />
<br />
For those having possible driver issues, this link might help<br />
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]<br />
<br />
===xorg.conf for stereo in Fedora Core 6===<br />
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the "Device" section of xorg.conf has the following line in it:<br />
<br />
<pre><br />
Driver "nvidia"<br />
</pre><br />
<br />
Add the following section to the end of xorg.conf to disable "Composite", which is incompatible with stereographics.<br />
<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Disable"<br />
EndSection<br />
</pre><br />
<br />
In Section "Screen" add the following line to enable quad-buffered stereo:<br />
<br />
<pre>Option "Stereo" "3"</pre><br />
<br />
=Problems=<br />
<br />
==Input==<br />
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running. Such examples could be SCIM, KINPUT/2 or the like. Try turning off the IME and restarting PyMol to get the widgets to recognize your input.<br />
<br />
==libnvidia-tls.so.1: cannot handle TLS data==<br />
<br />
If you get an error, upon invoking pymol, of the form<br />
<br />
<pre><br />
Traceback (most recent call last):<br />
File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 109, in ?<br />
import pymol<br />
File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 353, in ?<br />
import _cmd<br />
ImportError: libnvidia-tls.so.1: cannot handle TLS data<br />
</pre><br />
<br />
then try changing the permissons on libnvidia-tls.so.1. i.e,<br />
<br />
<pre> sudo chmod 777 /usr/lib/libnvidia-tls.so.1 </pre></div>Momearahttps://pymolwiki.org/index.php?title=Linux_Install&diff=4467Linux Install2007-12-06T15:42:47Z<p>Momeara: /* PyMol */</p>
<hr />
<div>Installing PyMol is quite straightforward.<br />
<br />
=PyMol=<br />
Installing PyMol is very simple, even from source. On Linux, you need the following requirements:<br />
* [http://www.python.org/ Python] (with distutils)<br />
* [http://pmw.sf.net Pmw] (Python Megawidgets)<br />
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])<br />
* libpng<br />
<br />
== Generic Linux ==<br />
<br />
=== Quick Install for Latest Features ===<br />
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL. Building PyMOL is generally '''very''' simple. <br />
<br />
This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have some sort of superuser (root) access, and have internet access. It will download the most current version from [http://pymol.sf.net PyMOL's Projet Page] and install it. This should install PyMOL onto your system so that any users on your system can use it. To easily get the latest version, do the following:<br />
<source lang="python"><br />
mkdir pymol_temp<br />
cd pymol_temp<br />
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol<br />
cd pymol<br />
sudo python setup.py install<br />
sudo python setup2.py install<br />
sudo cp ./pymol /usr/local/bin/pymol<br />
</source><br />
Now, just remove the '''pymol_temp''' directory if you want and you're done.<br />
<br />
=== 0.99rc1 note! ===<br />
For those keeping current via CVS, building from source, or installing precompiled unix binaries, here is a quick "heads up!" intended to save you some minor grief: For the last six years, the PyMOL launch script has been called '''pymol.com''' instead of simply "pymol". I can't remember why I did things that way, but PyMOL's ".com" convention is different from the most everything else and for no good reason. The launch script should just be the name of the program.<br />
<br />
Therefore, as of 0.99rc1, the launch script will simply be "pymol". No big deal right? Well, not so fast: symbolic links, shell aliases, external scripts, package builders, and end-user habits may all need to be adjusted after installing this next version. That is why I haven't changed this before now -- but we should clean this up before 1.0. So, remember: if you update to PyMOL 0.99rc1 (when it's released) and suddenly can't launch PyMOL, that is likely what is going on. Either reset your pointers to '''./pymol''', or symlink '''./pymol''' to '''./pymol.com''' to preserve the status quo.<br />
<br />
=== From Source ===<br />
* untar the compressed package;<br />
* cd into the newly untarred directory (should be '''pymol''' or '''pymol-version''').<br />
* execute <source lang="python">python setup.py install # you may need to be root</source><br />
* execute <source lang="python">python setup2.py install # you may need to be root</source><br />
* execute <source lang="python">cp ./pymol.com SOME_PATH # where SOME_PATH is some directory in your $PATH</source><br />
or for the latest version, <br />
* execute <source lang="python">cp ./pymol SOME_PATH # where SOME_PATH is some directory in your $PATH</source><br />
The executable name is "pymol.com".<br />
<br />
=== From Package ===<br />
Download the appropriate RPM and use 'rpm' to install it. Typically,<br />
rpm -Uvh rpmFileName.rpm<br />
<br />
===Compiling By Hand===<br />
Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues. To overcome this, you can download the '''ext''' package and the PyMol source and compile/install by hand. <br />
<br />
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''.<br />
<br />
Here's the basic steps to install by source:<br />
# get the source [http://delsci.com/rel/0_98/#OtherUnix PyMol Source]<br />
# extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory<br />
# cd pymol<br />
# cd ext<br />
# vi build.com # edit the build file<br />
# cd ..<br />
# cp setup/Rules.make . # or correct Rules.make file for your machine<br />
# vi Rules.make # make appropriate changes<br />
# vi setup.py # make appropriate changes<br />
# make<br />
<br />
Warnings:<br />
* if you're using a 64-bit machine, lib becomes lib64 for almost everything<br />
* ensure you have the correct Python path and version (is it 2.3? 2.4?)<br />
* make sure you make the changes in '''Rules.make''', '''setup.py''', and '''Makefile''', for your platform. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 ([[leafyoung at yahoo dot com]])<br />
LIBP= $(exec_installdir)/lib'''''64'''''/python$(VERSION)<br />
<br />
Copy the appropriate setup/Rules.XXX file to the base PyMol dir. You'll have to edit the file for your system. Then run 'make'.<br />
<br />
== Fedora Core Linux (x86) ==<br />
PyMOL RPMs are available for Fedora Core 1 & 2, provided by Morten Kjeldgaard. These can be manually downloaded by browsing from: [http://apt.bioxray.dk/]<br />
<br />
Alternatively, PyMOL can be installed using [http://linux.duke.edu/projects/yum/ Yum] (an automated package installer and updater, installed by default in Fedora). This can be done by adding the following lines to your /etc/yum.conf file:<br />
<br />
[xray]<br />
name=MOKs RPM Repository fedora $releasever - $basearch - xray<br />
baseurl=http://apt.bioxray.dk/fedora/fc$releasever/$basearch/xray<br />
<br />
<br />
you may also need to add the pgp key for the repository before yum will get packages from it by either saying:<br />
<br />
rpm --import http://www.bioxray.dk/~mok/404825e7.asc<br />
<br />
or with older versions of rpm:<br />
<br />
wget http://www.bioxray.dk/~mok/404825e7.asc<br />
rpm --import 404825e7.asc<br />
<br />
<br />
And then issuing the following command as root:<br />
<br />
yum install pymol<br />
<br />
== Gentoo Linux (x86) ==<br />
as root:<br />
emerge pymol<br />
be sure to have the proper OpenGL configuration. For example:<br />
opengl-update ati<br />
opengl-update nvidia<br />
list of available versions of [http://packages.gentoo.org/packages/?category=sci-chemistry;name=pymol pymol for gentoo]<br />
<br />
== SuSe ==<br />
=== 32-bit (x86) ===<br />
See [[#Generic Linux]] above.<br />
<br />
=== 64-bit (x86_64) ===<br />
See [[#Generic Linux]] above. Some details for problem solving are here. 64-bit Python install is quite easy. Make sure your nvidia driver is installed (or ATI, but I have no experience there).<br />
<br />
To install PyMol<br />
*Ensure your system has it's distutils in place and ready to use. Try the following check:<br />
<source lang="python"><br />
from distutils import *<br />
</source><br />
*Download the [http://pymol.org/ source]<br />
*Download [http://www.sf.net/projects/pmw Pmw] from [http://www.sf.net/ SourceForge].<br />
** To install Pmw, just decompress it and then move the base director "Pwm" to /usr/lib64/python2.3/site-packages/. You can test that it's there by testing the import, see below:<br />
<source lang="python"><br />
import * from Pmw<br />
</source><br />
If errors erupt, investigate.<br />
* decompress the source and cd into the PyMol directory that was just decompressed.<br />
* If upgrading see [[:Category: Upgrading PyMol|below]].<br />
* Now enter the following...<br />
<code><br />
python setup.py build<br><br />
sudo python setup.py install<br><br />
sudo python setup2.py<br />
</code><br />
* The sudo commands will need a root password or someone with sudo capabilities.<br />
<br />
I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:<br />
<source lang="python"><br />
sudo cp ./pymol.com /usr/local/bin<br />
</source><br />
Please note that newer versions of PyMol create the '''pymol''' executable, not '''pymol.com'''. So, for later versions (~0.99+) use<br />
<source lang="python"><br />
sudo cp ./pymol /usr/local/bin<br />
</source><br />
<br />
<br />
You should now have a working PyMol install. <br />
<br />
'''pymol.com''' should now run your new PyMol install.<br />
<br />
==Ubuntu Linux (x86 32,64; mac ppc)==<br />
<br />
http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png<br />
<br />
The [http://www.ubuntu.com/ Ubuntu] [http://packages.ubuntu.com/breezy/science/pymol pymol package] can be installed with minimal effort using the GUI package manager [http://en.wikipedia.org/wiki/Synaptic_Package_Manager synaptic], or on the command line, using the command<br />
<br />
sudo apt-get install pymol<br />
<br />
once the [http://ubuntuguide.org/#extrarepositories universe repository] has been activated. <br />
<br />
[http://en.wikipedia.org/wiki/Ubuntu_Linux Ubuntu] is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using [http://xanana.ucsc.edu/linux/debian_linux.html Ubuntu for crystallography] and related applications are available are linked. PyMol also compiles from source on Ubuntu following the [[#Generic Linux]] instructions given above.<br />
<br />
=Preparing your System=<br />
See [[Linux_XFree86_Configuration]].<br />
<br />
==Graphics==<br />
===XFree86 Config===<br />
Check out [[XFree86_Configuration|Configuring XFree86]] if you need information on editing the XFree86 configuration file.<br />
<br />
[[Category:Installation|Linux Installation]]<br />
<br />
===Xorg===<br />
Adding a <br />
Stereo 3<br />
option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf): <br />
<br />
ModeLine "1280x1024_118.00" 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync<br />
<br />
appears to slightly improve the stereo quality, in particular when one<br />
displays labels and/or dashes/dots.<br />
<br />
For those having possible driver issues, this link might help<br />
[http://www.nvnews.net/vbulletin/showthread.php?t=69136 NVNews]<br />
<br />
===xorg.conf for stereo in Fedora Core 6===<br />
It is assumed that you have installed the proprietary [http://www.nvidia.com/content/drivers/drivers.asp Nvidia graphics drivers], and that the "Device" section of xorg.conf has the following line in it:<br />
<br />
<pre><br />
Driver "nvidia"<br />
</pre><br />
<br />
Add the following section to the end of xorg.conf to disable "Composite", which is incompatible with stereographics.<br />
<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Disable"<br />
EndSection<br />
</pre><br />
<br />
In Section "Screen" add the following line to enable quad-buffered stereo:<br />
<br />
<pre>Option "Stereo" "3"</pre><br />
<br />
=Problems=<br />
<br />
==Input==<br />
If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running. Such examples could be SCIM, KINPUT/2 or the like. Try turning off the IME and restarting PyMol to get the widgets to recognize your input.<br />
<br />
==libnvidia-tls.so.1: cannot handle TLS data==<br />
<br />
If you get an error, upon invoking pymol, of the form<br />
<br />
<pre><br />
Traceback (most recent call last):<br />
File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 109, in ?<br />
import pymol<br />
File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 353, in ?<br />
import _cmd<br />
ImportError: libnvidia-tls.so.1: cannot handle TLS data<br />
</pre><br />
<br />
then try changing the permissons on libnvidia-tls.so.1. i.e,<br />
<br />
<pre> sudo chmod 777 /usr/lib/libnvidia-tls.so.1 </pre></div>Momearahttps://pymolwiki.org/index.php?title=Symmetry_Axis&diff=4463Symmetry Axis2007-11-30T15:13:28Z<p>Momeara: New page: <source lang="python"> ########################################################### # # Pymol script copyright Matthew O'Meara and Xavier Ambroggio 2007 # # Last updated Nov 29, 2007 # # Draw an axis ...</p>
<hr />
<div><source lang="python"><br />
###########################################################<br />
#<br />
# Pymol script copyright Matthew O'Meara and Xavier Ambroggio 2007<br />
#<br />
# Last updated Nov 29, 2007<br />
#<br />
# Draw an axis given a point and a direction. Optionally give color,<br />
# length and width.<br />
#<br />
# Usage: from the pymol menu click file->run... then find this file.<br />
# Then at the prompt, type<br />
#<br />
# draw_axis x,y,z, i,k,j<br />
#<br />
# where (x,y,z) is the point and (i,k,j) is the direction<br />
#<br />
#<br />
# Also one can run the script as follows<br />
#<br />
#<br />
# draw_axis x,y,z, i,k,j, length r,g,b, width,<br />
#<br />
# where (r,g,b) is the color for the line in red, green, colors,<br />
# width is the thickness of the line and length is the length of the<br />
# line.<br />
#<br />
#<br />
# For a fun example of the script run from the command line after the<br />
# script is loaded<br />
#<br />
# draw_axis_example<br />
#<br />
#<br />
<br />
from pymol.cgo import * # get constants<br />
from pymol import cmd<br />
<br />
import math<br />
<br />
class Counter:<br />
def __init__(self):<br />
self.state = 1<br />
counter = Counter()<br />
<br />
def draw_axis(x=None, y=None, z=None, i=None, j=None, k=None, length=20.0, r=1.0, g=1.0, b=1.0, width=1.0 ):<br />
if x == None or y == None or z == None or i == None or j == None or k== None :<br />
print 'Usage: draw_axis x,y,z, i,k,j, length, r,g,b, width'<br />
print 'draw a line centered at (x,y,z) with the direction vector (i,j,k)'<br />
print 'length, color (r,g,b), and width arguments are optional'<br />
# print 'For a fun example of the command, run draw_axis_example'<br />
else :<br />
x,y,z = float(x), float(y), float(z)<br />
i,j,k = float(i), float(j), float(k)<br />
r,g,b = float(r), float(g), float(b)<br />
width = float(width)<br />
length = float(length) / 2.0<br />
<br />
x1,y1,z1 = (x+i*length,y+j*length,z+k*length)<br />
x2,y2,z2 = (x-i*length,y-j*length,z-k*length)<br />
<br />
obj = [<br />
LINEWIDTH, width,<br />
BEGIN, LINES,<br />
<br />
COLOR, r, g, b,<br />
VERTEX, x1, y1, z1,<br />
VERTEX, x2, y2, z2,<br />
<br />
END<br />
]<br />
<br />
cmd.load_cgo(obj,'axis'+str(counter.state))<br />
counter.state += 1<br />
<br />
cmd.extend("draw_axis", draw_axis)<br />
<br />
# a simple example<br />
#draw_line(x=18.232, y=17.150, z=9.488,<br />
# i=-.226639,j=0.708772,k=-.668039,<br />
# r=1, b=1, g=1,<br />
# width=1, length=1)<br />
<br />
<br />
<br />
<br />
# a more complex example<br />
<br />
#import random<br />
#def example1(n, f):<br />
# """draw a gradient field with n segments with the function f(x,y,z)=(i,j,k)"""<br />
# for i in range(n):<br />
# scale = 4<br />
# x,y,z = [random.random()*scale for i in range(3)]<br />
# i,j,k = f(x,y,z)<br />
<br />
# draw_axis(x,y,z,i,j,k,abs(i),abs(j),abs(k))<br />
<br />
<br />
#def f(x,y,z):<br />
# return (2*x,pow(z,2)+x,y-z)<br />
<br />
#cmd.extend("draw_axis_example", lambda :example1(1000,f))<br />
</source><br />
[[Category:Script_Library|Symmetry Axis]]</div>Momearahttps://pymolwiki.org/index.php?title=Category:Script_Library&diff=4462Category:Script Library2007-11-30T15:11:02Z<p>Momeara: /* Descriptions */</p>
<hr />
<div>= Overview =<br />
Here we provide a trove of scripts. The descriptions immediately follow. For the entire category, please see the bottom of this page.<br />
<br />
= Descriptions =<br />
<br />
* [[Zero_residues]] -- Renumber residues such that the first residue is 0. Useful for alignments.<br />
<br />
* [[Cealign]] -- Implementation of the CE Structure Alignment algorithm as a PyMOL plugin.<br />
<br />
* [[WriteSS]] -- Writes secondary structural elements, for each residues, to a file.<br />
<br />
* [[Process_All_Files_In_Directory]] -- Do something to all files in a directory. The examples show how to print the disulfide bond lengths, then in general all sulfur distances (not necessarily bound).<br />
<br />
* [[Kabsch]] -- Kabsch alignment of two sets of vectors. (Part 2 of a protein alignment.)<br />
<br />
* [[Transform_odb]] -- Transform a selection of an existing object and output as a new object. The transformation matrix is read from an "O"-style tranformation matrix file (.odb) written by "O" or by any of the Uppsala Software Factory programs (from Gerard Klegweit) such as LSQMAN.<br />
<br />
* [[Stereo_Ray]] -- This script will create two resolution specific ray traced images rotated appropriately for inclusion into a single file to represent a stereo view of the desired macromolecule.<br />
<br />
* [[Translate_And_Measure]] -- prints '''overlap''' if any of the atoms in molA or molB were within 4 Angstrom after translating by 1 along X<br />
<br />
* [[Show aromatics]] -- This script will display a backbone "worm" for your protein, with all of the sidechains for aromatic residues displayed as green "sticks". Usage: Save this as "show_aromatics.pml", load your protein in PyMOL, and run the script (select "Run" from the "File" menu). (PyMOL script; TStout)<br />
<br />
* [[Show hydrophobics]] -- This script will display a backbone "worm" for your protein, with all of the sidechains for hydrophobic residues displayed as orange "sticks". Usage: Same as "show aromatics". (PyMOL script; TStout)<br />
<br />
* [[Show charged]] -- This script will display a backbone "worm" for your protein, with all of the sidechains for charged residues displayed as red (negative) or blue (posititve) "sticks". Usage: Same as "show aromatics". (PyMOL script; TStout)<br />
<br />
* [[Show hydrophilic]] -- This script will display a backbone "worm" for your protein, with all of the sidechains for hydrophilic residues displayed as green "sticks". Usage: Same as "show aromatics". (PyMOL script; TStout)<br />
<br />
* [[Show NMR constrains]] -- This script will display the NMR constrains used for a structure calculation atop a structure. Usage: Save this as "NMRcnstr.py" load your protein in PyMOL, and run the script. type upl('fname') or cns('fname') where fname is the filename with the NMR constrains you want to display. <br />
<br />
* [[Perp Maker]] -- Creates a perpendicular plane through the center of your protein with respect to the camera's current position. (If you translate the protein towards the camera a bit, you get a nice surface, sometimes.) A stupid little script I wrote in response to a request a few months ago (and it doesn't even conform to the request!) Load a protein, run the script (read the documentation in the script). (Jason Vertrees/[[User:Tree|Tree]])<br />
<br />
* [[PythonTerminal]] -- Allows execution of python commands from the PyMOL command line.<br />
<br />
* [[Axes]] -- Creates a 3D-CGO object that shows the three coordinate axes.<br />
<br />
* [[Symmetry Axis]] -- Draw a 3D-CGO line given a point and a direction. <br />
<br />
* [[CGO Text]] -- Creates a 3D-CGO text object.<br />
<br />
* [[List Selection]] -- Prints a list of all residues in a selection (both Python and .pml).<br />
<br />
* [[List Colors]] -- Lists the color of all residues in a selection (both Python and .pml).<br />
<br />
* [[List Secondary Structures]] -- Secondary structures (both predefined and those calculated with the 'dss' command) can be exported as a long string ('HHHHLLLLSSS').<br />
<br />
* [[Split Movement]] -- Moves two parts of one object into different directions.<br />
<br />
* [[Selection Exists]] -- Python method that returns true if a selection of a given name exists.<br />
<br />
* [[Get Coordinates I]] -- Retrieves atom coordinates as Python objects.<br />
<br />
* [[Get Coordinates II]] -- Retrieves atom coordinates as Python array (list object).<br />
<br />
* [[grepset]] -- List all settings matching a given keyword. - ''by EHP''<br />
<br />
* [[apropos]] -- List all commands matching a given keyword or whose docs contain the keyword. - ''by EHP''<br />
<br />
* [[mouse_modes]] -- customize the default mouse bindings for Viewing or Editing modes. - ''by EHP''<br />
<br />
* [[Measure Distance]] -- Measures the distance between two atoms (Python script).<br />
<br />
* [[Read PDB-String]] -- Parses a string in PDB format to a PyMOL object.<br />
<br />
* [[Color Objects]] -- Colors all objects differently (Python script).<br />
<br />
* [[Key Wait]] -- Process key events in a Python script.<br />
<br />
* [[Bounding Box]] -- Create a bounding box around a selection (Python script; requires numarray and Scientific; gilleain)<br />
<br />
* [[Ellipsoid]] -- Create callback object (opengl) ellipsoids. (Python script; gilleain)<br />
<br />
* [[pdbsurvey]] -- Surveys the pdb for recently added structures that are relevant to a user-specified keywords list (in a text file)<br />
<br />
* [[resicolor]] -- Colors proteins according to residue type.<br />
<br />
* [[TransformSelectionByCameraView]] -- Transforms the selection by the camera view.<br />
<br />
* [[WFMesh]] -- Imports wavefront object mesh files; Starwars as an example!<br />
<br />
* [[grepsel]] -- Make named selections using regular expressions (protein sequence).<br />
<br />
* [[PowerMate Dial OS X]] -- Script and instructions to use the PowerMate dial on Mac OS X.<br />
<br />
* [[Plane Wizard]] -- Wizard to draw planes between three picked points.<br />
<br />
* [[Slerpy]] -- Pymol command extensions for key frame animation movie making.<br />
<br />
* [[Helicity_check]] -- helicity_check show the evolution of O - N distances over an amino acid sequence<br />
<br />
* [[Center Of Mass]] -- Given a selection of atoms (of equal weight) - Calculates the center of mass and represents it with a CGO sphere<br />
<br />
* [[ss]] -- Simple command to summarise the Secondary Structure as a list of "start-end type" like sses.<br />
<br />
* [[iterate_sses]] -- Slightly more complex version of "ss" that allows the user to pass in a function to act on the sse list.<br />
<br />
* [[motif]] -- Designed for easy display of backbone motifs (nests, catgrips, etc).<br />
<br />
[[Category:Scripting|Script Library]]</div>Momearahttps://pymolwiki.org/index.php?title=Get_Model&diff=4166Get Model2007-09-26T18:41:15Z<p>Momeara: /* NOTES */</p>
<hr />
<div>===DESCRIPTION===<br />
'''get_model''' returns a model object.<br />
<br />
===PYMOL API===<br />
<source lang="python"><br />
cmd.get_model(string "selection" )<br />
</source><br />
<br />
===USAGE===<br />
cmd.get_model("chain A")<br />
<br />
===NOTES===<br />
It can be useful to loop through all the atoms of a selection (rather than using the iterate command)<br />
<source lang="python"><br />
atoms = cmd.get_model("chain A")<br />
for at in atoms.atom:<br />
print "ATOM DEFINITION: "+at.chain+" "\<br />
+at.resn+" "\<br />
+str(at.resi)+" "\<br />
+at.name+" "\<br />
+str(at.index)+" "\<br />
+at.b+" "\<br />
+str(at.coords[0])+" "\<br />
+str(at.coords[1])+" "\<br />
+str(at.coords[2]) <br />
</source><br />
<br />
===SEE ALSO===<br />
[[Category:Commands|get_model]]</div>Momearahttps://pymolwiki.org/index.php?title=Get_Model&diff=4165Get Model2007-09-26T18:39:36Z<p>Momeara: /* NOTES */</p>
<hr />
<div>===DESCRIPTION===<br />
'''get_model''' returns a model object.<br />
<br />
===PYMOL API===<br />
<source lang="python"><br />
cmd.get_model(string "selection" )<br />
</source><br />
<br />
===USAGE===<br />
cmd.get_model("chain A")<br />
<br />
===NOTES===<br />
It can be useful to loop through all the atoms of a selection (rather than using the iterate command)<br />
<source lang="python"><br />
atoms = cmd.get_model("chain A")<br />
for at in atoms.atom:<br />
print "ATOM DEFINITION: "+at.chain+" "+at.resn+" "+str(at.resi)+" "+at.name+" "+str(at.index)+" "+at.b+" "+str(at.coords[0])+" "+str(at.coords[1])+" "+str(at.coords[2]) <br />
</source><br />
<br />
===SEE ALSO===<br />
[[Category:Commands|get_model]]</div>Momeara